Skip to content

Added support for alembic bool data attributes. - #572

Closed
hradec wants to merge 1 commit into
ImageEngine:masterfrom
hradec:alembic
Closed

hradec wants to merge 1 commit into
ImageEngine:masterfrom
hradec:alembic

Conversation

@hradec

@hradec hradec commented May 18, 2017

Copy link
Copy Markdown

They get converted to IntVectorData primitive variables.

IECOREALEMBIC_SPECIALISEGEOMPARAMTRAITS( Alembic::AbcGeom::IN3fGeomParam, IECore::V3fVectorData, IECore::GeometricData::Normal )
IECOREALEMBIC_SPECIALISEGEOMPARAMTRAITS( Alembic::AbcGeom::IN3dGeomParam, IECore::V3dVectorData, IECore::GeometricData::Normal )

IECOREALEMBIC_SPECIALISEGEOMPARAMTRAITS( Alembic::AbcGeom::IBoolGeomParam, IECore::IntVectorData, IECore::GeometricData::Numeric )

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason this can't be BoolVectorData?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IECoreRI/PrimitiveVariableList.cpp doesn't like BoolVectorData:

msg( Msg::Warning, "PrimitiveVariableList::type", format( "Variable \"%s\" has unsupported datatype \"%s\"." ) % name % d->typeName() );

So for now, I've chose to just convert it to IntVectorData, to minimize changes.

@johnhaddon johnhaddon May 23, 2017 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I really think we should be using bools for this so that we can round-trip data correctly when we add an Alembic writer, and so that renderers that do support bools directly (Arnold for instance) can be properly supported. Do you think you could either use a DataPromoteOp somewhere in your pipeline on the way into RenderMan, or sit on this as a local change until we add a replacement RenderMan backend (it's due an overhaul since Gaffer added a new renderer API more suited to threading and IPR)?

@andrewkaufman

Copy link
Copy Markdown
Member

I've added a note to #29 to handle bool data properly in IECoreAlembic. We'll be addressing that soon as part of Cortex 10, so I'm going to close this PR for now. Please feel free to make an updated PR targeting 9_maintenance with the change @johnhaddon suggested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants