diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-12-16 16:55:52 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-12-16 16:55:52 +0400 |
commit | a0855a95db222e64d84682edff1df21308f51b5c (patch) | |
tree | dd8892952a97eeb741fdc34eef0110e50fa4a7ed /source | |
parent | 677f519ca5a7a68b8e361487f2c9883e2cdc8861 (diff) |
Cycles: add "Textures" panel in particle properties, to make it possble to add
textures when Cycles is selected as render engine.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_texture.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/editors/space_buttons/buttons_texture.c b/source/blender/editors/space_buttons/buttons_texture.c index abfefba02b9..3175c15ccac 100644 --- a/source/blender/editors/space_buttons/buttons_texture.c +++ b/source/blender/editors/space_buttons/buttons_texture.c @@ -358,7 +358,17 @@ static void template_texture_user_menu(bContext *C, uiLayout *layout, void *UNUS } /* create button */ - BLI_snprintf(name, UI_MAX_NAME_STR, " %s", user->name); + if (user->prop) { + PointerRNA texptr = RNA_property_pointer_get(&user->ptr, user->prop); + Tex *tex = texptr.data; + + if (tex) + BLI_snprintf(name, UI_MAX_NAME_STR, " %s - %s", user->name, tex->id.name+2); + else + BLI_snprintf(name, UI_MAX_NAME_STR, " %s", user->name); + } + else + BLI_snprintf(name, UI_MAX_NAME_STR, " %s", user->name); but = uiDefIconTextBut(block, BUT, 0, user->icon, name, 0, 0, UI_UNIT_X * 4, UI_UNIT_Y, NULL, 0.0, 0.0, 0.0, 0.0, ""); |