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

ExamplesDataAttributeCacheInterpolation

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

Introduction

This example loads a sequence of attribute cache files from disk and uses linear interpolation to extract sub-frame versions of the cached attributes. Here we extract the 'our_attribute' attribute from the 'our_object' object.

Code

 from IECore import *
 
 ic = InterpolatedCache( "test.####.fio", 1.0,
 			InterpolatedCache.Interpolation.Linear,
 			OversamplesCalculator( 24.0, 1, 24 ) )
 
 co = ic.read( "our_object", "our_attribute" )
 print "attribute at 1.0: ", co
 ic.setFrame(2.0)
 co = ic.read( "our_object", "our_attribute" )
 print "attribute at 2.0: ", co
 ic.setFrame(1.5)
 co = ic.read( "our_object", "our_attribute" )
 print "interpolated attribute at 1.5: ", co

Clone this wiki locally

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