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
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2018-05-24 20:12:41 +0300
committerJoshua Leung <aligorith@gmail.com>2018-05-24 20:13:15 +0300
commit0983d97ab92cb77c75e9ed700379efaa209b52b7 (patch)
treef2e83e41a90546f4f618861b189cbb8c71e40613 /source/blender/editors/space_view3d/view3d_iterators.c
parent5db7f2c1ee8df3e8d06acbecf8a04d786ca4893a (diff)
Fix T55186: Circle and Lasso select were not working on Pose Bones
These needed to be using the COW evaluated data, instead of the raw bone positions. All other datatypes still need converting to work with this though.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_iterators.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_iterators.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/editors/space_view3d/view3d_iterators.c b/source/blender/editors/space_view3d/view3d_iterators.c
index 35127c7c8c6..145f57174fd 100644
--- a/source/blender/editors/space_view3d/view3d_iterators.c
+++ b/source/blender/editors/space_view3d/view3d_iterators.c
@@ -35,6 +35,7 @@
#include "BLI_utildefines.h"
#include "BLI_rect.h"
+#include "BKE_action.h"
#include "BKE_armature.h"
#include "BKE_curve.h"
#include "BKE_DerivedMesh.h"
@@ -43,6 +44,7 @@
#include "BKE_context.h"
#include "DEG_depsgraph.h"
+#include "DEG_depsgraph_query.h"
#include "bmesh.h"
@@ -449,19 +451,21 @@ void pose_foreachScreenBone(
void (*func)(void *userData, struct bPoseChannel *pchan, const float screen_co_a[2], const float screen_co_b[2]),
void *userData, const eV3DProjTest clip_flag)
{
- bArmature *arm = vc->obact->data;
+ const Object *ob_eval = DEG_get_evaluated_object(vc->depsgraph, vc->obact);
+ const bArmature *arm_eval = ob_eval->data;
bPose *pose = vc->obact->pose;
bPoseChannel *pchan;
ED_view3d_check_mats_rv3d(vc->rv3d);
for (pchan = pose->chanbase.first; pchan; pchan = pchan->next) {
- if (PBONE_VISIBLE(arm, pchan->bone)) {
+ if (PBONE_VISIBLE(arm_eval, pchan->bone)) {
+ bPoseChannel *pchan_eval = BKE_pose_channel_find_name(ob_eval->pose, pchan->name);
float screen_co_a[2], screen_co_b[2];
int points_proj_tot = 0;
/* project head location to screenspace */
- if (ED_view3d_project_float_object(vc->ar, pchan->pose_head, screen_co_a, clip_flag) == V3D_PROJ_RET_OK) {
+ if (ED_view3d_project_float_object(vc->ar, pchan_eval->pose_head, screen_co_a, clip_flag) == V3D_PROJ_RET_OK) {
points_proj_tot++;
}
else {
@@ -470,7 +474,7 @@ void pose_foreachScreenBone(
}
/* project tail location to screenspace */
- if (ED_view3d_project_float_object(vc->ar, pchan->pose_tail, screen_co_b, clip_flag) == V3D_PROJ_RET_OK) {
+ if (ED_view3d_project_float_object(vc->ar, pchan_eval->pose_tail, screen_co_b, clip_flag) == V3D_PROJ_RET_OK) {
points_proj_tot++;
}
else {