Skip to content

Commit dfd6182

Browse files
committed
Save and apply XML provided offset to pan/tilt geometries
1 parent 8c6cd75 commit dfd6182

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

fixture.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2166,6 +2166,7 @@ def updatePTDirectly(self, geometry, axis_type, value, current_frame):
21662166
else:
21672167
geometry = self.get_object_by_geometry_name(geometry)
21682168
if geometry:
2169+
value = value + geometry.get("applied_rotation", [0, 0])[offset]
21692170
geometry.rotation_mode = "XYZ"
21702171
geometry.rotation_euler[offset] = value
21712172
if current_frame and self.dmx_cache_dirty:

gdtf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,9 @@ def add_child_position(geometry):
635635
rotation = geometry_mtx.to_3x3().inverted()
636636
scale = geometry_mtx.to_scale()
637637
obj_child.matrix_local = Matrix.LocRotScale(translate, rotation, scale)
638+
obj_child.rotation_mode = "XYZ"
639+
obj_child["applied_rotation"] = obj_child.rotation_euler
640+
# baking into the object did not work, we store the rotation and re-apply it on pan/tilt in render()
638641

639642
def constraint_child_to_parent(parent_geometry, child_geometry):
640643
if sanitize_obj_name(parent_geometry) not in objs:

0 commit comments

Comments
 (0)