Skip to content

Commit

Permalink
Test node arranging
Browse files Browse the repository at this point in the history
  • Loading branch information
vanous committed Aug 28, 2024
1 parent 0a3d11c commit cb10a57
Show file tree
Hide file tree
Showing 4 changed files with 2,226 additions and 2 deletions.
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ def unregister():
bpy.utils.unregister_class(DMX_TempData)
bpy.utils.unregister_class(DMX)


# Append handlers

bpy.app.handlers.load_post.clear()
bpy.app.handlers.undo_post.clear()

Expand Down
19 changes: 18 additions & 1 deletion fixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
Material,
GeometryNodeTree,
Text)
from .node_arranger import DMX_OT_ArrangeSelected

# Shader Nodes default labels
# Blender API naming convention is inconsistent for internationalization
Expand Down Expand Up @@ -539,6 +540,22 @@ def build(self, name, profile, mode, universe, address, gel_color, display_beams

self.clear()
self.hide_gobo()
d=DMX_OT_ArrangeSelected()
for item in self.gobo_materials:
ntree = item.material.node_tree
print("gobo", item.name, ntree)
d.process_tree(ntree)
for item in self.geometry_nodes:
ntree = item.node.node_tree
print("geometry", item.name, ntree)
d.process_tree(ntree)

for light in self.lights: #CYCLES
light_obj = light.object
ntree = light_obj.data.node_tree
print("light", light.name, ntree)
d.process_tree(ntree)

self.render()

# Interface Methods #
Expand Down Expand Up @@ -750,7 +767,7 @@ def render(self, skip_cache = False, current_frame = None):
if iris is not None:
if 0 <= iris <= 255:
iris = iris * 12/255
self.update_iris(iris, current_frame)
self.update_iris(iris, current_frame)

for geometry, colors in rgb_mixing_geometries.items():
if len(rgb_mixing_geometries)==1:
Expand Down
Loading

0 comments on commit cb10a57

Please sign in to comment.