Skip to content

Commit

Permalink
Handle gobo (not) rotation
Browse files Browse the repository at this point in the history
  • Loading branch information
vanous committed Aug 30, 2024
1 parent fa712de commit 911b15d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions fixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -1164,9 +1164,11 @@ def updateGobo(self, gobo, n, current_frame):
DMX_Log.log.debug(("update gobo", gobo, n))
self.hide_gobo([n], False, current_frame=current_frame)
index = int(gobo[0]/int(255/(gobos.count-1)))
self.set_gobo(n, index, current_frame=current_frame)

self.set_gobo_slot(n, index, current_frame=current_frame)
if gobo[1] is not None:
self.set_gobo_rotation(gobo, n, current_frame=current_frame)

def set_gobo_rotation(self, gobo, n, current_frame):
for obj in self.collection.objects: #EEVEE
if "gobo" in obj.get("geometry_type", ""):
material = self.gobo_materials[obj.name].material
Expand Down Expand Up @@ -1428,7 +1430,7 @@ def clear(self):
DMX_Data.set(self.universe, self.address+i, ch.default)
self.render()

def set_gobo(self, n, index=-1, current_frame=None):
def set_gobo_slot(self, n, index=-1, current_frame=None):
gobos = self.images[f"gobos{n}"]
for obj in self.collection.objects: #EEVEE
if "gobo" in obj.get("geometry_type", ""):
Expand Down
2 changes: 2 additions & 0 deletions panels/programmer.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,9 +528,11 @@ def draw(self, context):
box.prop(scene.dmx, "programmer_iris", text=_("Iris"), translate=False)
if selected_fixtures[0].has_attributes(["Gobo1"]):
box.prop(scene.dmx, "programmer_gobo1", text=_("Gobo1"), translate=False)
if selected_fixtures[0].has_attributes(["Gobo1Pos", "Gobo1PosRotate"]):
box.prop(scene.dmx, "programmer_gobo_index1", text=_("Gobo1 Rotation"), translate=False)
if selected_fixtures[0].has_attributes(["Gobo2"]):
box.prop(scene.dmx, "programmer_gobo2", text=_("Gobo2"), translate=False)
if selected_fixtures[0].has_attributes(["Gobo2Pos", "Gobo2PosRotate"]):
box.prop(scene.dmx, "programmer_gobo_index2", text=_("Gobo2 Rotation"), translate=False)
if selected_fixtures[0].has_attributes(["shutter"], lower=True):
box.prop(scene.dmx, "programmer_shutter", text=_("Strobe"), translate=False)
Expand Down

0 comments on commit 911b15d

Please sign in to comment.