IHydraTexture#
- class omni.kit.hydra_texture.IHydraTexture#
Bases:
pybind11_objectMethods
__init__(*args, **kwargs)cancel_all_picking(self)Cancel any picking or query requests that are in flight or queued.
get_aov_info(self[, result_handle, ...])Get AOV data durring EVENT_TYPE_DRAWABLE_CHANGED as a list of dictionaries.
get_async(self)Returns whether rendering is performed on a separate thread.
get_camera_path(self)Returns the path to the pxr.UsdGeom.Camera that will be used by the HydraEngine (Deprecated, use the "camera_path" property).
get_drawable_ldr_resource(*args, **kwargs)get_drawable_resource(self, result_handle, ...)Deprecated function, DO NOT USE
get_event_stream(self)Returns the event stream where events like drawable change are pumped.
get_frame_info(self[, result_handle, ...])Get additional data durring EVENT_TYPE_DRAWABLE_CHANGED in dictionary form.
get_height(self)Returns the texture height (Deprecated, use the "height" property).
get_hydra_engine(self)Returns HydraEngine that is used currently to render to the associated texture (Deprecated, use the "hydra_engine" property).
get_imgui_reference(*args, **kwargs)get_name(self)Returns name of the HydraTexture.
get_render_product_path(self)Returns the prim path for the render product
get_settings_path(self)Returns path to the settings section where this HydraTexture tracks its state.
get_updates_enabled(self)Returns whether the HydraTexture is active and requesting renderers to be delivered.
get_usd_context_name(self)Returns name of the omni.usd.UsdContext this HydraTexture is attached too.
get_width(self)Returns the texture width (Deprecated, use the "width" property).
pick(self, x_left, y_top, x_right, y_bottom, ...)Pick a pixel in the HydraTexture.
query(self, x, y[, callback, add_outline, ...])Query a pixel in the HydraTexture.
request_pick(self, p0, p1, mode, pick_name, ...)Pick a pixel in the HydraTexture.
request_query(*args, **kwargs)Overloaded function.
set_async(self, is_async)Sets whether it is desirable to perform rendering on another thread.
set_camera_path(self[, usd_camera_path])Sets the USD camera prim path that will be used by the HydraEngine (Deprecated, use the "camera_path" property).
set_height(self, height)Sets the texture height (Deprecated, use the "height" property).
set_hydra_engine(self[, hydra_engine_name])Sets the desired HydraEngine that should render to the associated texture (Deprecated, use the "hydra_engine" property).
set_render_product_path(self, prim_path[, ...])Sets the prim path for the render product.
set_updates_enabled(self[, updates_enabled])Allows to pause/resume rendering updates.
set_width(self, width)Sets the HydraTexture width (Deprecated, use the "width" property).
Attributes
Gets/sets the USD camera prim path that will be used by the HydraEngine.
Gets/sets the texture height.
Gets/sets the desired HydraEngine that should render to the associated texture.
Gets/sets whether it is desirable to perform rendering on another thread.
Gets/sets viewport updates state.
Gets/sets the texture width.
- __init__(*args, **kwargs)#
- cancel_all_picking( ) None#
Cancel any picking or query requests that are in flight or queued.
- get_aov_info(
- self: omni.hydratexture._hydra_texture.IHydraTexture,
- result_handle: int = 0,
- aov_name: str = None,
- include_texture: bool = False,
Get AOV data durring EVENT_TYPE_DRAWABLE_CHANGED as a list of dictionaries.
- Parameters:
include_texture – (bool) Whether to include a dictionary for the AOVs texture, under the key ‘texture’ (defaults to False).
- Returns:
str, ‘texture’: dict}]
- Return type:
A list of dictionaries [{‘name’
- get_async( ) bool#
Returns whether rendering is performed on a separate thread.
- Returns:
Whether rendering is performed on a separate thread as a bool.
- get_camera_path( ) str#
Returns the path to the pxr.UsdGeom.Camera that will be used by the HydraEngine (Deprecated, use the “camera_path” property). :returns: The path to the pxr.UsdGeom.Camera this HydraTexture is rendering as a string.
- get_drawable_resource(
- self: omni.hydratexture._hydra_texture.IHydraTexture,
- result_handle: int = 0,
- aov_name: str = '',
Deprecated function, DO NOT USE
- get_event_stream( ) carb.events._events.IEventStream#
Returns the event stream where events like drawable change are pumped.
- Returns:
The event stream where events like drawable change are pumped.
- get_frame_info(
- self: omni.hydratexture._hydra_texture.IHydraTexture,
- result_handle: int = 0,
- include_aov_list: bool = False,
Get additional data durring EVENT_TYPE_DRAWABLE_CHANGED in dictionary form.
- Parameters:
result_handle – The result_handle passed as a key in the carb.event.IEvent payload for the EVENT_TYPE_DRAWABLE_CHANGED callback.
include_aov_list (bool) – Whether to include an ‘aovs’ entry in the dict for the aovs available from the render (defaults to False).
- Returns:
A dictionary. { ‘view’: [float] * 16, ‘projection’: [float] * 16, ‘fps’: float, ‘resolution’: (uint, uint), ‘progression’: uint, ‘frame_number’: number, ‘swh_frame_number’: Optional[number], ‘subframe_count’: uint, ‘progression’: uint, ‘aovs’ : list }
- get_height( ) int#
Returns the texture height (Deprecated, use the “height” property).
- Returns:
The height of the HydraTexture as an int.
- get_hydra_engine( ) str#
Returns HydraEngine that is used currently to render to the associated texture (Deprecated, use the “hydra_engine” property).
- Returns:
The HydraEngine this HydraTexture is rendering with as a string.
- get_name( ) str#
Returns name of the HydraTexture.
- Returns:
The name of the HydraTexture as a str.
- get_render_product_path( ) str#
Returns the prim path for the render product
- get_settings_path( ) str#
Returns path to the settings section where this HydraTexture tracks its state.
- Returns:
The path to the settings section where this HydraTexture tracks its state as a string.
- get_updates_enabled( ) bool#
Returns whether the HydraTexture is active and requesting renderers to be delivered. (Deprecated, use the “updates_enabled” property).
- Returns:
Whether the HydraTexture is active and requesting renderers to be delivered as a bool.
- get_usd_context_name( ) str#
Returns name of the omni.usd.UsdContext this HydraTexture is attached too.
- Returns:
The name of the omni.usd.UsdContext as a str.
- get_width( ) int#
Returns the texture width (Deprecated, use the “width” property).
- Returns:
The width of the HydraTexture as an int.
- pick(
- self: omni.hydratexture._hydra_texture.IHydraTexture,
- x_left: int,
- y_top: int,
- x_right: int = 0,
- y_bottom: int = 0,
- mode: omni.usd._usd.PickingMode = <PickingMode.TRACK: 5>,
- pick_name: str = '',
- y_down: bool = True,
Pick a pixel in the HydraTexture.
- Parameters:
x_left (uint) – The left-most x coordinate to pick.
y_top (uint) – The top-most y coordinate to pick.
x_right (uint) – The right-most x coordinate to pick.
y_bottom (uint) – The bottom-most y coordinate to pick.
mode (omni.usd.PickingMode) – The mode to use when the pick completes (defaults to omni.usd.PickingMode.TRACK)
pick_name (str) – A unique name for the pick to use to update/reschedule before a previous pick has completed.
y_down (bool) – Whether to treat the pixel coordinate as y-down (defaults to False).
- query(
- self: omni.hydratexture._hydra_texture.IHydraTexture,
- x: int,
- y: int,
- callback: Callable[[str, carb._carb.Double3, carb._carb.Uint2], None] = None,
- add_outline: bool = False,
- query_name: str = '',
- y_down: bool = True,
Query a pixel in the HydraTexture.
- request_pick(
- self: omni.hydratexture._hydra_texture.IHydraTexture,
- p0: carb._carb.Uint2,
- p1: carb._carb.Uint2,
- mode: omni.usd._usd.PickingMode = <PickingMode.TRACK: 5>,
- pick_name: str = '',
- y_down: bool = True,
Pick a pixel in the HydraTexture.
- Parameters:
p0 – (Sequence[uint, uint]): The top left pixel coordinate.
p1 – (Sequence[uint, uint]): The bottom-right pixel coordinate.
mode – (omni.usd.PickingMode) The mode to use when the pick completes (defaults to omni.usd.PickingMode.TRACK)
pick_name – (str) A unique name for the pick to use to update/reschedule before a previous pick has completed.
- request_query(*args, **kwargs)#
Overloaded function.
request_query(self: omni.hydratexture._hydra_texture.IHydraTexture, pixel: carb._carb.Uint2, callback: Callable[[str, carb._carb.Double3, carb._carb.Uint2], None] = None, query_name: str = ‘’, add_outline: bool = False, y_down: bool = True) -> bool
Query a pixel in the HydraTexture.
- Parameters:
pixel (Sequence[uint, uint]) – The pixel coordinate for the query.
callback (Callable) – The object to invoke when the query has completed.
query_name (str) – A unique name for the query to use to update/reschedule before a previous query has completed.
add_outline (bool) – Whether to add an outline to any objects the query finds (defaults to False).
y_down (bool) – Whether to treat the pixel coordinate as y-down (defaults to False).
request_query(self: omni.hydratexture._hydra_texture.IHydraTexture, pixel: carb._carb.Uint2, callback: Callable[[str, carb._carb.Double3, carb._carb.Uint2], None] = None, query_name: str = ‘’, view: handle = None, projection: handle = None, add_outline: bool = False, y_down: bool = True) -> bool
Query a pixel in the HydraTexture.
- Parameters:
pixel (Sequence[uint, uint]) – The pixel coordinate for the query.
callback (Callable) – The object to invoke when the query has completed.
query_name (str) – A unique name for the query to use to update/reschedule before a previous query has completed.
view ([float] * 16) – The view matrix to use for the query.
projection ([float] * 16) – The projection matrix to use for the query.
add_outline (bool) – Whether to add an outline to any objects the query finds (defaults to False).
y_down (bool) – Whether to treat the pixel coordinate as y-down (defaults to False).
- set_async(
- self: omni.hydratexture._hydra_texture.IHydraTexture,
- is_async: bool,
Sets whether it is desirable to perform rendering on another thread.
- set_camera_path(
- self: omni.hydratexture._hydra_texture.IHydraTexture,
- usd_camera_path: str = '/OmniverseKit_Persp',
Sets the USD camera prim path that will be used by the HydraEngine (Deprecated, use the “camera_path” property).
- Parameters:
usd_camera_path (str) – The full path to the pxr.UsdGeom.Camera to render with.
- set_height(
- self: omni.hydratexture._hydra_texture.IHydraTexture,
- height: int,
Sets the texture height (Deprecated, use the “height” property).
- Parameters:
height (uint) – The height to render at.
- set_hydra_engine(
- self: omni.hydratexture._hydra_texture.IHydraTexture,
- hydra_engine_name: str = 'rtx',
Sets the desired HydraEngine that should render to the associated texture (Deprecated, use the “hydra_engine” property).
- Parameters:
hydra_engine_name (str) – The name of the render-engine to render with.
- set_render_product_path(
- self: omni.hydratexture._hydra_texture.IHydraTexture,
- prim_path: str,
- keep_camera: bool = False,
- keep_resolution: bool = False,
Sets the prim path for the render product.
- Parameters:
prim_path (str) – The prim path to a valid UsdRenderProduct.
keep_camera (bool) – Keep the viewport’s current camera.
keep_resolution (bool) – Keep the viewport’s current resolution.
- set_updates_enabled(
- self: omni.hydratexture._hydra_texture.IHydraTexture,
- updates_enabled: bool = True,
Allows to pause/resume rendering updates. When updates are disabled, calls to render from the associated HydraEngine are not made. (Deprecated, use the “updates_enabled” property).
- Parameters:
updates_enabled – (bool) Whether to enable or disable rendering for this HydraTexture.
- set_width(
- self: omni.hydratexture._hydra_texture.IHydraTexture,
- width: int,
Sets the HydraTexture width (Deprecated, use the “width” property).
- Parameters:
width (uint) – The width to render at.
- property camera_path#
Gets/sets the USD camera prim path that will be used by the HydraEngine.
- property height#
Gets/sets the texture height.
- property hydra_engine#
Gets/sets the desired HydraEngine that should render to the associated texture.
- property is_async#
Gets/sets whether it is desirable to perform rendering on another thread.
- property updates_enabled#
Gets/sets viewport updates state. Allows to pause/resume viewport updates. When paused, calls to associated HydraEngine are not made.
- property width#
Gets/sets the texture width.