It is common to prototype code in the Python Editor, and you may think to do this when you need write some code for an Expression. Beware, though they look deceptively similar, the full Gaffer API is not available in expressions, and references to plugs behave quite differently.
This sometimes leads to an attempt to call something like parent["Sphere"]["radius"].getValue() in an expression, and an exception like the following :
ERROR [Execution error] Expression1.__execute :"python/Gaffer/PythonExpressionEngine.py", line 88, in execute
line 1, in <module> AttributeError: 'float' object has no attribute 'getValue'
Gaffer 0.57.0.0 introduced Edit Scopes. They are fundamental in our endeavours to make Gaffer more user friendly for everyday tasks. They provide a container for node graph edits made by interactive tools in the UI. In this post, we take a quick look at how they work.
Check out the video above to see them in action then read on for more details.
As adoption of Gaffer 0.56 or later is contingent on moving to Arnold 6, we appreciate it may take a little longer to switch production shows over. People may also move directly to the the upcoming release of 0.57.
This post contains a quick recap of the main artist-facing changes in the 0.56 series for those moving up more recently.