SOLVED BaseContainer missing for GvNode created with c4dpy

I am creating a GvNode via GvNodeMaster.CreateNode() in a python script that opens an existing cinema 4d file and stores it after the modifications to a different cinema 4d file. When I open the newly created file in cinema 4d I can access and write to the the GvNode's x and y position perfectly fine like this in the python console:

# x coordinate
my_node.GetDataInstance().GetContainerInstance(1001).GetContainerInstance(1000)[100]  = x
# y coordinate
my_node.GetDataInstance().GetContainerInstance(1001).GetContainerInstance(1000)[101]  = y

But when I try to access those coordinates from inside the python script via c4dpy I get an NoneType error because the last base container (1000) is missing in base container with id 1001. I tried manually creating a new BaseContainer instance and attaching it like this:

my_node.GetDataInstance().GetContainerInstance(1001)[1000] = c4d.BaseContainer()

But this totally messes up the graphview when I open it in cinema 4d. I guess because all the other attributes like width and hight are missing.

Is this base container somehow created at a later stage where I don't have access yet? Is this intentional?

Hi,

This is not related with using c4dpy, the same issue happens with a regular c4d. In fact, those data are only available once you have open the Xpresso node at least once.

You could Open the dialog and close it immediately, but of course it will not work with c4dpy.
I'm afraid there's no workaround for this one.

Cheers,
Manuel

Hi,

This is not related with using c4dpy, the same issue happens with a regular c4d. In fact, those data are only available once you have open the Xpresso node at least once.

You could Open the dialog and close it immediately, but of course it will not work with c4dpy.
I'm afraid there's no workaround for this one.

Cheers,
Manuel

Hi, thanks for the information. I will try and utilise the x and y coordinates in GvNodeMaster.CreateNode() instead.

Cheers

Hello @beesperester,

without any further questions, we will consider this topic as solved by Monday and flag it accordingly.

Thank you for your understanding,
Ferdinand