1 # SPDX-License-Identifier: GPL-2.0-or-later
6 def update(texcoat
,tex_type
,node
, udim_textures
, udim_len
):
8 if (os
.path
.normpath(texcoat
[tex_type
][0]) != os
.path
.normpath(node
.image
.filepath
)):
11 for image
in bpy
.data
.images
:
12 if (os
.path
.normpath(image
.filepath
) == os
.path
.normpath(texcoat
[tex_type
][0])):
13 node
.image
.use_fake_user
= True
21 if (tex_found
== False):
22 node
.image
= bpy
.data
.images
.load(texcoat
[tex_type
][0])
24 node
.image
.source
= 'TILED'
26 for udim_index
in udim_len
:
27 if (udim_index
!= 1001):
28 node
.image
.tiles
.new(udim_index
)