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 5,221 Lines • ▼ Show 20 Lines | else if (md->type == eModifierType_Smoke) { | ||||
| } | } | ||||
| } | } | ||||
| else if (md->type == eModifierType_DynamicPaint) { | else if (md->type == eModifierType_DynamicPaint) { | ||||
| DynamicPaintModifierData *pmd = (DynamicPaintModifierData *)md; | DynamicPaintModifierData *pmd = (DynamicPaintModifierData *)md; | ||||
| if (pmd->canvas) { | if (pmd->canvas) { | ||||
| pmd->canvas = newdataadr(fd, pmd->canvas); | pmd->canvas = newdataadr(fd, pmd->canvas); | ||||
| pmd->canvas->pmd = pmd; | pmd->canvas->pmd = pmd; | ||||
| pmd->canvas->dm = NULL; | pmd->canvas->mesh = NULL; | ||||
| pmd->canvas->flags &= ~MOD_DPAINT_BAKING; /* just in case */ | pmd->canvas->flags &= ~MOD_DPAINT_BAKING; /* just in case */ | ||||
| if (pmd->canvas->surfaces.first) { | if (pmd->canvas->surfaces.first) { | ||||
| DynamicPaintSurface *surface; | DynamicPaintSurface *surface; | ||||
| link_list(fd, &pmd->canvas->surfaces); | link_list(fd, &pmd->canvas->surfaces); | ||||
| for (surface=pmd->canvas->surfaces.first; surface; surface=surface->next) { | for (surface=pmd->canvas->surfaces.first; surface; surface=surface->next) { | ||||
| surface->canvas = pmd->canvas; | surface->canvas = pmd->canvas; | ||||
| surface->data = NULL; | surface->data = NULL; | ||||
| direct_link_pointcache_list(fd, &(surface->ptcaches), &(surface->pointcache), 1); | direct_link_pointcache_list(fd, &(surface->ptcaches), &(surface->pointcache), 1); | ||||
| if (!(surface->effector_weights = newdataadr(fd, surface->effector_weights))) | if (!(surface->effector_weights = newdataadr(fd, surface->effector_weights))) | ||||
| surface->effector_weights = BKE_add_effector_weights(NULL); | surface->effector_weights = BKE_add_effector_weights(NULL); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| if (pmd->brush) { | if (pmd->brush) { | ||||
| pmd->brush = newdataadr(fd, pmd->brush); | pmd->brush = newdataadr(fd, pmd->brush); | ||||
| pmd->brush->pmd = pmd; | pmd->brush->pmd = pmd; | ||||
| pmd->brush->psys = newdataadr(fd, pmd->brush->psys); | pmd->brush->psys = newdataadr(fd, pmd->brush->psys); | ||||
| pmd->brush->paint_ramp = newdataadr(fd, pmd->brush->paint_ramp); | pmd->brush->paint_ramp = newdataadr(fd, pmd->brush->paint_ramp); | ||||
| pmd->brush->vel_ramp = newdataadr(fd, pmd->brush->vel_ramp); | pmd->brush->vel_ramp = newdataadr(fd, pmd->brush->vel_ramp); | ||||
| pmd->brush->dm = NULL; | pmd->brush->mesh = NULL; | ||||
| } | } | ||||
| } | } | ||||
| else if (md->type == eModifierType_Collision) { | else if (md->type == eModifierType_Collision) { | ||||
| CollisionModifierData *collmd = (CollisionModifierData *)md; | CollisionModifierData *collmd = (CollisionModifierData *)md; | ||||
| #if 0 | #if 0 | ||||
| // TODO: CollisionModifier should use pointcache | // TODO: CollisionModifier should use pointcache | ||||
| // + have proper reset events before enabling this | // + have proper reset events before enabling this | ||||
| collmd->x = newdataadr(fd, collmd->x); | collmd->x = newdataadr(fd, collmd->x); | ||||
| ▲ Show 20 Lines • Show All 5,721 Lines • Show Last 20 Lines | |||||