[fix] fix various issues

- add edit mode switch before bm export to prevent potential error
- let the default value of ZBuffer in Virtools Material become True
- fix the issue that duplicated elements adder do not understand enable option.
This commit is contained in:
2023-01-10 19:35:15 +08:00
parent e7376a3e9c
commit 7680d11c0e
5 changed files with 15 additions and 4 deletions

View File

@ -55,7 +55,7 @@ class BALLANCE_OT_add_components(bpy.types.Operator):
UTILS_functions.add_into_scene_and_move_to_cursor(obj)
# extra duplication
if self.elements_type in self.canDuplicatedElements:
if (self.elements_type in self.canDuplicatedElements) and self.elements_duplicated:
for i in range(self.elements_dup_times - 1):
obj = bpy.data.objects.new(finalObjectName, loadedMesh)
UTILS_functions.add_into_scene_and_move_to_cursor(obj)