Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-09-10 17:25:37 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-09-10 17:25:37 +0400
commitb6bdb122c2a0fba356541340664ef76698db7544 (patch)
treee559d9ebdb2bcfae5016ad34af60efba6628a008
parentb5e1c48ca769bd83434d3686569fa36c50dbd9cb (diff)
startup.blend: save images as RGBA by default, to avoid losing data when
forgetting to change it from RGB when painting images or saving renders. This makes more sense in the new alpha pipeline, renders no longer contain an alpha channel that does not match the RGB channels, so saving files as RGBA should give the expected results when opening them in other applications.
-rw-r--r--source/blender/blenkernel/intern/image.c2
-rw-r--r--source/blender/blenkernel/intern/scene.c2
-rw-r--r--source/blender/blenloader/intern/versioning_defaults.c4
3 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 8c0c16402da..2bf6304b04b 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -1326,7 +1326,7 @@ int BKE_add_image_extension_from_type(char *string, const char imtype)
void BKE_imformat_defaults(ImageFormatData *im_format)
{
memset(im_format, 0, sizeof(*im_format));
- im_format->planes = R_IMF_PLANES_RGB;
+ im_format->planes = R_IMF_PLANES_RGBA;
im_format->imtype = R_IMF_IMTYPE_PNG;
im_format->depth = R_IMF_CHAN_DEPTH_8;
im_format->quality = 90;
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 5829ff4995e..b89cb6b7b82 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -430,7 +430,7 @@ Scene *BKE_scene_add(Main *bmain, const char *name)
sce->r.filtertype = R_FILTER_MITCH;
sce->r.size = 50;
- sce->r.im_format.planes = R_IMF_PLANES_RGB;
+ sce->r.im_format.planes = R_IMF_PLANES_RGBA;
sce->r.im_format.imtype = R_IMF_IMTYPE_PNG;
sce->r.im_format.depth = R_IMF_CHAN_DEPTH_8;
sce->r.im_format.quality = 90;
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index beb8d901ab1..7acb205377b 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -38,5 +38,9 @@
* This function can be emptied each time the startup.blend is updated. */
void BLO_update_defaults_startup_blend(Main *main)
{
+ Scene *scene;
+
+ for (scene = main->scene.first; scene; scene = scene->id.next)
+ scene->r.im_format.planes = R_IMF_PLANES_RGBA;
}