I have a component COMP with custom parameter Camera Geometry Lights
inside it I want a render TOP which has its camera geometry lights parms linked to the ones in the Custom Parm page.
It works if my custom parms are strings, and their content are relative to the render TOP. But that’s very confusing and it requires the programmer to remember the paths he enters at the top are really used from a top inside hence they need to be relative (while others on the same custom page just need to be relative to the custom page, not to something inside).
Basically if I use a AddCOMP - say for the Camera parm, it will work because the path of a COMP is expanded. But the render TOP parms accept multiple paths, and if you use multiple geos in the Geometry (created with addSOP) it will not expand them and it will fail : I have to use a Str parameter, which creates the problem above: I have to specify paths in relation to the render TOP, not the COMP where I set them - confusing!
Is there a way to set up a custom parm so that I can specify multiple objects relative to that parm, and then have those understood properly by the render TOP inside?
Do you need the ability to mix and match on the fly, or can you nest objects? When I’m trying to solve this problem I’ll sometimes put my geometries, lights, or cameras inside of a null COMP. From there you can do some path reconstruction to get the objects inside:
op( parent().par.Testop ).path + '/*'
That’s all well and good if you’re building whole scenes that you want to move between, but less ideal if you want to be able to mix and match oh the fly - you can do it with a bit of a hack using clones, but it can be a little messy to get set up.
that’s a good suggestion but yes, I want to be able to mix and match (get geos from different parts of my network).
I am not sure how hard that is, but if the Add* parameter was able to manage (and expand) multiple paths instead of just one, I think it would avoid forcing every user to go through hoops.
Alternatively, I’d be ok with a different function to do that, so as to add overhead only when necessary. i.e. the render top geo could have the formula:
parent().par.Mygeos.paths() - which treats the parm contents as a string expressing paths relative to it, and expands them accordingly.
evalOPs() → list
Evaluate the parameter as series of operators. This is useful for a custom parameter that specifies a list of operator paths for example.
a = op(‘base1’).par.Paths.evalOPs()
thanks! I’m still stuck on 88 (couldn’t download one day, did not install another…, installer complained yet another try) but I’ll try again in a couple of weeks to upgrade… Sounds exactly like what I want, provided the returned list expands to the paths if I use that syntax in a string field (like the geometry field of the render TOP)