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/editors/include
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/editors/include')
-rw-r--r--source/blender/editors/include/ED_transform.h2
-rw-r--r--source/blender/editors/include/ED_transform_snap_object_context.h14
2 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h
index 39dd6024022..483caf7c475 100644
--- a/source/blender/editors/include/ED_transform.h
+++ b/source/blender/editors/include/ED_transform.h
@@ -182,7 +182,7 @@ bool peelObjectsTransform(
/* return args */
float r_loc[3], float r_no[3], float *r_thickness);
bool peelObjectsSnapContext(
- const struct bContext *C, struct SnapObjectContext *sctx,
+ struct SnapObjectContext *sctx,
const float mval[2],
const struct SnapObjectParams *params,
const bool use_peel_object,
diff --git a/source/blender/editors/include/ED_transform_snap_object_context.h b/source/blender/editors/include/ED_transform_snap_object_context.h
index 4f93c35b8d6..3a042ebfb1d 100644
--- a/source/blender/editors/include/ED_transform_snap_object_context.h
+++ b/source/blender/editors/include/ED_transform_snap_object_context.h
@@ -85,34 +85,34 @@ void ED_transform_snap_object_context_set_editmesh_callbacks(
void *user_data);
bool ED_transform_snap_object_project_ray_ex(
- const struct bContext *C, struct SnapObjectContext *sctx,
+ struct SnapObjectContext *sctx,
const struct SnapObjectParams *params,
const float ray_start[3], const float ray_normal[3], float *ray_depth,
/* return args */
float r_loc[3], float r_no[3], int *r_index,
struct Object **r_ob, float r_obmat[4][4]);
bool ED_transform_snap_object_project_ray(
- const struct bContext *C, SnapObjectContext *sctx,
+ SnapObjectContext *sctx,
const struct SnapObjectParams *params,
const float ray_origin[3], const float ray_direction[3], float *ray_depth,
float r_co[3], float r_no[3]);
bool ED_transform_snap_object_project_ray_all(
- const struct bContext *C, SnapObjectContext *sctx,
+ SnapObjectContext *sctx,
const struct SnapObjectParams *params,
const float ray_start[3], const float ray_normal[3],
float ray_depth, bool sort,
struct ListBase *r_hit_list);
bool ED_transform_snap_object_project_view3d_ex(
- const struct bContext *C, struct SnapObjectContext *sctx,
+ struct SnapObjectContext *sctx,
const unsigned short snap_to,
const struct SnapObjectParams *params,
const float mval[2], float *dist_px,
float *ray_depth,
float r_loc[3], float r_no[3], int *r_index);
bool ED_transform_snap_object_project_view3d(
- const struct bContext *C, struct SnapObjectContext *sctx,
+ struct SnapObjectContext *sctx,
const unsigned short snap_to,
const struct SnapObjectParams *params,
const float mval[2], float *dist_px,
@@ -120,7 +120,7 @@ bool ED_transform_snap_object_project_view3d(
/* return args */
float r_loc[3], float r_no[3]);
bool ED_transform_snap_object_project_view3d_mixed(
- const struct bContext *C, SnapObjectContext *sctx,
+ SnapObjectContext *sctx,
const unsigned short snap_to_flag,
const struct SnapObjectParams *params,
const float mval_fl[2], float *dist_px,
@@ -128,7 +128,7 @@ bool ED_transform_snap_object_project_view3d_mixed(
float r_co[3], float r_no[3]);
bool ED_transform_snap_object_project_all_view3d_ex(
- const struct bContext *C, SnapObjectContext *sctx,
+ SnapObjectContext *sctx,
const struct SnapObjectParams *params,
const float mval[2],
float ray_depth, bool sort,