[Bf-extensions-cvs] [2c18cce5] filebrowser_redesign: X3D IO layout
William Reynish
noreply at git.blender.org
Wed Aug 21 22:45:12 CEST 2019
Commit: 2c18cce570a9dd708a3dcdacf05932b15d4564bb
Author: William Reynish
Date: Wed Aug 21 22:45:10 2019 +0200
Branches: filebrowser_redesign
https://developer.blender.org/rBA2c18cce570a9dd708a3dcdacf05932b15d4564bb
X3D IO layout
===================================================================
M io_scene_x3d/__init__.py
===================================================================
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,
)
More information about the Bf-extensions-cvs
mailing list