Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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

    Retreiving Xpresso Node Position

    SDK Help
    0
    5
    471
    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.
    • H
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 31/12/2003 at 10:21, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.503 
      Platform:   Windows  ; Mac  ;  Mac OSX  ; 
      Language(s) :     C++  ;  XPRESSO  ;

      ---------
      In the GvNodeGUI I can set the local and global position of a node.  How do I retrieve the current local or global position of the node?  I have looked in this forum, the docs, and searched the SDK.  I simply want to offset the position of a node as newly created nodes seem to be centered on the mouse position.
      Best Regards,
      Thomas Cray
      www.cidertank.com

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 31/12/2003 at 16:12, xxxxxxxx wrote:

        It does indeed look like that's impossible.

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 01/01/2004 at 19:35, xxxxxxxx wrote:

          We were wrapping Xpresso in the updated BT gui.  Position of the node is pertinent to this.  If there would be a way to hack it for 8.5 with a helper structure to extract this I would appreciate it.  Dave is on my back about making a usable gui for Xpresso. Help me out here, please.
          Regards,
          Thomas Cray
          www.cidertank.com

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 02/01/2004 at 01:00, xxxxxxxx wrote:

            I've posted a question to the developers but I suspect they are still on holiday for yet a few days. However, "Dave" is the magic word. Then I know that you'll never listen to any advice I give you to abandon the idea... 😉
            So let me share a small hacking-C4D trick. Just make a scene with a single dummy object and a single Xpresso tag with a single node. Then export two XML files, one where you have moved the node. If you run windiff on these two files you'll find out how the position is stored.
            In this case you'll find that a number deep into the node's container changed. Here's the code to dig it up, complete with a few constants from c4d_graphview_def that seemed to fit in: (Though 100 and 101 will have to remain magic constants.)

                
                
                #include "c4d_graphview.h"
                
                
                
                
                Bool MenuTest::Execute(BaseDocument *doc)  
                {  
                  BaseObject* obj = doc->GetFirstObject();  
                  XPressoTag* xpt = static_cast<XPressoTag*>(obj->GetTag(Texpresso));  
                  GvNodeMaster* nm = xpt->GetNodeMaster();  
                  GvNode* root = nm->GetRoot();  
                  GvNode* node = root->GetDown();  
                  BaseContainer bcs = node->GetData().GetContainer(ID_SHAPECONTAINER);  
                  BaseContainer bcd = bcs.GetContainer(ID_OPERATORCONTAINER);  
                  LONG x = bcd.GetLong(100);  
                  LONG y = bcd.GetLong(101);  
                  GePrint("x: " + x + ",  y: " + y);  
                }
            

            This is of course unsupported, so you'll have to check if it changes in the future. Good luck with the BT frontend!

            1 Reply Last reply Reply Quote 0
            • H
              Helper
              last edited by

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 02/01/2004 at 15:24, xxxxxxxx wrote:

              Good idea, thanks Mike.
              Thomas

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