Blender V2.61 - r43446
|
#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_speaker_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.
Definition in file outliner_tree.c.
#define _GNU_SOURCE |
Definition at line 64 of file outliner_tree.c.
#define LOG2I | ( | x | ) | (int)(log(x)/M_LN2) |
Definition at line 328 of file outliner_tree.c.
Referenced by outliner_add_passes().
#define TS_CHUNK 128 |
Definition at line 109 of file outliner_tree.c.
Referenced by check_persistent().
static void check_persistent | ( | SpaceOops * | soops, |
TreeElement * | te, | ||
ID * | id, | ||
short | type, | ||
short | nr | ||
) | [static] |
Definition at line 159 of file outliner_tree.c.
References TreeStore::data, TreeStoreElem::flag, TreeStoreElem::id, MEM_callocN(), MEM_freeN(), MEM_mallocN(), TreeStoreElem::nr, NULL, TreeElement::store_index, TreeStore::totelem, SpaceOops::treestore, TS_CHUNK, TSE_CLOSED, TreeStoreElem::type, TreeStoreElem::used, and TreeStore::usedelem.
Referenced by outliner_add_element().
static int need_add_seq_dup | ( | Sequence * | seq | ) | [static] |
Definition at line 1115 of file outliner_tree.c.
References StripElem::name, Sequence::next, p, Sequence::prev, Sequence::strip, and Strip::stripdata.
Referenced by outliner_build_tree().
static void outliner_add_bone | ( | SpaceOops * | soops, |
ListBase * | lb, | ||
ID * | id, | ||
Bone * | curBone, | ||
TreeElement * | parent, | ||
int * | a | ||
) | [static] |
Definition at line 312 of file outliner_tree.c.
References Bone::childbase, TreeElement::directdata, ListBase::first, Bone::name, TreeElement::name, Bone::next, outliner_add_element(), TreeElement::subtree, and TSE_BONE.
Referenced by outliner_add_id_contents().
static TreeElement * outliner_add_element | ( | SpaceOops * | soops, |
ListBase * | lb, | ||
void * | idv, | ||
TreeElement * | parent, | ||
short | type, | ||
short | index | ||
) | [static] |
Definition at line 802 of file outliner_tree.c.
References NlaStrip::act, AnimData::action, IdAdtTemplate::adt, BLI_addtail(), check_persistent(), TreeElement::directdata, FCurve::driver, DRIVER_TARGETS_LOOPER_END, DRIVER_TARGETS_USED_LOOPER, AnimData::drivers, ELEM3, ListBase::first, TreeStoreElem::flag, GS, TreeElement::idcode, TreeElement::index, MEM_callocN(), StripElem::name, Sequence::name, NlaTrack::name, ID::name, TreeElement::name, NlaStrip::next, NlaTrack::next, DriverVar::next, FCurve::next, AnimData::nla_tracks, NULL, outliner_add_id_contents(), p, TreeElement::parent, SEARCHING_OUTLINER, SEQ_META, Sequence::seqbase, Sequence::strip, io_export_cycles_xml::strip(), Strip::stripdata, NlaTrack::strips, TreeElement::subtree, TREESTORE, TSE_ANIM_DATA, TSE_CHILDSEARCH, TSE_DRIVER_BASE, TSE_LINKED_OB, TSE_NLA, TSE_NLA_ACTION, TSE_NLA_TRACK, TSE_RNA_ARRAY_ELEM, TSE_RNA_PROPERTY, TSE_RNA_STRUCT, TSE_SEQ_STRIP, TSE_SEQUENCE, TSE_SEQUENCE_DUP, Sequence::type, and ChannelDriver::variables.
Referenced by outliner_add_bone(), outliner_add_id_contents(), outliner_add_object_contents(), outliner_add_passes(), outliner_add_scene_contents(), outliner_add_seq_dup(), and outliner_build_tree().
static void outliner_add_id_contents | ( | SpaceOops * | soops, |
TreeElement * | te, | ||
TreeStoreElem * | tselem, | ||
ID * | id | ||
) | [static] |
Definition at line 613 of file outliner_tree.c.
References bArmature::adt, Key::adt, World::adt, Speaker::adt, Lamp::adt, Camera::adt, Tex::adt, Material::adt, MetaBall::adt, Curve::adt, Mesh::adt, BLI_addtail(), BLI_remlink(), bArmature::bonebase, TreeElement::directdata, bArmature::edbo, ListBase::first, GS, TreeStoreElem::id, ID_AC, ID_AR, ID_CA, ID_CU, ID_KE, ID_LA, ID_LI, ID_MA, ID_MB, ID_ME, ID_OB, ID_SCE, ID_SPK, ID_TE, ID_WO, Tex::ima, Mesh::key, MetaBall::mat, Curve::mat, Mesh::mat, MAX_MTEX, World::mtex, Lamp::mtex, Material::mtex, EditBone::name, TreeElement::name, ID::name, Bone::next, TreeElement::next, EditBone::next, NULL, OB_MODE_POSE, outliner_add_bone(), outliner_add_element(), outliner_add_object_contents(), outliner_add_scene_contents(), TreeElement::parent, EditBone::parent, TreeElement::subtree, EditBone::temp, MTex::tex, MetaBall::totcol, Curve::totcol, Mesh::totcol, TREESTORE, TSE_ANIM_DATA, and TSE_EBONE.
Referenced by outliner_add_element().
static void outliner_add_object_contents | ( | SpaceOops * | soops, |
TreeElement * | te, | ||
TreeStoreElem * | tselem, | ||
Object * | ob | ||
) | [static] |
Definition at line 446 of file outliner_tree.c.
References Object::adt, bPose::agroups, BLI_addtail(), BLI_remlink(), bPose::chanbase, Object::constraints, bPoseChannel::constraints, Object::data, Object::defbase, TreeElement::directdata, Object::dup_group, bArmature::edbo, eModifierType_Armature, eModifierType_Curve, eModifierType_Hook, eModifierType_Lattice, eModifierType_ParticleSystem, ListBase::first, ParticleSettings::id, Object::id, ID::lib, Object::mat, Object::mode, Object::modifiers, bDeformGroup::name, ID::name, ModifierData::name, bActionGroup::name, bConstraint::name, bPoseChannel::name, TreeElement::name, bDeformGroup::next, ModifierData::next, bActionGroup::next, TreeElement::next, bConstraint::next, bPoseChannel::next, NULL, OB_MODE_POSE, outliner_add_element(), TreeElement::parent, bPoseChannel::parent, ParticleSystem::part, Object::pose, Object::poselib, Object::proxy, str, TreeElement::subtree, bPoseChannel::temp, Object::totcol, TREESTORE, TSE_ANIM_DATA, TSE_CONSTRAINT, TSE_CONSTRAINT_BASE, TSE_DEFGROUP, TSE_DEFGROUP_BASE, TSE_LINKED_OB, TSE_LINKED_PSYS, TSE_MODIFIER, TSE_MODIFIER_BASE, TSE_POSE_BASE, TSE_POSE_CHANNEL, TSE_POSEGRP, TSE_POSEGRP_BASE, TSE_PROXY, ModifierData::type, and TreeStoreElem::type.
Referenced by outliner_add_id_contents().
static void outliner_add_passes | ( | SpaceOops * | soops, |
TreeElement * | tenla, | ||
ID * | id, | ||
SceneRenderLayer * | srl | ||
) | [static] |
Definition at line 330 of file outliner_tree.c.
References TreeElement::directdata, TreeStoreElem::flag, LOG2I, TreeElement::name, NULL, outliner_add_element(), SceneRenderLayer::passflag, SCE_PASS_AO, SCE_PASS_COMBINED, SCE_PASS_DIFFUSE, SCE_PASS_EMIT, SCE_PASS_ENVIRONMENT, SCE_PASS_INDEXMA, SCE_PASS_INDEXOB, SCE_PASS_INDIRECT, SCE_PASS_MIST, SCE_PASS_NORMAL, SCE_PASS_REFLECT, SCE_PASS_REFRACT, SCE_PASS_RGBA, SCE_PASS_SHADOW, SCE_PASS_SPEC, SCE_PASS_UV, SCE_PASS_VECTOR, SCE_PASS_Z, TreeElement::subtree, TREESTORE, TSE_CLOSED, and TSE_R_PASS.
Referenced by outliner_add_scene_contents().
static void outliner_add_scene_contents | ( | SpaceOops * | soops, |
ListBase * | lb, | ||
Scene * | sce, | ||
TreeElement * | te | ||
) | [static] |
Definition at line 418 of file outliner_tree.c.
References Scene::adt, TreeElement::directdata, ListBase::first, Scene::id, RenderData::layers, SceneRenderLayer::light_override, SceneRenderLayer::mat_override, SceneRenderLayer::name, TreeElement::name, SceneRenderLayer::next, outliner_add_element(), outliner_add_passes(), SceneRenderLayer::passflag, Scene::r, TreeElement::subtree, TSE_ANIM_DATA, TSE_LINKED_LAMP, TSE_LINKED_MAT, TSE_R_LAYER, TSE_R_LAYER_BASE, and Scene::world.
Referenced by outliner_add_id_contents(), and outliner_build_tree().
static void outliner_add_seq_dup | ( | SpaceOops * | soops, |
Sequence * | seq, | ||
TreeElement * | te, | ||
short | index | ||
) | [static] |
Definition at line 1152 of file outliner_tree.c.
References StripElem::name, Sequence::next, outliner_add_element(), p, Sequence::strip, Strip::stripdata, TreeElement::subtree, and TSE_SEQUENCE.
Referenced by outliner_build_tree().
Definition at line 1406 of file outliner_tree.c.
References BASACT, Scene::base, BLI_addtail(), BLI_remlink(), wmWindowManager::defaultconf, FALSE, ListBase::first, Base::flag, TreeStoreElem::flag, Group::gobject, Main::group, Group::id, Scene::id, TreeStoreElem::id, Library::id, Object::id, wmKeyConfig::keymaps, Scene::lay, Base::lay, Main::library, need_add_seq_dup(), ID::newid, wmKeyMap::next, Sequence::next, GroupObject::next, Base::next, TreeElement::next, ID::next, NULL, GroupObject::ob, OBACT, Base::object, Main::object, outliner_add_element(), outliner_add_scene_contents(), outliner_add_seq_dup(), outliner_filter_tree(), outliner_free_tree(), outliner_make_hierarchy(), outliner_sort(), outliner_storage_cleanup(), SpaceOops::outlinevis, Library::parent, RNA_main_pointer_create(), RNA_pointer_create(), RNA_UserPreferences, Main::scene, SpaceOops::search_flags, SpaceOops::search_string, SELECT, seq_give_editing(), Editing::seqbasep, SO_ALL_SCENES, SO_CUR_SCENE, SO_DATABLOCKS, SO_GROUPS, SO_KEYMAP, SO_LIBRARIES, SO_SAME_TYPE, SO_SEARCH_RECURSIVE, SO_SELECTED, SO_SEQUENCE, SO_TREESTORE_REDRAW, SO_USERDEF, SO_VISIBLE, SpaceOops::storeflag, TreeElement::subtree, SpaceOops::tree, TREESTORE, SpaceOops::treestore, TSE_CLOSED, TSE_KEYMAP, TSE_RNA_STRUCT, TSE_SEQUENCE, TSE_SEQUENCE_DUP, Object::type, U, and Main::wm.
Referenced by draw_outliner().
void outliner_cleanup_tree | ( | SpaceOops * | soops | ) |
Definition at line 225 of file outliner_tree.c.
References outliner_free_tree(), outliner_storage_cleanup(), and SpaceOops::tree.
Referenced by outliner_object_operation_exec().
static int outliner_filter_has_name | ( | TreeElement * | te, |
const char * | name, | ||
int | flags | ||
) | [static] |
Definition at line 1314 of file outliner_tree.c.
References BLI_snprintf(), BLI_strcasecmp(), BLI_strcasestr(), FNM_CASEFOLD, TreeElement::name, NULL, SO_FIND_CASE_SENSITIVE, and SO_FIND_COMPLETE.
Referenced by outliner_filter_tree().
Definition at line 1352 of file outliner_tree.c.
References BLI_remlink(), ListBase::first, TreeElement::flag, TreeStoreElem::flag, MEM_freeN(), TreeElement::name, TreeElement::next, NULL, outliner_filter_has_name(), outliner_free_tree(), SpaceOops::search_flags, SpaceOops::search_string, TreeElement::subtree, TE_FREE_NAME, TREESTORE, TSE_SEARCHMATCH, and TSELEM_OPEN.
Referenced by outliner_build_tree().
TreeElement* outliner_find_id | ( | SpaceOops * | soops, |
ListBase * | lb, | ||
ID * | id | ||
) |
Definition at line 269 of file outliner_tree.c.
References ListBase::first, TreeStoreElem::id, ID_GR, ID_OB, ID_SCE, TreeElement::idcode, TreeElement::next, NULL, outliner_find_id(), SpaceOops::outlinevis, SO_GROUPS, TreeElement::subtree, TREESTORE, and TreeStoreElem::type.
Referenced by outliner_find_id(), and outliner_show_active_exec().
static TreeElement* outliner_find_tree_element | ( | ListBase * | lb, |
int | store_index | ||
) | [static] |
Definition at line 232 of file outliner_tree.c.
References ListBase::first, TreeElement::next, NULL, TreeElement::store_index, and TreeElement::subtree.
Referenced by outliner_find_tse().
TreeElement* outliner_find_tse | ( | SpaceOops * | soops, |
TreeStoreElem * | tse | ||
) |
Definition at line 245 of file outliner_tree.c.
References TreeStore::data, TreeStoreElem::id, TreeStoreElem::nr, NULL, outliner_find_tree_element(), SpaceOops::tree, SpaceOops::treestore, TreeStoreElem::type, and TreeStore::usedelem.
Referenced by namebutton_cb().
void outliner_free_tree | ( | ListBase * | lb | ) |
Definition at line 212 of file outliner_tree.c.
References BLI_remlink(), ListBase::first, TreeElement::flag, MEM_freeN(), TreeElement::name, outliner_free_tree(), TreeElement::subtree, and TE_FREE_NAME.
Referenced by outliner_build_tree(), outliner_cleanup_tree(), outliner_filter_tree(), outliner_free(), and outliner_free_tree().
Definition at line 1176 of file outliner_tree.c.
References BLI_addtail(), BLI_remlink(), ListBase::first, Object::id, TreeStoreElem::id, ID_OB, TreeElement::idcode, ID::newid, TreeElement::next, TreeElement::parent, Object::parent, TreeElement::subtree, TREESTORE, and TreeStoreElem::type.
Referenced by outliner_build_tree().
ID* outliner_search_back | ( | SpaceOops * | soops, |
TreeElement * | te, | ||
short | idcode | ||
) | [read] |
Definition at line 289 of file outliner_tree.c.
References TreeStoreElem::id, TreeElement::idcode, NULL, TreeElement::parent, TREESTORE, and TreeStoreElem::type.
Referenced by outliner_do_object_operation(), tree_element_active_camera(), tree_element_active_lamp(), tree_element_active_material(), and tree_element_set_active_object().
Definition at line 1261 of file outliner_tree.c.
References BLI_addtail(), ListBase::first, TreeStoreElem::id, tTreeSort::id, ID_OB, tTreeSort::idcode, TreeElement::idcode, ListBase::last, MEM_freeN(), MEM_mallocN(), TreeElement::name, tTreeSort::name, TreeElement::next, NULL, TreeElement::subtree, tTreeSort::te, totelem, treesort_alpha(), TREESTORE, TSE_DEFGROUP, and TreeStoreElem::type.
Referenced by outliner_build_tree().
static void outliner_storage_cleanup | ( | SpaceOops * | soops | ) | [static] |
Definition at line 114 of file outliner_tree.c.
References TreeStore::data, TreeStoreElem::id, MEM_freeN(), MEM_mallocN(), NULL, SO_TREESTORE_CLEANUP, SpaceOops::storeflag, TreeStore::totelem, SpaceOops::treestore, TreeStoreElem::used, and TreeStore::usedelem.
Referenced by outliner_build_tree(), and outliner_cleanup_tree().
static int treesort_alpha | ( | const void * | v1, |
const void * | v2 | ||
) | [static] |
Definition at line 1212 of file outliner_tree.c.
References ID_OB, tTreeSort::idcode, and tTreeSort::name.
Referenced by outliner_sort().