|
Blender
V2.93
|
#include <stdlib.h>#include <string.h>#include "MEM_guardedalloc.h"#include "BLI_listbase.h"#include "BLI_utildefines.h"#include "BLT_translation.h"#include "DNA_armature_types.h"#include "DNA_brush_types.h"#include "DNA_collection_types.h"#include "DNA_linestyle_types.h"#include "DNA_material_types.h"#include "DNA_node_types.h"#include "DNA_scene_types.h"#include "DNA_windowmanager_types.h"#include "DNA_world_types.h"#include "BKE_action.h"#include "BKE_armature.h"#include "BKE_context.h"#include "BKE_layer.h"#include "BKE_linestyle.h"#include "BKE_material.h"#include "BKE_modifier.h"#include "BKE_object.h"#include "BKE_paint.h"#include "BKE_particle.h"#include "BKE_screen.h"#include "RNA_access.h"#include "ED_buttons.h"#include "ED_physics.h"#include "ED_screen.h"#include "UI_interface.h"#include "UI_resources.h"#include "WM_api.h"#include "buttons_intern.h"Go to the source code of this file.
Variables | |
| const char * | buttons_context_dir [] |
| int buttons_context | ( | const bContext * | C, |
| const char * | member, | ||
| bContextDataResult * | result | ||
| ) |
Definition at line 858 of file buttons_context.c.
References Object::actcol, BCONTEXT_TOOL, BKE_modifiers_findby_type(), buttons_context_compute(), buttons_context_dir, C, CTX_data_dir(), CTX_data_dir_set(), CTX_data_equals(), CTX_data_pointer_set(), CTX_RESULT_MEMBER_NOT_FOUND, CTX_RESULT_NO_DATA, CTX_RESULT_OK, CTX_wm_space_properties(), PointerRNA::data, eModifierType_Cloth, eModifierType_Collision, eModifierType_DynamicPaint, eModifierType_Fluid, eModifierType_Softbody, get_pointer_type(), FreestyleLineStyle::id, bNodeTree::id, Object::id, ParticleSettings::id, Tex::id, SpaceProperties::mainb, Object::mat, FreestyleLineStyle::mtex, ParticleSettings::mtex, ButsTextureUser::node, ButsTextureUser::ntree, NULL, OB_TYPE_SUPPORT_MATERIAL, PointerRNA::owner_id, SpaceProperties::path, PE_poll(), ButsTextureUser::prop, ButsTextureUser::ptr, ptr, result, RNA_Armature, RNA_Bone, RNA_Brush, RNA_Camera, RNA_ClothModifier, RNA_Collection, RNA_CollisionModifier, RNA_Curve, RNA_DynamicPaintModifier, RNA_EditBone, RNA_FluidModifier, RNA_FreestyleLineStyle, RNA_GreasePencil, RNA_Hair, RNA_Lattice, RNA_Light, RNA_LightProbe, RNA_LineStyleTextureSlot, RNA_Material, RNA_MaterialSlot, RNA_Mesh, RNA_MetaBall, RNA_Node, RNA_Object, RNA_ParticleSettings, RNA_ParticleSettingsTextureSlot, RNA_ParticleSystem, RNA_PointCloud, RNA_PoseBone, RNA_Property, RNA_Scene, RNA_SoftBodyModifier, RNA_Speaker, RNA_Texture, RNA_Volume, RNA_World, set_pointer_type(), FreestyleLineStyle::texact, ParticleSettings::texact, ButsContextTexture::texture, SpaceProperties::texuser, Object::totcol, Object::type, PointerRNA::type, and ButsContextTexture::user.
Referenced by ED_spacetype_buttons().
| void buttons_context_compute | ( | const bContext * | C, |
| SpaceProperties * | sbuts | ||
| ) |
Definition at line 694 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(), C, SpaceProperties::dataicon, SpaceProperties::flag, ButsContextPath::len, SpaceProperties::mainb, SpaceProperties::mainbuser, MEM_callocN, SpaceProperties::path, SpaceProperties::pathflag, ButsContextPath::ptr, ptr, RNA_Light, RNA_struct_is_a(), RNA_struct_ui_icon(), SB_SHADING_CONTEXT, and PointerRNA::type.
Referenced by buttons_context(), buttons_header_region_draw(), buttons_main_region_layout_properties(), and property_search_for_context().
Definition at line 1274 of file buttons_context.c.
References BCONTEXT_DATA, BCONTEXT_PARTICLE, C, CTX_wm_space_properties(), PointerRNA::data, SpaceProperties::flag, ParticleSettings::id, ButsContextPath::len, SpaceProperties::mainb, NULL, PointerRNA::owner_id, ParticleSystem::part, SpaceProperties::path, ButsContextPath::ptr, ptr, RNA_Image, RNA_ParticleSystem, SB_PIN_CONTEXT, and PointerRNA::type.
Referenced by toggle_pin_exec().
|
static |
Definition at line 555 of file buttons_context.c.
References BCONTEXT_BONE, BCONTEXT_BONE_CONSTRAINT, BCONTEXT_COLLECTION, BCONTEXT_CONSTRAINT, BCONTEXT_DATA, BCONTEXT_MATERIAL, BCONTEXT_MODIFIER, BCONTEXT_OBJECT, BCONTEXT_OUTPUT, BCONTEXT_PARTICLE, BCONTEXT_PHYSICS, BCONTEXT_RENDER, BCONTEXT_SCENE, BCONTEXT_SHADERFX, BCONTEXT_TEXTURE, BCONTEXT_TOOL, BCONTEXT_VIEW_LAYER, BCONTEXT_WORLD, buttons_context_path_bone(), buttons_context_path_collection(), buttons_context_path_data(), buttons_context_path_linestyle(), 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_shaderfx(), buttons_context_path_texture(), buttons_context_path_view_layer(), buttons_context_path_world(), C, CTX_wm_window(), ELEM, ButsContextPath::flag, Scene::id, ButsContextPath::len, NULL, OB_ARMATURE, SpaceProperties::pinid, ButsContextPath::ptr, RNA_id_pointer_create(), RNA_pointer_create(), RNA_ViewLayer, scene, SpaceProperties::texuser, WM_window_get_active_scene(), and WM_window_get_active_view_layer().
Referenced by buttons_context_compute(), and ED_buttons_set_context().
|
static |
Definition at line 372 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 |
Definition at line 456 of file buttons_context.c.
References BKE_paint_brush(), BKE_paint_get_active(), buttons_context_path_scene(), C, CTX_wm_window(), PointerRNA::data, ButsContextPath::len, NULL, ButsContextPath::ptr, ptr, RNA_Brush, RNA_id_pointer_create(), RNA_struct_is_a(), scene, PointerRNA::type, and WM_window_get_active_view_layer().
Referenced by buttons_context_path_texture().
|
static |
Definition at line 157 of file buttons_context.c.
References ViewLayer::active_collection, buttons_context_path_view_layer(), C, Freestyle::c, LayerCollection::collection, CTX_data_scene(), PointerRNA::data, ButsContextPath::len, Scene::master_collection, ButsContextPath::ptr, ptr, RNA_Collection, RNA_id_pointer_create(), RNA_struct_is_a(), scene, and PointerRNA::type.
Referenced by buttons_context_path().
|
static |
Definition at line 240 of file buttons_context.c.
References buttons_context_path_object(), Object::data, PointerRNA::data, ELEM, ButsContextPath::len, OB_ARMATURE, OB_CAMERA, OB_CURVE, OB_FONT, OB_GPENCIL, OB_HAIR, OB_LAMP, OB_LATTICE, OB_LIGHTPROBE, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SPEAKER, OB_SURF, OB_VOLUME, ButsContextPath::ptr, ptr, RNA_Armature, RNA_Camera, RNA_Curve, RNA_GreasePencil, RNA_Hair, RNA_id_pointer_create(), RNA_Lattice, RNA_Light, RNA_LightProbe, RNA_Mesh, RNA_MetaBall, RNA_PointCloud, RNA_Speaker, RNA_struct_is_a(), RNA_Volume, type, Object::type, and PointerRNA::type.
Referenced by buttons_context_path(), and buttons_context_path_bone().
|
static |
Definition at line 191 of file buttons_context.c.
References BKE_linestyle_active_from_view_layer(), buttons_context_path_view_layer(), PointerRNA::data, FreestyleLineStyle::id, ButsContextPath::len, linestyle, ButsContextPath::ptr, ptr, RNA_FreestyleLineStyle, RNA_id_pointer_create(), RNA_struct_is_a(), and PointerRNA::type.
Referenced by buttons_context_path(), and buttons_context_path_texture().
|
static |
Definition at line 346 of file buttons_context.c.
References Object::actcol, BKE_object_material_get(), buttons_context_path_object(), PointerRNA::data, Material::id, ButsContextPath::len, NULL, OB_TYPE_SUPPORT_MATERIAL, ButsContextPath::ptr, ptr, RNA_id_pointer_create(), RNA_Material, RNA_struct_is_a(), Object::type, and PointerRNA::type.
Referenced by buttons_context_path().
|
static |
Definition at line 305 of file buttons_context.c.
References BKE_object_active_modifier(), buttons_context_path_object(), PointerRNA::data, ELEM, Object::id, ButsContextPath::len, NULL, OB_CURVE, OB_FONT, OB_GPENCIL, OB_HAIR, OB_LATTICE, OB_MESH, OB_POINTCLOUD, OB_SURF, OB_VOLUME, ButsContextPath::ptr, RNA_Modifier, RNA_pointer_create(), and Object::type.
Referenced by buttons_context_path().
|
static |
Definition at line 214 of file buttons_context.c.
References ViewLayer::basact, PointerRNA::data, Object::id, if(), ButsContextPath::len, NULL, Base::object, ButsContextPath::ptr, ptr, RNA_id_pointer_create(), RNA_Object, RNA_struct_is_a(), RNA_ViewLayer, 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(), buttons_context_path_shaderfx(), and buttons_context_path_texture().
|
static |
Definition at line 431 of file buttons_context.c.
References buttons_context_path_object(), PointerRNA::data, Object::id, ButsContextPath::len, OB_MESH, psys_get_current(), ButsContextPath::ptr, 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 |
Definition at line 399 of file buttons_context.c.
References bArmature::act_bone, BKE_pose_channel_find_name(), buttons_context_path_object(), Object::data, PointerRNA::data, bArmature::edbo, Object::id, ButsContextPath::len, Bone::name, OB_ARMATURE, Object::pose, ButsContextPath::ptr, ptr, RNA_pointer_create(), RNA_PoseBone, RNA_struct_is_a(), Object::type, and PointerRNA::type.
Referenced by buttons_context_path().
|
static |
Definition at line 98 of file buttons_context.c.
References ButsContextPath::len, ButsContextPath::ptr, ptr, RNA_Scene, RNA_struct_is_a(), and PointerRNA::type.
Referenced by buttons_context_path(), buttons_context_path_brush(), buttons_context_path_view_layer(), and buttons_context_path_world().
|
static |
Definition at line 333 of file buttons_context.c.
References buttons_context_path_object(), PointerRNA::data, ELEM, ButsContextPath::len, OB_GPENCIL, ButsContextPath::ptr, and Object::type.
Referenced by buttons_context_path().
|
static |
Definition at line 487 of file buttons_context.c.
References buttons_context_path_brush(), buttons_context_path_linestyle(), buttons_context_path_object(), buttons_context_path_particle(), C, CTX_wm_window(), GS, id, ButsTextureUser::id, Tex::id, ID_BR, ID_LS, ID_OB, ID_PA, ButsContextPath::len, ID::name, ButsContextPath::ptr, ptr, RNA_id_pointer_create(), RNA_struct_is_a(), RNA_Texture, ButsContextTexture::texture, PointerRNA::type, and ButsContextTexture::user.
Referenced by buttons_context_path().
|
static |
Definition at line 106 of file buttons_context.c.
References BKE_view_layer_default_view(), buttons_context_path_scene(), PointerRNA::data, Scene::id, ButsContextPath::len, ButsContextPath::ptr, ptr, RNA_pointer_create(), RNA_struct_is_a(), RNA_ViewLayer, scene, wmWindow::scene, PointerRNA::type, and WM_window_get_active_view_layer().
Referenced by buttons_context_path(), buttons_context_path_collection(), and buttons_context_path_linestyle().
|
static |
Definition at line 131 of file buttons_context.c.
References buttons_context_path_scene(), PointerRNA::data, World::id, ButsContextPath::len, ButsContextPath::ptr, ptr, RNA_id_pointer_create(), RNA_struct_is_a(), RNA_World, scene, PointerRNA::type, world, and Scene::world.
Referenced by buttons_context_path().
| void buttons_context_register | ( | ARegionType * | art | ) |
Definition at line 1262 of file buttons_context.c.
References BLI_addtail(), BLT_I18NCONTEXT_DEFAULT_BPYRNA, buttons_panel_context_draw(), buttons_panel_context_poll(), PanelType::draw, PanelType::flag, PanelType::idname, PanelType::label, MEM_callocN, N_, PANEL_TYPE_NO_HEADER, PANEL_TYPE_NO_SEARCH, ARegionType::paneltypes, PanelType::poll, and PanelType::translation_context.
Referenced by ED_spacetype_buttons().
Definition at line 1188 of file buttons_context.c.
References BCONTEXT_OUTPUT, BCONTEXT_RENDER, BCONTEXT_SCENE, BCONTEXT_VIEW_LAYER, BCONTEXT_WORLD, C, CTX_wm_space_properties(), PointerRNA::data, ELEM, SpaceProperties::flag, Panel::layout, ButsContextPath::len, SpaceProperties::mainb, MEM_freeN, NULL, SpaceProperties::path, ButsContextPath::ptr, ptr, RNA_Scene, RNA_struct_name_get_alloc(), RNA_struct_ui_icon(), RNA_ViewLayer, SB_PIN_CONTEXT, PointerRNA::type, UI_EMBOSS_NONE, UI_LAYOUT_ALIGN_LEFT, UI_LAYOUT_ALIGN_RIGHT, uiItemL(), uiItemLDrag(), uiItemO(), uiItemSpacer(), uiLayoutRow(), uiLayoutSetAlignment(), and uiLayoutSetEmboss().
Referenced by buttons_context_register().
Definition at line 1182 of file buttons_context.c.
References BCONTEXT_TOOL, C, CTX_wm_space_properties(), and SpaceProperties::mainb.
Referenced by buttons_context_register().
|
static |
Definition at line 659 of file buttons_context.c.
References BCONTEXT_DATA, BCONTEXT_MATERIAL, BCONTEXT_TEXTURE, BCONTEXT_WORLD, C, CTX_wm_window(), ELEM, OB_CAMERA, OB_LAMP, OBACT, Object::type, and WM_window_get_active_view_layer().
Referenced by buttons_context_compute().
|
static |
Definition at line 675 of file buttons_context.c.
References BCONTEXT_DATA, BCONTEXT_MATERIAL, BCONTEXT_RENDER, BCONTEXT_WORLD, C, CTX_wm_window(), ELEM, OB_CAMERA, OB_LAMP, OBACT, Object::type, and WM_window_get_active_view_layer().
Referenced by buttons_context_compute().
| void ED_buttons_set_context | ( | const bContext * | C, |
| SpaceProperties * | sbuts, | ||
| PointerRNA * | ptr, | ||
| const int | context | ||
| ) |
Definition at line 800 of file buttons_context.c.
References buttons_context_path(), C, context, is_pointer_in_path(), SpaceProperties::mainb, SpaceProperties::mainbuser, and ptr.
| bool ED_buttons_should_sync_with_outliner | ( | const bContext * | C, |
| const SpaceProperties * | sbuts, | ||
| ScrArea * | area | ||
| ) |
Definition at line 790 of file buttons_context.c.
References blender::compositor::area(), C, CTX_wm_area(), ED_area_has_shared_border(), SpaceProperties::outliner_sync, PROPERTIES_SYNC_ALWAYS, and PROPERTIES_SYNC_AUTO.
|
static |
Definition at line 83 of file buttons_context.c.
References ButsContextPath::len, NULL, ButsContextPath::ptr, ptr, RNA_struct_is_a(), type, and PointerRNA::type.
Referenced by buttons_context().
|
static |
Definition at line 780 of file buttons_context.c.
References ButsContextPath::len, PointerRNA::owner_id, ButsContextPath::ptr, and ptr.
Referenced by ED_buttons_set_context().
|
static |
Definition at line 69 of file buttons_context.c.
References CTX_data_pointer_set(), CTX_RESULT_MEMBER_NOT_FOUND, CTX_RESULT_OK, PointerRNA::data, ButsContextPath::len, PointerRNA::owner_id, ButsContextPath::ptr, ptr, result, RNA_struct_is_a(), type, and PointerRNA::type.
Referenced by buttons_context().
| const char* buttons_context_dir[] |
Definition at line 814 of file buttons_context.c.
Referenced by buttons_context().