Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/object_dupli.cc
| Show First 20 Lines • Show All 121 Lines • ▼ Show 20 Lines | static void init_context(DupliContext *r_ctx, | ||||
| Depsgraph *depsgraph, | Depsgraph *depsgraph, | ||||
| Scene *scene, | Scene *scene, | ||||
| Object *ob, | Object *ob, | ||||
| const float space_mat[4][4], | const float space_mat[4][4], | ||||
| Vector<Object *> &instance_stack) | Vector<Object *> &instance_stack) | ||||
| { | { | ||||
| r_ctx->depsgraph = depsgraph; | r_ctx->depsgraph = depsgraph; | ||||
| r_ctx->scene = scene; | r_ctx->scene = scene; | ||||
| r_ctx->view_layer = DEG_get_evaluated_view_layer(depsgraph); | r_ctx->view_layer = DEG_get_evaluated_view_layer_of_object(depsgraph, ob); | ||||
| r_ctx->collection = nullptr; | r_ctx->collection = nullptr; | ||||
| r_ctx->object = ob; | r_ctx->object = ob; | ||||
| r_ctx->obedit = OBEDIT_FROM_OBACT(ob); | r_ctx->obedit = OBEDIT_FROM_OBACT(ob); | ||||
| r_ctx->instance_stack = &instance_stack; | r_ctx->instance_stack = &instance_stack; | ||||
| if (space_mat) { | if (space_mat) { | ||||
| copy_m4_m4(r_ctx->space_mat, space_mat); | copy_m4_m4(r_ctx->space_mat, space_mat); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 170 Lines • ▼ Show 20 Lines | FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_BEGIN (ctx->collection, ob, mode) { | ||||
| } | } | ||||
| } | } | ||||
| FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_END; | FOREACH_COLLECTION_VISIBLE_OBJECT_RECURSIVE_END; | ||||
| } | } | ||||
| else { | else { | ||||
| int baseid; | int baseid; | ||||
| ViewLayer *view_layer = ctx->view_layer; | ViewLayer *view_layer = ctx->view_layer; | ||||
| LISTBASE_FOREACH_INDEX (Base *, base, &view_layer->object_bases, baseid) { | LISTBASE_FOREACH_INDEX (Base *, base, &view_layer->object_bases, baseid) { | ||||
| Object *ob = base->object; | Object *ob = base->object; | ||||
sergey: Maybe add a clue that we want to investigate usage of `session_uuid`? | |||||
| if ((ob != ctx->obedit) && is_child(ob, parent)) { | if ((ob != ctx->obedit) && is_child(ob, parent)) { | ||||
| DupliContext pctx; | DupliContext pctx; | ||||
| copy_dupli_context(&pctx, ctx, ctx->object, nullptr, baseid); | copy_dupli_context(&pctx, ctx, ctx->object, nullptr, baseid); | ||||
| /* Meta-balls have a different dupli-handling. */ | /* Meta-balls have a different dupli-handling. */ | ||||
| if (ob->type != OB_MBALL) { | if (ob->type != OB_MBALL) { | ||||
| ob->flag |= OB_DONE; /* Doesn't render. */ | ob->flag |= OB_DONE; /* Doesn't render. */ | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,371 Lines • Show Last 20 Lines | |||||
Maybe add a clue that we want to investigate usage of session_uuid?