Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    BaseContainer missing for GvNode created with c4dpy

    Cinema 4D SDK
    r23 python
    3
    4
    789
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • beesperesterB
      beesperester
      last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • ManuelM
        Manuel
        last edited by

        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

        MAXON SDK Specialist

        MAXON Registered Developer

        1 Reply Last reply Reply Quote 0
        • beesperesterB
          beesperester
          last edited by

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

          Cheers

          1 Reply Last reply Reply Quote 0
          • ferdinandF
            ferdinand
            last edited by ferdinand

            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

            MAXON SDK Specialist
            developers.maxon.net

            1 Reply Last reply Reply Quote 0
            • i_mazlovI i_mazlov referenced this topic on
            • First post
              Last post