Cleanup: remove unused functions
This commit is contained in:
@@ -1056,23 +1056,6 @@ bGPDlayer *BKE_gpencil_layer_named_get(bGPdata *gpd, const char *name)
|
||||
return static_cast<bGPDlayer *>(BLI_findstring(&gpd->layers, name, offsetof(bGPDlayer, info)));
|
||||
}
|
||||
|
||||
static int gpencil_cb_sort_masks(const void *arg1, const void *arg2)
|
||||
{
|
||||
/* sort is inverted as layer list. */
|
||||
const bGPDlayer_Mask *mask1 = static_cast<const bGPDlayer_Mask *>(arg1);
|
||||
const bGPDlayer_Mask *mask2 = static_cast<const bGPDlayer_Mask *>(arg2);
|
||||
int val = 0;
|
||||
|
||||
if (mask1->sort_index < mask2->sort_index) {
|
||||
val = 1;
|
||||
}
|
||||
else if (mask1->sort_index > mask2->sort_index) {
|
||||
val = -1;
|
||||
}
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
static int gpencil_cb_cmp_frame(void *thunk, const void *a, const void *b)
|
||||
{
|
||||
const bGPDframe *frame_a = static_cast<const bGPDframe *>(a);
|
||||
|
||||
@@ -260,34 +260,6 @@ void gpencil_point_to_xy(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper to convert 2d to 3d for simple drawing buffer.
|
||||
*/
|
||||
static void gpencil_stroke_convertcoords(ARegion *region,
|
||||
const tGPspoint *point2D,
|
||||
const float origin[3],
|
||||
float out[3])
|
||||
{
|
||||
float mval_prj[2];
|
||||
float rvec[3];
|
||||
|
||||
copy_v3_v3(rvec, origin);
|
||||
|
||||
const float zfac = ED_view3d_calc_zfac(static_cast<const RegionView3D *>(region->regiondata),
|
||||
rvec);
|
||||
|
||||
if (ED_view3d_project_float_global(region, rvec, mval_prj, V3D_PROJ_TEST_NOP) == V3D_PROJ_RET_OK)
|
||||
{
|
||||
float dvec[3];
|
||||
float xy_delta[2];
|
||||
sub_v2_v2v2(xy_delta, mval_prj, point2D->m_xy);
|
||||
ED_view3d_win_to_delta(region, xy_delta, zfac, dvec);
|
||||
sub_v3_v3v3(out, rvec, dvec);
|
||||
}
|
||||
else {
|
||||
zero_v3(out);
|
||||
}
|
||||
}
|
||||
|
||||
tGPspoint *ED_gpencil_sbuffer_ensure(tGPspoint *buffer_array,
|
||||
int *buffer_size,
|
||||
|
||||
Reference in New Issue
Block a user