Bugfix #6945: Weight painting bug

Trying to Clear Rotation of a armature bone while in Weight Painting mode didn't work anymore due to Bugfix #6486. Now it checks if ob==active_object and also if weightpainting is on.
This commit is contained in:
Joshua Leung
2007-07-16 05:49:04 +00:00
parent 8f6c18dc17
commit 044b354458

View File

@@ -999,9 +999,15 @@ void clear_object(char mode)
if TESTBASELIB(base) {
ob= base->object;
if( (ob->flag & OB_POSEMODE) && ob==OBACT) {
clear_armature(ob, mode);
armature_clear= 1; /* silly system to prevent another dag update, so no action applied */
if ((ob->flag & OB_POSEMODE)) {
/* only clear pose transforms if:
* - with a mesh in weightpaint mode, it's related armature needs to be cleared
* - with clearing transform of object being edited at the time
*/
if ((G.f & G_WEIGHTPAINT) || ob==OBACT) {
clear_armature(ob, mode);
armature_clear= 1; /* silly system to prevent another dag update, so no action applied */
}
}
else if((G.f & G_WEIGHTPAINT)==0) {