Fix fixed-length RNA arrays to use bpy_prop_array instead of list

Fixed-length RNA array properties (e.g. lock_location, color) are
bpy_prop_array at runtime, not list. Only dynamic-length arrays were
correctly typed before.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Joseph HENRY 2026-03-31 17:38:32 +02:00
parent 35a370a412
commit 175b1bd7e5

View File

@ -2153,7 +2153,7 @@ def rna_property_to_type(prop: object) -> str:
return "mathutils.Color" return "mathutils.Color"
if prop_type == "float" and subtype == "MATRIX": if prop_type == "float" and subtype == "MATRIX":
return "mathutils.Matrix" return "mathutils.Matrix"
return f"list[{base}]" return f"bpy_prop_array[{base}]"
return RNA_TYPE_MAP.get(prop_type, prop_type) return RNA_TYPE_MAP.get(prop_type, prop_type)