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>2018-02-13 12:35:29 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-02-13 12:55:12 +0300
commitc8597a465f22e020b1c0ce6fcfbb7b7308efdad1 (patch)
treebdff87671b2f24ce7f393534e4325fb9e66eeda8 /source/blender/blenkernel/intern/object_dupli.c
parent754d3a2fe626fbe57bb6ef47581368e3859f6390 (diff)
Object Mode: remove Scene.obedit
Add ED_screen_window_find, BKE_workspace_edit_object
Diffstat (limited to 'source/blender/blenkernel/intern/object_dupli.c')
-rw-r--r--source/blender/blenkernel/intern/object_dupli.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/object_dupli.c b/source/blender/blenkernel/intern/object_dupli.c
index f9f6b0aab40..2d655913b3e 100644
--- a/source/blender/blenkernel/intern/object_dupli.c
+++ b/source/blender/blenkernel/intern/object_dupli.c
@@ -74,6 +74,7 @@ typedef struct DupliContext {
bool do_update;
bool animated;
Group *group; /* XXX child objects are selected from this group if set, could be nicer */
+ Object *obedit; /* Only to check if the object is in edit-mode. */
Scene *scene;
ViewLayer *view_layer;
@@ -107,6 +108,7 @@ static void init_context(DupliContext *r_ctx, const EvaluationContext *eval_ctx,
r_ctx->animated = false;
r_ctx->group = NULL;
+ r_ctx->obedit = OBEDIT_FROM_EVAL_CTX(eval_ctx);
r_ctx->object = ob;
if (space_mat)
copy_m4_m4(r_ctx->space_mat, space_mat);
@@ -241,14 +243,13 @@ static bool is_child(const Object *ob, const Object *parent)
static void make_child_duplis(const DupliContext *ctx, void *userdata, MakeChildDuplisFunc make_child_duplis_cb)
{
Object *parent = ctx->object;
- Object *obedit = ctx->scene->obedit;
if (ctx->group) {
int groupid = 0;
FOREACH_GROUP_BASE(ctx->group, base)
{
Object *ob = base->object;
- if ((base->flag & BASE_VISIBLED) && ob != obedit && is_child(ob, parent)) {
+ if ((base->flag & BASE_VISIBLED) && ob != ctx->obedit && is_child(ob, parent)) {
DupliContext pctx;
copy_dupli_context(&pctx, ctx, ctx->object, NULL, groupid, false);
@@ -267,7 +268,7 @@ static void make_child_duplis(const DupliContext *ctx, void *userdata, MakeChild
ViewLayer *view_layer = ctx->view_layer;
for (Base *base = view_layer->object_bases.first; base; base = base->next, baseid++) {
Object *ob = base->object;
- if (ob != obedit && is_child(ob, parent)) {
+ if ((ob != ctx->obedit) && is_child(ob, parent)) {
DupliContext pctx;
copy_dupli_context(&pctx, ctx, ctx->object, NULL, baseid, false);