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:
authorThomas Dinges <blender@dingto.org>2013-05-17 01:53:21 +0400
committerThomas Dinges <blender@dingto.org>2013-05-17 01:53:21 +0400
commit616bc9d68ff6e22350f4e6f55e4cb03fe6636d3f (patch)
tree24464f5c0b55ecc4539f01afce46f8018f928f76 /intern/cycles/blender/blender_util.h
parent49003dd90c45cd6f595112908ca66e28e26f5888 (diff)
Code cleanup / Cycles:
* Put render resolution x/y into a function.
Diffstat (limited to 'intern/cycles/blender/blender_util.h')
-rw-r--r--intern/cycles/blender/blender_util.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/intern/cycles/blender/blender_util.h b/intern/cycles/blender/blender_util.h
index 1c2576d0b3b..dc647da3022 100644
--- a/intern/cycles/blender/blender_util.h
+++ b/intern/cycles/blender/blender_util.h
@@ -94,6 +94,16 @@ static inline bool BKE_object_is_deform_modified(BL::Object self, BL::Scene scen
return self.is_deform_modified(scene, (preview)? (1<<0): (1<<1))? true: false;
}
+static inline int render_resolution_x(BL::RenderSettings b_render)
+{
+ return b_render.resolution_x()*b_render.resolution_percentage()/100;
+}
+
+static inline int render_resolution_y(BL::RenderSettings b_render)
+{
+ return b_render.resolution_y()*b_render.resolution_percentage()/100;
+}
+
static inline string image_user_file_path(BL::ImageUser iuser, BL::Image ima, int cfra)
{
char filepath[1024];