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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-04-06 13:07:27 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-04-16 20:55:33 +0300
commit34ab90f546f097cada951b2c9ca22bf271996980 (patch)
treeebcdb3d37120ac1d8fb16462b9104badd1800329 /source/blender/editors/space_view3d/view3d_utils.c
parent0c495005dd83913864acb510c1d4194a2275dbb0 (diff)
Depsgraph: remove EvaluationContext, pass Depsgraph instead.
The depsgraph was always created within a fixed evaluation context. Passing both risks the depsgraph and evaluation context not matching, and it complicates the Python API where we'd have to expose both which is not so easy to understand. This also removes the global evaluation context in main, which assumed there to be a single active scene and view layer. Differential Revision: https://developer.blender.org/D3152
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_utils.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_utils.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/space_view3d/view3d_utils.c b/source/blender/editors/space_view3d/view3d_utils.c
index 92b3ec19acb..09a3202c85e 100644
--- a/source/blender/editors/space_view3d/view3d_utils.c
+++ b/source/blender/editors/space_view3d/view3d_utils.c
@@ -100,7 +100,7 @@ void ED_view3d_dist_range_get(
* \note copies logic of #ED_view3d_viewplane_get(), keep in sync.
*/
bool ED_view3d_clip_range_get(
- const Depsgraph *depsgraph,
+ Depsgraph *depsgraph,
const View3D *v3d, const RegionView3D *rv3d,
float *r_clipsta, float *r_clipend,
const bool use_ortho_factor)
@@ -123,7 +123,7 @@ bool ED_view3d_clip_range_get(
}
bool ED_view3d_viewplane_get(
- const Depsgraph *depsgraph,
+ Depsgraph *depsgraph,
const View3D *v3d, const RegionView3D *rv3d, int winx, int winy,
rctf *r_viewplane, float *r_clipsta, float *r_clipend, float *r_pixsize)
{
@@ -878,7 +878,7 @@ static float view_autodist_depth_margin(ARegion *ar, const int mval[2], int marg
* \param fallback_depth_pt: Use this points depth when no depth can be found.
*/
bool ED_view3d_autodist(
- const EvaluationContext *eval_ctx, struct Depsgraph *graph, ARegion *ar, View3D *v3d,
+ struct Depsgraph *graph, ARegion *ar, View3D *v3d,
const int mval[2], float mouse_worldloc[3],
const bool alphaoverride, const float fallback_depth_pt[3])
{
@@ -888,7 +888,7 @@ bool ED_view3d_autodist(
bool depth_ok = false;
/* Get Z Depths, needed for perspective, nice for ortho */
- ED_view3d_draw_depth(eval_ctx, graph, ar, v3d, alphaoverride);
+ ED_view3d_draw_depth(graph, ar, v3d, alphaoverride);
/* Attempt with low margin's first */
i = 0;
@@ -916,18 +916,18 @@ bool ED_view3d_autodist(
}
void ED_view3d_autodist_init(
- const EvaluationContext *eval_ctx, struct Depsgraph *graph,
+ struct Depsgraph *graph,
ARegion *ar, View3D *v3d, int mode)
{
/* Get Z Depths, needed for perspective, nice for ortho */
switch (mode) {
case 0:
- ED_view3d_draw_depth(eval_ctx, graph, ar, v3d, true);
+ ED_view3d_draw_depth(graph, ar, v3d, true);
break;
case 1:
{
Scene *scene = DEG_get_evaluated_scene(graph);
- ED_view3d_draw_depth_gpencil(eval_ctx, scene, ar, v3d);
+ ED_view3d_draw_depth_gpencil(graph, scene, ar, v3d);
break;
}
}