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

    Update viewport value <-> Update user data value

    Scheduled Pinned Locked Moved SDK Help
    2 Posts 0 Posters 246 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

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

      On 20/03/2010 at 20:09, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   11.5 
      Platform:   Windows  ;   
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      Let's say i want to make the userdata id1 slider to control de .y positin of an object, all good (but the object can't be moved in viewport). And if the current viewport position of the object has to update the slider value = all ok (but the slider can't be changed, once mouse release the value returns to same value of course).

      SO,
      **Question:
      What if i want both things at same time, so the object if moved in viewports updates de slider, and if slider changes update the viewport. **

      Example code:

      main(doc,op)
      {
      var caca;
      var cacapos;

      caca = op#ID_USERDATA:1;
      cacapos = op->GetPosition();

      op#ID_USERDATA:1 = cacapos.y;        // Sends the object position value to the userdata
      op->SetPosition(vector(0,caca,0));     // Sends the user data value to the object position

      }

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

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

        On 13/12/2011 at 10:40, xxxxxxxx wrote:

        This COFFEE script seems to be buggy in the viewport. I'd really like to know how do this via Python!

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