CAM: Do not show models of the toolbits in Job dialog (#22893)
This commit is contained in:
@@ -77,10 +77,10 @@ def getPropertyValueString(obj, prop):
|
||||
def setProperty(obj, prop, value):
|
||||
"""setProperty(obj, prop, value) ... set the property value of obj's property defined by its canonical name."""
|
||||
o, attr, name = _getProperty(obj, prop)
|
||||
if not attr is None and type(value) == str:
|
||||
if type(attr) == int:
|
||||
if attr is not None and isinstance(value, str):
|
||||
if isinstance(attr, int):
|
||||
value = int(value, 0)
|
||||
elif type(attr) == bool:
|
||||
elif isinstance(attr, bool):
|
||||
value = value.lower() in ["true", "1", "yes", "ok"]
|
||||
if o and name:
|
||||
setattr(o, name, value)
|
||||
@@ -99,6 +99,10 @@ def isValidBaseObject(obj):
|
||||
if hasattr(obj, "BitBody") and hasattr(obj, "ShapeName"):
|
||||
# ToolBit's are not valid base objects
|
||||
return False
|
||||
if hasattr(obj, "ToolBitID"):
|
||||
return False
|
||||
if any(hasattr(ob, "ToolBitID") for ob in getattr(obj, "InListRecursive", [])):
|
||||
return False
|
||||
if obj.TypeId in NotValidBaseTypeIds:
|
||||
Path.Log.debug("%s is blacklisted (%s)" % (obj.Label, obj.TypeId))
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user