fix loading and bm import/export error

This commit is contained in:
2022-04-04 11:30:04 +08:00
parent e264c85a04
commit c40f956771
6 changed files with 42 additions and 40 deletions

View File

@ -12,7 +12,7 @@ class BALLANCE_OT_add_components(bpy.types.Operator):
elements_type: bpy.props.EnumProperty(
name="Type",
description="This element type",
items=tuple(map(lambda x: (x, x, ""), UTILS_constants.componentList)),
items=tuple(map(lambda x: (x, x, ""), UTILS_constants.bmfile_componentList)),
)
attentionElements = ["PC_TwoFlames", "PR_Resetpoint"]
@ -37,7 +37,7 @@ class BALLANCE_OT_add_components(bpy.types.Operator):
# create object
loadedMesh = UTILS_functions.load_component(
UTILS_constants.componentList.index(self.elements_type))
UTILS_constants.bmfile_componentList.index(self.elements_type))
obj = bpy.data.objects.new(finalObjectName, loadedMesh)
UTILS_functions.add_into_scene_and_move_to_cursor(obj)