diff options
author | Thomas Dinges <blender@dingto.org> | 2013-05-17 01:53:21 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2013-05-17 01:53:21 +0400 |
commit | 616bc9d68ff6e22350f4e6f55e4cb03fe6636d3f (patch) | |
tree | 24464f5c0b55ecc4539f01afce46f8018f928f76 /intern/cycles/blender/blender_util.h | |
parent | 49003dd90c45cd6f595112908ca66e28e26f5888 (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.h | 10 |
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]; |