[Bf-blender-cvs] [5da0ef8] soc-2013-paint: Merge branch 'master' into soc-2013-paint
Antony Riakiotakis
noreply at git.blender.org
Thu Apr 24 02:03:20 CEST 2014
Commit: 5da0ef800d3a88a2b637d754a23201f3facfb698
Author: Antony Riakiotakis
Date: Thu Apr 24 02:51:28 2014 +0300
https://developer.blender.org/rB5da0ef800d3a88a2b637d754a23201f3facfb698
Merge branch 'master' into soc-2013-paint
Conflicts:
source/blender/blenloader/intern/versioning_270.c
source/blender/editors/sculpt_paint/paint_image_2d.c
===================================================================
===================================================================
diff --cc source/blender/blenloader/intern/versioning_270.c
index f13afce,507d711..24cda75
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@@ -181,10 -182,32 +182,40 @@@ void blo_do_versions_270(FileData *fd,
}
if (!MAIN_VERSION_ATLEAST(main, 270, 4)) {
+ /* ui_previews were not handled correctly when copying areas, leading to corrupted files (see T39847).
+ * This will always reset situation to a valid state.
+ */
+ bScreen *sc;
+
+ for (sc = main->screen.first; sc; sc = sc->id.next) {
+ ScrArea *sa;
+ for (sa = sc->areabase.first; sa; sa = sa->next) {
+ SpaceLink *sl;
+
+ for (sl = sa->spacedata.first; sl; sl = sl->next) {
+ ARegion *ar;
+ ListBase *lb = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase;
+
+ for (ar = lb->first; ar; ar = ar->next) {
+ BLI_listbase_clear(&ar->ui_previews);
+ }
+ }
+ }
+ }
+ }
+
++ if (!MAIN_VERSION_ATLEAST(main, 270, 5)) {
+ Scene *sce;
+ for (sce = main->scene.first; sce; sce = sce->id.next) {
+ sce->toolsettings->imapaint.new_slot_xresolution = 1024;
+ sce->toolsettings->imapaint.new_slot_yresolution = 1024;
+ }
+ }
++
+ if (!DNA_struct_elem_find(fd->filesdna, "Material", "int", "mode2")) { /* will be replaced with version check when other new flag is added to mode2 */
+ Material *ma;
+
+ for (ma = main->mat.first; ma; ma = ma->id.next)
+ ma->mode2 = MA_CASTSHADOW;
+ }
}
diff --cc source/blender/editors/sculpt_paint/paint_image_2d.c
index efe793d,cf2655b..e0bbaf3
--- a/source/blender/editors/sculpt_paint/paint_image_2d.c
+++ b/source/blender/editors/sculpt_paint/paint_image_2d.c
@@@ -616,8 -529,8 +616,8 @@@ static void brush_painter_2d_tex_mappin
if (mapmode == MTEX_MAP_MODE_STENCIL) {
/* map from view coordinates of brush to region coordinates */
- UI_view2d_to_region_no_clip(s->v2d, ipos[0] * invw, ipos[1] * invh, &xmin, &ymin);
- UI_view2d_to_region_no_clip(s->v2d, (ipos[0] + diameter) * invw, (ipos[1] + diameter) * invh, &xmax, &ymax);
+ UI_view2d_view_to_region(s->v2d, ipos[0] * invw, ipos[1] * invh, &xmin, &ymin);
- UI_view2d_view_to_region(s->v2d, (ipos[0] + size) * invw, (ipos[1] + size) * invh, &xmax, &ymax);
++ UI_view2d_view_to_region(s->v2d, (ipos[0] + diameter) * invw, (ipos[1] + diameter) * invh, &xmax, &ymax);
/* output mapping from brush ibuf x/y to region coordinates */
mapping->xmin = xmin;
More information about the Bf-blender-cvs
mailing list