#include <c4d_graphview.h>
The GvNode is a double BaseList2D node. Internally it has an operator that corresponds to GvOperatorData. Use GetOperatorContainer() to access most parameters.
Cannot be instantiated. Call GvNodeMaster::CreateNode() to create nodes.
Private Member Functions | |
GvNode () | |
~GvNode () | |
Navigation | |
GvNode * | GetNext (void) |
GvNode * | GetPred (void) |
GvNode * | GetUp (void) |
GvNode * | GetDown (void) |
Miscellaneous | |
void | Redraw (void) |
const String | GetTitle () |
void | SetTitle (const maxon::String &title) |
Bool | CreateOperator () |
GvNodeMaster * | GetNodeMaster (void) |
GvOperatorData * | GetOperatorData (void) |
Int32 | GetOperatorID (void) |
Int32 | GetOwnerID (void) |
Bool | IsGroupNode (void) |
Calculate | |
GvPort * | CalculateInPortIndex (Int32 port_index, GvRun *run, GvCalc *calc) |
GvPort * | CalculateOutPortIndex (Int32 port_index, GvRun *run, GvCalc *calc) |
GvPort * | CalculateInPort (GvPort *port, GvRun *run, GvCalc *calc) |
GvPort * | CalculateOutPort (GvPort *port, GvRun *run, GvCalc *calc) |
Bool | SetRecalculate (GvRun *r, Bool force_set=false) |
Bool | CalculateRawData (GvValueID value_id, const void *const data1, const void *const data2, void *dest, GvValueFlags calculation, Float parm1) |
Operator Container | |
BaseContainer * | GetOpContainerInstance (void) |
BaseContainer | GetOperatorContainer (void) |
void | SetOperatorContainer (const BaseContainer &bc) |
Operator Information/Data | |
const String | OperatorGetDetailedText (void) |
const String | OperatorGetErrorString (Int32 error) |
Bool | OperatorSetData (GvDataType type, void *data, GvOpSetDataMode mode) |
Bool | OperatorIsSetDataAllowed (GvDataType type, void *data, GvOpSetDataMode mode) |
void | OperatorGetIcon (IconData &dat) |
Node State | |
Bool | GetSelectState (void) |
Bool | GetFailureState (void) |
Bool | GetDisabledState (void) |
Bool | GetOpenState (void) |
void | SetOpenState (Bool state) |
Bool | GetLockState (void) |
void | SetLockState (Bool state) |
Bool | GetShowPortNamesState (void) |
void | SetShowPortNamesState (Bool state) |
Calculation Handler | |
GvValue * | AllocCalculationHandler (Int32 main_id, GvCalc *calc, GvRun *run, Int32 singleport) |
void | FreeCalculationHandler (GvValue *&value) |
|
private |
|
private |
GvNode* GetNext | ( | void | ) |
Gets the next GV node in the list. Convenience version of GeListNode::GetNext().
GvNode* GetPred | ( | void | ) |
Gets the previous GV node in the list. Convenience version of GeListNode::GetPred().
GvNode* GetUp | ( | void | ) |
Gets the parent node of the GV node. Convenience version of GeListNode::GetUp().
GvNode* GetDown | ( | void | ) |
Gets the first child node of the GV node. Convenience version of GeListNode::GetDown().
void Redraw | ( | void | ) |
Redraws the GV node.
const String GetTitle | ( | ) |
Gets the title of the GV node.
void SetTitle | ( | const maxon::String & | title | ) |
Sets the title of the GV node.
[in] | title | The title to set. |
Bool CreateOperator | ( | ) |
Creates the internal operator.
GvNodeMaster* GetNodeMaster | ( | void | ) |
Retrieves the node master that the GV node belongs to.
GvOperatorData* GetOperatorData | ( | void | ) |
Retrieves the operator data for the GV node.
Int32 GetOperatorID | ( | void | ) |
Retrieves the operator ID for the GV node.
Int32 GetOwnerID | ( | void | ) |
Retrieves the owner ID of the GV node.
Bool IsGroupNode | ( | void | ) |
Checks if the GV node is a group node.
GvPort* AddPort | ( | GvPortIO | io, |
Int32 | id, | ||
GvPortFlags | flags = GV_PORT_FLAG_IS_VISIBLE , |
||
Bool | message = false |
||
) |
Adds a port to the GV node and returns a pointer to it.
[in] | io | The IO mode of the port to create: GvPortIO |
[in] | id | The ID of the port to create. |
[in] | flags | The port flags: GvPortFlags |
[in] | message | If true the operator receives a message when the port is added. |
Changes the type of a port of the GV node. Used to manage dynamic data ports.
[in] | port | A port of the GV node. The caller owns the pointed port. |
[in] | id | The port ID. |
Changes the type of the port. Used to manage dynamic data ports.
[in] | id | The port ID. |
Removes a port from the GV node.
[in] | port | A port of the GV node to remove. The caller owns the pointed port. |
[in] | message | If true the operator receives a message when the port is removed. |
Checks if it is OK to remove a port from this node. Used to check if a call to RemovePort() would succeed.
[in] | port | A port of the GV node to remove. The caller owns the pointed port. |
void RemoveUnusedPorts | ( | Bool | message = true | ) |
Removes all unused ports from the GV node.
[in] | message | If true the operator receives a message when ports are removed. |
GvPort* AddConnection | ( | GvNode * | source_node, |
GvPort * | source_port, | ||
GvNode * | dest_node, | ||
GvPort * | dest_port | ||
) |
Adds a connection between the source_port of source_node and dest_port of dest_node.
[in] | source_node | The source node. The caller owns the pointed node. |
[in] | source_port | The source port. The caller owns the pointed port. |
[in] | dest_node | The destination node. The caller owns the pointed node. |
[in] | dest_port | The destination port. The caller owns the pointed port. |
void RemoveConnections | ( | void | ) |
Removes all connections from all ports of the GV node.
void GetPortList | ( | GvPortIO | port, |
GvPortList & | portlist | ||
) |
Retrieves the list of port for the GV node.
[in] | port | Only retrieve ports with the passed IO mode: GvPortIO |
[out] | portlist | Filled with the ports from the node. |
Bool GetPortDescription | ( | GvPortIO | port, |
Int32 | id, | ||
GvPortDescription * | pd | ||
) |
Retrieves the description for a port of the GV node.
[in] | port | The port IO mode: GvPortIO |
[in] | id | The port ID. |
[out] | pd | Filled with the port description. The caller owns the pointed GvPortDescription. |
Int32 GetInPortCount | ( | void | ) |
Gets the number of input ports of the GV node.
Int32 GetOutPortCount | ( | void | ) |
Gets the number of output ports of the GV node.
Retrieves the input port at index.
[in] | index | The input port index: 0 <= index < GetInPortCount() |
Retrieves the output port at index.
[in] | index | The output port index: 0 <= index < GetOutPortCount() |
Retrieves an input port by main ID. The first port found is returned.
[in] | id | The port main ID. |
Retrieves an output port by main ID. The first port found is returned.
[in] | id | The port main ID. |
Retrieves an input port by main ID. The first port found with index greater or equal than start is returned.
[in] | id | The port main ID. |
[in,out] | start | The start index: 0 <= start <= GetInPortCount(). Assigned a suitable value for consecutive calls, i.e. the next index. |
Retrieves an output port by main ID. The first port found with index greater or equal than start is returned.
[in] | id | The port main ID. |
[in,out] | start | The start index: 0 <= start <= GetInPortCount(). Assigned a suitable value for consecutive calls, i.e. the next index. |
Retrieves an input port by sub ID.
[in] | id | The port sub ID. |
Retrieves an output port by sub ID.
[in] | id | The port sub ID. |
Retrieves a port by sub ID.
[in] | sub_id | The port sub ID. |
Gets the index of a port by sub ID.
[in] | sub_id | The port sub ID. |
Calculates an input port by index. Equivalent to GetInPort(port_index)->GvPort::Calculate(this, run, calc)
.
[in] | port_index | The port index: 0 <= start <= GetInPortCount() |
[in] | run | The run helper. The caller owns the pointed run helper. |
[in] | calc | The calculation helper. The caller owns the pointed calculation helper. |
Calculates an output port by index. Equivalent to GetOutPort(port_index)->GvPort::Calculate(this, run, calc)
.
[in] | port_index | The port index: 0 <= start <= GetOutPortCount() |
[in] | run | The run helper. The caller owns the pointed run helper. |
[in] | calc | The calculation helper. The caller owns the pointed calculation helper. |
Calculates an input port.
[in] | port | The input port to calculate. The caller owns the pointed port. |
[in] | run | The run helper. The caller owns the pointed run helper. |
[in] | calc | The calculation helper. The caller owns the pointed calculation helper. |
Calculates an output port.
[in] | port | The output port to calculate. The caller owns the pointed port. |
[in] | run | The run helper. The caller owns the pointed run helper. |
[in] | calc | The calculation helper. The caller owns the pointed calculation helper. |
Equivalents to GvPort::SetRecalculate() for each output port of the GV node.
[in] | r | The run helper. The caller owns the pointed run helper. |
[in] | force_set | Forces all nodes to be set to be recalculated, even if they seem to be valid. |
BaseContainer* GetOpContainerInstance | ( | void | ) |
Retrieves a pointer to the internal operator's container. This means that the container can be changed directly.
BaseContainer GetOperatorContainer | ( | void | ) |
Retrieves a copy of the internal operator's container.
void SetOperatorContainer | ( | const BaseContainer & | bc | ) |
Sets the internal operator's container.
[in] | bc | The container to set for the operator. |
const String OperatorGetDetailedText | ( | void | ) |
Gets the detailed text of the operator.
Gets error strings for the operator.
[in] | error | The error. |
Bool OperatorSetData | ( | GvDataType | type, |
void * | data, | ||
GvOpSetDataMode | mode | ||
) |
Sets data in the operator.
[in] | type | The data type: GvDataType |
[in] | data | The data pointer. The format depends on type. The caller owns the pointed data. |
[in] | mode | The set data mode: GvOpSetDataMode |
Bool OperatorIsSetDataAllowed | ( | GvDataType | type, |
void * | data, | ||
GvOpSetDataMode | mode | ||
) |
Checks if a call to OperatorSetData() is allowed.
[in] | type | The data type: GvDataType |
[in] | data | The data pointer. The format depends on type. The caller owns the pointed data. |
[in] | mode | The set data mode: GvOpSetDataMode |
void OperatorGetIcon | ( | IconData & | dat | ) |
Retrieves the operator icon.
[in] | dat | Filled with the operator icon data. |
Bool GetSelectState | ( | void | ) |
Gets the selection state of the GV node.
Bool GetFailureState | ( | void | ) |
Gets the failure state of the GV node.
Bool GetDisabledState | ( | void | ) |
Gets the disabled state of the GV node.
Bool GetOpenState | ( | void | ) |
Gets the open state of the GV node.
void SetOpenState | ( | Bool | state | ) |
Sets the open state of the GV node.
[in] | state | The open state. |
Bool GetLockState | ( | void | ) |
Gets the lock state of the GV node.
void SetLockState | ( | Bool | state | ) |
Sets the lock state of the GV node.
[in] | state | The lock state. |
Bool GetShowPortNamesState | ( | void | ) |
Gets the show port name state of the GV node.
void SetShowPortNamesState | ( | Bool | state | ) |
Sets the show port name state of the GV node.
[in] | state | The show port name state. |
Allocates a calculation handler for the ports of a main ID of the GV node.
Free the allocated handler with FreeCalculationHandler().
[in] | main_id | The main ID. |
[in] | calc | The calculation helper. The caller owns the pointed calculation helper. |
[in] | run | The run helper. The caller owns the pointed run helper. |
[in] | singleport | The port index if the handler should be for a specific port. Otherwise pass GV_MULTIPLE_PORTS. |
void FreeCalculationHandler | ( | GvValue *& | value | ) |
Frees calculation handlers allocated with AllocCalculationHandler().
[in,out] | value | The calculation handler to free. Set to nullptr afterwards. |
Bool CalculateRawData | ( | GvValueID | value_id, |
const void *const | data1, | ||
const void *const | data2, | ||
void * | dest, | ||
GvValueFlags | calculation, | ||
Float | parm1 | ||
) |
Convenience function to do calculation with unknown data.
Retrieves the handler for value_id and then calls GV_VALUE_HANDLER::Calculate
(userdata, value_id, data1, data2, dest, 0, calculation, parm1).
[in] | value_id | Determines the type of the data parameters. |
[in] | data1 | The first data. The caller owns the pointed data. Points to GV data. The layout of the pointed data is determined by value_id. |
[in] | data2 | The second data. The caller owns the pointed data. Points to GV data. The layout of the pointed data is determined by value_id. |
[out] | dest | The destination. The caller owns the pointed data. Points to GV data. The layout of the pointed data is determined by value_id. |
[in] | calculation | The calculation to perform: GvValueFlags |
[in] | parm1 | An additional parameter. |