CGTalk > Software > Compositing Software > The Foundry Nuke
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
Thread Tools Search this Thread Display Modes
Old 08-01-2010, 04:48 AM   #1
a CG fan
Jausn's Avatar
Xi Jin
Beijing, China
Join Date: May 2006
Posts: 135
Send a message via MSN to Jausn
Unhappy nuke.render() can't work!

I made a tool called Make Snapshots which worked pretty well.
And then I wanted to make a panel and put some button and label on it.
But this time I got some problems.The nuke.render() didn't work.
So to find why I made a simply test and here's my simplified script:

def startMakingSnaps(): wt = nuke.selectedNode() nuke.render(, 1, 1) # create a panel class makeSnapsPanel = nukescripts.PythonPanel('Make Snapshots', 'makeSnaps') # Create knobs qtPathKnob = nuke.String_Knob('qtPath', 'QT Path:') snapsPathKnob = nuke.String_Knob('snapsPath', 'Snapshots Path:') fsOffsetKnob = nuke.String_Knob('fsOffset', 'Frames Offset:') makeSnapsKnob = nuke.PyScript_Knob('makeSnaps', 'Make Snapshots') makeSnapsKnob.setCommand('startMakingSnaps()') # Add knobs makeSnapsPanel.addKnob(qtPathKnob) makeSnapsPanel.addKnob(snapsPathKnob) makeSnapsPanel.addKnob(fsOffsetKnob) makeSnapsPanel.addKnob(makeSnapsKnob)

Then I got a panel and I clicked the button and a message window poped up to me which said that: Nothing is named "Write1".
But the write node's name is really "Write1".
Then I run this line alone nuke.render(, 1, 1) and it worked.

I don't know why.
Is there something different when putting function to the panel?
Attached Images
File Type: jpg Snapshot.jpg (77.1 KB, 5 views)

Last edited by Jausn : 08-01-2010 at 04:51 AM.
Old 08-02-2010, 02:21 AM   #2
import nuke
Pipeline TD
Los Angeles, USA
Join Date: Feb 2009
Posts: 62
Pass nuke.render the node object instead of the node name.

def startMakingSnaps(): nuke.render(nuke.selectedNode(), 1, 1)
Old 08-02-2010, 02:21 AM   #3
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
Join Date: Sep 2003
Posts: 1,066,479
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 09:07 AM.

Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.