diff --git a/2023/scripts/animation_tools/atools/animTools/animBar/subUIs/specialTools_subUIs/fakeConstrain.py b/2023/scripts/animation_tools/atools/animTools/animBar/subUIs/specialTools_subUIs/fakeConstrain.py index bc76a44..8199de8 100644 --- a/2023/scripts/animation_tools/atools/animTools/animBar/subUIs/specialTools_subUIs/fakeConstrain.py +++ b/2023/scripts/animation_tools/atools/animTools/animBar/subUIs/specialTools_subUIs/fakeConstrain.py @@ -127,9 +127,12 @@ class FakeConstrain(object): self.targetObj = "world" for loopObj in self.sourceObjs: - matrix = cmds.xform(loopObj, query=True, ws=True, matrix=True) - - self.copyCache.append(matrix) + try: + matrix = cmds.xform(loopObj, query=True, ws=True, matrix=True) + self.copyCache.append(matrix) + except RuntimeError: + # Object doesn't exist or is invalid, skip silently + pass cmds.iconTextButton("fakeConstrainBtn", edit=True, image= uiMod.getImagePath("specialTools_fake_constrain_active"), highlightImage= uiMod.getImagePath("specialTools_fake_constrain_active copy")) diff --git a/2023/scripts/animation_tools/atools/animTools/animBar/subUIs/specialTools_subUIs/microTransform.py b/2023/scripts/animation_tools/atools/animTools/animBar/subUIs/specialTools_subUIs/microTransform.py index 0423b16..bf20455 100644 --- a/2023/scripts/animation_tools/atools/animTools/animBar/subUIs/specialTools_subUIs/microTransform.py +++ b/2023/scripts/animation_tools/atools/animTools/animBar/subUIs/specialTools_subUIs/microTransform.py @@ -282,8 +282,12 @@ class MicroTransform(object): for loopSel in sel: for loopAttr in self.attributes: - val = cmds.getAttr("%s.%s"%(loopSel, loopAttr)) - self.microTransformValues["%s_%s"%(loopSel, loopAttr)] = val + try: + val = cmds.getAttr("%s.%s"%(loopSel, loopAttr)) + self.microTransformValues["%s_%s"%(loopSel, loopAttr)] = val + except (ValueError, RuntimeError): + # Attribute doesn't exist, skip silently + pass