johnahartman / alembic

Automatically exported from code.google.com/p/alembic
Other
0 stars 0 forks source link

subdiv tags become corrupted in prman alembic procedural #314

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a mesh with creases in maya
2. Add SubDivisionMesh attr to shape node
3. Export mesh to alembic with alembic exporter
4. Render the exported alembic file in prman via the alembic procedural
5. See errors about bogus subdiv tags

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
alembic 1.5.0 with maya2014ext1.  windows 7

Please provide any additional information below.

The bug is in SubDTags.h
m_tags and m_outputTags are both std::vectors.  When a tag is added, the 
std::string is pushed onto m_tags and the back() of m_tags is pushed onto 
m_outputTags.  The second tag that is pushed causes the m_outputTags pointers 
to become corrupted.  std::vector is not guaranteed to maintain valid pointers 
after insertions.  However, std::list does provide this guarantee.  I've simply 
changed m_tags and m_stringArgs to be std::list rather than std::vector, and 
that fixes the problem.  And add #include <list> at top of SubDTags.h

http://stackoverflow.com/questions/3287801/pointers-to-elements-of-stdvector-and
-stdlist

Original issue reported on code.google.com by kat...@gmail.com on 11 Sep 2013 at 7:29

GoogleCodeExporter commented 8 years ago

Original comment by miller.lucas on 11 Sep 2013 at 8:40

GoogleCodeExporter commented 8 years ago
This has been committed here and will go into Alembic 1.5.1

http://code.google.com/r/millerlucas-dev/source/detail?r=f5a55961ff5c2b1cacbf056
b297827a725aee4f8

Original comment by miller.lucas on 19 Sep 2013 at 5:23

GoogleCodeExporter commented 8 years ago

Original comment by steve.lavietes@gmail.com on 19 Sep 2013 at 5:34