[Bf-blender-cvs] [aa0380a6a53] master: Cleanup: Remove G.main from framechange_poses_clear_unkeyed()
Sergey Sharybin
noreply at git.blender.org
Fri May 4 15:18:50 CEST 2018
Commit: aa0380a6a53033a23b589cbb21708855b8523f49
Author: Sergey Sharybin
Date: Fri May 4 14:57:31 2018 +0200
Branches: master
https://developer.blender.org/rBaa0380a6a53033a23b589cbb21708855b8523f49
Cleanup: Remove G.main from framechange_poses_clear_unkeyed()
===================================================================
M source/blender/blenkernel/BKE_action.h
M source/blender/blenkernel/intern/action.c
===================================================================
diff --git a/source/blender/blenkernel/BKE_action.h b/source/blender/blenkernel/BKE_action.h
index f7ebe85bcef..1fda7f07343 100644
--- a/source/blender/blenkernel/BKE_action.h
+++ b/source/blender/blenkernel/BKE_action.h
@@ -186,7 +186,7 @@ bool BKE_pose_channel_in_IK_chain(struct Object *ob, struct bPoseChannel *pchan)
/* clears BONE_UNKEYED flags for frame changing */
// XXX to be deprecated for a more general solution in animsys...
-void framechange_poses_clear_unkeyed(void);
+void framechange_poses_clear_unkeyed(struct Main *bmain);
/* Bone Groups API --------------------- */
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index c06a1a8106c..9823a501092 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -1009,7 +1009,7 @@ void BKE_pose_tag_update_constraint_flags(bPose *pose)
* This should only be called on frame changing, when it is acceptable to
* do this. Otherwise, these flags should not get cleared as poses may get lost.
*/
-void framechange_poses_clear_unkeyed(void)
+void framechange_poses_clear_unkeyed(Main *bmain)
{
Object *ob;
bPose *pose;
@@ -1017,7 +1017,7 @@ void framechange_poses_clear_unkeyed(void)
/* This needs to be done for each object that has a pose */
/* TODO: proxies may/may not be correctly handled here... (this needs checking) */
- for (ob = G.main->object.first; ob; ob = ob->id.next) {
+ for (ob = bmain->object.first; ob; ob = ob->id.next) {
/* we only need to do this on objects with a pose */
if ((pose = ob->pose)) {
for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) {
More information about the Bf-blender-cvs
mailing list