PiRSquared17 / alembic

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

TimeSampling should never be NULL #83

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The current implementation uses an implicit indication of when TimeSampling is 
'static' - basically, if the time sampling ptr on any of the ISimpleProperties 
is NULL, there is implicitly only one or zero samples, and the time sampling 
type is "identity".

This makes client code have to check the TimeSamplingPtr for NULL all the time, 
and is just kinda dumb.  

It should be changed so that TimeSampling is always present, and is returned by 
const reference rather than by ptr. In the case of Static, it will simply 
return numSamples == 0 || 1, and will return identity time sampling type.

Original issue reported on code.google.com by ard...@gmail.com on 16 Nov 2010 at 11:03

GoogleCodeExporter commented 9 years ago
This is implemented and passes tests in the 'TimeSamplingFix' branch. We should 
decide if such a largish API change is wise, but I do think the usage is 
simplified.

Original comment by ard...@gmail.com on 16 Nov 2010 at 11:03

GoogleCodeExporter commented 9 years ago
I've merged this stuff into my dev branch, joesperiment, and confirm that it 
works, and makes stuff cleaner.  I recommend this for merging into the default 
branch for probably inclusion into point9.

Original comment by ard...@gmail.com on 16 Nov 2010 at 11:03

GoogleCodeExporter commented 9 years ago
This has been integrated into branch joemetry, which also contains other 
accepted fixes and changes for .9.

Original comment by ard...@gmail.com on 16 Nov 2010 at 11:03

GoogleCodeExporter commented 9 years ago
This has been integrated into branch joemetry, which also contains other 
accepted fixes and changes for .9.

Original comment by ard...@gmail.com on 16 Nov 2010 at 11:03