[Bf-blender-cvs] [64bc6f3942d] soc-2020-greasepencil-curve: GPencil: Only allow rotations around control point
Falk David
noreply at git.blender.org
Wed Jul 1 00:46:05 CEST 2020
Commit: 64bc6f3942d4205994339752ec8ebfdd08369719
Author: Falk David
Date: Wed Jul 1 00:44:34 2020 +0200
Branches: soc-2020-greasepencil-curve
https://developer.blender.org/rB64bc6f3942d4205994339752ec8ebfdd08369719
GPencil: Only allow rotations around control point
Limit the center of rotation to only include the control points
===================================================================
M source/blender/editors/transform/transform_convert_gpencil.c
===================================================================
diff --git a/source/blender/editors/transform/transform_convert_gpencil.c b/source/blender/editors/transform/transform_convert_gpencil.c
index 425131c1af0..757b5fbbe94 100644
--- a/source/blender/editors/transform/transform_convert_gpencil.c
+++ b/source/blender/editors/transform/transform_convert_gpencil.c
@@ -52,20 +52,13 @@ static void createTransGPencil_curve_center_get(bGPDcurve *gpc, float r_center[3
bGPDcurve_point *gpc_pt = &gpc->curve_points[i];
if (gpc_pt->flag & GP_CURVE_POINT_SELECT) {
BezTriple *bezt = &gpc_pt->bezt;
- if (bezt->f1 & SELECT) {
- add_v3_v3(r_center, bezt->vec[0]);
- tot_sel++;
- }
+ /* only allow rotation around control point for now... */
if (bezt->f2 & SELECT) {
- add_v3_v3(r_center, bezt->vec[0]);
+ add_v3_v3(r_center, bezt->vec[1]);
tot_sel++;
}
- if (bezt->f3 & SELECT) {
- add_v3_v3(r_center, bezt->vec[0]);
- tot_sel++;
}
}
- }
if (tot_sel > 0) {
mul_v3_fl(r_center, 1.0f / tot_sel);
More information about the Bf-blender-cvs
mailing list