import MQSystem
doc = MQSystem.getDocument()
objnum = doc.numObject
# Find the object to move
for oi in range(objnum):
obj = doc.object[oi]
if obj is not None and obj.name == "obj1":
print("Found obj1")
if hasattr(obj, "translation"):
# Move the object down by 1 unit
translation = obj.translation
translation.y -= 1
obj.translation = translation
# Rotate the object 180 degrees
rotation = MQSystem.newAngle(0, 180, 0)
obj.rotation = rotation
else:
print("obj1 does not have a translation attribute")
Show more...
break
it does not move object at all no error :I nohting.
I need it to move object down and rotate it 180....