Skip to content

Commit bff176b

Browse files
committed
Custom props update
1 parent a17cf1d commit bff176b

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

BEngine-Py/bengine/Utils/BEUtils.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -606,14 +606,21 @@ def GetCustomAttrib(attrib, float_attribs: dict, vector_attribs: dict, color_att
606606
attrib_type = type(attrib)
607607
attrib_val = None
608608

609-
if (attrib_type is bpy.types.FloatVectorAttributeValue):
609+
# Vector
610+
if (attrib_type is bpy.types.FloatVectorAttributeValue or attrib_type is bpy.types.Float2AttributeValue):
610611
attrib_val = attrib.vector
611-
vector_attribs[attrib_name] = tuple(attrib_val)
612612

613+
if (attrib_type is bpy.types.FloatVectorAttributeValue):
614+
vector_attribs[attrib_name] = tuple(attrib_val)
615+
else:
616+
vector_attribs[attrib_name] = (attrib_val[0], attrib_val[1], 0)
617+
618+
# Color
613619
elif (attrib_type is bpy.types.FloatColorAttributeValue or attrib_type is bpy.types.ByteColorAttributeValue):
614620
attrib_val = attrib.color
615621
color_attribs[attrib_name] = tuple(attrib_val)
616622

623+
# Float
617624
elif (attrib_type is bpy.types.BoolAttributeValue or attrib_type is bpy.types.IntAttributeValue
618625
or attrib_type is bpy.types.FloatAttributeValue):
619626
attrib_val = attrib.value

0 commit comments

Comments
 (0)