Jump to content

Python - setting list parm on USD/Solaris instancer


dzigakaiser

Recommended Posts

Hey hey there,

I came across an issue and hope to find some help here once again :) I tried searching but didn't really know what to search for and then ended up unsuccessful.

I am trying to create a Solaris/USD network with my python script but when I set the list parameters on the instancer node it only changes the choice visually but does not actually use it.

As an example, when I set the "Prototype Index" to "Name Attribute" manually, the UI shows a new field to enter the name attribute. When I do this in Python:

usd_instancer.parm('protoindexsrc').set("Name Attribute")
usd_instancer.parm('nameattr').set("instancename")

the "Prototype Index" gets set to "Name Attribute" but the extra field is not shown and the node behaves as if it's set to its default value. If I then open the list and click on "Name Attribute" myself again, it shows the new line with my correct name attribute.

How would one go about solving this? Is there an extra function connected to this list choice that I have to trigger as well in Python?

As always, I am very grateful for any pointers, ideas and help!

Update:

I noticed now that sometimes the script does not even set the list parameter. E.g. when I open a fresh scene, use my script, it creates the instancer with default values (no errors though). When I run my script again, it creates a new instancer with the list set to my values, but still having the initial issue mentioned above :/

Update2:

I also posted over on the sidefx forums now and have a small screenshot to show what I mean:) I set the parameter in Python, it evaluates correctly in the shell but is neither shown in the interface nor actually used.

Take care,

Dziga

Screenshot 2020-02-19 at 10.31.39.png

Edited by dzigakaiser
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...