Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/builder/deg_builder_relations.cc
| Show First 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | |||||
| #include "BKE_material.h" | #include "BKE_material.h" | ||||
| #include "BKE_mball.h" | #include "BKE_mball.h" | ||||
| #include "BKE_modifier.h" | #include "BKE_modifier.h" | ||||
| #include "BKE_gpencil_modifier.h" | #include "BKE_gpencil_modifier.h" | ||||
| #include "BKE_node.h" | #include "BKE_node.h" | ||||
| #include "BKE_object.h" | #include "BKE_object.h" | ||||
| #include "BKE_particle.h" | #include "BKE_particle.h" | ||||
| #include "BKE_rigidbody.h" | #include "BKE_rigidbody.h" | ||||
| #include "BKE_shader_fx.h" | |||||
| #include "BKE_sound.h" | #include "BKE_sound.h" | ||||
| #include "BKE_tracking.h" | #include "BKE_tracking.h" | ||||
| #include "BKE_world.h" | #include "BKE_world.h" | ||||
| #include "RNA_access.h" | #include "RNA_access.h" | ||||
| #include "RNA_types.h" | #include "RNA_types.h" | ||||
| } /* extern "C" */ | } /* extern "C" */ | ||||
| ▲ Show 20 Lines • Show All 426 Lines • ▼ Show 20 Lines | if (object->modifiers.first != NULL) { | ||||
| modifiers_foreachIDLink(object, modifier_walk, &data); | modifiers_foreachIDLink(object, modifier_walk, &data); | ||||
| } | } | ||||
| /* Grease Pencil Modifiers. */ | /* Grease Pencil Modifiers. */ | ||||
| if (object->greasepencil_modifiers.first != NULL) { | if (object->greasepencil_modifiers.first != NULL) { | ||||
| BuilderWalkUserData data; | BuilderWalkUserData data; | ||||
| data.builder = this; | data.builder = this; | ||||
| BKE_gpencil_modifiers_foreachIDLink(object, modifier_walk, &data); | BKE_gpencil_modifiers_foreachIDLink(object, modifier_walk, &data); | ||||
| } | } | ||||
| /* Shader FX. */ | |||||
| if (object->shader_fx.first != NULL) { | |||||
| BuilderWalkUserData data; | |||||
| data.builder = this; | |||||
| BKE_shaderfx_foreachIDLink(object, modifier_walk, &data); | |||||
| } | |||||
| /* Constraints. */ | /* Constraints. */ | ||||
| if (object->constraints.first != NULL) { | if (object->constraints.first != NULL) { | ||||
| BuilderWalkUserData data; | BuilderWalkUserData data; | ||||
| data.builder = this; | data.builder = this; | ||||
| BKE_constraints_id_loop(&object->constraints, constraint_walk, &data); | BKE_constraints_id_loop(&object->constraints, constraint_walk, &data); | ||||
| } | } | ||||
| /* Object constraints. */ | /* Object constraints. */ | ||||
| if (object->constraints.first != NULL) { | if (object->constraints.first != NULL) { | ||||
| ▲ Show 20 Lines • Show All 1,257 Lines • ▼ Show 20 Lines | LISTBASE_FOREACH(GpencilModifierData *, md, &object->greasepencil_modifiers) { | ||||
| mti->updateDepsgraph(md, &ctx); | mti->updateDepsgraph(md, &ctx); | ||||
| } | } | ||||
| if (BKE_object_modifier_gpencil_use_time(object, md)) { | if (BKE_object_modifier_gpencil_use_time(object, 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 */ | |||||
| if (object->shader_fx.first != NULL) { | |||||
| ModifierUpdateDepsgraphContext ctx = {}; | |||||
| ctx.scene = scene_; | |||||
| ctx.object = object; | |||||
| LISTBASE_FOREACH(ShaderFxData *, fx, &object->shader_fx) { | |||||
| const ShaderFxTypeInfo *fxi = BKE_shaderfxType_getInfo((ShaderFxType)fx->type); | |||||
| if (fxi->updateDepsgraph) { | |||||
| DepsNodeHandle handle = create_node_handle(obdata_ubereval_key); | |||||
| ctx.node = reinterpret_cast< ::DepsNodeHandle* >(&handle); | |||||
| fxi->updateDepsgraph(fx, &ctx); | |||||
| } | |||||
| if (BKE_object_shaderfx_use_time(object, fx)) { | |||||
| TimeSourceKey time_src_key; | |||||
| add_relation(time_src_key, obdata_ubereval_key, "Time Source"); | |||||
| } | |||||
| } | |||||
| } | |||||
| /* Materials. */ | /* Materials. */ | ||||
| if (object->totcol) { | if (object->totcol) { | ||||
| for (int a = 1; a <= object->totcol; a++) { | for (int a = 1; a <= object->totcol; a++) { | ||||
| Material *ma = give_current_material(object, a); | Material *ma = give_current_material(object, a); | ||||
| if (ma != NULL) { | if (ma != NULL) { | ||||
| build_material(ma); | build_material(ma); | ||||
| if (object->type == OB_MESH) { | if (object->type == OB_MESH) { | ||||
| ▲ Show 20 Lines • Show All 563 Lines • Show Last 20 Lines | |||||