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/blenkernel/BKE_shader_fx.h | |
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/blenkernel/BKE_shader_fx.h')
-rw-r--r-- | source/blender/blenkernel/BKE_shader_fx.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_shader_fx.h b/source/blender/blenkernel/BKE_shader_fx.h index bdc782a606e..31e14c6c884 100644 --- a/source/blender/blenkernel/BKE_shader_fx.h +++ b/source/blender/blenkernel/BKE_shader_fx.h @@ -28,6 +28,7 @@ extern "C" { #endif +struct ARegionType; struct ID; struct ListBase; struct ModifierUpdateDepsgraphContext; @@ -157,11 +158,17 @@ typedef struct ShaderFxTypeInfo { struct Object *ob, ShaderFxIDWalkFunc walk, void *userData); + + /* Register the panel types for the effect's UI. */ + void (*panelRegister)(struct ARegionType *region_type); } ShaderFxTypeInfo; +#define SHADERFX_TYPE_PANEL_PREFIX "FX_PT_" + /* Initialize global data (type info and some common global storages). */ void BKE_shaderfx_init(void); +void BKE_shaderfxType_panel_id(ShaderFxType type, char *panel_id); const ShaderFxTypeInfo *BKE_shaderfx_get_info(ShaderFxType type); struct ShaderFxData *BKE_shaderfx_new(int type); void BKE_shaderfx_free_ex(struct ShaderFxData *fx, const int flag); |