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-24 12:02:52 +0300
committerAntonioya <blendergit@gmail.com>2018-10-24 12:03:09 +0300
commite1a66201da2595b8d5afd7072a1f3730ca34d04a (patch)
tree10f4a1731e1ec56d0f0be778457c9cda6c738a5f /source/blender/gpencil_modifiers
parent341306995be6839fe091d23b511d89ad8deb616a (diff)
GP: Add layer pass index to time modifier
Diffstat (limited to 'source/blender/gpencil_modifiers')
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpenciltime.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpenciltime.c b/source/blender/gpencil_modifiers/intern/MOD_gpenciltime.c
index 0096c6c00d5..cb7e508e3db 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpenciltime.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpenciltime.c
@@ -71,7 +71,8 @@ static int remapTime(
TimeGpencilModifierData *mmd = (TimeGpencilModifierData *)md;
const int sfra = scene->r.sfra;
const int efra = scene->r.efra;
- const bool invgpl = mmd->flag & GP_SIMPLIFY_INVERT_LAYER;
+ const bool invgpl = mmd->flag & GP_TIME_INVERT_LAYER;
+ const bool invpass = mmd->flag & GP_TIME_INVERT_PASS;
/* omit if filter by layer */
if (mmd->layername[0] != '\0') {
@@ -86,6 +87,19 @@ static int remapTime(
}
}
}
+ /* verify pass */
+ if (mmd->pass_index > 0) {
+ if (invpass == false) {
+ if (gpl->pass_index != mmd->pass_index) {
+ return cfra;
+ }
+ }
+ else {
+ if (gpl->pass_index == mmd->pass_index) {
+ return cfra;
+ }
+ }
+ }
/* if fix mode, return predefined frame number */
if (mmd->mode == GP_TIME_MODE_FIX) {