46#include "RNA_prototypes.hh"
62 for (
int i = 0;
i < path->
len;
i++) {
76 for (
int i = 0;
i < path->
len;
i++) {
282 if (ob &&
ELEM(type, -1, ob->
type)) {
443 if (psys !=
nullptr) {
541 if (active_strip ==
nullptr) {
561 &sequencer_scene->
id, &RNA_StripModifier, smd);
571static bool buttons_context_linestyle_pinnable(
const bContext *
C,
ViewLayer *view_layer)
618 if (!sequencer_scene) {
654 if (buttons_context_linestyle_pinnable(
C, view_layer)) {
761 sbuts->
path = MEM_new<ButsContextPath>(
"ButsContextPath");
786 sbuts->
dataicon = ICON_OUTLINER_DATA_LIGHT;
815 if (
flag & (1 <<
i)) {
846 for (
int i = 0;
i < path->
len; ++
i) {
896 "texture_user_property",
902 "particle_system_editable",
927 if (sbuts && sbuts->
path ==
nullptr) {
1045 int matnr = ob->
actcol - 1;
1046 matnr = std::max(matnr, 0);
1049 result, &ob->
id, &RNA_MaterialSlot, (
void *)(matnr + uintptr_t(&ob->
id)));
1273 for (
int i = 0;
i < path->
len;
i++) {
1285 ptr->type == &RNA_Scene)
1295 ptr->type == &RNA_ViewLayer)
1300 if (
ptr->data ==
nullptr) {
1306 row->
label(
"", ICON_RIGHTARROW);
1317 if (
name != namebuf) {
1322 row->
label(
"", icon);
1333 "BUTTONS_OT_toggle_pin",
"", (sbuts->
flag &
SB_PIN_CONTEXT) ? ICON_PINNED : ICON_UNPINNED);
1353 if (path->
len == 0) {
1357 for (
int i = path->
len - 1;
i >= 0;
i--) {
1362 if (
ptr->type == &RNA_ParticleSystem &&
ptr->data) {
1370 if (
ptr->type == &RNA_Image &&
ptr->data) {
1375 if (
ptr->owner_id) {
1376 return ptr->owner_id;
Blender kernel action and pose functionality.
bPoseChannel * BKE_pose_channel_find_name(const bPose *pose, const char *name)
void CTX_data_dir_set(bContextDataResult *result, const char **dir)
bool CTX_data_equals(const char *member, const char *str)
void CTX_data_pointer_set(bContextDataResult *result, ID *id, StructRNA *type, void *data)
bool CTX_data_dir(const char *member)
SpaceProperties * CTX_wm_space_properties(const bContext *C)
ScrArea * CTX_wm_area(const bContext *C)
wmWindow * CTX_wm_window(const bContext *C)
@ CTX_RESULT_MEMBER_NOT_FOUND
Scene * CTX_data_scene(const bContext *C)
void CTX_data_pointer_set_ptr(bContextDataResult *result, const PointerRNA *ptr)
void BKE_view_layer_synced_ensure(const Scene *scene, ViewLayer *view_layer)
LayerCollection * BKE_view_layer_active_collection_get(ViewLayer *view_layer)
ViewLayer * BKE_view_layer_default_view(const Scene *scene)
Object * BKE_view_layer_active_object_get(const ViewLayer *view_layer)
Blender kernel freestyle line style functionality.
FreestyleLineStyle * BKE_linestyle_active_from_view_layer(struct ViewLayer *view_layer)
General operations, lookup, etc. for materials.
Material * BKE_object_material_get(Object *ob, short act)
ModifierData * BKE_modifiers_findby_type(const Object *ob, ModifierType type)
General operations, lookup, etc. for blender objects.
ModifierData * BKE_object_active_modifier(const Object *ob)
Paint * BKE_paint_get_active(Scene *sce, ViewLayer *view_layer)
Brush * BKE_paint_brush(Paint *paint)
struct ParticleSystem * psys_get_current(struct Object *ob)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define STRNCPY_UTF8(dst, src)
#define BLT_I18NCONTEXT_DEFAULT_BPYRNA
Object groups, one object can be in many groups at once.
@ FREESTYLE_CONTROL_EDITOR_MODE
@ eModifierType_Collision
@ eModifierType_DynamicPaint
#define OB_TYPE_SUPPORT_MATERIAL(_type)
@ BCONTEXT_BONE_CONSTRAINT
@ BCONTEXT_STRIP_MODIFIER
bool PE_poll(bContext *C)
bool ED_area_has_shared_border(ScrArea *a, ScrArea *b)
Read Guarded memory(de)allocation.
void uiItemLDrag(uiLayout *layout, PointerRNA *ptr, blender::StringRef name, int icon)
static bool buttons_context_path(const bContext *C, SpaceProperties *sbuts, ButsContextPath *path, int mainb, int flag)
static bool buttons_context_path_shaderfx(ButsContextPath *path)
static bool buttons_context_path_bone(ButsContextPath *path)
static bool buttons_context_path_scene(ButsContextPath *path)
static int set_pointer_type(ButsContextPath *path, bContextDataResult *result, StructRNA *type)
static bool buttons_context_path_data(ButsContextPath *path, int type)
const char * buttons_context_dir[]
int buttons_context(const bContext *C, const char *member, bContextDataResult *result)
void ED_buttons_set_context(const bContext *C, SpaceProperties *sbuts, PointerRNA *ptr, const int context)
static PointerRNA * get_pointer_type(ButsContextPath *path, StructRNA *type)
void buttons_context_compute(const bContext *C, SpaceProperties *sbuts)
void buttons_context_register(ARegionType *art)
static bool buttons_context_path_material(ButsContextPath *path)
static bool buttons_context_path_texture(const bContext *C, ButsContextPath *path, ButsContextTexture *ct)
static bool buttons_context_path_pose_bone(ButsContextPath *path)
static bool buttons_context_path_object(ButsContextPath *path)
static int buttons_shading_new_context(const bContext *C, int flag)
static bool buttons_context_path_strip_modifier(Scene *sequencer_scene, ButsContextPath *path)
static bool buttons_context_path_particle(ButsContextPath *path)
bool ED_buttons_should_sync_with_outliner(const bContext *C, const SpaceProperties *sbuts, ScrArea *area)
static bool buttons_context_path_view_layer(ButsContextPath *path, wmWindow *win)
static bool buttons_context_path_linestyle(ButsContextPath *path, wmWindow *window)
static bool buttons_shading_context(const bContext *C, int mainb)
static bool is_pointer_in_path(ButsContextPath *path, PointerRNA *ptr)
static bool buttons_context_path_brush(const bContext *C, ButsContextPath *path)
static bool buttons_context_path_collection(const bContext *C, ButsContextPath *path, wmWindow *window)
static bool buttons_context_path_world(ButsContextPath *path)
ID * buttons_context_id_path(const bContext *C)
static void buttons_panel_context_draw(const bContext *C, Panel *panel)
static bool buttons_context_path_modifier(ButsContextPath *path)
static bool buttons_panel_context_poll(const bContext *C, PanelType *)
static bool buttons_context_path_strip(ButsContextPath *path)
void * MEM_callocN(size_t len, const char *str)
void MEM_freeN(void *vmemh)
T max(const T &a, const T &b)
Strip * select_active_get(const Scene *scene)
StripModifierData * modifier_get_active(const Strip *strip)
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
char * RNA_struct_name_get_alloc(PointerRNA *ptr, char *fixedbuf, int fixedlen, int *r_len)
int RNA_struct_ui_icon(const StructRNA *type)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
PointerRNA RNA_id_pointer_create(ID *id)
struct ButsTextureUser * user
struct Collection * collection
void(* draw)(const bContext *C, Panel *panel)
char idname[BKE_ST_MAXNAME]
bool(* poll)(const bContext *C, PanelType *pt)
char translation_context[BKE_ST_MAXNAME]
char label[BKE_ST_MAXNAME]
struct Collection * master_collection
struct FreestyleConfig freestyle_config
struct Scene * sequencer_scene
struct EditBone * act_edbone
void alignment_set(blender::ui::LayoutAlign alignment)
void label(blender::StringRef name, int icon)
uiLayout & row(bool align)
void emboss_set(blender::ui::EmbossType emboss)
PointerRNA op(wmOperatorType *ot, std::optional< blender::StringRef > name, int icon, blender::wm::OpCallContext context, eUI_Item_Flag flag)
ViewLayer * WM_window_get_active_view_layer(const wmWindow *win)
Scene * WM_window_get_active_scene(const wmWindow *win)
WorkSpace * WM_window_get_active_workspace(const wmWindow *win)