[Bf-blender-cvs] [669fdca] master: Temp workaround: Object mode pie glitches since 'Edit Strokes' mode was introduced
Julian Eisel
noreply at git.blender.org
Tue Dec 15 15:48:21 CET 2015
Commit: 669fdca6818b78dcf68352c375df4dd7b405e6b8
Author: Julian Eisel
Date: Tue Dec 15 15:29:23 2015 +0100
Branches: master
https://developer.blender.org/rB669fdca6818b78dcf68352c375df4dd7b405e6b8
Temp workaround: Object mode pie glitches since 'Edit Strokes' mode was introduced
To ensure all items of a pie are always at the same position, invisible dummy buttons were added for unavailable items. This caused mainly two issues: Command line printed warning because of the > 8 elements, and some modes weren't visible in some cases ('Object Mode' entry was missing in stroke edit mode).
To solve this nicely, we had to support > 8 items per pie. Will look into that this week, but for now, drawing dummy buttons is disabled.
>From a user POV this has two ugly consequences: 1. While this temporary workaround is used, *some* pie items are positioned differently than before, 2. The 'Edit Strokes' mode entry might change its position depending on the amount of available modes.
===================================================================
M source/blender/editors/interface/interface_layout.c
===================================================================
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index a342b9b..4d0c4ad 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -923,7 +923,17 @@ void uiItemsFullEnumO(
target = uiLayoutColumn(split, layout->align);
}
- if (radial) {
+ if (0 && radial) {
+ /* XXX Disabled as temporary workaround!
+ *
+ * Normally, we always draw a button for all items even if they're unavailable (we draw invisible
+ * dummy buttons then), so items are always at the same position. This causes issues with current
+ * 'Object Mode' pie since more than 8 modes exist now (see T46973).
+ * Disabling this until more than 8 items per pie are supported (or a better solution is found).
+ * We should work on that ASAP though.
+ *
+ * - Julian (Dec 2015)
+ */
RNA_property_enum_items_gettexted_all(block->evil_C, &ptr, prop, &item_array, NULL, &free);
}
else {
@@ -973,6 +983,7 @@ void uiItemsFullEnumO(
}
else {
if (radial) {
+ /* invisible dummy button to ensure all items are always at the same position */
uiItemS(target);
}
else {
More information about the Bf-blender-cvs
mailing list