Commit: 8a125e3b55de11558e12ecd5e41700c8f3b55662 Author: Campbell Barton Date: Tue Mar 19 23:55:04 2019 +1100 Branches: master https://developer.blender.org/rB8a125e3b55de11558e12ecd5e41700c8f3b55662
Cleanup: remove unused for gpencil bounds calculation =================================================================== M source/blender/blenkernel/BKE_gpencil.h M source/blender/blenkernel/intern/gpencil.c =================================================================== diff --git a/source/blender/blenkernel/BKE_gpencil.h b/source/blender/blenkernel/BKE_gpencil.h index eb4101fa2f7..353ba61b70d 100644 --- a/source/blender/blenkernel/BKE_gpencil.h +++ b/source/blender/blenkernel/BKE_gpencil.h @@ -136,13 +136,13 @@ struct Material *BKE_gpencil_material_ensure(struct Main *bmain, struct Object * /* object boundbox */ bool BKE_gpencil_data_minmax( - struct Object *ob, const struct bGPdata *gpd, - float r_min[3], float r_max[3]); + const struct bGPdata *gpd, + float r_min[3], float r_max[3]); bool BKE_gpencil_stroke_minmax( - const struct bGPDstroke *gps, const bool use_select, - float r_min[3], float r_max[3]); + const struct bGPDstroke *gps, const bool use_select, + float r_min[3], float r_max[3]); bool BKE_gpencil_stroke_select_check( - const struct bGPDstroke *gps); + const struct bGPDstroke *gps); struct BoundBox *BKE_gpencil_boundbox_get(struct Object *ob); void BKE_gpencil_centroid_3d(struct bGPdata *gpd, float r_centroid[3]); diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c index 454e9fe5847..eb6fc9ceeeb 100644 --- a/source/blender/blenkernel/intern/gpencil.c +++ b/source/blender/blenkernel/intern/gpencil.c @@ -1048,9 +1048,8 @@ bool BKE_gpencil_stroke_minmax( } /* get min/max bounds of all strokes in GP datablock */ -bool BKE_gpencil_data_minmax(Object *ob, const bGPdata *gpd, float r_min[3], float r_max[3]) +bool BKE_gpencil_data_minmax(const bGPdata *gpd, float r_min[3], float r_max[3]) { - float bmat[3][3]; bool changed = false; INIT_MINMAX(r_min, r_max); @@ -1068,14 +1067,6 @@ bool BKE_gpencil_data_minmax(Object *ob, const bGPdata *gpd, float r_min[3], flo } } - if ((changed) && (ob)) { - copy_m3_m4(bmat, ob->obmat); - mul_m3_v3(bmat, r_min); - add_v3_v3(r_min, ob->obmat[3]); - mul_m3_v3(bmat, r_max); - add_v3_v3(r_max, ob->obmat[3]); - } - return changed; } @@ -1097,7 +1088,7 @@ void BKE_gpencil_centroid_3d(bGPdata *gpd, float r_centroid[3]) { float min[3], max[3], tot[3]; - BKE_gpencil_data_minmax(NULL, gpd, min, max); + BKE_gpencil_data_minmax(gpd, min, max); add_v3_v3v3(tot, min, max); mul_v3_v3fl(r_centroid, tot, 0.5f); @@ -1118,7 +1109,7 @@ static void boundbox_gpencil(Object *ob) bb = ob->runtime.bb; gpd = ob->data; - if (!BKE_gpencil_data_minmax(NULL, gpd, min, max)) { + if (!BKE_gpencil_data_minmax(gpd, min, max)) { min[0] = min[1] = min[2] = -1.0f; max[0] = max[1] = max[2] = 1.0f; } _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs