[Bf-blender-cvs] [0c58ad8a34c] master: Cleanup: remove unused common_restrict_check function

Campbell Barton noreply at git.blender.org
Wed Mar 17 23:09:41 CET 2021


Commit: 0c58ad8a34c55344262ac74fce87888beb464155
Author: Campbell Barton
Date:   Thu Mar 18 09:04:26 2021 +1100
Branches: master
https://developer.blender.org/rB0c58ad8a34c55344262ac74fce87888beb464155

Cleanup: remove unused common_restrict_check function

Since c10ad8e9eabea8a10d35efea3860cc345977e4f9 hiding edit-mode objects
is supported.

Although this function had already been removed in
aeb8e81f2741aabc95d14bce7a83cef45481959c.

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

M	source/blender/editors/space_outliner/outliner_edit.c
M	source/blender/editors/space_outliner/outliner_intern.h

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

diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c
index 5501e52d69b..681f7fab18a 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -1104,36 +1104,6 @@ bool outliner_flag_flip(ListBase *lb, short flag)
 
 /** \} */
 
-/* -------------------------------------------------------------------- */
-/** \name Restriction Column Utility
- * \{ */
-
-/* same check needed for both object operation and restrict column button func
- * return 0 when in edit mode (cannot restrict view or select)
- * otherwise return 1 */
-int common_restrict_check(bContext *C, Object *ob)
-{
-  /* Don't allow hide an object in edit mode,
-   * check the bugs (T22153 and T21609, T23977).
-   */
-  Object *obedit = CTX_data_edit_object(C);
-  if (obedit && obedit == ob) {
-    /* found object is hidden, reset */
-    if (ob->restrictflag & OB_RESTRICT_VIEWPORT) {
-      ob->restrictflag &= ~OB_RESTRICT_VIEWPORT;
-    }
-    /* found object is unselectable, reset */
-    if (ob->restrictflag & OB_RESTRICT_SELECT) {
-      ob->restrictflag &= ~OB_RESTRICT_SELECT;
-    }
-    return 0;
-  }
-
-  return 1;
-}
-
-/** \} */
-
 /* -------------------------------------------------------------------- */
 /** \name Toggle Expanded (Outliner) Operator
  * \{ */
diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h
index 593c33bd3df..f65e273c1b5 100644
--- a/source/blender/editors/space_outliner/outliner_intern.h
+++ b/source/blender/editors/space_outliner/outliner_intern.h
@@ -349,8 +349,6 @@ void outliner_do_object_operation(struct bContext *C,
                                   struct ListBase *lb,
                                   outliner_operation_fn operation_fn);
 
-int common_restrict_check(struct bContext *C, struct Object *ob);
-
 int outliner_flag_is_any_test(ListBase *lb, short flag, const int curlevel);
 bool outliner_flag_set(ListBase *lb, short flag, short set);
 bool outliner_flag_flip(ListBase *lb, short flag);



More information about the Bf-blender-cvs mailing list