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:
authorHans Goudey <h.goudey@me.com>2020-06-05 17:41:03 +0300
committerHans Goudey <h.goudey@me.com>2020-06-05 17:41:03 +0300
commit9b099c86123fc828a194c59ce5b8bbf5a56f9cdb (patch)
tree38937711643f5816881710debd93df2d28cf9675 /source/blender/blenkernel/BKE_modifier.h
parent4e70e0e384c08d2d4b021758347aeb5e7a1da0dc (diff)
UI: Drag and Drop Modifiers, Layout Updates
This patch implements the list panel system D7490 for modifiers. It also moves modifier drawing to a callback in ModifierTypeInfo in line with the extensible architecture refactoring goal T75724. This adds a PanelRegister callback and utilities for registering panels and subpanels. It also adds the callbacks for expansion saving and drag and drop reordering described in D7490. These utilities, callbacks, and other common UI elements shared between modifiers live in MOD_ui_common.c. Because modifier buttons are now in panels, we can make use of subpanels for organization. The UI layouts also use the single column layout style consistently used elsewhere in Blender. Additionally, the mode-setting buttons are aligned and ordered consistently with the outliner. However, the large number of UI changes in this patch may mean that additional polishing is required in master. Thanks to William Reynish (@billreynish) who did a fair amount of the layout work and to Julian Eisel (@Severin) for consistent help. Differential Revision: https://developer.blender.org/D7498
Diffstat (limited to 'source/blender/blenkernel/BKE_modifier.h')
-rw-r--r--source/blender/blenkernel/BKE_modifier.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h
index ad67ee290b0..e4cf7d44f05 100644
--- a/source/blender/blenkernel/BKE_modifier.h
+++ b/source/blender/blenkernel/BKE_modifier.h
@@ -28,6 +28,7 @@
extern "C" {
#endif
+struct ARegionType;
struct BMEditMesh;
struct CustomData_MeshMasks;
struct DepsNodeHandle;
@@ -351,13 +352,22 @@ typedef struct ModifierTypeInfo {
* more like "ensure the data is freed".
*/
void (*freeRuntimeData)(void *runtime_data);
+
+ /* Register the panel types for the modifier's UI. */
+ void (*panelRegister)(struct ARegionType *region_type);
} ModifierTypeInfo;
+/* Used to find a modifier's panel type. */
+#define MODIFIER_TYPE_PANEL_PREFIX "MOD_PT_"
+
/* Initialize modifier's global data (type info and some common global storages). */
void BKE_modifier_init(void);
const ModifierTypeInfo *BKE_modifier_get_info(ModifierType type);
+/* For modifier UI panels. */
+void BKE_modifier_type_panel_id(ModifierType type, char *r_idname);
+
/* Modifier utility calls, do call through type pointer and return
* default values if pointer is optional.
*/