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
    • Recent
    • Tags
    • Users
    • Register
    • Login

    Getting Layershader and subshaders

    Scheduled Pinned Locked Moved SDK Help
    14 Posts 0 Posters 969 Views
    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 Offline
      Helper
      last edited by

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

      On 09/03/2005 at 01:11, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   9 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hi there,
      I' currently searchin for a possibility to browse through a material, for the plugin i'm developing.
      Now i want to check if a shader is a layershader or fusionshader, and browse through its subshaders.

      Am i on the right way if i do a GetData() on the Shader?
      If yes, how can know if its a layershader or any other?
      and how can i access its subshaders?

      Many questions for the first post, huh 😉

      thanks for each reply,

      affa

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

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

        On 09/03/2005 at 12:27, xxxxxxxx wrote:

        huh, thats really hard to figure out. That's how far i've come:

        m_shad->GetDescription(desc,0);
        BaseContainer *bc = desc->GetParameterI(DESCID_ROOT,NULL);

        but then, how do i get the infos? there is this IDS_SLA_LAYER, ...?
        Or are there any documents that could help me?

        thanks,

        affa

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

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

          On 10/03/2005 at 00:40, xxxxxxxx wrote:

          I don't get it... can anyone help me?

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

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

            On 10/03/2005 at 06:22, xxxxxxxx wrote:

            Within an XSLAFusion shader you will be able to get the sub-shaders through the SHADERLINKs in the res-file. Unfortunately for XSLALayer there's just a single big SLA_BLEND, which is a private structure. So fusion yes, layer no, afaict.
            Getting the fusion sub-shaders should be a simple material->GetChannel(CHANNEL_COLOR)->GetShader()->GetParameter(SLA_FUSION_BLEND_CHANNEL, link, 0) operation.

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

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

              On 10/03/2005 at 06:26, xxxxxxxx wrote:

              thanks very much for your answer.
              So there is no way to get Infos out of the Layer-Shader? That would be bad 😕
              Thats nearly the whole purpose of my plugin, d'oh

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

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

                On 10/03/2005 at 06:48, xxxxxxxx wrote:

                Have you tried getting the layer shader and then browse through it with layershader->GetDown(); and then GetNext()? Not sure if this works, but worth a try. 🙂

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

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

                  On 10/03/2005 at 07:30, xxxxxxxx wrote:

                  indeed, it works that way :-)))

                  Thanks very much Samir

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

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

                    On 10/03/2005 at 07:33, xxxxxxxx wrote:

                    🙂 you´re welcome.

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

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

                      On 10/03/2005 at 09:47, xxxxxxxx wrote:

                      You're right, that will work to get the actual sub-shaders. However, I double checked with the develoepers and there's no way to access the actual SLA_BLEND structure. So you won't be able to access the blend parameters for the layers etc.

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

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

                        On 10/03/2005 at 09:50, xxxxxxxx wrote:

                        hmm, ok thanks. the blend parameters whould also have been nice, but subshaders is a good start 😉
                        I'll post the plugin here when i finished it

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

                          On 10/08/2014 at 17:38, xxxxxxxx wrote:

                          Old thread revive - I take it that it is still not possible to access the layer shader properly?

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

                            On 10/08/2014 at 23:10, xxxxxxxx wrote:

                            Check this out: <[URL-REMOVED]>


                            [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

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

                              On 11/08/2014 at 00:52, xxxxxxxx wrote:

                              Huh!  Well i`ll be damned..

                              Weird how they`ve included LayerShader in the docs and no mention of Fusion for example ( at least from what i can see ) even though fusion is accessible..

                              Cheers Niklas.

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

                                On 11/08/2014 at 07:27, xxxxxxxx wrote:

                                The word "properly" can mean different things to different people.
                                AFAIK. We still cannot insert or remove shaders from the Layer Shader. And I don't think Maxon intends on fixing that in any future releases.

                                Therefore.
                                It's my own personal opinion that we do not have "proper" access to it. And never will.

                                -ScottA

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