Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    Change the ColorSpace of Redshift Texture Node?

    Cinema 4D SDK
    r25 python
    3
    6
    1.3k
    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.
    • B
      bentraje
      last edited by

      Hi,

      I can access the colorspace port through
      port = texture_node.GetInputs().FindChild("com.redshift3d.redshift4c4d.nodes.core.texturesampler.tspace_id")

      With the inspector enabled, it shows it accepts a string. I tried the following
      port..SetDefaultValue(maxon.String("sRGB"))
      port.SetDefaultValue("sRGB")

      But it doesn't change the values nor does it error out.

      Is there a way around this?

      f72b3611-7f4c-4b75-b4d9-9d6609c3dea8-image.png

      DunhouD 1 Reply Last reply Reply Quote 1
      • DunhouD
        Dunhou @bentraje
        last edited by

        @bentraje
        A little set for this , hope it can help something 😊
        Set color space

        https://boghma.com
        https://github.com/DunHouGo

        1 Reply Last reply Reply Quote 1
        • B
          bentraje
          last edited by

          @Dunhou

          Thanks for the response.
          Just wondering, where did you get the full list of the string values for the colorspace?
          colorspace: str='RS_INPUT_COLORSPACE_RAW'

          I'm guessing there is a list of that somewhere.

          DunhouD 1 Reply Last reply Reply Quote 0
          • DunhouD
            Dunhou @bentraje
            last edited by

            @bentraje
            I just drag and drop the item and return the str ,
            I also didn't found any str define in cinema folder

            https://boghma.com
            https://github.com/DunHouGo

            1 Reply Last reply Reply Quote 1
            • ManuelM
              Manuel
              last edited by Manuel

              Hi,

              thanks a lot @Dunhou for sharing your library and your knowledge, we really appreciate.

              We are aware that finding information, either the ID or the value of parameter can be sometimes time consuming.
              There are several places where you can find those informations.

              • The resource editor. It is used to create all the descriptions for the new system. The descriptions are stored inside .json files that can be considered as database. You will find everything you need there except (sometimes) what symbol to use.
              • The info palette in the node editor always displays the value of the port. In the case of the ColoSpace, the "Auto" value is defined by an empty string so, you see nothing. But if you change the color space to raw, you will see the value. Here RS_INPUT_COLORSPACE_RAW is the string value and not the symbol. The info palette can display the IDs of the node/ports if you activate the option in the preferences or if you start c4d with the following argument g_showNodeIds=true.
              • In the attribut manager, you can ctrt+alt+right clic any parameter to copy the ID to the clipboard. The dot will be replace by underscore but that is better than nothing.
              • If you copy a node using ctrl+C on the node editor, you can paste it in a text editor (like sublime text) to paste the json representation of this node. In this text you can find the IDs and the Value of each port.
              • For the old description system, you can drag and drop parameter to the python console, you will retrieve the IDs and the value once you press enter.

              Cheers,
              Manuel

              MAXON SDK Specialist

              MAXON Registered Developer

              1 Reply Last reply Reply Quote 1
              • B
                bentraje
                last edited by

                @Dunhou @Manuel

                Thanks for the response. I ended up going for the ctrl+C on the node editor
                Pretty straightforward and works as expected.

                Functions like how you copy/paste nodes on Fusion and Nuke.

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