Blender V2.61 - r43446
|
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "BLI_listbase.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "DNA_brush_types.h"
#include "DNA_ID.h"
#include "DNA_lamp_types.h"
#include "DNA_material_types.h"
#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_object_force.h"
#include "DNA_particle_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_world_types.h"
#include "BKE_context.h"
#include "BKE_material.h"
#include "BKE_modifier.h"
#include "BKE_node.h"
#include "BKE_paint.h"
#include "BKE_particle.h"
#include "BKE_scene.h"
#include "RNA_access.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "ED_node.h"
#include "ED_screen.h"
#include "../interface/interface_intern.h"
#include "buttons_intern.h"
Go to the source code of this file.
Functions | |
static void | buttons_texture_user_property_add (ListBase *users, ID *id, PointerRNA ptr, PropertyRNA *prop, const char *category, int icon, const char *name) |
static void | buttons_texture_user_node_add (ListBase *users, ID *id, bNodeTree *ntree, bNode *node, const char *category, int icon, const char *name) |
static void | buttons_texture_users_find_nodetree (ListBase *users, ID *id, bNodeTree *ntree, const char *category) |
static void | buttons_texture_modifier_foreach (void *userData, Object *ob, ModifierData *md, const char *propname) |
static void | buttons_texture_users_from_context (ListBase *users, const bContext *C, SpaceButs *sbuts) |
void | buttons_texture_context_compute (const bContext *C, SpaceButs *sbuts) |
static void | template_texture_select (bContext *C, void *user_p, void *UNUSED(arg)) |
static void | template_texture_user_menu (bContext *C, uiLayout *layout, void *UNUSED(arg)) |
void | uiTemplateTextureUser (uiLayout *layout, bContext *C) |
static void | template_texture_show (bContext *C, void *data_p, void *prop_p) |
void | uiTemplateTextureShow (uiLayout *layout, bContext *C, PointerRNA *ptr, PropertyRNA *prop) |
Definition in file buttons_texture.c.
Definition at line 249 of file buttons_texture.c.
References BLI_countlist(), BLI_findindex(), BLI_findlink(), BLI_freelistN(), buttons_texture_users_from_context(), CTX_data_scene(), PointerRNA::data, ListBase::first, bNode::flag, ButsContextTexture::index, MEM_callocN(), MEM_freeN(), ButsTextureUser::next, ButsTextureUser::node, NODE_ACTIVE_TEXTURE, ButsTextureUser::ntree, NULL, ButsTextureUser::prop, ButsTextureUser::ptr, RNA_property_pointer_get(), RNA_struct_is_a(), RNA_Texture, scene_use_new_shading_nodes(), ButsContextTexture::texture, SpaceButs::texuser, PointerRNA::type, ButsContextTexture::user, and ButsContextTexture::users.
static void buttons_texture_modifier_foreach | ( | void * | userData, |
Object * | ob, | ||
ModifierData * | md, | ||
const char * | propname | ||
) | [static] |
Definition at line 133 of file buttons_texture.c.
References buttons_texture_user_property_add(), Object::id, ModifierData::name, RNA_Modifier, RNA_pointer_create(), RNA_struct_find_property(), RNA_struct_ui_icon(), and PointerRNA::type.
Referenced by buttons_texture_users_from_context().
static void buttons_texture_user_node_add | ( | ListBase * | users, |
ID * | id, | ||
bNodeTree * | ntree, | ||
bNode * | node, | ||
const char * | category, | ||
int | icon, | ||
const char * | name | ||
) | [static] |
Definition at line 92 of file buttons_texture.c.
References BLI_addtail(), BLI_countlist(), ButsTextureUser::category, ButsTextureUser::icon, ButsTextureUser::id, ButsTextureUser::index, MEM_callocN(), ButsTextureUser::name, ButsTextureUser::node, and ButsTextureUser::ntree.
Referenced by buttons_texture_users_find_nodetree().
static void buttons_texture_user_property_add | ( | ListBase * | users, |
ID * | id, | ||
PointerRNA | ptr, | ||
PropertyRNA * | prop, | ||
const char * | category, | ||
int | icon, | ||
const char * | name | ||
) | [static] |
Definition at line 75 of file buttons_texture.c.
References BLI_addtail(), BLI_countlist(), ButsTextureUser::category, ButsTextureUser::icon, ButsTextureUser::id, ButsTextureUser::index, MEM_callocN(), ButsTextureUser::name, ButsTextureUser::prop, and ButsTextureUser::ptr.
Referenced by buttons_texture_modifier_foreach(), and buttons_texture_users_from_context().
static void buttons_texture_users_find_nodetree | ( | ListBase * | users, |
ID * | id, | ||
bNodeTree * | ntree, | ||
const char * | category | ||
) | [static] |
Definition at line 109 of file buttons_texture.c.
References buttons_texture_user_node_add(), ListBase::first, bNode::id, bNodeTree::id, bNode::name, bNodeType::nclass, bNode::next, NODE_CLASS_TEXTURE, NODE_GROUP, bNodeTree::nodes, RNA_Node, RNA_pointer_create(), RNA_struct_ui_icon(), PointerRNA::type, bNode::type, and bNode::typeinfo.
Referenced by buttons_texture_users_from_context().
static void buttons_texture_users_from_context | ( | ListBase * | users, |
const bContext * | C, | ||
SpaceButs * | sbuts | ||
) | [static] |
Definition at line 146 of file buttons_texture.c.
References Object::actcol, Scene::basact, buttons_texture_modifier_foreach(), buttons_texture_user_property_add(), buttons_texture_users_find_nodetree(), CTX_data_scene(), Object::data, ListBase::first, PartDeflect::forcefield, give_current_material(), GS, Scene::id, Material::id, World::id, Brush::id, Object::id, ParticleSettings::id, Lamp::id, ID_BR, ID_LA, ID_MA, ID_OB, ID_SCE, ID_WO, ListBase::last, MAX_MTEX, modifiers_foreachTexLink(), ParticleSettings::mtex, Brush::mtex, ParticleSystem::name, ID::name, Lamp::nodetree, Material::nodetree, World::nodetree, NULL, OB_LAMP, Base::object, paint_brush(), paint_get_active(), ParticleSystem::part, Object::pd, PFIELD_TEXTURE, SpaceButs::pinid, psys_get_current(), RNA_BrushTextureSlot, RNA_FieldSettings, RNA_ParticleSettings, RNA_ParticleSettingsTextureSlot, RNA_pointer_create(), RNA_struct_find_property(), RNA_struct_ui_icon(), Object::type, and Scene::world.
Referenced by buttons_texture_context_compute().
static void template_texture_select | ( | bContext * | C, |
void * | user_p, | ||
void * | UNUSEDarg | ||
) | [static] |
Definition at line 312 of file buttons_texture.c.
References CTX_data_main(), CTX_wm_space_buts(), PointerRNA::data, ED_node_set_active(), ButsContextTexture::index, NULL, RNA_property_pointer_get(), RNA_struct_is_a(), RNA_Texture, ButsContextTexture::texture, SpaceButs::texuser, PointerRNA::type, and ButsContextTexture::user.
Referenced by template_texture_show(), and template_texture_user_menu().
static void template_texture_show | ( | bContext * | C, |
void * | data_p, | ||
void * | prop_p | ||
) | [static] |
Definition at line 414 of file buttons_texture.c.
References BCONTEXT_TEXTURE, CTX_wm_area(), CTX_wm_space_buts(), ED_area_tag_redraw(), ListBase::first, SpaceButs::mainb, SpaceButs::mainbuser, NULL, SpaceButs::preview, template_texture_select(), SpaceButs::texuser, and ButsContextTexture::users.
Referenced by uiTemplateTextureShow().
static void template_texture_user_menu | ( | bContext * | C, |
uiLayout * | layout, | ||
void * | UNUSEDarg | ||
) | [static] |
Definition at line 340 of file buttons_texture.c.
References BLI_snprintf(), BUT, CTX_wm_space_buts(), ListBase::first, uiBut::flag, MEM_dupallocN(), NULL, template_texture_select(), SpaceButs::texuser, UI_MAX_NAME_STR, UI_TEXT_LEFT, UI_UNIT_X, UI_UNIT_Y, uiButSetNFunc(), uiDefIconTextBut(), uiItemL(), uiLayoutGetBlock(), and ButsContextTexture::users.
Referenced by uiTemplateTextureUser().
void uiTemplateTextureShow | ( | uiLayout * | layout, |
bContext * | C, | ||
PointerRNA * | ptr, | ||
PropertyRNA * | prop | ||
) |
Definition at line 441 of file buttons_texture.c.
References BCONTEXT_TEXTURE, BUT, CTX_wm_space_buts(), PointerRNA::data, ListBase::first, SpaceButs::mainb, NULL, template_texture_show(), SpaceButs::texuser, UI_UNIT_X, UI_UNIT_Y, uiButSetFunc(), uiDefIconBut(), uiLayoutGetBlock(), and ButsContextTexture::users.
Referenced by template_ID().
Definition at line 371 of file buttons_texture.c.
References BLI_snprintf(), CTX_wm_space_buts(), uiBut::flag, ButsTextureUser::icon, MENU, ButsTextureUser::name, NULL, template_texture_user_menu(), SpaceButs::texuser, uiBut::type, UI_ICON_SUBMENU, UI_MAX_NAME_STR, UI_TEXT_LEFT, UI_UNIT_X, UI_UNIT_Y, uiDefIconTextMenuBut(), uiDefMenuBut(), uiItemL(), uiLayoutGetBlock(), and ButsContextTexture::user.