Daniel Lloyd-Wood


About Me

VFX Artist
United Kingdom


[Profile pending approval]

Recent Forum Posts

Switch if prim exists July 6, 2022, 5:40 a.m.

Yes. That works nicely. Code for the test:

if pwd().input(0).stage().GetPrimAtPath("/Render/Products").IsValid():
    return 0
return 1

I'm on Houdini 19.0.383 currently so can't do the activation parameter thing but that looks cool and I'll keep it in mind for when we upgrade our Houdini version.

Switch if prim exists July 5, 2022, 2:56 p.m.

Thanks. I had a similar thought but you got further with the code than I managed! I'll try this out. I was hoping there would be a simpler way though. Perhaps not.

Switch if prim exists July 5, 2022, 11:55 a.m.

I'm trying to to get a switch in lops to change based on whether a prim exists or not. The aim is to automatically create a beauty rendervar and product if one has not be defined. I can't work out how to set the switch lop up to achieve this though. Basically if "/Render/Products/beauty" exists, 0, else, 1.