forked from bartvdbraak/blender
- Fix for Wkey menu in WeightPaint modus; it didn't work when the armature
is a modifier only (Armature not parented to Mesh). Note; if multiple Modifier/Armatures work, it uses only the first still. - Armature option 'draw axes' now scales axes to 0.25 of bone length.
This commit is contained in:
parent
7a7dadc107
commit
cfab1a9e6a
@ -1473,7 +1473,7 @@ static void draw_pose_channels(Base *base, int dt)
|
||||
glPushMatrix();
|
||||
glMultMatrixf(pchan->pose_mat);
|
||||
glTranslatef(0.0f, pchan->bone->length, 0.0f);
|
||||
drawaxes(0.25f);
|
||||
drawaxes(0.25f*pchan->bone->length);
|
||||
glPopMatrix();
|
||||
}
|
||||
}
|
||||
@ -1649,7 +1649,7 @@ static void draw_ebones(Object *ob, int dt)
|
||||
glPushMatrix();
|
||||
set_matrix_editbone(eBone);
|
||||
glTranslatef(0.0f, eBone->length, 0.0f);
|
||||
drawaxes(0.25f);
|
||||
drawaxes(eBone->length*0.25f);
|
||||
glPopMatrix();
|
||||
}
|
||||
|
||||
|
@ -1999,7 +1999,8 @@ void special_editmenu(void)
|
||||
}
|
||||
}
|
||||
else if(G.f & G_WEIGHTPAINT) {
|
||||
if(ob->parent && (ob->parent->flag & OB_POSEMODE)) {
|
||||
Object *par= modifiers_isDeformedByArmature(ob);
|
||||
if(par && (par->flag & OB_POSEMODE)) {
|
||||
nr= pupmenu("Specials%t|Apply Bone Envelopes to VertexGroups %x1");
|
||||
if(nr==1) {
|
||||
Mesh *me= ob->data;
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include "DNA_constraint_types.h"
|
||||
#include "DNA_mesh_types.h"
|
||||
#include "DNA_meshdata_types.h"
|
||||
#include "DNA_modifier_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
#include "DNA_scene_types.h"
|
||||
#include "DNA_screen_types.h"
|
||||
@ -52,6 +53,7 @@
|
||||
#include "BKE_DerivedMesh.h"
|
||||
#include "BKE_displist.h"
|
||||
#include "BKE_global.h"
|
||||
#include "BKE_modifier.h"
|
||||
#include "BKE_object.h"
|
||||
#include "BKE_utildefines.h"
|
||||
|
||||
@ -609,7 +611,7 @@ void pose_adds_vgroups(Object *meshobj)
|
||||
{
|
||||
struct vgroup_map map;
|
||||
DerivedMesh *dm;
|
||||
Object *poseobj= meshobj->parent;
|
||||
Object *poseobj= modifiers_isDeformedByArmature(meshobj);
|
||||
bPoseChannel *pchan;
|
||||
Bone *bone;
|
||||
bDeformGroup *dg;
|
||||
|
Loading…
Reference in New Issue
Block a user