Announcement

Collapse
No announcement yet.

How to assing a texture to a "Image File Texture"-node through python?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to assing a texture to a "Image File Texture"-node through python?

    Hi,
    I'm currently writing a script in which I create a bunch of "Image File Texture"-nodes and plug them into the Standard Material. Everything works without any issues, except I don't know how to assign a loaded texture to the "Image File Texture"-node.
    In Cycles it's pretty easy: I just get a reference to the Texture node and then assign it to the image property

    textureNode.image = bpy.data.images.load("pathToImage")

    but I don't know which property I have to assign it to in V-ray.

    Any help would be appreciated.

  • #2
    Ok, nevermind. I figured it out.
    It's
    textureNode.texture.image = bpy.data.images.load("pathToImage")

    Comment


    • #3
      Good you are making python scripts for Vray for Blender, if it help us please share your script /addon I do the same: http://forums.chaosgroup.com/showthr...er-Panel-Addon
      Win11 Pro 64bit, GTX 970, Standalone version: V-Ray Next 4.30.03,

      Comment

      Working...
      X