![]() ![]() # "//" prefix is a Blender specific identifier for the current blend file # Get the active material of the object in context Just make sure Image.source is set to 'SEQUENCE' and e_auto_refresh is enabled (as mentioned by in the comments): Similar to How to load an image from disc and assign it to a newly created image texture node? you can use BlendDataImages.load() to load and assign the image (sequence) to the texture node in one go. basically the only thing changed was the auto_refresh_part The code above still has the same issues as before. Link = links.new(node_principled.outputs, node_output.inputs) Link = links.new(node_tex.outputs, node_principled.inputs) Node_output = nodes.new(type='ShaderNodeOutputMaterial') Node_tex.image = ("//textures/texture.1.jpg") Node_tex = nodes.new('ShaderNodeTexImage') Node_principled = nodes.new(type='ShaderNodeBsdfPrincipled') I changed my code to following and got this result: # new material I have texture.#.jpg images in the folder. ![]() I would like to assign an image sequence to the ShaderNodeTexImage texture_path = 'folder/texture.1.jpg' ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |