Fix missing brush texture mask in texture properties, for cycles. Handling this
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 1 May 2013 12:58:37 +0000 (12:58 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 1 May 2013 12:58:37 +0000 (12:58 +0000)
properly with blender internal is probably for after release, when we can add
the same system to gather textures from brushes, modifiers, force fields, ...

source/blender/editors/space_buttons/buttons_texture.c

index c8a9fb9ac09aa750fe6f0a3b9e90dbf327cf42aa..682e6ee22259c5e20a21a0dd1a30f6e550fdad4f 100644 (file)
@@ -239,11 +239,19 @@ static void buttons_texture_users_from_context(ListBase *users, const bContext *
                PointerRNA ptr;
                PropertyRNA *prop;
 
+               /* texture */
                RNA_pointer_create(&brush->id, &RNA_BrushTextureSlot, &brush->mtex, &ptr);
                prop = RNA_struct_find_property(&ptr, "texture");
 
                buttons_texture_user_property_add(users, &brush->id, ptr, prop,
-                                                 "Brush", ICON_BRUSH_DATA, brush->id.name + 2);
+                                                 "Brush", ICON_BRUSH_DATA, "Brush");
+
+               /* mask texture */
+               RNA_pointer_create(&brush->id, &RNA_BrushTextureSlot, &brush->mask_mtex, &ptr);
+               prop = RNA_struct_find_property(&ptr, "texture");
+
+               buttons_texture_user_property_add(users, &brush->id, ptr, prop,
+                                                 "Brush", ICON_BRUSH_DATA, "Brush Mask");
        }
 }