THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/09/2011 at 12:55, xxxxxxxx wrote:
Yeah, it doesn't make sense. When I try to do the same thing with Relative Position.Y the node works fine.
import c4d
def main() :
null = c4d.BaseObject(c4d.Onull)
doc.InsertObject(null)
cube = c4d.BaseObject(c4d.Ocube)
doc.InsertObject(cube,null)
xtag = c4d.BaseTag(c4d.Texpresso)
null.InsertTag(xtag)
nodemaster = xtag.GetNodeMaster()
print nodemaster.GetOwner().GetName()
node1 = nodemaster.CreateNode(nodemaster.GetRoot(),c4d.ID_OPERATOR_OBJECT,None,100,100)
node1[c4d.GV_OBJECT_OBJECT_ID] = cube
node2 = nodemaster.CreateNode(nodemaster.GetRoot(),c4d.ID_OPERATOR_OBJECT,None,300,100)
node2[c4d.GV_OBJECT_OBJECT_ID] = cube
node1out = node1.AddPort(c4d.GV_PORT_OUTPUT, (c4d.PRIM_CUBE_LEN, c4d.VECTOR_Y))
print node1.GetOperatorContainer()[c4d.GV_OBJECT_OBJECT_ID].GetName()
node2in = node2.AddPort(c4d.GV_PORT_INPUT, (c4d.ID_BASEOBJECT_REL_POSITION, c4d.VECTOR_Y))
print node2.GetOperatorContainer()[c4d.GV_OBJECT_OBJECT_ID].GetName()
c4d.modules.graphview.RedrawMaster(nodemaster)
node1out.Connect(node2in)
c4d.EventAdd()
if __name__=='__main__':
main()