Jump to content

Recommended Posts

Hi there,

I'm trying to set custom data as meta data using the mantra render attribute:

"vm_image_exr_attributes"

according to the docs i should be able to parse the attribute a python dictionary object, however whenever I try to do this:

 

test_dict = {"count" : 0,
            "path" : "/jobs/"}           
my_node.parm("vm_image_exr_attributes").set(test_dict)

 

I get the following error:

TypeError: in method 'Parm_set', argument 2 of type 'std::map<std::string,std::string,std::less<std::string >,std::allocator<std::pair<std::string const,std::string > > > const &'

 

What I am trying to achieve is a dictionary comprised of file paths that I can then check in nuke.

Can anyone shed any light on this?

 

thanks

Link to comment
Share on other sites

i don't think you can parse it a python dict. What it does is it interprets the string you enter in that field as a python dict. If you feed it {"count":0, "path":"/jobs/"} it should work

if you want to work with parsing it a dict then you will have to convert the dict into a string I guess

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...