On 04/03/2014 at 08:47, xxxxxxxx wrote:
I have read allot about adding ports to expresso nodes i got it working on my python node.
But my object nodes don't get te added object port. I found some other people having problems with this but didn't find a solution there only stuff for userdata i'm not using any userdata. I'm stuck here : c4d.GV_OBJECT_OPERATOR_OBJECT_IN
targetObjectNode = nodes.CreateNode(nodes.GetRoot(), c4d.ID_OPERATOR_OBJECT , None, 5, 50)
targetObjectNode[c4d.GV_OBJECT_OBJECT_ID] = targetData
targetObjectNodeOutput = targetObjectNode.AddPort(c4d.GV_PORT_OUTPUT,c4d.GV_OBJECT_OPERATOR_OBJECT_IN) #Object output port
If somebody can explain me what i'm doing wrong much appreciated
On 04/03/2014 at 10:07, xxxxxxxx wrote:
The object port is broken in python. To bypass this create an object link in the objects user data add the object to that data and create a port for the link.
This is really annoying and wish it would get fixed. Bypassing creates a lot of unnecessary extra code.
On 05/03/2014 at 07:00, xxxxxxxx wrote:
Thanks, work around is working.
im trying to change the names of these ports
pythonNodeInput1 = pythonNode.AddPort(c4d.GV_PORT_INPUT,c4d.IN_LINK)
pythonNodeInput2 = pythonNode.AddPort(c4d.GV_PORT_INPUT,c4d.IN_LINK)
both ports are named link now. Is it possible to rename a port?
In documentation i found SetName() but that changes the name of node not the port.
what im i doing wrong hehe