This fixes is to get everything working on the new auto load and properties system.
Also some other small fixes.
This commit is contained in:
Yusarina
2024-12-03 01:26:10 +00:00
parent fe8f5f69d5
commit 7e584e3648
10 changed files with 189 additions and 244 deletions
+13 -4
View File
@@ -99,6 +99,13 @@ class AvatarToolkitSceneProperties(PropertyGroup):
set=MaterialListBool.set_bool
)
avatar_toolkit_updater_version_list: EnumProperty(
items=get_version_list,
name="Version List",
description="List of available versions"
)
class AvatarToolkitMaterialProperties(PropertyGroup):
material_expanded: BoolProperty(
name="Expand Material",
@@ -113,11 +120,13 @@ class AvatarToolkitMaterialProperties(PropertyGroup):
)
def get_texture_node_list(self, context):
if self.use_nodes:
# Access the material through the property group's id_data
material = self.id_data
if material and material.use_nodes:
nodes = [(i.image.name if i.image else i.name+"_image",
i.image.name if i.image else "node with no image...",
i.image.name if i.image else i.name, index+1)
for index, i in enumerate(self.node_tree.nodes)
i.image.name if i.image else "node with no image...",
i.image.name if i.image else i.name, index+1)
for index, i in enumerate(material.node_tree.nodes)
if i.bl_idname == "ShaderNodeTexImage"]
if not nodes:
nodes = [("Error", "No images found", "Error", 0)]