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
path: root/source
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2007-04-27 15:54:09 +0400
committerJoshua Leung <aligorith@gmail.com>2007-04-27 15:54:09 +0400
commit7b6d68d7a356364432ec22a38aa6d66fc2e7d09c (patch)
tree5f98723641dd906a4051a964650fefb6e77a56b0 /source
parent23f59a8e8a58bac65bd3173cdd5cfd5c9a9b15a1 (diff)
== 2 Bugfixes ==
Bug #6611: Renaming bones didn't rename corresponding action-channels in NLA strips for that object. Was even marked in code as todo ;-) Bugfix #6599: Vgroup button does not update the panels in 3d viewports. Fix provided by Juho Vepsäläinen
Diffstat (limited to 'source')
-rw-r--r--source/blender/src/buttons_editing.c5
-rw-r--r--source/blender/src/editarmature.c23
2 files changed, 18 insertions, 10 deletions
diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c
index a64f461b0a0..28818e66b44 100644
--- a/source/blender/src/buttons_editing.c
+++ b/source/blender/src/buttons_editing.c
@@ -5073,14 +5073,13 @@ void weight_paint_buttons(uiBlock *block)
uiDefButBitS(block, TOGN, VP_HARD, 0, "Soft", 160,30,75,19, &Gwp.flag, 0, 0, 0, 0, "Use a soft brush");
uiDefButBitS(block, TOG, VP_NORMALS, 0, "Normals", 235,30,75,19, &Gwp.flag, 0, 0, 0, 0, "Applies the vertex normal before painting");
- if(ob){
+ if(ob) {
uiBlockBeginAlign(block);
- uiDefButBitS(block, TOG, VP_ONLYVGROUP, 0, "Vgroup", 10,0,75,19, &Gwp.flag, 0, 0, 0, 0, "Only paint on vertices in the selected vertex group.");
+ uiDefButBitS(block, TOG, VP_ONLYVGROUP, REDRAWVIEW3D, "Vgroup", 10,0,75,19, &Gwp.flag, 0, 0, 0, 0, "Only paint on vertices in the selected vertex group.");
uiDefButBitS(block, TOG, VP_MIRROR_X, REDRAWVIEW3D, "X-Mirror", 85,0,75,19, &Gwp.flag, 0, 0, 0, 0, "Mirrored Paint, applying on mirrored Weight Group name");
uiDefButBitC(block, TOG, OB_DRAWWIRE, REDRAWVIEW3D, "Wire", 160,0,75,19, &ob->dtx, 0, 0, 0, 0, "Displays the active object's wireframe in shaded drawing modes");
uiDefBut(block, BUT, B_CLR_WPAINT, "Clear", 235,0,75,19, NULL, 0, 0, 0, 0, "Removes reference to this deform group from all vertices");
uiBlockEndAlign(block);
-
}
}
diff --git a/source/blender/src/editarmature.c b/source/blender/src/editarmature.c
index 2eee1f86d80..36240714a6a 100644
--- a/source/blender/src/editarmature.c
+++ b/source/blender/src/editarmature.c
@@ -50,6 +50,7 @@
#include "DNA_ID.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
+#include "DNA_nla_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
@@ -2682,14 +2683,15 @@ void armature_bone_rename(bArmature *arm, char *oldnamep, char *newnamep)
if(arm==ob->data) {
Object *cob;
bAction *act;
- bActionChannel *chan;
+ bActionChannel *achan;
+ bActionStrip *strip;
/* Rename action channel if necessary */
act = ob->action;
- if (act && !act->id.lib){
+ if (act && !act->id.lib) {
/* Find the appropriate channel */
- chan= get_action_channel(act, oldname);
- if(chan) BLI_strncpy(chan->name, newname, MAXBONENAME);
+ achan= get_action_channel(act, oldname);
+ if(achan) BLI_strncpy(achan->name, newname, MAXBONENAME);
}
/* Rename the pose channel, if it exists */
@@ -2700,8 +2702,16 @@ void armature_bone_rename(bArmature *arm, char *oldnamep, char *newnamep)
}
}
- /* and actually do the NLA too */
- /* (todo) */
+ /* check all nla-strips too */
+ for (strip= ob->nlastrips.first; strip; strip= strip->next) {
+ /* Rename action channel if necessary */
+ act = strip->act;
+ if (act && !act->id.lib) {
+ /* Find the appropriate channel */
+ achan= get_action_channel(act, oldname);
+ if(achan) BLI_strncpy(achan->name, newname, MAXBONENAME);
+ }
+ }
/* Update any object constraints to use the new bone name */
for(cob= G.main->object.first; cob; cob= cob->id.next) {
@@ -2714,7 +2724,6 @@ void armature_bone_rename(bArmature *arm, char *oldnamep, char *newnamep)
}
}
}
-
}
/* See if an object is parented to this armature */