Blender
V3.3
|
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "BLI_listbase.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "BLT_translation.h"
#include "DNA_ID.h"
#include "DNA_brush_types.h"
#include "DNA_linestyle_types.h"
#include "DNA_node_types.h"
#include "DNA_object_force_types.h"
#include "DNA_object_types.h"
#include "DNA_particle_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_windowmanager_types.h"
#include "BKE_context.h"
#include "BKE_gpencil_modifier.h"
#include "BKE_layer.h"
#include "BKE_linestyle.h"
#include "BKE_modifier.h"
#include "BKE_node.h"
#include "BKE_paint.h"
#include "BKE_particle.h"
#include "RNA_access.h"
#include "RNA_prototypes.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "ED_node.h"
#include "ED_screen.h"
#include "WM_api.h"
#include "WM_types.h"
#include "../interface/interface_intern.h"
#include "buttons_intern.h"
Go to the source code of this file.
void buttons_texture_context_compute | ( | const bContext * | C, |
SpaceProperties * | sbuts | ||
) |
Definition at line 363 of file buttons_texture.c.
References BLI_findindex(), BLI_findlink(), BLI_freelistN(), BLI_listbase_count_at_most(), buttons_texture_users_from_context(), C, PointerRNA::data, ListBase::first, bNode::flag, GS, ID_TE, ButsContextTexture::index, MEM_callocN, ID::name, ButsTextureUser::next, ButsTextureUser::node, NODE_ACTIVE_TEXTURE, ButsTextureUser::ntree, NULL, SpaceProperties::pinid, ButsTextureUser::prop, ButsTextureUser::ptr, RNA_property_pointer_get(), RNA_struct_is_a(), tex, ButsContextTexture::texture, SpaceProperties::texuser, PointerRNA::type, ButsContextTexture::user, and ButsContextTexture::users.
|
static |
Definition at line 199 of file buttons_texture.c.
References buttons_texture_modifier_geonodes_users_add(), buttons_texture_user_property_add(), eModifierType_Nodes, Object::id, N_, ModifierData::name, NodesModifierData::node_group, NULL, ptr, RNA_pointer_create(), RNA_struct_find_property(), RNA_struct_ui_icon(), ModifierData::type, PointerRNA::type, and users.
Referenced by buttons_texture_users_from_context().
|
static |
Definition at line 158 of file buttons_texture.c.
References buttons_texture_user_socket_property_add(), PointerRNA::data, Object::id, LISTBASE_FOREACH, NodesModifierData::modifier, N_, ModifierData::name, node, NODE_GROUP, NULL, ptr, RNA_pointer_create(), RNA_property_pointer_get(), RNA_struct_find_property(), RNA_struct_is_a(), RNA_struct_ui_icon(), SOCK_TEXTURE, SOCK_UNAVAIL, tex, PointerRNA::type, and users.
Referenced by buttons_texture_modifier_foreach().
|
static |
Definition at line 224 of file buttons_texture.c.
References buttons_texture_user_property_add(), Object::id, N_, GpencilModifierData::name, ptr, RNA_pointer_create(), RNA_struct_find_property(), RNA_struct_ui_icon(), PointerRNA::type, and users.
Referenced by buttons_texture_users_from_context().
|
static |
Definition at line 111 of file buttons_texture.c.
References BLI_addtail(), BLI_listbase_count(), ButsTextureUser::category, ButsTextureUser::icon, id, ButsTextureUser::id, ButsTextureUser::index, MEM_callocN, ButsTextureUser::name, node, ButsTextureUser::node, ntree, ButsTextureUser::ntree, and users.
Referenced by buttons_texture_users_find_nodetree().
|
static |
Definition at line 90 of file buttons_texture.c.
References BLI_addtail(), BLI_listbase_count(), ButsTextureUser::category, ButsTextureUser::icon, id, ButsTextureUser::id, ButsTextureUser::index, MEM_callocN, ButsTextureUser::name, ButsTextureUser::prop, ButsTextureUser::ptr, ptr, and users.
Referenced by buttons_texture_modifier_foreach(), buttons_texture_modifier_gpencil_foreach(), and buttons_texture_users_from_context().
|
static |
Definition at line 63 of file buttons_texture.c.
References BLI_addtail(), BLI_listbase_count(), ButsTextureUser::category, ButsTextureUser::icon, id, ButsTextureUser::id, ButsTextureUser::index, MEM_callocN, ButsTextureUser::name, node, ButsTextureUser::node, ntree, ButsTextureUser::ntree, ButsTextureUser::prop, ButsTextureUser::ptr, ptr, ButsTextureUser::socket, and users.
Referenced by buttons_texture_modifier_geonodes_users_add().
|
static |
Definition at line 132 of file buttons_texture.c.
References buttons_texture_user_node_add(), ListBase::first, bNodeTree::id, node, NODE_CLASS_TEXTURE, NODE_GROUP, bNodeTree::nodes, ntree, ptr, RNA_pointer_create(), RNA_struct_ui_icon(), PointerRNA::type, and users.
Referenced by buttons_texture_users_from_context().
|
static |
Definition at line 245 of file buttons_texture.c.
References Freestyle::a, BKE_gpencil_modifiers_foreach_tex_link(), BKE_linestyle_active_from_view_layer(), BKE_modifiers_foreach_tex_link(), BKE_paint_brush(), BKE_paint_get_active_from_context(), BKE_view_layer_default_view(), BLI_listbase_clear(), buttons_texture_modifier_foreach(), buttons_texture_modifier_gpencil_foreach(), buttons_texture_user_property_add(), buttons_texture_users_find_nodetree(), C, CTX_data_scene(), CTX_wm_window(), SpaceProperties::flag, PartDeflect::forcefield, GS, Brush::id, FreestyleLineStyle::id, Object::id, ParticleSettings::id, ID_BR, ID_LS, ID_OB, ID_SCE, IFACE_, linestyle, Brush::mask_mtex, MAX_MTEX, Brush::mtex, ParticleSettings::mtex, N_, ParticleSystem::name, ID::name, FreestyleLineStyle::nodetree, NULL, OBACT, ParticleSystem::part, Object::pd, PFIELD_TEXTURE, SpaceProperties::pinid, psys_get_current(), ptr, RNA_pointer_create(), RNA_struct_find_property(), RNA_struct_ui_icon(), SB_TEX_USER_LIMITED, scene, wmWindow::scene, users, and WM_window_get_active_view_layer().
Referenced by buttons_texture_context_compute().
Definition at line 588 of file buttons_texture.c.
References blender::compositor::area(), bScreen::areabase, C, CTX_data_active_object(), CTX_wm_screen(), GS, ID_OB, LISTBASE_FOREACH, ID::name, NULL, SpaceProperties::pinid, and SPACE_PROPERTIES.
Referenced by find_space_properties(), and template_texture_show().
|
static |
Definition at line 607 of file buttons_texture.c.
References blender::compositor::area(), C, find_area_properties(), and NULL.
Referenced by template_texture_select(), and uiTemplateTextureShow().
Definition at line 424 of file buttons_texture.c.
References Freestyle::a, C, CTX_data_main(), PointerRNA::data, ED_node_set_active(), find_space_properties(), if(), ButsContextTexture::index, LISTBASE_FOREACH, MAX_MTEX, ParticleSettings::mtex, NA_SELECTED, NC_NODE, node, nodeSetSelected(), NULL, SpaceProperties::preview, RNA_property_pointer_get(), RNA_struct_is_a(), tex, ParticleSettings::texact, ButsContextTexture::texture, SpaceProperties::texuser, PointerRNA::type, ButsContextTexture::user, and WM_event_add_notifier().
Referenced by template_texture_show(), and template_texture_user_menu().
Definition at line 617 of file buttons_texture.c.
References blender::compositor::area(), BCONTEXT_TEXTURE, C, PointerRNA::data, ED_area_tag_redraw(), find_area_properties(), SpaceProperties::mainb, SpaceProperties::mainbuser, ButsTextureUser::next, NULL, SpaceProperties::preview, ButsTextureUser::prop, ButsTextureUser::ptr, template_texture_select(), and SpaceProperties::texuser.
Referenced by uiTemplateTextureShow().
Definition at line 477 of file buttons_texture.c.
References BLI_snprintf(), uiBlock::buttons, C, ButsTextureUser::category, CTX_wm_space_properties(), PointerRNA::data, uiBut::drawflag, ListBase::first, ButsTextureUser::icon, Tex::id, IFACE_, ListBase::last, MEM_dupallocN, ButsTextureUser::name, ID::name, ButsTextureUser::next, NULL, ButsTextureUser::prop, ButsTextureUser::ptr, RNA_property_pointer_get(), STREQ, template_texture_select(), tex, SpaceProperties::texuser, UI_block_flag_enable(), UI_BLOCK_NO_FLIP, UI_BTYPE_BUT, UI_but_funcN_set(), UI_BUT_TEXT_LEFT, UI_MAX_NAME_STR, UI_UNIT_X, UI_UNIT_Y, uiDefIconTextBut(), uiItemL(), uiLayoutGetBlock(), and ButsContextTexture::users.
Referenced by uiTemplateTextureUser().
void uiTemplateTextureShow | ( | uiLayout * | layout, |
const bContext * | C, | ||
PointerRNA * | ptr, | ||
PropertyRNA * | prop | ||
) |
Definition at line 655 of file buttons_texture.c.
References BCONTEXT_TEXTURE, C, CTX_wm_space_properties(), PointerRNA::data, find_space_properties(), ListBase::first, if(), SpaceProperties::mainb, NULL, ptr, RNA_property_pointer_get(), template_texture_show(), SpaceProperties::texuser, TIP_, UI_BTYPE_BUT, UI_but_disable(), UI_but_func_set(), UI_UNIT_X, UI_UNIT_Y, uiDefIconBut(), uiLayoutGetBlock(), and ButsContextTexture::users.
Definition at line 536 of file buttons_texture.c.
References BLI_strncpy(), C, CTX_wm_space_properties(), uiBut::flag, ButsTextureUser::icon, ButsTextureUser::name, NULL, template_texture_user_menu(), SpaceProperties::texuser, TIP_, UI_BUT_ICON_SUBMENU, UI_but_type_set_menu_from_pulldown(), UI_MAX_NAME_STR, UI_UNIT_X, UI_UNIT_Y, uiDefIconTextMenuBut(), uiDefMenuBut(), uiItemL(), uiLayoutGetBlock(), and ButsContextTexture::user.