Cleanup: remove unused function
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
||||
Reference in New Issue
Block a user