Fix T68202: GPencil Set Origin do not refresh until object is moved

This commit is contained in:
Antonio Vazquez 2019-08-04 10:21:02 +02:00
parent 18540f41d7
commit dd3cdf6f1e
Notes: blender-bot 2023-02-14 01:22:28 +01:00
Referenced by issue #68272, Blender close when I finish to use annotate and i have option Simplify Stroke active in preferences
Referenced by issue #68202, Grease Pencil: Set Origin do not refresh until GP object is moved
1 changed files with 3 additions and 2 deletions

View File

@ -1337,12 +1337,13 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
}
}
}
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
tot_change++;
if (centermode == ORIGIN_TO_GEOMETRY) {
copy_v3_v3(ob->loc, gpcenter);
}
DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM);
ob->id.tag |= LIB_TAG_DOIT;
do_inverse_offset = true;
}