Hide helper object completely, I said: COMPLETELY



  • On 04/02/2014 at 15:30, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   13,14,15 
    Platform:   Windows  ;   
    Language(s) :     C++  ;

    ---------
    Hi, I use some helper objects, I need them in the Object Manager, but they are totally unwanted in the viewport.
    I can hide them from the viewport, and even protect them from animation using:

       MyHelperObject->ChangeNBit(NBIT_EHIDE, NBITCONTROL_SET);
       MyHelperObject->ChangeNBit(NBIT_PROTECTION, NBITCONTROL_SET);
    

    But no matter what I do, rotation handles / move handles appear in the Viewport, when I select the helper object in the Object Manager.
    I have tried this too:

       MyHelperObject->ChangeNBit(NBIT_NOSELECT, NBITCONTROL_SET);
    

    To no avail.. The stupid rotation handles still show up. How can I remove these from the surface of the earth, for ever, completely, to never be seen the next 1000 years?



  • On 05/02/2014 at 03:58, xxxxxxxx wrote:

    You could try this:

    BaseDocument*    baseDoc =            obj->GetDocument();  
    if (!baseDoc)                        return;  
    obj->ChangeNBit(NBIT_OHIDE, NBITCONTROL_SET);  
    baseDoc->SetActiveObject(obj, SELECTION_SUB);  
    obj->Message(MSG_UPDATE);  
    EventAdd();
    

    Realize that this totally hides and deselets the object in the Object Manager so that it can neither be seen nor selected by the user.  There is no other way around this.  If the user can select the object, the tool draw is automatic and internal (and unavoidable).



  • On 05/02/2014 at 04:44, xxxxxxxx wrote:

    There's also the NBIT_EHIDE flag which hides the object in the Viewport.

    Best,
    -Niklas



  • On 05/02/2014 at 06:58, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    There's also the NBIT_EHIDE flag which hides the object in the Viewport.

    Did you really read my initial post? 😉



  • On 05/02/2014 at 07:01, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    You could try this:
    Realize that this totally hides and deselets the object in the Object Manager so that it can neither be seen nor selected by the user.  There is no other way around this.  If the user can select the object, the tool draw is automatic and internal (and unavoidable).

    Hi Robert, yes you are right. The object needs to be visible in Object Manager, though. Otherwise the treeview will look awkward. 
    Well, it is not a big deal. And I try to twist my head and try to figer out other  ways to do this.
    If there is a way to display a hierarchy in Object manager, in a decent way, where one node is invisible, I am all years.



  • On 05/02/2014 at 07:48, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    Originally posted by xxxxxxxx

    There's also the NBIT_EHIDE flag which hides the object in the Viewport.

    Did you really read my initial post? 😉

    Seems like I did not enough. Sorry for that ;)

    It is not possible to display the Object in the Viewport but hide the rotation/axis/scale bands.

    Best,
    -Niklas



  • On 05/02/2014 at 08:15, xxxxxxxx wrote:

    You could force the helper objects to always de-select themselves if the use selects them in the OM.
    Using logic like: if obj.GetBit(c4d.BIT_ACTIVE) : obj.DelBit(c4d.BIT_ACTIVE)

    -ScottA



  • On 05/02/2014 at 08:20, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    It is not possible to display the Object in the Viewport but hide the rotation/axis/scale bands.

    To avoid any possible misunderstandings:

    a) The object is totally hidden in the viewport, it is never visible there.
    b) The object is visible in Object Manager.
    c) When I select the object in Object Manager, the rotation bands appear in the viewport.

    What I want to avoid, is c)



  • On 05/02/2014 at 08:24, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    You could force the helper objects to always de-select themselves if the use selects them in the OM.
    Using logic like: if obj.GetBit(c4d.BIT_ACTIVE) : obj.DelBit(c4d.BIT_ACTIVE)

    Thanks for this tip! I was not aware of this BIT_ACTIVE bit. Unless it leads to unwanted (unprofessional) flicker, and unless it has no noticeable overhead, it is worth trying. But maybe the user experience will be a bit awkward, and "un-C4D-ish", so I am a bit reluctant to do it.


Log in to reply