-
Notifications
You must be signed in to change notification settings - Fork 124
ExamplesProceduralsMeshRender
Ben Toogood edited this page Jun 13, 2013
·
2 revisions
This cookbook example demonstrates how to load & render a mesh primitive from disk using a path specified through a path parameter.
opengl
renderman
from IECore import *
class meshRender(ParameterisedProcedural) :
def __init__(self) :
ParameterisedProcedural.__init__( self, "Renders a mesh." )
path = PathParameter( "path", "Path", "" )
self.parameters().addParameter( path )
def doBound(self, args) :
geo = Reader.create( args['path'].value ).read()
return geo.bound()
def doRenderState(self, renderer, args) :
pass
def doRender(self, renderer, args) :
geo = Reader.create( args['path'].value ).read()
geo.render( renderer )
registerRunTimeTyped( meshRender )
- Introduction
- General Functionality
- Data Handling
- Parameters and Ops
- Point Primitives
- Mesh Primitives
- Image Primitives
- Procedurals
- Cortex & Python
- Cortex & Maya
- Cortex & Houdini