== 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
This commit is contained in:
@@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user