Hi all, (Sorry for the cross-post but this old nuke-users thread is probably best asked in nuke-python...)
Was there ever a method added for setting metadata? Just about to go the fromScript() way but thought I'd check, first. Thanks, -E On Thu, Sep 23, 2010 at 11:16 PM, Nathan Rusch <[email protected]>wrote: > Unless I missed a change somewhere, the only real way to modify the > metadata even somewhat directly via Python is to use the ModifyMetaData > node, and inject your own via the 'metadata' knob's '.fromScript()' method. > > > > Here's an example that will find all the Read nodes in a script and create > a key for each one by name, with the value expression-linked to its path.: > > > > mmd = nuke.nodes.ModifyMetaData() > > metaKeys = [] > > for node in nuke.allNodes("Read"): > > metaKeys.append('{set %s/file "\\[value %s.file]"}' % ( > node.name(), node.name())) > > mmd['metadata'].fromScript("\n".join(metaKeys)) > > > > Hopefully this is somewhat like what you're after > > > > -Nathan > > > > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *jeremy price > *Sent:* Thursday, September 23, 2010 12:50 PM > *To:* Nuke user discussion > *Subject:* [Nuke-users] adding metadata > > > > Hello world. This is my first post here... oh boy. > > I'm trying to figure out a way to add a key/value to metadata using python. > I'd like to add a list of all reads into the metadata so I can look at the > render down the road and find the path and name of everything used to build > the script. I've got a grip on printing out all of the reads into a text > file. I can can then add a metadata node just before the write node, add a > key, put something like this into to the value : [python > {nuke.toNode('Text1').knob('message').value()}]. This is all fine and gives > me what i want but is a clunky workaround. My Python skills are poor so go > easy on me. Is this even a worth while thing to try to do? > > Thanks > > > > Jeremy > > > > > > > > _______________________________________________ > Nuke-users mailing list > [email protected] > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users > >
_______________________________________________ Nuke-python mailing list [email protected], http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
