You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When including a script variable as input to a python expression that is driving a plug that is an ImagePlug, and having that in focus, so that the Viewer will try to draw the image, we can get errors because the script variable is not defined.
This can be worked around by having a fallback value that is valid.
Also, when the image is actually drawn, it seems that the context variable is set. It's only at the very beginning that it looks like we are computing it without providing a context that includes the script variables.
Finally, a similar setup that creates a 3d scene works fine (ex: driving a cube dimension via the same context variable).
Steps to reproduce
Create a OSL constant shader, and drive one or more of its plugs with an expression trying to read the frameRange:start, with no fallback (so that you'd get None in case it's not defined).
Try to view that node in the viewer.
You should get an error complaining that you are trying to set None where a number is required.
Version: Gaffer 1.3.10.0-linux
Description
When including a script variable as input to a python expression that is driving a plug that is an
ImagePlug
, and having that in focus, so that the Viewer will try to draw the image, we can get errors because the script variable is not defined.This can be worked around by having a fallback value that is valid.
Also, when the image is actually drawn, it seems that the context variable is set. It's only at the very beginning that it looks like we are computing it without providing a context that includes the script variables.
Finally, a similar setup that creates a 3d scene works fine (ex: driving a cube dimension via the same context variable).
Steps to reproduce
frameRange:start
, with no fallback (so that you'd getNone
in case it's not defined).None
where a number is required.I have provided an example graph below.
Debug log
Click to Expand
Results in the following error message:
The text was updated successfully, but these errors were encountered: