[Bf-blender-cvs] [462c69d2889] greasepencil-object: Rename function and fix wrong pointer increment

Antonioya noreply at git.blender.org
Thu Aug 23 10:34:40 CEST 2018


Commit: 462c69d28890271e7799e4589e57e02918a9c84b
Author: Antonioya
Date:   Wed Aug 22 22:59:52 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB462c69d28890271e7799e4589e57e02918a9c84b

Rename function and fix wrong pointer increment

The change done in previous cleanup broken the function.

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

M	source/blender/editors/gpencil/gpencil_armature.c

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

diff --git a/source/blender/editors/gpencil/gpencil_armature.c b/source/blender/editors/gpencil/gpencil_armature.c
index b8a5c81d9ca..dfe36a65d68 100644
--- a/source/blender/editors/gpencil/gpencil_armature.c
+++ b/source/blender/editors/gpencil/gpencil_armature.c
@@ -113,7 +113,7 @@ static int gpencil_bone_looper(
 	return count;
 }
 
-static int bone_skinnable_cb(Object *UNUSED(ob), Bone *bone, void *datap)
+static int gpencil_bone_skinnable_cb(Object *UNUSED(ob), Bone *bone, void *datap)
 {
 	/* Bones that are deforming
 	 * are regarded to be "skinnable" and are eligible for
@@ -157,7 +157,7 @@ static int bone_skinnable_cb(Object *UNUSED(ob), Bone *bone, void *datap)
 
 				for (a = 0; a < segments; a++) {
 					**hbone = bone;
-					*hbone++;
+					++*hbone;
 				}
 			}
 			return segments;
@@ -237,7 +237,7 @@ static int dgroup_skinnable_cb(Object *ob, Bone *bone, void *datap)
 
 				for (a = 0; a < segments; a++) {
 					**hgroup = defgroup;
-					*hgroup++;
+					++*hgroup;
 				}
 			}
 			return segments;
@@ -287,7 +287,7 @@ static void gpencil_add_verts_to_dgroups(
 	looper_data.list = NULL;
 
 	/* count the number of skinnable bones */
-	numbones = gpencil_bone_looper(ob, arm->bonebase.first, &looper_data, bone_skinnable_cb);
+	numbones = gpencil_bone_looper(ob, arm->bonebase.first, &looper_data, gpencil_bone_skinnable_cb);
 
 	if (numbones == 0)
 		return;
@@ -296,7 +296,7 @@ static void gpencil_add_verts_to_dgroups(
 	 * and fill it with all of the skinnable bones */
 	bonelist = MEM_callocN(numbones * sizeof(Bone *), "bonelist");
 	looper_data.list = bonelist;
-	gpencil_bone_looper(ob, arm->bonebase.first, &looper_data, bone_skinnable_cb);
+	gpencil_bone_looper(ob, arm->bonebase.first, &looper_data, gpencil_bone_skinnable_cb);
 
 	/* create an array of pointers to the deform groups that
 	 * correspond to the skinnable bones (creating them



More information about the Bf-blender-cvs mailing list