Blender  V2.93
Classes | Variables
outliner_tools.c File Reference
#include "MEM_guardedalloc.h"
#include "CLG_log.h"
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
#include "DNA_collection_types.h"
#include "DNA_constraint_types.h"
#include "DNA_gpencil_types.h"
#include "DNA_hair_types.h"
#include "DNA_light_types.h"
#include "DNA_linestyle_types.h"
#include "DNA_material_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meta_types.h"
#include "DNA_modifier_types.h"
#include "DNA_object_types.h"
#include "DNA_pointcloud_types.h"
#include "DNA_scene_types.h"
#include "DNA_sequence_types.h"
#include "DNA_simulation_types.h"
#include "DNA_volume_types.h"
#include "DNA_world_types.h"
#include "BLI_blenlib.h"
#include "BLI_ghash.h"
#include "BLI_utildefines.h"
#include "BKE_anim_data.h"
#include "BKE_animsys.h"
#include "BKE_armature.h"
#include "BKE_collection.h"
#include "BKE_constraint.h"
#include "BKE_context.h"
#include "BKE_fcurve.h"
#include "BKE_global.h"
#include "BKE_idtype.h"
#include "BKE_layer.h"
#include "BKE_lib_id.h"
#include "BKE_lib_override.h"
#include "BKE_lib_query.h"
#include "BKE_main.h"
#include "BKE_object.h"
#include "BKE_report.h"
#include "BKE_scene.h"
#include "BKE_screen.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
#include "ED_object.h"
#include "ED_outliner.h"
#include "ED_scene.h"
#include "ED_screen.h"
#include "ED_sequencer.h"
#include "ED_undo.h"
#include "WM_api.h"
#include "WM_message.h"
#include "WM_types.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "UI_view2d.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
#include "SEQ_sequencer.h"
#include "outliner_intern.h"

Go to the source code of this file.

Classes

struct  MergedSearchData
 
struct  OutlinerLibOverrideData
 

Functions

ID/Library/Data Set/Un-link Utilities
static void get_element_operation_type (TreeElement *te, int *scenelevel, int *objectlevel, int *idlevel, int *datalevel)
 
static TreeElementget_target_element (SpaceOutliner *space_outliner)
 
static bool outliner_operation_tree_element_poll (bContext *C)
 
static void unlink_action_fn (bContext *C, ReportList *UNUSED(reports), Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *tsep, TreeStoreElem *UNUSED(tselem), void *UNUSED(user_data))
 
static void unlink_material_fn (bContext *UNUSED(C), ReportList *UNUSED(reports), Scene *UNUSED(scene), TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *UNUSED(tselem), void *UNUSED(user_data))
 
static void unlink_texture_fn (bContext *UNUSED(C), ReportList *UNUSED(reports), Scene *UNUSED(scene), TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *UNUSED(tselem), void *UNUSED(user_data))
 
static void unlink_collection_fn (bContext *C, ReportList *UNUSED(reports), Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *tsep, TreeStoreElem *tselem, void *UNUSED(user_data))
 
static void unlink_object_fn (bContext *C, ReportList *UNUSED(reports), Scene *UNUSED(scene), TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *tselem, void *UNUSED(user_data))
 
static void unlink_world_fn (bContext *UNUSED(C), ReportList *UNUSED(reports), Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *tsep, TreeStoreElem *tselem, void *UNUSED(user_data))
 
static void outliner_do_libdata_operation (bContext *C, ReportList *reports, Scene *scene, SpaceOutliner *space_outliner, ListBase *lb, outliner_operation_fn operation_fn, void *user_data)
 
Internal Tagging Utilities
static void clear_animdata_fn (int UNUSED(event), TreeElement *UNUSED(te), TreeStoreElem *tselem, void *UNUSED(arg))
 
static void unlinkact_animdata_fn (int UNUSED(event), TreeElement *UNUSED(te), TreeStoreElem *tselem, void *UNUSED(arg))
 
static void cleardrivers_animdata_fn (int UNUSED(event), TreeElement *UNUSED(te), TreeStoreElem *tselem, void *UNUSED(arg))
 
static void refreshdrivers_animdata_fn (int UNUSED(event), TreeElement *UNUSED(te), TreeStoreElem *tselem, void *UNUSED(arg))
 
Outliner Set Active Action Operator
static void outliner_do_id_set_operation (SpaceOutliner *space_outliner, int type, ListBase *lb, ID *newid, void(*operation_fn)(TreeElement *, TreeStoreElem *, TreeStoreElem *, ID *))
 
static void actionset_id_fn (TreeElement *UNUSED(te), TreeStoreElem *tselem, TreeStoreElem *tsep, ID *actId)
 
static int outliner_action_set_exec (bContext *C, wmOperator *op)
 
void OUTLINER_OT_action_set (wmOperatorType *ot)
 
Context Menu Operator
static int outliner_operator_menu (bContext *C, const char *opname)
 
static int do_outliner_operation_event (bContext *C, ReportList *reports, ARegion *region, SpaceOutliner *space_outliner, TreeElement *te)
 
static int outliner_operation (bContext *C, wmOperator *op, const wmEvent *event)
 
void OUTLINER_OT_operation (wmOperatorType *ot)
 

Variables

static CLG_LogRef LOG = {"ed.outliner.tools"}
 

Scene Menu Operator

enum  eOutliner_PropSceneOps { OL_SCENE_OP_DELETE = 1 }
 
typedef enum eOutliner_PropSceneOps eOutliner_PropSceneOps
 
static const EnumPropertyItem prop_scene_op_types []
 
static bool outliner_do_scene_operation (bContext *C, eOutliner_PropSceneOps event, ListBase *lb, bool(*operation_fn)(bContext *, eOutliner_PropSceneOps, TreeElement *, TreeStoreElem *))
 
static bool scene_fn (bContext *C, eOutliner_PropSceneOps event, TreeElement *UNUSED(te), TreeStoreElem *tselem)
 
static int outliner_scene_operation_exec (bContext *C, wmOperator *op)
 
void OUTLINER_OT_scene_operation (wmOperatorType *ot)
 

Object Operation Utilities

enum  eOutliner_PropDataOps {
  OL_DOP_SELECT = 1 , OL_DOP_DESELECT , OL_DOP_HIDE , OL_DOP_UNHIDE ,
  OL_DOP_SELECT_LINKED
}
 
enum  eOutliner_PropConstraintOps { OL_CONSTRAINTOP_ENABLE = 1 , OL_CONSTRAINTOP_DISABLE , OL_CONSTRAINTOP_DELETE }
 
enum  eOutliner_PropModifierOps { OL_MODIFIER_OP_TOGVIS = 1 , OL_MODIFIER_OP_TOGREN , OL_MODIFIER_OP_DELETE }
 
typedef enum eOutliner_PropDataOps eOutliner_PropDataOps
 
typedef enum eOutliner_PropConstraintOps eOutliner_PropConstraintOps
 
typedef enum eOutliner_PropModifierOps eOutliner_PropModifierOps
 
static void pchan_fn (int event, TreeElement *te, TreeStoreElem *UNUSED(tselem), void *UNUSED(arg))
 
static void bone_fn (int event, TreeElement *te, TreeStoreElem *UNUSED(tselem), void *UNUSED(arg))
 
static void ebone_fn (int event, TreeElement *te, TreeStoreElem *UNUSED(tselem), void *UNUSED(arg))
 
static void sequence_fn (int event, TreeElement *te, TreeStoreElem *tselem, void *scene_ptr)
 
static void gpencil_layer_fn (int event, TreeElement *te, TreeStoreElem *UNUSED(tselem), void *UNUSED(arg))
 
static void data_select_linked_fn (int event, TreeElement *te, TreeStoreElem *UNUSED(tselem), void *C_v)
 
static void constraint_fn (int event, TreeElement *te, TreeStoreElem *UNUSED(tselem), void *C_v)
 
static void modifier_fn (int event, TreeElement *te, TreeStoreElem *UNUSED(tselem), void *Carg)
 
static void outliner_do_data_operation (SpaceOutliner *space_outliner, int type, int event, ListBase *lb, void(*operation_fn)(int, TreeElement *, TreeStoreElem *, void *), void *arg)
 
static Baseoutline_batch_delete_hierarchy (ReportList *reports, Main *bmain, ViewLayer *view_layer, Scene *scene, Base *base)
 
static void object_batch_delete_hierarchy_fn (bContext *C, ReportList *reports, Scene *scene, Object *ob)
 

Object Menu Operator

enum  {
  OL_OP_SELECT = 1 , OL_OP_DESELECT , OL_OP_SELECT_HIERARCHY , OL_OP_REMAP ,
  OL_OP_RENAME , OL_OP_PROXY_TO_OVERRIDE_CONVERT
}
 
static const EnumPropertyItem prop_object_op_types []
 
static int outliner_object_operation_exec (bContext *C, wmOperator *op)
 
void OUTLINER_OT_object_operation (wmOperatorType *ot)
 

ID-Data Menu Operator

enum  eOutlinerIdOpTypes {
  OUTLINER_IDOP_INVALID = 0 , OUTLINER_IDOP_UNLINK , OUTLINER_IDOP_MARK_ASSET , OUTLINER_IDOP_CLEAR_ASSET ,
  OUTLINER_IDOP_LOCAL , OUTLINER_IDOP_OVERRIDE_LIBRARY_CREATE , OUTLINER_IDOP_OVERRIDE_LIBRARY_CREATE_HIERARCHY , OUTLINER_IDOP_OVERRIDE_LIBRARY_PROXY_CONVERT ,
  OUTLINER_IDOP_OVERRIDE_LIBRARY_RESET , OUTLINER_IDOP_OVERRIDE_LIBRARY_RESET_HIERARCHY , OUTLINER_IDOP_OVERRIDE_LIBRARY_RESYNC_HIERARCHY , OUTLINER_IDOP_OVERRIDE_LIBRARY_RESYNC_HIERARCHY_ENFORCE ,
  OUTLINER_IDOP_OVERRIDE_LIBRARY_DELETE_HIERARCHY , OUTLINER_IDOP_SINGLE , OUTLINER_IDOP_DELETE , OUTLINER_IDOP_REMAP ,
  OUTLINER_IDOP_COPY , OUTLINER_IDOP_PASTE , OUTLINER_IDOP_FAKE_ADD , OUTLINER_IDOP_FAKE_CLEAR ,
  OUTLINER_IDOP_RENAME , OUTLINER_IDOP_SELECT_LINKED
}
 
typedef enum eOutlinerIdOpTypes eOutlinerIdOpTypes
 
static const EnumPropertyItem prop_id_op_types []
 
static bool outliner_id_operation_item_poll (bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), const int enum_value)
 
static const EnumPropertyItemoutliner_id_operation_itemf (bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free)
 
static int outliner_id_operation_exec (bContext *C, wmOperator *op)
 
void OUTLINER_OT_id_operation (wmOperatorType *ot)
 

Library Menu Operator

enum  eOutlinerLibOpTypes {
  OL_LIB_INVALID = 0 , OL_LIB_RENAME , OL_LIB_DELETE , OL_LIB_RELOCATE ,
  OL_LIB_RELOAD
}
 
typedef enum eOutlinerLibOpTypes eOutlinerLibOpTypes
 
static const EnumPropertyItem outliner_lib_op_type_items []
 
static int outliner_lib_operation_exec (bContext *C, wmOperator *op)
 
void OUTLINER_OT_lib_operation (wmOperatorType *ot)
 

Animation Menu Operator

enum  eOutliner_AnimDataOps {
  OUTLINER_ANIMOP_INVALID = 0 , OUTLINER_ANIMOP_CLEAR_ADT , OUTLINER_ANIMOP_SET_ACT , OUTLINER_ANIMOP_CLEAR_ACT ,
  OUTLINER_ANIMOP_REFRESH_DRV , OUTLINER_ANIMOP_CLEAR_DRV
}
 
typedef enum eOutliner_AnimDataOps eOutliner_AnimDataOps
 
static const EnumPropertyItem prop_animdata_op_types []
 
static int outliner_animdata_operation_exec (bContext *C, wmOperator *op)
 
void OUTLINER_OT_animdata_operation (wmOperatorType *ot)
 

Search Utilities

typedef struct MergedSearchData MergedSearchData
 
static void merged_element_search_fn_recursive (const ListBase *tree, short tselem_type, short type, const char *str, uiSearchItems *items)
 
static void merged_element_search_update_fn (const bContext *UNUSED(C), void *data, const char *str, uiSearchItems *items, const bool UNUSED(is_first))
 
static void merged_element_search_exec_fn (struct bContext *C, void *UNUSED(arg1), void *element)
 
static uiBlockmerged_element_search_menu (bContext *C, ARegion *region, void *data)
 
void merged_element_search_menu_invoke (bContext *C, TreeElement *parent_te, TreeElement *activate_te)
 
static void object_select_fn (bContext *C, ReportList *UNUSED(reports), Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem, void *UNUSED(user_data))
 

Callbacks (Selection, Users & Library) Utilities

typedef struct OutlinerLibOverrideData OutlinerLibOverrideData
 
static void object_select_hierarchy_fn (bContext *C, ReportList *UNUSED(reports), Scene *UNUSED(scene), TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *UNUSED(tselem), void *UNUSED(user_data))
 
static void object_deselect_fn (bContext *C, ReportList *UNUSED(reports), Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem, void *UNUSED(user_data))
 
static void outliner_object_delete_fn (bContext *C, ReportList *reports, Scene *scene, Object *ob)
 
static void id_local_fn (bContext *C, ReportList *UNUSED(reports), Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem, void *UNUSED(user_data))
 
static void object_proxy_to_override_convert_fn (bContext *C, ReportList *reports, Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem, void *UNUSED(user_data))
 
static void id_override_library_create_fn (bContext *C, ReportList *reports, Scene *scene, TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *tselem, void *user_data)
 
static void id_override_library_reset_fn (bContext *C, ReportList *UNUSED(reports), Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem, void *user_data)
 
static void id_override_library_resync_fn (bContext *C, ReportList *UNUSED(reports), Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem, void *user_data)
 
static void id_override_library_delete_fn (bContext *C, ReportList *UNUSED(reports), Scene *UNUSED(scene), TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem, void *UNUSED(user_data))
 
static void id_fake_user_set_fn (bContext *UNUSED(C), ReportList *UNUSED(reports), Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem, void *UNUSED(user_data))
 
static void id_fake_user_clear_fn (bContext *UNUSED(C), ReportList *UNUSED(reports), Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem, void *UNUSED(user_data))
 
static void id_select_linked_fn (bContext *C, ReportList *UNUSED(reports), Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem, void *UNUSED(user_data))
 
static void singleuser_action_fn (bContext *C, ReportList *UNUSED(reports), Scene *UNUSED(scene), TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *tselem, void *UNUSED(user_data))
 
static void singleuser_world_fn (bContext *C, ReportList *UNUSED(reports), Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *tsep, TreeStoreElem *tselem, void *UNUSED(user_data))
 
void outliner_do_object_operation_ex (bContext *C, ReportList *reports, Scene *scene_act, SpaceOutliner *space_outliner, ListBase *lb, outliner_operation_fn operation_fn, void *user_data, bool recurse_selected)
 
void outliner_do_object_operation (bContext *C, ReportList *reports, Scene *scene_act, SpaceOutliner *space_outliner, ListBase *lb, outliner_operation_fn operation_fn)
 

Delete Object/Collection Operator

typedef void(* OutlinerDeleteFunc) (bContext *C, ReportList *reports, Scene *scene, Object *ob)
 
static void outliner_do_object_delete (bContext *C, ReportList *reports, Scene *scene, GSet *objects_to_delete, OutlinerDeleteFunc delete_fn)
 
static TreeTraversalAction outliner_find_objects_to_delete (TreeElement *te, void *customdata)
 
static int outliner_delete_exec (bContext *C, wmOperator *op)
 
void OUTLINER_OT_delete (wmOperatorType *ot)
 

Constraint Menu Operator

static const EnumPropertyItem prop_constraint_op_types []
 
static int outliner_constraint_operation_exec (bContext *C, wmOperator *op)
 
void OUTLINER_OT_constraint_operation (wmOperatorType *ot)
 

Modifier Menu Operator

static const EnumPropertyItem prop_modifier_op_types []
 
static int outliner_modifier_operation_exec (bContext *C, wmOperator *op)
 
void OUTLINER_OT_modifier_operation (wmOperatorType *ot)
 

Data Menu Operator

static const EnumPropertyItem prop_data_op_types []
 
static int outliner_data_operation_exec (bContext *C, wmOperator *op)
 
void OUTLINER_OT_data_operation (wmOperatorType *ot)
 

Typedef Documentation

◆ eOutliner_AnimDataOps

◆ eOutliner_PropConstraintOps

◆ eOutliner_PropDataOps

◆ eOutliner_PropModifierOps

◆ eOutliner_PropSceneOps

◆ eOutlinerIdOpTypes

◆ eOutlinerLibOpTypes

◆ MergedSearchData

Stores the parent and a child element of a merged icon-row icon for the merged select popup menu. The sub-tree of the parent is searched and the child is needed to only show elements of the same type in the popup.

◆ OutlinerDeleteFunc

typedef void(* OutlinerDeleteFunc) (bContext *C, ReportList *reports, Scene *scene, Object *ob)

Definition at line 1631 of file outliner_tools.c.

◆ OutlinerLibOverrideData

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
OL_OP_SELECT 
OL_OP_DESELECT 
OL_OP_SELECT_HIERARCHY 
OL_OP_REMAP 
OL_OP_RENAME 
OL_OP_PROXY_TO_OVERRIDE_CONVERT 

Definition at line 1494 of file outliner_tools.c.

◆ eOutliner_AnimDataOps

Enumerator
OUTLINER_ANIMOP_INVALID 
OUTLINER_ANIMOP_CLEAR_ADT 
OUTLINER_ANIMOP_SET_ACT 
OUTLINER_ANIMOP_CLEAR_ACT 
OUTLINER_ANIMOP_REFRESH_DRV 
OUTLINER_ANIMOP_CLEAR_DRV 

Definition at line 2501 of file outliner_tools.c.

◆ eOutliner_PropConstraintOps

Enumerator
OL_CONSTRAINTOP_ENABLE 
OL_CONSTRAINTOP_DISABLE 
OL_CONSTRAINTOP_DELETE 

Definition at line 1208 of file outliner_tools.c.

◆ eOutliner_PropDataOps

Enumerator
OL_DOP_SELECT 
OL_DOP_DESELECT 
OL_DOP_HIDE 
OL_DOP_UNHIDE 
OL_DOP_SELECT_LINKED 

Definition at line 1200 of file outliner_tools.c.

◆ eOutliner_PropModifierOps

Enumerator
OL_MODIFIER_OP_TOGVIS 
OL_MODIFIER_OP_TOGREN 
OL_MODIFIER_OP_DELETE 

Definition at line 1214 of file outliner_tools.c.

◆ eOutliner_PropSceneOps

Enumerator
OL_SCENE_OP_DELETE 

Definition at line 437 of file outliner_tools.c.

◆ eOutlinerIdOpTypes

Enumerator
OUTLINER_IDOP_INVALID 
OUTLINER_IDOP_UNLINK 
OUTLINER_IDOP_MARK_ASSET 
OUTLINER_IDOP_CLEAR_ASSET 
OUTLINER_IDOP_LOCAL 
OUTLINER_IDOP_OVERRIDE_LIBRARY_CREATE 
OUTLINER_IDOP_OVERRIDE_LIBRARY_CREATE_HIERARCHY 
OUTLINER_IDOP_OVERRIDE_LIBRARY_PROXY_CONVERT 
OUTLINER_IDOP_OVERRIDE_LIBRARY_RESET 
OUTLINER_IDOP_OVERRIDE_LIBRARY_RESET_HIERARCHY 
OUTLINER_IDOP_OVERRIDE_LIBRARY_RESYNC_HIERARCHY 
OUTLINER_IDOP_OVERRIDE_LIBRARY_RESYNC_HIERARCHY_ENFORCE 
OUTLINER_IDOP_OVERRIDE_LIBRARY_DELETE_HIERARCHY 
OUTLINER_IDOP_SINGLE 
OUTLINER_IDOP_DELETE 
OUTLINER_IDOP_REMAP 
OUTLINER_IDOP_COPY 
OUTLINER_IDOP_PASTE 
OUTLINER_IDOP_FAKE_ADD 
OUTLINER_IDOP_FAKE_CLEAR 
OUTLINER_IDOP_RENAME 
OUTLINER_IDOP_SELECT_LINKED 

Definition at line 1751 of file outliner_tools.c.

◆ eOutlinerLibOpTypes

Enumerator
OL_LIB_INVALID 
OL_LIB_RENAME 
OL_LIB_DELETE 
OL_LIB_RELOCATE 
OL_LIB_RELOAD 

Definition at line 2274 of file outliner_tools.c.

Function Documentation

◆ actionset_id_fn()

static void actionset_id_fn ( TreeElement UNUSEDte,
TreeStoreElem tselem,
TreeStoreElem tsep,
ID actId 
)
static

◆ bone_fn()

static void bone_fn ( int  event,
TreeElement te,
TreeStoreElem UNUSEDtselem,
void *  UNUSEDarg 
)
static

◆ clear_animdata_fn()

static void clear_animdata_fn ( int   UNUSEDevent,
TreeElement UNUSEDte,
TreeStoreElem tselem,
void *  UNUSEDarg 
)
static

◆ cleardrivers_animdata_fn()

static void cleardrivers_animdata_fn ( int   UNUSEDevent,
TreeElement UNUSEDte,
TreeStoreElem tselem,
void *  UNUSEDarg 
)
static

◆ constraint_fn()

static void constraint_fn ( int  event,
TreeElement te,
TreeStoreElem UNUSEDtselem,
void *  C_v 
)
static

◆ data_select_linked_fn()

static void data_select_linked_fn ( int  event,
TreeElement te,
TreeStoreElem UNUSEDtselem,
void *  C_v 
)
static

◆ do_outliner_operation_event()

static int do_outliner_operation_event ( bContext C,
ReportList reports,
ARegion region,
SpaceOutliner space_outliner,
TreeElement te 
)
static

◆ ebone_fn()

static void ebone_fn ( int  event,
TreeElement te,
TreeStoreElem UNUSEDtselem,
void *  UNUSEDarg 
)
static

◆ get_element_operation_type()

static void get_element_operation_type ( TreeElement te,
int *  scenelevel,
int *  objectlevel,
int *  idlevel,
int *  datalevel 
)
static

◆ get_target_element()

static TreeElement* get_target_element ( SpaceOutliner space_outliner)
static

◆ gpencil_layer_fn()

static void gpencil_layer_fn ( int  event,
TreeElement te,
TreeStoreElem UNUSEDtselem,
void *  UNUSEDarg 
)
static

◆ id_fake_user_clear_fn()

static void id_fake_user_clear_fn ( bContext UNUSEDC,
ReportList UNUSEDreports,
Scene UNUSEDscene,
TreeElement UNUSEDte,
TreeStoreElem UNUSEDtsep,
TreeStoreElem tselem,
void *  UNUSEDuser_data 
)
static

Definition at line 1005 of file outliner_tools.c.

References TreeStoreElem::id, and id_fake_user_clear().

Referenced by outliner_id_operation_exec().

◆ id_fake_user_set_fn()

static void id_fake_user_set_fn ( bContext UNUSEDC,
ReportList UNUSEDreports,
Scene UNUSEDscene,
TreeElement UNUSEDte,
TreeStoreElem UNUSEDtsep,
TreeStoreElem tselem,
void *  UNUSEDuser_data 
)
static

Definition at line 992 of file outliner_tools.c.

References TreeStoreElem::id, and id_fake_user_set().

Referenced by outliner_id_operation_exec().

◆ id_local_fn()

static void id_local_fn ( bContext C,
ReportList UNUSEDreports,
Scene UNUSEDscene,
TreeElement UNUSEDte,
TreeStoreElem UNUSEDtsep,
TreeStoreElem tselem,
void *  UNUSEDuser_data 
)
static

◆ id_override_library_create_fn()

static void id_override_library_create_fn ( bContext C,
ReportList reports,
Scene scene,
TreeElement te,
TreeStoreElem tsep,
TreeStoreElem tselem,
void *  user_data 
)
static

◆ id_override_library_delete_fn()

static void id_override_library_delete_fn ( bContext C,
ReportList UNUSEDreports,
Scene UNUSEDscene,
TreeElement te,
TreeStoreElem UNUSEDtsep,
TreeStoreElem tselem,
void *  UNUSEDuser_data 
)
static

◆ id_override_library_reset_fn()

static void id_override_library_reset_fn ( bContext C,
ReportList UNUSEDreports,
Scene UNUSEDscene,
TreeElement UNUSEDte,
TreeStoreElem UNUSEDtsep,
TreeStoreElem tselem,
void *  user_data 
)
static

◆ id_override_library_resync_fn()

static void id_override_library_resync_fn ( bContext C,
ReportList UNUSEDreports,
Scene scene,
TreeElement te,
TreeStoreElem UNUSEDtsep,
TreeStoreElem tselem,
void *  user_data 
)
static

◆ id_select_linked_fn()

static void id_select_linked_fn ( bContext C,
ReportList UNUSEDreports,
Scene UNUSEDscene,
TreeElement UNUSEDte,
TreeStoreElem UNUSEDtsep,
TreeStoreElem tselem,
void *  UNUSEDuser_data 
)
static

Definition at line 1018 of file outliner_tools.c.

References C, ED_object_select_linked_by_id(), and TreeStoreElem::id.

Referenced by outliner_id_operation_exec().

◆ merged_element_search_exec_fn()

static void merged_element_search_exec_fn ( struct bContext C,
void *  UNUSEDarg1,
void *  element 
)
static

◆ merged_element_search_fn_recursive()

static void merged_element_search_fn_recursive ( const ListBase tree,
short  tselem_type,
short  type,
const char *  str,
uiSearchItems items 
)
static

◆ merged_element_search_menu()

static uiBlock* merged_element_search_menu ( bContext C,
ARegion region,
void *  data 
)
static

◆ merged_element_search_menu_invoke()

void merged_element_search_menu_invoke ( bContext C,
TreeElement parent_te,
TreeElement activate_te 
)

◆ merged_element_search_update_fn()

static void merged_element_search_update_fn ( const bContext UNUSEDC,
void *  data,
const char *  str,
uiSearchItems items,
const bool   UNUSEDis_first 
)
static

◆ modifier_fn()

static void modifier_fn ( int  event,
TreeElement te,
TreeStoreElem UNUSEDtselem,
void *  Carg 
)
static

◆ object_batch_delete_hierarchy_fn()

static void object_batch_delete_hierarchy_fn ( bContext C,
ReportList reports,
Scene scene,
Object ob 
)
static

◆ object_deselect_fn()

static void object_deselect_fn ( bContext C,
ReportList UNUSEDreports,
Scene UNUSEDscene,
TreeElement UNUSEDte,
TreeStoreElem UNUSEDtsep,
TreeStoreElem tselem,
void *  UNUSEDuser_data 
)
static

◆ object_proxy_to_override_convert_fn()

static void object_proxy_to_override_convert_fn ( bContext C,
ReportList reports,
Scene UNUSEDscene,
TreeElement UNUSEDte,
TreeStoreElem UNUSEDtsep,
TreeStoreElem tselem,
void *  UNUSEDuser_data 
)
static

◆ object_select_fn()

static void object_select_fn ( bContext C,
ReportList UNUSEDreports,
Scene UNUSEDscene,
TreeElement UNUSEDte,
TreeStoreElem UNUSEDtsep,
TreeStoreElem tselem,
void *  UNUSEDuser_data 
)
static

◆ object_select_hierarchy_fn()

static void object_select_hierarchy_fn ( bContext C,
ReportList UNUSEDreports,
Scene UNUSEDscene,
TreeElement te,
TreeStoreElem UNUSEDtsep,
TreeStoreElem UNUSEDtselem,
void *  UNUSEDuser_data 
)
static

◆ outline_batch_delete_hierarchy()

static Base* outline_batch_delete_hierarchy ( ReportList reports,
Main bmain,
ViewLayer view_layer,
Scene scene,
Base base 
)
static

◆ outliner_action_set_exec()

static int outliner_action_set_exec ( bContext C,
wmOperator op 
)
static

◆ outliner_animdata_operation_exec()

static int outliner_animdata_operation_exec ( bContext C,
wmOperator op 
)
static

◆ outliner_constraint_operation_exec()

static int outliner_constraint_operation_exec ( bContext C,
wmOperator op 
)
static

◆ outliner_data_operation_exec()

static int outliner_data_operation_exec ( bContext C,
wmOperator op 
)
static

◆ outliner_delete_exec()

static int outliner_delete_exec ( bContext C,
wmOperator op 
)
static

◆ outliner_do_data_operation()

static void outliner_do_data_operation ( SpaceOutliner space_outliner,
int  type,
int  event,
ListBase lb,
void(*)(int, TreeElement *, TreeStoreElem *, void *)  operation_fn,
void *  arg 
)
static

◆ outliner_do_id_set_operation()

static void outliner_do_id_set_operation ( SpaceOutliner space_outliner,
int  type,
ListBase lb,
ID newid,
void(*)(TreeElement *, TreeStoreElem *, TreeStoreElem *, ID *)  operation_fn 
)
static

◆ outliner_do_libdata_operation()

static void outliner_do_libdata_operation ( bContext C,
ReportList reports,
Scene scene,
SpaceOutliner space_outliner,
ListBase lb,
outliner_operation_fn  operation_fn,
void *  user_data 
)
static

◆ outliner_do_object_delete()

static void outliner_do_object_delete ( bContext C,
ReportList reports,
Scene scene,
GSet objects_to_delete,
OutlinerDeleteFunc  delete_fn 
)
static

Definition at line 1633 of file outliner_tools.c.

References BLI_gsetIterator_getKey(), C, GSET_ITER, and scene.

Referenced by outliner_delete_exec().

◆ outliner_do_object_operation()

void outliner_do_object_operation ( bContext C,
ReportList reports,
Scene scene_act,
SpaceOutliner space_outliner,
ListBase lb,
outliner_operation_fn  operation_fn 
)

◆ outliner_do_object_operation_ex()

void outliner_do_object_operation_ex ( bContext C,
ReportList reports,
Scene scene_act,
SpaceOutliner space_outliner,
ListBase lb,
outliner_operation_fn  operation_fn,
void *  user_data,
bool  recurse_selected 
)

◆ outliner_do_scene_operation()

static bool outliner_do_scene_operation ( bContext C,
eOutliner_PropSceneOps  event,
ListBase lb,
bool(*)(bContext *, eOutliner_PropSceneOps, TreeElement *, TreeStoreElem *)  operation_fn 
)
static

Definition at line 446 of file outliner_tools.c.

References C, TreeStoreElem::flag, LISTBASE_FOREACH, TREESTORE, and TSE_SELECTED.

Referenced by outliner_scene_operation_exec().

◆ outliner_find_objects_to_delete()

static TreeTraversalAction outliner_find_objects_to_delete ( TreeElement te,
void *  customdata 
)
static

◆ outliner_id_operation_exec()

static int outliner_id_operation_exec ( bContext C,
wmOperator op 
)
static

Definition at line 1938 of file outliner_tools.c.

References BKE_report(), C, CTX_data_scene(), CTX_wm_manager(), CTX_wm_space_outliner(), ED_outliner_select_sync_from_all_tag(), ED_undo_push(), get_element_operation_type(), get_target_element(), ID_AC, id_delete_fn(), id_fake_user_clear_fn(), id_fake_user_set_fn(), ID_GR, id_local_fn(), ID_MA, id_override_library_create_fn(), id_override_library_delete_fn(), id_override_library_reset_fn(), id_override_library_resync_fn(), id_remap_fn(), id_select_linked_fn(), ID_TE, ID_WO, item_rename_fn(), NA_EDITED, NC_ANIMATION, NC_ID, NC_OBJECT, NC_SCENE, NC_SPACE, ND_LAYER, ND_NLA_ACTCHANGE, ND_OB_SHADING, ND_SPACE_OUTLINER, ND_WORLD, NULL, object_proxy_to_override_convert_fn(), wmWindowManager::op_undo_depth, OPERATOR_CANCELLED, OPERATOR_FINISHED, outliner_do_libdata_operation(), outliner_do_object_operation(), OUTLINER_IDOP_CLEAR_ASSET, OUTLINER_IDOP_COPY, OUTLINER_IDOP_DELETE, OUTLINER_IDOP_FAKE_ADD, OUTLINER_IDOP_FAKE_CLEAR, OUTLINER_IDOP_LOCAL, OUTLINER_IDOP_MARK_ASSET, OUTLINER_IDOP_OVERRIDE_LIBRARY_CREATE, OUTLINER_IDOP_OVERRIDE_LIBRARY_CREATE_HIERARCHY, OUTLINER_IDOP_OVERRIDE_LIBRARY_DELETE_HIERARCHY, OUTLINER_IDOP_OVERRIDE_LIBRARY_PROXY_CONVERT, OUTLINER_IDOP_OVERRIDE_LIBRARY_RESET, OUTLINER_IDOP_OVERRIDE_LIBRARY_RESET_HIERARCHY, OUTLINER_IDOP_OVERRIDE_LIBRARY_RESYNC_HIERARCHY, OUTLINER_IDOP_OVERRIDE_LIBRARY_RESYNC_HIERARCHY_ENFORCE, OUTLINER_IDOP_PASTE, OUTLINER_IDOP_REMAP, OUTLINER_IDOP_RENAME, OUTLINER_IDOP_SELECT_LINKED, OUTLINER_IDOP_SINGLE, OUTLINER_IDOP_UNLINK, wmOperator::ptr, wmOperator::reports, RNA_enum_get(), RPT_WARNING, scene, singleuser_action_fn(), singleuser_world_fn(), SpaceOutliner::tree, unlink_action_fn(), unlink_collection_fn(), unlink_material_fn(), unlink_object_fn(), unlink_texture_fn(), unlink_world_fn(), WM_event_add_notifier(), WM_OP_EXEC_DEFAULT, WM_OP_INVOKE_DEFAULT, and WM_operator_name_call().

Referenced by OUTLINER_OT_id_operation().

◆ outliner_id_operation_item_poll()

static bool outliner_id_operation_item_poll ( bContext C,
PointerRNA UNUSEDptr,
PropertyRNA UNUSEDprop,
const int  enum_value 
)
static

◆ outliner_id_operation_itemf()

static const EnumPropertyItem* outliner_id_operation_itemf ( bContext C,
PointerRNA ptr,
PropertyRNA prop,
bool *  r_free 
)
static

◆ outliner_lib_operation_exec()

static int outliner_lib_operation_exec ( bContext C,
wmOperator op 
)
static

◆ outliner_modifier_operation_exec()

static int outliner_modifier_operation_exec ( bContext C,
wmOperator op 
)
static

◆ outliner_object_delete_fn()

static void outliner_object_delete_fn ( bContext C,
ReportList reports,
Scene scene,
Object ob 
)
static

◆ outliner_object_operation_exec()

static int outliner_object_operation_exec ( bContext C,
wmOperator op 
)
static

◆ outliner_operation()

static int outliner_operation ( bContext C,
wmOperator op,
const wmEvent event 
)
static

◆ outliner_operation_tree_element_poll()

static bool outliner_operation_tree_element_poll ( bContext C)
static

◆ outliner_operator_menu()

static int outliner_operator_menu ( bContext C,
const char *  opname 
)
static

◆ OUTLINER_OT_action_set()

void OUTLINER_OT_action_set ( wmOperatorType ot)

◆ OUTLINER_OT_animdata_operation()

void OUTLINER_OT_animdata_operation ( wmOperatorType ot)

◆ OUTLINER_OT_constraint_operation()

void OUTLINER_OT_constraint_operation ( wmOperatorType ot)

◆ OUTLINER_OT_data_operation()

void OUTLINER_OT_data_operation ( wmOperatorType ot)

◆ OUTLINER_OT_delete()

void OUTLINER_OT_delete ( wmOperatorType ot)

◆ OUTLINER_OT_id_operation()

void OUTLINER_OT_id_operation ( wmOperatorType ot)

◆ OUTLINER_OT_lib_operation()

void OUTLINER_OT_lib_operation ( wmOperatorType ot)

◆ OUTLINER_OT_modifier_operation()

void OUTLINER_OT_modifier_operation ( wmOperatorType ot)

◆ OUTLINER_OT_object_operation()

void OUTLINER_OT_object_operation ( wmOperatorType ot)

◆ OUTLINER_OT_operation()

void OUTLINER_OT_operation ( wmOperatorType ot)

◆ OUTLINER_OT_scene_operation()

void OUTLINER_OT_scene_operation ( wmOperatorType ot)

◆ outliner_scene_operation_exec()

static int outliner_scene_operation_exec ( bContext C,
wmOperator op 
)
static

◆ pchan_fn()

static void pchan_fn ( int  event,
TreeElement te,
TreeStoreElem UNUSEDtselem,
void *  UNUSEDarg 
)
static

◆ refreshdrivers_animdata_fn()

static void refreshdrivers_animdata_fn ( int   UNUSEDevent,
TreeElement UNUSEDte,
TreeStoreElem tselem,
void *  UNUSEDarg 
)
static

◆ scene_fn()

static bool scene_fn ( bContext C,
eOutliner_PropSceneOps  event,
TreeElement UNUSEDte,
TreeStoreElem tselem 
)
static

◆ sequence_fn()

static void sequence_fn ( int  event,
TreeElement te,
TreeStoreElem tselem,
void *  scene_ptr 
)
static

◆ singleuser_action_fn()

static void singleuser_action_fn ( bContext C,
ReportList UNUSEDreports,
Scene UNUSEDscene,
TreeElement te,
TreeStoreElem tsep,
TreeStoreElem tselem,
void *  UNUSEDuser_data 
)
static

◆ singleuser_world_fn()

static void singleuser_world_fn ( bContext C,
ReportList UNUSEDreports,
Scene UNUSEDscene,
TreeElement UNUSEDte,
TreeStoreElem tsep,
TreeStoreElem tselem,
void *  UNUSEDuser_data 
)
static

◆ unlink_action_fn()

static void unlink_action_fn ( bContext C,
ReportList UNUSEDreports,
Scene UNUSEDscene,
TreeElement UNUSEDte,
TreeStoreElem tsep,
TreeStoreElem UNUSEDtselem,
void *  UNUSEDuser_data 
)
static

◆ unlink_collection_fn()

static void unlink_collection_fn ( bContext C,
ReportList UNUSEDreports,
Scene UNUSEDscene,
TreeElement UNUSEDte,
TreeStoreElem tsep,
TreeStoreElem tselem,
void *  UNUSEDuser_data 
)
static

◆ unlink_material_fn()

static void unlink_material_fn ( bContext UNUSEDC,
ReportList UNUSEDreports,
Scene UNUSEDscene,
TreeElement te,
TreeStoreElem tsep,
TreeStoreElem UNUSEDtselem,
void *  UNUSEDuser_data 
)
static

◆ unlink_object_fn()

static void unlink_object_fn ( bContext C,
ReportList UNUSEDreports,
Scene UNUSEDscene,
TreeElement te,
TreeStoreElem tsep,
TreeStoreElem tselem,
void *  UNUSEDuser_data 
)
static

◆ unlink_texture_fn()

static void unlink_texture_fn ( bContext UNUSEDC,
ReportList UNUSEDreports,
Scene UNUSEDscene,
TreeElement te,
TreeStoreElem tsep,
TreeStoreElem UNUSEDtselem,
void *  UNUSEDuser_data 
)
static

◆ unlink_world_fn()

static void unlink_world_fn ( bContext UNUSEDC,
ReportList UNUSEDreports,
Scene UNUSEDscene,
TreeElement UNUSEDte,
TreeStoreElem tsep,
TreeStoreElem tselem,
void *  UNUSEDuser_data 
)
static

Definition at line 391 of file outliner_tools.c.

References TreeStoreElem::id, id_us_min(), NULL, and Scene::world.

Referenced by outliner_id_operation_exec().

◆ unlinkact_animdata_fn()

static void unlinkact_animdata_fn ( int   UNUSEDevent,
TreeElement UNUSEDte,
TreeStoreElem tselem,
void *  UNUSEDarg 
)
static

Variable Documentation

◆ LOG

CLG_LogRef LOG = {"ed.outliner.tools"}
static

◆ outliner_lib_op_type_items

const EnumPropertyItem outliner_lib_op_type_items[]
static
Initial value:
= {
{OL_LIB_RENAME, "RENAME", 0, "Rename", ""},
"DELETE",
ICON_X,
"Delete",
"Delete this library and all its item.\n"
"Warning: No undo"},
"RELOCATE",
0,
"Relocate",
"Select a new path for this library, and reload all its data"},
{OL_LIB_RELOAD, "RELOAD", ICON_FILE_REFRESH, "Reload", "Reload all data from this library"},
{0, NULL, 0, NULL, NULL},
}
@ OL_LIB_RELOAD
@ OL_LIB_DELETE
@ OL_LIB_RELOCATE
@ OL_LIB_RENAME

Definition at line 2283 of file outliner_tools.c.

Referenced by OUTLINER_OT_lib_operation().

◆ prop_animdata_op_types

const EnumPropertyItem prop_animdata_op_types[]
static
Initial value:
= {
"CLEAR_ANIMDATA",
0,
"Clear Animation Data",
"Remove this animation data container"},
{OUTLINER_ANIMOP_SET_ACT, "SET_ACT", 0, "Set Action", ""},
{OUTLINER_ANIMOP_CLEAR_ACT, "CLEAR_ACT", 0, "Unlink Action", ""},
{OUTLINER_ANIMOP_REFRESH_DRV, "REFRESH_DRIVERS", 0, "Refresh Drivers", ""},
{OUTLINER_ANIMOP_CLEAR_DRV, "CLEAR_DRIVERS", 0, "Clear Drivers", ""},
{0, NULL, 0, NULL, NULL},
}
@ OUTLINER_ANIMOP_CLEAR_ADT
@ OUTLINER_ANIMOP_CLEAR_DRV
@ OUTLINER_ANIMOP_REFRESH_DRV
@ OUTLINER_ANIMOP_CLEAR_ACT
@ OUTLINER_ANIMOP_SET_ACT

Definition at line 2513 of file outliner_tools.c.

Referenced by OUTLINER_OT_animdata_operation().

◆ prop_constraint_op_types

const EnumPropertyItem prop_constraint_op_types[]
static
Initial value:
= {
{OL_CONSTRAINTOP_ENABLE, "ENABLE", ICON_HIDE_OFF, "Enable", ""},
{OL_CONSTRAINTOP_DISABLE, "DISABLE", ICON_HIDE_ON, "Disable", ""},
{OL_CONSTRAINTOP_DELETE, "DELETE", ICON_X, "Delete", ""},
{0, NULL, 0, NULL, NULL},
}
@ OL_CONSTRAINTOP_DISABLE
@ OL_CONSTRAINTOP_ENABLE
@ OL_CONSTRAINTOP_DELETE

Definition at line 2619 of file outliner_tools.c.

Referenced by OUTLINER_OT_constraint_operation().

◆ prop_data_op_types

const EnumPropertyItem prop_data_op_types[]
static
Initial value:
= {
{OL_DOP_SELECT, "SELECT", 0, "Select", ""},
{OL_DOP_DESELECT, "DESELECT", 0, "Deselect", ""},
{OL_DOP_HIDE, "HIDE", 0, "Hide", ""},
{OL_DOP_UNHIDE, "UNHIDE", 0, "Unhide", ""},
{OL_DOP_SELECT_LINKED, "SELECT_LINKED", 0, "Select Linked", ""},
{0, NULL, 0, NULL, NULL},
}
@ OL_DOP_HIDE
@ OL_DOP_SELECT_LINKED
@ OL_DOP_SELECT
@ OL_DOP_DESELECT
@ OL_DOP_UNHIDE

Definition at line 2713 of file outliner_tools.c.

Referenced by OUTLINER_OT_data_operation().

◆ prop_id_op_types

const EnumPropertyItem prop_id_op_types[]
static

Definition at line 1781 of file outliner_tools.c.

Referenced by outliner_id_operation_itemf(), and OUTLINER_OT_id_operation().

◆ prop_modifier_op_types

const EnumPropertyItem prop_modifier_op_types[]
static
Initial value:
= {
{OL_MODIFIER_OP_TOGVIS, "TOGVIS", ICON_RESTRICT_VIEW_OFF, "Toggle Viewport Use", ""},
{OL_MODIFIER_OP_TOGREN, "TOGREN", ICON_RESTRICT_RENDER_OFF, "Toggle Render Use", ""},
{OL_MODIFIER_OP_DELETE, "DELETE", ICON_X, "Delete", ""},
{0, NULL, 0, NULL, NULL},
}
@ OL_MODIFIER_OP_TOGVIS
@ OL_MODIFIER_OP_TOGREN
@ OL_MODIFIER_OP_DELETE

Definition at line 2666 of file outliner_tools.c.

Referenced by OUTLINER_OT_modifier_operation().

◆ prop_object_op_types

const EnumPropertyItem prop_object_op_types[]
static
Initial value:
= {
{OL_OP_SELECT, "SELECT", ICON_RESTRICT_SELECT_OFF, "Select", ""},
{OL_OP_DESELECT, "DESELECT", 0, "Deselect", ""},
{OL_OP_SELECT_HIERARCHY, "SELECT_HIERARCHY", 0, "Select Hierarchy", ""},
"REMAP",
0,
"Remap Users",
"Make all users of selected data-blocks to use instead a new chosen one"},
{OL_OP_RENAME, "RENAME", 0, "Rename", ""},
"OBJECT_PROXY_TO_OVERRIDE",
0,
"Convert Proxy to Override",
"Convert a Proxy object to a full library override, including all its dependencies"},
{0, NULL, 0, NULL, NULL},
}
@ OL_OP_REMAP
@ OL_OP_PROXY_TO_OVERRIDE_CONVERT
@ OL_OP_RENAME
@ OL_OP_SELECT_HIERARCHY
@ OL_OP_SELECT
@ OL_OP_DESELECT

Definition at line 1503 of file outliner_tools.c.

Referenced by OUTLINER_OT_object_operation().

◆ prop_scene_op_types

const EnumPropertyItem prop_scene_op_types[]
static
Initial value:
= {
{OL_SCENE_OP_DELETE, "DELETE", ICON_X, "Delete", ""},
{0, NULL, 0, NULL, NULL},
}
@ OL_SCENE_OP_DELETE

Definition at line 441 of file outliner_tools.c.

Referenced by OUTLINER_OT_scene_operation().