Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2018-05-14 16:42:49 +0300
committerJoshua Leung <aligorith@gmail.com>2018-05-14 16:42:57 +0300
commit2b09062defa093a243b5fe64b099accb07b440a3 (patch)
treeda1e360ec2a62485bceaa3fd528573fb4bad2991 /source/blender/draw/intern/draw_armature.c
parent788488b1aa0f67f49e348a135e8ef2a0241a9706 (diff)
COW Fix: The "layers used" display for armatures did not update after bones were moved between layers
Previously, the "layers_used" value was getting updated by the drawing code. However, when using copy on write, the drawing code gets evaluated copies of the armature data instead of the original data, so any updates here fail to get flushed to the original data, hence the lack of updates in the UI. Fixed by moving the calculation to RNA when setting bone layers, as it should have been done originally. (The one downside to this is if we set individual layer memberships one by one - this could be slower as the recalc would have to happen each time this changes).
Diffstat (limited to 'source/blender/draw/intern/draw_armature.c')
-rw-r--r--source/blender/draw/intern/draw_armature.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/source/blender/draw/intern/draw_armature.c b/source/blender/draw/intern/draw_armature.c
index 5ad05da5cbf..d07febfdd22 100644
--- a/source/blender/draw/intern/draw_armature.c
+++ b/source/blender/draw/intern/draw_armature.c
@@ -1577,11 +1577,8 @@ static void draw_armature_pose(Object *ob, const float const_color[4])
const bool show_relations = true; /* TODO get value from overlays settings. */
/* being set below */
- arm->layer_used = 0;
-
for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
bone = pchan->bone;
- arm->layer_used |= bone->layer;
/* bone must be visible */
if ((bone->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG)) == 0) {