Blender V2.61 - r43446
Defines | Typedefs | Enumerations | Functions | Variables

outliner_tools.c File Reference

#include <math.h>
#include <string.h>
#include <stdlib.h>
#include <stddef.h>
#include "MEM_guardedalloc.h"
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
#include "DNA_constraint_types.h"
#include "DNA_camera_types.h"
#include "DNA_group_types.h"
#include "DNA_key_types.h"
#include "DNA_lamp_types.h"
#include "DNA_material_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meta_types.h"
#include "DNA_particle_types.h"
#include "DNA_scene_types.h"
#include "DNA_world_types.h"
#include "DNA_sequence_types.h"
#include "DNA_object_types.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "BLI_math_base.h"
#include <fnmatch.h>
#include "BKE_animsys.h"
#include "BKE_context.h"
#include "BKE_deform.h"
#include "BKE_depsgraph.h"
#include "BKE_fcurve.h"
#include "BKE_global.h"
#include "BKE_group.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_modifier.h"
#include "BKE_report.h"
#include "BKE_scene.h"
#include "BKE_sequencer.h"
#include "ED_armature.h"
#include "ED_object.h"
#include "ED_screen.h"
#include "ED_util.h"
#include "WM_api.h"
#include "WM_types.h"
#include "BIF_gl.h"
#include "BIF_glutil.h"
#include "UI_interface.h"
#include "UI_interface_icons.h"
#include "UI_resources.h"
#include "UI_view2d.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
#include "outliner_intern.h"

Go to the source code of this file.

Defines

#define _GNU_SOURCE

Typedefs

typedef enum eOutlinerIdOpTypes eOutlinerIdOpTypes
typedef enum eOutliner_AnimDataOps eOutliner_AnimDataOps

Enumerations

enum  eOutlinerIdOpTypes {
  OUTLINER_IDOP_INVALID = 0, OUTLINER_IDOP_UNLINK, OUTLINER_IDOP_LOCAL, OUTLINER_IDOP_SINGLE,
  OUTLINER_IDOP_FAKE_ADD, OUTLINER_IDOP_FAKE_CLEAR, OUTLINER_IDOP_RENAME
}
enum  eOutliner_AnimDataOps {
  OUTLINER_ANIMOP_INVALID = 0, OUTLINER_ANIMOP_SET_ACT, OUTLINER_ANIMOP_CLEAR_ACT, OUTLINER_ANIMOP_REFRESH_DRV,
  OUTLINER_ANIMOP_CLEAR_DRV
}

Functions

static void set_operation_types (SpaceOops *soops, ListBase *lb, int *scenelevel, int *objectlevel, int *idlevel, int *datalevel)
static void unlink_action_cb (bContext *C, Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *tsep, TreeStoreElem *UNUSED(tselem))
static void unlink_material_cb (bContext *UNUSED(C), Scene *UNUSED(scene), TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *UNUSED(tselem))
static void unlink_texture_cb (bContext *UNUSED(C), Scene *UNUSED(scene), TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *UNUSED(tselem))
static void unlink_group_cb (bContext *UNUSED(C), Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *tsep, TreeStoreElem *tselem)
static void unlink_world_cb (bContext *UNUSED(C), Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *tsep, TreeStoreElem *tselem)
static void outliner_do_libdata_operation (bContext *C, Scene *scene, SpaceOops *soops, ListBase *lb, void(*operation_cb)(bContext *C, Scene *scene, TreeElement *, TreeStoreElem *, TreeStoreElem *))
static void object_select_cb (bContext *UNUSED(C), Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem)
static void object_deselect_cb (bContext *UNUSED(C), Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem)
static void object_delete_cb (bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem)
static void id_local_cb (bContext *C, Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem)
static void id_fake_user_set_cb (bContext *UNUSED(C), Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem)
static void id_fake_user_clear_cb (bContext *UNUSED(C), Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem)
static void singleuser_action_cb (bContext *C, Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *tsep, TreeStoreElem *tselem)
static void singleuser_world_cb (bContext *C, Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *tsep, TreeStoreElem *tselem)
static void group_linkobs2scene_cb (bContext *UNUSED(C), Scene *scene, TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem)
void outliner_do_object_operation (bContext *C, Scene *scene_act, SpaceOops *soops, ListBase *lb, void(*operation_cb)(bContext *C, Scene *scene, TreeElement *, TreeStoreElem *, TreeStoreElem *))
static void unlinkact_animdata_cb (int UNUSED(event), TreeElement *UNUSED(te), TreeStoreElem *tselem)
static void cleardrivers_animdata_cb (int UNUSED(event), TreeElement *UNUSED(te), TreeStoreElem *tselem)
static void refreshdrivers_animdata_cb (int UNUSED(event), TreeElement *UNUSED(te), TreeStoreElem *tselem)
static void pchan_cb (int event, TreeElement *te, TreeStoreElem *UNUSED(tselem))
static void bone_cb (int event, TreeElement *te, TreeStoreElem *UNUSED(tselem))
static void ebone_cb (int event, TreeElement *te, TreeStoreElem *UNUSED(tselem))
static void sequence_cb (int event, TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tselem))
static void outliner_do_data_operation (SpaceOops *soops, int type, int event, ListBase *lb, void(*operation_cb)(int, TreeElement *, TreeStoreElem *))
static int outliner_object_operation_exec (bContext *C, wmOperator *op)
void OUTLINER_OT_object_operation (wmOperatorType *ot)
static int outliner_group_operation_exec (bContext *C, wmOperator *op)
void OUTLINER_OT_group_operation (wmOperatorType *ot)
static int outliner_id_operation_exec (bContext *C, wmOperator *op)
void OUTLINER_OT_id_operation (wmOperatorType *ot)
static void outliner_do_id_set_operation (SpaceOops *soops, int type, ListBase *lb, ID *newid, void(*operation_cb)(TreeElement *, TreeStoreElem *, TreeStoreElem *, ID *))
static void actionset_id_cb (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)
static int outliner_animdata_operation_exec (bContext *C, wmOperator *op)
void OUTLINER_OT_animdata_operation (wmOperatorType *ot)
static int outliner_data_operation_exec (bContext *C, wmOperator *op)
void OUTLINER_OT_data_operation (wmOperatorType *ot)
static int do_outliner_operation_event (bContext *C, Scene *scene, ARegion *ar, SpaceOops *soops, TreeElement *te, wmEvent *event, const float mval[2])
static int outliner_operation (bContext *C, wmOperator *UNUSED(op), wmEvent *event)
void OUTLINER_OT_operation (wmOperatorType *ot)

Variables

static EnumPropertyItem prop_object_op_types []
static EnumPropertyItem prop_group_op_types []
static EnumPropertyItem prop_id_op_types []
static EnumPropertyItem prop_animdata_op_types []
static EnumPropertyItem prop_data_op_types []

Detailed Description

Definition in file outliner_tools.c.


Define Documentation

#define _GNU_SOURCE

Definition at line 63 of file outliner_tools.c.


Typedef Documentation


Enumeration Type Documentation

Enumerator:
OUTLINER_ANIMOP_INVALID 
OUTLINER_ANIMOP_SET_ACT 
OUTLINER_ANIMOP_CLEAR_ACT 
OUTLINER_ANIMOP_REFRESH_DRV 
OUTLINER_ANIMOP_CLEAR_DRV 

Definition at line 996 of file outliner_tools.c.

Enumerator:
OUTLINER_IDOP_INVALID 
OUTLINER_IDOP_UNLINK 
OUTLINER_IDOP_LOCAL 
OUTLINER_IDOP_SINGLE 
OUTLINER_IDOP_FAKE_ADD 
OUTLINER_IDOP_FAKE_CLEAR 
OUTLINER_IDOP_RENAME 

Definition at line 718 of file outliner_tools.c.


Function Documentation

static void actionset_id_cb ( TreeElement UNUSEDte,
TreeStoreElem tselem,
TreeStoreElem tsep,
ID actId 
) [static]
static void bone_cb ( int  event,
TreeElement te,
TreeStoreElem UNUSEDtselem 
) [static]
static void cleardrivers_animdata_cb ( int   UNUSEDevent,
TreeElement UNUSEDte,
TreeStoreElem tselem 
) [static]
static int do_outliner_operation_event ( bContext C,
Scene scene,
ARegion ar,
SpaceOops soops,
TreeElement te,
wmEvent event,
const float  mval[2] 
) [static]
static void ebone_cb ( int  event,
TreeElement te,
TreeStoreElem UNUSEDtselem 
) [static]
static void group_linkobs2scene_cb ( bContext UNUSEDC,
Scene scene,
TreeElement UNUSEDte,
TreeStoreElem UNUSEDtsep,
TreeStoreElem tselem 
) [static]
static void id_fake_user_clear_cb ( bContext UNUSEDC,
Scene UNUSEDscene,
TreeElement UNUSEDte,
TreeStoreElem UNUSEDtsep,
TreeStoreElem tselem 
) [static]

Definition at line 332 of file outliner_tools.c.

References ID::flag, TreeStoreElem::id, id_us_min(), and LIB_FAKEUSER.

Referenced by outliner_id_operation_exec().

static void id_fake_user_set_cb ( bContext UNUSEDC,
Scene UNUSEDscene,
TreeElement UNUSEDte,
TreeStoreElem UNUSEDtsep,
TreeStoreElem tselem 
) [static]

Definition at line 322 of file outliner_tools.c.

References ID::flag, TreeStoreElem::id, id_us_plus(), and LIB_FAKEUSER.

Referenced by outliner_id_operation_exec().

static void id_local_cb ( bContext C,
Scene UNUSEDscene,
TreeElement UNUSEDte,
TreeStoreElem UNUSEDtsep,
TreeStoreElem tselem 
) [static]
static void object_delete_cb ( bContext C,
Scene scene,
TreeElement te,
TreeStoreElem UNUSEDtsep,
TreeStoreElem tselem 
) [static]
static void object_deselect_cb ( bContext UNUSEDC,
Scene scene,
TreeElement te,
TreeStoreElem UNUSEDtsep,
TreeStoreElem tselem 
) [static]
static void object_select_cb ( bContext UNUSEDC,
Scene scene,
TreeElement te,
TreeStoreElem UNUSEDtsep,
TreeStoreElem tselem 
) [static]
static int outliner_action_set_exec ( bContext C,
wmOperator op 
) [static]
static int outliner_animdata_operation_exec ( bContext C,
wmOperator op 
) [static]
static int outliner_data_operation_exec ( bContext C,
wmOperator op 
) [static]
static void outliner_do_data_operation ( SpaceOops soops,
int  type,
int  event,
ListBase lb,
void(*)(int, TreeElement *, TreeStoreElem *)  operation_cb 
) [static]
static void outliner_do_id_set_operation ( SpaceOops soops,
int  type,
ListBase lb,
ID newid,
void(*)(TreeElement *, TreeStoreElem *, TreeStoreElem *, ID *)  operation_cb 
) [static]
static void outliner_do_libdata_operation ( bContext C,
Scene scene,
SpaceOops soops,
ListBase lb,
void(*)(bContext *C, Scene *scene, TreeElement *, TreeStoreElem *, TreeStoreElem *)  operation_cb 
) [static]
void outliner_do_object_operation ( bContext C,
Scene scene_act,
SpaceOops soops,
ListBase lb,
void(*)(bContext *C, Scene *scene, TreeElement *, TreeStoreElem *, TreeStoreElem *)  operation_cb 
)
static int outliner_group_operation_exec ( bContext C,
wmOperator op 
) [static]
static int outliner_id_operation_exec ( bContext C,
wmOperator op 
) [static]
static int outliner_object_operation_exec ( bContext C,
wmOperator op 
) [static]
static int outliner_operation ( bContext C,
wmOperator UNUSEDop,
wmEvent event 
) [static]
void OUTLINER_OT_action_set ( wmOperatorType ot)
void OUTLINER_OT_animdata_operation ( wmOperatorType ot)
void OUTLINER_OT_data_operation ( wmOperatorType ot)
void OUTLINER_OT_group_operation ( wmOperatorType ot)
void OUTLINER_OT_id_operation ( wmOperatorType ot)
void OUTLINER_OT_object_operation ( wmOperatorType ot)
void OUTLINER_OT_operation ( wmOperatorType ot)
static void pchan_cb ( int  event,
TreeElement te,
TreeStoreElem UNUSEDtselem 
) [static]
static void refreshdrivers_animdata_cb ( int   UNUSEDevent,
TreeElement UNUSEDte,
TreeStoreElem tselem 
) [static]
static void sequence_cb ( int  event,
TreeElement UNUSEDte,
TreeStoreElem UNUSEDtselem 
) [static]

Definition at line 506 of file outliner_tools.c.

Referenced by outliner_data_operation_exec().

static void set_operation_types ( SpaceOops soops,
ListBase lb,
int *  scenelevel,
int *  objectlevel,
int *  idlevel,
int *  datalevel 
) [static]
static void singleuser_action_cb ( bContext C,
Scene UNUSEDscene,
TreeElement UNUSEDte,
TreeStoreElem tsep,
TreeStoreElem tselem 
) [static]

Definition at line 342 of file outliner_tools.c.

References TreeStoreElem::id, and NULL.

Referenced by outliner_id_operation_exec().

static void singleuser_world_cb ( bContext C,
Scene UNUSEDscene,
TreeElement UNUSEDte,
TreeStoreElem tsep,
TreeStoreElem tselem 
) [static]

Definition at line 358 of file outliner_tools.c.

References TreeStoreElem::id, and NULL.

Referenced by outliner_id_operation_exec().

static void unlink_action_cb ( bContext C,
Scene UNUSEDscene,
TreeElement UNUSEDte,
TreeStoreElem tsep,
TreeStoreElem UNUSEDtselem 
) [static]
static void unlink_group_cb ( bContext UNUSEDC,
Scene UNUSEDscene,
TreeElement UNUSEDte,
TreeStoreElem tsep,
TreeStoreElem tselem 
) [static]
static void unlink_material_cb ( bContext UNUSEDC,
Scene UNUSEDscene,
TreeElement te,
TreeStoreElem tsep,
TreeStoreElem UNUSEDtselem 
) [static]
static void unlink_texture_cb ( bContext UNUSEDC,
Scene UNUSEDscene,
TreeElement te,
TreeStoreElem tsep,
TreeStoreElem UNUSEDtselem 
) [static]
static void unlink_world_cb ( bContext UNUSEDC,
Scene UNUSEDscene,
TreeElement UNUSEDte,
TreeStoreElem tsep,
TreeStoreElem tselem 
) [static]

Definition at line 239 of file outliner_tools.c.

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

Referenced by outliner_id_operation_exec().

static void unlinkact_animdata_cb ( int   UNUSEDevent,
TreeElement UNUSEDte,
TreeStoreElem tselem 
) [static]

Definition at line 428 of file outliner_tools.c.

References BKE_animdata_set_action(), TreeStoreElem::id, and NULL.

Referenced by outliner_animdata_operation_exec().


Variable Documentation

Initial value:
 {
    {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}
}

Definition at line 1009 of file outliner_tools.c.

Initial value:
 {
    {1, "SELECT", 0, "Select", ""},
    {2, "DESELECT", 0, "Deselect", ""},
    {3, "HIDE", 0, "Hide", ""},
    {4, "UNHIDE", 0, "Unhide", ""},
    {0, NULL, 0, NULL, NULL}
}

Definition at line 1106 of file outliner_tools.c.

Initial value:
 {
    {1, "UNLINK", 0, "Unlink", ""},
    {2, "LOCAL", 0, "Make Local", ""},
    {3, "LINK", 0, "Link Group Objects to Scene", ""},
    {4, "TOGVIS", 0, "Toggle Visible", ""},
    {5, "TOGSEL", 0, "Toggle Selectable", ""},
    {6, "TOGREN", 0, "Toggle Renderable", ""},
    {7, "RENAME", 0, "Rename", ""},
    {0, NULL, 0, NULL, NULL}
}

Definition at line 638 of file outliner_tools.c.

Initial value:
 {
    {OUTLINER_IDOP_UNLINK, "UNLINK", 0, "Unlink", ""},
    {OUTLINER_IDOP_LOCAL, "LOCAL", 0, "Make Local", ""},
    {OUTLINER_IDOP_SINGLE, "SINGLE", 0, "Make Single User", ""},
    {OUTLINER_IDOP_FAKE_ADD, "ADD_FAKE", 0, "Add Fake User", "Ensure datablock gets saved even if it isn't in use (e.g. for motion and material libraries)"},
    {OUTLINER_IDOP_FAKE_CLEAR, "CLEAR_FAKE", 0, "Clear Fake User", ""},
    {OUTLINER_IDOP_RENAME, "RENAME", 0, "Rename", ""},
    {0, NULL, 0, NULL, NULL}
}

Definition at line 731 of file outliner_tools.c.

Initial value:
 {
    {1, "SELECT", 0, "Select", ""},
    {2, "DESELECT", 0, "Deselect", ""},
    {4, "DELETE", 0, "Delete", ""},
    {6, "TOGVIS", 0, "Toggle Visible", ""},
    {7, "TOGSEL", 0, "Toggle Selectable", ""},
    {8, "TOGREN", 0, "Toggle Renderable", ""},
    {9, "RENAME", 0, "Rename", ""},
    {0, NULL, 0, NULL, NULL}
}

Definition at line 535 of file outliner_tools.c.