]> git.tdb.fi Git - libs/gl.git/commitdiff
Rename visible_collections to visible_only
authorMikko Rasa <tdb@tdb.fi>
Thu, 15 Apr 2021 17:44:27 +0000 (20:44 +0300)
committerMikko Rasa <tdb@tdb.fi>
Thu, 15 Apr 2021 21:31:36 +0000 (00:31 +0300)
It was kinda confusing when there's also collection files.

blender/io_mspgl/__init__.py
blender/io_mspgl/export_scene.py

index 8de91d25a7ddb91b795c9c53daed4387df9a41db..13375e2426795d4995e1505987210dd3c4f75476 100644 (file)
@@ -111,7 +111,7 @@ class ExportMspGLScene(bpy.types.Operator, ExportMspGLBase):
        filename_ext = ".scene"
 
        selected_only: bpy.props.BoolProperty(name="Selected objects only", description="Only export the selected objects")
-       visible_collections: bpy.props.BoolProperty(name="Visible collections only", description="Only export objects in visible collections", default=True)
+       visible_only: bpy.props.BoolProperty(name="Visible only", description="Only export objects in visible collections", default=True)
        resource_collection: bpy.props.BoolProperty(name="Resource collection", description="Put resources to a single collection file", default=True)
        skip_existing: bpy.props.BoolProperty(name="Skip existing files", description="Skip resources that already exist as files", default=True)
 
@@ -122,7 +122,7 @@ class ExportMspGLScene(bpy.types.Operator, ExportMspGLBase):
        def draw(self, context):
                col = self.layout.column()
                col.prop(self, "selected_only")
-               col.prop(self, "visible_collections")
+               col.prop(self, "visible_only")
                col.prop(self, "resource_collection")
                if self.resource_collection:
                        col.prop(self, "skip_existing")
index 1dea4b2416b5a7c0d46952570b19448d4be930e9..9590fc178563609a5762cc26d81f3345a75ddb07 100644 (file)
@@ -4,7 +4,7 @@ import os
 class SceneExporter:
        def __init__(self):
                self.selected_only = False
-               self.visible_collections = True
+               self.visible_only = True
                self.resource_collection = True
                self.skip_existing = True
                self.show_progress = True
@@ -14,7 +14,7 @@ class SceneExporter:
                        objs = context.selected_objects
                else:
                        objs = context.scene.objects
-               if self.visible_collections:
+               if self.visible_only:
                        collections = [c.collection for c in context.view_layer.layer_collection.children if not (c.hide_viewport or c.collection.hide_viewport)]
                        objs = [o for o in objs if any((o.name in c.all_objects) for c in collections)]
                objs = [o for o in objs if o.type=="MESH" and not o.lod_for_parent and o.data.vertices]