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:
Diffstat (limited to 'source/blender/gpencil_modifiers/intern/MOD_gpencillattice.c')
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencillattice.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencillattice.c b/source/blender/gpencil_modifiers/intern/MOD_gpencillattice.c
index 73b3c332a2e..5d5d673ca55 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencillattice.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillattice.c
@@ -10,7 +10,7 @@
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
+ * along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2017, Blender Foundation
@@ -55,9 +55,7 @@ static void initData(GpencilModifierData *md)
{
LatticeGpencilModifierData *gpmd = (LatticeGpencilModifierData *)md;
gpmd->pass_index = 0;
- gpmd->layername[0] = '\0';
- gpmd->materialname[0] = '\0';
- gpmd->vgname[0] = '\0';
+ gpmd->material = NULL;
gpmd->object = NULL;
gpmd->cache_data = NULL;
gpmd->strength = 1.0f;
@@ -65,7 +63,7 @@ static void initData(GpencilModifierData *md)
static void copyData(const GpencilModifierData *md, GpencilModifierData *target)
{
- BKE_gpencil_modifier_copyData_generic(md, target);
+ BKE_gpencil_modifier_copydata_generic(md, target);
}
static void deformStroke(GpencilModifierData *md,
@@ -80,7 +78,7 @@ static void deformStroke(GpencilModifierData *md,
if (!is_stroke_affected_by_modifier(ob,
mmd->layername,
- mmd->materialname,
+ mmd->material,
mmd->pass_index,
mmd->layer_pass,
1,
@@ -200,6 +198,15 @@ static void foreachObjectLink(GpencilModifierData *md,
walk(userData, ob, &mmd->object, IDWALK_CB_NOP);
}
+static void foreachIDLink(GpencilModifierData *md, Object *ob, IDWalkFunc walk, void *userData)
+{
+ LatticeGpencilModifierData *mmd = (LatticeGpencilModifierData *)md;
+
+ walk(userData, ob, (ID **)&mmd->material, IDWALK_CB_USER);
+
+ foreachObjectLink(md, ob, (ObjectWalkFunc)walk, userData);
+}
+
GpencilModifierTypeInfo modifierType_Gpencil_Lattice = {
/* name */ "Lattice",
/* structName */ "LatticeGpencilModifierData",
@@ -220,6 +227,6 @@ GpencilModifierTypeInfo modifierType_Gpencil_Lattice = {
/* updateDepsgraph */ updateDepsgraph,
/* dependsOnTime */ NULL,
/* foreachObjectLink */ foreachObjectLink,
- /* foreachIDLink */ NULL,
+ /* foreachIDLink */ foreachIDLink,
/* foreachTexLink */ NULL,
};