Fix T56981: python .scene_raycast returned object is not selectable.

Was returning COW evaluated object, not actual data-block...
This commit is contained in:
Bastien Montagne 2018-09-30 23:54:11 +02:00
parent 3a09ff77a1
commit 3cd98d9ef7
Notes: blender-bot 2023-02-14 19:25:33 +01:00
Referenced by issue blender/blender-addons#56981, python .scene_raycast returned object is not selectable
1 changed files with 6 additions and 0 deletions

View File

@ -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;
}