Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_gizmo_3d.c
| Show First 20 Lines • Show All 725 Lines • ▼ Show 20 Lines | |||||
| /* returns total items selected */ | /* returns total items selected */ | ||||
| int ED_transform_calc_gizmo_stats(const bContext *C, | int ED_transform_calc_gizmo_stats(const bContext *C, | ||||
| const struct TransformCalcParams *params, | const struct TransformCalcParams *params, | ||||
| struct TransformBounds *tbounds) | struct TransformBounds *tbounds) | ||||
| { | { | ||||
| ScrArea *sa = CTX_wm_area(C); | ScrArea *sa = CTX_wm_area(C); | ||||
| ARegion *ar = CTX_wm_region(C); | ARegion *ar = CTX_wm_region(C); | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| Depsgraph *depsgraph = CTX_data_depsgraph(C); | /* TODO(sergey): This function is used from operator's modal() and from gizmo's refresh(). | ||||
| * Is it fine to possibly evaluate dependency graph here? */ | |||||
| Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); | |||||
brecht: Probably better to use `expect_evaluated`? I don't really trust evaluating the depsgraph at… | |||||
| ViewLayer *view_layer = CTX_data_view_layer(C); | ViewLayer *view_layer = CTX_data_view_layer(C); | ||||
| View3D *v3d = sa->spacedata.first; | View3D *v3d = sa->spacedata.first; | ||||
| Object *obedit = CTX_data_edit_object(C); | Object *obedit = CTX_data_edit_object(C); | ||||
| RegionView3D *rv3d = ar->regiondata; | RegionView3D *rv3d = ar->regiondata; | ||||
| Base *base; | Base *base; | ||||
| Object *ob = OBACT(view_layer); | Object *ob = OBACT(view_layer); | ||||
| bGPdata *gpd = CTX_data_gpencil_data(C); | bGPdata *gpd = CTX_data_gpencil_data(C); | ||||
| const bool is_gp_edit = GPENCIL_ANY_MODE(gpd); | const bool is_gp_edit = GPENCIL_ANY_MODE(gpd); | ||||
| ▲ Show 20 Lines • Show All 1,690 Lines • Show Last 20 Lines | |||||
Probably better to use expect_evaluated? I don't really trust evaluating the depsgraph at this point.