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/object/object_modes.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/object/object_modes.c')
-rw-r--r--source/blender/editors/object/object_modes.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/object/object_modes.c b/source/blender/editors/object/object_modes.c
index f61e597e69e..3fb0e75a01e 100644
--- a/source/blender/editors/object/object_modes.c
+++ b/source/blender/editors/object/object_modes.c
@@ -197,7 +197,7 @@ bool ED_object_mode_generic_enter(
* Caller can check #OB_MODE_ALL_MODE_DATA to test if this needs to be run.
*/
static bool ed_object_mode_generic_exit_ex(
- const struct EvaluationContext *eval_ctx,
+ struct Depsgraph *depsgraph,
struct Scene *scene, struct Object *ob,
bool only_test)
{
@@ -230,7 +230,7 @@ static bool ed_object_mode_generic_exit_ex(
if (only_test) {
return true;
}
- ED_object_sculptmode_exit_ex(eval_ctx, scene, ob);
+ ED_object_sculptmode_exit_ex(depsgraph, scene, ob);
}
}
else {
@@ -244,17 +244,17 @@ static bool ed_object_mode_generic_exit_ex(
}
void ED_object_mode_generic_exit(
- const struct EvaluationContext *eval_ctx,
+ struct Depsgraph *depsgraph,
struct Scene *scene, struct Object *ob)
{
- ed_object_mode_generic_exit_ex(eval_ctx, scene, ob, false);
+ ed_object_mode_generic_exit_ex(depsgraph, scene, ob, false);
}
bool ED_object_mode_generic_has_data(
- const struct EvaluationContext *eval_ctx,
+ struct Depsgraph *depsgraph,
struct Object *ob)
{
- return ed_object_mode_generic_exit_ex(eval_ctx, NULL, ob, true);
+ return ed_object_mode_generic_exit_ex(depsgraph, NULL, ob, true);
}
/** \} */