Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pasting copied nodes raises error #251

Closed
bentoogood opened this issue May 7, 2013 · 0 comments

Comments

Projects
None yet
2 participants
@bentoogood
Copy link
Contributor

commented May 7, 2013

pasting the text below in to gaffer causes this error:

> Traceback (most recent call last):
  File "/software/apps/cortex/8/cent5.x86_64/base/python/2.6/IECore/curry.py", line 48, in curriedFunction
    return func( *args, **kwds )
  File "/software/apps/gaffer/0.61.0/cent5.x86_64/cortex/8/gaffer/python/Gaffer/WeakMethod.py", line 57, in __call__
    return m( *args, **kwArgs )
  File "/software/apps/gaffer/0.61.0/cent5.x86_64/cortex/8/gaffer/python/GafferUI/Menu.py", line 136, in __commandWrapper
    command( *args, **kw )
  File "/software/apps/gaffer/0.61.0/cent5.x86_64/cortex/8/gaffer/python/GafferUI/EditMenu.py", line 106, in paste
    script.paste( parent )
RuntimeError: Exception : Member is not eligible for inclusion in StandardSet.
import Gaffer
import GafferImage
import IECore

__children = {}

__children["ImageReader"] = GafferImage.ImageReader( "ImageReader" )
parent.addChild( __children["ImageReader"] )
__children["ImageReader"]["enabled"].setValue( True )
__children["ImageReader"]["fileName"].setValue( '/data/jobs/RPD/sequences/NC/shots/2175/3dData/renders/RPD_NC_2175_lighting_nawickiBreakdown_000_005/beautyPass/beauty/RPD_NC_2175_lighting_nawickiBreakdown_000_005.beautyPass.beauty.#.exr' )
__children["ImageReader"].addChild( Gaffer.V2fPlug( "__uiPosition", flags = Gaffer.Plug.Flags.Dynamic | Gaffer.Plug.Flags.Serialisable | Gaffer.Plug.Flags.AcceptsInputs | Gaffer.Plug.Flags.PerformsSubstitutions | Gaffer.Plug.Flags.Cacheable, ) )
__children["ImageReader"]["__uiPosition"].setValue( IECore.V2f( 4.22093, -5.56546 ) )
__children["ImageReader"]["__uiPosition"]["x"].setValue( 4.2209262847900391 )
__children["ImageReader"]["__uiPosition"]["y"].setValue( -5.5654635429382324 )
__children["ImageReader1"] = GafferImage.ImageReader( "ImageReader1" )
parent.addChild( __children["ImageReader1"] )
__children["ImageReader1"]["enabled"].setValue( True )
__children["ImageReader1"]["fileName"].setValue( '/home/bent/images/Kitten111.jpg' )
__children["ImageReader1"].addChild( Gaffer.V2fPlug( "__uiPosition", flags = Gaffer.Plug.Flags.Dynamic | Gaffer.Plug.Flags.Serialisable | Gaffer.Plug.Flags.AcceptsInputs | Gaffer.Plug.Flags.PerformsSubstitutions | Gaffer.Plug.Flags.Cacheable, ) )
__children["ImageReader1"]["__uiPosition"].setValue( IECore.V2f( 31.0517, 2.5675 ) )
__children["ImageReader1"]["__uiPosition"]["x"].setValue( 31.051681518554688 )
__children["ImageReader1"]["__uiPosition"]["y"].setValue( 2.5674996376037598 )
__children["ImageTransform"] = GafferImage.ImageTransform( "ImageTransform" )
parent.addChild( __children["ImageTransform"] )
__children["ImageTransform"]["enabled"].setValue( True )
__children["ImageTransform"]["transform"]["translate"].setValue( IECore.V2f( -17.13, 30 ) )
__children["ImageTransform"]["transform"]["translate"]["x"].setValue( -17.129999160766602 )
__children["ImageTransform"]["transform"]["translate"]["y"].setValue( 30.0 )
__children["ImageTransform"]["transform"]["rotate"].setValue( 0.0 )
__children["ImageTransform"]["transform"]["scale"].setValue( IECore.V2f( 1, 1 ) )
__children["ImageTransform"]["transform"]["scale"]["x"].setValue( 1.0 )
__children["ImageTransform"]["transform"]["scale"]["y"].setValue( 1.0 )
__children["ImageTransform"]["transform"]["pivot"].setValue( IECore.V2f( 250, 0 ) )
__children["ImageTransform"]["transform"]["pivot"]["x"].setValue( 250.0 )
__children["ImageTransform"]["transform"]["pivot"]["y"].setValue( 0.0 )
__children["ImageTransform"].addChild( Gaffer.V2fPlug( "__uiPosition", flags = Gaffer.Plug.Flags.Dynamic | Gaffer.Plug.Flags.Serialisable | Gaffer.Plug.Flags.AcceptsInputs | Gaffer.Plug.Flags.PerformsSubstitutions | Gaffer.Plug.Flags.Cacheable, ) )
__children["ImageTransform"]["__uiPosition"].setValue( IECore.V2f( 30.3047, -5.6522 ) )
__children["ImageTransform"]["__uiPosition"]["x"].setValue( 30.3046875 )
__children["ImageTransform"]["__uiPosition"]["y"].setValue( -5.6521992683410645 )
__children["Merge"] = GafferImage.Merge( "Merge" )
parent.addChild( __children["Merge"] )
__children["Merge"]["enabled"].setValue( True )
__children["Merge"]["operation"].setValue( 0 )
__children["Merge"].addChild( Gaffer.V2fPlug( "__uiPosition", flags = Gaffer.Plug.Flags.Dynamic | Gaffer.Plug.Flags.Serialisable | Gaffer.Plug.Flags.AcceptsInputs | Gaffer.Plug.Flags.PerformsSubstitutions | Gaffer.Plug.Flags.Cacheable, ) )
__children["Merge"]["__uiPosition"].setValue( IECore.V2f( 28.5258, -22.6888 ) )
__children["Merge"]["__uiPosition"]["x"].setValue( 28.525835037231445 )
__children["Merge"]["__uiPosition"]["y"].setValue( -22.688766479492188 )
__children["Reformat"] = GafferImage.Reformat( "Reformat" )
parent.addChild( __children["Reformat"] )
__children["Reformat"]["enabled"].setValue( True )
__children["Reformat"]["format"].setValue( GafferImage.Format(2048, 1556, 1.000) )
__children["Reformat"]["filter"].setValue( 'Bilinear' )
__children["Reformat"].addChild( Gaffer.V2fPlug( "__uiPosition", flags = Gaffer.Plug.Flags.Dynamic | Gaffer.Plug.Flags.Serialisable | Gaffer.Plug.Flags.AcceptsInputs | Gaffer.Plug.Flags.PerformsSubstitutions | Gaffer.Plug.Flags.Cacheable, ) )
__children["Reformat"]["__uiPosition"].setValue( IECore.V2f( 28.2807, -35.3092 ) )
__children["Reformat"]["__uiPosition"]["x"].setValue( 28.280702590942383 )
__children["Reformat"]["__uiPosition"]["y"].setValue( -35.309219360351562 )
__children["ImageTransform"]["in"].setInput( __children["ImageReader1"]["out"] )
__children["Merge"]["in"].setInput( __children["ImageReader"]["out"] )
__children["Merge"]["in1"].setInput( __children["ImageTransform"]["out"] )
__children["Reformat"]["in"].setInput( __children["Merge"]["out"] )


del __children

johnhaddon added a commit that referenced this issue May 7, 2013

Fixed paste error.
When pasting an ImageNode into a script with no ImageNodes, the image module would add the global FormatPlug onto the ScriptNode. This would then be caught by ScriptNode::paste() which would try to add it to the current selection - which would fail because the selection contains only nodes. ScriptNode::paste() now filters the newly created children, adding only nodes to the selection.

Fixes issue #251.

@johnhaddon johnhaddon closed this May 7, 2013

goddardl added a commit to goddardl/gaffer that referenced this issue May 10, 2013

Fixed paste error.
When pasting an ImageNode into a script with no ImageNodes, the image module would add the global FormatPlug onto the ScriptNode. This would then be caught by ScriptNode::paste() which would try to add it to the current selection - which would fail because the selection contains only nodes. ScriptNode::paste() now filters the newly created children, adding only nodes to the selection.

Fixes issue GafferHQ#251.

goddardl added a commit to goddardl/gaffer that referenced this issue May 13, 2013

Fixed paste error.
When pasting an ImageNode into a script with no ImageNodes, the image module would add the global FormatPlug onto the ScriptNode. This would then be caught by ScriptNode::paste() which would try to add it to the current selection - which would fail because the selection contains only nodes. ScriptNode::paste() now filters the newly created children, adding only nodes to the selection.

Fixes issue GafferHQ#251.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.