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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2009-11-29 04:49:22 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-11-29 04:49:22 +0300
commit36cbf42e5d0806d3b94163517e953d1e1f0e2cf4 (patch)
tree439828de04da52498b13d53e986fc2039c20e7c5 /release/scripts/io/export_ply.py
parent03c897da1bd1c0c41e0263788387149da5baa9f6 (diff)
Draw function for operators (just like panels), used for the redo popup, file selector and redo tool panel.
Used for ply export & select pattern.
Diffstat (limited to 'release/scripts/io/export_ply.py')
-rw-r--r--release/scripts/io/export_ply.py21
1 files changed, 16 insertions, 5 deletions
diff --git a/release/scripts/io/export_ply.py b/release/scripts/io/export_ply.py
index 50cb3134f83..f9720be4646 100644
--- a/release/scripts/io/export_ply.py
+++ b/release/scripts/io/export_ply.py
@@ -263,9 +263,9 @@ class ExportPLY(bpy.types.Operator):
path = StringProperty(name="File Path", description="File path used for exporting the PLY file", maxlen= 1024, default= "")
use_modifiers = BoolProperty(name="Apply Modifiers", description="Apply Modifiers to the exported mesh", default= True)
- use_normals = BoolProperty(name="Export Normals", description="Export Normals for smooth and hard shaded faces", default= True)
- use_uvs = BoolProperty(name="Export UVs", description="Exort the active UV layer", default= True)
- use_colors = BoolProperty(name="Export Vertex Colors", description="Exort the active vertex color layer", default= True)
+ use_normals = BoolProperty(name="Normals", description="Export Normals for smooth and hard shaded faces", default= True)
+ use_uvs = BoolProperty(name="UVs", description="Exort the active UV layer", default= True)
+ use_colors = BoolProperty(name="Vertex Colors", description="Exort the active vertex color layer", default= True)
def poll(self, context):
@@ -291,14 +291,25 @@ class ExportPLY(bpy.types.Operator):
wm.add_fileselect(self)
return ('RUNNING_MODAL',)
+ def draw(self, context):
+ layout = self.layout
+ props = self.properties
+
+ row = layout.row()
+ row.prop(props, "use_modifiers")
+ row.prop(props, "use_normals")
+ row = layout.row()
+ row.prop(props, "use_uvs")
+ row.prop(props, "use_colors")
+
bpy.ops.add(ExportPLY)
import dynamic_menu
def menu_func(self, context):
- default_path = bpy.data.filename.replace(".blend", ".ply")
- self.layout.operator(ExportPLY.bl_idname, text="Stanford (.ply)...").path = default_path
+ default_path = bpy.data.filename.replace(".blend", ".ply")
+ self.layout.operator(ExportPLY.bl_idname, text="Stanford (.ply)...").path = default_path
menu_item = dynamic_menu.add(bpy.types.INFO_MT_file_export, menu_func)