Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/physics/physics_pointcache.c
| Show First 20 Lines • Show All 150 Lines • ▼ Show 20 Lines | |||||
| static PTCacheBaker *ptcache_baker_create(bContext *C, wmOperator *op, bool all) | static PTCacheBaker *ptcache_baker_create(bContext *C, wmOperator *op, bool all) | ||||
| { | { | ||||
| PTCacheBaker *baker = MEM_callocN(sizeof(PTCacheBaker), "PTCacheBaker"); | PTCacheBaker *baker = MEM_callocN(sizeof(PTCacheBaker), "PTCacheBaker"); | ||||
| baker->bmain = CTX_data_main(C); | baker->bmain = CTX_data_main(C); | ||||
| baker->scene = CTX_data_scene(C); | baker->scene = CTX_data_scene(C); | ||||
| baker->view_layer = CTX_data_view_layer(C); | baker->view_layer = CTX_data_view_layer(C); | ||||
| baker->depsgraph = CTX_data_depsgraph(C); | /* Depsgraph is used to sweep the frame range and evaluate scene at different times. */ | ||||
| baker->depsgraph = CTX_data_depsgraph_pointer(C); | |||||
| baker->bake = RNA_boolean_get(op->ptr, "bake"); | baker->bake = RNA_boolean_get(op->ptr, "bake"); | ||||
| baker->render = 0; | baker->render = 0; | ||||
| baker->anim_init = 0; | baker->anim_init = 0; | ||||
| baker->quick_step = 1; | baker->quick_step = 1; | ||||
| if (!all) { | if (!all) { | ||||
| PointerRNA ptr = CTX_data_pointer_get_type(C, "point_cache", &RNA_PointCache); | PointerRNA ptr = CTX_data_pointer_get_type(C, "point_cache", &RNA_PointCache); | ||||
| Object *ob = ptr.id.data; | Object *ob = ptr.id.data; | ||||
| ▲ Show 20 Lines • Show All 270 Lines • Show Last 20 Lines | |||||