Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gpencil/gpencil_primitive.c
| Show First 20 Lines • Show All 1,075 Lines • ▼ Show 20 Lines | static void gpencil_primitive_update_strokes(bContext *C, tGPDprimitive *tgpi) | ||||
| } | } | ||||
| /* 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_apply_parent_point(tgpi->depsgraph, tgpi->ob, tgpi->gpl, pt); | ||||
| } | } | ||||
| /* if camera view, reproject flat to view to avoid perspective effect */ | /* If camera view or view projection, reproject flat to view to avoid perspective effect. */ | ||||
| if (is_camera) { | if ((*p->align_flag & GP_PROJECT_VIEWSPACE) || 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. */ | ||||
| BKE_gpencil_stroke_geometry_update(gpd, gps); | BKE_gpencil_stroke_geometry_update(gpd, gps); | ||||
| /* Update evaluated data. */ | /* Update evaluated data. */ | ||||
| ED_gpencil_sbuffer_update_eval(tgpi->gpd, tgpi->ob_eval); | ED_gpencil_sbuffer_update_eval(tgpi->gpd, tgpi->ob_eval); | ||||
| ▲ Show 20 Lines • Show All 1,023 Lines • Show Last 20 Lines | |||||