On 23/07/2015 at 09:22, xxxxxxxx wrote:
Hi Sebastian,
Originally posted by xxxxxxxx
But in the case of the Object node it is possible to add ports for the parameters of the referenced object. Since the Object node can reference any object it is unknown what ports might be added. So you have to create a special port ID based on the description of the parameter of the referenced object. This is done using the GvCall() hack.
My question is, why do you need the GvCall for the rotation, but not for the object-port?
But I think I just found out the answer by re-reading your comment.
The object-port is no real parameter of the object, since it's a reference to the object itself, right?
But what about the matrix? Shouldn't that be done with GvCall as well, since tags have no matrix?
Or is the matrix simply no parameter?
Here is the code for the rotation Y outport and the object outport:
GvPort* rotationOutPort = myNode->AddPort(GV_PORT_OUTPUT, GvCall(myData, GetMainID) (myNode, GV_PORT_OUTPUT, DescID(DescLevel(ID_BASEOBJECT_REL_ROTATION), DescLevel(VECTOR_Y))));
if (!rotationOutPort) return false;
GvPort* objectOutPort = myNode->AddPort(GV_PORT_OUTPUT, GV_OBJECT_OPERATOR_OBJECT_OUT, GV_PORT_FLAG_IS_VISIBLE, true);
if (!objectOutPort) return false;
Thanks for your help and time!