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

    GeUserArea.GetDragObject() for xpresso node

    Cinema 4D SDK
    python
    3
    4
    603
    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.
    • K
      kng_ito
      last edited by kng_ito

      Hi,
      I am working on drag and drop operation of UserArea.
      What I would like to do is replicate the behavior of adding a node in the XPresso Editor: drag the text of the node name in the X-Pool and drop it into the node graph, and a new node will be created.

      For UserArea, there is GetDragObject() to get the dragged information, and an example of its use is shown in this thread.
      However, using this method to drag an xpresso node name from X-Pool to the UserArea returns the following results.

      {'type': 400007002, 'object': None}
      

      400007002 is c4d.DRAGTYPE_GVNODE_STORE, so we know that something related to the XPresso node is being dragged, but 'object' is None, so we cannot identify which node is being dragged.
      Hopefully there is a way to get the specific value of the dragged node (e.g. c4d.ID_OPERATOR_BITMAP).

      Any help would be greatly appreciated.

      1 Reply Last reply Reply Quote 0
      • M
        m_adam
        last edited by

        Hi sadly this is not supported in Python and to be honest it won't be implemented soon if it ever get implemented since that's the first time we receive this feature request since Python and xpresso exist so this land at the bottom of all our feature request.

        Note that in C++ you can handle it like that:
        image.png

        Cheers,
        Maxime.

        MAXON SDK Specialist

        Development Blog, MAXON Registered Developer

        1 Reply Last reply Reply Quote 0
        • K
          kng_ito
          last edited by

          Thanks for the clarification and the C++ example!
          I'll try to think of other ways.

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

            Hey everyone,

            Just as an FYI: cinema::GvCopyBuffer is not a public type. Just saying this so that future C++ users do not run against a wall here. One might be able to wiggle through with a forward/dummy deceleration of GvCopyBuffer, but officially this is not supported in the public C++ API either. And we therefore cannot provide forum support for this in C++ either.

            Cheers,
            Ferdinand

            MAXON SDK Specialist
            developers.maxon.net

            1 Reply Last reply Reply Quote 0
            • First post
              Last post