diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2014-04-13 14:51:06 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2014-04-13 14:51:13 +0400 |
commit | e29698d3cdeb57b4a765d9c3c7ce2a3bb37606fb (patch) | |
tree | 2137956ccc06095765311a5df94c5ea49eb6ec46 /intern/cycles/render/attribute.cpp | |
parent | 776f8d5a6fa00403e6c46887fbb19956edbd4f05 (diff) |
Split Normals I (5/5): Add support of split normals to Cycles.
Idea and code by Brecht, many thanks!
Reviewers: brecht
Reviewed By: brecht
CC: campbellbarton, dingto
Differential Revision: https://developer.blender.org/D369
Diffstat (limited to 'intern/cycles/render/attribute.cpp')
-rw-r--r-- | intern/cycles/render/attribute.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/intern/cycles/render/attribute.cpp b/intern/cycles/render/attribute.cpp index ce232e90ffc..14805b6f11a 100644 --- a/intern/cycles/render/attribute.cpp +++ b/intern/cycles/render/attribute.cpp @@ -96,6 +96,14 @@ void Attribute::add(const VoxelAttribute& f) buffer.push_back(data[i]); } +void Attribute::add(const char *data) +{ + size_t size = data_sizeof(); + + for(size_t i = 0; i < size; i++) + buffer.push_back(data[i]); +} + size_t Attribute::data_sizeof() const { if(element == ATTR_ELEMENT_VOXEL) |