Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/writefile.c
| Show First 20 Lines • Show All 113 Lines • ▼ Show 20 Lines | |||||
| #include "DNA_camera_types.h" | #include "DNA_camera_types.h" | ||||
| #include "DNA_cloth_types.h" | #include "DNA_cloth_types.h" | ||||
| #include "DNA_constraint_types.h" | #include "DNA_constraint_types.h" | ||||
| #include "DNA_dynamicpaint_types.h" | #include "DNA_dynamicpaint_types.h" | ||||
| #include "DNA_genfile.h" | #include "DNA_genfile.h" | ||||
| #include "DNA_group_types.h" | #include "DNA_group_types.h" | ||||
| #include "DNA_gpencil_types.h" | #include "DNA_gpencil_types.h" | ||||
| #include "DNA_gpencil_modifier_types.h" | #include "DNA_gpencil_modifier_types.h" | ||||
| #include "DNA_shader_fx_types.h" | |||||
| #include "DNA_fileglobal_types.h" | #include "DNA_fileglobal_types.h" | ||||
| #include "DNA_key_types.h" | #include "DNA_key_types.h" | ||||
| #include "DNA_lattice_types.h" | #include "DNA_lattice_types.h" | ||||
| #include "DNA_lamp_types.h" | #include "DNA_lamp_types.h" | ||||
| #include "DNA_layer_types.h" | #include "DNA_layer_types.h" | ||||
| #include "DNA_linestyle_types.h" | #include "DNA_linestyle_types.h" | ||||
| #include "DNA_meta_types.h" | #include "DNA_meta_types.h" | ||||
| #include "DNA_mesh_types.h" | #include "DNA_mesh_types.h" | ||||
| Show All 39 Lines | |||||
| #include "BKE_gpencil_modifier.h" | #include "BKE_gpencil_modifier.h" | ||||
| #include "BKE_idcode.h" | #include "BKE_idcode.h" | ||||
| #include "BKE_library.h" // for set_listbasepointers | #include "BKE_library.h" // for set_listbasepointers | ||||
| #include "BKE_library_override.h" | #include "BKE_library_override.h" | ||||
| #include "BKE_main.h" | #include "BKE_main.h" | ||||
| #include "BKE_node.h" | #include "BKE_node.h" | ||||
| #include "BKE_report.h" | #include "BKE_report.h" | ||||
| #include "BKE_sequencer.h" | #include "BKE_sequencer.h" | ||||
| #include "BKE_shader_fx.h" | |||||
| #include "BKE_subsurf.h" | #include "BKE_subsurf.h" | ||||
| #include "BKE_modifier.h" | #include "BKE_modifier.h" | ||||
| #include "BKE_fcurve.h" | #include "BKE_fcurve.h" | ||||
| #include "BKE_pointcache.h" | #include "BKE_pointcache.h" | ||||
| #include "BKE_mesh.h" | #include "BKE_mesh.h" | ||||
| #include "BKE_workspace.h" | #include "BKE_workspace.h" | ||||
| #ifdef USE_NODE_COMPAT_CUSTOMNODES | #ifdef USE_NODE_COMPAT_CUSTOMNODES | ||||
| ▲ Show 20 Lines • Show All 1,623 Lines • ▼ Show 20 Lines | else if (md->type == eGpencilModifierType_Hook) { | ||||
| if (gpmd->curfalloff) { | if (gpmd->curfalloff) { | ||||
| write_curvemapping(wd, gpmd->curfalloff); | write_curvemapping(wd, gpmd->curfalloff); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| static void write_shaderfxs(WriteData *wd, ListBase *fxbase) | |||||
| { | |||||
| ShaderFxData *fx; | |||||
| if (fxbase == NULL) { | |||||
| return; | |||||
| } | |||||
| for (fx = fxbase->first; fx; fx = fx->next) { | |||||
| const ShaderFxTypeInfo *fxi = BKE_shaderfxType_getInfo(fx->type); | |||||
| if (fxi == NULL) { | |||||
| return; | |||||
| } | |||||
| writestruct_id(wd, DATA, fxi->struct_name, 1, fx); | |||||
| } | |||||
| } | |||||
| static void write_object(WriteData *wd, Object *ob) | static void write_object(WriteData *wd, Object *ob) | ||||
| { | { | ||||
| if (ob->id.us > 0 || wd->use_memfile) { | if (ob->id.us > 0 || wd->use_memfile) { | ||||
| /* write LibData */ | /* write LibData */ | ||||
| writestruct(wd, ID_OB, Object, 1, ob); | writestruct(wd, ID_OB, Object, 1, ob); | ||||
| write_iddata(wd, &ob->id); | write_iddata(wd, &ob->id); | ||||
| if (ob->adt) { | if (ob->adt) { | ||||
| Show All 35 Lines | if (ob->id.us > 0 || wd->use_memfile) { | ||||
| if (ob->type == OB_EMPTY && ob->empty_drawtype == OB_EMPTY_IMAGE) { | if (ob->type == OB_EMPTY && ob->empty_drawtype == OB_EMPTY_IMAGE) { | ||||
| writestruct(wd, DATA, ImageUser, 1, ob->iuser); | writestruct(wd, DATA, ImageUser, 1, ob->iuser); | ||||
| } | } | ||||
| write_particlesystems(wd, &ob->particlesystem); | write_particlesystems(wd, &ob->particlesystem); | ||||
| write_modifiers(wd, &ob->modifiers); | write_modifiers(wd, &ob->modifiers); | ||||
| write_gpencil_modifiers(wd, &ob->greasepencil_modifiers); | write_gpencil_modifiers(wd, &ob->greasepencil_modifiers); | ||||
| write_shaderfxs(wd, &ob->shader_fx); | |||||
| writelist(wd, DATA, LinkData, &ob->pc_ids); | writelist(wd, DATA, LinkData, &ob->pc_ids); | ||||
| writelist(wd, DATA, LodLevel, &ob->lodlevels); | writelist(wd, DATA, LodLevel, &ob->lodlevels); | ||||
| write_previews(wd, ob->preview); | write_previews(wd, ob->preview); | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 2,357 Lines • Show Last 20 Lines | |||||