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:
authorAntonioya <blendergit@gmail.com>2018-10-22 19:25:13 +0300
committerAntonioya <blendergit@gmail.com>2018-10-22 19:30:26 +0300
commite010d5e3b1b2110afd83c37d321b358692a478a8 (patch)
tree0b654df668a5b81693773764d2ac58263af1d9df /source/blender/blenkernel/BKE_gpencil_modifier.h
parent4bf4da12de92989d5708be8b6f14c3536e872836 (diff)
GP: New Time modifier
This modifier allows to offset the keyframe animated to get more variations in the animation when reuse the same datablock.
Diffstat (limited to 'source/blender/blenkernel/BKE_gpencil_modifier.h')
-rw-r--r--source/blender/blenkernel/BKE_gpencil_modifier.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_gpencil_modifier.h b/source/blender/blenkernel/BKE_gpencil_modifier.h
index cce1d4b0a4a..5efc390015c 100644
--- a/source/blender/blenkernel/BKE_gpencil_modifier.h
+++ b/source/blender/blenkernel/BKE_gpencil_modifier.h
@@ -83,6 +83,8 @@ typedef enum {
/* can't be added manually by user */
eGpencilModifierTypeFlag_NoUserAdd = (1 << 5),
+ /* can't be applied */
+ eGpencilModifierTypeFlag_NoApply = (1 << 6),
} GpencilModifierTypeFlag;
/* IMPORTANT! Keep ObjectWalkFunc and IDWalkFunc signatures compatible. */
@@ -150,8 +152,18 @@ typedef struct GpencilModifierTypeInfo {
void (*bakeModifier)(struct Main *bmain, struct Depsgraph *depsgraph,
struct GpencilModifierData *md, struct Object *ob);
+
/********************* Optional functions *********************/
+ /* Callback for GP "time" modifiers that offset keyframe time
+ * Returns the frame number to be used after apply the modifier. This is
+ * usually an offset of the animation for duplicated datablocks.
+ *
+ * This function is optional.
+ */
+ int (*remapTime)(struct GpencilModifierData *md, struct Depsgraph *depsgraph,
+ struct Scene *scene, struct Object *ob, struct bGPDlayer *gpl, int cfra);
+
/* Initialize new instance data for this modifier type, this function
* should set modifier variables to their default values.
*
@@ -242,6 +254,7 @@ void BKE_gpencil_modifiers_foreachIDLink(struct Object *ob, GreasePencilIDWalkFu
void BKE_gpencil_modifiers_foreachTexLink(struct Object *ob, GreasePencilTexWalkFunc walk, void *userData);
bool BKE_gpencil_has_geometry_modifiers(struct Object *ob);
+bool BKE_gpencil_has_time_modifiers(struct Object *ob);
void BKE_gpencil_stroke_modifiers(
struct Depsgraph *depsgraph, struct Object *ob,
@@ -249,6 +262,9 @@ void BKE_gpencil_stroke_modifiers(
void BKE_gpencil_geometry_modifiers(
struct Depsgraph *depsgraph, struct Object *ob,
struct bGPDlayer *gpl, struct bGPDframe *gpf, bool is_render);
+int BKE_gpencil_time_modifier(
+ struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob,
+ struct bGPDlayer *gpl, int cfra, bool is_render);
void BKE_gpencil_lattice_init(struct Object *ob);
void BKE_gpencil_lattice_clear(struct Object *ob);