[Bf-extensions-cvs] [fc2eef3] master: NewFeature: Remove Selective Generator Modifier
Eugenio Pignataro
noreply at git.blender.org
Wed Sep 17 16:39:35 CEST 2014
Commit: fc2eef36fa176b4f31f0d2101933668206492a00
Author: Eugenio Pignataro
Date: Wed Sep 17 11:39:24 2014 -0300
Branches: master
https://developer.blender.org/rBACfc2eef36fa176b4f31f0d2101933668206492a00
NewFeature: Remove Selective Generator Modifier
===================================================================
M oscurart_mesh_cache_tools.py
===================================================================
diff --git a/oscurart_mesh_cache_tools.py b/oscurart_mesh_cache_tools.py
index 216bd6f..cc28292 100644
--- a/oscurart_mesh_cache_tools.py
+++ b/oscurart_mesh_cache_tools.py
@@ -19,6 +19,32 @@ from bpy.types import Operator
from bpy_extras.io_utils import ImportHelper
from bpy.props import StringProperty, BoolProperty, EnumProperty
+
+class ModifiersSettings(bpy.types.PropertyGroup):
+ array = bpy.props.BoolProperty(default=True)
+ bevel = bpy.props.BoolProperty(default=True)
+ boolean = bpy.props.BoolProperty(default=True)
+ build = bpy.props.BoolProperty(default=True)
+ decimate = bpy.props.BoolProperty(default=True)
+ edge_split = bpy.props.BoolProperty(default=True)
+ mask = bpy.props.BoolProperty(default=True)
+ mirror = bpy.props.BoolProperty(default=True)
+ multires = bpy.props.BoolProperty(default=True)
+ remesh = bpy.props.BoolProperty(default=True)
+ screw = bpy.props.BoolProperty(default=True)
+ skin = bpy.props.BoolProperty(default=True)
+ solidify = bpy.props.BoolProperty(default=True)
+ subsurf = bpy.props.BoolProperty(default=True)
+ triangulate = bpy.props.BoolProperty(default=True)
+ wireframe = bpy.props.BoolProperty(default=True)
+ cloth = bpy.props.BoolProperty(default=True)
+
+
+bpy.utils.register_class(ModifiersSettings) #registro PropertyGroup
+
+bpy.types.Scene.mesh_cache_tools_settings = bpy.props.PointerProperty(type=ModifiersSettings)
+
+
class View3DMCPanel():
bl_space_type = 'VIEW_3D'
bl_region_type = 'TOOLS'
@@ -45,12 +71,28 @@ class OscEPc2ExporterPanel(View3DMCPanel, bpy.types.Panel):
row.label("EXPORTER:")
row.operator("group.linked_group_to_local", text="Linked To Local", icon="LINKED")
row.operator("object.remove_subsurf_modifier", text="Remove Gen Modifiers", icon="MOD_SUBSURF")
- row.operator("export_shape.pc2_selection", text="Export!", icon="POSE_DATA")
- row.prop(bpy.context.scene, "muu_pc2_world_space", text="World Space")
- row = layout.column(align=1)
+ row.prop(bpy.context.scene.mesh_cache_tools_settings, "array", text="Array")
+ row.prop(bpy.context.scene.mesh_cache_tools_settings, "bevel", text="Bevel")
+ row.prop(bpy.context.scene.mesh_cache_tools_settings, "boolean", text="Boolean")
+ row.prop(bpy.context.scene.mesh_cache_tools_settings, "build", text="Build")
+ row.prop(bpy.context.scene.mesh_cache_tools_settings, "decimate", text="Decimate")
+ row.prop(bpy.context.scene.mesh_cache_tools_settings, "edge_split", text="Edge Split")
+ row.prop(bpy.context.scene.mesh_cache_tools_settings, "mask", text="Mask")
+ row.prop(bpy.context.scene.mesh_cache_tools_settings, "mirror", text="Mirror")
+ row.prop(bpy.context.scene.mesh_cache_tools_settings, "multires", text="Multires")
+ row.prop(bpy.context.scene.mesh_cache_tools_settings, "remesh", text="Remesh")
+ row.prop(bpy.context.scene.mesh_cache_tools_settings, "screw", text="Screw")
+ row.prop(bpy.context.scene.mesh_cache_tools_settings, "skin", text="Skin")
+ row.prop(bpy.context.scene.mesh_cache_tools_settings, "solidify", text="Solidify")
+ row.prop(bpy.context.scene.mesh_cache_tools_settings, "subsurf", text="Subsurf")
+ row.prop(bpy.context.scene.mesh_cache_tools_settings, "triangulate", text="Triangulate")
+ row.prop(bpy.context.scene.mesh_cache_tools_settings, "wireframe", text="Wireframe")
+ #row = layout.column(align=1)
row.prop(bpy.context.scene, "muu_pc2_start", text="Frame Start")
row.prop(bpy.context.scene, "muu_pc2_end", text="Frame End")
row.prop_search(bpy.context.scene, "muu_pc2_group", bpy.data, "groups", text="")
+ row.operator("export_shape.pc2_selection", text="Export!", icon="POSE_DATA")
+ row.prop(bpy.context.scene, "muu_pc2_world_space", text="World Space")
row = layout.box().column(align=1)
row.label("IMPORTER:")
row.operator("import_shape.pc2_selection", text="Import", icon="POSE_DATA")
@@ -144,7 +186,11 @@ class OscRemoveSubsurf(bpy.types.Operator):
for OBJ in bpy.data.groups[bpy.context.scene.muu_pc2_group].objects[:]:
for MOD in OBJ.modifiers[:]:
if MOD.type in GENERATE:
- OBJ.modifiers.remove(MOD)
+ if eval("bpy.context.scene.mesh_cache_tools_settings.%s" % (MOD.type.lower())):
+ print(OBJ.name)
+ print("---" + MOD.name)
+ OBJ.modifiers.remove(MOD)
+
return {'FINISHED'}
More information about the Bf-extensions-cvs
mailing list