Skip to content

Commit 1de7c24

Browse files
committed
Test your code ladies and gentlemen
Funny
1 parent 3e285f8 commit 1de7c24

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
*.cpython
44
*.pyc
55
*.txt
6+
hoyo2vrc_updater/Hoyo2VRC_updater_status.json

functions/model.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,9 +1257,18 @@ def convert_vertex_colors_to_uv(context: Optional[bpy.types.Context] = None,
12571257
if not context:
12581258
context = bpy.context
12591259

1260-
# Get target object
1260+
# Get target object (case insensitive)
12611261
if target_object:
1262-
obj = bpy.data.objects.get(target_object)
1262+
obj = None
1263+
# Search for object case-insensitively
1264+
for scene_obj in bpy.data.objects:
1265+
if scene_obj.name.lower() == target_object.lower():
1266+
obj = scene_obj
1267+
break
1268+
1269+
if not obj:
1270+
print(f"No object found with name '{target_object}' (case insensitive)")
1271+
return False
12631272
else:
12641273
obj = context.active_object
12651274

0 commit comments

Comments
 (0)