Skip to content

Commit

Permalink
Fix and simplify the Project3D attribute assignment
Browse files Browse the repository at this point in the history
We were manually assigning two values to the same know, an iterator will do much better here.
  • Loading branch information
julik committed Jun 15, 2013
1 parent ad0db8f commit 071873e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,8 @@ def create_projection_alley_panel():

# This will be called for every project3d node that gets created
def setup_project3d(node):
proj_on = p.knobs()["project_on"].value()
occlusion_mode = p.knobs()["occlusion_mode"].value()
node["project_on"].setValue(proj_on)
node["project_on"].setValue(occlusion_mode)
if p.knobs()["crop"].value():
node["crop"].setValue(1)
for k in ('occlusion_mode', 'crop', 'project_on'):
node[k].setValue(p.knobs()[k].value())

group = create_projection_alley(nuke.selectedNode(), frame_numbers, link, setup_project3d)
group["label"].setValue("Cam prj f: %d to: %d every: %d" % (start, finish, istep))
Expand Down

0 comments on commit 071873e

Please sign in to comment.