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

Paste in between two nodes not supporting multiple node #6230

Open
lucienfostier opened this issue Jan 24, 2025 · 0 comments
Open

Paste in between two nodes not supporting multiple node #6230

lucienfostier opened this issue Jan 24, 2025 · 0 comments

Comments

@lucienfostier
Copy link
Collaborator

Version: Gaffer 1.5.0.1-linux

Description

Pasting multiple nodes in between two nodes doesnt reconnect the outputs.
It would be nice to be able to connect multiple nodes including a chain of nodes in between two compatibles nodes.
If the connection is not possible, it would be nice to place the new nodes slightly off to the side of the current network to avoid confusion if they are not fully reconnected.

Steps to reproduce

  1. Copy Grade66 and Expression 12
  2. Select Constant 11
  3. Paste
  4. The Grade 66 and Expression 12 will be pasted as new instance but the new Grade will not be connected to the ImageTransform3
  5. The new Grade and new Expression are positioned in between the Constant and the ImageTransform and appear to be connected to contribute to the output but they actually don't.

Debug log

Click to Expand

import Gaffer
import GafferImage
import imath

Gaffer.Metadata.registerValue( parent, "serialiser:milestoneVersion", 1, persistent=False )
Gaffer.Metadata.registerValue( parent, "serialiser:majorVersion", 5, persistent=False )
Gaffer.Metadata.registerValue( parent, "serialiser:minorVersion", 0, persistent=False )
Gaffer.Metadata.registerValue( parent, "serialiser:patchVersion", 1, persistent=False )

__children = {}

__children["Constant11"] = GafferImage.Constant( "Constant11" )
parent.addChild( __children["Constant11"] )
__children["Constant11"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["ImageTransform3"] = GafferImage.ImageTransform( "ImageTransform3" )
parent.addChild( __children["ImageTransform3"] )
__children["ImageTransform3"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Grade66"] = GafferImage.Grade( "Grade66" )
parent.addChild( __children["Grade66"] )
__children["Grade66"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Expression12"] = Gaffer.Expression( "Expression12" )
parent.addChild( __children["Expression12"] )
__children["Expression12"]["__out"].addChild( Gaffer.FloatPlug( "p0", direction = Gaffer.Plug.Direction.Out, defaultValue = 1.0, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Expression12"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Constant11"]["color"].setValue( imath.Color4f( 0, 1, 0, 1 ) )
__children["Constant11"]["__uiPosition"].setValue( imath.V2f( 1679.9021, -323.078949 ) )
__children["ImageTransform3"]["in"].setInput( __children["Constant11"]["out"] )
__children["ImageTransform3"]["__uiPosition"].setValue( imath.V2f( 1679.90308, -339.407074 ) )
__children["Grade66"]["multiply"]["r"].setInput( __children["Expression12"]["__out"]["p0"] )
__children["Grade66"]["__uiPosition"].setValue( imath.V2f( 1698.19226, -330.852722 ) )
__children["Expression12"]["__uiPosition"].setValue( imath.V2f( 1687.69177, -330.852081 ) )
__children["Expression12"]["__engine"].setValue( 'python' )
__children["Expression12"]["__expression"].setValue( 'parent["__out"]["p0"] = 1.2' )


del __children

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant