Maxon Developers
    • Downloads
      • All Downloads
      • Cinema 4D Python SDK
      • Cinema 4D C++ SDK
      • Cineware SDK
      • ZBrush GoZ SDK
      • Cinema 4D Python Examples
      • Cinema 4D C++ Examples
      • Project Tool
      • SDK Database
    • Documentation
      • Cinema 4D Python SDK
      • Cinema 4D C++ SDK
      • Cineware SDK
      • ZBrush GoZ SDK
    • Forum
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Forums
      • Overview
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • News & Information
      • Downloads
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Register
    • Login

    Execute (When?) lock x,y,z

    SDK Help
    0
    2
    43
    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 18/05/2011 at 06:11, xxxxxxxx wrote:

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

      ---------
      Hello

      I am working on a little plugin tag which is supposed to lock selected axis - somewhat like the X,Y,Z lock of the C4D interface.

      No problem locking an object to a specified fixed location which the user can enter in the Tag description. But what about simply locking an object at it's current position?

      In Execute() I would have to get info about where the object is before moved and where it is going. How can this be done?

      Thanks

      Peter

      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 18/05/2011 at 08:16, xxxxxxxx wrote:

          
        //This is COFFEE, not C++  
          
        var isLocked = FALSE;  
        var pos = NULL;  
        TAG::Execute(op,doc) {  
          if (op->GetData(TAG_ISLOCKENABLED)) {  
              if (!isLocked) {  
                  pos = op->GetPosition();  
              }  
              isLocked = TRUE;  
              if (pos) {  
                  op->SetPosition(pos);  
              }  
          }  
          else { isLocked = FALSE; }  
        }  
        

        Cheers, Niklas

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