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

    How can I change the path of a Redshift shader with Python?

    Cinema 4D SDK
    r21 python
    2
    3
    731
    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.
    • C
      conductor
      last edited by

      Hi.
      If I call documents.GetAllAssets() I can get the owner of the shader in question, and I can use a tuple of params to get the path. For example:

      asset["owner"][c4d.REDSHIFT_SHADER_TEXTURESAMPLER_TEX0, c4d.REDSHIFT_FILE_PATH])

      Result: C:\a\b\c.jpg

      However, I need to replace that path with a different path for
      cloud rendering. The following doesn't work:

      asset["owner"][c4d.REDSHIFT_SHADER_TEXTURESAMPLER_TEX0, c4d.REDSHIFT_FILE_PATH]) = "../other/path

      A very similar technique works just fine for a Redshift proxy path.

      Can anyone tell me how to write a new path in a Redshift texture programmatically?

      Many thanks!

      1 Reply Last reply Reply Quote 0
      • C
        conductor
        last edited by

        mmm - seems to be working now. I'll have to figure out what I did differently. Sorry to bother you!

        ferdinandF 1 Reply Last reply Reply Quote 0
        • ferdinandF
          ferdinand @conductor
          last edited by

          Hello @conductor,

          Thank you for reaching out to us. I am glad that you could solve your problem yourself. Please do not hesitate to ask further questions you might have.

          Cheers,
          Ferdinand

          MAXON SDK Specialist
          developers.maxon.net

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