Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_outliner/outliner_intern.h
| Show First 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | typedef enum TreeTraversalAction { | ||||
| /* Continue traversal, but skip childs of traversed element */ | /* Continue traversal, but skip childs of traversed element */ | ||||
| TRAVERSE_SKIP_CHILDS, | TRAVERSE_SKIP_CHILDS, | ||||
| } TreeTraversalAction; | } TreeTraversalAction; | ||||
| /** | /** | ||||
| * Callback type for reinserting elements at a different position, used to allow user customizable element order. | * Callback type for reinserting elements at a different position, used to allow user customizable element order. | ||||
| */ | */ | ||||
| typedef void (*TreeElementReinsertFunc)(struct Main *bmain, | typedef void (*TreeElementReinsertFunc)(struct Main *bmain, | ||||
| struct Scene *scene, | |||||
| struct SpaceOops *soops, | struct SpaceOops *soops, | ||||
| struct TreeElement *insert_element, | struct TreeElement *insert_element, | ||||
| struct TreeElement *insert_handle, | struct TreeElement *insert_handle, | ||||
| TreeElementInsertType action, | TreeElementInsertType action, | ||||
| const struct wmEvent *event); | const struct wmEvent *event); | ||||
| /** | /** | ||||
| * Executed on (almost) each mouse move while dragging. It's supposed to give info | * Executed on (almost) each mouse move while dragging. It's supposed to give info | ||||
| * if reinserting insert_element before/after/into insert_handle would be allowed. | * if reinserting insert_element before/after/into insert_handle would be allowed. | ||||
| Show All 37 Lines | |||||
| /* TreeElement->flag */ | /* TreeElement->flag */ | ||||
| enum { | enum { | ||||
| TE_ACTIVE = (1 << 0), | TE_ACTIVE = (1 << 0), | ||||
| /* Closed items display their children as icon within the row. TE_ICONROW is for | /* Closed items display their children as icon within the row. TE_ICONROW is for | ||||
| * these child-items that are visible but only within the row of the closed parent. */ | * these child-items that are visible but only within the row of the closed parent. */ | ||||
| TE_ICONROW = (1 << 1), | TE_ICONROW = (1 << 1), | ||||
| TE_LAZY_CLOSED = (1 << 2), | TE_LAZY_CLOSED = (1 << 2), | ||||
| TE_FREE_NAME = (1 << 3), | TE_FREE_NAME = (1 << 3), | ||||
| TE_DISABLED = (1 << 4), | |||||
| }; | }; | ||||
| /* button events */ | /* button events */ | ||||
| #define OL_NAMEBUTTON 1 | #define OL_NAMEBUTTON 1 | ||||
| typedef enum { | typedef enum { | ||||
| OL_DRAWSEL_NONE = 0, /* inactive (regular black text) */ | OL_DRAWSEL_NONE = 0, /* inactive (regular black text) */ | ||||
| OL_DRAWSEL_NORMAL = 1, /* active object (draws white text) */ | OL_DRAWSEL_NORMAL = 1, /* active object (draws white text) */ | ||||
| Show All 9 Lines | |||||
| /* get TreeStoreElem associated with a TreeElement | /* get TreeStoreElem associated with a TreeElement | ||||
| * < a: (TreeElement) tree element to find stored element for | * < a: (TreeElement) tree element to find stored element for | ||||
| */ | */ | ||||
| #define TREESTORE(a) ((a)->store_elem) | #define TREESTORE(a) ((a)->store_elem) | ||||
| /* size constants */ | /* size constants */ | ||||
| #define OL_Y_OFFSET 2 | #define OL_Y_OFFSET 2 | ||||
| #define OL_TOG_RESTRICT_VIEWX (UI_UNIT_X * 3.0f) | #define OL_TOG_RESTRICT_SELECTX (UI_UNIT_X * 3.0f) | ||||
| #define OL_TOG_RESTRICT_SELECTX (UI_UNIT_X * 2.0f) | #define OL_TOG_RESTRICT_VIEWX (UI_UNIT_X * 2.0f) | ||||
| #define OL_TOG_RESTRICT_RENDERX UI_UNIT_X | #define OL_TOG_RESTRICT_RENDERX UI_UNIT_X | ||||
| #define OL_TOGW OL_TOG_RESTRICT_VIEWX | #define OL_TOGW OL_TOG_RESTRICT_SELECTX | ||||
| #define OL_RNA_COLX (UI_UNIT_X * 15) | #define OL_RNA_COLX (UI_UNIT_X * 15) | ||||
| #define OL_RNA_COL_SIZEX (UI_UNIT_X * 7.5f) | #define OL_RNA_COL_SIZEX (UI_UNIT_X * 7.5f) | ||||
| #define OL_RNA_COL_SPACEX (UI_UNIT_X * 2.5f) | #define OL_RNA_COL_SPACEX (UI_UNIT_X * 2.5f) | ||||
| /* The outliner display modes that support the filter system. | /* The outliner display modes that support the filter system. | ||||
| * Note: keep it synced with space_outliner.py */ | * Note: keep it synced with space_outliner.py */ | ||||
| #define SUPPORT_FILTER_OUTLINER(soops_) ((soops_)->outlinevis == SO_COLLECTIONS) | #define SUPPORT_FILTER_OUTLINER(soops_) (ELEM((soops_)->outlinevis, SO_COLLECTIONS, SO_OBJECTS)) | ||||
| /* Outliner Searching -- | /* Outliner Searching -- | ||||
| * | * | ||||
| * Are we looking for something in the outliner? | * Are we looking for something in the outliner? | ||||
| * If so finding matches in child items makes it more useful | * If so finding matches in child items makes it more useful | ||||
| * | * | ||||
| * - We want to flag parents to act as being open to filter child matches | * - We want to flag parents to act as being open to filter child matches | ||||
| * - and also flag matches so we can highlight them | * - and also flag matches so we can highlight them | ||||
| ▲ Show 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | |||||
| void object_toggle_selectability_cb( | void object_toggle_selectability_cb( | ||||
| struct bContext *C, struct ReportList *reports, struct Scene *scene, | struct bContext *C, struct ReportList *reports, struct Scene *scene, | ||||
| TreeElement *te, struct TreeStoreElem *tsep, struct TreeStoreElem *tselem, void *user_data); | TreeElement *te, struct TreeStoreElem *tsep, struct TreeStoreElem *tselem, void *user_data); | ||||
| void object_toggle_renderability_cb( | void object_toggle_renderability_cb( | ||||
| struct bContext *C, struct ReportList *reports, struct Scene *scene, | struct bContext *C, struct ReportList *reports, struct Scene *scene, | ||||
| TreeElement *te, struct TreeStoreElem *tsep, struct TreeStoreElem *tselem, void *user_data); | TreeElement *te, struct TreeStoreElem *tsep, struct TreeStoreElem *tselem, void *user_data); | ||||
| void group_toggle_visibility_cb( | |||||
| struct bContext *C, struct ReportList *reports, struct Scene *scene, | |||||
| TreeElement *te, struct TreeStoreElem *tsep, struct TreeStoreElem *tselem, void *user_data); | |||||
| void group_toggle_selectability_cb( | |||||
| struct bContext *C, struct ReportList *reports, struct Scene *scene, | |||||
| TreeElement *te, struct TreeStoreElem *tsep, struct TreeStoreElem *tselem, void *user_data); | |||||
| void group_toggle_renderability_cb( | |||||
| struct bContext *C, struct ReportList *reports, struct Scene *scene, | |||||
| TreeElement *te, struct TreeStoreElem *tsep, struct TreeStoreElem *tselem, void *user_data); | |||||
| void item_rename_cb( | void item_rename_cb( | ||||
| struct bContext *C, struct ReportList *reports, struct Scene *scene, | struct bContext *C, struct ReportList *reports, struct Scene *scene, | ||||
| TreeElement *te, struct TreeStoreElem *tsep, struct TreeStoreElem *tselem, void *user_data); | TreeElement *te, struct TreeStoreElem *tsep, struct TreeStoreElem *tselem, void *user_data); | ||||
| void lib_relocate_cb( | void lib_relocate_cb( | ||||
| struct bContext *C, struct ReportList *reports, struct Scene *scene, struct TreeElement *te, | struct bContext *C, struct ReportList *reports, struct Scene *scene, struct TreeElement *te, | ||||
| struct TreeStoreElem *tsep, struct TreeStoreElem *tselem, void *user_data); | struct TreeStoreElem *tsep, struct TreeStoreElem *tselem, void *user_data); | ||||
| void lib_reload_cb( | void lib_reload_cb( | ||||
| struct bContext *C, struct ReportList *reports, struct Scene *scene, struct TreeElement *te, | struct bContext *C, struct ReportList *reports, struct Scene *scene, struct TreeElement *te, | ||||
| Show All 40 Lines | |||||
| void OUTLINER_OT_drivers_delete_selected(struct wmOperatorType *ot); | void OUTLINER_OT_drivers_delete_selected(struct wmOperatorType *ot); | ||||
| void OUTLINER_OT_orphans_purge(struct wmOperatorType *ot); | void OUTLINER_OT_orphans_purge(struct wmOperatorType *ot); | ||||
| void OUTLINER_OT_parent_drop(struct wmOperatorType *ot); | void OUTLINER_OT_parent_drop(struct wmOperatorType *ot); | ||||
| void OUTLINER_OT_parent_clear(struct wmOperatorType *ot); | void OUTLINER_OT_parent_clear(struct wmOperatorType *ot); | ||||
| void OUTLINER_OT_scene_drop(struct wmOperatorType *ot); | void OUTLINER_OT_scene_drop(struct wmOperatorType *ot); | ||||
| void OUTLINER_OT_material_drop(struct wmOperatorType *ot); | void OUTLINER_OT_material_drop(struct wmOperatorType *ot); | ||||
| void OUTLINER_OT_group_link(struct wmOperatorType *ot); | void OUTLINER_OT_collection_drop(struct wmOperatorType *ot); | ||||
| /* outliner_tools.c ---------------------------------------------- */ | /* outliner_tools.c ---------------------------------------------- */ | ||||
| void OUTLINER_OT_operation(struct wmOperatorType *ot); | void OUTLINER_OT_operation(struct wmOperatorType *ot); | ||||
| void OUTLINER_OT_scene_operation(struct wmOperatorType *ot); | void OUTLINER_OT_scene_operation(struct wmOperatorType *ot); | ||||
| void OUTLINER_OT_object_operation(struct wmOperatorType *ot); | void OUTLINER_OT_object_operation(struct wmOperatorType *ot); | ||||
| void OUTLINER_OT_group_operation(struct wmOperatorType *ot); | |||||
| void OUTLINER_OT_lib_operation(struct wmOperatorType *ot); | void OUTLINER_OT_lib_operation(struct wmOperatorType *ot); | ||||
| void OUTLINER_OT_id_operation(struct wmOperatorType *ot); | void OUTLINER_OT_id_operation(struct wmOperatorType *ot); | ||||
| void OUTLINER_OT_id_remap(struct wmOperatorType *ot); | void OUTLINER_OT_id_remap(struct wmOperatorType *ot); | ||||
| void OUTLINER_OT_data_operation(struct wmOperatorType *ot); | void OUTLINER_OT_data_operation(struct wmOperatorType *ot); | ||||
| void OUTLINER_OT_animdata_operation(struct wmOperatorType *ot); | void OUTLINER_OT_animdata_operation(struct wmOperatorType *ot); | ||||
| void OUTLINER_OT_action_set(struct wmOperatorType *ot); | void OUTLINER_OT_action_set(struct wmOperatorType *ot); | ||||
| void OUTLINER_OT_constraint_operation(struct wmOperatorType *ot); | void OUTLINER_OT_constraint_operation(struct wmOperatorType *ot); | ||||
| void OUTLINER_OT_modifier_operation(struct wmOperatorType *ot); | void OUTLINER_OT_modifier_operation(struct wmOperatorType *ot); | ||||
| void OUTLINER_OT_collection_operation(struct wmOperatorType *ot); | |||||
| /* ---------------------------------------------------------------- */ | /* ---------------------------------------------------------------- */ | ||||
| /* outliner_ops.c */ | /* outliner_ops.c */ | ||||
| void outliner_operatortypes(void); | void outliner_operatortypes(void); | ||||
| void outliner_keymap(struct wmKeyConfig *keyconf); | void outliner_keymap(struct wmKeyConfig *keyconf); | ||||
| /* outliner_collections.c */ | /* outliner_collections.c */ | ||||
| struct SceneCollection *outliner_scene_collection_from_tree_element(TreeElement *te); | bool outliner_is_collection_tree_element(const TreeElement *te); | ||||
| struct Collection *outliner_collection_from_tree_element(const TreeElement *te); | |||||
| void OUTLINER_OT_collections_delete(struct wmOperatorType *ot); | |||||
| void OUTLINER_OT_collection_select(struct wmOperatorType *ot); | |||||
| void OUTLINER_OT_collection_toggle(struct wmOperatorType *ot); | |||||
| void OUTLINER_OT_collection_link(struct wmOperatorType *ot); | |||||
| void OUTLINER_OT_collection_unlink(struct wmOperatorType *ot); | |||||
| void OUTLINER_OT_collection_new(struct wmOperatorType *ot); | void OUTLINER_OT_collection_new(struct wmOperatorType *ot); | ||||
| void OUTLINER_OT_collection_duplicate(struct wmOperatorType *ot); | void OUTLINER_OT_collection_duplicate(struct wmOperatorType *ot); | ||||
| void OUTLINER_OT_collection_objects_remove(struct wmOperatorType *ot); | void OUTLINER_OT_collection_delete(struct wmOperatorType *ot); | ||||
| void OUTLINER_OT_collection_objects_select(struct wmOperatorType *ot); | void OUTLINER_OT_collection_objects_select(struct wmOperatorType *ot); | ||||
| void OUTLINER_OT_object_add_to_new_collection(struct wmOperatorType *ot); | void OUTLINER_OT_collection_objects_deselect(struct wmOperatorType *ot); | ||||
| void OUTLINER_OT_object_remove_from_collection(struct wmOperatorType *ot); | void OUTLINER_OT_collection_link(struct wmOperatorType *ot); | ||||
| void OUTLINER_OT_collection_instance(struct wmOperatorType *ot); | |||||
| void OUTLINER_OT_collection_objects_add(struct wmOperatorType *ot); | |||||
| void OUTLINER_OT_collection_nested_new(struct wmOperatorType *ot); | |||||
| void OUTLINER_OT_collection_delete_selected(struct wmOperatorType *ot); | |||||
| /* outliner_utils.c ---------------------------------------------- */ | /* outliner_utils.c ---------------------------------------------- */ | ||||
| TreeElement *outliner_find_item_at_y(const SpaceOops *soops, const ListBase *tree, float view_co_y); | TreeElement *outliner_find_item_at_y(const SpaceOops *soops, const ListBase *tree, float view_co_y); | ||||
| TreeElement *outliner_find_item_at_x_in_row(const SpaceOops *soops, const TreeElement *parent_te, float view_co_x); | TreeElement *outliner_find_item_at_x_in_row(const SpaceOops *soops, const TreeElement *parent_te, float view_co_x); | ||||
| TreeElement *outliner_find_tse(struct SpaceOops *soops, const TreeStoreElem *tse); | TreeElement *outliner_find_tse(struct SpaceOops *soops, const TreeStoreElem *tse); | ||||
| TreeElement *outliner_find_tree_element(ListBase *lb, const TreeStoreElem *store_elem); | TreeElement *outliner_find_tree_element(ListBase *lb, const TreeStoreElem *store_elem); | ||||
| TreeElement *outliner_find_parent_element(ListBase *lb, TreeElement *parent_te, const TreeElement *child_te); | |||||
| TreeElement *outliner_find_id(struct SpaceOops *soops, ListBase *lb, const struct ID *id); | TreeElement *outliner_find_id(struct SpaceOops *soops, ListBase *lb, const struct ID *id); | ||||
| TreeElement *outliner_find_posechannel(ListBase *lb, const struct bPoseChannel *pchan); | TreeElement *outliner_find_posechannel(ListBase *lb, const struct bPoseChannel *pchan); | ||||
| TreeElement *outliner_find_editbone(ListBase *lb, const struct EditBone *ebone); | TreeElement *outliner_find_editbone(ListBase *lb, const struct EditBone *ebone); | ||||
| struct ID *outliner_search_back(SpaceOops *soops, TreeElement *te, short idcode); | struct ID *outliner_search_back(SpaceOops *soops, TreeElement *te, short idcode); | ||||
| bool outliner_tree_traverse(const SpaceOops *soops, ListBase *tree, int filter_te_flag, int filter_tselem_flag, | bool outliner_tree_traverse(const SpaceOops *soops, ListBase *tree, int filter_te_flag, int filter_tselem_flag, | ||||
| TreeTraversalFunc func, void *customdata); | TreeTraversalFunc func, void *customdata); | ||||
| #endif /* __OUTLINER_INTERN_H__ */ | #endif /* __OUTLINER_INTERN_H__ */ | ||||