diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-04 10:39:04 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-04 10:39:04 +0300 |
commit | 95011f6d484b369db92ae13c674a6522d664ea8f (patch) | |
tree | 91ba2719c9f3096fad0f1f768aa7b1c4d79aa32a /source/blender/editors/space_buttons/buttons_texture.c | |
parent | 0911acb5cf49c5ba05b1df045b41697704aa288a (diff) | |
parent | 44505b38df557a5711703613685a1dec9fc2c3d9 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/space_buttons/buttons_texture.c')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_texture.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/space_buttons/buttons_texture.c b/source/blender/editors/space_buttons/buttons_texture.c index 8beb163cf98..5feb74edef7 100644 --- a/source/blender/editors/space_buttons/buttons_texture.c +++ b/source/blender/editors/space_buttons/buttons_texture.c @@ -78,7 +78,7 @@ /************************* Texture User **************************/ -static void buttons_texture_user_property_add(ListBase *users, ID *id, +static void buttons_texture_user_property_add(ListBase *users, ID *id, PointerRNA ptr, PropertyRNA *prop, const char *category, int icon, const char *name) { @@ -95,7 +95,7 @@ static void buttons_texture_user_property_add(ListBase *users, ID *id, BLI_addtail(users, user); } -static void buttons_texture_user_node_add(ListBase *users, ID *id, +static void buttons_texture_user_node_add(ListBase *users, ID *id, bNodeTree *ntree, bNode *node, const char *category, int icon, const char *name) { @@ -122,10 +122,10 @@ static void buttons_texture_users_find_nodetree(ListBase *users, ID *id, if (node->typeinfo->nclass == NODE_CLASS_TEXTURE) { PointerRNA ptr; /* PropertyRNA *prop; */ /* UNUSED */ - + RNA_pointer_create(&ntree->id, &RNA_Node, node, &ptr); /* prop = RNA_struct_find_property(&ptr, "texture"); */ /* UNUSED */ - + buttons_texture_user_node_add(users, id, ntree, node, category, RNA_struct_ui_icon(ptr.type), node->name); } @@ -449,7 +449,7 @@ static void template_texture_show(bContext *C, void *data_p, void *prop_p) for (user = ct->users.first; user; user = user->next) if (user->ptr.data == data_p && user->prop == prop_p) break; - + if (user) { /* select texture */ template_texture_select(C, user, NULL); @@ -479,12 +479,12 @@ void uiTemplateTextureShow(uiLayout *layout, bContext *C, PointerRNA *ptr, Prope for (user = ct->users.first; user; user = user->next) if (user->ptr.data == ptr->data && user->prop == prop) break; - + /* draw button */ if (user) { uiBlock *block = uiLayoutGetBlock(layout); uiBut *but; - + but = uiDefIconBut(block, UI_BTYPE_BUT, 0, ICON_BUTS, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Show texture in texture tab")); UI_but_func_set(but, template_texture_show, user->ptr.data, user->prop); |