[Bf-blender-cvs] [da4dc6847b0] master: Cleanup: remove unused function

Campbell Barton noreply at git.blender.org
Tue Mar 26 02:55:51 CET 2019


Commit: da4dc6847b0cbb53ab9cb343f074329b61c7aecf
Author: Campbell Barton
Date:   Tue Mar 26 12:50:36 2019 +1100
Branches: master
https://developer.blender.org/rBda4dc6847b0cbb53ab9cb343f074329b61c7aecf

Cleanup: remove unused function

===================================================================

M	source/blender/editors/include/ED_view3d.h
M	source/blender/editors/space_view3d/view3d_view.c

===================================================================

diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h
index e8cd6ebf5f3..04488aedf49 100644
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@ -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);
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index dd258329f66..85fc5122016 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -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;
-}
-
-/** \} */



More information about the Bf-blender-cvs mailing list