Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

ExamplesDataAttributeCache

Ben Toogood edited this page Jun 13, 2013 · 2 revisions

Introduction

This example creates 2 frame sequence of attribute cache files on disk. Each one storing a vector of floats in the notional 'our_object' object under the 'our_attribute' attribute. The concept of objects and attributes are loose when dealing with attribute caches and can be used to assign some context to arbitrary data in a cache. For example, object 'head' and attribute 'P' could be used to describe the point positions of vertices on the head object.

Code

 from IECore import * 
 f1 = FloatVectorData( [1.0, 2.0, 3.0] )
 f2 = FloatVectorData( [2.0, 4.0, 6.0] )
 
 ac = AttributeCache( "test.0001.fio", IndexedIOOpenMode.Write )
 ac.write( "our_object", "our_attribute", f1 )
 
 ac = AttributeCache( "test.0002.fio", IndexedIOOpenMode.Write )
 ac.write( "our_object", "our_attribute", f2 )

Clone this wiki locally

Morty Proxy This is a proxified and sanitized view of the page, visit original site.