magneto Posted August 24, 2013 Share Posted August 24, 2013 Hi, It seems like this is changed in 12.5 where if you use a variable inside a parameter, you can't see the result using the value mode. For example if you have something like this: The results will look like this: So in other parameters if I refer to these parameters, they all end up as 0 as well. What's the current way to deal with these now? I could use the variables directly in the actual parameters but that makes expressions much longer and harder to read and maintain, since this is a simplified example. Or should I be using expressions instead, i.e. point, prim, vertex, etc? Are they immune to this problem? Thanks Quote Link to comment Share on other sites More sharing options...
kgoossens Posted August 24, 2013 Share Posted August 24, 2013 It was a bug in the older versions that you could reference to Variables. It feels a bit strange over here but you should always use expressions if you want their values to be viewed or referenced. if you try a ch("../) you'll see it will not work either. 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted August 24, 2013 Author Share Posted August 24, 2013 Thanks I thought you would reply Is there a way to know which variables would work and which ones wouldn't? Because variables like $PT, $PR, etc can't be replaced with expressions AFAIK. When I referenced parameters that contained $PT, $PR, etc, those worked. I assume they made an exception for these since there is no expression to get the current point, primitive, etc? I will have to be more careful from now on then, because I noticed some of my tools weren't working. Also how feasible it is to automatically replace these variables with the appropriate expression behind the scenes? Unless I am missing something this should work right? Quote Link to comment Share on other sites More sharing options...
kgoossens Posted August 25, 2013 Share Posted August 25, 2013 Is there a way to know which variables would work and which ones wouldn't? Because variables like $PT, $PR, etc can't be replaced with expressions AFAIK. When I referenced parameters that contained $PT, $PR, etc, those worked. I assume they made an exception for these since there is no expression to get the current point, primitive, etc. True but it is especially in those cases that showing a value or making a channel reference would not really work. E.g using $PT what value should be shown in the parameter in this case, unless you have one point? I don't know if you could change it automatically. In principle you could try to make a python dump of the graphs and then in a text editor replace the variables automatically perhaps? 1 Quote Link to comment Share on other sites More sharing options...
magneto Posted August 25, 2013 Author Share Posted August 25, 2013 Thanks, sorry I meant it was working not in the sense of showing the values but working correctly. For example referencing the parameter that has $NPT will fail, unless you replace it with npoints(). For $PT, you don't have to do anything. As for automatic changing, I meant SESI doing it behind the scenes before cooking without actually changing the variables typed Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.