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:
authorWilliam Reynish <billrey@me.com>2019-08-21 23:45:10 +0300
committerWilliam Reynish <billrey@me.com>2019-08-21 23:45:10 +0300
commit2c18cce570a9dd708a3dcdacf05932b15d4564bb (patch)
treeead301ddde0e11c4ef0429f0d0ccb7eba2f18b2a
parent677e5ea2ea223e1a5c85e8d0203c7c9f66f037a1 (diff)
X3D IO layout
-rw-r--r--io_scene_x3d/__init__.py115
1 files changed, 115 insertions, 0 deletions
diff --git a/io_scene_x3d/__init__.py b/io_scene_x3d/__init__.py
index 4af6a652..70b67ba6 100644
--- a/io_scene_x3d/__init__.py
+++ b/io_scene_x3d/__init__.py
@@ -78,6 +78,89 @@ class ImportX3D(bpy.types.Operator, ImportHelper):
return import_x3d.load(context, **keywords)
+ def draw(self, context):
+ pass
+
+
+class X3D_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_x3d"
+
+ 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_selection")
+ layout.prop(operator, "use_hierarchy")
+ layout.prop(operator, "name_decorations")
+ layout.prop(operator, "use_h3d")
+
+
+class X3D_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_x3d"
+
+ 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, "axis_forward")
+ layout.prop(operator, "axis_up")
+
+
+class X3D_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"
+
+ @classmethod
+ def poll(cls, context):
+ sfile = context.space_data
+ operator = sfile.active_operator
+
+ return operator.bl_idname == "EXPORT_SCENE_OT_x3d"
+
+ 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")
+ layout.prop(operator, "use_triangulate")
+ layout.prop(operator, "use_normals")
+ layout.prop(operator, "use_compress")
+
@orientation_helper(axis_forward='Z', axis_up='Y')
class ExportX3D(bpy.types.Operator, ExportHelper):
@@ -157,6 +240,34 @@ class ExportX3D(bpy.types.Operator, ExportHelper):
return export_x3d.save(context, **keywords)
+ def draw(self, context):
+ pass
+
+
+class X3D_PT_import_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 == "IMPORT_SCENE_OT_x3d"
+
+ 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, "axis_forward")
+ layout.prop(operator, "axis_up")
+
def menu_func_import(self, context):
self.layout.operator(ImportX3D.bl_idname,
@@ -170,7 +281,11 @@ def menu_func_export(self, context):
classes = (
ExportX3D,
+ X3D_PT_export_include,
+ X3D_PT_export_transform,
+ X3D_PT_export_geometry,
ImportX3D,
+ X3D_PT_import_transform,
)