Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/simulation.cc
| Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | |||||
| static void simulation_init_data(ID *id) | static void simulation_init_data(ID *id) | ||||
| { | { | ||||
| Simulation *simulation = (Simulation *)id; | Simulation *simulation = (Simulation *)id; | ||||
| BLI_assert(MEMCMP_STRUCT_AFTER_IS_ZERO(simulation, id)); | BLI_assert(MEMCMP_STRUCT_AFTER_IS_ZERO(simulation, id)); | ||||
| MEMCPY_STRUCT_AFTER(simulation, DNA_struct_default_get(Simulation), id); | MEMCPY_STRUCT_AFTER(simulation, DNA_struct_default_get(Simulation), id); | ||||
| bNodeTree *ntree = ntreeAddTree(nullptr, "Geometry Nodetree", ntreeType_Geometry->idname); | ntreeAddTreeEmbedded(nullptr, id, "Geometry Nodetree", ntreeType_Geometry->idname); | ||||
| simulation->nodetree = ntree; | |||||
| } | } | ||||
| static void simulation_copy_data(Main *bmain, ID *id_dst, const ID *id_src, const int flag) | static void simulation_copy_data(Main *bmain, ID *id_dst, const ID *id_src, const int flag) | ||||
| { | { | ||||
| Simulation *simulation_dst = (Simulation *)id_dst; | Simulation *simulation_dst = (Simulation *)id_dst; | ||||
| const Simulation *simulation_src = (const Simulation *)id_src; | const Simulation *simulation_src = (const Simulation *)id_src; | ||||
| /* We always need allocation of our private ID data. */ | /* We always need allocation of our private ID data. */ | ||||
| ▲ Show 20 Lines • Show All 111 Lines • Show Last 20 Lines | |||||