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:
authorAntony Riakiotakis <kalast@gmail.com>2014-10-10 21:13:40 +0400
committerAntony Riakiotakis <kalast@gmail.com>2014-10-13 16:35:41 +0400
commit9fcc1a32df1377d22b950854fabc7af53a67b813 (patch)
treefb11bec4ed32bf7703fefad1551390f4c62ca280 /release/scripts/modules/bpy_types.py
parent116439ed91dd313fdc30c93b5d76807b7473ad39 (diff)
Pie menus: Confirm threshold
This commit adds a confirm threshold property to pie menus. Basically, this will confirm the pie menu automatically when the distance from the center of the pie exceeds that threshold without a need to release the pie button. The confirm threshold will only work if it is larger than the pie threshold. The confirmation actually occur when the mouse stops moving, to allow multiple pie menus to be better linked together, (see below) This functionality also facilitates the ability for chained pie menus by dragging. Basically, a pie menu item can be a call_menu_pie operator and the new pie menu will still use the original pie menu release event for confirmation. This should allow for quick, gesture based navigation in pie menu hierarchies (going back in the hierarchy is still not supported though) There will be a demonstration pie in the official add-on soon
Diffstat (limited to 'release/scripts/modules/bpy_types.py')
-rw-r--r--release/scripts/modules/bpy_types.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py
index e19766310ec..c7ec7e1e54a 100644
--- a/release/scripts/modules/bpy_types.py
+++ b/release/scripts/modules/bpy_types.py
@@ -144,10 +144,11 @@ class WindowManager(bpy_types.ID):
import bpy
pie = self.piemenu_begin__internal(title, icon, event)
- try:
- draw_func(pie, bpy.context)
- finally:
- self.piemenu_end__internal(pie)
+ if pie:
+ try:
+ draw_func(pie, bpy.context)
+ finally:
+ self.piemenu_end__internal(pie)
class _GenericBone: