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
    • Recent
    • Tags
    • Users
    • Login

    Xpresso Node Position issues

    Scheduled Pinned Locked Moved PYTHON Development
    6 Posts 0 Posters 522 Views
    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 Offline
      Helper
      last edited by

      On 12/12/2014 at 10:10, xxxxxxxx wrote:

      Is there something more to updating the nodemaster using:

      nm.Message(c4d.MSG_UPDATE)
      

      If I create an XPresso setup using python and then copy and past that into a new scene, the placement of the nodes all move back to 0. If I add a node after the creation of the setup the node placements stay put when copying to a new scene. So my guess is there's an update I'm missing?

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

        On 14/12/2014 at 11:10, xxxxxxxx wrote:

        Hello,

        could you please post a little snippet how you insert your node master?
        Best wishes
        Martin

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

          On 15/12/2014 at 05:26, xxxxxxxx wrote:

          Hello,

          as Martin said, can you give us some more information or some simple code that shows how you copy the Xpresso setup? This would help us to answer your question.

          Best wishes,
          Sebastian

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

            On 15/12/2014 at 09:13, xxxxxxxx wrote:

            I made a quick setup for you guys. The problem is if you do not open the XPresso tag after completion and copy the object (CTRL+C, CTRL+V) to a new scene the positions return to 0. If you open up the tag and then copy the object to a new scene the positions are correct.

            Here is the (not)working example:

            import c4d
            from c4d import gui
            #Node Position Issues
              
            # Get Object
            obj = doc.GetActiveObject()
              
            # Create Tag
            tag = c4d.BaseTag(c4d.Texpresso)
            # Add Tag
            obj.InsertTag(tag)
              
            # Get NodeMaster
            nm = tag.GetNodeMaster()
              
            c4d.EventAdd()
              
            # Node Count
            tcount = 1
              
            # Add Range Mapper Node
            nRange = nm.CreateNode(nm.GetRoot(),c4d.ID_OPERATOR_RANGEMAPPER,insert=None, x=(100+420), y=(50+(110*tcount)))
              
              
            # Update The NodeMaster
            nm.Message(c4d.MSG_UPDATE)
            
            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

              On 16/12/2014 at 00:44, xxxxxxxx wrote:

              Hello,

              this behavior is actually a bug in Cinema. Thanks for finding this, a bug report was filed.

              Best wishes,
              Sebastian

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

                On 16/12/2014 at 07:29, xxxxxxxx wrote:

                Thanks Sebastian.

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