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

    TEXTURE LINK

    Scheduled Pinned Locked Moved PYTHON Development
    4 Posts 0 Posters 908 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

      On 09/04/2018 at 00:27, xxxxxxxx wrote:

      Can anybody help me with this linking texture path to octane IMAGE TEXTURE shader, i just wanted to push myself how to link it.
      And also how to link light color.
      i upload my source so that you can easily understand what i'm trying to say. since i'm very new to python and try to push my limits but can't figure out how to link it. It will be very grateful if anyone who can help me out.

      Here is my sample code.
      https://www.dropbox.com/s/1nt6h995r4hrc16/texturepath.zip?dl=0

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

        On 09/04/2018 at 01:41, xxxxxxxx wrote:

        Hi mama,

        I think that getting the user input - filename should be done different.
        For example use: print "op[LINK_TEXTURE]: ", op[LINK_TEXTURE]

        Then you have to put into the skytag.
        Remember it is a shader.

        Hope this helps.

        -Pim

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

          On 09/04/2018 at 02:39, xxxxxxxx wrote:

          Hi,

          unfortunately MAXON's SDK Team can't help with third party plugins. We will leave this question open to our community. Another option would probably be an Octane forum.

          In our C++ docs we have a manual about shaders (creating such and modifying the parameters), so that might help a bit as well: BaseShader manual.

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

            On 09/04/2018 at 02:48, xxxxxxxx wrote:

            Below code should do the trick.
            This sets the given image file in the tag.
            However, in my demo Octane version, nothing changes, but that might be due to my Octane (un)experience or an old version.

                    if not (op[LINK_TEXTURE] is None) :
                        shd = c4d.BaseList2D(c4d.Xbitmap)
                        shd[c4d.BITMAPSHADER_FILENAME] = op[LINK_TEXTURE]
              
                        skytag[c4d.ENVIRONMENTTAG_TEXTURE] = shd
                        skytag.InsertShader(shd)
            
            1 Reply Last reply Reply Quote 0
            • First post
              Last post