Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/readfile.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | |||||
| #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_effect_types.h" | #include "DNA_effect_types.h" | ||||
| #include "DNA_fileglobal_types.h" | #include "DNA_fileglobal_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_ipo_types.h" | #include "DNA_ipo_types.h" | ||||
| #include "DNA_key_types.h" | #include "DNA_key_types.h" | ||||
| #include "DNA_lattice_types.h" | #include "DNA_lattice_types.h" | ||||
| #include "DNA_layer_types.h" | #include "DNA_layer_types.h" | ||||
| #include "DNA_lamp_types.h" | #include "DNA_lamp_types.h" | ||||
| #include "DNA_linestyle_types.h" | #include "DNA_linestyle_types.h" | ||||
| #include "DNA_meta_types.h" | #include "DNA_meta_types.h" | ||||
| #include "DNA_material_types.h" | #include "DNA_material_types.h" | ||||
| ▲ Show 20 Lines • Show All 5,298 Lines • ▼ Show 20 Lines | else if (md->type == eModifierType_SurfaceDeform) { | ||||
| BLI_endian_switch_float_array(smd->verts[i].binds[j].vert_weights, smd->verts[i].binds[j].numverts); | BLI_endian_switch_float_array(smd->verts[i].binds[j].vert_weights, smd->verts[i].binds[j].numverts); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| else if (md->type == eModifierType_Gpencil_Lattice) { | } | ||||
| } | |||||
| static void direct_link_gpencil_modifiers(FileData *fd, ListBase *lb) | |||||
| { | |||||
| GpencilModifierData *md; | |||||
| link_list(fd, lb); | |||||
| for (md = lb->first; md; md = md->next) { | |||||
| md->error = NULL; | |||||
| md->scene = NULL; | |||||
| /* if modifiers disappear, or for upward compatibility */ | |||||
| if (NULL == modifierType_getInfo(md->type)) | |||||
| md->type = eModifierType_None; | |||||
| if (md->type == eGpencilModifierType_Lattice) { | |||||
| LatticeGpencilModifierData *gpmd = (LatticeGpencilModifierData*)md; | LatticeGpencilModifierData *gpmd = (LatticeGpencilModifierData*)md; | ||||
| gpmd->cache_data = NULL; | gpmd->cache_data = NULL; | ||||
| } | } | ||||
| else if (md->type == eModifierType_Gpencil_Hook) { | else if (md->type == eGpencilModifierType_Hook) { | ||||
| HookGpencilModifierData *hmd = (HookGpencilModifierData *)md; | HookGpencilModifierData *hmd = (HookGpencilModifierData *)md; | ||||
| hmd->curfalloff = newdataadr(fd, hmd->curfalloff); | hmd->curfalloff = newdataadr(fd, hmd->curfalloff); | ||||
| if (hmd->curfalloff) { | if (hmd->curfalloff) { | ||||
| direct_link_curvemapping(fd, hmd->curfalloff); | direct_link_curvemapping(fd, hmd->curfalloff); | ||||
| } | } | ||||
| } | } | ||||
| else if (md->type == eModifierType_Gpencil_Thick) { | else if (md->type == eGpencilModifierType_Thick) { | ||||
| ThickGpencilModifierData *gpmd = (ThickGpencilModifierData *)md; | ThickGpencilModifierData *gpmd = (ThickGpencilModifierData *)md; | ||||
| gpmd->curve_thickness = newdataadr(fd, gpmd->curve_thickness); | gpmd->curve_thickness = newdataadr(fd, gpmd->curve_thickness); | ||||
| if (gpmd->curve_thickness) { | if (gpmd->curve_thickness) { | ||||
| direct_link_curvemapping(fd, gpmd->curve_thickness); | direct_link_curvemapping(fd, gpmd->curve_thickness); | ||||
| /* initialize the curve. Maybe this could be moved to modififer logic */ | /* initialize the curve. Maybe this could be moved to modififer logic */ | ||||
| curvemapping_initialize(gpmd->curve_thickness); | curvemapping_initialize(gpmd->curve_thickness); | ||||
| } | } | ||||
| Show All 40 Lines | |||||
| // >>> XXX deprecated - old animation system | // >>> XXX deprecated - old animation system | ||||
| ob->mat= newdataadr(fd, ob->mat); | ob->mat= newdataadr(fd, ob->mat); | ||||
| test_pointer_array(fd, (void **)&ob->mat); | test_pointer_array(fd, (void **)&ob->mat); | ||||
| ob->matbits= newdataadr(fd, ob->matbits); | ob->matbits= newdataadr(fd, ob->matbits); | ||||
| /* do it here, below old data gets converted */ | /* do it here, below old data gets converted */ | ||||
| direct_link_modifiers(fd, &ob->modifiers); | direct_link_modifiers(fd, &ob->modifiers); | ||||
| direct_link_gpencil_modifiers(fd, &ob->greasepencil_modifiers); | |||||
| link_list(fd, &ob->effect); | link_list(fd, &ob->effect); | ||||
| paf= ob->effect.first; | paf= ob->effect.first; | ||||
| while (paf) { | while (paf) { | ||||
| if (paf->type == EFF_PARTICLE) { | if (paf->type == EFF_PARTICLE) { | ||||
| paf->keys = NULL; | paf->keys = NULL; | ||||
| } | } | ||||
| if (paf->type == EFF_WAVE) { | if (paf->type == EFF_WAVE) { | ||||
| ▲ Show 20 Lines • Show All 5,366 Lines • Show Last 20 Lines | |||||