Fix selection only
This commit is contained in:
parent
ae85247072
commit
8622628b09
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
__pycache__/
|
@ -123,6 +123,8 @@ class ExportB3D(bpy.types.Operator, ExportHelper):
|
||||
def execute(self, context):
|
||||
from . import export_b3d
|
||||
|
||||
export_b3d.b3d_parameters["export-selected"] = self.use_selection
|
||||
|
||||
keywords = self.as_keywords(ignore=("axis_forward",
|
||||
"axis_up",
|
||||
"filter_glob",
|
||||
|
@ -225,10 +225,10 @@ def write_texs(objects=[]):
|
||||
if objects:
|
||||
exp_obj = objects
|
||||
else:
|
||||
if b3d_parameters.get("export-selected"):
|
||||
exp_obj = [ob for ob in bpy.data.objects if ob.select]
|
||||
else:
|
||||
exp_obj = bpy.data.objects
|
||||
exp_obj = bpy.data.objects
|
||||
|
||||
if b3d_parameters.get("export-selected"):
|
||||
exp_obj = [ob for ob in exp_obj if ob.select_get()]
|
||||
|
||||
if PROGRESS: print(len(exp_obj),"TEXS")
|
||||
|
||||
@ -363,10 +363,10 @@ def write_brus(objects=[]):
|
||||
if objects:
|
||||
exp_obj = objects
|
||||
else:
|
||||
if b3d_parameters.get("export-selected"):
|
||||
exp_obj = [ob for ob in bpy.data.objects if ob.select]
|
||||
else:
|
||||
exp_obj = bpy.data.objects
|
||||
exp_obj = bpy.data.objects
|
||||
|
||||
if b3d_parameters.get("export-selected"):
|
||||
exp_obj = [ob for ob in exp_obj if ob.select_get()]
|
||||
|
||||
if PROGRESS: print(len(exp_obj),"BRUS")
|
||||
if PROGRESS_VERBOSE: progress = 0
|
||||
@ -543,10 +543,10 @@ def write_node(objects=[]):
|
||||
if objects:
|
||||
exp_obj = objects
|
||||
else:
|
||||
if b3d_parameters.get("export-selected"):
|
||||
exp_obj = [ob for ob in bpy.data.objects if ob.select]
|
||||
else:
|
||||
exp_obj = bpy.data.objects
|
||||
exp_obj = bpy.data.objects
|
||||
|
||||
if b3d_parameters.get("export-selected"):
|
||||
exp_obj = [ob for ob in exp_obj if ob.select_get()]
|
||||
|
||||
for obj in exp_obj:
|
||||
if obj.type == "MESH":
|
||||
@ -1602,6 +1602,7 @@ def save(operator,
|
||||
filepath += ".b3d"
|
||||
|
||||
obj_list = []
|
||||
# use_selection
|
||||
obj_list = bpy.data.objects
|
||||
|
||||
global the_scene
|
||||
|
Loading…
x
Reference in New Issue
Block a user