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/mesh.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/mesh.h')
-rw-r--r--intern/cycles/render/mesh.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/intern/cycles/render/mesh.h b/intern/cycles/render/mesh.h
index 76c186a3feb..13528bfa7bb 100644
--- a/intern/cycles/render/mesh.h
+++ b/intern/cycles/render/mesh.h
@@ -63,9 +63,11 @@ public:
/* Displacement */
enum DisplacementMethod {
- DISPLACE_BUMP,
- DISPLACE_TRUE,
- DISPLACE_BOTH
+ DISPLACE_BUMP = 0,
+ DISPLACE_TRUE = 1,
+ DISPLACE_BOTH = 2,
+
+ DISPLACE_NUM_METHODS,
};
ustring name;