Merge branch 'master' into blender2.8
[blender.git] / intern / cycles / blender / blender_util.h
index e23d8bf4e2d48f7aacb140b1c4aa6ff11aa5b186..89a53a1deca75f6b54962f843456710fc59401d7 100644 (file)
@@ -98,11 +98,12 @@ static inline void curvemapping_minmax(/*const*/ BL::CurveMapping& cumap,
 }
 
 static inline void curvemapping_to_array(BL::CurveMapping& cumap,
-                                         float *data,
+                                         array<float>& data,
                                          int size)
 {
        cumap.update();
        BL::CurveMap curve = cumap.curves[0];
+       data.resize(size);
        for(int i = 0; i < size; i++) {
                float t = (float)i/(float)(size-1);
                data[i] = curve.evaluate(t);
@@ -687,33 +688,6 @@ struct ObjectKey {
        }
 };
 
-/* Particle System Key */
-
-struct ParticleSystemKey {
-       void *ob;
-       int id[OBJECT_PERSISTENT_ID_SIZE];
-
-       ParticleSystemKey(void *ob_, int id_[OBJECT_PERSISTENT_ID_SIZE])
-       : ob(ob_)
-       {
-               if(id_)
-                       memcpy(id, id_, sizeof(id));
-               else
-                       memset(id, 0, sizeof(id));
-       }
-
-       bool operator<(const ParticleSystemKey& k) const
-       {
-               /* first id is particle index, we don't compare that */
-               if(ob < k.ob)
-                       return true;
-               else if(ob == k.ob)
-                       return memcmp(id+1, k.id+1, sizeof(int)*(OBJECT_PERSISTENT_ID_SIZE-1)) < 0;
-
-               return false;
-       }
-};
-
 CCL_NAMESPACE_END
 
 #endif /* __BLENDER_UTIL_H__ */