diff options
author | Hans Goudey <h.goudey@me.com> | 2020-06-19 22:07:13 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-06-19 22:07:13 +0300 |
commit | bb4cef71eeaf36aa61187d47b8a8ae06ba55f7c0 (patch) | |
tree | 35700820beee851c984c9162d40952387cca5e39 /source/blender/editors/space_buttons | |
parent | 702e00f91088031f83cfed1528d5ed22069a9d35 (diff) |
UI: ShaderFx Drag and Drop, Layout Updates
This patch implements the list panel system D7490 for grease pencil
shader effects. It also moves their drawing to a callback in
ShaderFxTypeInfo in line with the extensible architecture refactoring
goal T75724.
The implementation is basically exactly the same as for the modifier
patch (9b099c86123fc82).
Thanks to Matias Mendiola (@mendio) for helping to develop the layout
changes.
Differential Revision: https://developer.blender.org/D7985
Diffstat (limited to 'source/blender/editors/space_buttons')
-rw-r--r-- | source/blender/editors/space_buttons/space_buttons.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c index 2cc9679dd3f..71b86996989 100644 --- a/source/blender/editors/space_buttons/space_buttons.c +++ b/source/blender/editors/space_buttons/space_buttons.c @@ -33,6 +33,7 @@ #include "BKE_gpencil_modifier.h" /* Types for registering panels. */ #include "BKE_modifier.h" #include "BKE_screen.h" +#include "BKE_shader_fx.h" #include "ED_screen.h" #include "ED_space_api.h" @@ -648,6 +649,15 @@ void ED_spacetype_buttons(void) mti->panelRegister(art); } } + for (int i = 0; i < NUM_SHADER_FX_TYPES; i++) { + if (i == eShaderFxType_Light_deprecated) { + continue; + } + const ShaderFxTypeInfo *fxti = BKE_shaderfx_get_info(i); + if (fxti != NULL && fxti->panelRegister != NULL) { + fxti->panelRegister(art); + } + } /* regions: header */ art = MEM_callocN(sizeof(ARegionType), "spacetype buttons region"); |