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:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-11-25 14:22:55 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-11-25 14:24:31 +0400
commitb2c1bb74b213db28a5c45f16813ca14ee985a9fe (patch)
treef68b0963a2380558c5009e3d6dd2945da0422042
parent153ae2dc7c5f6a1cdc0b5df9478d5b1233bd4554 (diff)
Tweaks to PNG file output
- Made tooltip for compression a bit more clear. - Use default compression of 15%. Gives around two times boost on export movie file here in test with only 10% increased file size. Reviewers: Jonathan Williamson
-rw-r--r--source/blender/blenkernel/intern/image.c4
-rw-r--r--source/blender/blenkernel/intern/scene.c2
-rw-r--r--source/blender/blenloader/intern/versioning_defaults.c1
-rw-r--r--source/blender/makesrna/intern/rna_scene.c4
4 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 6a411f8c308..3dee2d4cf47 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -976,7 +976,7 @@ int BKE_imtype_to_ftype(const char imtype)
return RADHDR;
#endif
else if (imtype == R_IMF_IMTYPE_PNG)
- return PNG | 90;
+ return PNG | 15;
#ifdef WITH_DDS
else if (imtype == R_IMF_IMTYPE_DDS)
return DDS;
@@ -1340,7 +1340,7 @@ void BKE_imformat_defaults(ImageFormatData *im_format)
im_format->imtype = R_IMF_IMTYPE_PNG;
im_format->depth = R_IMF_CHAN_DEPTH_8;
im_format->quality = 90;
- im_format->compress = 90;
+ im_format->compress = 15;
BKE_color_managed_display_settings_init(&im_format->display_settings);
BKE_color_managed_view_settings_init(&im_format->view_settings);
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 985eae18570..a6813632a13 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -435,7 +435,7 @@ Scene *BKE_scene_add(Main *bmain, const char *name)
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;
- sce->r.im_format.compress = 90;
+ sce->r.im_format.compress = 15;
sce->r.displaymode = R_OUTPUT_AREA;
sce->r.framapto = 100;
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index 6a0f1747d2f..82fa58b57e1 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -46,6 +46,7 @@ void BLO_update_defaults_startup_blend(Main *main)
for (scene = main->scene.first; scene; scene = scene->id.next) {
scene->r.im_format.planes = R_IMF_PLANES_RGBA;
+ scene->r.im_format.compress = 15;
for (srl = scene->r.layers.first; srl; srl = srl->next)
srl->freestyleConfig.sphere_radius = 0.1f;
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 686672e1629..97a29d32546 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -3665,7 +3665,9 @@ static void rna_def_scene_image_format_data(BlenderRNA *brna)
prop = RNA_def_property(srna, "compression", PROP_INT, PROP_PERCENTAGE);
RNA_def_property_int_sdna(prop, NULL, "compress");
RNA_def_property_range(prop, 0, 100); /* 0 is needed for compression. */
- RNA_def_property_ui_text(prop, "Compression", "Compression level for formats that support lossless compression");
+ RNA_def_property_ui_text(prop, "Compression", "Amount of time to determine best compression: "
+ "0 = no compression with fast file output, "
+ "100 = maximum lossless compression with slow file output");
RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
/* flag */