[Bf-blender-cvs] [82270f208d0] custom-manipulators: fmap-only option now only works with active object
Campbell Barton
noreply at git.blender.org
Tue May 30 16:08:18 CEST 2017
Commit: 82270f208d0152fe10f9f85298e0c54b66ab4231
Author: Campbell Barton
Date: Tue May 30 19:55:42 2017 +1000
Branches: custom-manipulators
https://developer.blender.org/rB82270f208d0152fe10f9f85298e0c54b66ab4231
fmap-only option now only works with active object
This may change but for now match clay/eevee.
===================================================================
M source/blender/editors/space_view3d/drawarmature.c
===================================================================
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c
index 11ae7b75635..162346b4c82 100644
--- a/source/blender/editors/space_view3d/drawarmature.c
+++ b/source/blender/editors/space_view3d/drawarmature.c
@@ -1926,9 +1926,10 @@ static void bone_matrix_translate_y(float mat[4][4], float y)
add_v3_v3(mat[3], trans);
}
-BLI_INLINE bool pchan_is_draw_fmap_only(const Scene *scene, const bPoseChannel *pchan)
+static bool pchan_is_draw_fmap_only(SceneLayer *sl, Base *base, const bPoseChannel *pchan)
{
- return ((scene->basact && scene->basact->object->mode & OB_MODE_POSE) &&
+ return ((sl->basact == base) &&
+ (OBACT_NEW->mode & OB_MODE_POSE) &&
(pchan->fmap_data != NULL) &&
(pchan->bone->flag & BONE_DRAW_FMAP_ONLY));
}
@@ -2018,7 +2019,7 @@ static void draw_pose_bones(Scene *scene, SceneLayer *sl, View3D *v3d, ARegion *
* 2) drawing is not limited to face maps only
* 3) for OpenGL select-drawing cannot have unselectable [#27194] */
if (((bone->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG)) == 0) &&
- (!pchan_is_draw_fmap_only(scene, pchan)) &&
+ (!pchan_is_draw_fmap_only(sl, base, pchan)) &&
((G.f & G_PICKSEL) == 0 || (bone->flag & BONE_UNSELECTABLE) == 0))
{
if (bone->layer & arm->layer) {
@@ -2124,7 +2125,7 @@ static void draw_pose_bones(Scene *scene, SceneLayer *sl, View3D *v3d, ARegion *
* 2) drawing is not limited to face maps only
* 3) for OpenGL select-drawing cannot have unselectable [#27194] */
if (((bone->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG)) == 0) &&
- (!pchan_is_draw_fmap_only(scene, pchan)) &&
+ (!pchan_is_draw_fmap_only(sl, base, pchan)) &&
((G.f & G_PICKSEL) == 0 || (bone->flag & BONE_UNSELECTABLE) == 0) )
{
if (bone->layer & arm->layer) {
@@ -2213,7 +2214,7 @@ static void draw_pose_bones(Scene *scene, SceneLayer *sl, View3D *v3d, ARegion *
* 2) drawing is not limited to face maps only
* 3) for OpenGL select-drawing cannot have unselectable [#27194] */
if (((bone->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG)) == 0) &&
- (!pchan_is_draw_fmap_only(scene, pchan)) &&
+ (!pchan_is_draw_fmap_only(sl, base, pchan)) &&
((G.f & G_PICKSEL) == 0 || (bone->flag & BONE_UNSELECTABLE) == 0))
{
if (bone->layer & arm->layer) {
@@ -2358,7 +2359,7 @@ static void draw_pose_bones(Scene *scene, SceneLayer *sl, View3D *v3d, ARegion *
/* 1) bone must be visible
* 2) drawing is not limited to face maps only */
if ((pchan->bone->flag & (BONE_HIDDEN_P | BONE_HIDDEN_PG)) == 0 &&
- (!pchan_is_draw_fmap_only(scene, pchan)))
+ (!pchan_is_draw_fmap_only(sl, base, pchan)))
{
if (pchan->bone->layer & arm->layer) {
if (arm->flag & (ARM_EDITMODE | ARM_POSEMODE)) {
More information about the Bf-blender-cvs
mailing list