Jump to content
Sign in to follow this  

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Thanks for the help,

 

makes a lot more sense, although I'm finding it a bit temperamental, sometimes working, sometimes not. I'll keep investigating.

 

Thanks again :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×