Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-04-02 22:19:37 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-04-02 22:19:37 +0400
commit498983a9a4ee202c1e86b23a955a677489c7fe64 (patch)
treee2bbde79e56600665d7632db5aaa5331fbf7d95f /source/blender/editors/space_buttons/buttons_texture.c
parent902eb76f49a47cc05d6d874bb0f52cee413d33b1 (diff)
Fix #34759: cycles texture influence for particles not shown correct when switching
to a different texture slot.
Diffstat (limited to 'source/blender/editors/space_buttons/buttons_texture.c')
-rw-r--r--source/blender/editors/space_buttons/buttons_texture.c12
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 b108f9fa4b5..b3d5d4884ff 100644
--- a/source/blender/editors/space_buttons/buttons_texture.c
+++ b/source/blender/editors/space_buttons/buttons_texture.c
@@ -205,7 +205,6 @@ static void buttons_texture_users_from_context(ListBase *users, const bContext *
/* particle systems */
if (psys) {
- /* todo: these slots are not in the UI */
for (a = 0; a < MAX_MTEX; a++) {
mtex = psys->part->mtex[a];
@@ -333,6 +332,17 @@ static void template_texture_select(bContext *C, void *user_p, void *UNUSED(arg)
tex = (RNA_struct_is_a(texptr.type, &RNA_Texture)) ? texptr.data : NULL;
ct->texture = tex;
+
+ if(user->ptr.type == &RNA_ParticleSettingsTextureSlot) {
+ /* stupid exception for particle systems which still uses influence
+ * from the old texture system, set the active texture slots as well */
+ ParticleSettings *part = user->ptr.id.data;
+ int a;
+
+ for(a = 0; a < MAX_MTEX; a++)
+ if(user->ptr.data == part->mtex[a])
+ part->texact = a;
+ }
}
ct->user = user;