Blender
V3.3
|
#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 "RNA_prototypes.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 839 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_data_pointer_set_ptr(), 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, 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, set_pointer_type(), FreestyleLineStyle::texact, ParticleSettings::texact, ButsContextTexture::texture, SpaceProperties::texuser, Object::totcol, Object::type, and ButsContextTexture::user.
Referenced by ED_spacetype_buttons().
void buttons_context_compute | ( | const bContext * | C, |
SpaceProperties * | sbuts | ||
) |
Definition at line 677 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_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 1255 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, SB_PIN_CONTEXT, and PointerRNA::type.
Referenced by toggle_pin_exec().
|
static |
Definition at line 538 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(), 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 355 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, and RNA_pointer_create().
Referenced by buttons_context_path().
|
static |
Definition at line 439 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_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 142 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_id_pointer_create(), RNA_struct_is_a(), scene, and PointerRNA::type.
Referenced by buttons_context_path().
|
static |
Definition at line 225 of file buttons_context.c.
References buttons_context_path_object(), Object::data, PointerRNA::data, ELEM, ButsContextPath::len, OB_ARMATURE, OB_CAMERA, OB_CURVES, OB_CURVES_LEGACY, OB_FONT, OB_GPENCIL, OB_LAMP, OB_LATTICE, OB_LIGHTPROBE, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SPEAKER, OB_SURF, OB_VOLUME, ButsContextPath::ptr, ptr, RNA_id_pointer_create(), RNA_struct_is_a(), type, Object::type, and PointerRNA::type.
Referenced by buttons_context_path(), and buttons_context_path_bone().
|
static |
Definition at line 176 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_id_pointer_create(), RNA_struct_is_a(), and PointerRNA::type.
Referenced by buttons_context_path(), and buttons_context_path_texture().
|
static |
Definition at line 329 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_struct_is_a(), Object::type, and PointerRNA::type.
Referenced by buttons_context_path().
|
static |
Definition at line 288 of file buttons_context.c.
References BKE_object_active_modifier(), buttons_context_path_object(), PointerRNA::data, ELEM, Object::id, ButsContextPath::len, NULL, OB_CURVES, OB_CURVES_LEGACY, OB_FONT, OB_GPENCIL, OB_LATTICE, OB_MESH, OB_POINTCLOUD, OB_SURF, OB_VOLUME, ButsContextPath::ptr, RNA_pointer_create(), and Object::type.
Referenced by buttons_context_path().
|
static |
Definition at line 199 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_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(), buttons_context_path_shaderfx(), and buttons_context_path_texture().
|
static |
Definition at line 414 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_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 382 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_struct_is_a(), Object::type, and PointerRNA::type.
Referenced by buttons_context_path().
|
static |
Definition at line 83 of file buttons_context.c.
References ButsContextPath::len, ButsContextPath::ptr, ptr, 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 316 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 470 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(), ButsContextTexture::texture, PointerRNA::type, and ButsContextTexture::user.
Referenced by buttons_context_path().
|
static |
Definition at line 91 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(), 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 116 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(), scene, PointerRNA::type, world, and Scene::world.
Referenced by buttons_context_path().
void buttons_context_register | ( | ARegionType * | art | ) |
Definition at line 1243 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 1169 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_struct_name_get_alloc(), RNA_struct_ui_icon(), 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 1163 of file buttons_context.c.
References BCONTEXT_TOOL, C, CTX_wm_space_properties(), and SpaceProperties::mainb.
Referenced by buttons_context_register().
Definition at line 642 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 658 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 783 of file buttons_context.c.
References buttons_context_path(), C, blender::compositor::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 773 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 68 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 763 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 54 of file buttons_context.c.
References CTX_data_pointer_set_ptr(), CTX_RESULT_MEMBER_NOT_FOUND, CTX_RESULT_OK, ButsContextPath::len, ButsContextPath::ptr, ptr, result, RNA_struct_is_a(), type, and PointerRNA::type.
Referenced by buttons_context().
const char* buttons_context_dir[] |
Definition at line 797 of file buttons_context.c.
Referenced by bpy_context_members(), and buttons_context().