Blender V2.61 - r43446
|
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "BLI_listbase.h"
#include "BLI_utildefines.h"
#include "DNA_armature_types.h"
#include "DNA_lamp_types.h"
#include "DNA_material_types.h"
#include "DNA_node_types.h"
#include "DNA_scene_types.h"
#include "DNA_world_types.h"
#include "DNA_speaker_types.h"
#include "DNA_brush_types.h"
#include "BKE_context.h"
#include "BKE_action.h"
#include "BKE_material.h"
#include "BKE_modifier.h"
#include "BKE_paint.h"
#include "BKE_particle.h"
#include "BKE_screen.h"
#include "BKE_texture.h"
#include "RNA_access.h"
#include "ED_armature.h"
#include "ED_screen.h"
#include "ED_physics.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "buttons_intern.h"
Go to the source code of this file.
Definition in file buttons_context.c.
int buttons_context | ( | const bContext * | C, |
const char * | member, | ||
bContextDataResult * | result | ||
) |
Definition at line 689 of file buttons_context.c.
References Object::actcol, buttons_context_dir, CTX_data_dir(), CTX_data_dir_set(), CTX_data_equals(), CTX_data_pointer_set(), CTX_wm_space_buts(), PointerRNA::data, eModifierType_Cloth, eModifierType_Collision, eModifierType_DynamicPaint, eModifierType_Fluidsim, eModifierType_Smoke, eModifierType_Softbody, get_pointer_type(), give_current_material_texture_node(), give_node_material(), Material::id, World::id, Brush::id, Object::id, PointerRNA::id, ParticleSettings::id, Tex::id, Lamp::id, bNodeTree::id, Object::mat, modifiers_findByType(), Lamp::mtex, World::mtex, ParticleSettings::mtex, Brush::mtex, Material::mtex, ButsTextureUser::node, Material::nodetree, ButsTextureUser::ntree, NULL, OB_TYPE_SUPPORT_MATERIAL, SpaceButs::path, PE_poll(), ButsTextureUser::ptr, RNA_Armature, RNA_Bone, RNA_Brush, RNA_BrushTextureSlot, RNA_Camera, RNA_ClothModifier, RNA_CollisionModifier, RNA_Curve, RNA_DynamicPaintModifier, RNA_EditBone, RNA_FluidSimulationModifier, RNA_Lamp, RNA_LampTextureSlot, RNA_Lattice, RNA_Material, RNA_MaterialSlot, RNA_MaterialTextureSlot, RNA_Mesh, RNA_MetaBall, RNA_Node, RNA_Object, RNA_ParticleSettingsTextureSlot, RNA_ParticleSystem, RNA_PoseBone, RNA_SmokeModifier, RNA_SoftBodyModifier, RNA_Speaker, RNA_Texture, RNA_World, RNA_WorldTextureSlot, set_pointer_type(), World::texact, Lamp::texact, Material::texact, ParticleSettings::texact, ButsContextTexture::texture, SpaceButs::texuser, Object::totcol, Object::type, PointerRNA::type, Material::use_nodes, and ButsContextTexture::user.
Referenced by ED_spacetype_buttons().
Definition at line 608 of file buttons_context.c.
References BCONTEXT_DATA, BCONTEXT_OBJECT, BCONTEXT_SCENE, BCONTEXT_TOT, buttons_context_path(), buttons_shading_context(), buttons_shading_new_context(), buttons_texture_context_compute(), SpaceButs::dataicon, SpaceButs::flag, ButsContextPath::len, SpaceButs::mainb, SpaceButs::mainbuser, MEM_callocN(), SpaceButs::path, SpaceButs::pathflag, ButsContextPath::ptr, RNA_struct_ui_icon(), SB_SHADING_CONTEXT, and PointerRNA::type.
Referenced by buttons_header_buttons(), and buttons_main_area_draw().
Definition at line 978 of file buttons_context.c.
References BCONTEXT_RENDER, BCONTEXT_SCENE, CTX_wm_space_buts(), PointerRNA::data, ELEM, SpaceButs::flag, ICONTOG, ButsContextPath::len, SpaceButs::mainb, MEM_freeN(), NULL, SpaceButs::path, pin_cb(), ButsContextPath::ptr, RNA_Scene, RNA_struct_name_get_alloc(), RNA_struct_ui_icon(), SB_PIN_CONTEXT, PointerRNA::type, UI_BUT_UNDO, UI_EMBOSSN, UI_LAYOUT_ALIGN_LEFT, UI_UNIT_X, UI_UNIT_Y, uiBlockSetEmboss(), uiButClearFlag(), uiButSetFunc(), uiDefIconButBitC(), uiItemL(), uiItemLDrag(), uiLayoutGetBlock(), uiLayoutRow(), and uiLayoutSetAlignment().
Referenced by buttons_panel_context().
Definition at line 1043 of file buttons_context.c.
References BCONTEXT_PARTICLE, CTX_wm_space_buts(), PointerRNA::data, SpaceButs::flag, ParticleSettings::id, PointerRNA::id, ButsContextPath::len, SpaceButs::mainb, NULL, ParticleSystem::part, SpaceButs::path, ButsContextPath::ptr, RNA_ParticleSystem, SB_PIN_CONTEXT, and PointerRNA::type.
Referenced by pin_cb().
static int buttons_context_path | ( | const bContext * | C, |
ButsContextPath * | path, | ||
int | mainb, | ||
int | flag | ||
) | [static] |
Definition at line 511 of file buttons_context.c.
References BCONTEXT_BONE, BCONTEXT_BONE_CONSTRAINT, BCONTEXT_CONSTRAINT, BCONTEXT_DATA, BCONTEXT_MATERIAL, BCONTEXT_MODIFIER, BCONTEXT_OBJECT, BCONTEXT_PARTICLE, BCONTEXT_PHYSICS, BCONTEXT_RENDER, BCONTEXT_SCENE, BCONTEXT_TEXTURE, BCONTEXT_WORLD, buttons_context_path_bone(), buttons_context_path_data(), buttons_context_path_material(), buttons_context_path_modifier(), buttons_context_path_object(), buttons_context_path_particle(), buttons_context_path_pose_bone(), buttons_context_path_scene(), buttons_context_path_texture(), buttons_context_path_world(), CTX_data_scene(), CTX_wm_space_buts(), ButsContextPath::flag, ButsContextPath::len, OB_ARMATURE, SpaceButs::pinid, ButsContextPath::ptr, RNA_id_pointer_create(), ButsContextPath::tex_ctx, SpaceButs::texture_context, and SpaceButs::texuser.
Referenced by buttons_context_compute().
static int buttons_context_path_bone | ( | ButsContextPath * | path | ) | [static] |
Definition at line 248 of file buttons_context.c.
References bArmature::act_bone, bArmature::act_edbone, buttons_context_path_data(), PointerRNA::data, bArmature::edbo, bArmature::id, ButsContextPath::len, OB_ARMATURE, ButsContextPath::ptr, RNA_Bone, RNA_EditBone, and RNA_pointer_create().
Referenced by buttons_context_path().
static int buttons_context_path_brush | ( | ButsContextPath * | path | ) | [static] |
Definition at line 339 of file buttons_context.c.
References buttons_context_path_scene(), PointerRNA::data, ButsContextPath::len, NULL, paint_brush(), paint_get_active(), ButsContextPath::ptr, RNA_Brush, RNA_id_pointer_create(), RNA_struct_is_a(), and PointerRNA::type.
Referenced by buttons_context_path_texture().
static int buttons_context_path_data | ( | ButsContextPath * | path, |
int | type | ||
) | [static] |
Definition at line 169 of file buttons_context.c.
References buttons_context_path_object(), Object::data, PointerRNA::data, ELEM3, ButsContextPath::len, OB_ARMATURE, OB_CAMERA, OB_CURVE, OB_FONT, OB_LAMP, OB_LATTICE, OB_MBALL, OB_MESH, OB_SPEAKER, OB_SURF, ButsContextPath::ptr, RNA_Armature, RNA_Camera, RNA_Curve, RNA_id_pointer_create(), RNA_Lamp, RNA_Lattice, RNA_Mesh, RNA_MetaBall, RNA_Speaker, RNA_struct_is_a(), Object::type, and PointerRNA::type.
Referenced by buttons_context_path(), buttons_context_path_bone(), and buttons_context_path_texture().
static int buttons_context_path_material | ( | ButsContextPath * | path, |
int | for_texture | ||
) | [static] |
Definition at line 213 of file buttons_context.c.
References Object::actcol, buttons_context_path_object(), PointerRNA::data, give_current_material(), give_current_material_texture_node(), give_node_material(), Material::id, ButsContextPath::len, OB_TYPE_SUPPORT_MATERIAL, ButsContextPath::ptr, RNA_id_pointer_create(), RNA_Material, RNA_struct_is_a(), Object::type, and PointerRNA::type.
Referenced by buttons_context_path(), and buttons_context_path_texture().
static int buttons_context_path_modifier | ( | ButsContextPath * | path | ) | [static] |
Definition at line 199 of file buttons_context.c.
References buttons_context_path_object(), PointerRNA::data, ELEM5, ButsContextPath::len, OB_CURVE, OB_FONT, OB_LATTICE, OB_MESH, OB_SURF, ButsContextPath::ptr, and Object::type.
Referenced by buttons_context_path().
static int buttons_context_path_object | ( | ButsContextPath * | path | ) | [static] |
Definition at line 142 of file buttons_context.c.
References Scene::basact, buttons_context_path_scene(), PointerRNA::data, Object::id, ButsContextPath::len, NULL, Base::object, ButsContextPath::ptr, RNA_id_pointer_create(), RNA_Object, RNA_struct_is_a(), and PointerRNA::type.
Referenced by buttons_context_path(), buttons_context_path_data(), buttons_context_path_material(), buttons_context_path_modifier(), buttons_context_path_particle(), buttons_context_path_pose_bone(), and buttons_context_path_texture().
static int buttons_context_path_particle | ( | ButsContextPath * | path | ) | [static] |
Definition at line 312 of file buttons_context.c.
References buttons_context_path_object(), PointerRNA::data, Object::id, ButsContextPath::len, OB_MESH, psys_get_current(), ButsContextPath::ptr, RNA_ParticleSettings, RNA_ParticleSystem, RNA_pointer_create(), RNA_struct_is_a(), Object::type, and PointerRNA::type.
Referenced by buttons_context_path(), and buttons_context_path_texture().
static int buttons_context_path_pose_bone | ( | ButsContextPath * | path | ) | [static] |
Definition at line 278 of file buttons_context.c.
References bArmature::act_bone, buttons_context_path_object(), Object::data, PointerRNA::data, bArmature::edbo, get_pose_channel(), Object::id, ButsContextPath::len, Bone::name, OB_ARMATURE, Object::pose, ButsContextPath::ptr, RNA_pointer_create(), RNA_PoseBone, RNA_struct_is_a(), Object::type, and PointerRNA::type.
Referenced by buttons_context_path().
static int buttons_context_path_scene | ( | ButsContextPath * | path | ) | [static] |
Definition at line 102 of file buttons_context.c.
References ButsContextPath::len, ButsContextPath::ptr, RNA_Scene, RNA_struct_is_a(), and PointerRNA::type.
Referenced by buttons_context_path(), buttons_context_path_brush(), buttons_context_path_object(), and buttons_context_path_world().
static int buttons_context_path_texture | ( | ButsContextPath * | path, |
ButsContextTexture * | ct | ||
) | [static] |
Definition at line 368 of file buttons_context.c.
References buttons_context_path_brush(), buttons_context_path_data(), buttons_context_path_material(), buttons_context_path_object(), buttons_context_path_particle(), buttons_context_path_world(), PointerRNA::data, give_current_brush_texture(), give_current_lamp_texture(), give_current_material_texture(), give_current_particle_texture(), give_current_world_texture(), GS, World::id, ParticleSettings::id, Tex::id, ButsTextureUser::id, ID_BR, ID_LA, ID_MA, ID_OB, ID_PA, ID_WO, ButsContextPath::len, ID::name, OB_LAMP, ParticleSystem::part, ButsContextPath::ptr, RNA_id_pointer_create(), RNA_ParticleSettings, RNA_struct_is_a(), RNA_Texture, SB_TEXC_BRUSH, SB_TEXC_PARTICLES, SB_TEXC_WORLD, ButsContextPath::tex_ctx, ButsContextTexture::texture, PointerRNA::type, and ButsContextTexture::user.
Referenced by buttons_context_path().
static int buttons_context_path_world | ( | ButsContextPath * | path | ) | [static] |
Definition at line 112 of file buttons_context.c.
References buttons_context_path_scene(), PointerRNA::data, World::id, ButsContextPath::len, ButsContextPath::ptr, RNA_id_pointer_create(), RNA_struct_is_a(), RNA_World, PointerRNA::type, and Scene::world.
Referenced by buttons_context_path(), and buttons_context_path_texture().
void buttons_context_register | ( | ARegionType * | art | ) |
Definition at line 1031 of file buttons_context.c.
References BLI_addtail(), buttons_panel_context(), PanelType::draw, PanelType::flag, PanelType::idname, PanelType::label, MEM_callocN(), ARegionType::paneltypes, and PNL_NO_HEADER.
Referenced by ED_spacetype_buttons().
Definition at line 1026 of file buttons_context.c.
References buttons_context_draw(), and Panel::layout.
Referenced by buttons_context_register().
static int buttons_shading_context | ( | const bContext * | C, |
int | mainb | ||
) | [static] |
Definition at line 582 of file buttons_context.c.
References BCONTEXT_DATA, BCONTEXT_MATERIAL, BCONTEXT_TEXTURE, BCONTEXT_WORLD, CTX_data_active_object(), ELEM, ELEM3, OB_CAMERA, OB_LAMP, and Object::type.
Referenced by buttons_context_compute().
static int buttons_shading_new_context | ( | const bContext * | C, |
int | flag | ||
) | [static] |
Definition at line 594 of file buttons_context.c.
References BCONTEXT_DATA, BCONTEXT_MATERIAL, BCONTEXT_RENDER, BCONTEXT_WORLD, CTX_data_active_object(), ELEM, OB_CAMERA, OB_LAMP, and Object::type.
Referenced by buttons_context_compute().
static PointerRNA* get_pointer_type | ( | ButsContextPath * | path, |
StructRNA * | type | ||
) | [static] |
Definition at line 85 of file buttons_context.c.
References ButsContextPath::len, NULL, ButsContextPath::ptr, RNA_struct_is_a(), and PointerRNA::type.
Referenced by buttons_context().
static void pin_cb | ( | bContext * | C, |
void * | UNUSEDarg1, | ||
void * | UNUSEDarg2 | ||
) | [static] |
Definition at line 965 of file buttons_context.c.
References buttons_context_id_path(), CTX_wm_area(), CTX_wm_space_buts(), ED_area_tag_redraw(), SpaceButs::flag, NULL, SpaceButs::pinid, and SB_PIN_CONTEXT.
Referenced by buttons_context_draw().
static int set_pointer_type | ( | ButsContextPath * | path, |
bContextDataResult * | result, | ||
StructRNA * | type | ||
) | [static] |
Definition at line 68 of file buttons_context.c.
References CTX_data_pointer_set(), PointerRNA::data, PointerRNA::id, ButsContextPath::len, ButsContextPath::ptr, RNA_struct_is_a(), and PointerRNA::type.
Referenced by buttons_context().
const char* buttons_context_dir[] |
{ "world", "object", "mesh", "armature", "lattice", "curve", "meta_ball", "lamp", "speaker", "camera", "material", "material_slot", "texture", "texture_slot", "texture_user", "bone", "edit_bone", "pose_bone", "particle_system", "particle_system_editable", "cloth", "soft_body", "fluid", "smoke", "collision", "brush", "dynamic_paint", NULL}
Definition at line 682 of file buttons_context.c.
Referenced by buttons_context().