Metasequoia BBS

| New message | Normal | Tree |
Status
Tag
Keyword
[9686] Move object down and rotate / no error in code.
Not necessary [Request,help! ] Response
    import MQSystem
    import math
    
    doc = MQSystem.getDocument()
    objects = []
    
    # Find the objects we want to move and rotate
    for oi in range(doc.numObject):
        obj = doc.object[oi]
        if obj is not None and obj.name == "obj1":
            objects.append(obj)
    
    # Move and rotate the objects
    for obj in objects:
        # Move the object down
        obj.translation.y -= 10.0  # Adjust the value to move the object to the desired height
    
        # Rotate the object
        mtx = MQSystem.newMatrix()
        # Set the matrix to rotate around the X axis by 45 degrees

Show more...
2023-02-15 09:47