43 #include "RNA_prototypes.h"
54 #include "../interface/interface_intern.h"
115 const char *category,
135 const char *category)
191 N_(
"Geometry Nodes"),
202 const char *propname)
227 const char *propname)
240 N_(
"Grease Pencil Modifiers"),
265 brush = (
Brush *)pinid;
277 if (!pinid || id_type ==
ID_SCE) {
284 ob =
OBACT(view_layer);
307 if (psys && !limited_mode) {
338 users, &ob->
id,
ptr, prop,
N_(
"Fields"), ICON_FORCE_TEXTURE,
IFACE_(
"Texture Field"));
449 if (user->ptr.data) {
455 if (user->ptr.type == &RNA_ParticleSettingsTextureSlot) {
462 if (user->ptr.data == part->
mtex[
a]) {
474 ct->
index = user->index;
484 const char *last_category =
NULL;
491 if (!last_category || !
STREQ(last_category, user->
category)) {
556 uiItemL(layout,
TIP_(
"No textures in context"), ICON_NONE);
611 return area->spacedata.first;
619 if (data_p ==
NULL || prop_p ==
NULL) {
635 for (user = ct->users.first; user; user = user->
next) {
636 if (user->
ptr.
data == data_p && user->
prop == prop_p) {
659 if (texture ==
NULL) {
674 bool user_found =
false;
676 for (user = ct->
users.
first; user; user = user->next) {
677 if (user->ptr.data ==
ptr->
data && user->prop == prop) {
700 TIP_(
"Show texture in texture tab"));
703 user_found ? user->ptr.data :
NULL,
704 user_found ? user->prop :
NULL);
706 UI_but_disable(but,
TIP_(
"No (unpinned) Properties Editor found to display texture in"));
708 else if (!user_found) {
struct Scene * CTX_data_scene(const bContext *C)
struct SpaceProperties * CTX_wm_space_properties(const bContext *C)
struct Object * CTX_data_active_object(const bContext *C)
struct bScreen * CTX_wm_screen(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
struct wmWindow * CTX_wm_window(const bContext *C)
void BKE_gpencil_modifiers_foreach_tex_link(struct Object *ob, GreasePencilTexWalkFunc walk, void *userData)
struct ViewLayer * BKE_view_layer_default_view(const struct Scene *scene)
Blender kernel freestyle line style functionality.
FreestyleLineStyle * BKE_linestyle_active_from_view_layer(struct ViewLayer *view_layer)
void BKE_modifiers_foreach_tex_link(struct Object *ob, TexWalkFunc walk, void *userData)
void nodeSetSelected(struct bNode *node, bool select)
#define NODE_CLASS_TEXTURE
struct Brush * BKE_paint_brush(struct Paint *paint)
struct Paint * BKE_paint_get_active_from_context(const struct bContext *C)
struct ParticleSystem * psys_get_current(struct Object *ob)
#define LISTBASE_FOREACH(type, var, list)
BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
int BLI_listbase_count_at_most(const struct ListBase *listbase, int count_max) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
ID and Library types, which are fundamental for sdna.
#define NODE_ACTIVE_TEXTURE
Object is a sort of wrapper for general info.
#define OBACT(_view_layer)
void ED_node_set_active(struct Main *bmain, struct SpaceNode *snode, struct bNodeTree *ntree, struct bNode *node, bool *r_active_texture_changed)
void ED_area_tag_redraw(ScrArea *area)
Read Guarded memory(de)allocation.
void UI_but_disable(uiBut *but, const char *disabled_hint)
uiBut * uiDefIconTextBut(uiBlock *block, int type, int retval, int icon, const char *str, int x, int y, short width, short height, void *poin, float min, float max, float a1, float a2, const char *tip)
uiBlock * uiLayoutGetBlock(uiLayout *layout)
uiBut * uiDefIconTextMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, int icon, const char *str, int x, int y, short width, short height, const char *tip)
uiBut * uiDefIconBut(uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, void *poin, float min, float max, float a1, float a2, const char *tip)
void uiItemL(uiLayout *layout, const char *name, int icon)
void UI_but_type_set_menu_from_pulldown(uiBut *but)
void UI_but_func_set(uiBut *but, uiButHandleFunc func, void *arg1, void *arg2)
uiBut * uiDefMenuBut(uiBlock *block, uiMenuCreateFunc func, void *arg, const char *str, int x, int y, short width, short height, const char *tip)
void UI_but_funcN_set(uiBut *but, uiButHandleNFunc funcN, void *argN, void *arg2)
void UI_block_flag_enable(uiBlock *block, int flag)
static void template_texture_show(bContext *C, void *data_p, void *prop_p)
static void buttons_texture_modifier_gpencil_foreach(void *userData, Object *ob, GpencilModifierData *md, const char *propname)
void uiTemplateTextureUser(uiLayout *layout, bContext *C)
static void buttons_texture_user_socket_property_add(ListBase *users, ID *id, PointerRNA ptr, PropertyRNA *prop, bNodeTree *ntree, bNode *node, bNodeSocket *socket, const char *category, int icon, const char *name)
static void buttons_texture_user_property_add(ListBase *users, ID *id, PointerRNA ptr, PropertyRNA *prop, const char *category, int icon, const char *name)
static ScrArea * find_area_properties(const bContext *C)
static void buttons_texture_modifier_geonodes_users_add(Object *ob, NodesModifierData *nmd, bNodeTree *node_tree, ListBase *users)
static SpaceProperties * find_space_properties(const bContext *C)
static void buttons_texture_user_node_add(ListBase *users, ID *id, bNodeTree *ntree, bNode *node, const char *category, int icon, const char *name)
void uiTemplateTextureShow(uiLayout *layout, const bContext *C, PointerRNA *ptr, PropertyRNA *prop)
static void buttons_texture_users_from_context(ListBase *users, const bContext *C, SpaceProperties *sbuts)
static void template_texture_select(bContext *C, void *user_p, void *UNUSED(arg))
void buttons_texture_context_compute(const bContext *C, SpaceProperties *sbuts)
static void buttons_texture_modifier_foreach(void *userData, Object *ob, ModifierData *md, const char *propname)
static void buttons_texture_users_find_nodetree(ListBase *users, ID *id, bNodeTree *ntree, const char *category)
static void template_texture_user_menu(bContext *C, uiLayout *layout, void *UNUSED(arg))
FreestyleLineStyle linestyle
void *(* MEM_dupallocN)(const void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
static void area(int d1, int d2, int e1, int e2, float weights[2])
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
int RNA_struct_ui_icon(const StructRNA *type)
struct ButsTextureUser * user
struct bNodeSocket * socket
struct ButsTextureUser * next
struct bNodeTree * nodetree
struct bNodeTree * node_group
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
ViewLayer * WM_window_get_active_view_layer(const wmWindow *win)