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>2016-02-10 17:09:45 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-02-12 17:27:33 +0300
commit28604c46a137c1288cc7a494b36ed72e44a0ab8b (patch)
tree3ce7de49d1604cdec2ce420a117ae1ab59df2404 /intern/cycles/render/camera.h
parentec9977855f9264ecf6af5b4c8e6d10324a02028e (diff)
Cycles: Make Blender importer more forward compatible
Basically the idea is to make code robust against extending enum options in the future by falling back to a known safe default setting when RNA is set to something unknown. While this approach solves the issues similar to T47377, but it wouldn't really help when/if any of the RNA values gets ever deprecated and removed. There'll be no simple solution to that apart from defining explicit mapping from RNA value to Cycles one. Another part which isn't so great actually is that we now have to have some enum guards and give some explicit values to the enum items, but we can live with that perhaps. Reviewers: dingto, juicyfruit, lukasstockner97, brecht Reviewed By: brecht Differential Revision: https://developer.blender.org/D1785
Diffstat (limited to 'intern/cycles/render/camera.h')
-rw-r--r--intern/cycles/render/camera.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/intern/cycles/render/camera.h b/intern/cycles/render/camera.h
index d4a66b66072..6771ecc8f23 100644
--- a/intern/cycles/render/camera.h
+++ b/intern/cycles/render/camera.h
@@ -40,11 +40,13 @@ public:
/* Specifies an offset for the shutter's time interval. */
enum MotionPosition {
/* Shutter opens at the current frame. */
- MOTION_POSITION_START,
+ MOTION_POSITION_START = 0,
/* Shutter is fully open at the current frame. */
- MOTION_POSITION_CENTER,
+ MOTION_POSITION_CENTER = 1,
/* Shutter closes at the current frame. */
- MOTION_POSITION_END,
+ MOTION_POSITION_END = 2,
+
+ MOTION_NUM_POSITIONS,
};
/* Specifies rolling shutter effect. */
@@ -52,7 +54,9 @@ public:
/* No rolling shutter effect. */
ROLLING_SHUTTER_NONE = 0,
/* Sensor is being scanned vertically from top to bottom. */
- ROLLING_SHUTTER_TOP,
+ ROLLING_SHUTTER_TOP = 1,
+
+ ROLLING_SHUTTER_NUM_TYPES,
};
/* motion blur */