47#include "RNA_prototypes.hh"
65 for (
int i = 0; i < path->
len; i++) {
79 for (
int i = 0; i < path->
len; i++) {
286 if (ob &&
ELEM(type, -1, ob->
type)) {
289 path->
ptr[path->
len] = {};
457 if (psys !=
nullptr) {
556 if (active_strip ==
nullptr) {
576 &sequencer_scene->
id, RNA_StripModifier, smd);
599 &scene->
id, RNA_SceneCompositorEffect, effect);
609static bool buttons_context_linestyle_pinnable(
const bContext *
C, ViewLayer *view_layer)
625 if (sbuts->pinid && sbuts->pinid == &scene->id) {
656 if (!sequencer_scene) {
693 if (buttons_context_linestyle_pinnable(
C, view_layer)) {
805 sbuts->
path = MEM_new<ButsContextPath>(
"ButsContextPath");
830 sbuts->
dataicon = ICON_OUTLINER_DATA_LIGHT;
849 if ((flag & (1 << sbuts->
mainb)) == 0) {
859 if (flag & (1 << i)) {
869 if (!(flag & (1 << sbuts->
mainb))) {
890 for (
int i = 0; i < path->
len; ++i) {
940 "texture_user_property",
946 "particle_system_editable",
971 if (sbuts && sbuts->
path ==
nullptr) {
1089 int matnr = ob->
actcol - 1;
1090 matnr = std::max(matnr, 0);
1095 reinterpret_cast<void *
>(matnr +
uintptr_t(&ob->
id)));
1318 for (
int i = 0; i < path->
len; i++) {
1331 ptr->
type == RNA_Scene)
1341 ptr->
type == RNA_ViewLayer)
1352 row.
label(
"", ICON_RIGHTARROW);
1361 uiItemLDrag(&row, ptr, name, icon);
1363 if (name != namebuf) {
1368 row.
label(
"", icon);
1379 "BUTTONS_OT_toggle_pin",
"", (sbuts->
flag &
SB_PIN_CONTEXT) ? ICON_PINNED : ICON_UNPINNED);
1399 if (path->
len == 0) {
1403 for (
int i = path->
len - 1; i >= 0; i--) {
1408 if (ptr->
type == RNA_ParticleSystem && *ptr) {
1416 if (ptr->
type == RNA_Image && *ptr) {
Blender kernel action and pose functionality.
Blender kernel freestyle line style functionality.
General operations, lookup, etc. for materials.
General operations, lookup, etc. for blender objects.
#define STRNCPY_UTF8(dst, src)
#define BLT_I18NCONTEXT_DEFAULT_BPYRNA
Object groups, one object can be in many groups at once.
#define OB_TYPE_SUPPORT_MATERIAL(_type)
Read Blender memory allocation and freeing.
SceneCompositorEffect * get_active_effect(const Scene &scene)
T max(const T &a, const T &b)
Strip * select_active_get(const Scene *scene)
StripModifierData * modifier_get_active(const Strip *strip)
static bool buttons_context_path_world(ButsContextPath *path)
static eSpaceButtons_Context buttons_shading_new_context(const bContext *C, int flag)
bool ED_buttons_should_sync_with_outliner(const bContext *C, const SpaceProperties *sbuts, ScrArea *area)
ScrArea * CTX_wm_area(const bContext *C)
static bool buttons_context_path_strip_modifier(Scene *sequencer_scene, ButsContextPath *path)
void ED_buttons_set_context(const bContext *C, SpaceProperties *sbuts, PointerRNA *ptr, eSpaceButtons_Context context)
Object * BKE_view_layer_active_object_get(const ViewLayer *view_layer)
static int set_pointer_type(ButsContextPath *path, bContextDataResult *result, StructRNA *type)
static bool buttons_context_path_compositor(ButsContextPath *path)
void CTX_data_dir_set(bContextDataResult *result, const char **dir)
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
int buttons_context(const bContext *C, const char *member, bContextDataResult *result)
struct ParticleSystem * psys_get_current(struct Object *ob)
PointerRNA RNA_id_pointer_create(ID *id)
static bool buttons_context_path_texture(const bContext *C, ButsContextPath *path, ButsContextTexture *ct)
ID * buttons_context_id_path(const bContext *C)
Material * BKE_object_material_get(Object *ob, short act)
void buttons_context_register(ARegionType *art)
static bool buttons_context_path(const bContext *C, SpaceProperties *sbuts, ButsContextPath *path, int mainb, int flag)
const char * buttons_context_dir[]
@ eModifierType_Collision
@ eModifierType_DynamicPaint
static bool buttons_context_path_shaderfx(ButsContextPath *path)
static bool buttons_context_path_bone(ButsContextPath *path)
wmWindow * CTX_wm_window(const bContext *C)
char * RNA_struct_name_get_alloc(PointerRNA *ptr, char *fixedbuf, int fixedlen, int *r_len)
static bool buttons_panel_context_poll(const bContext *C, PanelType *)
bool CTX_data_equals(const char *member, const char *str)
bool ED_area_has_shared_border(ScrArea *a, ScrArea *b)
ViewLayer * WM_window_get_active_view_layer(const wmWindow *win)
static bool buttons_context_path_brush(const bContext *C, ButsContextPath *path)
ViewLayer * BKE_view_layer_default_view(const Scene *scene)
ModifierData * BKE_object_active_modifier(const Object *ob)
static bool buttons_context_path_strip(ButsContextPath *path)
static bool buttons_context_path_pose_bone(ButsContextPath *path)
static bool is_pointer_in_path(ButsContextPath *path, PointerRNA *ptr)
Scene * WM_window_get_active_scene(const wmWindow *win)
LayerCollection * BKE_view_layer_active_collection_get(ViewLayer *view_layer)
void buttons_context_compute(const bContext *C, SpaceProperties *sbuts)
void * MEM_new_zeroed(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
static PointerRNA * get_pointer_type(ButsContextPath *path, StructRNA *type)
void CTX_data_pointer_set_ptr(bContextDataResult *result, const PointerRNA *ptr)
void CTX_data_pointer_set(bContextDataResult *result, ID *id, StructRNA *type, void *data)
static bool buttons_context_path_data(ButsContextPath *path, int type)
static bool buttons_context_path_material(ButsContextPath *path)
WorkSpace * WM_window_get_active_workspace(const wmWindow *win)
bool BKE_view_layer_synced_ensure(const Main &bmain, const Scene *scene, ViewLayer *view_layer)
@ BCONTEXT_STRIP_MODIFIER
@ BCONTEXT_BONE_CONSTRAINT
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
static bool buttons_context_path_particle(ButsContextPath *path)
static bool buttons_shading_context(const bContext *C, int mainb)
bool CTX_data_dir(const char *member)
_W64 unsigned int uintptr_t
static bool buttons_context_path_collection(const bContext *C, ButsContextPath *path, wmWindow *window)
int RNA_struct_ui_icon(const StructRNA *type)
static bool buttons_context_path_object(ButsContextPath *path)
static bool buttons_context_path_scene(ButsContextPath *path)
ModifierData * BKE_modifiers_findby_type(const Object *ob, ModifierType type)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Main * CTX_data_main(const bContext *C)
static void buttons_panel_context_draw(const bContext *C, Panel *panel)
FreestyleLineStyle * BKE_linestyle_active_from_view_layer(struct ViewLayer *view_layer)
ID_Type GS(const char *name)
static bool buttons_context_path_linestyle(ButsContextPath *path, wmWindow *window)
Brush * BKE_paint_brush(Paint *paint)
Scene * CTX_data_scene(const bContext *C)
bool PE_poll(bContext *C)
@ CTX_RESULT_MEMBER_NOT_FOUND
void buttons_texture_context_compute(const bContext *C, SpaceProperties *sbuts)
SpaceProperties * CTX_wm_space_properties(const bContext *C)
bPoseChannel * BKE_pose_channel_find_name(const bPose *pose, const char *name)
static bool buttons_context_path_view_layer(ButsContextPath *path, wmWindow *win)
Paint * BKE_paint_get_active(const Main &bmain, Scene *sce, ViewLayer *view_layer)
static bool buttons_context_path_modifier(ButsContextPath *path)
@ FREESTYLE_CONTROL_EDITOR_MODE
ListBaseT< PanelType > paneltypes
struct ButsTextureUser * user
struct Collection * collection
eObject_EmptyDrawType empty_drawtype
char translation_context[BKE_ST_MAXNAME]
void(*) draw(const bContext *C, Panel *panel)
bool(*) poll(const bContext *C, PanelType *pt)
char idname[BKE_ST_MAXNAME]
char label[BKE_ST_MAXNAME]
struct Collection * master_collection
eSpaceButtons_Context mainb
eSpaceButtons_Context mainbuser
eSpaceButtons_OutlinerSync outliner_sync
struct Scene * sequencer_scene
ListBaseT< EditBone > * edbo
struct EditBone * act_edbone
void alignment_set(LayoutAlign alignment)
void label(StringRef name, int icon)
PointerRNA op(wmOperatorType *ot, std::optional< StringRef > name, int icon, wm::OpCallContext context, eUI_Item_Flag flag)
void emboss_set(EmbossType emboss)