mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
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
This commit is contained in:
parent
70018eb16e
commit
5bdbc88ab8
3 changed files with 40 additions and 7 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue