Cleanup: remove unused function

This commit is contained in:
Campbell Barton
2019-03-26 12:50:36 +11:00
parent adfdae3fc2
commit da4dc6847b
2 changed files with 0 additions and 45 deletions

View File

@@ -435,7 +435,6 @@ void ED_view3d_check_mats_rv3d(struct RegionView3D *rv3d);
# define ED_view3d_clear_mats_rv3d(rv3d) (void)(rv3d)
# define ED_view3d_check_mats_rv3d(rv3d) (void)(rv3d)
#endif
int ED_view3d_view_layer_set(int lay, const bool *values, int *active);
struct RV3DMatrixStore *ED_view3d_mats_rv3d_backup(struct RegionView3D *rv3d);
void ED_view3d_mats_rv3d_restore(struct RegionView3D *rv3d, struct RV3DMatrixStore *rv3dmat);

View File

@@ -1443,47 +1443,3 @@ void VIEW3D_OT_localview_remove_from(wmOperatorType *ot)
}
/** \} */
/* -------------------------------------------------------------------- */
/** \name View Layer Utilities
* \{ */
int ED_view3d_view_layer_set(int lay, const bool *values, int *active)
{
int i, tot = 0;
/* ensure we always have some layer selected */
for (i = 0; i < 20; i++)
if (values[i])
tot++;
if (tot == 0)
return lay;
for (i = 0; i < 20; i++) {
if (active) {
/* if this value has just been switched on, make that layer active */
if (values[i] && (lay & (1 << i)) == 0) {
*active = (1 << i);
}
}
if (values[i]) lay |= (1 << i);
else lay &= ~(1 << i);
}
/* ensure always an active layer */
if (active && (lay & *active) == 0) {
for (i = 0; i < 20; i++) {
if (lay & (1 << i)) {
*active = 1 << i;
break;
}
}
}
return lay;
}
/** \} */