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-19 21:42:08 +0300
committerHans Goudey <h.goudey@me.com>2020-06-19 21:42:08 +0300
commitec963d9d7d179e3ba12f5bdf748818939c2f17d8 (patch)
tree099996a967053ba95d14eaeaa1df8d602ebbfd23 /source/blender/editors/space_buttons/space_buttons.c
parentfb7d8e2f4b87307a749537f16e80800af09cf5ae (diff)
UI: Grease Pencil Modifier Drag and Drop, Layout Changes
This patch implements the list panel system D7490 for grease pencil modifiers. It also moves their drawing to a callback in GpencilModifierTypeInfo in line with the extensible architecture refactoring goal T75724. This also adds the "set_error" function for grease pencil modifiers, which hadn't been copied from mesh modifiers yet. The implementation is basically exactly the same as for the modifier patch (9b099c86123fc82). Thanks to Matias Mendiola (mendio) for providing mockups for many of the layout changes. Differential Revision: https://developer.blender.org/D7978
Diffstat (limited to 'source/blender/editors/space_buttons/space_buttons.c')
-rw-r--r--source/blender/editors/space_buttons/space_buttons.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index 187334a5c34..2cc9679dd3f 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -30,11 +30,10 @@
#include "BLI_utildefines.h"
#include "BKE_context.h"
+#include "BKE_gpencil_modifier.h" /* Types for registering panels. */
#include "BKE_modifier.h"
#include "BKE_screen.h"
-#include "DNA_modifier_types.h"
-
#include "ED_screen.h"
#include "ED_space_api.h"
#include "ED_view3d.h" /* To draw toolbar UI. */
@@ -643,6 +642,12 @@ void ED_spacetype_buttons(void)
mti->panelRegister(art);
}
}
+ for (int i = 0; i < NUM_GREASEPENCIL_MODIFIER_TYPES; i++) {
+ const GpencilModifierTypeInfo *mti = BKE_gpencil_modifier_get_info(i);
+ if (mti != NULL && mti->panelRegister != NULL) {
+ mti->panelRegister(art);
+ }
+ }
/* regions: header */
art = MEM_callocN(sizeof(ARegionType), "spacetype buttons region");