1 # SPDX-FileCopyrightText: 2020-2022 Blender Foundation
3 # SPDX-License-Identifier: GPL-2.0-or-later
8 def update(texcoat
,tex_type
,node
, udim_textures
, udim_len
):
10 if (os
.path
.normpath(texcoat
[tex_type
][0]) != os
.path
.normpath(node
.image
.filepath
)):
13 for image
in bpy
.data
.images
:
14 if (os
.path
.normpath(image
.filepath
) == os
.path
.normpath(texcoat
[tex_type
][0])):
15 node
.image
.use_fake_user
= True
23 if (tex_found
== False):
24 node
.image
= bpy
.data
.images
.load(texcoat
[tex_type
][0])
26 node
.image
.source
= 'TILED'
28 for udim_index
in udim_len
:
29 if (udim_index
!= 1001):
30 node
.image
.tiles
.new(udim_index
)