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:
authorCampbell Barton <ideasman42@gmail.com>2017-08-11 04:23:39 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-08-11 04:23:39 +0300
commit317b8d96690cec6255a1e954ba642b08ef5d54fb (patch)
treeeb2c37bc74d60a00fe5a52a77997c559847361e5 /source/blender/makesrna/intern/rna_scene_api.c
parentd1328feeb125328615bcf832cbc82d9f9a18e023 (diff)
Transform: Snap used multiple eval contexts
Changes for 2.8x to use EvaluationContext caused some confusion - Would use scene layer passed from snap context. - Would generate duplis from Main eval context. - Would take context argument and use it to create another eval context. Adding context args all over and filling in a new eval-context for every ray-cast test isn't ideal either. Remove the context argument since the purpose of SnapObjectContext is to avoid this kind of confusion. Store the EvaluationContext once and re-use.
Diffstat (limited to 'source/blender/makesrna/intern/rna_scene_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_scene_api.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c
index ff870ec40b7..a1ef3f17bd6 100644
--- a/source/blender/makesrna/intern/rna_scene_api.c
+++ b/source/blender/makesrna/intern/rna_scene_api.c
@@ -151,7 +151,7 @@ static void rna_SceneRender_get_frame_path(RenderData *rd, int frame, int previe
}
static void rna_Scene_ray_cast(
- Scene *scene, bContext *C, SceneLayer *sl, float origin[3], float direction[3], float ray_dist,
+ Scene *scene, SceneLayer *sl, float origin[3], float direction[3], float ray_dist,
int *r_success, float r_location[3], float r_normal[3], int *r_index,
Object **r_ob, float r_obmat[16])
{
@@ -161,7 +161,7 @@ static void rna_Scene_ray_cast(
G.main, scene, sl, 0);
bool ret = ED_transform_snap_object_project_ray_ex(
- C, sctx,
+ sctx,
&(const struct SnapObjectParams){
.snap_select = SNAP_ALL,
},
@@ -352,7 +352,6 @@ void RNA_api_scene(StructRNA *srna)
/* Ray Cast */
func = RNA_def_function(srna, "ray_cast", "rna_Scene_ray_cast");
RNA_def_function_ui_description(func, "Cast a ray onto in object space");
- RNA_def_function_flag(func, FUNC_USE_CONTEXT);
parm = RNA_def_pointer(func, "scene_layer", "SceneLayer", "", "Scene Layer");
RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED);
/* ray start and end */