Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gpencil/gpencil_convert.c
| Show First 20 Lines • Show All 156 Lines • ▼ Show 20 Lines | static void gp_strokepoint_convertcoords(bContext *C, | ||||
| bGPDstroke *gps, | bGPDstroke *gps, | ||||
| bGPDspoint *source_pt, | bGPDspoint *source_pt, | ||||
| float p3d[3], | float p3d[3], | ||||
| const rctf *subrect) | const rctf *subrect) | ||||
| { | { | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| View3D *v3d = CTX_wm_view3d(C); | View3D *v3d = CTX_wm_view3d(C); | ||||
| ARegion *ar = CTX_wm_region(C); | ARegion *ar = CTX_wm_region(C); | ||||
| Depsgraph *depsgraph = CTX_data_depsgraph(C); | /* TODO(sergey): This function might be called from a loop, but no tagging is happening in it, | ||||
| * so it's not that expensive to ensure evaluated depsgraph here. However, ideally all the | |||||
| * parameters are to wrapped into a context style struct and queried from Context once.*/ | |||||
| Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); | |||||
| Object *obact = CTX_data_active_object(C); | Object *obact = CTX_data_active_object(C); | ||||
| bGPDspoint mypt, *pt; | bGPDspoint mypt, *pt; | ||||
| float diff_mat[4][4]; | float diff_mat[4][4]; | ||||
| pt = &mypt; | pt = &mypt; | ||||
| /* apply parent transform */ | /* apply parent transform */ | ||||
| float fpt[3]; | float fpt[3]; | ||||
| ▲ Show 20 Lines • Show All 314 Lines • ▼ Show 20 Lines | static void gp_stroke_path_animation_add_keyframes(Depsgraph *depsgraph, | ||||
| } | } | ||||
| } | } | ||||
| static void gp_stroke_path_animation(bContext *C, | static void gp_stroke_path_animation(bContext *C, | ||||
| ReportList *reports, | ReportList *reports, | ||||
| Curve *cu, | Curve *cu, | ||||
| tGpTimingData *gtd) | tGpTimingData *gtd) | ||||
| { | { | ||||
| Depsgraph *depsgraph = CTX_data_depsgraph(C); | Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); | ||||
| Main *bmain = CTX_data_main(C); | Main *bmain = CTX_data_main(C); | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| bAction *act; | bAction *act; | ||||
| FCurve *fcu; | FCurve *fcu; | ||||
| PointerRNA ptr; | PointerRNA ptr; | ||||
| PropertyRNA *prop = NULL; | PropertyRNA *prop = NULL; | ||||
| int nbr_gaps = 0, i; | int nbr_gaps = 0, i; | ||||
| ▲ Show 20 Lines • Show All 740 Lines • ▼ Show 20 Lines | static int gp_camera_view_subrect(bContext *C, rctf *subrect) | ||||
| ARegion *ar = CTX_wm_region(C); | ARegion *ar = CTX_wm_region(C); | ||||
| if (v3d) { | if (v3d) { | ||||
| RegionView3D *rv3d = ar->regiondata; | RegionView3D *rv3d = ar->regiondata; | ||||
| /* for camera view set the subrect */ | /* for camera view set the subrect */ | ||||
| if (rv3d->persp == RV3D_CAMOB) { | if (rv3d->persp == RV3D_CAMOB) { | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| Depsgraph *depsgraph = CTX_data_depsgraph(C); | Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); | ||||
| ED_view3d_calc_camera_border(scene, depsgraph, ar, v3d, rv3d, subrect, true); | ED_view3d_calc_camera_border(scene, depsgraph, ar, v3d, rv3d, subrect, true); | ||||
| return 1; | return 1; | ||||
| } | } | ||||
| } | } | ||||
| return 0; | return 0; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 500 Lines • Show Last 20 Lines | |||||