rfm2  22.0
A python-based rewrite of RenderMan for Maya
 All Classes Namespaces Files Functions Variables Pages
rfm2.vp.pxr_light.PxrLightGeometryOverride Class Reference
+ Inheritance diagram for rfm2.vp.pxr_light.PxrLightGeometryOverride:
+ Collaboration diagram for rfm2.vp.pxr_light.PxrLightGeometryOverride:

Public Member Functions

def __init__
 
def __del__
 
def __str__
 
def compute_offset_tables
 
def check_deformation_conditions
 
def supportedDrawAPIs
 
def hasUIDrawables
 
def updateDG
 
def cleanUp
 
def isIndexingDirty
 
def isStreamDirty
 
def updateRenderItems
 
def populateGeometry
 
def wire_color_from_prefs
 

Static Public Member Functions

def creator
 

Public Attributes

 thisNode
 
 thisDepNode
 
 is_light
 
 is_lightfilter
 
 centerOfIllumination
 
 locatorScale
 
 textureResolution
 
 light_param_changed
 
 geometry_changed
 
 topology_has_changed
 
 transform_changed
 
 transform_impacts_geometry
 
 can_draw_many_lights
 
 connected_lights
 
 matrix
 
 dyn_param_dict
 
 shader_params
 
 vpi_shader_instance
 
 shape_offsets
 
 vb_Pos
 
 vb_Col
 

Static Public Attributes

tuple shaderCache = Vp2ShaderCache()
 

Detailed Description

The base class for our VP2 representations of lights.
    This should work on all platforms.

Constructor & Destructor Documentation

def rfm2.vp.pxr_light.PxrLightGeometryOverride.__init__ (   self,
  obj 
)
self.shading_params is a static class member (dict).
- key: VP shader param name.
- value: [node_param_type, node_param_name, default_value]
def rfm2.vp.pxr_light.PxrLightGeometryOverride.__del__ (   self)
tell the shader cache we are gone and it might have to cleanup our
shader instance.

Member Function Documentation

def rfm2.vp.pxr_light.PxrLightGeometryOverride.__str__ (   self)
def rfm2.vp.pxr_light.PxrLightGeometryOverride.check_deformation_conditions (   self)
def rfm2.vp.pxr_light.PxrLightGeometryOverride.cleanUp (   self)
Delete any cached data generated in the earlier phases that is no longer
needed.
NOTE: I was hoping to use this to reference-count cached shader instances
but it is not called with the expected frequency.
def rfm2.vp.pxr_light.PxrLightGeometryOverride.compute_offset_tables (   self)
compute the vertex offsets for each shape. The static shapes come
first, followed by the dynamic ones.
each vpitem corresponds to a shape instance. There can be more than one
instance per shape, so all instances of a shape will have the same
offsets.

+ Here is the caller graph for this function:

def rfm2.vp.pxr_light.PxrLightGeometryOverride.creator (   obj)
static
def rfm2.vp.pxr_light.PxrLightGeometryOverride.hasUIDrawables (   self)
We are not drawing additional primitives via omr.MUIDrawManager. We
should generally avoid this because it is slow.
def rfm2.vp.pxr_light.PxrLightGeometryOverride.isIndexingDirty (   self,
  item 
)
This method is called for each render item on the assocated DAG object
whenever the object changes.
This method is passed a render item. This method should return true if
the indexing for the render item has changed since the last frame. Note
that returning false from isIndexingDirty may NOT prevent populate
geometry from requiring that an index buffer is updated.

Args:
- item MRenderItem): The render item in question.
def rfm2.vp.pxr_light.PxrLightGeometryOverride.isStreamDirty (   self,
  desc 
)
This method is called for each geometry stream on the assocated DAG
object whenever the object changes.
This method is passed a vertex buffer descriptor representing one stream
on the object to be updated. This method should return true if it is safe
to reuse the existing buffer rather than filling a new buffer with data.
Note that returning false from isStreamDirty may NOT prevent
populateGeometry from requiring that a stream be updated.

Args:
- desc (MVertexBufferDescriptor): description of the vertex buffer.
def rfm2.vp.pxr_light.PxrLightGeometryOverride.populateGeometry (   self,
  requirements,
  renderItems,
  data 
)
Implementations of this method should create and populate vertex and
index buffers on the MGeometry instance 'data' in order to fulfill all of
the geometry requirements defined by the 'requirements' parameter.
Failure to do so will result in the object either drawing incorrectly or
not drawing at all. See the documentation of MGeometryRequirements and
MGeometry for more details on the usage of these classes. The geometry
requirements will ask for index buffers on demand. Implementations can
force the geometry requirements to update index buffers by calling
MHWRender::MRenderer::setGeometryDrawDirty() with topologyChanged
setting to true.

Args:
- requirements (MGeometryRequirements): The requirements that need to
                                be satisfied.
- renderItems (MRenderItemList): The list of render items that need to
                         be updated.
- data (MGeometry): The container for the geometry data.

+ Here is the call graph for this function:

def rfm2.vp.pxr_light.PxrLightGeometryOverride.supportedDrawAPIs (   self)
This plugin supports both GL and DX
def rfm2.vp.pxr_light.PxrLightGeometryOverride.updateDG (   self)
This is where we read node values and store them for later use.
    For now, we only lookup the 'lightColor' attribute of the light
    shader.

+ Here is the call graph for this function:

def rfm2.vp.pxr_light.PxrLightGeometryOverride.updateRenderItems (   self,
  dagPath,
  renderList 
)
This method is called for each instance of the associated DAG object
whenever the object changes.
The method is passed the path to the instance and the current list of
render items associated with that instance. By default the list will
contain one render item for each shader assigned to the instance.
Implementations of this method method may add, remove or modify items in
the list. Note that removal of items created by Maya for assigned shaders
is not allowed and will fail. As an alternative this method can disable
those items so that they do not draw.

Args:
- dagPath (MDagPath): The path to the instance to update render items for
- renderList (MRenderItemList): The current render item list, items may
                        be modified, added or removed.

+ Here is the call graph for this function:

def rfm2.vp.pxr_light.PxrLightGeometryOverride.wire_color_from_prefs (   self,
  dag_path 
)
Get the wire color from user prefs while respecting the global
selection color.

Args:
- dag_path (MDagPath): the object in question.

Return:
- MColor object.

+ Here is the caller graph for this function:

Member Data Documentation

rfm2.vp.pxr_light.PxrLightGeometryOverride.can_draw_many_lights
rfm2.vp.pxr_light.PxrLightGeometryOverride.centerOfIllumination
rfm2.vp.pxr_light.PxrLightGeometryOverride.connected_lights
rfm2.vp.pxr_light.PxrLightGeometryOverride.dyn_param_dict
rfm2.vp.pxr_light.PxrLightGeometryOverride.geometry_changed
rfm2.vp.pxr_light.PxrLightGeometryOverride.is_light
rfm2.vp.pxr_light.PxrLightGeometryOverride.is_lightfilter
rfm2.vp.pxr_light.PxrLightGeometryOverride.light_param_changed
rfm2.vp.pxr_light.PxrLightGeometryOverride.locatorScale
rfm2.vp.pxr_light.PxrLightGeometryOverride.matrix
rfm2.vp.pxr_light.PxrLightGeometryOverride.shader_params
tuple rfm2.vp.pxr_light.PxrLightGeometryOverride.shaderCache = Vp2ShaderCache()
static
rfm2.vp.pxr_light.PxrLightGeometryOverride.shape_offsets
rfm2.vp.pxr_light.PxrLightGeometryOverride.textureResolution
rfm2.vp.pxr_light.PxrLightGeometryOverride.thisDepNode
rfm2.vp.pxr_light.PxrLightGeometryOverride.thisNode
rfm2.vp.pxr_light.PxrLightGeometryOverride.topology_has_changed
rfm2.vp.pxr_light.PxrLightGeometryOverride.transform_changed
rfm2.vp.pxr_light.PxrLightGeometryOverride.transform_impacts_geometry
rfm2.vp.pxr_light.PxrLightGeometryOverride.vb_Col
rfm2.vp.pxr_light.PxrLightGeometryOverride.vb_Pos
rfm2.vp.pxr_light.PxrLightGeometryOverride.vpi_shader_instance

The documentation for this class was generated from the following file: