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-26 13:52:00 +0300
committerRune Morling <ermo.blender.org@spammesenseless.net>2020-02-01 18:41:11 +0300
commit4d0298a3f9240cff351f7225819f55dbe29836a9 (patch)
tree1235ad364455bfc6809e55f93d4d916c3842b718 /pdt_exception.py
parent0e62a382183b02799dda7e48d5a3f97dd2321be9 (diff)
PDT: Refactor - Stage 4
- Check Object Mode is either EDIT or OBJECT as appropriate. - Change If loop to check command values - error if D, E, For M commands. - Remove surplus command check in command_maths function. - Added import of exceptions file. - Check for Mesh Objects in Object or Edit Mode first and exit with error message if not. - Some minor changes for obscure failures in unusual circumstances. - Fixes and changes to code to correct minor errors and remove unnecessary checks. - Refactored Command File structure. - Add more checks to Fillet Operation to check selection and make sure current selected vertices/edges are always used. Previous version could use wrong selection if Bmesh SelectHistory was in place for Faces, or Edges.
Diffstat (limited to 'pdt_exception.py')
-rw-r--r--pdt_exception.py68
1 files changed, 68 insertions, 0 deletions
diff --git a/pdt_exception.py b/pdt_exception.py
new file mode 100644
index 00000000..4287974b
--- /dev/null
+++ b/pdt_exception.py
@@ -0,0 +1,68 @@
+# ***** BEGIN GPL LICENSE BLOCK *****
+#
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ***** END GPL LICENCE BLOCK *****
+
+# -----------------------------------------------------------------------
+# Author: Alan Odom (Clockmender), Rune Morling (ermo) Copyright (c) 2019
+# -----------------------------------------------------------------------
+#
+# Exception Routines
+
+
+class SelectionError(Exception):
+ pass
+
+
+class InvalidVector(Exception):
+ pass
+
+
+class CommandFailure(Exception):
+ pass
+
+
+class ObjectMode(Exception):
+ pass
+
+
+class MathsError(Exception):
+ pass
+
+
+class InfRadius(Exception):
+ pass
+
+
+class NoObjectError(Exception):
+ pass
+
+
+class IntersectionError(Exception):
+ pass
+
+
+class InvalidOperation(Exception):
+ pass
+
+
+class VerticesConnected(Exception):
+ pass
+
+
+class InvalidAngle(Exception):
+ pass