Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-03-11 03:59:53 +0300
committerCampbell Barton <campbell@blender.org>2022-03-11 04:00:08 +0300
commitd73726dbbe82709ea11995f6be0d28f6290fec26 (patch)
tree51013e5a315763988c20bed66685e114404ad89c
parent0327a464ba40db4c555831520c8a5dd2248e47b0 (diff)
Cleanup: use doxy sections for the outliner
-rw-r--r--source/blender/editors/space_outliner/outliner_dragdrop.cc58
-rw-r--r--source/blender/editors/space_outliner/outliner_ops.cc6
-rw-r--r--source/blender/editors/space_outliner/outliner_select.cc26
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.cc33
4 files changed, 96 insertions, 27 deletions
diff --git a/source/blender/editors/space_outliner/outliner_dragdrop.cc b/source/blender/editors/space_outliner/outliner_dragdrop.cc
index 7a2f56eaaaa..ba4c3b0e595 100644
--- a/source/blender/editors/space_outliner/outliner_dragdrop.cc
+++ b/source/blender/editors/space_outliner/outliner_dragdrop.cc
@@ -46,7 +46,9 @@
static Collection *collection_parent_from_ID(ID *id);
-/* ******************** Drop Target Find *********************** */
+/* -------------------------------------------------------------------- */
+/** \name Drop Target Find
+ * \{ */
static TreeElement *outliner_dropzone_element(TreeElement *te,
const float fmval[2],
@@ -254,7 +256,11 @@ static int outliner_get_insert_index(TreeElement *drag_te,
return BLI_findindex(listbase, drop_te->directdata);
}
-/* ******************** Parent Drop Operator *********************** */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Parent Drop Operator
+ * \{ */
static bool parent_drop_allowed(TreeElement *te, Object *potential_child)
{
@@ -443,7 +449,11 @@ void OUTLINER_OT_parent_drop(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
}
-/* ******************** Parent Clear Operator *********************** */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Parent Clear Operator
+ * \{ */
static bool parent_clear_poll(bContext *C, wmDrag *drag, const wmEvent *event)
{
@@ -527,7 +537,11 @@ void OUTLINER_OT_parent_clear(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
}
-/* ******************** Scene Drop Operator *********************** */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Scene Drop Operator
+ * \{ */
static bool scene_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event)
{
@@ -592,7 +606,11 @@ void OUTLINER_OT_scene_drop(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
}
-/* ******************** Material Drop Operator *********************** */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Material Drop Operator
+ * \{ */
static bool material_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event)
{
@@ -641,15 +659,19 @@ void OUTLINER_OT_material_drop(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
}
-/* ******************** Data Stack Drop Operator *********************** */
+/** \} */
-/* A generic operator to allow drag and drop for modifiers, constraints,
+/* -------------------------------------------------------------------- */
+/** \name Data Stack Drop Operator
+ *
+ * A generic operator to allow drag and drop for modifiers, constraints,
* and shader effects which all share the same UI stack layout.
*
* The following operations are allowed:
* - Reordering within an object.
* - Copying a single modifier/constraint/effect to another object.
- * - Copying (linking) an object's modifiers/constraints/effects to another. */
+ * - Copying (linking) an object's modifiers/constraints/effects to another.
+ * \{ */
enum eDataStackDropAction {
DATA_STACK_DROP_REORDER,
@@ -1069,7 +1091,11 @@ void OUTLINER_OT_datastack_drop(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
}
-/* ******************** Collection Drop Operator *********************** */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Collection Drop Operator
+ * \{ */
struct CollectionDrop {
Collection *from;
@@ -1350,7 +1376,11 @@ void OUTLINER_OT_collection_drop(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
}
-/* ********************* Outliner Drag Operator ******************** */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Outliner Drag Operator
+ * \{ */
#define OUTLINER_DRAG_SCOLL_OUTSIDE_PAD 7 /* In UI units */
@@ -1528,7 +1558,11 @@ void OUTLINER_OT_item_drag_drop(wmOperatorType *ot)
#undef OUTLINER_DRAG_SCOLL_OUTSIDE_PAD
-/* *************************** Drop Boxes ************************** */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Drop Boxes
+ * \{ */
void outliner_dropboxes(void)
{
@@ -1551,3 +1585,5 @@ void outliner_dropboxes(void)
nullptr,
collection_drop_tooltip);
}
+
+/** \} */
diff --git a/source/blender/editors/space_outliner/outliner_ops.cc b/source/blender/editors/space_outliner/outliner_ops.cc
index 69a691aeb50..8baac45666e 100644
--- a/source/blender/editors/space_outliner/outliner_ops.cc
+++ b/source/blender/editors/space_outliner/outliner_ops.cc
@@ -11,7 +11,9 @@
#include "outliner_intern.hh"
-/* ************************** registration **********************************/
+/* -------------------------------------------------------------------- */
+/** \name Registration
+ * \{ */
void outliner_operatortypes(void)
{
@@ -97,3 +99,5 @@ void outliner_keymap(wmKeyConfig *keyconf)
{
WM_keymap_ensure(keyconf, "Outliner", SPACE_OUTLINER, 0);
}
+
+/** \} */
diff --git a/source/blender/editors/space_outliner/outliner_select.cc b/source/blender/editors/space_outliner/outliner_select.cc
index 7cdfa441eaa..233051f31ff 100644
--- a/source/blender/editors/space_outliner/outliner_select.cc
+++ b/source/blender/editors/space_outliner/outliner_select.cc
@@ -68,6 +68,10 @@
using namespace blender::ed::outliner;
+/* -------------------------------------------------------------------- */
+/** \name Internal Utilities
+ * \{ */
+
/**
* \note changes to selection are by convention and not essential.
*
@@ -199,8 +203,11 @@ void outliner_item_mode_toggle(bContext *C,
}
}
-/* ****************************************************** */
-/* Outliner Element Selection/Activation on Click */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Outliner Element Selection/Activation on Click Operator
+ * \{ */
static void tree_element_viewlayer_activate(bContext *C, TreeElement *te)
{
@@ -1700,9 +1707,12 @@ void OUTLINER_OT_item_activate(wmOperatorType *ot)
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
-/* ****************************************************** */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Box Select Operator
+ * \{ */
-/* **************** Box Select Tool ****************** */
static void outliner_item_box_select(bContext *C,
SpaceOutliner *space_outliner,
Scene *scene,
@@ -1809,9 +1819,11 @@ void OUTLINER_OT_select_box(wmOperatorType *ot)
WM_operator_properties_select_operation_simple(ot);
}
-/* ****************************************************** */
+/** \} */
-/* **************** Walk Select Tool ****************** */
+/* -------------------------------------------------------------------- */
+/** \name Walk Select Operator
+ * \{ */
/* Given a tree element return the rightmost child that is visible in the outliner */
static TreeElement *outliner_find_rightmost_visible_child(SpaceOutliner *space_outliner,
@@ -2036,4 +2048,4 @@ void OUTLINER_OT_select_walk(wmOperatorType *ot)
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
-/* ****************************************************** */
+/** \} */
diff --git a/source/blender/editors/space_outliner/outliner_tree.cc b/source/blender/editors/space_outliner/outliner_tree.cc
index 06a5918f25c..1a772287dfa 100644
--- a/source/blender/editors/space_outliner/outliner_tree.cc
+++ b/source/blender/editors/space_outliner/outliner_tree.cc
@@ -74,8 +74,9 @@ using namespace blender::ed::outliner;
/* prototypes */
static int outliner_exclude_filter_get(const SpaceOutliner *space_outliner);
-/* ********************************************************* */
-/* Persistent Data */
+/* -------------------------------------------------------------------- */
+/** \name Persistent Data
+ * \{ */
static void outliner_storage_cleanup(SpaceOutliner *space_outliner)
{
@@ -175,8 +176,11 @@ static void check_persistent(
BKE_outliner_treehash_add_element(space_outliner->runtime->treehash, tselem);
}
-/* ********************************************************* */
-/* Tree Management */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Tree Management
+ * \{ */
void outliner_free_tree(ListBase *tree)
{
@@ -960,10 +964,14 @@ TreeElement *outliner_add_collection_recursive(SpaceOutliner *space_outliner,
return ten;
}
+/** \} */
+
/* ======================================================= */
/* Generic Tree Building helpers - order these are called is top to bottom */
-/* Sorting ------------------------------------------------------ */
+/* -------------------------------------------------------------------- */
+/** \name Tree Sorting Helper
+ * \{ */
struct tTreeSort {
TreeElement *te;
@@ -1195,7 +1203,11 @@ static void outliner_collections_children_sort(ListBase *lb)
}
}
-/* Filtering ----------------------------------------------- */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Tree Filtering Helper
+ * \{ */
struct OutlinerTreeElementFocus {
TreeStoreElem *tselem;
@@ -1644,8 +1656,11 @@ static void outliner_clear_newid_from_main(Main *bmain)
FOREACH_MAIN_ID_END;
}
-/* ======================================================= */
-/* Main Tree Building API */
+/** \} */
+
+/* -------------------------------------------------------------------- */
+/** \name Main Tree Building API
+ * \{ */
void outliner_build_tree(Main *mainvar,
Scene *scene,
@@ -1707,3 +1722,5 @@ void outliner_build_tree(Main *mainvar,
* as this expects valid IDs in this pointer, not random unknown data. */
outliner_clear_newid_from_main(mainvar);
}
+
+/** \} */