[Bf-blender-cvs] [404a427] master: Minor corrections for previous commit

Julian Eisel noreply at git.blender.org
Sun Sep 18 21:56:11 CEST 2016


Commit: 404a427dfdee0f5300b7c4f375cd7ff4a0b8bc8e
Author: Julian Eisel
Date:   Sun Sep 18 21:54:24 2016 +0200
Branches: master
https://developer.blender.org/rB404a427dfdee0f5300b7c4f375cd7ff4a0b8bc8e

Minor corrections for previous commit

Was using wrong argument name in doxygen comment. Also reduced scope of vars.

Sorry for the noise :/

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

M	source/blender/blenlib/intern/listbase.c
M	source/blender/editors/armature/pose_group.c

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

diff --git a/source/blender/blenlib/intern/listbase.c b/source/blender/blenlib/intern/listbase.c
index e72eff5..d6c0219 100644
--- a/source/blender/blenlib/intern/listbase.c
+++ b/source/blender/blenlib/intern/listbase.c
@@ -343,12 +343,12 @@ void BLI_insertlinkbefore(ListBase *listbase, void *vnextlink, void *vnewlink)
 }
 
 /**
- * Reinsert \a link relative to its current position but offset by \a step. Doesn't move
+ * Reinsert \a vlink relative to its current position but offset by \a step. Doesn't move
  * item if new position would exceed list (could optionally move to head/tail).
  *
  * \param step: Absolute value defines step size, sign defines direction. E.g pass -1
- *              to move \a link before previous, or 1 to move behind next.
- * \return If position of \a link has changed.
+ *              to move \a vlink before previous, or 1 to move behind next.
+ * \return If position of \a vlink has changed.
  */
 bool BLI_listbase_link_move(ListBase *listbase, void *vlink, int step)
 {
diff --git a/source/blender/editors/armature/pose_group.c b/source/blender/editors/armature/pose_group.c
index 85cff2e..c492772 100644
--- a/source/blender/editors/armature/pose_group.c
+++ b/source/blender/editors/armature/pose_group.c
@@ -292,7 +292,6 @@ static int group_move_exec(bContext *C, wmOperator *op)
 	bPoseChannel *pchan;
 	bActionGroup *grp;
 	int dir = RNA_enum_get(op->ptr, "direction");
-	int grpIndexA, grpIndexB;
 
 	if (ELEM(NULL, ob, pose))
 		return OPERATOR_CANCELLED;
@@ -305,9 +304,10 @@ static int group_move_exec(bContext *C, wmOperator *op)
 		return OPERATOR_CANCELLED;
 
 	/* move bone group */
-	grpIndexA = pose->active_group;
 	if (BLI_listbase_link_move(&pose->agroups, grp, dir)) {
-		grpIndexB = grpIndexA + dir;
+		int grpIndexA = pose->active_group;
+		int grpIndexB = grpIndexA + dir;
+
 		pose->active_group += dir;
 		/* fix changed bone group indices in bones (swap grpIndexA with grpIndexB) */
 		for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {




More information about the Bf-blender-cvs mailing list