diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2014-12-27 01:51:27 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2014-12-27 01:51:27 +0300 |
commit | c7c10e5e283879961356050ba8a965d2239456b8 (patch) | |
tree | d89d06ca30d51087a9d958f66bbf240bd3c7807e /source/blender/blenloader | |
parent | e0cf86a9e219dcd71e5d67b8f2999d41e7f8c492 (diff) |
Brush Texture Angle Goodies:
This commit includes a few things:
* It moves the Rake and Random flags from the brush to the MTex.
* The first change allows mask textures to have independent rake
support.
* Random rotation now has an angle value that controls the width of the
effect from the rake or default angle
* Rake and Random are now supported together.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_270.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index 372a0b06d01..a26e29db485 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -435,4 +435,27 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) } } } + + if (!MAIN_VERSION_ATLEAST(main, 273, 1)) { +#define BRUSH_RAKE (1 << 7) +#define BRUSH_RANDOM_ROTATION = (1 << 25) + + Brush *br; + + for (br = main->brush.first; br; br = br->id.next) { + if (br->flag & BRUSH_RAKE) { + br->mtex.brush_angle_mode |= MTEX_ANGLE_RAKE; + br->mask_mtex.brush_angle_mode |= MTEX_ANGLE_RAKE; + } + else if (br->flag & BRUSH_RAKE) { + br->mtex.brush_angle_mode |= MTEX_ANGLE_RANDOM; + br->mask_mtex.brush_angle_mode |= MTEX_ANGLE_RANDOM; + } + br->mtex.random_angle = 2.0f * M_PI; + br->mask_mtex.random_angle = 2.0f * M_PI; + } + +#undef BRUSH_RAKE +#undef BRUSH_RANDOM_ROTATION + } } |