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:
authorJoshua Leung <aligorith@gmail.com>2011-07-11 14:59:53 +0400
committerJoshua Leung <aligorith@gmail.com>2011-07-11 14:59:53 +0400
commit3e8712bf638673860ecb7a613ede8ada60bb3400 (patch)
tree4c4798a8e996b3d4393a56740d26a7eeec2a4e6b /source/blender/editors/space_outliner/outliner_intern.h
parent6160bc596f7a7d79aac4c1197c706fdcad7d1cf4 (diff)
== The great Outliner code split up ==
As per my proposal (http://lists.blender.org/pipermail/bf- committers/2011-July/032553.html), I've split outliner.c into several new files based on the purpose of the relevant code. * outliner_tree.c - building outliner structure * outliner_draw.c - outliner drawing (including toggle buttons and their handling) * outliner_edit.c - all operators for toggling stuff, and/or hotkey accessed operators. Also KeyingSet and Driver operators go here * outliner_tools.c - all operators and callbacks used for handling RMB click on items * outliner_select.c - stuff for selecting rows, and handling the active/selected toggling stuff In a few cases, the split hasn't been totally clear-cut due to cross- dependencies and other spaghetti. However, in a few cases, I have managed to remove the need for some of the prototypes that were needed in the past by judicious reshuffling of functions, which also makes it easier to actually find what you're looking for.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_intern.h')
-rw-r--r--source/blender/editors/space_outliner/outliner_intern.h88
1 files changed, 72 insertions, 16 deletions
diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h
index b2717ab5c44..85bbbd4fffb 100644
--- a/source/blender/editors/space_outliner/outliner_intern.h
+++ b/source/blender/editors/space_outliner/outliner_intern.h
@@ -44,6 +44,8 @@ struct TreeStoreElem;
struct bContext;
struct Scene;
struct ARegion;
+struct ID;
+struct Object;
typedef struct TreeElement {
struct TreeElement *next, *prev, *parent;
@@ -107,29 +109,65 @@ typedef struct TreeElement {
/* button events */
#define OL_NAMEBUTTON 1
+/* get TreeStoreElem associated with a TreeElement
+ * < a: (TreeElement) tree element to find stored element for
+ */
+#define TREESTORE(a) ((a)?soops->treestore->data+(a)->store_index:NULL)
-/* outliner_ops.c */
-void outliner_operatortypes(void);
-void outliner_keymap(struct wmKeyConfig *keyconf);
+/* size constants */
+#define OL_Y_OFFSET 2
-/* outliner_header.c */
-void outliner_header_buttons(const struct bContext *C, struct ARegion *ar);
+#define OL_TOG_RESTRICT_VIEWX (UI_UNIT_X*3)
+#define OL_TOG_RESTRICT_SELECTX (UI_UNIT_X*2)
+#define OL_TOG_RESTRICT_RENDERX UI_UNIT_X
+
+#define OL_TOGW OL_TOG_RESTRICT_VIEWX
+
+#define OL_RNA_COLX (UI_UNIT_X*15)
+#define OL_RNA_COL_SIZEX (UI_UNIT_X*7.5)
+#define OL_RNA_COL_SPACEX (UI_UNIT_X*2.5)
+
+
+/* outliner_tree.c ----------------------------------------------- */
+
+void outliner_free_tree(ListBase *lb);
+
+TreeElement *outliner_find_tse(struct SpaceOops *soops, TreeStoreElem *tse);
+TreeElement *outliner_find_id(struct SpaceOops *soops, ListBase *lb, struct ID *id);
+struct ID *outliner_search_back(SpaceOops *soops, TreeElement *te, short idcode);
+
+void outliner_build_tree(struct Main *mainvar, struct Scene *scene, struct SpaceOops *soops);
+
+/* outliner_draw.c ---------------------------------------------- */
-/* outliner.c */
-void outliner_free_tree(struct ListBase *lb);
-void outliner_select(struct SpaceOops *soops, struct ListBase *lb, int *index, short *selecting);
void draw_outliner(const struct bContext *C);
+/* outliner_select.c -------------------------------------------- */
+
+void outliner_select(struct SpaceOops *soops, ListBase *lb, int *index, short *selecting);
+
+int tree_element_type_active(struct bContext *C, struct Scene *scene, struct SpaceOops *soops, TreeElement *te, TreeStoreElem *tselem, int set);
+int tree_element_active(struct bContext *C, struct Scene *scene, SpaceOops *soops, TreeElement *te, int set);
+
+/* outliner_edit.c ---------------------------------------------- */
+
+void outliner_do_object_operation(struct bContext *C, struct Scene *scene, struct SpaceOops *soops, struct ListBase *lb,
+ void (*operation_cb)(struct bContext *C, struct Scene *scene, struct TreeElement *, struct TreeStoreElem *, TreeStoreElem *));
+
+int common_restrict_check(struct bContext *C, struct Object *ob);
+
+int outliner_has_one_flag(struct SpaceOops *soops, ListBase *lb, short flag, short curlevel);
+void outliner_set_flag(struct SpaceOops *soops, ListBase *lb, short flag, short set);
+
+void object_toggle_visibility_cb(struct bContext *C, struct Scene *scene, TreeElement *te, struct TreeStoreElem *tsep, struct TreeStoreElem *tselem);
+void object_toggle_selectability_cb(struct bContext *C, struct Scene *scene, TreeElement *te, struct TreeStoreElem *tsep, struct TreeStoreElem *tselem);
+void object_toggle_renderability_cb(struct bContext *C, struct Scene *scene, TreeElement *te, struct TreeStoreElem *tsep, struct TreeStoreElem *tselem);
+
+/* ...................................................... */
+
void OUTLINER_OT_item_activate(struct wmOperatorType *ot);
void OUTLINER_OT_item_openclose(struct wmOperatorType *ot);
void OUTLINER_OT_item_rename(struct wmOperatorType *ot);
-void OUTLINER_OT_operation(struct wmOperatorType *ot);
-void OUTLINER_OT_object_operation(struct wmOperatorType *ot);
-void OUTLINER_OT_group_operation(struct wmOperatorType *ot);
-void OUTLINER_OT_id_operation(struct wmOperatorType *ot);
-void OUTLINER_OT_data_operation(struct wmOperatorType *ot);
-void OUTLINER_OT_animdata_operation(struct wmOperatorType *ot);
-void OUTLINER_OT_action_set(struct wmOperatorType *ot);
void OUTLINER_OT_show_one_level(struct wmOperatorType *ot);
void OUTLINER_OT_show_active(struct wmOperatorType *ot);
@@ -150,5 +188,23 @@ void OUTLINER_OT_keyingset_remove_selected(struct wmOperatorType *ot);
void OUTLINER_OT_drivers_add_selected(struct wmOperatorType *ot);
void OUTLINER_OT_drivers_delete_selected(struct wmOperatorType *ot);
-#endif /* ED_OUTLINER_INTERN_H */
+/* outliner_tools.c ---------------------------------------------- */
+
+void OUTLINER_OT_operation(struct wmOperatorType *ot);
+void OUTLINER_OT_object_operation(struct wmOperatorType *ot);
+void OUTLINER_OT_group_operation(struct wmOperatorType *ot);
+void OUTLINER_OT_id_operation(struct wmOperatorType *ot);
+void OUTLINER_OT_data_operation(struct wmOperatorType *ot);
+void OUTLINER_OT_animdata_operation(struct wmOperatorType *ot);
+void OUTLINER_OT_action_set(struct wmOperatorType *ot);
+
+/* ---------------------------------------------------------------- */
+
+/* outliner_ops.c */
+void outliner_operatortypes(void);
+void outliner_keymap(struct wmKeyConfig *keyconf);
+
+/* outliner_header.c */
+void outliner_header_buttons(const struct bContext *C, struct ARegion *ar);
+#endif /* ED_OUTLINER_INTERN_H */