This commit is contained in:
2025-11-25 02:15:17 +08:00
parent abef69c80a
commit 47c4099db4
2 changed files with 12 additions and 5 deletions

View File

@@ -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"))

View File

@@ -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