diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-08-16 23:50:00 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-08-16 23:50:00 +0400 |
commit | afa0fa5e29de94b093f4eda2f8105faa59ba5573 (patch) | |
tree | c7fa9cf5336e472ac10a95e78a2ac179ee0d97fd /source/blender/blenloader | |
parent | d5c990664e421567f45df7c6148cc5786aa2dbd7 (diff) |
2.5 Sculpt:
* Added a new Paint type in scene DNA. This is now the base struct for Sculpt.
* The Paint type contains a list of Brushes, you can add or remove these much like material and texture slots.
* Modified the UI for the new Paint type, now shows the list of brushes active for this mode
* Added a New Brush operator, shows in the UI as a list of brush tool types to add
* Made the sculpt tool property UI smaller and not expanded, expectation is that we will have a number of preset brushes that will cover the basic sculpt brush types
TODO:
* Vertex paint, weight paint, texture paint need to be converted to this system next
* Add brush presets to the default blend
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 11 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 7 |
2 files changed, 14 insertions, 4 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index e5163d317e7..279dca5e0a5 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -4036,9 +4036,12 @@ static void lib_link_scene(FileData *fd, Main *main) sce->toolsettings->imapaint.brush= newlibadr_us(fd, sce->id.lib, sce->toolsettings->imapaint.brush); - if(sce->toolsettings->sculpt) - sce->toolsettings->sculpt->brush= - newlibadr_us(fd, sce->id.lib, sce->toolsettings->sculpt->brush); + if(sce->toolsettings->sculpt && sce->toolsettings->sculpt->paint.brushes) { + int i; + for(i = 0; i < sce->toolsettings->sculpt->paint.brush_count; ++i) + sce->toolsettings->sculpt->paint.brushes[i]= + newlibadr_us(fd, sce->id.lib, sce->toolsettings->sculpt->paint.brushes[i]); + } if(sce->toolsettings->vpaint) sce->toolsettings->vpaint->brush= newlibadr_us(fd, sce->id.lib, sce->toolsettings->vpaint->brush); @@ -4148,6 +4151,8 @@ static void direct_link_scene(FileData *fd, Scene *sce) sce->toolsettings->vpaint= newdataadr(fd, sce->toolsettings->vpaint); sce->toolsettings->wpaint= newdataadr(fd, sce->toolsettings->wpaint); sce->toolsettings->sculpt= newdataadr(fd, sce->toolsettings->sculpt); + if(sce->toolsettings->sculpt) + sce->toolsettings->sculpt->paint.brushes= newdataadr(fd, sce->toolsettings->sculpt->paint.brushes); sce->toolsettings->imapaint.paintcursor= NULL; sce->toolsettings->particle.paintcursor= NULL; } diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index d8841962e7b..366480f3c82 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -1710,8 +1710,13 @@ static void write_scenes(WriteData *wd, ListBase *scebase) writestruct(wd, DATA, "VPaint", 1, sce->toolsettings->vpaint); if(sce->toolsettings->wpaint) writestruct(wd, DATA, "VPaint", 1, sce->toolsettings->wpaint); - if(sce->toolsettings->sculpt) + if(sce->toolsettings->sculpt) { writestruct(wd, DATA, "Sculpt", 1, sce->toolsettings->sculpt); + if(sce->toolsettings->sculpt->paint.brushes) { + Paint *p = &sce->toolsettings->sculpt->paint; + writedata(wd, DATA, p->brush_count * sizeof(Brush*), p->brushes); + } + } ed= sce->ed; if(ed) { |