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

    Hiding Materials

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

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

        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

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

          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.

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