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/blenkernel/BKE_gpencil_modifier.h
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/blenkernel/BKE_gpencil_modifier.h')
-rw-r--r--source/blender/blenkernel/BKE_gpencil_modifier.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_gpencil_modifier.h b/source/blender/blenkernel/BKE_gpencil_modifier.h
index 966d3a98234..ac5f4607838 100644
--- a/source/blender/blenkernel/BKE_gpencil_modifier.h
+++ b/source/blender/blenkernel/BKE_gpencil_modifier.h
@@ -20,12 +20,14 @@
* \ingroup bke
*/
+#include "BLI_compiler_attrs.h"
#include "DNA_gpencil_modifier_types.h" /* needed for all enum typdefs */
#ifdef __cplusplus
extern "C" {
#endif
+struct ARegionType;
struct Depsgraph;
struct GpencilModifierData;
struct ID;
@@ -255,11 +257,17 @@ typedef struct GpencilModifierTypeInfo {
struct Object *ob,
GreasePencilTexWalkFunc walk,
void *userData);
+
+ /* Register the panel types for the modifier's UI. */
+ void (*panelRegister)(struct ARegionType *region_type);
} GpencilModifierTypeInfo;
+#define GPENCIL_MODIFIER_TYPE_PANEL_PREFIX "MOD_PT_gpencil_"
+
/* Initialize modifier's global data (type info and some common global storages). */
void BKE_gpencil_modifier_init(void);
+void BKE_gpencil_modifierType_panel_id(GpencilModifierType type, char *r_idname);
const GpencilModifierTypeInfo *BKE_gpencil_modifier_get_info(GpencilModifierType type);
struct GpencilModifierData *BKE_gpencil_modifier_new(int type);
void BKE_gpencil_modifier_free_ex(struct GpencilModifierData *md, const int flag);
@@ -276,6 +284,8 @@ void BKE_gpencil_modifier_copydata(struct GpencilModifierData *md,
void BKE_gpencil_modifier_copydata_ex(struct GpencilModifierData *md,
struct GpencilModifierData *target,
const int flag);
+void BKE_gpencil_modifier_set_error(struct GpencilModifierData *md, const char *format, ...)
+ ATTR_PRINTF_FORMAT(2, 3);
void BKE_gpencil_modifiers_foreach_ID_link(struct Object *ob,
GreasePencilIDWalkFunc walk,
void *userData);