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

    Disable move option in the viewport

    SDK Help
    0
    3
    263
    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

      On 16/04/2014 at 23:45, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R13 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hello all,

      i am trying at the moment to disable the move option in the viewport, from the code, but only
      for certain types of objects.

      In case the object tree is like this:
      ObjectType1
               ObjectType2
                         ObjectType3

      All object types should be selectable. This means that in the viewport they can also be moved.
      But i want this only for ObjectType2. ObjectType1 and ObjectType2 should be selectable, but they cannot be moved in the viewport.

      Is there any way to do this from my plugin code ?

      Thank you in advance for all your responses.

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

        On 17/04/2014 at 14:10, xxxxxxxx wrote:

        Hello Pia,

        Take a look at GeListNode::ChangeNBit(). You can use the NBIT_PROTECTION constant to
        lock PSR on the object. Make sure to unset the bit when you are done, the user has no visual
        access to modify this bitflag.

        Best,
        -Niklas

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

          On 13/05/2014 at 04:33, xxxxxxxx wrote:

          Hello Niklas,

          victory !
          this is exactly what i was looking for and it works wonderfully

          Thank you very much for the help.

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