diff options
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_intern.h')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_intern.h | 47 |
1 files changed, 17 insertions, 30 deletions
diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h index a0de3a06556..73494b890ed 100644 --- a/source/blender/editors/space_outliner/outliner_intern.h +++ b/source/blender/editors/space_outliner/outliner_intern.h @@ -71,6 +71,7 @@ typedef enum TreeTraversalAction { * Callback type for reinserting elements at a different position, used to allow user customizable element order. */ typedef void (*TreeElementReinsertFunc)(struct Main *bmain, + struct Scene *scene, struct SpaceOops *soops, struct TreeElement *insert_element, struct TreeElement *insert_handle, @@ -124,6 +125,7 @@ enum { TE_ICONROW = (1 << 1), TE_LAZY_CLOSED = (1 << 2), TE_FREE_NAME = (1 << 3), + TE_DISABLED = (1 << 4), }; /* button events */ @@ -149,11 +151,11 @@ typedef enum { /* size constants */ #define OL_Y_OFFSET 2 -#define OL_TOG_RESTRICT_VIEWX (UI_UNIT_X * 3.0f) -#define OL_TOG_RESTRICT_SELECTX (UI_UNIT_X * 2.0f) +#define OL_TOG_RESTRICT_SELECTX (UI_UNIT_X * 3.0f) +#define OL_TOG_RESTRICT_VIEWX (UI_UNIT_X * 2.0f) #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_COL_SIZEX (UI_UNIT_X * 7.5f) @@ -161,7 +163,7 @@ typedef enum { /* The outliner display modes that support the filter system. * 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_VIEW_LAYER)) /* Outliner Searching -- * @@ -253,16 +255,6 @@ void object_toggle_renderability_cb( 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( struct bContext *C, struct ReportList *reports, struct Scene *scene, TreeElement *te, struct TreeStoreElem *tsep, struct TreeStoreElem *tselem, void *user_data); @@ -319,14 +311,13 @@ void OUTLINER_OT_parent_drop(struct wmOperatorType *ot); void OUTLINER_OT_parent_clear(struct wmOperatorType *ot); void OUTLINER_OT_scene_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 ---------------------------------------------- */ void OUTLINER_OT_operation(struct wmOperatorType *ot); void OUTLINER_OT_scene_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_id_operation(struct wmOperatorType *ot); void OUTLINER_OT_id_remap(struct wmOperatorType *ot); @@ -335,7 +326,7 @@ void OUTLINER_OT_animdata_operation(struct wmOperatorType *ot); void OUTLINER_OT_action_set(struct wmOperatorType *ot); void OUTLINER_OT_constraint_operation(struct wmOperatorType *ot); void OUTLINER_OT_modifier_operation(struct wmOperatorType *ot); -void OUTLINER_OT_collection_operation(struct wmOperatorType *ot); + /* ---------------------------------------------------------------- */ /* outliner_ops.c */ @@ -344,23 +335,18 @@ void outliner_keymap(struct wmKeyConfig *keyconf); /* 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_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_object_add_to_new_collection(struct wmOperatorType *ot); -void OUTLINER_OT_object_remove_from_collection(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); +void OUTLINER_OT_collection_objects_deselect(struct wmOperatorType *ot); +void OUTLINER_OT_collection_link(struct wmOperatorType *ot); +void OUTLINER_OT_collection_instance(struct wmOperatorType *ot); +void OUTLINER_OT_collection_exclude_set(struct wmOperatorType *ot); +void OUTLINER_OT_collection_include_set(struct wmOperatorType *ot); /* outliner_utils.c ---------------------------------------------- */ @@ -368,6 +354,7 @@ TreeElement *outliner_find_item_at_y(const SpaceOops *soops, const ListBase *tre 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_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_posechannel(ListBase *lb, const struct bPoseChannel *pchan); TreeElement *outliner_find_editbone(ListBase *lb, const struct EditBone *ebone); |