Disable move option in the viewport

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.

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

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.