Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2020-04-28 18:18:05 +0300
committerBastien Montagne <bastien@blender.org>2020-04-28 18:18:05 +0300
commit36b3690e0cd509cff4c67c6f8befa0341cfe45b4 (patch)
treed8e8dd629233b470bf4d258e80d6851657a86a0e /io_scene_obj
parent693a834eb50f13713ee71a2b7bc1114f65f02559 (diff)
OBJ: Cleeanup: keep sane logical organization of code.
Since panels of importer are defined after the operator, do the same for the exporter...
Diffstat (limited to 'io_scene_obj')
-rw-r--r--io_scene_obj/__init__.py194
1 files changed, 97 insertions, 97 deletions
diff --git a/io_scene_obj/__init__.py b/io_scene_obj/__init__.py
index cfe66283..e9fc8259 100644
--- a/io_scene_obj/__init__.py
+++ b/io_scene_obj/__init__.py
@@ -234,103 +234,6 @@ class OBJ_PT_import_geometry(bpy.types.Panel):
col.prop(operator, "use_groups_as_vgroups")
-class OBJ_PT_export_include(bpy.types.Panel):
- bl_space_type = 'FILE_BROWSER'
- bl_region_type = 'TOOL_PROPS'
- bl_label = "Include"
- bl_parent_id = "FILE_PT_operator"
-
- @classmethod
- def poll(cls, context):
- sfile = context.space_data
- operator = sfile.active_operator
-
- return operator.bl_idname == "EXPORT_SCENE_OT_obj"
-
- def draw(self, context):
- layout = self.layout
- layout.use_property_split = True
- layout.use_property_decorate = False # No animation.
-
- sfile = context.space_data
- operator = sfile.active_operator
-
- col = layout.column(heading="Limit to")
- col.prop(operator, 'use_selection')
-
- col = layout.column(heading="Objects as", align=True)
- col.prop(operator, 'use_blen_objects')
- col.prop(operator, 'group_by_object')
- col.prop(operator, 'group_by_material')
-
- layout.separator()
-
- layout.prop(operator, 'use_animation')
-
-
-class OBJ_PT_export_transform(bpy.types.Panel):
- bl_space_type = 'FILE_BROWSER'
- bl_region_type = 'TOOL_PROPS'
- bl_label = "Transform"
- bl_parent_id = "FILE_PT_operator"
-
- @classmethod
- def poll(cls, context):
- sfile = context.space_data
- operator = sfile.active_operator
-
- return operator.bl_idname == "EXPORT_SCENE_OT_obj"
-
- def draw(self, context):
- layout = self.layout
- layout.use_property_split = True
- layout.use_property_decorate = False # No animation.
-
- sfile = context.space_data
- operator = sfile.active_operator
-
- layout.prop(operator, 'global_scale')
- layout.prop(operator, 'path_mode')
- layout.prop(operator, 'axis_forward')
- layout.prop(operator, 'axis_up')
-
-
-class OBJ_PT_export_geometry(bpy.types.Panel):
- bl_space_type = 'FILE_BROWSER'
- bl_region_type = 'TOOL_PROPS'
- bl_label = "Geometry"
- bl_parent_id = "FILE_PT_operator"
- bl_options = {'DEFAULT_CLOSED'}
-
- @classmethod
- def poll(cls, context):
- sfile = context.space_data
- operator = sfile.active_operator
-
- return operator.bl_idname == "EXPORT_SCENE_OT_obj"
-
- def draw(self, context):
- layout = self.layout
- layout.use_property_split = True
- layout.use_property_decorate = False # No animation.
-
- sfile = context.space_data
- operator = sfile.active_operator
-
- layout.prop(operator, 'use_mesh_modifiers')
- # Property definition disabled, not working in 2.8 currently.
- # layout.prop(operator, 'use_mesh_modifiers_render')
- layout.prop(operator, 'use_smooth_groups')
- layout.prop(operator, 'use_smooth_groups_bitflags')
- layout.prop(operator, 'use_normals')
- layout.prop(operator, 'use_uvs')
- layout.prop(operator, 'use_materials')
- layout.prop(operator, 'use_triangles')
- layout.prop(operator, 'use_nurbs', text="Curves as NURBS")
- layout.prop(operator, 'use_vertex_groups')
- layout.prop(operator, 'keep_vertex_order')
-
-
@orientation_helper(axis_forward='-Z', axis_up='Y')
class ExportOBJ(bpy.types.Operator, ExportHelper):
"""Save a Wavefront OBJ File"""
@@ -474,6 +377,103 @@ class ExportOBJ(bpy.types.Operator, ExportHelper):
pass
+class OBJ_PT_export_include(bpy.types.Panel):
+ bl_space_type = 'FILE_BROWSER'
+ bl_region_type = 'TOOL_PROPS'
+ bl_label = "Include"
+ bl_parent_id = "FILE_PT_operator"
+
+ @classmethod
+ def poll(cls, context):
+ sfile = context.space_data
+ operator = sfile.active_operator
+
+ return operator.bl_idname == "EXPORT_SCENE_OT_obj"
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+ layout.use_property_decorate = False # No animation.
+
+ sfile = context.space_data
+ operator = sfile.active_operator
+
+ col = layout.column(heading="Limit to")
+ col.prop(operator, 'use_selection')
+
+ col = layout.column(heading="Objects as", align=True)
+ col.prop(operator, 'use_blen_objects')
+ col.prop(operator, 'group_by_object')
+ col.prop(operator, 'group_by_material')
+
+ layout.separator()
+
+ layout.prop(operator, 'use_animation')
+
+
+class OBJ_PT_export_transform(bpy.types.Panel):
+ bl_space_type = 'FILE_BROWSER'
+ bl_region_type = 'TOOL_PROPS'
+ bl_label = "Transform"
+ bl_parent_id = "FILE_PT_operator"
+
+ @classmethod
+ def poll(cls, context):
+ sfile = context.space_data
+ operator = sfile.active_operator
+
+ return operator.bl_idname == "EXPORT_SCENE_OT_obj"
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+ layout.use_property_decorate = False # No animation.
+
+ sfile = context.space_data
+ operator = sfile.active_operator
+
+ layout.prop(operator, 'global_scale')
+ layout.prop(operator, 'path_mode')
+ layout.prop(operator, 'axis_forward')
+ layout.prop(operator, 'axis_up')
+
+
+class OBJ_PT_export_geometry(bpy.types.Panel):
+ bl_space_type = 'FILE_BROWSER'
+ bl_region_type = 'TOOL_PROPS'
+ bl_label = "Geometry"
+ bl_parent_id = "FILE_PT_operator"
+ bl_options = {'DEFAULT_CLOSED'}
+
+ @classmethod
+ def poll(cls, context):
+ sfile = context.space_data
+ operator = sfile.active_operator
+
+ return operator.bl_idname == "EXPORT_SCENE_OT_obj"
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+ layout.use_property_decorate = False # No animation.
+
+ sfile = context.space_data
+ operator = sfile.active_operator
+
+ layout.prop(operator, 'use_mesh_modifiers')
+ # Property definition disabled, not working in 2.8 currently.
+ # layout.prop(operator, 'use_mesh_modifiers_render')
+ layout.prop(operator, 'use_smooth_groups')
+ layout.prop(operator, 'use_smooth_groups_bitflags')
+ layout.prop(operator, 'use_normals')
+ layout.prop(operator, 'use_uvs')
+ layout.prop(operator, 'use_materials')
+ layout.prop(operator, 'use_triangles')
+ layout.prop(operator, 'use_nurbs', text="Curves as NURBS")
+ layout.prop(operator, 'use_vertex_groups')
+ layout.prop(operator, 'keep_vertex_order')
+
+
def menu_func_import(self, context):
self.layout.operator(ImportOBJ.bl_idname, text="Wavefront (.obj)")