Fix T101455: GPencil Gizmo in wrong location when using Active Element
The gizmo was not set when this option was selected. By design, in grease pencil the active element option uses the object origin as pivot point.
This commit is contained in:
parent
b70b02ee42
commit
f6c2f1c65e
Notes:
blender-bot
2023-02-14 09:21:21 +01:00
Referenced by commit 520d111eca
, Cleanup: Simplify code and remove duplications
Referenced by issue #100749, Blender LTS: Maintenance Task 3.3
Referenced by issue #101455, Grease Pencil: Active element transform pivot uses wrong gizmo location
|
@ -1101,8 +1101,13 @@ static void gizmo_prepare_mat(const bContext *C,
|
|||
|
||||
if (scene->toolsettings->transform_pivot_point == V3D_AROUND_ACTIVE) {
|
||||
bGPdata *gpd = CTX_data_gpencil_data(C);
|
||||
/* Grease Pencil uses object origin. */
|
||||
if (gpd && (gpd->flag & GP_DATA_STROKE_EDITMODE)) {
|
||||
/* pass */
|
||||
BKE_view_layer_synced_ensure(scene, view_layer);
|
||||
Object *ob = BKE_view_layer_active_object_get(view_layer);
|
||||
if (ob != NULL) {
|
||||
ED_object_calc_active_center(ob, false, rv3d->twmat[3]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
BKE_view_layer_synced_ensure(scene, view_layer);
|
||||
|
|
Loading…
Reference in New Issue