Jump to content

Can a Key Value Dictionary Parm be set via Pyth Expression?


AdamM

Recommended Posts

This works in the python console
>>>xx = hou.parm('/obj/pathto/my_key_value_parm')
>>>xx.set({'example_key':'example_val'})

Yet If I right click on the key_value parameter - Edit Expression - Change Language to Python and enter the following

mydict = {'ex_k': 'ex_v'}
return mydict

No value is shown in the UI, and
I get an error 
Warning: Bad parameter reference: /obj/pathto/my_key_value_parm.

HouFX 19.5

Edited by AdamM
Link to comment
Share on other sites

  • 1 month later...

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...