[Bf-blender-cvs] [eb47e7e2198] greasepencil-object: Offset modifier cannot use weight

Antonio Vazquez noreply at git.blender.org
Sat Dec 9 20:59:08 CET 2017


Commit: eb47e7e2198cdb0561a994965aefeab65a214d74
Author: Antonio Vazquez
Date:   Sat Dec 9 20:58:59 2017 +0100
Branches: greasepencil-object
https://developer.blender.org/rBeb47e7e2198cdb0561a994965aefeab65a214d74

Offset modifier cannot use weight

The weight is a parameter that produces weird results.

Remove this option while find a better solution.

===================================================================

M	source/blender/modifiers/intern/MOD_gpenciloffset.c

===================================================================

diff --git a/source/blender/modifiers/intern/MOD_gpenciloffset.c b/source/blender/modifiers/intern/MOD_gpenciloffset.c
index 0806109361b..d71823fa540 100644
--- a/source/blender/modifiers/intern/MOD_gpenciloffset.c
+++ b/source/blender/modifiers/intern/MOD_gpenciloffset.c
@@ -71,7 +71,6 @@ static void deformStroke(ModifierData *md, const EvaluationContext *UNUSED(eval_
 	int vindex = defgroup_name_index(ob, mmd->vgname);
 	
 	float mat[4][4];
-	float loc[3], rot[3], scale[3];
 
 	if (!is_stroke_affected_by_modifier(
 	        mmd->layername, mmd->pass_index, 1, gpl, gps,
@@ -88,11 +87,8 @@ static void deformStroke(ModifierData *md, const EvaluationContext *UNUSED(eval_
 		if (weight < 0) {
 			continue;
 		}
-		/* calculate matrix */
-		mul_v3_v3fl(loc, mmd->loc, weight);
-		mul_v3_v3fl(rot, mmd->rot, weight);
-		mul_v3_v3fl(scale, mmd->scale, weight);
-		loc_eul_size_to_mat4(mat, loc, rot, scale);
+		/* calculate matrix (weight value cannot be used or get weird result */
+		loc_eul_size_to_mat4(mat, mmd->loc, mmd->rot, mmd->scale);
 
 		mul_m4_v3(mat, &pt->x);
 	}



More information about the Bf-blender-cvs mailing list