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

    Getting a shader

    SDK Help
    0
    6
    713
    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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 31/05/2003 at 09:40, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.100 
      Platform:    Mac  ;  
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      How can I get what type of shader is being used inside any channel? I wrote this code (1) and it does return me the name of the shader, the name of the bitmap or nil (if no shader nor bitmap is being used). But, how can I check for what type of thing is there? How do I know if it is a shader or a bitmap?

      (1)

        
      main(doc,op)  
      {  
      var material,color,channel,shader;  
        
      material=doc->GetFirstMaterial();  
      if(!material) return;  
        
      color=material->GetChannel(CHANNEL_COLOR);  
      channel=color->GetContainer();  
      shader=channel->GetData(CH_TEXTURE);  
      println(shader->GetName());  
      }  
      

      And, if possible, how can I search for all nested shaders (for instance, inside a Fusion shader)?
      Thank you very much in advance.

      Rui Batista

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 01/06/2003 at 10:18, xxxxxxxx wrote:

        Try using getclass(shader) to differentiate the cases.

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 01/06/2003 at 10:19, xxxxxxxx wrote:

          I don't think nested shaders are possible to detect, since Fusion is just a C++ plugin with no public API.

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

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 01/06/2003 at 11:59, xxxxxxxx wrote:

            Darn!!! So, how is it possible to know what shaders are used in a document?

            Rui Batista

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

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 02/06/2003 at 01:28, xxxxxxxx wrote:

              That's not possible then.

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

                THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                On 02/06/2003 at 02:43, xxxxxxxx wrote:

                That is a terrible limitation! Can't it be added?

                Rui Batista

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