Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/builder/deg_builder_relations.cc
| Show First 20 Lines • Show All 2,183 Lines • ▼ Show 20 Lines | LISTBASE_FOREACH (ModifierData *, md, &object->modifiers) { | ||||
| const ModifierTypeInfo *mti = BKE_modifier_get_info((ModifierType)md->type); | const ModifierTypeInfo *mti = BKE_modifier_get_info((ModifierType)md->type); | ||||
| if (mti->updateDepsgraph) { | if (mti->updateDepsgraph) { | ||||
| const BuilderStack::ScopedEntry stack_entry = stack_.trace(*md); | const BuilderStack::ScopedEntry stack_entry = stack_.trace(*md); | ||||
| DepsNodeHandle handle = create_node_handle(obdata_ubereval_key); | DepsNodeHandle handle = create_node_handle(obdata_ubereval_key); | ||||
| ctx.node = reinterpret_cast<::DepsNodeHandle *>(&handle); | ctx.node = reinterpret_cast<::DepsNodeHandle *>(&handle); | ||||
| mti->updateDepsgraph(md, &ctx); | mti->updateDepsgraph(md, &ctx); | ||||
| } | } | ||||
| if (BKE_object_modifier_use_time(scene_, object, md)) { | if (BKE_modifier_depends_ontime(scene_, md)) { | ||||
| TimeSourceKey time_src_key; | TimeSourceKey time_src_key; | ||||
| add_relation(time_src_key, obdata_ubereval_key, "Time Source -> Modifier"); | add_relation(time_src_key, obdata_ubereval_key, "Time Source -> Modifier"); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /* Grease Pencil Modifiers. */ | /* Grease Pencil Modifiers. */ | ||||
| if (object->greasepencil_modifiers.first != nullptr) { | if (object->greasepencil_modifiers.first != nullptr) { | ||||
| ModifierUpdateDepsgraphContext ctx = {}; | ModifierUpdateDepsgraphContext ctx = {}; | ||||
| ctx.scene = scene_; | ctx.scene = scene_; | ||||
| ctx.object = object; | ctx.object = object; | ||||
| LISTBASE_FOREACH (GpencilModifierData *, md, &object->greasepencil_modifiers) { | LISTBASE_FOREACH (GpencilModifierData *, md, &object->greasepencil_modifiers) { | ||||
| const GpencilModifierTypeInfo *mti = BKE_gpencil_modifier_get_info( | const GpencilModifierTypeInfo *mti = BKE_gpencil_modifier_get_info( | ||||
| (GpencilModifierType)md->type); | (GpencilModifierType)md->type); | ||||
| if (mti->updateDepsgraph) { | if (mti->updateDepsgraph) { | ||||
| DepsNodeHandle handle = create_node_handle(obdata_ubereval_key); | DepsNodeHandle handle = create_node_handle(obdata_ubereval_key); | ||||
| ctx.node = reinterpret_cast<::DepsNodeHandle *>(&handle); | ctx.node = reinterpret_cast<::DepsNodeHandle *>(&handle); | ||||
| mti->updateDepsgraph(md, &ctx, graph_->mode); | mti->updateDepsgraph(md, &ctx, graph_->mode); | ||||
| } | } | ||||
| if (BKE_object_modifier_gpencil_use_time(object, md)) { | if (BKE_gpencil_modifier_depends_ontime(md)) { | ||||
| TimeSourceKey time_src_key; | TimeSourceKey time_src_key; | ||||
| add_relation(time_src_key, obdata_ubereval_key, "Time Source"); | add_relation(time_src_key, obdata_ubereval_key, "Time Source"); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /* Shader FX. */ | /* Shader FX. */ | ||||
| if (object->shader_fx.first != nullptr) { | if (object->shader_fx.first != nullptr) { | ||||
| ModifierUpdateDepsgraphContext ctx = {}; | ModifierUpdateDepsgraphContext ctx = {}; | ||||
| ctx.scene = scene_; | ctx.scene = scene_; | ||||
| ctx.object = object; | ctx.object = object; | ||||
| LISTBASE_FOREACH (ShaderFxData *, fx, &object->shader_fx) { | LISTBASE_FOREACH (ShaderFxData *, fx, &object->shader_fx) { | ||||
| const ShaderFxTypeInfo *fxi = BKE_shaderfx_get_info((ShaderFxType)fx->type); | const ShaderFxTypeInfo *fxi = BKE_shaderfx_get_info((ShaderFxType)fx->type); | ||||
| if (fxi->updateDepsgraph) { | if (fxi->updateDepsgraph) { | ||||
| DepsNodeHandle handle = create_node_handle(obdata_ubereval_key); | DepsNodeHandle handle = create_node_handle(obdata_ubereval_key); | ||||
| ctx.node = reinterpret_cast<::DepsNodeHandle *>(&handle); | ctx.node = reinterpret_cast<::DepsNodeHandle *>(&handle); | ||||
| fxi->updateDepsgraph(fx, &ctx); | fxi->updateDepsgraph(fx, &ctx); | ||||
| } | } | ||||
| if (BKE_object_shaderfx_use_time(object, fx)) { | if (BKE_shaderfx_depends_ontime(fx)) { | ||||
| TimeSourceKey time_src_key; | TimeSourceKey time_src_key; | ||||
| add_relation(time_src_key, obdata_ubereval_key, "Time Source"); | add_relation(time_src_key, obdata_ubereval_key, "Time Source"); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| /* Materials. */ | /* Materials. */ | ||||
| build_materials(object->mat, object->totcol); | build_materials(object->mat, object->totcol); | ||||
| /* Geometry collision. */ | /* Geometry collision. */ | ||||
| ▲ Show 20 Lines • Show All 976 Lines • Show Last 20 Lines | |||||