SOLVED Xpresso set port for all nodes

Hello for everyone. Is it real to set up parameters like a position and rotation for all selected nodes by python?

def main():
    nodes = [] 
    root = nodeMaster.GetRoot() 
    for node in root.GetChildren():
        if node.GetBit(c4d.BIT_ACTIVE): 
        ##place for setting parameter##

If its real, could you write a command which set up x position in input for example

hi,

first i would like to point you to our guidelines. You will read there how to mark your thread as a question and how to use tags.

You got some example in our github repository that could help. The first one will show you how to iterate nodes and go inside groups if any. The second is to create and connect nodes. Once you got your node, you must use the function AddPort

You have to define the direction (output or input) and use the right ID

    child.AddPort(c4d.GV_PORT_OUTPUT, c4d.ID_BASEOBJECT_REL_POSITION )
    child.AddPort(c4d.GV_PORT_OUTPUT, [c4d.ID_BASEOBJECT_REL_POSITION,c4d.VECTOR_X] )

Don't forget you can use drag and drop on the python console to retrieve the IDs, more information on this page

Cheers,
Manuel

hi,

first i would like to point you to our guidelines. You will read there how to mark your thread as a question and how to use tags.

You got some example in our github repository that could help. The first one will show you how to iterate nodes and go inside groups if any. The second is to create and connect nodes. Once you got your node, you must use the function AddPort

You have to define the direction (output or input) and use the right ID

    child.AddPort(c4d.GV_PORT_OUTPUT, c4d.ID_BASEOBJECT_REL_POSITION )
    child.AddPort(c4d.GV_PORT_OUTPUT, [c4d.ID_BASEOBJECT_REL_POSITION,c4d.VECTOR_X] )

Don't forget you can use drag and drop on the python console to retrieve the IDs, more information on this page

Cheers,
Manuel

@m_magalhaes Thank you for answer!