#include <c4d_graphview.h>
There are three kinds of port IDs:
Cannot be instantiated. Call GvNode::AddPort() to create a port.
Private Member Functions | |
GvPort () | |
~GvPort () | |
Connections | |
void | RemoveConnection () |
Int32 | GetNrOfConnections () |
void | RemovePortConnections () |
Bool | IsIncomingConnected () |
Bool | GetIncomingDestination (GvNode *&node, GvPort *&port) |
Bool | GetIncomingSource (GvNode *&node, GvPort *&port) |
Port IDs | |
GvPortIO | GetIO () |
void | SetMainID (Int32 id) |
Int32 | GetMainID () |
Int32 | GetSubID () |
void | SetUserID (Int32 id) |
Int32 | GetUserID () |
ValueType/Visible/Valid | |
GvValueID | GetValueType () |
void | SetVisible (Bool v) |
Bool | GetVisible () |
void | SetValid (GvRun *r, Bool v) |
Bool | GetValid (GvRun *r) |
Calculate | |
void | SetCalculated (GvRun *r) |
GvPort * | Calculate (GvNode *bn, GvRun *r, GvCalc *c) |
Bool | SetRecalculate (GvRun *r, Bool force_set=false) |
Get Value | |
Bool | GetBool (Bool *b, GvRun *r) |
Bool | GetInteger (Int32 *i, GvRun *r) |
Bool | GetFloat (Float *f, GvRun *r) |
Bool | GetVector (Vector *v, GvRun *r) |
Bool | GetNormal (Vector *n, GvRun *r) |
Bool | GetMatrix (Matrix *m, GvRun *r) |
Bool | GetTime (BaseTime *t, GvRun *r) |
Bool | GetString (String *s, GvRun *r) |
Bool | GetObject (BaseList2D *&o, GvRun *r) |
Bool | GetData (void *d, GvValueID type, GvRun *r) |
Bool | GetDataInstance (const void *&d, GvValueID type, GvRun *r) |
Set Value | |
Bool | SetBool (Bool b, GvRun *r) |
Bool | SetInteger (Int32 i, GvRun *r) |
Bool | SetFloat (Float f, GvRun *r) |
Bool | SetVector (const Vector &v, GvRun *r) |
Bool | SetMatrix (const Matrix &m, GvRun *r) |
Bool | SetNormal (const Vector &n, GvRun *r) |
Bool | SetTime (const BaseTime &t, GvRun *r) |
Bool | SetString (const maxon::String &s, GvRun *r) |
Bool | SetObject (const BaseList2D *o, GvRun *r) |
Bool | SetData (const void *d, GvValueID type, GvRun *r) |
const String | GetName (GvNode *node) |
void | SetName (const maxon::String &name) |
Copy Data | |
Bool | CopyPortData (GvPort *source, GvRun *r) |
Bool | CopyRawData (void *source, GvRun *r) |
Calculate Data | |
Bool | CalculateRawData (void *data, void *dest, GvRun *r, GvValueFlags calculation, Float parm1=0.0_f) |
Bool | CalculateRawRawData (void *data1, void *data2, void *dest, GvRun *r, GvValueFlags calculation, Float parm1=0.0_f) |
Bool | CalculatePortData (GvPort *data, void *dest, GvRun *r, GvValueFlags calculation, Float parm1=0.0_f) |
Bool | CalculateRawDataRev (void *data, void *dest, GvRun *r, GvValueFlags calculation, Float parm1=0.0_f) |
Get/Set Tag/Material/Instance/Object | |
Bool | GetTag (BaseList2D *&t, GvRun *r, Int32 *index=nullptr) |
Bool | SetTag (const BaseList2D *const t, GvRun *r, Int32 index=0) |
Bool | GetMaterial (BaseList2D *&m, GvRun *r, Int32 *index=nullptr) |
Bool | SetMaterial (const BaseList2D *const m, GvRun *r, Int32 index=0) |
Bool | GetInstance (BaseList2D *&i, GvRun *r, Int32 *index=nullptr) |
Bool | SetInstance (const BaseList2D *const i, GvRun *r, Int32 index=0) |
Bool | GetObjectWithIndex (BaseList2D *&o, GvRun *r, Int32 *index=nullptr) |
Bool | SetObjectWithIndex (const BaseList2D *const o, GvRun *r, Int32 index=0) |
Outgoing/Destination Information | |
GvDestination * | GetOutgoing (Int32 index) |
User Data | |
GeData * | GetUserData () |
void | SetUserData (const GeData &data) |
|
private |
|
private |
void RemoveConnection | ( | ) |
Removes the incoming connection.
Int32 GetNrOfConnections | ( | ) |
Gets the number of connections, including both the incoming and outgoing connections.
void RemovePortConnections | ( | ) |
Removes all outgoing connections.
Bool IsIncomingConnected | ( | ) |
Checks if there is an incoming connection.
Gets the destination of the incoming connection.
[out] | node | Assigned the incoming destination node. |
[out] | port | Assigned the incoming destination port. |
Gets the source of the incoming connection.
[out] | node | Assigned the incoming source node. |
[out] | port | Assigned the incoming source port. |
void SetMainID | ( | Int32 | id | ) |
Sets the main ID of the port.
[in] | id | The main ID to set. |
Int32 GetMainID | ( | ) |
Gets the main ID of the port.
Int32 GetSubID | ( | ) |
Gets the sub ID of the port.
void SetUserID | ( | Int32 | id | ) |
Sets the user ID of the port.
[in] | id | The user ID to set. |
Int32 GetUserID | ( | ) |
Gets the user ID of the port.
GvValueID GetValueType | ( | ) |
Gets the value type of the port.
void SetVisible | ( | Bool | v | ) |
Hides or shows the port.
[in] | v | true if the port should be visible and false if it should be hidden. |
Bool GetVisible | ( | ) |
Checks if the port is hidden or visible.
Reports this port as valid or invalid during a run.
[in] | r | The run helper. The caller owns the pointed run helper. |
[in] | v | true if the port is valid, otherwise false. |
Checks if the port is valid during a run.
[in] | r | The run helper. The caller owns the pointed run helper. |
void SetCalculated | ( | GvRun * | r | ) |
Reports that this port has been calculated in this run.
[in] | r | The run helper. The caller owns the pointed run helper. |
Calculates the port.
[in] | bn | The node that the ports belongs to. The caller owns the pointed node. |
[in] | r | The run helper. The caller owns the pointed run helper. |
[in] | c | The calculation helper. The caller owns the pointed calculation helper. |
Marks all outgoing port connections for recalculation. This will also call GvOperatorData::SetRecalculate().
[in] | r | The run helper. The caller owns the pointed run helper. |
[in] | force_set | Forces all nodes to be recalculated, even if they seem to be valid. |
Retrieves a boolean value from the port.
[out] | b | Assigned the port value. |
[in] | r | The run helper. The caller owns the pointed run helper. |
Retrieves an integer value from the port.
[out] | i | Assigned the port value. |
[in] | r | The run helper. The caller owns the pointed run helper. |
Retrieves a float value from the port.
[out] | f | Assigned the port value. |
[in] | r | The run helper. The caller owns the pointed run helper. |
Retrieves a vector value from the port.
[out] | v | Assigned the port value. |
[in] | r | The run helper. The caller owns the pointed run helper. |
Retrieves a normal vector value from the port.
[out] | n | Assigned the port value. |
[in] | r | The run helper. The caller owns the pointed run helper. |
Retrieves a matrix value from the port.
[out] | m | Assigned the port value. |
[in] | r | The run helper. The caller owns the pointed run helper. |
Retrieves a time value from the port.
[out] | t | Assigned the port value. |
[in] | r | The run helper. The caller owns the pointed run helper. |
Retrieves a string value from the port.
[out] | s | Assigned the port value. |
[in] | r | The run helper. The caller owns the pointed run helper. |
Bool GetObject | ( | BaseList2D *& | o, |
GvRun * | r | ||
) |
Retrieves an object value from the port.
[out] | o | Assigned the port value. |
[in] | r | The run helper. The caller owns the pointed run helper. |
Retrieves the data from the port.
[out] | d | Assigned the port value. The port owns the pointed data. Points to GV data. The layout of the pointed data is determined by type. |
[in] | type | Determines the type of d. |
[in] | r | The run helper. The caller owns the pointed run helper. |
Retrieves the data pointer from the port.
[out] | d | Assigned a pointer to the port data. The port owns the pointed data. Points to GV data. The layout of the pointed data is determined by type. |
[in] | type | Determines the type of d. |
[in] | r | The run helper. The caller owns the pointed run helper. |
Sets a boolean value in the port.
[in] | b | The new port value. |
[in] | r | The run helper. The caller owns the pointed run helper. |
Sets an integer value in the port.
[in] | i | The new port value. |
[in] | r | The run helper. The caller owns the pointed run helper. |
Sets a float value in the port.
[in] | f | The new port value. |
[in] | r | The run helper. The caller owns the pointed run helper. |
Sets a vector value in the port.
[in] | v | The new port value. |
[in] | r | The run helper. The caller owns the pointed run helper. |
Sets a matrix value in the port.
[in] | m | The new port value. |
[in] | r | The run helper. The caller owns the pointed run helper. |
Sets a normal vector value in the port.
[in] | n | The new port value. |
[in] | r | The run helper. The caller owns the pointed run helper. |
Sets a time value in the port.
[in] | t | The new port value. |
[in] | r | The run helper. The caller owns the pointed run helper. |
Bool SetString | ( | const maxon::String & | s, |
GvRun * | r | ||
) |
Sets a string value in the port.
[in] | s | The new port value. |
[in] | r | The run helper. The caller owns the pointed run helper. |
Bool SetObject | ( | const BaseList2D * | o, |
GvRun * | r | ||
) |
Sets an object value in the port.
[in] | o | The new port value. |
[in] | r | The run helper. The caller owns the pointed run helper. |
Sets the data in the port.
[in] | d | The new port value. The port owns the pointed data. Points to GV data. The layout of the pointed data is determined by type. |
[in] | type | Determines the type of d. |
[in] | r | The run helper. The caller owns the pointed run helper. |
Gets the name of the port.
[in] | node | The node the ports belongs to. The caller owns the pointed node. |
void SetName | ( | const maxon::String & | name | ) |
Sets the name of the port.
[in] | name | The new port name. |
Copies the data from the source port.
[in] | source | The source port. The caller owns the pointed port. |
[in] | r | The run helper. The caller owns the pointed run helper. |
Copies the raw void*
data from source.
[in] | source | The source data. The caller owns the pointed data. |
[in] | r | The run helper. The caller owns the pointed run helper. |
Bool CalculateRawData | ( | void * | data, |
void * | dest, | ||
GvRun * | r, | ||
GvValueFlags | calculation, | ||
Float | parm1 = 0.0_f |
||
) |
Convenience function to do calculation with unknown data.
Uses the port's value handler to call GV_VALUE_HANDLER::Calculate
(userdata, value_id, portdata, data, dest, 0, calculation, parm1), where portdata
is the data of the port.
For example, the result operator does:
[in] | data | The second data. This port data is used as first data. The caller owns the pointed data. |
[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] | r | The run helper. The caller owns the pointed run helper. |
[in] | calculation | The calculation to perform: GvValueFlags |
[in] | parm1 | An additional parameter. |
Bool CalculateRawRawData | ( | void * | data1, |
void * | data2, | ||
void * | dest, | ||
GvRun * | r, | ||
GvValueFlags | calculation, | ||
Float | parm1 = 0.0_f |
||
) |
Convenience function to do calculation with unknown data.
Uses the port's value handler to call GV_VALUE_HANDLER::Calculate
(userdata, value_id, data1, data2, dest, 0, calculation, parm1).
[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] | r | The run helper. The caller owns the pointed run helper. |
[in] | calculation | The calculation to perform: GvValueFlags |
[in] | parm1 | An additional parameter. |
Bool CalculatePortData | ( | GvPort * | data, |
void * | dest, | ||
GvRun * | r, | ||
GvValueFlags | calculation, | ||
Float | parm1 = 0.0_f |
||
) |
Convenience function to do calculation with unknown data.
Uses the port's value handler to call GV_VALUE_HANDLER::Calculate
(userdata, value_id, portdata1, portdata2, dest, 0, calculation, parm1), where portdata1
is the data of the port and portdata2
is the data of the data port.
[in] | data | The port with the second data. This port data is used as first data. The caller owns the pointed port. |
[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] | r | The run helper. The caller owns the pointed run helper. |
[in] | calculation | The calculation to perform: GvValueFlags |
[in] | parm1 | An additional parameter. |
Bool CalculateRawDataRev | ( | void * | data, |
void * | dest, | ||
GvRun * | r, | ||
GvValueFlags | calculation, | ||
Float | parm1 = 0.0_f |
||
) |
Convenience function to do calculation with unknown data.
Uses the port's value handler to call GV_VALUE_HANDLER::Calculate
(userdata, value_id, data, portdata, dest, 0, calculation, parm1), where portdata
is the data of the port.
[in] | data | The first data. This port data is used as second data. The caller owns the pointed data. |
[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] | r | The run helper. The caller owns the pointed run helper. |
[in] | calculation | The calculation to perform: GvValueFlags |
[in] | parm1 | An additional parameter. |
Bool GetTag | ( | BaseList2D *& | t, |
GvRun * | r, | ||
Int32 * | index = nullptr |
||
) |
Retrieves an indexed tag value from the port.
[out] | t | Assigned the retrieved tag if successful. |
[in] | r | The run helper. The caller owns the pointed run helper. |
[out] | index | Assigned the index of the data, if not nullptr. Used by iterators to specify the index of the retrieved data. |
Bool SetTag | ( | const BaseList2D *const | t, |
GvRun * | r, | ||
Int32 | index = 0 |
||
) |
Sets an indexed tag value in the port.
[in] | t | The tag to set. The caller owns the pointed tag. |
[in] | r | The run helper. The caller owns the pointed run helper. |
[in] | index | The data index. Used by iterators. |
Bool GetMaterial | ( | BaseList2D *& | m, |
GvRun * | r, | ||
Int32 * | index = nullptr |
||
) |
Retrieves an indexed material value from the port.
[out] | m | Assigned the retrieved material if successful. |
[in] | r | The run helper. The caller owns the pointed run helper. |
[out] | index | Assigned the index of the data, if not nullptr. Used by iterators to specify the index of the retrieved data. |
Bool SetMaterial | ( | const BaseList2D *const | m, |
GvRun * | r, | ||
Int32 | index = 0 |
||
) |
Sets an indexed material value in the port.
[in] | m | The material to set. The caller owns the pointed material. |
[in] | r | The run helper. The caller owns the pointed run helper. |
[in] | index | The data index. Used by iterators. |
Bool GetInstance | ( | BaseList2D *& | i, |
GvRun * | r, | ||
Int32 * | index = nullptr |
||
) |
Retrieves an indexed instance value from the port.
[out] | i | Assigned the retrieved instance if successful. |
[in] | r | The run helper. The caller owns the pointed run helper. |
[out] | index | Assigned the index of the data, if not nullptr. Used by iterators to specify the index of the retrieved data. |
Bool SetInstance | ( | const BaseList2D *const | i, |
GvRun * | r, | ||
Int32 | index = 0 |
||
) |
Sets an indexed instance value in the port.
[in] | i | The instance to set. The caller owns the pointed instance. |
[in] | r | The run helper. The caller owns the pointed run helper. |
[in] | index | The data index. Used by iterators. |
Bool GetObjectWithIndex | ( | BaseList2D *& | o, |
GvRun * | r, | ||
Int32 * | index = nullptr |
||
) |
Retrieves an indexed object value from the port.
[out] | o | Assigned the retrieved object if successful. |
[in] | r | The run helper. The caller owns the pointed run helper. |
[out] | index | Assigned the index of the data, if not nullptr. Used by iterators to specify the index of the retrieved data. |
Bool SetObjectWithIndex | ( | const BaseList2D *const | o, |
GvRun * | r, | ||
Int32 | index = 0 |
||
) |
Sets an indexed object value in the port.
[in] | o | The object to set. The caller owns the pointed object. |
[in] | r | The run helper. The caller owns the pointed run helper. |
[in] | index | The data index. Used by iterators. |
GvDestination* GetOutgoing | ( | Int32 | index | ) |
Retrieves information about the outgoing destinations.
[in] | index | The destination index: 0 <= index < GetNrOfConnections()-(IsIncomingConnected() ? 1 : 0) |
GeData* GetUserData | ( | ) |
Internal.
void SetUserData | ( | const GeData & | data | ) |
Internal.