diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2017-04-18 15:18:06 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2017-04-18 15:18:06 +0300 |
commit | b27a98df1d9b8fb0210277d521d11d54d3b83d3a (patch) | |
tree | 9a12b2bd803d8b7aec4c4e40d6856b90fedbf467 /source/blender/alembic | |
parent | a229ca8f4826c6aa1867c0abf283fa9e46e32368 (diff) | |
parent | e12c3110024dc4b62ffefa739288218b04e39f71 (diff) |
Merged master@e12c3110024dc4b62ffefa739288218b04e39f71 into blender2.8
This doesn't merge entire master into blender2.8, but at least solves
one conflict.
Diffstat (limited to 'source/blender/alembic')
-rw-r--r-- | source/blender/alembic/intern/abc_curves.cc | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/source/blender/alembic/intern/abc_curves.cc b/source/blender/alembic/intern/abc_curves.cc index 0542255d84b..28e75db2862 100644 --- a/source/blender/alembic/intern/abc_curves.cc +++ b/source/blender/alembic/intern/abc_curves.cc @@ -205,6 +205,7 @@ void AbcCurveReader::readObjectData(Main *bmain, float time) cu->flag |= CU_DEFORM_FILL | CU_3D; cu->actvert = CU_ACT_NONE; + cu->resolu = 1; m_object = BKE_object_add_only_object(bmain, OB_CURVE, m_object_name.c_str()); m_object->data = cu; @@ -250,13 +251,18 @@ void read_curve_sample(Curve *cu, const ICurvesSchema &schema, const float time) nu->pntsv = 1; nu->flag |= CU_SMOOTH; - nu->orderu = num_verts; - - if (smp.getType() == Alembic::AbcGeom::kCubic) { - nu->orderu = 3; - } - else if (orders && orders->size() > i) { - nu->orderu = static_cast<short>((*orders)[i] - 1); + switch (smp.getType()) { + case Alembic::AbcGeom::kCubic: + nu->orderu = 4; + break; + case Alembic::AbcGeom::kVariableOrder: + if (orders && orders->size() > i) { + nu->orderu = static_cast<short>((*orders)[i]); + } + break; + case Alembic::AbcGeom::kLinear: + default: + nu->orderu = 2; } if (periodicity == Alembic::AbcGeom::kNonPeriodic) { |