diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-22 13:35:41 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-22 13:35:41 +0300 |
commit | 2fe528424d168f124efca5d94c6b0363be49dbf3 (patch) | |
tree | 04bbd895c10e1e155a90eb53f268b593e6421e96 /source/blender/makesrna/intern/rna_pose.c | |
parent | 101fd7ec0639c03ab017e90cb46367f50e512cbb (diff) |
Cleanup: remove last G.main from RNA.
Again, we cannot actually get rid of G_MAIN global access here, so in
most case just 'marked' them as valid, and added assert checks to ensure
we do only work with IDs in G_MAIN in those cases.
Diffstat (limited to 'source/blender/makesrna/intern/rna_pose.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_pose.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c index 746bb0ceacd..a1a026536cf 100644 --- a/source/blender/makesrna/intern/rna_pose.c +++ b/source/blender/makesrna/intern/rna_pose.c @@ -287,7 +287,9 @@ static void rna_PoseChannel_name_set(PointerRNA *ptr, const char *value) BLI_strncpy_utf8(newname, value, sizeof(pchan->name)); BLI_strncpy(oldname, pchan->name, sizeof(pchan->name)); - ED_armature_bone_rename(G.main, ob->data, oldname, newname); + BLI_assert(BKE_id_is_in_gobal_main(&ob->id)); + BLI_assert(BKE_id_is_in_gobal_main(ob->data)); + ED_armature_bone_rename(G_MAIN, ob->data, oldname, newname); } static int rna_PoseChannel_has_ik_get(PointerRNA *ptr) |