rfm2
22.0
A python-based rewrite of RenderMan for Maya
|
Public Member Functions | |
def | __init__ (self, jsondict) |
def | defaulted_value (self, name, default_val) |
def | is_static (self) |
def | instance_draw_method (self, instance_idx) |
def | instance_display_mode (self, instance_idx) |
def | instance_vp2_primitive (self, instance_idx) |
def | instance_enabled (self, instance_idx) |
def | opacity (self) |
def | get_input_params (self) |
def | set_input_params (self, obj, **kwargs) |
def | vtx_buffer_count (self) |
def | vtx_buffer (self, **kwargs) |
def | has_uvs (self) |
def | uv_buffer (self) |
def | color_buffer (self) |
def | idx_buffer (self, idx_buffer, num_vtx, start_idx, inst_idx) |
Public Attributes | |
id | |
textured | |
num_instances | |
inst_display_mode | |
inst_draw_method | |
inst_index_buffer | |
inst_vp_shader | |
method | |
kwargs | |
is_deforming_when_transformed | |
Base class to implement a viewport primitive.
def rfm2.vp.geo.base.Vp2GeometryBase.__init__ | ( | self, | |
jsondict | |||
) |
Reimplemented in rfm2.vp.geo.vertex_array.VertexArray, rfm2.vp.geo.sphere.Sphere, rfm2.vp.geo.rounded_rect.RoundedRect, rfm2.vp.geo.rect.Rect, rfm2.vp.geo.ramp.Ramp, rfm2.vp.geo.r_outside.ROutside, rfm2.vp.geo.r_inside.RInside, rfm2.vp.geo.projective_frustum.ProjectiveFrustum, rfm2.vp.geo.frustum.Frustum, rfm2.vp.geo.disk.Disk, rfm2.vp.geo.arrow.Arrow, and rfm2.vp.geo.archive.Archive.
def rfm2.vp.geo.base.Vp2GeometryBase.color_buffer | ( | self | ) |
Return per-vertex color data as a list of lists. It should be ordered exactly like the vertex buffer points and have the same size as the vxt buffer. The default implementation returns a zero-filled list the same size as the vtx buffer to keep the uv buffer aligned with the vtx buffer. NOTE: colors have FOUR components: R, G, B, A.
Reimplemented in rfm2.vp.geo.ramp.Ramp.
def rfm2.vp.geo.base.Vp2GeometryBase.defaulted_value | ( | self, | |
name, | |||
default_val | |||
) |
Replace self.kwargs.get(name, default) to be able to issue a warning. Very useful to track mis-configurations...
def rfm2.vp.geo.base.Vp2GeometryBase.get_input_params | ( | self | ) |
Return a list of attribute names that will drive the shape.
Reimplemented in rfm2.vp.geo.vertex_array.VertexArray.
def rfm2.vp.geo.base.Vp2GeometryBase.has_uvs | ( | self | ) |
Return True if we can emit a uv vertex buffer. Defaults to False.
Reimplemented in rfm2.vp.geo.vertex_array.VertexArray, rfm2.vp.geo.sphere.Sphere, and rfm2.vp.geo.rect.Rect.
def rfm2.vp.geo.base.Vp2GeometryBase.idx_buffer | ( | self, | |
idx_buffer, | |||
num_vtx, | |||
start_idx, | |||
inst_idx | |||
) |
Fill the provided index buffer to draw the shape. NOTE: This index buffer must be valid for all vertex buffers, i.e. positions and uvs.
Reimplemented in rfm2.vp.geo.rect.Rect, rfm2.vp.geo.sphere.Sphere, rfm2.vp.geo.ramp.Ramp, rfm2.vp.geo.projective_frustum.ProjectiveFrustum, rfm2.vp.geo.frustum.Frustum, and rfm2.vp.geo.archive.Archive.
def rfm2.vp.geo.base.Vp2GeometryBase.instance_display_mode | ( | self, | |
instance_idx | |||
) |
Return the maya display mode(s) that will enable this shape's display.
def rfm2.vp.geo.base.Vp2GeometryBase.instance_draw_method | ( | self, | |
instance_idx | |||
) |
Return the draw method VP2 should use for this shape. Defaults to lines.
Reimplemented in rfm2.vp.geo.vertex_array.VertexArray.
def rfm2.vp.geo.base.Vp2GeometryBase.instance_enabled | ( | self, | |
instance_idx | |||
) |
Return the enable state of the instance/MRenderItem, potentially taking named params into account.
Reimplemented in rfm2.vp.geo.r_outside.ROutside, rfm2.vp.geo.r_inside.RInside, rfm2.vp.geo.projective_frustum.ProjectiveFrustum, rfm2.vp.geo.frustum.Frustum, and rfm2.vp.geo.archive.Archive.
def rfm2.vp.geo.base.Vp2GeometryBase.instance_vp2_primitive | ( | self, | |
instance_idx | |||
) |
Return the MGeometry primitive symbol used by VP2 to draw the shape for the given drawing method
def rfm2.vp.geo.base.Vp2GeometryBase.is_static | ( | self | ) |
Tells the vp code if the geometry is static or deforming, like a spot light frustum for example. Defaults to True.
Reimplemented in rfm2.vp.geo.vertex_array.VertexArray, rfm2.vp.geo.sphere.Sphere, rfm2.vp.geo.rounded_rect.RoundedRect, rfm2.vp.geo.rect.Rect, rfm2.vp.geo.ramp.Ramp, rfm2.vp.geo.r_outside.ROutside, rfm2.vp.geo.r_inside.RInside, rfm2.vp.geo.projective_frustum.ProjectiveFrustum, rfm2.vp.geo.frustum.Frustum, rfm2.vp.geo.arrow.Arrow, and rfm2.vp.geo.archive.Archive.
def rfm2.vp.geo.base.Vp2GeometryBase.opacity | ( | self | ) |
Returns the opacity for that shape.
Reimplemented in rfm2.vp.geo.rounded_rect.RoundedRect, rfm2.vp.geo.ramp.Ramp, rfm2.vp.geo.projective_frustum.ProjectiveFrustum, and rfm2.vp.geo.frustum.Frustum.
def rfm2.vp.geo.base.Vp2GeometryBase.set_input_params | ( | self, | |
obj, | |||
** | kwargs | ||
) |
Update internal input param values using kwargs.
Reimplemented in rfm2.vp.geo.rounded_rect.RoundedRect, rfm2.vp.geo.rect.Rect, rfm2.vp.geo.ramp.Ramp, rfm2.vp.geo.projective_frustum.ProjectiveFrustum, rfm2.vp.geo.frustum.Frustum, and rfm2.vp.geo.archive.Archive.
def rfm2.vp.geo.base.Vp2GeometryBase.uv_buffer | ( | self | ) |
Return a list of array coordinates for the shape. They should be ordered exactly like the vertex buffer points and have the same size as the vxt buffer. The default implementation returns a zero-filled list the same size as the vtx buffer to keep the uv buffer aligned with the vtx buffer.
Reimplemented in rfm2.vp.geo.vertex_array.VertexArray, rfm2.vp.geo.sphere.Sphere, and rfm2.vp.geo.rect.Rect.
def rfm2.vp.geo.base.Vp2GeometryBase.vtx_buffer | ( | self, | |
** | kwargs | ||
) |
Return a list of vertices (list) in local space.
def rfm2.vp.geo.base.Vp2GeometryBase.vtx_buffer_count | ( | self | ) |
Return the number of vertices in this buffer.
Reimplemented in rfm2.vp.geo.vertex_array.VertexArray, rfm2.vp.geo.sphere.Sphere, rfm2.vp.geo.rounded_rect.RoundedRect, rfm2.vp.geo.rect.Rect, rfm2.vp.geo.ramp.Ramp, rfm2.vp.geo.r_outside.ROutside, rfm2.vp.geo.r_inside.RInside, rfm2.vp.geo.projective_frustum.ProjectiveFrustum, rfm2.vp.geo.frustum.Frustum, rfm2.vp.geo.disk.Disk, rfm2.vp.geo.arrow.Arrow, and rfm2.vp.geo.archive.Archive.
rfm2.vp.geo.base.Vp2GeometryBase.id |
rfm2.vp.geo.base.Vp2GeometryBase.inst_display_mode |
rfm2.vp.geo.base.Vp2GeometryBase.inst_draw_method |
rfm2.vp.geo.base.Vp2GeometryBase.inst_index_buffer |
rfm2.vp.geo.base.Vp2GeometryBase.inst_vp_shader |
rfm2.vp.geo.base.Vp2GeometryBase.is_deforming_when_transformed |
rfm2.vp.geo.base.Vp2GeometryBase.kwargs |
rfm2.vp.geo.base.Vp2GeometryBase.method |
rfm2.vp.geo.base.Vp2GeometryBase.num_instances |
rfm2.vp.geo.base.Vp2GeometryBase.textured |