RedshiftWrapper.Node module

class RedshiftWrapper.Node.Node(gvNode, undo=True)[source]

Bases: RedshiftWrapper.MetaName.MetaName

Represent a Node that already exist in a Material.

Member _GvNode:(c4d.modules.graphview.GvNode) - The GvNode linked to this Node. READ-ONLY DO NOT EDIT !!!
Member _NodeType:
 (Int or Str) - Int (a Cinema 4D Node look at https://developers.maxon.net/docs/Cinema4DPythonSDK/html/types/gvnodes.html) or a Redshift Node member loot at MetaclassName.
Member __DoUndo:
 (Bool) DEFINE BY Redshift, True if the wrapper have to call GvMaster.AddUndo() before any change otherwise False
ExposeParameter(parameterID, portType)[source]

Expose a parameter in a GvNode.

Parameters:
  • parameterID – The ID of the parameter or the full c4d.DescID.
  • portType (int) – c4d.GV_PORT_INPUT or c4d.GV_PORT_OUTPUT.
Returns:

True if success otherwise False.

Return type:

Bool

GetColor()[source]

Get the color of a GvNode Type.

Returns:Color of the GvNode linked to this Node.
Return type:c4d.Vector
GetName()[source]

Get the name of the GvNode.

Returns:Name of the GvNode.
Return type:str
GetNode()[source]

Get the GvNode linked.

Returns:The GvNode linked to this Node.
Return type:c4d.modules.graphview.GvNode
GetType()[source]

Get the GvNode Type.

Returns:Int (a Cinema 4D Node look at https://developers.maxon.net/docs/Cinema4DPythonSDK/html/types/gvnodes.html) or a Redshift Node member loot at MetaclassName
Return type:Int or Str
SearchPort(portToSearch, searchType=None)[source]

Search a GvPort in the Node, parameter should be exposed.

Parameters:
  • portToSearch (str or int) – The name of the parameter or The port ID of the Node.
  • searchType – GV_PORT_INPUT or GV_PORT_OUTPUT if None for both (None is only working for str portToSearch).
Returns:

GvPort that match the search.

Return type:

c4d.modules.graphview.GvPort or None

SetColor(color=None)[source]

Set the color of the GvNode.

Parameters:color (c4d.Vector or None) – New color of the node, if None default color according the type of the node type
SetName(newName)[source]

Set the name of the GvNode.

Parameters:newName (str) – New name of the GvNode.