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:
authorBrendon Murphy <meta.androcto1@gmail.com>2015-09-26 14:53:10 +0300
committerBrendon Murphy <meta.androcto1@gmail.com>2015-09-26 14:53:10 +0300
commitcd26c938e597d7493f3d88dfdf69346c0f8b50ee (patch)
treea02ac407968677520791171f6176becaad392ba7 /curve_simplify.py
parent9ee683f083ead8433b26a7cef43a9e2cd4014285 (diff)
fix for T46265 revert to 3d view operator
Diffstat (limited to 'curve_simplify.py')
-rw-r--r--curve_simplify.py57
1 files changed, 28 insertions, 29 deletions
diff --git a/curve_simplify.py b/curve_simplify.py
index d77c3bd0..4ed3a5b3 100644
--- a/curve_simplify.py
+++ b/curve_simplify.py
@@ -19,8 +19,8 @@
bl_info = {
"name": "Simplify Curves",
"author": "testscreenings",
- "version": (1,),
- "blender": (2, 59, 0),
+ "version": (1, 0, 1),
+ "blender": (2, 75, 0),
"location": "Search > Simplify Curves",
"description": "Simplifies 3D Curve objects and animation F-Curves",
"warning": "",
@@ -39,32 +39,9 @@ from bpy.props import *
import mathutils
import math
-from bpy.types import Header, Menu
+from bpy.types import Menu
-class GraphPanel(Header):
- bl_space_type = "GRAPH_EDITOR"
- def draw(self, context):
- layout = self.layout
-
- def invoke(self, context, event):
- context.window_manager.invoke_props_dialog(self)
- return {"RUNNING_MODAL"}
-
-def menu_func(self, context):
- self.layout.operator(GRAPH_OT_simplify.bl_idname)
-
-class CurveMenu(Menu):
- bl_space_type = "3D_VIEW"
- bl_label = "Simplify Curves"
- def draw(self, context):
- layout = self.layout
- def invoke(self, context, event):
- context.window_manager.invoke_props_dialog(self)
- return {"RUNNING_MODAL"}
-
-def menu(self, context):
- self.layout.operator("curve.simplify", text="Curve Simplify", icon="CURVE_DATA")
## Check for curve
##############################
@@ -385,6 +362,28 @@ def fcurves_simplify(context, obj, options, fcurves):
#fcurve.points.foreach_set('co', newPoints)
return
+### MENU ###
+
+class GRAPH_OT_simplifyf(bpy.types.Menu):
+ bl_space_type = "GRAPH_EDITOR"
+ bl_label = "Simplify F Curves"
+
+ def draw(self, context):
+ layout = self.layout
+
+def menu_func(self, context):
+ self.layout.operator(GRAPH_OT_simplify.bl_idname)
+
+class CurveMenu(Menu):
+ bl_space_type = "3D_VIEW"
+ bl_label = "Simplify Curves"
+
+ def draw(self, context):
+ layout = self.layout
+
+def menu(self, context):
+ self.layout.operator("curve.simplify", text="Curve Simplify", icon="CURVE_DATA")
+
#################################################
#### ANIMATION CURVES OPERATOR ##################
#################################################
@@ -489,8 +488,7 @@ class GRAPH_OT_simplify(bpy.types.Operator):
#print("-------END-------")
return {'FINISHED'}
- def invoke(self, context, event):
- return context.window_manager.invoke_popup(self, width = 100)
+
###########################
##### Curves OPERATOR #####
###########################
@@ -626,8 +624,9 @@ def unregister():
bpy.types.GRAPH_MT_channel.remove(menu_func)
bpy.types.DOPESHEET_MT_channel.remove(menu_func)
bpy.types.INFO_MT_curve_add.remove(menu)
- bpy.utils.unregister_module(__name__)
+ bpy.utils.unregister_module(__name__)
if __name__ == "__main__":
register()
+