Anson Savage
AnsonSavage
About Me
Connect
LOCATION
Not Specified
ウェブサイト
Houdini Skills
Availability
Not Specified
Recent Forum Posts
Get name of root primitive for a given node in Solaris 2023年9月29日13:43
Hi!

Suppose I have a setup like this. I'd like to write some code in either Python or Hscript that can return the name of the root primitive (I'd like to check and see if the name of the root primitive is equal to a certain name to perform some logic in my nodes).
I can get the name of the root primitive with:
The string I need to compare it with is located at:
(which would need to be prefixed with a / in order to be properly compared).
I need to use whether or not these strings match to drive a switch node. I've tried the following but I haven't been able to get anything that correctly switches the node depending on whether or not it works:
What am I missing to make this string comparison work? Is there a way to do this in Python that would be cleaner (e.g., using husd)? It'd also be nice to get the number of root primitives so that I can ensure that there's a single root primitive at the top before it's exported.
Thanks!
Anson
Suppose I have a setup like this. I'd like to write some code in either Python or Hscript that can return the name of the root primitive (I'd like to check and see if the name of the root primitive is equal to a certain name to perform some logic in my nodes).
I can get the name of the root primitive with:
`lopinputprims('.', 0)`
The string I need to compare it with is located at:
`chs("../current_department")`
(which would need to be prefixed with a / in order to be properly compared).
I need to use whether or not these strings match to drive a switch node. I've tried the following but I haven't been able to get anything that correctly switches the node depending on whether or not it works:
strcmp(`lopinputprims('.', 0)`,/`chs("../current_department")`)
- (would need prefixing, but doesn't work either way)
strcmp(lopinputprims('.', 0),chs("../current_department"))
if(strcmp(`lopinputprims('.', 0)`,/`chs("../current_department")`)==0, 1, 0)
What am I missing to make this string comparison work? Is there a way to do this in Python that would be cleaner (e.g., using husd)? It'd also be nice to get the number of root primitives so that I can ensure that there's a single root primitive at the top before it's exported.
Thanks!
Anson
Intensity values change in render after referencing in a USD 2023年9月28日17:39
robp_sidefxAwesome! Yeah, I'm very interested in what's going on.
Thanks, I can reproduce this. It's not immediately obvious to me if this is a Solaris or USD or RenderMan thing, but I'm going to have a closer look early next week.
Intensity values change in render after referencing in a USD 2023年9月27日10:55
robp_sidefxFor sure!
Can you send us a hip file for these?
Here's the HIP file:
Image Not Found
To reproduce:
- Turn on the Renderman Ris setting in the Viewport (in Solaris)
- Click "Save to Disk" on the usdrop node
- See the differences in the sparks' intensity between the material assignment node and the reference node that pulls in the USD that was saved out by the usdrop
Thanks!
Anson