rfm2  22.0
A python-based rewrite of RenderMan for Maya
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__ (self, obj)
 
def __del__ (self)
 
def __str__ (self)
 
def compute_offset_tables (self)
 
def check_deformation_conditions (self)
 
def supportedDrawAPIs (self)
 
def hasUIDrawables (self)
 
def updateDG (self)
 
def cleanUp (self)
 
def isIndexingDirty (self, _item)
 
def isStreamDirty (self, _desc)
 
def updateRenderItems (self, dagPath, renderList)
 
def populateGeometry (self, requirements, renderItems, data)
 
def wire_color_from_prefs (self, dag_path)
 

Static Public Member Functions

def creator (obj)
 

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_uv
 
 vb_Pos
 
 vb_Col
 

Static Public Attributes

 shaderCache = Vp2ShaderCache()
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __init__()

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]

◆ __del__()

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

◆ __str__()

def rfm2.vp.pxr_light.PxrLightGeometryOverride.__str__ (   self)
+ Here is the caller graph for this function:

◆ check_deformation_conditions()

def rfm2.vp.pxr_light.PxrLightGeometryOverride.check_deformation_conditions (   self)

◆ cleanUp()

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.

◆ compute_offset_tables()

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:

◆ creator()

def rfm2.vp.pxr_light.PxrLightGeometryOverride.creator (   obj)
static

◆ hasUIDrawables()

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.
+ Here is the call graph for this function:

◆ isIndexingDirty()

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.

◆ isStreamDirty()

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.

◆ populateGeometry()

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:

◆ supportedDrawAPIs()

def rfm2.vp.pxr_light.PxrLightGeometryOverride.supportedDrawAPIs (   self)
This plugin supports both GL and DX

◆ updateDG()

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:

◆ updateRenderItems()

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:

◆ wire_color_from_prefs()

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

◆ can_draw_many_lights

rfm2.vp.pxr_light.PxrLightGeometryOverride.can_draw_many_lights

◆ centerOfIllumination

rfm2.vp.pxr_light.PxrLightGeometryOverride.centerOfIllumination

◆ connected_lights

rfm2.vp.pxr_light.PxrLightGeometryOverride.connected_lights

◆ dyn_param_dict

rfm2.vp.pxr_light.PxrLightGeometryOverride.dyn_param_dict

◆ geometry_changed

rfm2.vp.pxr_light.PxrLightGeometryOverride.geometry_changed

◆ is_light

rfm2.vp.pxr_light.PxrLightGeometryOverride.is_light

◆ is_lightfilter

rfm2.vp.pxr_light.PxrLightGeometryOverride.is_lightfilter

◆ light_param_changed

rfm2.vp.pxr_light.PxrLightGeometryOverride.light_param_changed

◆ locatorScale

rfm2.vp.pxr_light.PxrLightGeometryOverride.locatorScale

◆ matrix

rfm2.vp.pxr_light.PxrLightGeometryOverride.matrix

◆ shader_params

rfm2.vp.pxr_light.PxrLightGeometryOverride.shader_params

◆ shaderCache

rfm2.vp.pxr_light.PxrLightGeometryOverride.shaderCache = Vp2ShaderCache()
static

◆ shape_offsets

rfm2.vp.pxr_light.PxrLightGeometryOverride.shape_offsets

◆ textureResolution

rfm2.vp.pxr_light.PxrLightGeometryOverride.textureResolution

◆ thisDepNode

rfm2.vp.pxr_light.PxrLightGeometryOverride.thisDepNode

◆ thisNode

rfm2.vp.pxr_light.PxrLightGeometryOverride.thisNode

◆ topology_has_changed

rfm2.vp.pxr_light.PxrLightGeometryOverride.topology_has_changed

◆ transform_changed

rfm2.vp.pxr_light.PxrLightGeometryOverride.transform_changed

◆ transform_impacts_geometry

rfm2.vp.pxr_light.PxrLightGeometryOverride.transform_impacts_geometry

◆ vb_Col

rfm2.vp.pxr_light.PxrLightGeometryOverride.vb_Col

◆ vb_Pos

rfm2.vp.pxr_light.PxrLightGeometryOverride.vb_Pos

◆ vb_uv

rfm2.vp.pxr_light.PxrLightGeometryOverride.vb_uv

◆ vpi_shader_instance

rfm2.vp.pxr_light.PxrLightGeometryOverride.vpi_shader_instance

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