MCPcopy Create free account
hub / github.com/ImageEngine/cortex / copyFrom

Method copyFrom

src/IECoreScene/Primitive.cpp:110–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110void Primitive::copyFrom( const Object *other, IECore::Object::CopyContext *context )
111{
112 VisibleRenderable::copyFrom( other, context );
113 const Primitive *tOther = static_cast<const Primitive *>( other );
114 variables.clear();
115 for( PrimitiveVariableMap::const_iterator it=tOther->variables.begin(); it!=tOther->variables.end(); it++ )
116 {
117 IntVectorDataPtr indices = ( it->second.indices ) ? context->copy<IntVectorData>( it->second.indices.get() ) : nullptr;
118 variables.insert( PrimitiveVariableMap::value_type( it->first, PrimitiveVariable( it->second.interpolation, context->copy<Data>( it->second.data.get() ), indices ) ) );
119 }
120}
121
122void Primitive::save( IECore::Object::SaveContext *context ) const
123{

Callers

nothing calls this directly

Calls 6

PrimitiveVariableFunction · 0.85
insertMethod · 0.80
clearMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected