Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/physics/physics_fluid.c
| Show First 20 Lines • Show All 325 Lines • ▼ Show 20 Lines | if (fobj->VertexCache) { | ||||
| fobj->VertexCache = NULL; | fobj->VertexCache = NULL; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| static void fluid_init_all_channels(bContext *C, Object *UNUSED(fsDomain), FluidsimSettings *domainSettings, FluidAnimChannels *channels, ListBase *fobjects) | static void fluid_init_all_channels(bContext *C, Object *UNUSED(fsDomain), FluidsimSettings *domainSettings, FluidAnimChannels *channels, ListBase *fobjects) | ||||
| { | { | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| SceneLayer *sl = CTX_data_scene_layer(C); | ViewLayer *sl = CTX_data_view_layer(C); | ||||
| Depsgraph *depsgraph = CTX_data_depsgraph(C); | Depsgraph *depsgraph = CTX_data_depsgraph(C); | ||||
| EvaluationContext eval_ctx; | EvaluationContext eval_ctx; | ||||
| Base *base; | Base *base; | ||||
| int i; | int i; | ||||
| int length = channels->length; | int length = channels->length; | ||||
| float eval_time; | float eval_time; | ||||
| CTX_data_eval_ctx(C, &eval_ctx); | CTX_data_eval_ctx(C, &eval_ctx); | ||||
| ▲ Show 20 Lines • Show All 232 Lines • ▼ Show 20 Lines | for (fobj=fobjects->first; fobj; fobj=fobj->next) { | ||||
| elbeemAddMesh(&fsmesh); | elbeemAddMesh(&fsmesh); | ||||
| if (verts) MEM_freeN(verts); | if (verts) MEM_freeN(verts); | ||||
| if (tris) MEM_freeN(tris); | if (tris) MEM_freeN(tris); | ||||
| } | } | ||||
| } | } | ||||
| static int fluid_validate_scene(ReportList *reports, SceneLayer *sl, Object *fsDomain) | static int fluid_validate_scene(ReportList *reports, ViewLayer *sl, Object *fsDomain) | ||||
| { | { | ||||
| Base *base; | Base *base; | ||||
| Object *newdomain = NULL; | Object *newdomain = NULL; | ||||
| int channelObjCount = 0; | int channelObjCount = 0; | ||||
| int fluidInputCount = 0; | int fluidInputCount = 0; | ||||
| for (base = FIRSTBASE(sl); base; base = base->next) { | for (base = FIRSTBASE(sl); base; base = base->next) { | ||||
| Object *ob = base->object; | Object *ob = base->object; | ||||
| ▲ Show 20 Lines • Show All 249 Lines • ▼ Show 20 Lines | static void fluidsim_delete_until_lastframe(FluidsimSettings *fss, const char *relbase) | ||||
| } while (exists); | } while (exists); | ||||
| return; | return; | ||||
| } | } | ||||
| static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, short do_job) | static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, short do_job) | ||||
| { | { | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| SceneLayer *sl = CTX_data_scene_layer(C); | ViewLayer *sl = CTX_data_view_layer(C); | ||||
| Depsgraph *depsgraph = CTX_data_depsgraph(C); | Depsgraph *depsgraph = CTX_data_depsgraph(C); | ||||
| int i; | int i; | ||||
| FluidsimSettings *domainSettings; | FluidsimSettings *domainSettings; | ||||
| char debugStrBuffer[256]; | char debugStrBuffer[256]; | ||||
| int gridlevels = 0; | int gridlevels = 0; | ||||
| const char *relbase= modifier_path_relbase(fsDomain); | const char *relbase= modifier_path_relbase(fsDomain); | ||||
| ▲ Show 20 Lines • Show All 274 Lines • Show Last 20 Lines | |||||