| 108 | } |
| 109 | |
| 110 | void 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 | |
| 122 | void Primitive::save( IECore::Object::SaveContext *context ) const |
| 123 | { |