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:
authorSybren A. Stüvel <sybren@stuvel.eu>2017-04-18 17:36:33 +0300
committerSybren A. Stüvel <sybren@stuvel.eu>2017-04-18 17:36:33 +0300
commit5bdbc88ab81891eff0dafaabf7f58a9c865d6e48 (patch)
treeb5a4f96c53b73b7565f245ebb620ac2c56ed412b /tests/python
parent70018eb16e721f9171834afd4bf70dc017af1369 (diff)
Alembic import/export: write curve resolution to user property
Curve resolution isn't natively supported by Alembic, hence it is stored in a user property "blender:resolution". I've looked at a Maya curves example file, but that also didn't contain any information about curve resolution. Differential Revision: https://developer.blender.org/D2634 Reviewers: kevindietrich
Diffstat (limited to 'tests/python')
-rwxr-xr-xtests/python/alembic_tests.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/python/alembic_tests.py b/tests/python/alembic_tests.py
index 845b9bd6288..155cbd545f0 100755
--- a/tests/python/alembic_tests.py
+++ b/tests/python/alembic_tests.py
@@ -128,6 +128,7 @@ class AbstractAlembicTest(unittest.TestCase):
converters = {
'bool_t': int,
'uint8_t': int,
+ 'int16_t': int,
'int32_t': int,
'float64_t': float,
'float32_t': float,
@@ -141,7 +142,13 @@ class AbstractAlembicTest(unittest.TestCase):
info = lines.popleft()
if not info:
continue
- proptype, valtype_and_arrsize, name_and_extent = info.split()
+ parts = info.split()
+ proptype = parts[0]
+
+ if proptype == 'CompoundProperty':
+ # To read those, call self.abcprop() on it.
+ continue
+ valtype_and_arrsize, name_and_extent = parts[1:]
# Parse name and extent
m = self.abcls_array.match(name_and_extent)
@@ -291,6 +298,9 @@ class CurveExportTest(AbstractAlembicTest):
abcprop = self.abcprop(abc, '/NurbsCurve/NurbsCurveShape/.geom')
self.assertEqual(abcprop['.orders'], [4])
+ abcprop = self.abcprop(abc, '/NurbsCurve/NurbsCurveShape/.geom/.userProperties')
+ self.assertEqual(abcprop['blender:resolution'], 10)
+
if __name__ == '__main__':
parser = argparse.ArgumentParser()