Cycles: add "Textures" panel in particle properties, to make it possble to add

textures when Cycles is selected as render engine.
This commit is contained in:
2012-12-16 12:55:52 +00:00
parent 677f519ca5
commit a0855a95db
2 changed files with 43 additions and 1 deletions

View File

@@ -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, "");