Hiding Materials



  • On 25/04/2014 at 08:55, xxxxxxxx wrote:

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

    ---------
    To hide an object in the object manager, you can use

    myObject.ChangeNBit(c4d.NBIT_OHIDE, c4d.NBITCONTROL_SET)
    

    Is there a way to hide materials in their window?

    I've found NBIT_THIDE and NBIT_EHIDE. Neither OHIDE nor THIDE are documented however OHIDE seems to hide successfully in the object manager. I don't know what THIDE relates to. EHIDE i documented as relating to the viewport. Any suggestions how to hide a material?



  • On 25/04/2014 at 13:56, xxxxxxxx wrote:

    Both of them use NBIT_OHIDE.
    The reason they are the same for both managers is because it targets "tree objects". Not "BaseObjects".
    The Object Manager & Material Manager are both tree gui's. So each object in them is considered to be a "tree object".

    The BaseObject class creates the actual objects.
    The tree object is just a way to reference them in a type of Linked List.

        BaseMaterial *mat = doc->GetFirstMaterial();  
      mat->ChangeNBit(NBIT_OHIDE, NBITCONTROL_SET);    //Hides the material in the Material Manager  
      mat->ChangeNBit(NBIT_OHIDE, NBITCONTROL_CLEAR);  //Unhides the material in the Material Manager
    

    -ScottA



  • On 26/04/2014 at 05:05, xxxxxxxx wrote:

    Thanks Scott

    Very curious. I initially tried using OHIDE and although it worked (hide the materials as desired) I was having some stability issues debuting with Xcode so tried backing out my last few changes. Removing the material hiding seemed to resolve the stability so I kinda guessed that I was attempting something illegal. I just put the OHIDE setting back into my project and all appears fine. Stable, materials hidden, all good. Guess I must just have been having an off day and missed something else. Working too late the night before at my day job (writing software) must be to blame!!! 😉

    Thanks again.


Log in to reply