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:
authorAlan Odom <clockmender@icloud.com>2020-01-30 17:14:04 +0300
committerRune Morling <ermo.blender.org@spammesenseless.net>2020-02-01 18:42:39 +0300
commit88b2feac55656443c3b47a7d55751c4dfe581c52 (patch)
tree95de0d1cafbd088267e1b2fd19eb47bf3837b5c8 /precision_drawing_tools
parent877308f917482708ab85b9c29268623c8e0877b6 (diff)
PDT: Add undo option to Operators
Diffstat (limited to 'precision_drawing_tools')
-rw-r--r--precision_drawing_tools/pdt_pivot_point.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/precision_drawing_tools/pdt_pivot_point.py b/precision_drawing_tools/pdt_pivot_point.py
index fd09c42d..2f137340 100644
--- a/precision_drawing_tools/pdt_pivot_point.py
+++ b/precision_drawing_tools/pdt_pivot_point.py
@@ -42,6 +42,7 @@ class PDT_OT_ModalDrawOperator(bpy.types.Operator):
bl_idname = "pdt.modaldraw"
bl_label = "PDT Modal Draw"
+ bl_options = {"REGISTER", "UNDO"}
_handle = None # keep function handler
@@ -113,6 +114,7 @@ class PDT_OT_ViewPlaneRotate(Operator):
bl_idname = "pdt.viewplanerot"
bl_label = "PDT View Rotate"
+ bl_options = {"REGISTER", "UNDO"}
@classmethod
def poll(cls, context):
@@ -167,6 +169,7 @@ class PDT_OT_ViewPlaneScale(Operator):
bl_idname = "pdt.viewscale"
bl_label = "PDT View Scale"
+ bl_options = {"REGISTER", "UNDO"}
@classmethod
def poll(cls, context):
@@ -226,6 +229,7 @@ class PDT_OT_PivotToCursor(Operator):
bl_idname = "pdt.pivotcursor"
bl_label = "PDT Pivot To Cursor"
+ bl_options = {"REGISTER", "UNDO"}
def execute(self, context):
"""Moves Pivot Point to Cursor Location.
@@ -250,6 +254,7 @@ class PDT_OT_CursorToPivot(Operator):
bl_idname = "pdt.cursorpivot"
bl_label = "PDT Cursor To Pivot"
+ bl_options = {"REGISTER", "UNDO"}
def execute(self, context):
"""Moves Cursor to Pivot Point Location.
@@ -274,6 +279,7 @@ class PDT_OT_PivotSelected(Operator):
bl_idname = "pdt.pivotselected"
bl_label = "PDT Pivot to Selected"
+ bl_options = {"REGISTER", "UNDO"}
@classmethod
def poll(cls, context):
@@ -325,6 +331,7 @@ class PDT_OT_PivotOrigin(Operator):
bl_idname = "pdt.pivotorigin"
bl_label = "PDT Pivot to Object Origin"
+ bl_options = {"REGISTER", "UNDO"}
@classmethod
def poll(cls, context):
@@ -362,6 +369,7 @@ class PDT_OT_PivotWrite(Operator):
bl_idname = "pdt.pivotwrite"
bl_label = "PDT Write PP to Object?"
+ bl_options = {"REGISTER", "UNDO"}
@classmethod
def poll(cls, context):
@@ -409,6 +417,7 @@ class PDT_OT_PivotRead(Operator):
bl_idname = "pdt.pivotread"
bl_label = "PDT Read PP"
+ bl_options = {"REGISTER", "UNDO"}
@classmethod
def poll(cls, context):