diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-10-01 00:54:11 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-10-01 00:54:11 +0300 |
commit | 3cd98d9ef7e6b85ec3c186f27879612265e3d85d (patch) | |
tree | 273ab816b0635c6a1af500d8448569fc283775db /source/blender/makesrna/intern/rna_scene_api.c | |
parent | 3a09ff77a1d74af2df7da5225c8292d3cf1243a6 (diff) |
Fix T56981: python .scene_raycast returned object is not selectable.
Was returning COW evaluated object, not actual data-block...
Diffstat (limited to 'source/blender/makesrna/intern/rna_scene_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene_api.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c index 5a8c9646b0b..f25e093c8a9 100644 --- a/source/blender/makesrna/intern/rna_scene_api.c +++ b/source/blender/makesrna/intern/rna_scene_api.c @@ -66,6 +66,8 @@ const EnumPropertyItem rna_enum_abc_compression_items[] = { #include "BKE_scene.h" #include "BKE_writeavi.h" +#include "DEG_depsgraph_query.h" + #include "ED_transform.h" #include "ED_transform_snap_object_context.h" #include "ED_uvedit.h" @@ -185,6 +187,10 @@ static void rna_Scene_ray_cast( ED_transform_snap_object_context_destroy(sctx); + if (r_ob != NULL && *r_ob != NULL) { + *r_ob = DEG_get_original_object(*r_ob); + } + if (ret) { *r_success = true; } |