GPencil: Fix unreported set origin from Python

The set origin was not working from python because the operator was checking if the stroke was valid in the console area.

As the stroke only can be valid for GP obects, this check is not needed.
This commit is contained in:
Antonio Vazquez 2019-08-23 17:19:55 +02:00
parent 18f4182e98
commit 77f01748e7
Notes: blender-bot 2023-02-14 06:17:14 +01:00
Referenced by issue #68843, Invalid (pink) shader when using wireframe node [ Eevee ]
1 changed files with 0 additions and 5 deletions

View File

@ -1355,11 +1355,6 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
invert_m4_m4(inverse_diff_mat, diff_mat);
for (bGPDframe *gpf = gpl->frames.first; gpf; gpf = gpf->next) {
for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) {
/* skip strokes that are invalid for current view */
if (ED_gpencil_stroke_can_use(C, gps) == false) {
continue;
}
for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
float mpt[3];
mul_v3_m4v3(mpt, inverse_diff_mat, &pt->x);