Changeset View
Changeset View
Standalone View
Standalone View
source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
| Show First 20 Lines • Show All 378 Lines • ▼ Show 20 Lines | void DepsgraphNodeBuilder::end_build() | ||||
| } | } | ||||
| } | } | ||||
| void DepsgraphNodeBuilder::build_id(ID *id) | void DepsgraphNodeBuilder::build_id(ID *id) | ||||
| { | { | ||||
| if (id == nullptr) { | if (id == nullptr) { | ||||
| return; | return; | ||||
| } | } | ||||
| switch (GS(id->name)) { | |||||
| const ID_Type id_type = GS(id->name); | |||||
| switch (id_type) { | |||||
| case ID_AC: | case ID_AC: | ||||
| build_action((bAction *)id); | build_action((bAction *)id); | ||||
| break; | break; | ||||
| case ID_AR: | case ID_AR: | ||||
| build_armature((bArmature *)id); | build_armature((bArmature *)id); | ||||
| break; | break; | ||||
| case ID_CA: | case ID_CA: | ||||
| build_camera((Camera *)id); | build_camera((Camera *)id); | ||||
| ▲ Show 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | case ID_CF: | ||||
| build_cachefile((CacheFile *)id); | build_cachefile((CacheFile *)id); | ||||
| break; | break; | ||||
| case ID_SCE: | case ID_SCE: | ||||
| build_scene_parameters((Scene *)id); | build_scene_parameters((Scene *)id); | ||||
| break; | break; | ||||
| case ID_SIM: | case ID_SIM: | ||||
| build_simulation((Simulation *)id); | build_simulation((Simulation *)id); | ||||
| break; | break; | ||||
| default: | case ID_PA: | ||||
| fprintf(stderr, "Unhandled ID %s\n", id->name); | build_particle_settings((ParticleSettings *)id); | ||||
| BLI_assert(!"Should never happen"); | break; | ||||
| case ID_GD: | |||||
| build_gpencil((bGPdata *)id); | |||||
| break; | |||||
| case ID_LI: | |||||
| case ID_IP: | |||||
| case ID_SCR: | |||||
| case ID_VF: | |||||
| case ID_BR: | |||||
| case ID_WM: | |||||
| case ID_PAL: | |||||
| case ID_PC: | |||||
| case ID_WS: | |||||
| BLI_assert(!deg_copy_on_write_is_needed(id_type)); | |||||
| build_generic_id(id); | |||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| void DepsgraphNodeBuilder::build_generic_id(ID *id) | |||||
| { | |||||
| if (built_map_.checkIsBuiltAndTag(id)) { | |||||
| return; | |||||
| } | |||||
| build_idproperties(id->properties); | |||||
| build_animdata(id); | |||||
| build_parameters(id); | |||||
| } | |||||
| static void build_idproperties_callback(IDProperty *id_property, void *user_data) | static void build_idproperties_callback(IDProperty *id_property, void *user_data) | ||||
| { | { | ||||
| DepsgraphNodeBuilder *builder = reinterpret_cast<DepsgraphNodeBuilder *>(user_data); | DepsgraphNodeBuilder *builder = reinterpret_cast<DepsgraphNodeBuilder *>(user_data); | ||||
| BLI_assert(id_property->type == IDP_ID); | BLI_assert(id_property->type == IDP_ID); | ||||
| builder->build_id(reinterpret_cast<ID *>(id_property->data.pointer)); | builder->build_id(reinterpret_cast<ID *>(id_property->data.pointer)); | ||||
| } | } | ||||
| void DepsgraphNodeBuilder::build_idproperties(IDProperty *id_property) | void DepsgraphNodeBuilder::build_idproperties(IDProperty *id_property) | ||||
| ▲ Show 20 Lines • Show All 1,443 Lines • Show Last 20 Lines | |||||