On 01/01/2017 at 13:38, xxxxxxxx wrote:
Hey g,
I think working with GvNode is a quite good idea to control inports and outports, but dealing with it isn´t really intuitive. I was able to remove ports, but creating ... 
import c4d
#PYTHON NODE
def main() :
xgroup = op.GetUp()
objectInbool = xgroup[c4d.ID_USERDATA,2]
cornerINbool = xgroup[c4d.ID_USERDATA,3]
radiusINbool = xgroup[c4d.ID_USERDATA,4]
#for i in xrange(op.GetInPortCount()) :
#xgroup.RemovePort(xgroup.GetInPort(0))
ID = c4d.DescID(c4d.DescLevel(c4d.ID_USERDATA, c4d.DTYPE_SUBCONTAINER, 0), c4d.DescLevel(2))
port = xgroup.AddPort(c4d.GV_PORT_INPUT, ID, c4d.GV_PORT_FLAG_IS_VISIBLE, True)
And anyway, is it possible or recommended from pythonNode?
Thx and greetings
rownn
EDIT:
Ok, adding outport for op works, but for the xgroup doesnt work.
import c4d
#PYTHON NODE
def main() :
xgroup = op.GetUp()
print xgroup
port = xgroup.AddPort(c4d.GV_PORT_OUTPUT, c4d.OUT_LONG, c4d.GV_PORT_FLAG_IS_VISIBLE, True)
print port
#port = op.AddPort(c4d.GV_PORT_OUTPUT, c4d.OUT_LONG)
#print port