Fix T58335: Grease Pencil Objects in Edit Mode have transform gizmos in wrong location
authorCharlie Jolly <mistajolly@gmail.com>
Tue, 18 Dec 2018 19:18:32 +0000 (19:18 +0000)
committerCharlie Jolly <mistajolly@gmail.com>
Tue, 18 Dec 2018 19:18:57 +0000 (19:18 +0000)
Original fix P874 with changes from @brecht

source/blender/editors/transform/transform_gizmo_3d.c

index 84d9930..1913e35 100644 (file)
@@ -782,9 +782,10 @@ int ED_transform_calc_gizmo_stats(
 
        if (is_gp_edit) {
                float diff_mat[4][4];
+               const bool use_mat_local = true;
                for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) {
                        /* only editable and visible layers are considered */
-                       const bool use_mat_local = gpl->parent != NULL;
+                       
                        if (gpencil_layer_is_editable(gpl) && (gpl->actframe != NULL)) {
 
                                /* calculate difference matrix */