diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-09-27 17:33:47 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-09-27 17:34:45 +0300 |
commit | 18262bcb1e9d12ed58efd26f315129e2966aa2a4 (patch) | |
tree | 50305abb8a43cd8ba842f5339c2dc59a8f0d599b /source | |
parent | 3da46a8d8df26d6fe5b9289ae7ebfe01f1deeda8 (diff) |
Fix missing libquery processing of ID pointers in GPencil Modifiers.
...
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/gpencil_modifier.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/library_query.c | 11 |
2 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/gpencil_modifier.c b/source/blender/blenkernel/intern/gpencil_modifier.c index ed9c6568c95..1e05a8c271c 100644 --- a/source/blender/blenkernel/intern/gpencil_modifier.c +++ b/source/blender/blenkernel/intern/gpencil_modifier.c @@ -648,7 +648,9 @@ void BKE_gpencil_modifiers_foreachIDLink(Object *ob, GreasePencilIDWalkFunc walk for (; md; md = md->next) { const GpencilModifierTypeInfo *mti = BKE_gpencil_modifierType_getInfo(md->type); - if (mti->foreachIDLink) mti->foreachIDLink(md, ob, walk, userData); + if (mti->foreachIDLink) { + mti->foreachIDLink(md, ob, walk, userData); + } else if (mti->foreachObjectLink) { /* each Object can masquerade as an ID, so this should be OK */ GreasePencilObjectWalkFunc fp = (GreasePencilObjectWalkFunc)walk; diff --git a/source/blender/blenkernel/intern/library_query.c b/source/blender/blenkernel/intern/library_query.c index 2f125beec5f..7938d82eb80 100644 --- a/source/blender/blenkernel/intern/library_query.c +++ b/source/blender/blenkernel/intern/library_query.c @@ -72,6 +72,7 @@ #include "BKE_collection.h" #include "BKE_constraint.h" #include "BKE_fcurve.h" +#include "BKE_gpencil_modifier.h" #include "BKE_idprop.h" #include "BKE_library.h" #include "BKE_library_query.h" @@ -195,6 +196,15 @@ static void library_foreach_modifiersForeachIDLink( FOREACH_FINALIZE_VOID; } +static void library_foreach_gpencil_modifiersForeachIDLink( + void *user_data, Object *UNUSED(object), ID **id_pointer, int cb_flag) +{ + LibraryForeachIDData *data = (LibraryForeachIDData *) user_data; + FOREACH_CALLBACK_INVOKE_ID_PP(data, id_pointer, cb_flag); + + FOREACH_FINALIZE_VOID; +} + static void library_foreach_constraintObjectLooper(bConstraint *UNUSED(con), ID **id_pointer, bool is_reference, void *user_data) { @@ -570,6 +580,7 @@ void BKE_library_foreach_ID_link(Main *bmain, ID *id, LibraryIDLinkCallback call } modifiers_foreachIDLink(object, library_foreach_modifiersForeachIDLink, &data); + BKE_gpencil_modifiers_foreachIDLink(object, library_foreach_gpencil_modifiersForeachIDLink, &data); BKE_constraints_id_loop(&object->constraints, library_foreach_constraintObjectLooper, &data); for (psys = object->particlesystem.first; psys; psys = psys->next) { |