-
Notifications
You must be signed in to change notification settings - Fork 124
ExamplesPythonGeneral
Ben Toogood edited this page Jun 13, 2013
·
2 revisions
Cortex is not tied to an application and lots of it's functionality can be utilised from a vanilla Python shell. This can be a very useful tool for TDs.
$ python2.5
Python 2.5.2 (r252:60911, Dec 5 2008, 10:21:08)
[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import IECore
geo = IECore.Reader.create( "myGeometry.bgeo" ).read()
geo.keys()
> ['P']
geo.numPoints
> 100
geo['P'].data[10:12]
> IECore.V3fVectorData( [ IECore.V3f( 1.40451, -0.293893, 9.15294e-07 ), IECore.V3f( 1.13627, -0.293893, -0.825549 ) ] )
- Introduction
- General Functionality
- Data Handling
- Parameters and Ops
- Point Primitives
- Mesh Primitives
- Image Primitives
- Procedurals
- Cortex & Python
- Cortex & Maya
- Cortex & Houdini