Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/physics/particle_edit.c
| Show First 20 Lines • Show All 518 Lines • ▼ Show 20 Lines | |||||
| static void PE_set_view3d_data(bContext *C, PEData *data) | static void PE_set_view3d_data(bContext *C, PEData *data) | ||||
| { | { | ||||
| PE_set_data(C, data); | PE_set_data(C, data); | ||||
| ED_view3d_viewcontext_init(C, &data->vc, data->depsgraph); | ED_view3d_viewcontext_init(C, &data->vc, data->depsgraph); | ||||
| if (!XRAY_ENABLED(data->vc.v3d)) { | if (!XRAY_ENABLED(data->vc.v3d)) { | ||||
| if (data->vc.v3d->flag & V3D_INVALID_BACKBUF) { | if (!(data->vc.v3d->runtime.flag & V3D_RUNTIME_DEPTHBUF_OVERRIDDEN)) { | ||||
| /* needed or else the draw matrix can be incorrect */ | /* needed or else the draw matrix can be incorrect */ | ||||
| view3d_operator_needs_opengl(C); | view3d_operator_needs_opengl(C); | ||||
| ED_view3d_backbuf_depth_validate(&data->vc); | ED_view3d_depth_override(data->depsgraph, | ||||
| /* we may need to force an update here by setting the rv3d as dirty | data->vc.region, | ||||
| * for now it seems ok, but take care!: | data->vc.v3d, | ||||
| * rv3d->depths->dirty = 1; */ | data->vc.obact, | ||||
| ED_view3d_depth_update(data->vc.region); | V3D_DEPTH_OBJECT_ONLY, | ||||
| true); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| static bool PE_create_shape_tree(PEData *data, Object *shapeob) | static bool PE_create_shape_tree(PEData *data, Object *shapeob) | ||||
| { | { | ||||
| Object *shapeob_eval = DEG_get_evaluated_object(data->depsgraph, shapeob); | Object *shapeob_eval = DEG_get_evaluated_object(data->depsgraph, shapeob); | ||||
| Mesh *mesh = BKE_object_get_evaluated_mesh(shapeob_eval); | Mesh *mesh = BKE_object_get_evaluated_mesh(shapeob_eval); | ||||
| ▲ Show 20 Lines • Show All 5,122 Lines • Show Last 20 Lines | |||||