Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gpencil/gpencil_primitive.c
| Show First 20 Lines • Show All 1,067 Lines • ▼ Show 20 Lines | if (!is_depth) { | ||||
| ED_gpencil_drawing_reference_get(tgpi->scene, tgpi->ob, ts->gpencil_v3d_align, origin); | ED_gpencil_drawing_reference_get(tgpi->scene, tgpi->ob, ts->gpencil_v3d_align, origin); | ||||
| ED_gpencil_project_stroke_to_plane( | ED_gpencil_project_stroke_to_plane( | ||||
| tgpi->scene, tgpi->ob, tgpi->rv3d, tgpi->gpl, gps, origin, ts->gp_sculpt.lock_axis - 1); | tgpi->scene, tgpi->ob, tgpi->rv3d, tgpi->gpl, gps, origin, ts->gp_sculpt.lock_axis - 1); | ||||
| } | } | ||||
| /* if parented change position relative to parent object */ | /* if parented change position relative to parent object */ | ||||
| for (int i = 0; i < gps->totpoints; i++) { | for (int i = 0; i < gps->totpoints; i++) { | ||||
| bGPDspoint *pt = &gps->points[i]; | bGPDspoint *pt = &gps->points[i]; | ||||
| gpencil_apply_parent_point(tgpi->depsgraph, tgpi->ob, tgpi->gpl, pt); | gpencil_world_to_object_space_point(tgpi->depsgraph, tgpi->ob, tgpi->gpl, pt); | ||||
| } | } | ||||
| /* If camera view or view projection, reproject flat to view to avoid perspective effect. */ | /* If camera view or view projection, reproject flat to view to avoid perspective effect. */ | ||||
| if ((!is_depth) && (((align_flag & GP_PROJECT_VIEWSPACE) && is_lock_axis_view) || (is_camera))) { | if ((!is_depth) && (((align_flag & GP_PROJECT_VIEWSPACE) && is_lock_axis_view) || (is_camera))) { | ||||
| ED_gpencil_project_stroke_to_view(C, tgpi->gpl, gps); | ED_gpencil_project_stroke_to_view(C, tgpi->gpl, gps); | ||||
| } | } | ||||
| /* Calc geometry data. */ | /* Calc geometry data. */ | ||||
| ▲ Show 20 Lines • Show All 1,050 Lines • Show Last 20 Lines | |||||