[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [18683] branches/blender2.5/blender/source /blender: Added some code in sculpt and RNA for textures with type none.
Nicholas Bishop
nicholasbishop at gmail.com
Mon Jan 26 22:32:25 CET 2009
Revision: 18683
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=18683
Author: nicholasbishop
Date: 2009-01-26 22:32:22 +0100 (Mon, 26 Jan 2009)
Log Message:
-----------
Added some code in sculpt and RNA for textures with type none. Hopefully fixes the problem with sculpt not working in 2.5.
Modified Paths:
--------------
branches/blender2.5/blender/source/blender/editors/sculpt/sculpt.c
branches/blender2.5/blender/source/blender/makesrna/intern/rna_texture.c
Modified: branches/blender2.5/blender/source/blender/editors/sculpt/sculpt.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/sculpt/sculpt.c 2009-01-26 15:23:29 UTC (rev 18682)
+++ branches/blender2.5/blender/source/blender/editors/sculpt/sculpt.c 2009-01-26 21:32:22 UTC (rev 18683)
@@ -1655,11 +1655,14 @@
ts->sculpt->brush = add_brush("test brush");
/* Also for testing, set the brush texture to the first available one */
if(G.main->tex.first) {
- mtex = MEM_callocN(sizeof(MTex), "test mtex");
- ts->sculpt->brush->texact = 0;
- ts->sculpt->brush->mtex[0] = mtex;
- mtex->tex = G.main->tex.first;
- mtex->size[0] = mtex->size[1] = mtex->size[2] = 50;
+ Tex *tex = G.main->tex.first;
+ if(tex->type) {
+ mtex = MEM_callocN(sizeof(MTex), "test mtex");
+ ts->sculpt->brush->texact = 0;
+ ts->sculpt->brush->mtex[0] = mtex;
+ mtex->tex = tex;
+ mtex->size[0] = mtex->size[1] = mtex->size[2] = 50;
+ }
}
ED_undo_push(C, "Enter sculpt");
Modified: branches/blender2.5/blender/source/blender/makesrna/intern/rna_texture.c
===================================================================
--- branches/blender2.5/blender/source/blender/makesrna/intern/rna_texture.c 2009-01-26 15:23:29 UTC (rev 18682)
+++ branches/blender2.5/blender/source/blender/makesrna/intern/rna_texture.c 2009-01-26 21:32:22 UTC (rev 18683)
@@ -244,6 +244,7 @@
PropertyRNA *prop;
static EnumPropertyItem prop_type_items[] = {
+ {0, "NONE", "None", ""},
{TEX_CLOUDS, "CLOUDS", "Clouds", ""},
{TEX_WOOD, "WOOD", "Wood", ""},
{TEX_MARBLE, "MARBLE", "Marble", ""},
More information about the Bf-blender-cvs
mailing list