diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2013-03-31 04:38:50 +0400 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2013-03-31 04:38:50 +0400 |
commit | 1fea6220a2418b07bec8bbf49da00cc77094076f (patch) | |
tree | e674dbe323e533ec54c7d7f6937bcfdf09247a29 /source/blender/blenloader/intern/readfile.c | |
parent | 68ac08681a084ae719fdfb3c3063593970d2d7b3 (diff) |
Woot woot commit.
Stencil style texture mapping. Ready for field testing and user feedback.
This commit adds stencil like brushes, like those that existed on old ptex branch.
(with the exception of clip colour)
To control the position of the stencil, you use
Q: translation
Shift - Q: scaling
Ctrl - Q: rotation
There's extra work that has been done to make this work:
* Support for coloured overlay in vertex/texture painting
* Also made A button do stroke mode selection like in sculpt mode,
when mask painting is inactive.
There are some TODOs to work on during bcon3:
* Support tiled and stencil mode in 2D painting. Support alpha textures also.
* Tidy up overlay code. There's some confusion there due
to the way we use the primary brush texture sometimes for alpha, other times
for colour control.
WIP design docs will be in
http://wiki.blender.org/index.php/User:Psy-Fi/New_Brush_Tool_Design
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 682680e53c5..b605747c020 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -9077,7 +9077,18 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } if (main->versionfile < 267) { - + //if(!DNA_struct_elem_find(fd->filesdna, "Brush", "int", "stencil_pos")) { + Brush *brush; + + for (brush = main->brush.first; brush; brush = brush->id.next) { + if (brush->stencil_dimension[0] == 0) { + brush->stencil_dimension[0] = 256; + brush->stencil_dimension[1] = 256; + brush->stencil_pos[0] = 256; + brush->stencil_pos[1] = 256; + } + } + /* TIP: to initialize new variables added, use the new function DNA_struct_elem_find(fd->filesdna, "structname", "typename", "varname") example: |