file_path
stringlengths 21
207
| content
stringlengths 5
1.02M
| size
int64 5
1.02M
| lang
stringclasses 9
values | avg_line_length
float64 1.33
100
| max_line_length
int64 4
993
| alphanum_fraction
float64 0.27
0.93
|
---|---|---|---|---|---|---|
omniverse-code/kit/exts/omni.graph.docs/docs/tutorials/tutorial20.rst | .. _ogn_tutorial_tokens:
Tutorial 20 - Tokens
====================
Tokens are a method of providing fast access to strings that have fixed contents. All strings with the same contents
can be translated into the same shared token. Token comparison is as fast as integer comparisons, rather than the more
expensive string comparisons you would need for a general string.
One example of where they are useful is in having a fixed set of allowable values for an input string. For example you
might choose a color channel by selecting from the names "red", "green", and "blue", or you might know that a mesh
bundle's contents always use the attribute names "normals", "points", and "faces".
Tokens can be accessed through the database methods ``tokenToString()`` and ``stringToToken()``. Using the ``tokens``
keyword in a .ogn file merely provides a shortcut to always having certain tokens available. In the color case then
if you have a token input containing the color your comparison code changes from this:
.. code-block:: c++
const auto& colorToken = db.inputs.colorToken();
if (colorToken == db.stringToToken("red"))
{
// do red stuff
}
else if (colorToken == db.stringToToken("green"))
{
// do green stuff
}
else if (colorToken == db.stringToToken("blue"))
{
// do blue stuff
}
to this, which has much faster comparison times:
.. code-block:: c++
const auto& colorToken = db.inputs.colorToken();
if (colorToken == db.tokens.red)
{
// do red stuff
}
else if (colorToken == db.tokens.green)
{
// do green stuff
}
else if (colorToken == db.tokens.blue)
{
// do blue stuff
}
In Python there isn't a first-class object that is a token but the same token access is provided for consistency:
.. code-block:: python
color_token = db.inputs.colorToken
if color_token == db.tokens.red:
# do red stuff
elif color_token == db.tokens.green:
# do green stuff
elif color_token == db.tokens.blue:
# do blue stuff
OgnTutorialTokens.ogn
---------------------
The *ogn* file shows the implementation of a node named "omni.graph.tutorials.Tokens", which contains some hardcoded
tokens to use in the compute method.
.. literalinclude:: ../../../../../source/extensions/omni.graph.tutorials/tutorials/tutorial20/OgnTutorialTokens.ogn
:linenos:
:language: json
OgnTutorialTokens.cpp
---------------------
The *cpp* file contains the implementation of the compute method. It illustrates how to access the hardcoded tokens
to avoid writing the boilerplate code yourself.
.. literalinclude:: ../../../../../source/extensions/omni.graph.tutorials/tutorials/tutorial20/OgnTutorialTokens.cpp
:linenos:
:language: c++
OgnTutorialTokensPy.py
----------------------
The *py* file contains the implementation of the compute method in Python. The .ogn file is the same as the above,
except for the addition of the implementation language key ``"language": "python"``. The compute follows the same
algorithm as the *cpp* equivalent.
.. literalinclude:: ../../../../../source/extensions/omni.graph.tutorials/tutorials/tutorial20/OgnTutorialTokensPy.py
:linenos:
:language: python
| 3,257 | reStructuredText | 34.802197 | 118 | 0.687442 |
omniverse-code/kit/exts/omni.kit.widget.versioning/PACKAGE-LICENSES/omni.kit.widget.versioning-LICENSE.md | Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited. | 412 | Markdown | 57.999992 | 74 | 0.839806 |
omniverse-code/kit/exts/omni.kit.widget.versioning/scripts/demo_checkpoint.py | # Copyright (c) 2018-2020, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.
#
import omni.ui as ui
from omni.kit.widget.versioning import CheckpointWidget, CheckpointCombobox, LAYOUT_TABLE_VIEW, LAYOUT_SLIM_VIEW
def create_checkpoint_view(url: str, layout: int):
view = CheckpointWidget(url, layout=layout)
view.add_context_menu(
"Menu Action",
"pencil.svg",
lambda menu, cp: print(f"Apply '{menu}' to '{cp.get_relative_path()}'"),
None,
)
view.set_mouse_double_clicked_fn(
lambda b, k, cp: print(f"Double clicked '{cp.get_relative_path()}")
)
if __name__ == "__main__":
url = "omniverse://ov-rc/Users/[email protected]/sphere.usd"
window_flags = ui.WINDOW_FLAGS_NO_SCROLLBAR
window = ui.Window("DemoFileBrowser", width=800, height=500, flags=window_flags)
with window.frame:
with ui.VStack(style={"margin": 0}):
ui.Label(url, height=30)
with ui.HStack():
create_checkpoint_view(url, LAYOUT_TABLE_VIEW)
ui.Spacer(width=10)
with ui.VStack(width=250):
create_checkpoint_view(url, LAYOUT_SLIM_VIEW)
ui.Spacer(width=10)
with ui.VStack(width=100, height=20):
combo_box = CheckpointCombobox(url, lambda sel: print(f"Selected: {sel.get_full_url()}"))
| 1,733 | Python | 42.349999 | 112 | 0.656088 |
omniverse-code/kit/exts/omni.kit.widget.versioning/config/extension.toml | [package]
# Semantic Versioning is used: https://semver.org/
version = "1.3.8"
category = "Internal"
# Lists people or organizations that are considered the "authors" of the package.
authors = ["NVIDIA"]
# The title and description fields are primarly for displaying extension info in UI
title = "Versioning Widgets"
description="Versioning widgets that displays branch and checkpoint related information."
# URL of the extension source repository.
repository = ""
# Preview image. Folder named "data" automatically goes in git lfs (see .gitattributes file).
preview_image = "data/preview.png"
# Icon is shown in Extensions window, it is recommended to be square, of size 256x256.
icon = "data/icon.png"
# Keywords for the extension
keywords = ["kit", "checkpoint", "branch", "versioning"]
# Location of change log file in target (final) folder of extension, relative to the root.
# More info on writing changelog: https://keepachangelog.com/en/1.0.0/
changelog="docs/CHANGELOG.md"
# Path (relative to the root) or content of readme markdown file for UI.
readme = "docs/README.md"
[dependencies]
"omni.ui" = {}
"omni.client" = {}
# Main python module this extension provides, it will be publicly available as "import omni.example.hello".
[[python.module]]
name = "omni.kit.widget.versioning"
[[python.scriptFolder]]
path = "scripts"
[[test]]
args = [
"--/app/window/dpiScaleOverride=1.0",
"--/app/window/scaleToMonitor=false",
"--/persistent/app/omniverse/filepicker/options_menu/show_details=true",
"--no-window"
]
dependencies = [
"omni.kit.renderer.capture",
"omni.kit.mainwindow",
"omni.kit.ui_test",
"omni.kit.test_suite.helpers",
"omni.kit.window.content_browser",
]
stdoutFailPatterns.exclude = [
]
| 1,758 | TOML | 27.370967 | 107 | 0.722412 |
omniverse-code/kit/exts/omni.kit.widget.versioning/omni/kit/widget/versioning/slim_view.py | # Copyright (c) 2018-2020, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.
#
from functools import partial
from omni import ui
from .checkpoints_model import CheckpointItem, CheckpointModel
from .style import get_style
class CheckpointSlimView:
def __init__(self, model: CheckpointModel, **kwargs):
self._model = model
self._tree_view = None
self._delegate = CheckpointSlimViewDelegate(**kwargs)
self._selection_changed_fn = kwargs.get("selection_changed_fn", None)
self._build_ui()
def _build_ui(self):
with ui.ZStack(style=get_style()):
ui.Rectangle(style_type_name_override="TreeView.Background")
self._tree_view = ui.TreeView(
self._model,
delegate=self._delegate,
root_visible=False,
header_visible=False,
column_widths=[ui.Fraction(1)],
style_type_name_override="TreeView"
)
self._tree_view.set_selection_changed_fn(self._on_selection_changed)
def _on_selection_changed(self, selections):
if len(selections) > 1:
# only allow selecting one checkpoint
self._tree_view.selection = [selections[-1]]
if self._selection_changed_fn:
self._selection_changed_fn(selections)
def destroy(self):
if self._delegate:
self._delegate.destroy()
self._delegate = None
self._tree_view = None
class CheckpointSlimViewDelegate(ui.AbstractItemDelegate):
def __init__(self, **kwargs):
super().__init__()
self._widget = None
self._mouse_pressed_fn = kwargs.get("mouse_pressed_fn", None)
self._mouse_double_clicked_fn = kwargs.get("mouse_double_clicked_fn", None)
def build_branch(self, model, item, column_id, level, expanded):
pass
def build_widget(self, model: CheckpointModel, item: CheckpointItem, column_id: int, level: int, expanded: bool):
"""Create a widget per item"""
if not item or column_id > 0:
return
tooltip = f"#{item.entry.relative_path[1:]}. {item.entry.comment}\n"
tooltip += f"{CheckpointItem.datetime_to_string(item.entry.modified_time)}\n"
tooltip += f"{item.entry.modified_by}"
def on_mouse_pressed(item: CheckpointItem, x, y, b, key_mod):
if self._mouse_pressed_fn:
self._mouse_pressed_fn(b, key_mod, item)
def on_mouse_double_clicked(item: CheckpointItem, x, y, b, key_mod):
if self._mouse_double_clicked_fn:
self._mouse_double_clicked_fn(b, key_mod, item)
with ui.ZStack(style=get_style()):
self._widget = ui.Rectangle(
mouse_pressed_fn=partial(on_mouse_pressed, item),
mouse_double_clicked_fn=partial(on_mouse_double_clicked, item),
style_type_name_override="Card"
)
with ui.VStack(spacing=0):
ui.Spacer(height=4)
with ui.HStack():
ui.Label(
f"#{item.entry.relative_path[1:]}.", width=0,
style_type_name_override="Card.Label"
)
ui.Spacer(width=2)
if item.entry.comment:
ui.Label(
f"{item.entry.comment}",
tooltip=tooltip,
word_wrap=not item.comment_elided,
elided_text=item.comment_elided,
style_type_name_override="Card.Label"
)
else:
ui.Label(
f"{CheckpointItem.datetime_to_string(item.entry.modified_time)}",
style_type_name_override="Card.Label"
)
if item.entry.comment:
ui.Label(
f"{CheckpointItem.datetime_to_string(item.entry.modified_time)}",
style_type_name_override="Card.Label"
)
ui.Label(f"{item.entry.modified_by}", style_type_name_override="Card.Label")
ui.Spacer(height=8)
ui.Separator(style_type_name_override="Card.Separator")
ui.Spacer(height=4)
def destroy(self):
self._widget = None
self._mouse_pressed_fn = None
self._mouse_double_clicked_fn = None
| 4,884 | Python | 40.398305 | 117 | 0.564087 |
omniverse-code/kit/exts/omni.kit.widget.versioning/omni/kit/widget/versioning/table_view.py | # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.
#
import omni.ui as ui
from functools import partial
from .checkpoints_model import CheckpointModel, CheckpointItem
from .style import get_style
class CheckpointTableView():
def __init__(self, model: CheckpointModel, **kwargs):
self._model = model
self._tree_view = None
self._delegate = CheckpointTableViewDelegate(**kwargs)
self._selection_changed_fn = kwargs.get("selection_changed_fn", None)
self._build_ui()
def _build_ui(self):
with ui.ZStack(style=get_style()):
ui.Rectangle(style_type_name_override="TreeView.Background")
self._tree_view = ui.TreeView(
self._model,
delegate=self._delegate,
root_visible=False,
header_visible=False,
column_widths=[25, ui.Fraction(1), 120, 120, 60],
columns_resizable=True,
style_type_name_override="TreeView"
)
self._tree_view.set_selection_changed_fn(self._on_selection_changed)
def _on_selection_changed(self, selections):
if len(selections) > 1:
# only allow selecting one checkpoint
self._tree_view.selection = [selections[-1]]
if self._selection_changed_fn:
self._selection_changed_fn(selections)
def destroy(self):
self._delegate = None
self._tree_view = None
class CheckpointTableViewDelegate(ui.AbstractItemDelegate):
def __init__(self, **kwargs):
super().__init__()
self._mouse_pressed_fn = kwargs.get("mouse_pressed_fn", None)
self._mouse_double_clicked_fn = kwargs.get("mouse_double_clicked_fn", None)
def build_header(self, column_id: int) -> None: # pragma: no cover -- header is always turned off, see #L31
headers = ["Checkpoint", "Description", "Date", "User", "Size"]
return ui.Label(headers[column_id], height=22, style_type_name_override="TreeView.Header", name="label")
def build_branch(self, model, item, column_id, level, expanded):
pass
def build_widget(self, model, item, column_id, level, expanded):
def on_mouse_pressed(item: CheckpointItem, x, y, b, key_mod):
if self._mouse_pressed_fn:
self._mouse_pressed_fn(b, key_mod, item)
def on_mouse_double_clicked(item: CheckpointItem, x, y, b, key_mod):
if self._mouse_double_clicked_fn:
self._mouse_double_clicked_fn(b, key_mod, item)
if column_id == 0:
ui.Label(
f"{item.entry.relative_path[1:]}",
style_type_name_override="TreeView.Item",
mouse_pressed_fn=partial(on_mouse_pressed, item),
mouse_double_clicked_fn=partial(on_mouse_double_clicked, item),
)
elif column_id == 1:
with ui.VStack(height=20):
ui.Spacer()
with ui.HStack(height=0):
ui.Label(
f"{item.entry.comment}",
style_type_name_override="TreeView.Item",
tooltip=f"{item.entry.comment}",
word_wrap=not item.comment_elided,
elided_text=item.comment_elided,
mouse_pressed_fn=partial(on_mouse_pressed, item),
mouse_double_clicked_fn=partial(on_mouse_double_clicked, item),
)
ui.Spacer()
elif column_id == 2:
ui.Label(
f"{CheckpointItem.datetime_to_string(item.entry.modified_time)}",
style_type_name_override="TreeView.Item",
)
elif column_id == 3:
ui.Label(
f"{item.entry.modified_by}",
style_type_name_override="TreeView.Item",
elided_text=True,
)
elif column_id == 4:
ui.Label(
f"{CheckpointItem.size_to_string(item.entry.size)}",
style_type_name_override="TreeView.Item",
)
| 4,497 | Python | 40.266055 | 112 | 0.581944 |
omniverse-code/kit/exts/omni.kit.widget.versioning/omni/kit/widget/versioning/checkpoints_model.py | # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.
#
import asyncio
import copy
import carb
import omni.client
import omni.kit.app
from omni.kit.async_engine import run_coroutine
import omni.ui as ui
from datetime import datetime
class DummyNoneNode:
def __init__(self, entry: omni.client.ListEntry):
self.relative_path = " <head>"
self.access = entry.access
self.flags = entry.flags
self.size = entry.size
self.modified_time = entry.modified_time
self.created_time = entry.created_time
self.modified_by = entry.modified_by
self.created_by = entry.created_by
self.version = entry.version
self.comment = "<Not using Checkpoint>"
class CheckpointItem(ui.AbstractItem):
def __init__(self, entry, url):
super().__init__()
self.comment_elided = True
self.url = url # url without query
self.entry = entry
@property
def comment(self):
if self.entry:
return self.entry.comment
return ""
def get_full_url(self):
if isinstance(self.entry, DummyNoneNode):
return self.url
return self.url + "?" + self.entry.relative_path
def get_relative_path(self):
if isinstance(self.entry, DummyNoneNode):
return None
return self.entry.relative_path
@staticmethod
def size_to_string(size: int):
return f"{size/1.e9:.2f} GB" if size > 1.e9 else (\
f"{size/1.e6:.2f} MB" if size > 1.e6 else f"{size/1.e3:.2f} KB")
@staticmethod
def datetime_to_string(dt: datetime):
return dt.strftime("%x %I:%M%p")
class CheckpointModel(ui.AbstractItemModel):
def __init__(self, show_none_entry):
super().__init__()
self._show_none_entry = show_none_entry
self._checkpoints = []
self._checkpoints_filtered = []
self._url = ""
self._incoming_url = ""
self._url_without_query = ""
self._search_kw = ""
self._checkpoint = None
self._on_list_checkpoint_fn = None
self._single_column = False
self._list_task = None
self._restore_task = None
self._set_url_task = None
self._multi_select = False
self._file_status_request = omni.client.register_file_status_callback(self._on_file_status)
self._resolve_subscription = None
self._run_loop = asyncio.get_event_loop()
def reset(self):
self._checkpoints = []
self._checkpoints_filtered = []
if self._list_task:
self._list_task.cancel()
self._list_task = None
if self._restore_task:
self._restore_task.cancel()
self._restore_task = None
def destroy(self):
self._on_list_checkpoint_fn = None
self.reset()
self._file_status_request = None
self._resolve_subscription = None
self._run_loop = None
if self._set_url_task:
self._set_url_task.cancel()
self._set_url_task = None
@property
def single_column(self):
return self._single_column
@single_column.setter
def single_column(self, value: bool):
"""Set the one-column mode"""
self._single_column = not not value
self._item_changed(None)
def empty(self):
return not self.get_item_children(None)
def set_multi_select(self, state: bool):
self._multi_select = state
def set_url(self, url):
self._incoming_url = url
# In file dialog, if select file A, then select file B, it emits selection event of "file A", "None", "file B"
# Do a async task to eat the "None" event to avoid flickering
async def delayed_set_url():
await omni.kit.app.get_app().next_update_async()
if self._url != self._incoming_url:
self._url = self._incoming_url
self.reset()
if self._url:
client_url = omni.client.break_url(self._url)
if client_url.query:
_, self._checkpoint = omni.client.get_branch_and_checkpoint_from_query(client_url.query)
else:
self._checkpoint = 0
self._url_without_query = omni.client.make_url(
scheme=client_url.scheme,
user=client_url.user,
host=client_url.host,
port=client_url.port,
path=client_url.path,
fragment=client_url.fragment,
)
self.list_checkpoint()
self._resolve_subscription = omni.client.resolve_subscribe_with_callback(
self._url_without_query, [self._url_without_query], None,
lambda result, event, entry, url: self._on_file_change_event(result))
else:
self._no_checkpoint(True)
self._set_url_task = None
if not self._set_url_task:
self._set_url_task = run_coroutine(delayed_set_url())
def _on_file_change_event(self, result: omni.client.Result):
if result == omni.client.Result.OK:
async def set_url():
self.list_checkpoint()
# must run on main thread as this one does not have async loop...
asyncio.run_coroutine_threadsafe(set_url(), loop=self._run_loop)
def get_url(self):
return self._url
def set_search(self, keywords):
if self._search_kw != keywords:
self._search_kw = keywords
self._re_filter()
def set_on_list_checkpoint_fn(self, fn):
self._on_list_checkpoint_fn = fn
def on_list_checkpoints(self, file_entry, checkpoints_entries):
self._checkpoints = []
current_cp_item = None
for cp in checkpoints_entries:
item = CheckpointItem(cp, self._url_without_query)
self._checkpoints.append(item)
if not current_cp_item and str(self._checkpoint) == cp.relative_path[1:]:
current_cp_item = item
# OM-45546: Add back the <head> dummy option for files with checkpoints
if self._show_none_entry:
none_entry = DummyNoneNode(file_entry)
item = CheckpointItem(none_entry, self._url_without_query)
self._checkpoints.append(item)
if self._checkpoint == 0:
current_cp_item = item
# newest checkpoints at top
self._checkpoints.reverse()
self._re_filter()
self._item_changed(None)
if self._on_list_checkpoint_fn:
self._on_list_checkpoint_fn(supports_checkpointing=True,
has_checkpoints=len(self._checkpoints),
current_checkpoint=current_cp_item,
multi_select=self._multi_select)
def get_item_children(self, item):
"""Returns all the children when the widget asks it."""
if item is not None:
# Since we are doing a flat list, we return the children of root only.
# If it's not root we return.
return []
return self._checkpoints if self._search_kw == "" else self._checkpoints_filtered
def get_item_value_model_count(self, item):
"""The number of columns"""
if self._single_column:
return 1
return 5
def list_checkpoint(self):
self._list_task = run_coroutine(self._list_checkpoint_async())
def restore_checkpoint(self, file_path, checkpoint_path):
self._restore_task = run_coroutine(self._restore_checkpoint(file_path, checkpoint_path))
def get_drag_mime_data(self, item):
"""Returns Multipurpose Internet Mail Extensions (MIME) data for be able to drop this item somewhere"""
return item.get_full_url()
async def _list_checkpoint_async(self):
if self._url_without_query == "omniverse://":
support_checkpointing = True
else:
client_url = omni.client.break_url(self._url_without_query)
server_url = omni.client.make_url(scheme=client_url.scheme, host=client_url.host, port=client_url.port)
result, server_info = await omni.client.get_server_info_async(server_url)
support_checkpointing = True if result and server_info and server_info.checkpoints_enabled else False
result, server_info = await omni.client.get_server_info_async(self._url_without_query)
if not result or not server_info or not server_info.checkpoints_enabled:
self._no_checkpoint(support_checkpointing)
return
# Have to use async version. _with_callback comes from a different thread
result, entry = await omni.client.stat_async(self._url_without_query)
if entry.flags & omni.client.ItemFlags.CAN_HAVE_CHILDREN:
# Can't have checkpoint on folder
self._no_checkpoint(support_checkpointing)
return
result, entries = await omni.client.list_checkpoints_async(self._url_without_query)
if result != omni.client.Result.OK:
carb.log_warn(f"Failed to get checkpoints for {self._url_without_query}: {result}")
self.on_list_checkpoints(entry, entries)
self._list_task = None
def _on_file_status(self, url, status, percent):
if status == omni.client.FileStatus.WRITING and percent == 100 and url == self._url_without_query:
async def set_url():
self.list_checkpoint()
# must run on main thread as this one does not have async loop...
asyncio.run_coroutine_threadsafe(set_url(), loop=self._run_loop)
def _no_checkpoint(self, support_checkpointing):
self._checkpoints.clear()
self._item_changed(None)
if self._on_list_checkpoint_fn:
self._on_list_checkpoint_fn(supports_checkpointing=support_checkpointing,
has_checkpoints=False,
current_checkpoint=None,
multi_select=self._multi_select)
async def _restore_checkpoint(self, file_path, checkpoint_path):
id = checkpoint_path.rfind('&') + 1
relative_path = checkpoint_path[id:] if id > 0 else ''
result = await omni.client.copy_async(checkpoint_path, file_path, message=f"Restored checkpoint #{relative_path}")
carb.log_warn(f"Restore checkpoint {checkpoint_path} to {file_path}: {result}")
if result:
self.list_checkpoint()
def _re_filter(self):
self._checkpoints_filtered.clear()
if self._search_kw == "":
self._checkpoints_filtered = copy.copy(self._checkpoints)
else:
kws = self._search_kw.split(' ')
for cp in self._checkpoints:
for kw in kws:
if kw.lower() in cp.entry.comment.lower():
self._checkpoints_filtered.append(cp)
break
if kw.lower() in cp.entry.relative_path.lower():
self._checkpoints_filtered.append(cp)
break
self._item_changed(None)
| 11,745 | Python | 38.548821 | 122 | 0.587399 |
omniverse-code/kit/exts/omni.kit.widget.versioning/omni/kit/widget/versioning/style.py | # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.
#
import carb
import omni.ui as ui
from omni.kit.widget.versioning import get_icons_path
def get_style():
style = carb.settings.get_settings().get("/persistent/app/window/uiStyle")
if not style:
style = "NvidiaDark"
FONT_SIZE = 14.0
if style == "NvidiaLight": # pragma: no cover -- unused style
WIDGET_BACKGROUND_COLOR = 0xFF454545
BUTTON_BACKGROUND_COLOR = 0xFF545454
BUTTON_FONT_COLOR = 0xFFD6D6D6
INPUT_BACKGROUND_COLOR = 0xFF454545
INPUT_FONT_COLOR = 0xFFD6D6D6
INPUT_HINT_COLOR = 0xFF9E9E9E
CARD_BACKGROUND_COLOR = 0xFF545454
CARD_HOVERED_COLOR = 0xFF6E6E6E
CARD_SELECTED_COLOR = 0xFFBEBBAE
CARD_FONT_COLOR = 0xFFD6D6D6
CARD_SEPARATOR_COLOR = 0x44D6D6D6
MENU_BACKGROUND_COLOR = 0xFF454545
MENU_FONT_COLOR = 0xFFD6D6D6
MENU_SEPARATOR_COLOR = 0x44D6D6D6
NOTIFICATION_BACKGROUND_COLOR = 0xFF545454
NOTIFICATION_FONT_COLOR = 0xFFD6D6D6
TREEVIEW_BACKGROUND_COLOR = 0xFF545454
TREEVIEW_ITEM_COLOR = 0xFFD6D6D6
TREEVIEW_HEADER_BACKGROUND_COLOR = 0xFF545454
TREEVIEW_HEADER_COLOR = 0xFFD6D6D6
TREEVIEW_SELECTED_COLOR = 0x109D905C
else:
WIDGET_BACKGROUND_COLOR = 0xFF343432
BUTTON_BACKGROUND_COLOR = 0xFF23211F
BUTTON_FONT_COLOR = 0xFF9E9E9E
INPUT_BACKGROUND_COLOR = 0xFF23211F
INPUT_FONT_COLOR = 0xFF9E9E9E
INPUT_HINT_COLOR = 0xFF4A4A4A
CARD_BACKGROUND_COLOR = 0xFF23211F
CARD_HOVERED_COLOR = 0xFF3A3A3A
CARD_SELECTED_COLOR = 0xFF8A8777
CARD_FONT_COLOR = 0xFF9E9E9E
CARD_SEPARATOR_COLOR = 0x449E9E9E
MENU_BACKGROUND_COLOR = 0xFF343432
MENU_FONT_COLOR = 0xFF9E9E9E
MENU_SEPARATOR_COLOR = 0x449E9E9E
NOTIFICATION_BACKGROUND_COLOR = 0xFF343432
NOTIFICATION_FONT_COLOR = 0xFF9E9E9E
TREEVIEW_BACKGROUND_COLOR = 0xFF23211F
TREEVIEW_ITEM_COLOR = 0xFF9E9E9E
TREEVIEW_HEADER_BACKGROUND_COLOR = 0xFF343432
TREEVIEW_HEADER_COLOR = 0xFF9E9E9E
TREEVIEW_SELECTED_COLOR = 0x664F4D43
style = {
"Window": {"secondary_background_color": 0},
"ScrollingFrame": {"background_color": WIDGET_BACKGROUND_COLOR, "margin_width": 0},
"ComboBox": {"background_color": BUTTON_BACKGROUND_COLOR, "color": BUTTON_FONT_COLOR},
"ComboBox.Field": {"background_color": INPUT_BACKGROUND_COLOR, "color": INPUT_FONT_COLOR},
"ComboBox.Field::hint": {"background_color": 0x0, "color": INPUT_HINT_COLOR},
"Card": {"background_color": CARD_BACKGROUND_COLOR, "color": CARD_FONT_COLOR, "margin_height": 1, "border_width": 2},
"Card:hovered": {"background_color": CARD_HOVERED_COLOR, "border_color": CARD_HOVERED_COLOR, "border_width": 2},
"Card:pressed": {"background_color": CARD_HOVERED_COLOR, "border_color": CARD_HOVERED_COLOR, "border_width": 2},
"Card:selected": {"background_color": CARD_SELECTED_COLOR, "border_color": CARD_SELECTED_COLOR, "border_width": 2},
"Card.Label": {"background_color": 0x0, "color": CARD_FONT_COLOR, "margin_width": 4},
"Card.Label:selected": {"background_color": 0x0, "color": CARD_BACKGROUND_COLOR, "margin_width": 4},
"Card.Separator": {"background_color": 0x0, "color": CARD_SEPARATOR_COLOR},
"Menu": {"background_color": MENU_BACKGROUND_COLOR, "color": MENU_FONT_COLOR, "border_radius": 2},
"Menu.Item": {"background_color": 0x0, "margin": 0},
"Menu.Separator": {"background_color": 0x0, "color": MENU_SEPARATOR_COLOR, "alignment": ui.Alignment.CENTER},
"Notification": {"background_color": NOTIFICATION_BACKGROUND_COLOR, "margin_width": 0},
"Notification.Label": {"background_color": 0x0, "color": NOTIFICATION_FONT_COLOR, "alignment": ui.Alignment.CENTER_TOP},
"TreeView": {"background_color": 0x0},
"TreeView.Background": {"background_color": TREEVIEW_BACKGROUND_COLOR},
"TreeView.Header": {"background_color": TREEVIEW_HEADER_BACKGROUND_COLOR, "color": TREEVIEW_HEADER_COLOR},
"TreeView.Header::label": {"margin": 4},
"TreeView.Item": {"margin":4, "background_color": 0x0, "color": TREEVIEW_ITEM_COLOR},
"TreeView.Item:selected": {"margin":4, "color": TREEVIEW_SELECTED_COLOR},
}
return style
| 4,783 | Python | 49.357894 | 128 | 0.673218 |
omniverse-code/kit/exts/omni.kit.widget.versioning/omni/kit/widget/versioning/extension.py | # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.
#
import omni.ext
from functools import lru_cache
from pathlib import Path
ICON_PATH = ""
@lru_cache()
def get_icons_path() -> str:
return ICON_PATH
class VerioningExtension(omni.ext.IExt):
def on_startup(self, ext_id):
manager = omni.kit.app.get_app().get_extension_manager()
extension_path = manager.get_extension_path(ext_id)
global ICON_PATH
ICON_PATH = Path(extension_path).joinpath("data").joinpath("icons")
def on_shutdown(self):
pass
| 927 | Python | 28.935483 | 76 | 0.731392 |
omniverse-code/kit/exts/omni.kit.widget.versioning/omni/kit/widget/versioning/__init__.py | # Copyright (c) 2018-2020, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.
#
LAYOUT_SLIM_VIEW = 1
LAYOUT_TABLE_VIEW = 2
LAYOUT_DEFAULT = 3
from .extension import *
from .widget import CheckpointWidget
from .checkpoints_model import CheckpointModel, CheckpointItem
from .checkpoint_combobox import CheckpointCombobox
from .checkpoint_helper import CheckpointHelper
| 722 | Python | 37.05263 | 76 | 0.815789 |
omniverse-code/kit/exts/omni.kit.widget.versioning/omni/kit/widget/versioning/context_menu.py | # Copyright (c) 2018-2020, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.
#
import omni.ui as ui
from typing import Callable, List
from functools import partial
from carb import log_warn
from .checkpoints_model import CheckpointItem
from .style import get_style
class ContextMenu:
"""
Creates popup menu for the hovered CheckpointItem. In addition to the set of default actions below,
users can add more via the add_menu_item API.
"""
def __init__(self):
self._context_menu: ui.Menu = None
self._menu_dict: list = []
self._context: dict = None
self._build_ui()
@property
def menu(self) -> ui.Menu:
""":obj:`omni.ui.Menu` The menu widget"""
return self._context_menu
@property
def context(self) -> dict:
"""dict: Provides data to the callback. Available keys are {'item', 'is_bookmark', 'is_connection', 'selected'}"""
return self._context
def show(self, item: CheckpointItem, selected: List[CheckpointItem] = []):
"""
Creates the popup menu from definition for immediate display. Receives as input, information about the
item. These values are made available to the callback via the 'context' dictionary.
Args:
item (CheckpointItem): Item for which to create menu.,
selected (List[CheckpointItem]): List of currently selected items. Default [].
"""
self._context = {}
self._context["item"] = item
self._context["selected"] = selected
self._context_menu = ui.Menu("Context menu", style=get_style(), style_type_name_override="Menu")
with self._context_menu:
prev_entry = None
for i, menu_entry in enumerate(self._menu_dict):
if i == len(self._menu_dict) - 1 and not menu_entry.get("name"):
# Don't draw separator as last item
break
if menu_entry.get("name") or (prev_entry and prev_entry.get("name")):
# Don't draw 2 separators in a row
self._build_menu(menu_entry, self._context)
prev_entry = menu_entry
# Show it
if len(self._menu_dict) > 0:
self._context_menu.show()
def _build_ui(self):
pass
def _build_menu(self, menu_entry, context):
from omni.kit.ui import get_custom_glyph_code
enabled = 1
if "enable_fn" in menu_entry and menu_entry["enable_fn"]:
enabled = menu_entry["enable_fn"](context)
if enabled < 0:
return
if menu_entry["name"] == "":
ui.Separator(style_type_name_override="Menu.Separator")
else:
menu_name = ""
if "glyph" in menu_entry:
menu_name = " " + get_custom_glyph_code("${glyphs}/" + menu_entry["glyph"]) + " "
if "onclick_fn" in menu_entry and menu_entry["onclick_fn"]:
menu_item = ui.MenuItem(
menu_name + menu_entry["name"],
triggered_fn=partial(menu_entry["onclick_fn"], context),
enabled=bool(enabled),
style_type_name_override="Menu.Item",
)
else:
menu_item = ui.MenuItem(menu_name + menu_entry["name"], enabled=False, style_type_name_override="Menu.Item")
def add_menu_item(self, name: str, glyph: str, onclick_fn: Callable, enable_fn: Callable, index: int = -1) -> str:
"""
Adds menu item, with corresponding callbacks, to this context menu.
Args:
name (str): Name of the menu item (e.g. 'Open'), this name must be unique across the context menu.
glyph (str): Associated glyph to display for this menu item.
onclick_fn (Callable): This callback function is executed when the menu item is clicked. Function signature:
void fn(name: str, item: CheckpointItem), where name is menu name.
enable_fn (Callable): Returns 1 to enable this menu item, 0 to disable, -1 to hide.
Function signature: bool fn(name: str, item: CheckpointItem).
index (int): The position that this menu item will be inserted to.
Returns:
str: Name of menu item if successful, None otherwise.
"""
if name and name in [item.get("name", None) for item in self._menu_dict]:
# Reject duplicates
return None
menu_item = {"name": name, "glyph": glyph or ""}
if onclick_fn:
menu_item["onclick_fn"] = lambda context, name=name: onclick_fn(name, context["item"])
if enable_fn:
menu_item["enable_fn"] = lambda context, name=name: enable_fn(name, context["item"])
if index < 0 or index >= len(self._menu_dict):
index = len(self._menu_dict)
self._menu_dict.insert(index, menu_item)
return name
def delete_menu_item(self, name: str):
"""
Deletes the menu item, with the given name, from this context menu.
Args:
name (str): Name of the menu item (e.g. 'Open').
"""
if not name:
return
found = (i for i, item in enumerate(self._menu_dict) if name == item.get("name", None))
for j in sorted([i for i in found], reverse=True):
del self._menu_dict[j]
def _build_ui(self):
'''
Example:
self._menu_dict = [
{
"name": "Test",
"glyph": "pencil.svg",
"onclick_fn": lambda context: print(">>> TESTING"),
},
]
'''
pass
def _on_copy_to_clipboard(self, item: CheckpointItem):
try:
import omni.kit.clipboard
omni.kit.clipboard.copy(item.path)
except ImportError:
log_warn("Warning: Could not import omni.kit.clipboard.")
def destroy(self):
self._context_menu = None
self._menu_dict = None
self._context = None
| 6,430 | Python | 36.389535 | 124 | 0.580093 |
omniverse-code/kit/exts/omni.kit.widget.versioning/omni/kit/widget/versioning/checkpoint_helper.py | ## Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
##
## NVIDIA CORPORATION and its licensors retain all intellectual property
## and proprietary rights in and to this software, related documentation
## and any modifications thereto. Any use, reproduction, disclosure or
## distribution of this software and related documentation without an express
## license agreement from NVIDIA CORPORATION is strictly prohibited.
##
import asyncio
import omni.client
from typing import Callable
class CheckpointHelper:
server_cache = {}
@staticmethod
def extract_server_from_url(url: str) -> str:
server_url = ""
if url:
client_url = omni.client.break_url(url)
server_url = omni.client.make_url(scheme=client_url.scheme, host=client_url.host, port=client_url.port)
return server_url
@staticmethod
async def is_checkpoint_enabled_async(url: str) -> bool:
server_url = CheckpointHelper.extract_server_from_url(url)
if not server_url:
enabled = False
elif server_url in CheckpointHelper.server_cache:
enabled = CheckpointHelper.server_cache[server_url]
else:
result, server_info = await omni.client.get_server_info_async(server_url)
supports_checkpoint = result and server_info and server_info.checkpoints_enabled
CheckpointHelper.server_cache[server_url] = supports_checkpoint
enabled = supports_checkpoint
return enabled
@staticmethod
def is_checkpoint_enabled_with_callback(url: str, callback: Callable):
async def is_checkpoint_enabled_async(url: str, callback: Callable):
enabled = await CheckpointHelper.is_checkpoint_enabled_async(url)
if callback:
callback(CheckpointHelper.extract_server_from_url(url), enabled)
asyncio.ensure_future(is_checkpoint_enabled_async(url, callback)) | 1,937 | Python | 40.234042 | 115 | 0.694373 |
omniverse-code/kit/exts/omni.kit.widget.versioning/omni/kit/widget/versioning/checkpoint_widget.py | # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.
#
import asyncio
import weakref
import omni.kit.app
import omni.ui as ui
from .checkpoints_model import CheckpointsModel
from .checkpoints_delegate import CheckpointsDelegate
from .style import get_style
class CheckpointWidget:
def __init__(self, url: str = "", width=700, show_none_entry=False, **kwargs):
"""
Build a CheckpointWidget. Called while constructing UI layout.
Args:
url (str): The url of the file to list checkpoints from.
width (str): Width of the checkpoint widget.
show_none_entry (bool): Whether to show a dummy "head" entry to represent not using checkpoint.
"""
self._checkpoint_model = CheckpointsModel(show_none_entry)
self._checkpoint_model.set_on_list_checkpoint_fn(self._on_list_checkpoint)
self._checkpoint_delegate = CheckpointsDelegate(kwargs.get("open_file", None))
self._tree_view = None
self._labels = {}
self._on_selection_changed_fn = []
self._on_list_checkpoint_fn = kwargs.get("on_list_checkpoint_fn", None)
self._build_layout(width)
self.set_url(url)
self.set_multi_select(False)
self._on_list_checkpoint(supports_checkpointing=True,
has_checkpoints=True,
current_checkpoint=None,
multi_select=False)
def __del__(self):
self.destroy()
def destroy(self):
self._tree_view = None
self._labels = None
self._checkpoint_stack = None
self._root_frame = None
if self._checkpoint_model:
self._checkpoint_model.destroy()
self._checkpoint_model = None
self._checkpoint_delegate = None
self._on_selection_changed_fn.clear()
def set_multi_select(self, state:bool):
self._checkpoint_model.set_multi_select(state)
def set_url(self, url: str):
self._checkpoint_model.set_url(url)
def set_search(self, keywords):
self._checkpoint_model.set_search(keywords)
def add_on_selection_changed_fn(self, fn):
self._on_selection_changed_fn.append(fn)
def set_on_list_checkpoint_fn(self, fn):
self._on_list_checkpoint_fn = fn
def empty(self):
return self._checkpoint_model.empty()
def _build_layout(self, width):
self._root_frame = ui.Frame(visible=True, width=width)
with self._root_frame:
with ui.ZStack():
self._labels["cp_not_suppored"] = ui.Label("Checkpoints Not Supported.", style={"font_size": 18})
self._labels["multi_select"] = ui.Label("Checkpoints Cannot Be Displayed For Multiple Items.", style={"font_size": 18})
with ui.VStack():
self._checkpoint_stack = ui.VStack(visible=False, style=get_style())
with self._checkpoint_stack:
with ui.ScrollingFrame(
height=ui.Fraction(1),
horizontal_scrollbar_policy=ui.ScrollBarPolicy.SCROLLBAR_ALWAYS_OFF,
vertical_scrollbar_policy=ui.ScrollBarPolicy.SCROLLBAR_AS_NEEDED,
style_type_name_override="TreeView",
):
self._tree_view = ui.TreeView(
self._checkpoint_model,
root_visible=False,
header_visible=True,
delegate=self._checkpoint_delegate,
column_widths=[80, ui.Fraction(1), 20, 120, 100, 150],
)
# only allow selecting one checkpoint
def on_selection_changed(weak_self, selection):
weak_self = weak_self()
if not weak_self:
return
if len(selection) > 1:
selection = [selection[-1]]
if weak_self._tree_view.selection != selection:
weak_self._tree_view.selection = selection
for fn in weak_self._on_selection_changed_fn:
fn(selection[0] if selection else None)
self._tree_view.set_selection_changed_fn(
lambda selection, weak_self=weakref.ref(self): on_selection_changed(weak_self, selection)
)
self._labels["no_checkpoint"] = ui.Label("No Checkpoint")
def _on_list_checkpoint(self, supports_checkpointing, has_checkpoints, current_checkpoint, multi_select):
if multi_select:
self._root_frame.visible = True
self._checkpoint_stack.visible = False
self._labels["no_checkpoint"].visible = False
self._labels["cp_not_suppored"].visible = False
self._labels["multi_select"].visible = True
elif not supports_checkpointing:
self._checkpoint_stack.visible = False
self._root_frame.visible = True
self._labels["no_checkpoint"].visible = False
self._labels["cp_not_suppored"].visible = True
self._labels["multi_select"].visible = False
else:
self._checkpoint_stack.visible = has_checkpoints
self._root_frame.visible = has_checkpoints
self._labels["cp_not_suppored"].visible = False
self._labels["multi_select"].visible = False
self._labels["no_checkpoint"].visible = not has_checkpoints
# Must delay the selection for one frame so that treeview is synced with model for scroll to selection to work.
async def delayed_selection(weak_tree_view, callback):
tree_view = weak_tree_view()
if not tree_view:
return
await omni.kit.app.get_app().next_update_async()
if current_checkpoint:
tree_view.selection = [current_checkpoint]
else:
tree_view.selection = []
if callback:
callback(tree_view.selection)
asyncio.ensure_future(delayed_selection(weakref.ref(self._tree_view), self._on_list_checkpoint_fn))
| 6,876 | Python | 42.251572 | 135 | 0.566172 |
omniverse-code/kit/exts/omni.kit.widget.versioning/omni/kit/widget/versioning/widget.py | # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.
#
import asyncio
import weakref
import omni.kit.app
import omni.ui as ui
import carb
from typing import List, Callable
from . import LAYOUT_SLIM_VIEW, LAYOUT_TABLE_VIEW, LAYOUT_DEFAULT
from .checkpoints_model import CheckpointModel, CheckpointItem
from .table_view import CheckpointTableView
from .slim_view import CheckpointSlimView
from .context_menu import ContextMenu
from .style import get_style
class CheckpointWidget:
def __init__(self, url: str = "", show_none_entry=False, **kwargs):
"""
Build a CheckpointWidget. Called while constructing UI layout.
Args:
url (str): The url of the file to list checkpoints from.
show_none_entry (bool): Whether to show a dummy "head" entry to represent not using checkpoint.
"""
self._model = CheckpointModel(show_none_entry)
self._model.set_on_list_checkpoint_fn(self._on_list_checkpoint)
self._view = None
self._checkpoint_stack = None
self._notify_stack = None
self._labels = {}
self._context_menu = None
self._theme = carb.settings.get_settings().get("/persistent/app/window/uiStyle") or "NvidiaDark"
self._layout = kwargs.get("layout", LAYOUT_DEFAULT)
self._on_selection_changed_fn = []
self._on_list_checkpoint_fn = kwargs.get("on_list_checkpoint_fn", None)
self._mouse_pressed_fn = kwargs.get("mouse_pressed_fn", None)
self._mouse_double_clicked_fn = kwargs.get("mouse_double_clicked_fn", None)
self._build_ui()
self.set_url(url)
def __del__(self):
self.destroy()
def destroy(self):
self._view = None
self._labels = None
self._checkpoint_stack = None
self._notify_stack = None
if self._model:
self._model.destroy()
self._model = None
if self._context_menu:
self._context_menu.destroy()
self._content_menu = None
self._on_selection_changed_fn.clear()
def set_mouse_pressed_fn(self, mouse_pressed_fn: Callable):
self._mouse_pressed_fn = mouse_pressed_fn
def set_mouse_double_clicked_fn(self, mouse_double_clicked_fn: Callable):
self._mouse_double_clicked_fn = mouse_double_clicked_fn
def set_multi_select(self, state:bool):
self._model.set_multi_select(state)
def set_url(self, url: str):
self._model.set_url(url)
def set_search(self, keywords):
self._model.set_search(keywords)
def add_on_selection_changed_fn(self, fn):
self._on_selection_changed_fn.append(fn)
def set_on_list_checkpoint_fn(self, fn):
self._on_list_checkpoint_fn = fn
def empty(self):
return self._model.empty()
def _build_ui(self):
with ui.Frame(visible=True, style=get_style()):
with ui.ZStack():
self._notify_stack = ui.VStack(style_type_name_override="Notification", visible=False)
with self._notify_stack:
ui.Spacer(height=20)
with ui.HStack(height=0):
ui.Spacer()
ext_path = omni.kit.app.get_app().get_extension_manager().get_extension_path_by_module(__name__)
thumbnail = f"{ext_path}/data/icons/{self._theme}/select_file.png"
ui.ImageWithProvider(thumbnail,
width=100, height=100,
fill_policy=ui.IwpFillPolicy.IWP_PRESERVE_ASPECT_FIT)
ui.Spacer()
ui.Spacer(height=20)
with ui.HStack(height=0):
ui.Spacer()
with ui.HStack(width=150):
self._labels["default"] = ui.Label(
"Select a file to see Checkpoints.",
word_wrap=True, style_type_name_override="Notification.Label", visible=True)
self._labels["cp_not_suppored"] = ui.Label(
"Location does not support Checkpoints.",
word_wrap=True, style_type_name_override="Notification.Label", visible=False)
self._labels["multi_select"] = ui.Label(
"Checkpoints Cannot Be Displayed For Multiple Items.",
word_wrap=True, style_type_name_override="Notification.Label", visible=False)
self._labels["no_checkpoint"] = ui.Label(
"Selected file has no Checkpoints.",
word_wrap=True, style_type_name_override="Notification.Label", visible=False)
ui.Spacer()
ui.Spacer()
self._checkpoint_stack = ui.VStack(visible=False)
with self._checkpoint_stack:
if self._layout in [LAYOUT_SLIM_VIEW, LAYOUT_DEFAULT]:
self._model.single_column = True
self._view = CheckpointSlimView(
self._model,
selection_changed_fn=self._on_selection_changed,
mouse_pressed_fn=self._on_mouse_pressed,
mouse_double_clicked_fn=self._on_mouse_double_clicked
)
else:
self._view = CheckpointTableView(
self._model,
selection_changed_fn=self._on_selection_changed,
mouse_pressed_fn=self._on_mouse_pressed,
mouse_double_clicked_fn=self._on_mouse_double_clicked
)
# Create popup menus
self._context_menu = ContextMenu()
self._on_list_checkpoint(supports_checkpointing=False,
has_checkpoints=False,
current_checkpoint=None,
multi_select=False)
def _on_selection_changed(self, selections: List[CheckpointItem]):
for selection_changed_fn in self._on_selection_changed_fn:
selection_changed_fn(selections[0] if selections else None)
def _on_mouse_pressed(self, button: int, key_mod: int, item: CheckpointItem):
if button == 1:
# Right mouse button: display context menu
self._context_menu.show(item)
if self._mouse_pressed_fn:
self.mouse_pressed_fn(button, key_mod, item)
def _on_mouse_double_clicked(self, button: int, key_mod: int, item: CheckpointItem):
if self._mouse_double_clicked_fn:
self._mouse_double_clicked_fn(button, key_mod, item)
def _on_list_checkpoint(self, supports_checkpointing, has_checkpoints, current_checkpoint, multi_select):
if has_checkpoints and not multi_select:
self._checkpoint_stack.visible = True
self._notify_stack.visible = False
else:
self._checkpoint_stack.visible = False
self._notify_stack.visible = True
if self._notify_stack.visible:
self._labels["default"].visible = False
if multi_select:
self._labels["no_checkpoint"].visible = False
self._labels["cp_not_suppored"].visible = False
self._labels["multi_select"].visible = True
elif not supports_checkpointing:
self._labels["no_checkpoint"].visible = False
self._labels["cp_not_suppored"].visible = True
self._labels["multi_select"].visible = False
else:
self._labels["no_checkpoint"].visible = not has_checkpoints
self._labels["cp_not_suppored"].visible = False
self._labels["multi_select"].visible = False
# Must delay the selection for one frame so that treeview is synced with model for scroll to selection to work.
async def delayed_selection(weak_view, callback):
view = weak_view()
if not view:
return
await omni.kit.app.get_app().next_update_async()
if current_checkpoint:
view.selection = [current_checkpoint]
else:
view.selection = []
if callback:
callback(view.selection)
asyncio.ensure_future(delayed_selection(weakref.ref(self._view), self._on_list_checkpoint_fn))
@staticmethod
def create_checkpoint_widget() -> 'CheckpointWidget':
widget = CheckpointWidget(show_none_entry=True)
return widget
@staticmethod
def on_model_url_changed(widget: 'CheckpointWidget', urls: List[str]):
if not widget:
return
if urls:
widget.set_url(urls[-1] or None)
widget.set_multi_select(len(urls) > 1)
else:
widget.set_url(None)
widget.set_multi_select(False)
@staticmethod
def delete_checkpoint_widget(widget: 'CheckpointWidget'):
if widget:
widget.destroy()
def add_context_menu(self, name: str, glyph: str, click_fn: Callable, enable_fn: Callable, index: int = -1) -> str:
"""
Adds menu item, with corresponding callbacks, to the context menu.
Args:
name (str): Name of the menu item (e.g. 'Open'), this name must be unique across the context menu.
glyph (str): Associated glyph to display for this menu item.
click_fn (Callable): This callback function is executed when the menu item is clicked. Function signature:
void fn(name: str, path: str), where name is menu name and path is absolute path to clicked item.
enable_fn (Callable): Returns 1 to enable this menu item, 0 to disable, -1 to hide.
Function signature: bool fn(name: str, item: CheckpointItem).
index (int): The position that this menu item will be inserted to.
Returns:
str: Name of menu item if successful, None otherwise.
"""
if self._context_menu:
return self._context_menu.add_menu_item(name, glyph, click_fn, enable_fn, index=index)
return None
def delete_context_menu(self, name: str):
"""
Deletes the menu item, with the given name, from the context menu.
Args:
name (str): Name of the menu item (e.g. 'Open').
"""
if self._context_menu:
self._context_menu.delete_menu_item(name)
| 11,060 | Python | 42.03891 | 120 | 0.576582 |
omniverse-code/kit/exts/omni.kit.widget.versioning/omni/kit/widget/versioning/checkpoint_combobox.py | # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.
#
import asyncio
from functools import lru_cache
from typing import Optional
import omni.client
import omni.kit.app
import omni.ui as ui
import carb
from .widget import CheckpointWidget
from .style import get_style
from .checkpoints_model import CheckpointItem
@lru_cache()
def _get_down_arrow_icon_path(theme: str) -> str:
ext_path = omni.kit.app.get_app().get_extension_manager().get_extension_path_by_module(__name__)
return f"{ext_path}/data/icons/{theme}/down_arrow.svg"
class CheckpointCombobox:
def __init__(
self,
absolute_asset_path,
on_selection_changed_fn,
width: ui.Length=ui.Pixel(100),
has_pre_spacer: bool=True,
popup_width: int=450,
visible: bool=True,
modal: bool=False,
):
self._get_comment_task = None
self._theme = carb.settings.get_settings().get("/persistent/app/window/uiStyle") or "NvidiaDark"
self._url = absolute_asset_path
self._width = width
self._has_pre_spacer = has_pre_spacer
self._popup_width = popup_width
self._visible = visible
self._modal = modal
self.__on_selection_changed_fn = on_selection_changed_fn
self.__container: Optional[ui.ZStack] = None
self.__checkpoint_field: Optional[ui.StringField] = None
self._build_checkpoint_combobox()
def destroy(self):
self._checkpoint_list_popup = None
self._search_field_value_change_sub = None
self._search_field_begin_edit_sub = None
self._search_field_end_edit_sub = None
if self._get_comment_task:
self._get_comment_task.cancel()
self._get_comment_task = None
@property
def visible(self) -> bool:
return self._visible
@visible.setter
def visible(self, value: bool) -> None:
self._visible = value
if self.__container:
self.__container.visible = value
@property
def url(self) -> str:
return self._url
@url.setter
def url(self, value: str) -> None:
self._url = value
if self.__checkpoint_field:
self.__config_field()
def _build_checkpoint_combobox(self):
self.__container = ui.ZStack(visible=self._visible, style=get_style())
with self.__container:
with ui.HStack():
if self._has_pre_spacer:
ui.Spacer()
with ui.ZStack(width=self._width):
self.__checkpoint_field = ui.StringField(read_only=True, enabled=False, style_type_name_override="ComboBox")
self.__config_field()
arrow_outer_size = 14
arrow_size = 10
with ui.HStack():
ui.Spacer()
with ui.VStack(width=arrow_outer_size):
ui.Spacer(height=6)
ui.Image(_get_down_arrow_icon_path(self._theme), width=arrow_size, height=arrow_size)
def on_mouse_pressed(field):
popup_width = self._popup_width if self._popup_width > 0 else field.computed_width
popup_height = 200
self._show_checkpoint_widget(
self._url,
field.screen_position_x - popup_width + field.computed_content_width,
field.screen_position_y,
field.computed_content_height,
popup_width,
popup_height,
)
self.__checkpoint_field.set_mouse_pressed_fn(
lambda x, y, b, m, field=self.__checkpoint_field: on_mouse_pressed(field)
)
return None
def __config_field(self):
(client_url, checkpoint) = self.__get_current_checkpoint()
self.__checkpoint_field.model.set_value(str(checkpoint) if checkpoint else "<head>")
if checkpoint:
async def get_comment():
result, entries = await omni.client.list_checkpoints_async(self._url)
if result:
for entry in entries:
if entry.relative_path == client_url.query:
self.__checkpoint_field.set_tooltip(entry.comment)
break
self._get_comment_task = asyncio.ensure_future(get_comment())
else:
self.__checkpoint_field.set_tooltip("<Not using Checkpoint>")
def __get_current_checkpoint(self):
checkpoint = 0
client_url = omni.client.break_url(self._url)
if client_url.query:
_, checkpoint = omni.client.get_branch_and_checkpoint_from_query(client_url.query)
return (client_url, checkpoint)
def __on_checkpoint_selection_changed(self, item: CheckpointItem):
if item:
self.url = item.get_full_url()
self._checkpoint_list_popup.visible = False
if self.__on_selection_changed_fn:
self.__on_selection_changed_fn(item)
def _build_list_popup(self, url):
with ui.VStack():
with ui.ZStack(height=0):
search_field = ui.StringField(style_type_name_override="ComboBox.Field")
search_label = ui.Label(" Search", name="hint", enabled=False, style_type_name_override="ComboBox.Field")
checkpoint_widget = CheckpointWidget(url, show_none_entry=True)
self._search_field_value_change_sub = search_field.model.subscribe_value_changed_fn(
lambda model: checkpoint_widget.set_search(model.get_value_as_string())
)
def begin_search(model):
search_label.visible = False
self._search_field_begin_edit_sub = search_field.model.subscribe_begin_edit_fn(begin_search)
def end_search(model):
if model.get_value_as_string() != "":
search_label.visible = True
self._search_field_end_edit_sub = search_field.model.subscribe_end_edit_fn(end_search)
checkpoint_widget.add_on_selection_changed_fn(self.__on_checkpoint_selection_changed)
def on_visibility_changed(visible):
checkpoint_widget.destroy()
self._checkpoint_list_popup.set_visibility_changed_fn(on_visibility_changed)
def _show_checkpoint_widget(self, url, pos_x, pos_y, pos_y_offset, width, height):
# If there is not enough space to expand the list downward, expand it upward instead
# TODO multi OS window?
window_height = ui.Workspace.get_main_window_height()
window_width = ui.Workspace.get_main_window_width()
if pos_y + height > window_height:
pos_y -= height
else:
pos_y += pos_y_offset
if self._modal:
flags = (ui.WINDOW_FLAGS_MODAL | ui.WINDOW_FLAGS_NO_BACKGROUND)
else:
flags = ui.WINDOW_FLAGS_POPUP
flags = (
flags
| ui.WINDOW_FLAGS_NO_TITLE_BAR
| ui.WINDOW_FLAGS_NO_RESIZE
| ui.WINDOW_FLAGS_NO_MOVE
)
self._checkpoint_list_popup = ui.Window(
"Checkpoint Widget Window",
flags=flags,
padding_x=1,
padding_y=1,
width= window_width if self._modal else width,
height=window_height if self._modal else height,
)
self._checkpoint_list_popup.frame.set_style(get_style())
if self._modal:
# Modal window, simulate a popup window
# - background transparent
# - mouse press outside list will hide window
def __hide_list_popup():
self._checkpoint_list_popup.visible = False
with self._checkpoint_list_popup.frame:
with ui.HStack():
ui.Spacer(width=pos_x, mouse_pressed_fn=lambda x, y, b, a: __hide_list_popup())
with ui.VStack():
ui.Spacer(height=pos_y, mouse_pressed_fn=lambda x, y, b, a: __hide_list_popup())
self._build_list_popup(url)
ui.Spacer(height=window_height-pos_y-height, mouse_pressed_fn=lambda x, y, b, a: __hide_list_popup())
ui.Spacer(width=window_width-pos_x-width, mouse_pressed_fn=lambda x, y, b, a: __hide_list_popup())
else:
self._checkpoint_list_popup.position_x = pos_x
self._checkpoint_list_popup.position_y = pos_y
with self._checkpoint_list_popup.frame:
self._build_list_popup(url)
| 9,158 | Python | 39.171052 | 128 | 0.575126 |
omniverse-code/kit/exts/omni.kit.widget.versioning/omni/kit/widget/versioning/tests/test_versioning.py | ## Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
##
## NVIDIA CORPORATION and its licensors retain all intellectual property
## and proprietary rights in and to this software, related documentation
## and any modifications thereto. Any use, reproduction, disclosure or
## distribution of this software and related documentation without an express
## license agreement from NVIDIA CORPORATION is strictly prohibited.
##
import omni.kit.test
import omni.kit.app
import omni.client
from datetime import datetime
from unittest.mock import patch, Mock
from omni.kit.test.async_unittest import AsyncTestCase
from omni.kit.test_suite.helpers import get_test_data_path
from omni.kit.window.content_browser import get_content_window
import omni.ui as ui
import omni.kit.ui_test as ui_test
from omni.kit.widget.versioning import CheckpointWidget, CheckpointCombobox, LAYOUT_TABLE_VIEW, LAYOUT_SLIM_VIEW
from ..checkpoint_helper import CheckpointHelper
from ..checkpoints_model import CheckpointModel
class MockServer:
def __init__(self, cache_enabled=False, checkpoints_enabled=False, omniojects_enabled=False, username="", version=""):
self.cache_enabled = cache_enabled
self.checkpoints_enabled = checkpoints_enabled
self.omniojects_enabled = omniojects_enabled
self.username = username
self.version = version
class MockFileEntry:
def __init__(self, relative_path="", access="", flags="", size=0, modified_time="", created_time="", modified_by="", created_by="", version="", comment="<Test Node>"):
self.relative_path = relative_path
self.access = access
self.flags = flags
self.size = size
self.modified_time = modified_time
self.created_time = created_time
self.modified_by = modified_by
self.created_by = created_by
self.version = version
self.comment = comment
class _TestBase(AsyncTestCase):
# Before running each test
async def setUp(self):
self._mock_server = MockServer(
cache_enabled=False,
checkpoints_enabled=True,
omniojects_enabled=True,
username="[email protected]",
version="TestServer"
)
self._mock_file_entries = [
MockFileEntry(
access=1,
created_by="[email protected]",
created_time=datetime.min.time(),
flags=513,
modified_by="[email protected]",
modified_time=datetime.min.time(),
relative_path="&1",
size=160,
version=12023408,
comment="<1>"
),
MockFileEntry(
access=1,
created_by="[email protected]",
created_time=datetime.min.time(),
flags=513,
modified_by="[email protected]",
modified_time=datetime.min.time(),
relative_path="&2",
size=260,
version=12023408,
comment="<2>"
)
]
# After running each test
async def tearDown(self):
pass
async def _mock_get_server_info_async(self, url: str):
return omni.client.Result.OK, self._mock_server
async def _mock_list_checkpoints_async(self, query: str):
return omni.client.Result.OK, self._mock_file_entries
def _mock_checkpoint_query(self, query: str):
return (None, 1)
def _mock_copy_async(self, path, filepath, message=""):
return omni.client.Result.OK
def _mock_on_file_change(self, result):
pass
def _mock_resolve_subscribe(self, url, urls, cb1, cb2):
cb2(omni.client.Result.OK, None, self._mock_file_entries[0], None)
class TestVersioningWindow(_TestBase):
async def test_versioning_widget(self):
with patch("omni.client.get_server_info_async", side_effect=self._mock_get_server_info_async),\
patch("omni.client.list_checkpoints_async", side_effect=self._mock_list_checkpoints_async),\
patch("omni.client.copy_async", side_effect=self._mock_copy_async) as _mock,\
patch("omni.client.resolve_subscribe_with_callback", side_effect=self._mock_resolve_subscribe),\
patch.object(CheckpointModel, "_on_file_change_event", side_effect=self._mock_on_file_change) as _mock_file_change:
under_test = get_content_window()
# TODO: Filebrowser file selection not working for grid_view
under_test.toggle_grid_view(False)
test_path = get_test_data_path(__name__, "4Lights.usda")
await under_test.select_items_async(test_path)
await ui_test.wait_n_updates(2)
# Confirm that checkpoint widget displays the expected checkpoint entry
cp_widget = under_test.get_checkpoint_widget()
cp_model = cp_widget._model
cp_items = cp_model.get_item_children(None)
self.assertTrue(len(cp_items))
# Last item is the latest
self.assertEqual(cp_items[-1].entry, self._mock_file_entries[0])
# test restore
cp_model.restore_checkpoint("omniverse://dummy.usd", "omniverse://dummy.usd?&2")
await ui_test.wait_n_updates(5)
_mock.assert_called_once_with("omniverse://dummy.usd?&2", "omniverse://dummy.usd",
message="Restored checkpoint #2")
# OMFP-3807: restore should trigger file change,check here
_mock_file_change.assert_called()
async def test_versioning_widget_table_view(self):
mock_double_click = Mock()
with patch("omni.client.get_server_info_async", side_effect=self._mock_get_server_info_async),\
patch("omni.client.list_checkpoints_async", side_effect=self._mock_list_checkpoints_async):
url = get_test_data_path(__name__, "4Lights.usda")
window_flags = ui.WINDOW_FLAGS_NO_SCROLLBAR
window = ui.Window("TestTableView", width=800, height=500, flags=window_flags)
with window.frame:
with ui.VStack():
widget = CheckpointWidget(url, layout=LAYOUT_TABLE_VIEW)
widget.set_url(url)
widget.add_context_menu(
"Foo",
"pencil.svg",
Mock(),
None,
)
widget.add_context_menu(
"Bar",
"pencil.svg",
Mock(),
None,
)
widget.set_mouse_double_clicked_fn(lambda b, k, cp: mock_double_click(cp))
window.focus()
await ui_test.wait_n_updates(5)
cp_items = widget._model.get_item_children(None)
# test that table view displays our test file entry correctly
self.assertFalse(widget.empty())
item = cp_items[-1]
# Last item is the latest
self.assertEqual(item.entry, self._mock_file_entries[0])
self.assertEqual(item.comment, "<1>")
self.assertTrue(item.get_full_url().endswith(f"4Lights.usda?&1"))
self.assertEqual(item.get_relative_path(), "&1")
# test search filtering
treeview_item = ui_test.find("TestTableView//Frame/**/Label[*].text=='1'")
self.assertIsNotNone(treeview_item)
widget.set_search("2")
await ui_test.human_delay()
treeview_item = ui_test.find("TestTableView//Frame/**/Label[*].text=='1'")
self.assertIsNone(treeview_item)
# restore keywords back
widget.set_search("")
# test double click
treeview_item = ui_test.find("TestTableView//Frame/**/Label[*].text=='1'")
self.assertIsNotNone(treeview_item)
await treeview_item.double_click()
mock_double_click.assert_called_once_with(item)
# test context menu
await treeview_item.right_click()
await ui_test.human_delay()
await ui_test.select_context_menu("Foo")
# test delete context menu
widget.delete_context_menu("Foo")
await ui_test.human_delay()
await treeview_item.right_click()
menu = await ui_test.get_context_menu()
self.assertEqual(menu['_'], ['Bar'])
async def test_checkpoint_combo_box(self):
with patch("omni.client.get_server_info_async", side_effect=self._mock_get_server_info_async),\
patch("omni.client.list_checkpoints_async", side_effect=self._mock_list_checkpoints_async),\
patch("omni.client.get_branch_and_checkpoint_from_query", side_effect=self._mock_checkpoint_query):
url = "omniverse://dummy.usd"
window_flags = ui.WINDOW_FLAGS_NO_SCROLLBAR
window = ui.Window("TestComboBox", width=800, height=500, flags=window_flags)
with window.frame:
with ui.VStack():
combo_box = CheckpointCombobox(url, lambda sel: print(f"Selected: {sel.get_full_url()}"))
window.focus()
await ui_test.wait_n_updates(5)
# test visible
self.assertTrue(combo_box.visible)
combo_box.visible = False
self.assertFalse(combo_box.visible)
combo_box.visible = True
# test url
self.assertEqual(url, combo_box.url)
url = "omniverse://dummy.usd?1"
combo_box.url = url
self.assertEqual(url, combo_box.url)
# test show checkpoints
field = ui_test.find_all("TestComboBox//Frame/**/StringField[*]")[0]
self.assertIsNotNone(field)
await field.click()
await ui_test.human_delay()
self.assertTrue(combo_box._checkpoint_list_popup.visible)
class TestCheckpointHelper(_TestBase):
async def test_extract_server_from_url(self):
self.assertFalse(CheckpointHelper.extract_server_from_url(""))
self.assertEqual(CheckpointHelper.extract_server_from_url("omniverse://dummy/foo.bar"), "omniverse://dummy")
async def test_is_checkpoint_enabled(self):
enabled = await CheckpointHelper.is_checkpoint_enabled_async("")
self.assertFalse(enabled)
with patch("omni.client.get_server_info_async", side_effect=self._mock_get_server_info_async) as _mock:
enabled = await CheckpointHelper.is_checkpoint_enabled_async("omniverse://dummy/foo.bar")
self.assertTrue(enabled)
_mock.assert_called_once()
_mock.reset_mock()
# test that server result is cached
self.assertTrue("omniverse://dummy" in CheckpointHelper.server_cache)
enabled = await CheckpointHelper.is_checkpoint_enabled_async("omniverse://dummy/baz.abc")
self.assertTrue(enabled)
_mock.assert_not_called()
async def test_is_checkpoint_enabled_with_callback(self):
callback = Mock()
with patch("omni.client.get_server_info_async", side_effect=self._mock_get_server_info_async):
CheckpointHelper.is_checkpoint_enabled_with_callback("omniverse://dummy/foo.bar", callback)
await ui_test.wait_n_updates(2)
callback.assert_called_once_with("omniverse://dummy", True)
| 11,526 | Python | 41.692592 | 171 | 0.603418 |
omniverse-code/kit/exts/omni.kit.widget.versioning/omni/kit/widget/versioning/tests/__init__.py | from .test_versioning import TestCheckpointHelper, TestVersioningWindow
| 72 | Python | 35.499982 | 71 | 0.888889 |
omniverse-code/kit/exts/omni.kit.widget.versioning/docs/CHANGELOG.md | # Changelog
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [1.3.8] - 2022-04-27
### Changed
- Fixes unittests.
## [1.3.7] - 2022-04-18
### Changed
- Added CheckpointHelper.
## [1.3.6] - 2021-11-22
### Changed
- Fixed UI layout when imported into the filepicker detail view.
## [1.3.5] - 2021-08-12
### Changed
- Added method to retrieve comment from the Checkpoint item.
## [1.3.4] - 2021-07-20
### Changed
- Adds enable_fn to context menu
## [1.3.3] - 2021-07-20
### Changed
- Fixes checkpoint selection
## [1.3.2] - 2021-07-13
### Changed
- Fixed selection handling, particularly useful for the combo box
## [1.3.1] - 2021-07-12
### Changed
- Added compact view for checkpoint list
- Refactored the widget for incorporating into redesigned filepicker
## [1.2.1] - 2021-06-10
### Changed
- Added open checkpoint from checkpoint list
## [1.2.0] - 2021-06-10
### Changed
- Checkpoint window always shows when enabled
## [1.1.3] - 2021-06-07
### Changed
- Added `on_list_checkpoint_fn` to execute user callback when listing updated.
## [1.1.2] - 2021-05-04
### Changed
- Updated styling on checkpoint widget
## [1.1.1] - 2021-04-08
### Changed
- Right click on any column of a checkpoint entry now brings up the "Restore Checkpoint" context menu.
## [1.1.0] - 2021-03-25
### Added
- Added support `add_on_selection_changed_fn` to checkpoint widget.
- Added `CheckpointCombobox` widget for easy selection of checkpoint as a combobox.
## [1.0.0] - 2021-02-01
### Added
- Initial version.
| 1,537 | Markdown | 22.30303 | 102 | 0.683149 |
omniverse-code/kit/exts/omni.kit.widget.versioning/docs/README.md | # omni.kit.widget.versioning
## Introduction
This extension provides versioning widgets.
| 92 | Markdown | 12.285713 | 43 | 0.793478 |
omniverse-code/kit/exts/omni.kit.widget.versioning/docs/index.rst | omni.kit.widget.versioning: Versioning Widgets Extension
#########################################################
.. toctree::
:maxdepth: 1
CHANGELOG
Versioning Widgets
==========================
.. automodule:: omni.kit.widget.versioning
:platform: Windows-x86_64, Linux-x86_64
:members:
:undoc-members:
:show-inheritance:
| 350 | reStructuredText | 20.937499 | 57 | 0.537143 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/Sdf/__init__.py | __copyright__ = "Copyright (c) 2020-2021, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import omni.core
from ._Sdf import *
| 494 | Python | 37.07692 | 83 | 0.795547 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/Sdf/_Sdf.pyi | from __future__ import annotations
import usdrt.Sdf._Sdf
import typing
__all__ = [
"AncestorsRange",
"AssetPath",
"Path",
"ValueTypeName",
"ValueTypeNames"
]
class AncestorsRange():
def GetPath(self) -> Path: ...
def __init__(self, arg0: Path) -> None: ...
def __iter__(self) -> typing.Iterator: ...
pass
class AssetPath():
def __eq__(self, arg0: AssetPath) -> bool: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, path: str) -> None: ...
@typing.overload
def __init__(self, path: str, resolvedPath: str) -> None: ...
def __ne__(self, arg0: AssetPath) -> bool: ...
def __repr__(self) -> str: ...
def __str__(self) -> str: ...
@property
def path(self) -> str:
"""
:type: str
"""
@property
def resolvedPath(self) -> str:
"""
:type: str
"""
__hash__ = None
pass
class Path():
def AppendChild(self, childName: TfToken) -> Path: ...
def AppendPath(self, newSuffix: Path) -> Path: ...
def AppendProperty(self, propName: TfToken) -> Path: ...
def ContainsPropertyElements(self) -> bool: ...
def GetAbsoluteRootOrPrimPath(self) -> Path: ...
@staticmethod
def GetAncestorsRange(*args, **kwargs) -> typing.Any: ...
def GetCommonPrefix(self, path: Path) -> Path: ...
def GetNameToken(self) -> TfToken: ...
def GetParentPath(self) -> Path: ...
def GetPrefixes(self) -> typing.List[Path]: ...
def GetPrimPath(self) -> Path: ...
def GetString(self) -> str: ...
def GetText(self) -> str: ...
def GetToken(self) -> TfToken: ...
def HasPrefix(self, arg0: Path) -> bool: ...
def IsAbsolutePath(self) -> bool: ...
def IsAbsoluteRootOrPrimPath(self) -> bool: ...
def IsAbsoluteRootPath(self) -> bool: ...
def IsEmpty(self) -> bool: ...
def IsNamespacedPropertyPath(self) -> bool: ...
def IsPrimPath(self) -> bool: ...
def IsPrimPropertyPath(self) -> bool: ...
def IsPropertyPath(self) -> bool: ...
def IsRootPrimPath(self) -> bool: ...
def RemoveCommonSuffix(self, otherPath: Path, stopAtRootPrim: bool = False) -> typing.Tuple[Path, Path]: ...
def ReplaceName(self, newName: TfToken) -> Path: ...
def ReplacePrefix(self, oldPrefix: Path, newPrefix: Path, fixTargetPaths: bool = True) -> Path: ...
def __eq__(self, arg0: Path) -> bool: ...
def __hash__(self) -> int: ...
@typing.overload
def __init__(self, arg0: str) -> None: ...
@typing.overload
def __init__(self, arg0: Path) -> None: ...
@typing.overload
def __init__(self) -> None: ...
def __lt__(self, arg0: Path) -> bool: ...
def __ne__(self, arg0: Path) -> bool: ...
def __repr__(self) -> str: ...
def __str__(self) -> str: ...
@property
def isEmpty(self) -> bool:
"""
:type: bool
"""
@property
def name(self) -> str:
"""
:type: str
"""
@property
def pathElementCount(self) -> int:
"""
:type: int
"""
@property
def pathString(self) -> str:
"""
:type: str
"""
absoluteRootPath: usdrt.Sdf._Sdf.Path # value = Sdf.Path('/')
emptyPath: usdrt.Sdf._Sdf.Path # value = Sdf.Path('')
pass
class ValueTypeName():
def GetAsString(self) -> str: ...
def GetAsToken(self) -> TfToken: ...
@staticmethod
def GetAsTypeC(*args, **kwargs) -> typing.Any: ...
def __eq__(self, arg0: ValueTypeName) -> bool: ...
def __init__(self) -> None: ...
def __ne__(self, arg0: ValueTypeName) -> bool: ...
def __repr__(self) -> str: ...
@property
def arrayType(self) -> ValueTypeName:
"""
:type: ValueTypeName
"""
@property
def isArray(self) -> bool:
"""
:type: bool
"""
@property
def isScalar(self) -> bool:
"""
:type: bool
"""
@property
def scalarType(self) -> ValueTypeName:
"""
:type: ValueTypeName
"""
__hash__ = None
pass
class ValueTypeNames():
AncestorPrimTypeTag: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('tag (ancestorPrimTypeName)')
AppliedSchemaTypeTag: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('tag (appliedSchema)')
Asset: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('asset')
AssetArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('asset[]')
Bool: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('bool')
BoolArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('bool[]')
Color3d: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double3 (color)')
Color3dArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double3[] (color)')
Color3f: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('float3 (color)')
Color3fArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('float3[] (color)')
Color3h: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('half3 (color)')
Color3hArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('half3[] (color)')
Color4d: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double4 (color)')
Color4dArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double4[] (color)')
Color4f: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('float4 (color)')
Color4fArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('float4[] (color)')
Color4h: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('half4 (color)')
Color4hArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('half4[] (color)')
Double: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double')
Double2: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double2')
Double2Array: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double2[]')
Double3: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double3')
Double3Array: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double3[]')
Double4: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double4')
Double4Array: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double4[]')
DoubleArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double[]')
Float: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('float')
Float2: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('float2')
Float2Array: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('float2[]')
Float3: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('float3')
Float3Array: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('float3[]')
Float4: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('float4')
Float4Array: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('float4[]')
FloatArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('float[]')
Frame4d: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double16 (frame)')
Frame4dArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double16[] (frame)')
Half: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('half')
Half2: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('half2')
Half2Array: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('half2[]')
Half3: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('half3')
Half3Array: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('half3[]')
Half4: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('half4')
Half4Array: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('half4[]')
HalfArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('half[]')
Int: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('int')
Int2: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('int2')
Int2Array: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('int2[]')
Int3: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('int3')
Int3Array: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('int3[]')
Int4: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('int4')
Int4Array: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('int4[]')
Int64: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('int64')
Int64Array: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('int64[]')
IntArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('int[]')
Matrix2d: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double4 (matrix)')
Matrix2dArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double4[] (matrix)')
Matrix3d: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double9 (matrix)')
Matrix3dArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double9[] (matrix)')
Matrix4d: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double16 (matrix)')
Matrix4dArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double16[] (matrix)')
Normal3d: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double3 (normal)')
Normal3dArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double3[] (normal)')
Normal3f: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('float3 (normal)')
Normal3fArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('float3[] (normal)')
Normal3h: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('half3 (normal)')
Normal3hArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('half3[] (normal)')
Point3d: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double3 (position)')
Point3dArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double3[] (position)')
Point3f: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('float3 (position)')
Point3fArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('float3[] (position)')
Point3h: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('half3 (position)')
Point3hArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('half3[] (position)')
PrimTypeTag: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('tag (primTypeName)')
Quatd: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double4 (quaternion)')
QuatdArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double4[] (quaternion)')
Quatf: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('float4 (quaternion)')
QuatfArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('float4[] (quaternion)')
Quath: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('half4 (quaternion)')
QuathArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('half4[] (quaternion)')
Range3d: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double6')
String: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('uchar[] (text)')
StringArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('uchar[][] (text)')
Tag: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('tag')
TexCoord2d: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double2 (texCoord)')
TexCoord2dArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double2[] (texCoord)')
TexCoord2f: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('float2 (texCoord)')
TexCoord2fArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('float2[] (texCoord)')
TexCoord2h: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('half2 (texCoord)')
TexCoord2hArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('half2[] (texCoord)')
TexCoord3d: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double3 (texCoord)')
TexCoord3dArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double3[] (texCoord)')
TexCoord3f: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('float3 (texCoord)')
TexCoord3fArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('float3[] (texCoord)')
TexCoord3h: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('half3 (texCoord)')
TexCoord3hArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('half3[] (texCoord)')
TimeCode: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double (timecode)')
TimeCodeArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double[] (timecode)')
Token: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('token')
TokenArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('token[]')
UChar: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('uchar')
UCharArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('uchar[]')
UInt: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('uint')
UInt64: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('uint64')
UInt64Array: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('uint64[]')
UIntArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('uint[]')
Vector3d: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double3 (vector)')
Vector3dArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('double3[] (vector)')
Vector3f: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('float3 (vector)')
Vector3fArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('float3[] (vector)')
Vector3h: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('half3 (vector)')
Vector3hArray: usdrt.Sdf._Sdf.ValueTypeName # value = Sdf.ValueTypeName('half3[] (vector)')
pass
| 13,961 | unknown | 54.848 | 112 | 0.667359 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/scenegraph/tests/testGfRect.py | #!/pxrpythonsubst
#
# Copyright 2016 Pixar
#
# Licensed under the Apache License, Version 2.0 (the "Apache License")
# with the following modification; you may not use this file except in
# compliance with the Apache License and the following modification to it:
# Section 6. Trademarks. is deleted and replaced with:
#
# 6. Trademarks. This License does not grant permission to use the trade
# names, trademarks, service marks, or product names of the Licensor
# and its affiliates, except as required to comply with Section 4(c) of
# the License and to reproduce the content of the NOTICE file.
#
# You may obtain a copy of the Apache License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Apache License with the above modification is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the Apache License for the specific
# language governing permissions and limitations under the Apache License.
#
# Note: This is just pulled directly from USD and modified.
# https://github.com/PixarAnimationStudios/USD/blob/release/pxr/base/gf/testenv/testGfRect2i.py
from __future__ import division
import math
import sys
import unittest
def setUpModule():
# pre-load USD before anything else to prevent crash
# from weird carb conflict
# FIXME ^^^
try:
from . import update_path_and_load_usd
update_path_and_load_usd()
except ImportError:
# not needed in Kit
pass
try:
import omni.kit.test
TestClass = omni.kit.test.AsyncTestCase
except ImportError:
TestClass = unittest.TestCase
from usdrt import Gf
class TestGfRect2i(TestClass):
def test_Constructor(self):
self.assertIsInstance(Gf.Rect2i(), Gf.Rect2i)
self.assertIsInstance(Gf.Rect2i(Gf.Vec2i(), Gf.Vec2i()), Gf.Rect2i)
self.assertIsInstance(Gf.Rect2i(Gf.Vec2i(), 1, 1), Gf.Rect2i)
self.assertTrue(Gf.Rect2i().IsNull())
self.assertTrue(Gf.Rect2i().IsEmpty())
self.assertFalse(Gf.Rect2i().IsValid())
# further test of above.
r = Gf.Rect2i(Gf.Vec2i(), Gf.Vec2i(-1, 0))
self.assertTrue(not r.IsNull() and r.IsEmpty())
self.assertEqual(
Gf.Rect2i(Gf.Vec2i(-1, 1), Gf.Vec2i(1, -1)).GetNormalized(), Gf.Rect2i(Gf.Vec2i(-1, -1), Gf.Vec2i(1, 1))
)
def test_Properties(self):
r = Gf.Rect2i()
r.max = Gf.Vec2i()
r.min = Gf.Vec2i(1, 1)
r.GetNormalized()
r.max = Gf.Vec2i(1, 1)
r.min = Gf.Vec2i()
r.GetNormalized()
r.min = Gf.Vec2i(3, 1)
self.assertEqual(r.min, Gf.Vec2i(3, 1))
r.max = Gf.Vec2i(4, 5)
self.assertEqual(r.max, Gf.Vec2i(4, 5))
r.minX = 10
self.assertEqual(r.minX, 10)
r.maxX = 20
self.assertEqual(r.maxX, 20)
r.minY = 30
self.assertEqual(r.minY, 30)
r.maxY = 40
self.assertEqual(r.maxY, 40)
r = Gf.Rect2i(Gf.Vec2i(), Gf.Vec2i(10, 10))
self.assertEqual(r.GetCenter(), Gf.Vec2i(5, 5))
self.assertEqual(r.GetArea(), 121)
self.assertEqual(r.GetHeight(), 11)
self.assertEqual(r.GetWidth(), 11)
self.assertEqual(r.GetSize(), Gf.Vec2i(11, 11))
r.Translate(Gf.Vec2i(10, 10))
self.assertEqual(r, Gf.Rect2i(Gf.Vec2i(10, 10), Gf.Vec2i(20, 20)))
r1 = Gf.Rect2i()
r2 = Gf.Rect2i(Gf.Vec2i(), Gf.Vec2i(1, 1))
r1.GetIntersection(r2)
r2.GetIntersection(r1)
r1.GetIntersection(r1)
r1.GetUnion(r2)
r2.GetUnion(r1)
r1.GetUnion(r1)
r1 = Gf.Rect2i(Gf.Vec2i(0, 0), Gf.Vec2i(10, 10))
r2 = Gf.Rect2i(Gf.Vec2i(5, 5), Gf.Vec2i(15, 15))
self.assertEqual(r1.GetIntersection(r2), Gf.Rect2i(Gf.Vec2i(5, 5), Gf.Vec2i(10, 10)))
self.assertEqual(r1.GetUnion(r2), Gf.Rect2i(Gf.Vec2i(0, 0), Gf.Vec2i(15, 15)))
tmp = Gf.Rect2i(r1)
tmp += r2
self.assertEqual(tmp, Gf.Rect2i(Gf.Vec2i(0, 0), Gf.Vec2i(15, 15)))
self.assertTrue(r1.Contains(Gf.Vec2i(3, 3)) and not r1.Contains(Gf.Vec2i(11, 11)))
self.assertEqual(r1, Gf.Rect2i(Gf.Vec2i(0, 0), Gf.Vec2i(10, 10)))
self.assertTrue(r1 != r2)
self.assertEqual(r1, eval(repr(r1)))
self.assertTrue(len(str(Gf.Rect2i())))
def test_string_representation(self):
"""Test __str__ to ensure debug output is consistent across usd and usdrt"""
from usdrt import Gf
from pxr import Gf as PxrGf
r = Gf.Rect2i(Gf.Vec2i(0, 0), Gf.Vec2i(10, 10))
r_pxr = PxrGf.Rect2i(PxrGf.Vec2i(0, 0), PxrGf.Vec2i(10, 10))
self.assertEqual(str(r), str(r_pxr))
if __name__ == "__main__":
unittest.main()
| 4,840 | Python | 30.032051 | 116 | 0.629752 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/scenegraph/tests/test_examples.py | __copyright__ = "Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import os
import pathlib
import platform
import sys
import time
import unittest
from . import tc_logger
def setUpModule():
# pre-load USD before anything else to prevent crash
# from weird carb conflict
# FIXME ^^^
try:
from . import update_path_and_load_usd
update_path_and_load_usd()
except ImportError:
# not needed in Kit
pass
try:
import omni.kit.test
TestClass = omni.kit.test.AsyncTestCase
TEST_DIR = str(pathlib.Path(__file__).parent.parent.parent.parent)
except ImportError:
from . import TestRtScenegraph
TestClass = TestRtScenegraph
TEST_DIR = "."
class TestDocExamples(TestClass):
@tc_logger
def test_usdrt_one_property(self):
from usdrt import Gf, Sdf, Usd, UsdGeom, Vt
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
# Begin example one property RT
from usdrt import Gf, Sdf, Usd, UsdGeom, Vt
path = "/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"
prim = stage.GetPrimAtPath(path)
attr = prim.GetAttribute(UsdGeom.Tokens.primvarsDisplayColor)
# Get the value of displayColor on White_Wall_Back,
# which is mid-gray on this stage
result = attr.Get()
self.assertEqual(len(result), 1)
self.assertEqual(result[0], Gf.Vec3f(0.5, 0.5, 0.5))
# Set the value of displayColor to red,
# and verify the change by getting the value
attr.Set(Vt.Vec3fArray([Gf.Vec3f(1, 0, 0)]))
result = attr.Get()
self.assertEqual(len(result), 1)
self.assertEqual(result[0], Gf.Vec3f(1, 0, 0))
# End example one property RT
@tc_logger
def test_usd_one_property(self):
from pxr import Gf, Sdf, Usd, UsdUtils, Vt
# FIXME - Fabric is holding notices to a stage in the cache
# and gets hung here if the cache isn't cleared first - How?
UsdUtils.StageCache.Get().Clear()
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
# Begin example one property USD
from pxr import Gf, Sdf, Usd, Vt
path = "/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"
prim = stage.GetPrimAtPath(path)
attr = prim.GetAttribute("primvars:displayColor")
# Get the value of displayColor on White_Wall_Back,
# which is mid-gray on this stage
result = attr.Get()
self.assertEqual(len(result), 1)
self.assertEqual(result[0], Gf.Vec3f(0.5, 0.5, 0.5))
# Set the value of displayColor to red,
# and verify the change by getting the value
attr.Set(Vt.Vec3fArray([Gf.Vec3f(1, 0, 0)]))
result = attr.Get()
self.assertEqual(len(result), 1)
self.assertEqual(result[0], Gf.Vec3f(1, 0, 0))
# End example one property USD
@tc_logger
def test_usdrt_many_property(self):
from usdrt import Gf, Sdf, Usd, UsdGeom, Vt
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
# Begin example many prims RT
from usdrt import Gf, Sdf, Usd, UsdGeom, Vt
red = Vt.Vec3fArray([Gf.Vec3f(1, 0, 0)])
meshPaths = stage.GetPrimsWithTypeName("Mesh")
for meshPath in meshPaths:
prim = stage.GetPrimAtPath(meshPath)
if prim.HasAttribute(UsdGeom.Tokens.primvarsDisplayColor):
prim.GetAttribute(UsdGeom.Tokens.primvarsDisplayColor).Set(red)
# End example many prims RT
@tc_logger
def test_usdrt_abstract_schema_query(self):
from usdrt import Gf, Sdf, Usd, UsdGeom, Vt
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
# Begin example abstract query
from usdrt import Gf, Sdf, Usd, UsdGeom
gPrimPaths = stage.GetPrimsWithTypeName("Gprim")
attr = UsdGeom.Tokens.doubleSided
doubleSided = []
for gPrimPath in gPrimPaths:
prim = stage.GetPrimAtPath(gPrimPath)
if prim.HasAttribute(attr) and prim.GetAttribute(attr).Get():
doubleSided.append(prim)
@tc_logger
def test_usd_many_property(self):
from pxr import Gf, Sdf, Usd, UsdUtils
# FIXME - Fabric is holding notices to a stage in the cache
# and gets hung here if the cache isn't cleared first - How?
UsdUtils.StageCache.Get().Clear()
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
# Begin example many prims USD
from pxr import Gf, Usd, UsdGeom, Vt
red = Vt.Vec3fArray([Gf.Vec3f(1, 0, 0)])
for prim in stage.Traverse():
if prim.GetTypeName() == "Mesh":
prim.GetAttribute(UsdGeom.Tokens.primvarsDisplayColor).Set(red)
# End example many prims USD
@tc_logger
def test_usdrt_one_relationship(self):
from usdrt import Gf, Sdf, Usd, UsdShade
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
# Begin example relationship RT
from usdrt import Gf, Sdf, Usd, UsdGeom
path = "/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall/Green1SG"
prim = stage.GetPrimAtPath(path)
rel = prim.GetRelationship(UsdShade.Tokens.materialBinding)
# The currently bound Material prim, and a new
# Material prim to bind
old_mtl = "/Cornell_Box/Root/Looks/Green1SG"
new_mtl = "/Cornell_Box/Root/Looks/Red1SG"
# Get the first target
self.assertTrue(rel.HasAuthoredTargets())
mtl_path = rel.GetTargets()[0]
self.assertEqual(mtl_path, old_mtl)
# Update the relationship to target a different material
rel.SetTargets([new_mtl])
updated_path = rel.GetTargets()[0]
self.assertEqual(updated_path, new_mtl)
# End example relationship RT
@tc_logger
def test_usd_one_relationship(self):
from pxr import Gf, Sdf, Usd, UsdUtils, Vt
# FIXME - Fabric is holding notices to a stage in the cache
# and gets hung here if the cache isn't cleared first - How?
UsdUtils.StageCache.Get().Clear()
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
# Begin example relationship USD
from pxr import Gf, Sdf, Usd
path = "/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall/Green1SG"
prim = stage.GetPrimAtPath(path)
rel = prim.GetRelationship("material:binding")
# The currently bound Material prim, and a new
# Material prim to bind
old_mtl = "/Cornell_Box/Root/Looks/Green1SG"
new_mtl = "/Cornell_Box/Root/Looks/Red1SG"
# Get the first target
self.assertTrue(rel.HasAuthoredTargets())
mtl_path = rel.GetTargets()[0]
self.assertEqual(mtl_path, old_mtl)
# Update the relationship to target a different material
rel.SetTargets([new_mtl])
updated_path = rel.GetTargets()[0]
self.assertEqual(updated_path, new_mtl)
# End example relationship USD
@tc_logger
def test_usd_usdrt_interop(self):
if True:
# FIXME - crash on Linux here on TC why?
return
from pxr import UsdUtils
# Paranoia - see above test
UsdUtils.StageCache.Get().Clear()
# Begin example interop
from pxr import Sdf, Usd, UsdUtils
from usdrt import Usd as RtUsd
usd_stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
usd_stage_id = UsdUtils.StageCache.Get().Insert(usd_stage)
stage = RtUsd.Stage.Attach(usd_stage_id.ToLongInt())
mesh_paths = stage.GetPrimsWithTypeName("Mesh")
for mesh_path in mesh_paths:
# strings can be implicitly converted to SdfPath in Python
usd_prim = usd_stage.GetPrimAtPath(str(mesh_path))
if usd_prim.HasVariantSets():
print(f"Found Mesh with variantSet: {mesh_path}")
# End example interop
@tc_logger
def test_vt_array_gpu(self):
if platform.processor() == "aarch64":
return
import weakref
try:
import warp as wp
except ImportError:
if TestClass is omni.kit.test.AsyncTestCase:
# warp not available for testing in kit at this time
return
raise
# Begin example GPU
import numpy as np
import warp as wp
from usdrt import Gf, Sdf, Usd, Vt
def warp_array_from_cuda_array_interface(a):
cai = a.__cuda_array_interface__
return wp.types.array(
dtype=wp.vec3,
length=cai["shape"][0],
capacity=cai["shape"][0] * wp.types.type_size_in_bytes(wp.vec3),
ptr=cai["data"][0],
device="cuda",
owner=False,
requires_grad=False,
)
stage = Usd.Stage.CreateInMemory("test.usda")
prim = stage.DefinePrim(Sdf.Path("/prim"))
attr = prim.CreateAttribute("points", Sdf.ValueTypeNames.Point3fArray, True)
# First create a warp array from numpy
points = np.zeros(shape=(1024, 3), dtype=np.float32)
for i in range(1024):
for j in range(3):
points[i][j] = i * 3 + j
warp_points = wp.array(points, device="cpu")
with wp.ScopedCudaGuard():
gpu_warp_points = warp_points.to("cuda")
warp_ref = weakref.ref(gpu_warp_points)
# Create a VtArray from a warp array
vt_points = Vt.Vec3fArray(gpu_warp_points)
# Set the Fabric attribute which will make a CUDA copy
# from warp to Fabric
attr.Set(vt_points)
wp.synchronize()
# Retrieve a new Fabric VtArray from USDRT
new_vt_points = attr.Get()
self.assertTrue(new_vt_points.HasFabricGpuData())
# Create a warp array from the VtArray
new_warp_points = warp_array_from_cuda_array_interface(new_vt_points)
# Delete the fabric VtArray to ensure the data was
# really copied into warp
del new_vt_points
# Convert warp points back to numpy
new_points = new_warp_points.numpy()
# Now compare the round-trip through USDRT and GPU was a success
self.assertEqual(points.shape, new_points.shape)
for i in range(1024):
for j in range(3):
self.assertEqual(points[i][j], new_points[i][j])
# End example GPU
| 11,265 | Python | 30.915014 | 84 | 0.613848 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/scenegraph/tests/test_path.py | __copyright__ = "Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
# Copyright 2017 Pixar
#
# Licensed under the Apache License, Version 2.0 (the "Apache License")
# with the following modification; you may not use this file except in
# compliance with the Apache License and the following modification to it:
# Section 6. Trademarks. is deleted and replaced with:
#
# 6. Trademarks. This License does not grant permission to use the trade
# names, trademarks, service marks, or product names of the Licensor
# and its affiliates, except as required to comply with Section 4(c) of
# the License and to reproduce the content of the NOTICE file.
#
# You may obtain a copy of the Apache License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Apache License with the above modification is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the Apache License for the specific
# language governing permissions and limitations under the Apache License.
import os
import pathlib
import platform
import sys
import time
import unittest
from . import tc_logger
def setUpModule():
# pre-load USD before anything else to prevent crash
# from weird carb conflict
# FIXME ^^^
try:
from . import update_path_and_load_usd
update_path_and_load_usd()
except ImportError:
# not needed in Kit
pass
try:
import omni.kit.test
TestClass = omni.kit.test.AsyncTestCase
TEST_DIR = str(pathlib.Path(__file__).parent.parent.parent.parent)
except ImportError:
from . import TestRtScenegraph
TestClass = TestRtScenegraph
TEST_DIR = "."
def get_path_parts():
from usdrt import Sdf
parts = [
Sdf.Path("/Cornell_Box"),
Sdf.Path("/Cornell_Box/Root"),
Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP"),
Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall"),
Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall/Green1SG"),
Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall/Green1SG.indices"),
]
return parts
class TestSdfPath(TestClass):
@tc_logger
def test_get_prefixes(self):
from usdrt import Sdf
path = Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall/Green1SG.indices")
expected = get_path_parts()
prefixes = path.GetPrefixes()
self.assertEqual(prefixes, expected)
@tc_logger
def test_repr_representation(self):
from usdrt import Sdf
path = Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall/Green1SG.indices")
expected = "Sdf.Path('/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall/Green1SG.indices')"
self.assertEqual(repr(path), expected)
@tc_logger
def test_str_representation(self):
from usdrt import Sdf
path = Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall/Green1SG.indices")
expected = "/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall/Green1SG.indices"
self.assertEqual(str(path), expected)
@tc_logger
def test_implicit_string_conversion(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box"))
self.assertTrue(prim)
primFromString = stage.GetPrimAtPath("/Cornell_Box")
self.assertTrue(primFromString)
@tc_logger
def test_get_string(self):
from usdrt import Sdf
path = Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall/Green1SG.indices")
expected = "/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall/Green1SG.indices"
self.assertEqual(path.GetString(), expected)
self.assertEqual(path.pathString, expected)
@tc_logger
def test_get_text(self):
from usdrt import Sdf
path = Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall/Green1SG.indices")
expected = "/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall/Green1SG.indices"
self.assertEqual(path.GetText(), expected)
@tc_logger
def test_get_name_token(self):
from usdrt import Sdf
self.assertEqual(Sdf.Path("/foo/bar/baz").name, "baz")
self.assertEqual(Sdf.Path("/foo").name, "foo")
self.assertEqual(Sdf.Path.emptyPath.name, "")
self.assertEqual(Sdf.Path("/foo/bar/baz.prop").name, "prop")
self.assertEqual(Sdf.Path("/foo/bar/baz.prop:argle:bargle").name, "prop:argle:bargle")
self.assertEqual(Sdf.Path("foo/bar/baz").name, "baz")
self.assertEqual(Sdf.Path("foo").name, "foo")
self.assertEqual(Sdf.Path("foo/bar/baz.prop").name, "prop")
self.assertEqual(Sdf.Path("foo/bar/baz.prop:argle:bargle").name, "prop:argle:bargle")
@tc_logger
def test_get_prim_path(self):
from usdrt import Sdf, Usd
path = Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall/Green1SG.indices")
expected = Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall/Green1SG")
self.assertEqual(path.GetPrimPath(), expected)
@tc_logger
def test_path_element_count(self):
from usdrt import Sdf
self.assertEqual(Sdf.Path("/").pathElementCount, 0)
self.assertEqual(Sdf.Path("/abc").pathElementCount, 1)
self.assertEqual(Sdf.Path("/abc/xyz").pathElementCount, 2)
@tc_logger
def test_get_name(self):
from usdrt import Sdf
self.assertEqual(Sdf.Path("/foo/bar/baz").name, "baz")
self.assertEqual(Sdf.Path("/foo").name, "foo")
self.assertEqual(Sdf.Path.emptyPath.name, "")
self.assertEqual(Sdf.Path("/foo/bar/baz.prop").name, "prop")
self.assertEqual(Sdf.Path("/foo/bar/baz.prop:argle:bargle").name, "prop:argle:bargle")
self.assertEqual(Sdf.Path("foo/bar/baz").name, "baz")
self.assertEqual(Sdf.Path("foo").name, "foo")
self.assertEqual(Sdf.Path("foo/bar/baz.prop").name, "prop")
self.assertEqual(Sdf.Path("foo/bar/baz.prop:argle:bargle").name, "prop:argle:bargle")
@tc_logger
def test_path_queries(self):
from usdrt import Sdf
absRoot = Sdf.Path("/")
absolute = Sdf.Path("/absolute/path/test")
relative = Sdf.Path("../relative/path/test")
prim = Sdf.Path("/this/is/a/prim/path")
rootPrim = Sdf.Path("/root")
propPath = Sdf.Path("/this/path/has.propPart")
namespaceProp = Sdf.Path("/this/path/has.namespaced(self):propPart")
self.assertTrue(absolute.IsAbsolutePath())
self.assertFalse(relative.IsAbsolutePath())
self.assertTrue(absRoot.IsAbsoluteRootPath())
self.assertFalse(absolute.IsAbsoluteRootPath())
self.assertFalse(Sdf.Path.emptyPath.IsAbsoluteRootPath())
self.assertTrue(prim.IsPrimPath())
self.assertFalse(propPath.IsPrimPath())
self.assertFalse(Sdf.Path.emptyPath.IsPrimPath())
self.assertTrue(absolute.IsAbsoluteRootOrPrimPath())
self.assertTrue(prim.IsAbsoluteRootOrPrimPath())
self.assertFalse(relative.IsAbsoluteRootOrPrimPath())
self.assertFalse(propPath.IsAbsoluteRootOrPrimPath())
self.assertFalse(Sdf.Path.emptyPath.IsAbsoluteRootOrPrimPath())
self.assertTrue(rootPrim.IsRootPrimPath())
self.assertFalse(prim.IsRootPrimPath())
self.assertFalse(Sdf.Path.emptyPath.IsRootPrimPath())
self.assertTrue(propPath.IsPropertyPath())
self.assertFalse(prim.IsPropertyPath())
self.assertFalse(Sdf.Path.emptyPath.IsPropertyPath())
self.assertTrue(propPath.IsPrimPropertyPath())
self.assertFalse(prim.IsPrimPropertyPath())
self.assertFalse(Sdf.Path.emptyPath.IsPrimPropertyPath())
self.assertTrue(namespaceProp.IsNamespacedPropertyPath())
self.assertFalse(propPath.IsNamespacedPropertyPath())
self.assertFalse(prim.IsNamespacedPropertyPath())
self.assertFalse(Sdf.Path.emptyPath.IsNamespacedPropertyPath())
self.assertTrue(Sdf.Path.emptyPath.IsEmpty())
self.assertFalse(propPath.IsEmpty())
self.assertFalse(prim.IsEmpty())
@tc_logger
def test_operators(self):
from usdrt import Sdf
# Test lessthan
self.assertTrue(Sdf.Path("aaa") < Sdf.Path("aab"))
self.assertTrue(not Sdf.Path("aaa") < Sdf.Path())
self.assertTrue(Sdf.Path("/") < Sdf.Path("/a"))
# string conversion
self.assertEqual(Sdf.Path("foo"), "foo")
self.assertEqual("foo", Sdf.Path("foo"))
self.assertNotEqual(Sdf.Path("foo"), "bar")
self.assertNotEqual("bar", Sdf.Path("foo"))
@tc_logger
def test_contains_property_elements(self):
from usdrt import Sdf
path = Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall/Green1SG.indices")
self.assertTrue(path.ContainsPropertyElements())
path = Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall/Green1SG")
self.assertFalse(path.ContainsPropertyElements())
@tc_logger
def test_get_parent_path(self):
from usdrt import Sdf
self.assertEqual(Sdf.Path("/foo/bar/baz").GetParentPath(), Sdf.Path("/foo/bar"))
self.assertEqual(Sdf.Path("/foo").GetParentPath(), Sdf.Path("/"))
self.assertEqual(Sdf.Path.emptyPath.GetParentPath(), Sdf.Path.emptyPath)
self.assertEqual(Sdf.Path("/foo/bar/baz.prop").GetParentPath(), Sdf.Path("/foo/bar/baz"))
self.assertEqual(Sdf.Path("foo/bar/baz").GetParentPath(), Sdf.Path("foo/bar"))
# self.assertEqual(Sdf.Path("foo").GetParentPath(), Sdf.Path("."))
self.assertEqual(Sdf.Path("foo/bar/baz.prop").GetParentPath(), Sdf.Path("foo/bar/baz"))
@tc_logger
def test_get_prim_path(self):
from usdrt import Sdf
primPath = Sdf.Path("/A/B/C").GetPrimPath()
self.assertEqual(primPath, Sdf.Path("/A/B/C"))
primPath = Sdf.Path("/A/B/C.foo").GetPrimPath()
self.assertEqual(primPath, Sdf.Path("/A/B/C"))
primPath = Sdf.Path("/A/B/C.foo:bar:baz").GetPrimPath()
self.assertEqual(primPath, Sdf.Path("/A/B/C"))
@tc_logger
def test_get_absolute_root_or_prim_path(self):
from usdrt import Sdf
self.assertTrue(Sdf.Path.absoluteRootPath, Sdf.Path("/"))
@tc_logger
def test_append_path(self):
from usdrt import Sdf
# append to empty path -> empty path
# with self.assertRaises(Tf.ErrorException):
# Sdf.Path().AppendPath( Sdf.Path() )
# with self.assertRaises(Tf.ErrorException):
# Sdf.Path().AppendPath( Sdf.Path('A') )
# append to root/prim path
self.assertEqual(Sdf.Path("/").AppendPath(Sdf.Path("A")), Sdf.Path("/A"))
self.assertEqual(Sdf.Path("/A").AppendPath(Sdf.Path("B")), Sdf.Path("/A/B"))
# append empty to root/prim path -> no change
# with self.assertRaises(Tf.ErrorException):
# Sdf.Path('/').AppendPath( Sdf.Path() )
# with self.assertRaises(Tf.ErrorException):
# Sdf.Path('/A').AppendPath( Sdf.Path() )
@tc_logger
def test_append_child(self):
from usdrt import Sdf
aPath = Sdf.Path("/foo")
self.assertEqual(aPath.AppendChild("bar"), Sdf.Path("/foo/bar"))
aPath = Sdf.Path("foo")
self.assertEqual(aPath.AppendChild("bar"), Sdf.Path("foo/bar"))
aPath = Sdf.Path("/foo.prop")
self.assertEqual(aPath.AppendChild("bar"), Sdf.Path.emptyPath)
@tc_logger
def test_append_property(self):
from usdrt import Sdf
aPath = Sdf.Path("/foo")
self.assertEqual(aPath.AppendProperty("prop"), Sdf.Path("/foo.prop"))
self.assertEqual(aPath.AppendProperty("prop:foo:bar"), Sdf.Path("/foo.prop:foo:bar"))
aPath = Sdf.Path("/foo.prop")
self.assertEqual(aPath.AppendProperty("prop2"), Sdf.Path.emptyPath)
self.assertEqual(aPath.AppendProperty("prop2:foo:bar"), Sdf.Path.emptyPath)
@tc_logger
def test_replace_prefix(self):
from usdrt import Sdf
# Test HasPrefix
self.assertFalse(Sdf.Path.emptyPath.HasPrefix("A"))
self.assertFalse(Sdf.Path("A").HasPrefix(Sdf.Path.emptyPath))
aPath = Sdf.Path("/Chars/Buzz_1/LArm.FB")
self.assertEqual(aPath.HasPrefix("/Chars/Buzz_1"), True)
self.assertEqual(aPath.HasPrefix("Buzz_1"), False)
# Replace aPath's prefix and get a new path
bPath = aPath.ReplacePrefix("/Chars/Buzz_1", "/Chars/Buzz_2")
self.assertEqual(bPath, Sdf.Path("/Chars/Buzz_2/LArm.FB"))
# Specify a bogus prefix to replace and get an empty path
cPath = bPath.ReplacePrefix("/BadPrefix/Buzz_2", "/ReleasedChars/Buzz_2")
self.assertEqual(cPath, bPath)
# ReplacePrefix with an empty old or new prefix returns an empty path.
self.assertEqual(Sdf.Path("/A/B").ReplacePrefix(Sdf.Path.emptyPath, "/C"), Sdf.Path.emptyPath)
self.assertEqual(Sdf.Path("/A/B").ReplacePrefix("/A", Sdf.Path.emptyPath), Sdf.Path.emptyPath)
self.assertEqual(Sdf.Path.emptyPath.ReplacePrefix(Sdf.Path.emptyPath, "/C"), Sdf.Path.emptyPath)
self.assertEqual(Sdf.Path.emptyPath.ReplacePrefix("/A", Sdf.Path.emptyPath), Sdf.Path.emptyPath)
self.assertEqual(Sdf.Path.emptyPath.ReplacePrefix("/A", "/B"), Sdf.Path.emptyPath)
self.assertEqual(
Sdf.Path("/Cone").ReplacePrefix(Sdf.Path.absoluteRootPath, Sdf.Path("/World")), Sdf.Path("/World/Cone")
)
@tc_logger
def test_get_common_prefix(self):
from usdrt import Sdf
# prefix exists
self.assertEqual(
Sdf.Path("/prefix/is/common/one").GetCommonPrefix(Sdf.Path("/prefix/is/common/two")),
Sdf.Path("/prefix/is/common"),
)
self.assertEqual(
Sdf.Path("/prefix/is/common.one").GetCommonPrefix(Sdf.Path("/prefix/is/common.two")),
Sdf.Path("/prefix/is/common"),
)
self.assertEqual(
Sdf.Path("/prefix/is/common.oneone").GetCommonPrefix(Sdf.Path("/prefix/is/common.one")),
Sdf.Path("/prefix/is/common"),
)
# paths are the same
self.assertEqual(
Sdf.Path("/paths/are/the/same").GetCommonPrefix(Sdf.Path("/paths/are/the/same")),
Sdf.Path("/paths/are/the/same"),
)
# empty path, both parts
self.assertEqual(Sdf.Path.emptyPath.GetCommonPrefix(Sdf.Path("/foo/bar")), Sdf.Path.emptyPath)
self.assertEqual(Sdf.Path("/foo/bar").GetCommonPrefix(Sdf.Path.emptyPath), Sdf.Path.emptyPath)
# no common prefix
self.assertEqual(Sdf.Path("/a/b/c").GetCommonPrefix(Sdf.Path("/d/e/f")), Sdf.Path.absoluteRootPath)
# absolute root path
self.assertEqual(Sdf.Path.GetCommonPrefix(Sdf.Path("/"), Sdf.Path("/World")), Sdf.Path.absoluteRootPath)
# make sure its valid
self.assertEqual(Sdf.Path.GetCommonPrefix(Sdf.Path("/W"), Sdf.Path("/World/Cube")), Sdf.Path.absoluteRootPath)
self.assertEqual(Sdf.Path.GetCommonPrefix(Sdf.Path("/A"), Sdf.Path("/B")), Sdf.Path.absoluteRootPath)
@tc_logger
def test_remove_common_suffix(self):
from usdrt import Sdf
aPath = Sdf.Path("/A/B/C")
bPath = Sdf.Path("/X/Y/Z")
(r1, r2) = aPath.RemoveCommonSuffix(bPath)
self.assertEqual(r1, Sdf.Path("/A/B/C"))
self.assertEqual(r2, Sdf.Path("/X/Y/Z"))
(r1, r2) = aPath.RemoveCommonSuffix(bPath, stopAtRootPrim=True)
self.assertEqual(r1, Sdf.Path("/A/B/C"))
self.assertEqual(r2, Sdf.Path("/X/Y/Z"))
aPath = Sdf.Path("A/B/C")
bPath = Sdf.Path("X/Y/Z")
(r1, r2) = aPath.RemoveCommonSuffix(bPath)
self.assertEqual(r1, Sdf.Path("A/B/C"))
self.assertEqual(r2, Sdf.Path("X/Y/Z"))
(r1, r2) = aPath.RemoveCommonSuffix(bPath, stopAtRootPrim=True)
self.assertEqual(r1, Sdf.Path("A/B/C"))
self.assertEqual(r2, Sdf.Path("X/Y/Z"))
aPath = Sdf.Path("/A/B/C")
bPath = Sdf.Path("/X/Y/C")
(r1, r2) = aPath.RemoveCommonSuffix(bPath)
self.assertEqual(r1, Sdf.Path("/A/B"))
self.assertEqual(r2, Sdf.Path("/X/Y"))
(r1, r2) = aPath.RemoveCommonSuffix(bPath, stopAtRootPrim=True)
self.assertEqual(r1, Sdf.Path("/A/B"))
self.assertEqual(r2, Sdf.Path("/X/Y"))
aPath = Sdf.Path("A/B/C")
bPath = Sdf.Path("X/Y/C")
(r1, r2) = aPath.RemoveCommonSuffix(bPath)
self.assertEqual(r1, Sdf.Path("A/B"))
self.assertEqual(r2, Sdf.Path("X/Y"))
(r1, r2) = aPath.RemoveCommonSuffix(bPath, stopAtRootPrim=True)
self.assertEqual(r1, Sdf.Path("A/B"))
self.assertEqual(r2, Sdf.Path("X/Y"))
aPath = Sdf.Path("A/B/C")
bPath = Sdf.Path("/X/Y/C")
(r1, r2) = aPath.RemoveCommonSuffix(bPath)
self.assertEqual(r1, Sdf.Path("A/B"))
self.assertEqual(r2, Sdf.Path("/X/Y"))
(r1, r2) = aPath.RemoveCommonSuffix(bPath, stopAtRootPrim=True)
self.assertEqual(r1, Sdf.Path("A/B"))
self.assertEqual(r2, Sdf.Path("/X/Y"))
aPath = Sdf.Path("/A/B/C")
bPath = Sdf.Path("/X/B/C")
(r1, r2) = aPath.RemoveCommonSuffix(bPath)
self.assertEqual(r1, Sdf.Path("/A"))
self.assertEqual(r2, Sdf.Path("/X"))
(r1, r2) = aPath.RemoveCommonSuffix(bPath, stopAtRootPrim=True)
self.assertEqual(r1, Sdf.Path("/A"))
self.assertEqual(r2, Sdf.Path("/X"))
aPath = Sdf.Path("A/B/C")
bPath = Sdf.Path("X/B/C")
(r1, r2) = aPath.RemoveCommonSuffix(bPath)
self.assertEqual(r1, Sdf.Path("A"))
self.assertEqual(r2, Sdf.Path("X"))
(r1, r2) = aPath.RemoveCommonSuffix(bPath, stopAtRootPrim=True)
self.assertEqual(r1, Sdf.Path("A"))
self.assertEqual(r2, Sdf.Path("X"))
aPath = Sdf.Path("A/B/C")
bPath = Sdf.Path("/X/B/C")
(r1, r2) = aPath.RemoveCommonSuffix(bPath)
self.assertEqual(r1, Sdf.Path("A"))
self.assertEqual(r2, Sdf.Path("/X"))
(r1, r2) = aPath.RemoveCommonSuffix(bPath, stopAtRootPrim=True)
self.assertEqual(r1, Sdf.Path("A"))
self.assertEqual(r2, Sdf.Path("/X"))
aPath = Sdf.Path("/A/B/C")
bPath = Sdf.Path("/A/B/C")
(r1, r2) = aPath.RemoveCommonSuffix(bPath)
self.assertEqual(r1, Sdf.Path("/"))
self.assertEqual(r2, Sdf.Path("/"))
(r1, r2) = aPath.RemoveCommonSuffix(bPath, stopAtRootPrim=True)
self.assertEqual(r1, Sdf.Path("/A"))
self.assertEqual(r2, Sdf.Path("/A"))
aPath = Sdf.Path("A/B/C")
bPath = Sdf.Path("A/B/C")
# (r1, r2) = aPath.RemoveCommonSuffix(bPath)
# self.assertEqual(r1, Sdf.Path('.'))
# self.assertEqual(r2, Sdf.Path('.'))
(r1, r2) = aPath.RemoveCommonSuffix(bPath, stopAtRootPrim=True)
self.assertEqual(r1, Sdf.Path("A"))
self.assertEqual(r2, Sdf.Path("A"))
aPath = Sdf.Path("A/B/C")
bPath = Sdf.Path("/A/B/C")
# (r1, r2) = aPath.RemoveCommonSuffix(bPath)
# self.assertEqual(r1, Sdf.Path('.'))
# self.assertEqual(r2, Sdf.Path('/'))
(r1, r2) = aPath.RemoveCommonSuffix(bPath, stopAtRootPrim=True)
self.assertEqual(r1, Sdf.Path("A"))
self.assertEqual(r2, Sdf.Path("/A"))
aPath = Sdf.Path("/A/B/C")
bPath = Sdf.Path("/X/C")
(r1, r2) = aPath.RemoveCommonSuffix(bPath)
self.assertEqual(r1, Sdf.Path("/A/B"))
self.assertEqual(r2, Sdf.Path("/X"))
(r1, r2) = aPath.RemoveCommonSuffix(bPath, stopAtRootPrim=True)
self.assertEqual(r1, Sdf.Path("/A/B"))
self.assertEqual(r2, Sdf.Path("/X"))
aPath = Sdf.Path("A/B/C")
bPath = Sdf.Path("X/C")
(r1, r2) = aPath.RemoveCommonSuffix(bPath)
self.assertEqual(r1, Sdf.Path("A/B"))
self.assertEqual(r2, Sdf.Path("X"))
(r1, r2) = aPath.RemoveCommonSuffix(bPath, stopAtRootPrim=True)
self.assertEqual(r1, Sdf.Path("A/B"))
self.assertEqual(r2, Sdf.Path("X"))
aPath = Sdf.Path("/A/B/C")
bPath = Sdf.Path("/B/C")
(r1, r2) = aPath.RemoveCommonSuffix(bPath)
self.assertEqual(r1, Sdf.Path("/A"))
self.assertEqual(r2, Sdf.Path("/"))
(r1, r2) = aPath.RemoveCommonSuffix(bPath, stopAtRootPrim=True)
self.assertEqual(r1, Sdf.Path("/A/B"))
self.assertEqual(r2, Sdf.Path("/B"))
aPath = Sdf.Path("A/B/C")
bPath = Sdf.Path("B/C")
# (r1, r2) = aPath.RemoveCommonSuffix(bPath)
# self.assertEqual(r1, Sdf.Path('A'))
# self.assertEqual(r2, Sdf.Path('.'))
(r1, r2) = aPath.RemoveCommonSuffix(bPath, stopAtRootPrim=True)
self.assertEqual(r1, Sdf.Path("A/B"))
self.assertEqual(r2, Sdf.Path("B"))
aPath = Sdf.Path("/A/B/C")
bPath = Sdf.Path("/C")
(r1, r2) = aPath.RemoveCommonSuffix(bPath)
self.assertEqual(r1, Sdf.Path("/A/B"))
self.assertEqual(r2, Sdf.Path("/"))
(r1, r2) = aPath.RemoveCommonSuffix(bPath, stopAtRootPrim=True)
self.assertEqual(r1, Sdf.Path("/A/B/C"))
self.assertEqual(r2, Sdf.Path("/C"))
aPath = Sdf.Path("A/B/C")
bPath = Sdf.Path("C")
# (r1, r2) = aPath.RemoveCommonSuffix(bPath)
# self.assertEqual(r1, Sdf.Path('A/B'))
# self.assertEqual(r2, Sdf.Path('.'))
(r1, r2) = aPath.RemoveCommonSuffix(bPath, stopAtRootPrim=True)
self.assertEqual(r1, Sdf.Path("A/B/C"))
self.assertEqual(r2, Sdf.Path("C"))
aPath = Sdf.Path("A/B/C")
bPath = Sdf.Path("/C")
(r1, r2) = aPath.RemoveCommonSuffix(bPath)
self.assertEqual(r1, Sdf.Path("A/B"))
self.assertEqual(r2, Sdf.Path("/"))
(r1, r2) = aPath.RemoveCommonSuffix(bPath, stopAtRootPrim=True)
self.assertEqual(r1, Sdf.Path("A/B/C"))
self.assertEqual(r2, Sdf.Path("/C"))
@tc_logger
def test_replace_name(self):
from usdrt import Sdf
self.assertEqual(Sdf.Path("/foo/bar/baz").ReplaceName("foo"), Sdf.Path("/foo/bar/foo"))
self.assertEqual(Sdf.Path("/foo").ReplaceName("bar"), Sdf.Path("/bar"))
self.assertEqual(Sdf.Path("/foo/bar/baz.prop").ReplaceName("attr"), Sdf.Path("/foo/bar/baz.attr"))
self.assertEqual(
Sdf.Path("/foo/bar/baz.prop").ReplaceName("attr:argle:bargle"), Sdf.Path("/foo/bar/baz.attr:argle:bargle")
)
self.assertEqual(Sdf.Path("/foo/bar/baz.prop:argle:bargle").ReplaceName("attr"), Sdf.Path("/foo/bar/baz.attr"))
self.assertEqual(
Sdf.Path("/foo/bar/baz.prop:argle:bargle").ReplaceName("attr:foo:fa:raw"),
Sdf.Path("/foo/bar/baz.attr:foo:fa:raw"),
)
self.assertEqual(Sdf.Path("foo/bar/baz").ReplaceName("foo"), Sdf.Path("foo/bar/foo"))
self.assertEqual(Sdf.Path("foo").ReplaceName("bar"), Sdf.Path("bar"))
self.assertEqual(Sdf.Path("foo/bar/baz.prop").ReplaceName("attr"), Sdf.Path("foo/bar/baz.attr"))
self.assertEqual(
Sdf.Path("foo/bar/baz.prop").ReplaceName("attr:argle:bargle"), Sdf.Path("foo/bar/baz.attr:argle:bargle")
)
# STATIC TESTS
@tc_logger
def test_empty_path(self):
from usdrt import Sdf
self.assertEqual(Sdf.Path.emptyPath, Sdf.Path(""))
self.assertEqual(Sdf.Path.emptyPath, Sdf.Path())
@tc_logger
def test_absolute_root_path(self):
from usdrt import Sdf
self.assertEqual(Sdf.Path.absoluteRootPath, Sdf.Path("/"))
@tc_logger
def test_hashing(self):
from usdrt import Sdf
test_paths = get_path_parts()
d = {}
for i in enumerate(test_paths):
d[i[1]] = i[0]
for i in enumerate(test_paths):
self.assertEqual(d[i[1]], i[0])
class TestSdfPathAncestorsRange(TestClass):
@tc_logger
def test_iterator(self):
from usdrt import Sdf
path = Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall/Green1SG.indices")
expected = get_path_parts()
expected.reverse()
i = 0
for ancestor in path.GetAncestorsRange():
self.assertEqual(ancestor, expected[i])
i += 1
@tc_logger
def test_get_path(self):
from usdrt import Sdf
path = Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall/Green1SG.indices")
expected = get_path_parts()
expected.reverse()
ar = path.GetAncestorsRange()
self.assertEqual(ar.GetPath(), path)
| 25,107 | Python | 37.509202 | 119 | 0.627753 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/scenegraph/tests/test_gf_quat_extras.py | __copyright__ = "Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import copy
import math
import os
import pathlib
import platform
import sys
import time
import unittest
from . import tc_logger
def setUpModule():
# pre-load USD before anything else to prevent crash
# from weird carb conflict
# FIXME ^^^
try:
from . import update_path_and_load_usd
update_path_and_load_usd()
except ImportError:
# not needed in Kit
pass
try:
import omni.kit.test
TestClass = omni.kit.test.AsyncTestCase
TEST_DIR = str(pathlib.Path(__file__).parent.parent.parent.parent)
except ImportError:
from . import TestRtScenegraph
TestClass = TestRtScenegraph
TEST_DIR = "."
def get_quat_info():
"""Return list of tuples of class, scalar size, and format string"""
from usdrt import Gf
quat_info = [
(Gf.Quatd, 8, "d"),
(Gf.Quatf, 4, "f"),
(Gf.Quath, 2, "e"),
]
return quat_info
def get_quat_numpy_types():
import numpy
import usdrt
equivalent_types = {
usdrt.Gf.Quatd: numpy.double,
usdrt.Gf.Quatf: numpy.single,
usdrt.Gf.Quath: numpy.half,
}
return equivalent_types
class TestGfQuatBuffer(TestClass):
"""Test buffer protocol for usdrt.Gf.Quat* classes"""
@tc_logger
def test_buffer_inspect(self):
"""Use memoryview to validate that buffer protocol is implemented"""
quat_info = get_quat_info()
test_values = [9, 8, 7, 1]
for Quat, size, fmt in quat_info:
q = Quat(test_values[3], test_values[0], test_values[1], test_values[2])
view = memoryview(q)
self.assertEquals(view.itemsize, size)
self.assertEquals(view.ndim, 1)
self.assertEquals(view.shape, (4,))
self.assertEquals(view.format, fmt)
self.assertEquals(view.obj, Quat(test_values[3], test_values[0], test_values[1], test_values[2]))
@tc_logger
def test_buffer_init(self):
"""Validate initialization from an array using buffer protocol"""
import array
quat_info = get_quat_info()
test_values = [9, 8, 7, 1]
for Quat, size, fmt in quat_info:
if fmt == "e":
# GfHalf not supported with array.array
continue
test_array = array.array(fmt, test_values)
test_quat = Quat(test_array)
self.assertEquals(test_quat, Quat(test_values[3], test_values[0], test_values[1], test_values[2]))
@tc_logger
def test_buffer_init_from_numpy_type(self):
"""Test initialization from numpy types"""
import numpy
quat_info = get_quat_info()
equivalent_types = get_quat_numpy_types()
test_values = [9, 8, 7, 1]
for Quat, size, fmt in quat_info:
test_numpy_type = numpy.array(test_values, dtype=equivalent_types[Quat])
test_quat = Quat(test_numpy_type)
self.assertEquals(test_quat, Quat(test_values[3], test_values[0], test_values[1], test_values[2]))
@tc_logger
def test_buffer_init_wrong_type(self):
"""Verify that an exception is raised with initializing via buffer with different data type"""
import array
quat_info = get_quat_info()
test_values = [9, 8, 7, 1]
for Quat, size, fmt in quat_info:
test_array = array.array("h", test_values)
with self.assertRaises(ValueError):
test_quat = Quat(test_array)
@tc_logger
def test_buffer_init_wrong_size(self):
"""Verify that an exception is raised with initializing via buffer with different data array length"""
import array
quat_info = get_quat_info()
test_values = [9, 8, 7, 6, 1]
for Quat, size, fmt in quat_info:
if fmt == "e":
# GfHalf not supported with array.array
continue
test_array = array.array(fmt, test_values)
with self.assertRaises(ValueError):
test_vec = Quat(test_array)
@tc_logger
def test_buffer_init_wrong_dimension(self):
"""Verify that an exception is raised with initializing via buffer with different data dimensions"""
import numpy
quat_info = get_quat_info()
equivalent_types = get_quat_numpy_types()
test_values = [9, 8, 7, 1]
for Quat, size, fmt in quat_info:
test_array = numpy.array([test_values, test_values], dtype=equivalent_types[Quat])
with self.assertRaises(ValueError):
test_quat = Quat(test_array)
class TestGfQuatGetSetItem(TestClass):
"""Test item accessors for usdrt.Gf.Quat* classes"""
@tc_logger
def test_get_item(self):
"""Validate __getitem__ on GfQuat"""
from usdrt import Gf
for Quat in [Gf.Quatf, Gf.Quatd, Gf.Quath]:
q = Quat(0.5, 1, 2, 3)
# Note that these are in memory layout order,
# which is different from constructor order
self.assertEqual(q[0], 1)
self.assertEqual(q[1], 2)
self.assertEqual(q[2], 3)
self.assertEqual(q[3], 0.5)
self.assertEqual(q[-4], 1)
self.assertEqual(q[-3], 2)
self.assertEqual(q[-2], 3)
self.assertEqual(q[-1], 0.5)
@tc_logger
def test_set_item(self):
"""Validate __setitem__ on GfQuat"""
from usdrt import Gf
for Quat in [Gf.Quatf, Gf.Quatd, Gf.Quath]:
q = Quat()
self.assertEqual(q.imaginary[0], 0)
self.assertEqual(q.imaginary[1], 0)
self.assertEqual(q.imaginary[2], 0)
self.assertEqual(q.real, 0)
q[0] = 1
q[1] = 2
q[2] = 3
q[3] = 0.5
self.assertEqual(q.imaginary[0], 1)
self.assertEqual(q.imaginary[1], 2)
self.assertEqual(q.imaginary[2], 3)
self.assertEqual(q.real, 0.5)
@tc_logger
def test_get_item_slice(self):
"""Validate __getitem__ with a slice on GfQuat"""
from usdrt import Gf
for Quat in [Gf.Quatf, Gf.Quatd, Gf.Quath]:
q = Quat(0.5, 1, 2, 3)
self.assertEqual(q[1:], [2, 3, 0.5])
@tc_logger
def test_set_item_slice(self):
"""Validate __setitem__ with a slice on GfQuat"""
from usdrt import Gf
for Quat in [Gf.Quatf, Gf.Quatd, Gf.Quath]:
q = Quat(0.5, 1, 2, 3)
self.assertEqual(q.imaginary[0], 1)
self.assertEqual(q.imaginary[1], 2)
self.assertEqual(q.imaginary[2], 3)
self.assertEqual(q.real, 0.5)
q[1:] = [5, 6, 7]
self.assertEqual(q.imaginary[0], 1)
self.assertEqual(q.imaginary[1], 5)
self.assertEqual(q.imaginary[2], 6)
self.assertEqual(q.real, 7)
class TestGfQuatCopy(TestClass):
"""Test copy and deepcopy support for Gf.Quat* classes"""
@tc_logger
def test_copy(self):
"""Test __copy__"""
quat_info = get_quat_info()
for Quat, size, fmt in quat_info:
x = Quat()
y = x
self.assertTrue(y is x)
y[0] = 10
self.assertEqual(x[0], 10)
z = copy.copy(y)
self.assertFalse(z is y)
y[0] = 100
self.assertEqual(z[0], 10)
@tc_logger
def test_deepcopy(self):
"""Test __deepcopy__"""
quat_info = get_quat_info()
for Quat, size, fmt in quat_info:
x = Quat()
y = x
self.assertTrue(y is x)
y[0] = 10
self.assertEqual(x[0], 10)
z = copy.deepcopy(y)
self.assertFalse(z is y)
y[0] = 100
self.assertEqual(z[0], 10)
class TestGfQuatDebugging(TestClass):
"""Test human readable output functions for debugging"""
@tc_logger
def test_repr_representation(self):
"""Test __repr__"""
from usdrt import Gf
test_quat = Gf.Quatf(0.5, 1, 2, 3)
expected = "Gf.Quatf(0.5, Gf.Vec3f(1.0, 2.0, 3.0))"
self.assertEqual(repr(test_quat), expected)
| 8,654 | Python | 27.100649 | 110 | 0.572799 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/scenegraph/tests/test_usd_timecode.py | __copyright__ = "Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import math
import os
import pathlib
import platform
import sys
import time
import unittest
from . import tc_logger
def setUpModule():
# pre-load USD before anything else to prevent crash
# from weird carb conflict
# FIXME ^^^
try:
from . import update_path_and_load_usd
update_path_and_load_usd()
except ImportError:
# not needed in Kit
pass
try:
import omni.kit.test
TestClass = omni.kit.test.AsyncTestCase
TEST_DIR = str(pathlib.Path(__file__).parent.parent.parent.parent)
except ImportError:
from . import TestRtScenegraph
TestClass = TestRtScenegraph
TEST_DIR = "."
class TestUsdTimeCode(TestClass):
@tc_logger
def test_timecode(self):
from usdrt import Usd
# ctor
t0 = Usd.TimeCode()
self.assertTrue(t0)
self.assertEqual(t0.GetValue(), 0.0)
t1 = Usd.TimeCode(1.0)
self.assertTrue(t1)
self.assertEqual(t1.GetValue(), 1.0)
nan = Usd.TimeCode(float("nan"))
self.assertTrue(nan)
self.assertTrue(math.isnan(nan.GetValue()))
# operators
self.assertTrue(t1 == Usd.TimeCode(1.0))
self.assertFalse(t0 == t1)
self.assertFalse(t1 == nan)
self.assertTrue(nan == nan)
self.assertTrue(t0 != t1)
self.assertFalse(t1 != Usd.TimeCode(1.0))
self.assertTrue(t1 != nan)
self.assertFalse(nan != nan)
self.assertTrue(t0 <= t1)
self.assertFalse(t1 <= t0)
self.assertTrue(t1 <= Usd.TimeCode(1.0))
self.assertFalse(t1 <= nan)
self.assertTrue(nan <= t1)
self.assertTrue(t0 < t1)
self.assertFalse(t1 < t0)
self.assertFalse(t1 < Usd.TimeCode(1.0))
self.assertFalse(t1 < nan)
self.assertTrue(nan < t1)
self.assertTrue(t1 >= t0)
self.assertFalse(t0 >= t1)
self.assertTrue(t1 >= Usd.TimeCode(1.0))
self.assertTrue(t1 >= nan)
self.assertFalse(nan >= t1)
self.assertTrue(t1 > t0)
self.assertFalse(t0 > t1)
self.assertFalse(t1 > Usd.TimeCode(1.0))
self.assertTrue(t1 > nan)
self.assertFalse(nan > t1)
# is earliest time
self.assertFalse(t1.IsEarliestTime())
self.assertTrue(Usd.TimeCode(-1.7976931348623157e308).IsEarliestTime())
# is default
self.assertFalse(t1.IsDefault())
self.assertTrue(nan.IsDefault())
# static methods
self.assertEqual(Usd.TimeCode.EarliestTime().GetValue(), -1.7976931348623157e308)
self.assertTrue(math.isnan(Usd.TimeCode.Default().GetValue()))
@tc_logger
def test_time_code_repr(self):
"""
Validates the string representation of the default time code.
"""
from usdrt import Usd
defaultTime = Usd.TimeCode.Default()
timeRepr = repr(defaultTime)
self.assertEqual(timeRepr, "Usd.TimeCode.Default()")
self.assertEqual(eval(timeRepr), defaultTime)
@tc_logger
def testEarliestTimeRepr(self):
"""
Validates the string representation of the earliest time code.
"""
from usdrt import Usd
earliestTime = Usd.TimeCode.EarliestTime()
timeRepr = repr(earliestTime)
self.assertEqual(timeRepr, "Usd.TimeCode.EarliestTime()")
self.assertEqual(eval(timeRepr), earliestTime)
@tc_logger
def testDefaultConstructedTimeRepr(self):
"""
Validates the string representation of a time code created using
the default constructor.
"""
from usdrt import Usd
timeCode = Usd.TimeCode()
timeRepr = repr(timeCode)
self.assertEqual(timeRepr, "Usd.TimeCode()")
self.assertEqual(eval(timeRepr), timeCode)
@tc_logger
def testNumericTimeRepr(self):
"""
Validates the string representation of a numeric time code.
"""
from usdrt import Usd
timeCode = Usd.TimeCode(123.0)
timeRepr = repr(timeCode)
self.assertEqual(timeRepr, "Usd.TimeCode(123.0)")
self.assertEqual(eval(timeRepr), timeCode)
| 4,605 | Python | 27.7875 | 89 | 0.633876 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/scenegraph/tests/test_primrange.py | __copyright__ = "Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import os
import pathlib
import platform
import sys
import time
import unittest
from . import tc_logger
def setUpModule():
# pre-load USD before anything else to prevent crash
# from weird carb conflict
# FIXME ^^^
try:
from . import update_path_and_load_usd
update_path_and_load_usd()
except ImportError:
# not needed in Kit
pass
try:
import omni.kit.test
TestClass = omni.kit.test.AsyncTestCase
TEST_DIR = str(pathlib.Path(__file__).parent.parent.parent.parent)
except ImportError:
from . import TestRtScenegraph
TestClass = TestRtScenegraph
TEST_DIR = "."
class TestUsdPrimRange(TestClass):
@tc_logger
def test_creation(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box"))
self.assertTrue(prim)
prim_range = Usd.PrimRange(prim)
self.assertTrue(prim_range)
@tc_logger
def test_iterator(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box"))
self.assertTrue(prim)
prim_range = Usd.PrimRange(prim)
self.assertTrue(prim_range)
count = 0
for this_prim in prim_range:
count += 1
self.assertEqual(count, 15)
self.assertEqual(this_prim.GetPath(), Sdf.Path("/Cornell_Box/Root/Looks/Red1SG/Red_Side"))
count = 0
it = iter(prim_range)
for this_prim in it:
if this_prim.GetName() == "Green_Wall":
it.PruneChildren()
count += 1
self.assertEqual(count, 14)
self.assertEqual(this_prim.GetPath(), Sdf.Path("/Cornell_Box/Root/Looks/Red1SG/Red_Side"))
prim = stage.GetPrimAtPath(Sdf.Path("/Emissive_square/Root"))
self.assertTrue(prim)
prim_range = Usd.PrimRange(prim)
self.assertTrue(prim_range)
count = 0
for this_prim in prim_range:
count += 1
self.assertEqual(count, 5)
self.assertEqual(this_prim.GetPath(), Sdf.Path("/Emissive_square/Root/Looks/EmissiveSG/Emissive"))
count = 0
it = iter(prim_range)
for this_prim in it:
it.PruneChildren()
count += 1
self.assertEqual(count, 1)
self.assertEqual(this_prim.GetPath(), Sdf.Path("/Emissive_square/Root"))
@tc_logger
def test_repr_representation(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Emissive_square/Root"))
self.assertTrue(prim)
prim_range = Usd.PrimRange(prim)
self.assertTrue(prim_range)
expected = "PrimRange(</Emissive_square/Root>)"
self.assertEquals(repr(prim_range), expected)
| 3,515 | Python | 27.585366 | 106 | 0.640114 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/scenegraph/tests/test_rtchangetracker.py | __copyright__ = "Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import os
import pathlib
import platform
import sys
import time
import unittest
from . import tc_logger
def setUpModule():
# pre-load USD before anything else to prevent crash
# from weird carb conflict
# FIXME ^^^
try:
from . import update_path_and_load_usd
update_path_and_load_usd()
except ImportError:
# not needed in Kit
pass
try:
import omni.kit.test
TestClass = omni.kit.test.AsyncTestCase
TEST_DIR = str(pathlib.Path(__file__).parent.parent.parent.parent)
except ImportError:
from . import TestRtScenegraph
TestClass = TestRtScenegraph
TEST_DIR = "."
class TestRtChangeTracker(TestClass):
@tc_logger
def test_ctor(self):
from pxr import UsdUtils
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
tracker = Rt.ChangeTracker(stage)
self.assertTrue(tracker)
# Really make sure the stage is dead and cache is cleared for test independence
del stage
UsdUtils.StageCache.Get().Clear()
@tc_logger
def test_track_attribute(self):
from pxr import UsdUtils
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
tracker = Rt.ChangeTracker(stage)
self.assertTrue(tracker)
tracker.TrackAttribute("inputs:color")
self.assertTrue(tracker.IsTrackingAttribute("inputs:color"))
self.assertFalse(tracker.HasChanges())
prim = stage.GetPrimAtPath(Sdf.Path("/DistantLight"))
attr = prim.GetAttribute("inputs:color")
newColor = Gf.Vec3f(0, 0.5, 0.5)
attr.Set(newColor, Usd.TimeCode(0.0))
self.assertTrue(tracker.HasChanges())
# Really make sure the stage is dead and cache is cleared for test independence
del stage
UsdUtils.StageCache.Get().Clear()
@tc_logger
def test_stop_tracking_attribute(self):
from pxr import UsdUtils
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/DistantLight"))
attr = prim.GetAttribute("inputs:color")
tracker = Rt.ChangeTracker(stage)
self.assertTrue(tracker)
tracker.TrackAttribute("inputs:color")
self.assertTrue(tracker.IsTrackingAttribute("inputs:color"))
self.assertFalse(tracker.HasChanges())
tracker.StopTrackingAttribute("inputs:color")
self.assertFalse(tracker.IsTrackingAttribute("inputs:color"))
newColor = Gf.Vec3f(0, 0.6, 0.6)
attr.Set(newColor, Usd.TimeCode(0.0))
self.assertFalse(tracker.HasChanges())
# Really make sure the stage is dead and cache is cleared for test independence
del stage
UsdUtils.StageCache.Get().Clear()
@tc_logger
def test_pause_and_resume_tracking(self):
from pxr import UsdUtils
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/DistantLight"))
attr = prim.GetAttribute("inputs:color")
tracker = Rt.ChangeTracker(stage)
self.assertTrue(tracker)
tracker.TrackAttribute("inputs:color")
self.assertTrue(tracker.IsTrackingAttribute("inputs:color"))
tracker.PauseTracking()
newColorA = Gf.Vec3f(0, 0.7, 0.7)
attr.Set(newColorA, Usd.TimeCode(0.0))
self.assertFalse(tracker.HasChanges())
tracker.ResumeTracking()
newColorB = Gf.Vec3f(0, 0.8, 0.8)
attr.Set(newColorB, Usd.TimeCode(0.0))
self.assertTrue(tracker.HasChanges())
# Really make sure the stage is dead and cache is cleared for test independence
del stage
UsdUtils.StageCache.Get().Clear()
@tc_logger
def test_is_change_tracking_paused(self):
from pxr import UsdUtils
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
tracker = Rt.ChangeTracker(stage)
self.assertTrue(tracker)
tracker.TrackAttribute("inputs:color")
self.assertFalse(tracker.IsChangeTrackingPaused())
tracker.PauseTracking()
self.assertTrue(tracker.IsChangeTrackingPaused())
tracker.ResumeTracking()
self.assertFalse(tracker.IsChangeTrackingPaused())
# Really make sure the stage is dead and cache is cleared for test independence
del stage
UsdUtils.StageCache.Get().Clear()
@tc_logger
def test_has_and_clear_changes(self):
from pxr import UsdUtils
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/DistantLight"))
attr = prim.GetAttribute("inputs:color")
tracker = Rt.ChangeTracker(stage)
tracker.TrackAttribute("inputs:color")
self.assertFalse(tracker.HasChanges())
newColor = Gf.Vec3f(0, 0.9, 0.9)
attr.Set(newColor, Usd.TimeCode(0.0))
self.assertTrue(tracker.HasChanges())
tracker.ClearChanges()
self.assertFalse(tracker.HasChanges())
# Really make sure the stage is dead and cache is cleared for test independence
del stage
UsdUtils.StageCache.Get().Clear()
@tc_logger
def test_get_all_changed_prims(self):
from pxr import UsdUtils
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
lightPrim = stage.GetPrimAtPath(Sdf.Path("/DistantLight"))
colorAttr = lightPrim.GetAttribute("inputs:color")
tracker = Rt.ChangeTracker(stage)
tracker.TrackAttribute("inputs:color")
tracker.TrackAttribute("visibility")
# No changes
changedPrims = tracker.GetAllChangedPrims()
self.assertEqual(len(changedPrims), 0)
# Change on one prim
newColor = Gf.Vec3f(0, 0.4, 0.4)
colorAttr.Set(newColor, Usd.TimeCode(0.0))
changedPrims = tracker.GetAllChangedPrims()
self.assertEqual(len(changedPrims), 1)
self.assertEqual(changedPrims[0], Sdf.Path("/DistantLight"))
# Change on two prims
cubePrim = stage.GetPrimAtPath(Sdf.Path("/Cube_5"))
visAttr = cubePrim.GetAttribute("visibility")
visAttr.Set("invisible", Usd.TimeCode(0.0))
changedPrims = tracker.GetAllChangedPrims()
self.assertEqual(len(changedPrims), 2)
# Change on a prim that already has a change
lightVisAttr = lightPrim.GetAttribute("visibility")
lightVisAttr.Set("invisible", Usd.TimeCode(0.0))
changedPrims = tracker.GetAllChangedPrims()
self.assertEqual(len(changedPrims), 2)
# Change an untracked attr on a third prim
spherePrim = stage.GetPrimAtPath(Sdf.Path("/Sphere_2"))
displayColor = spherePrim.GetAttribute("primvars:displayColor")
newDisplayColor = Gf.Vec3f(0, 0.3, 0.3)
displayColor.Set(newDisplayColor)
changedPrims = tracker.GetAllChangedPrims()
self.assertEqual(len(changedPrims), 2)
# Really make sure the stage is dead and cache is cleared for test independence
del stage
UsdUtils.StageCache.Get().Clear()
@tc_logger
def test_get_all_changed_attributes(self):
from pxr import UsdUtils
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
lightPrim = stage.GetPrimAtPath(Sdf.Path("/DistantLight"))
colorAttr = lightPrim.GetAttribute("inputs:color")
tracker = Rt.ChangeTracker(stage)
tracker.TrackAttribute("inputs:color")
tracker.TrackAttribute("visibility")
# No changes
changedAttrs = tracker.GetAllChangedAttributes()
self.assertEqual(len(changedAttrs), 0)
# Change attr on one prim
newColor = Gf.Vec3f(0.5, 0.6, 0.7)
colorAttr.Set(newColor, Usd.TimeCode(0.0))
changedAttrs = tracker.GetAllChangedAttributes()
self.assertEqual(len(changedAttrs), 1)
self.assertEqual(changedAttrs[0], "/DistantLight.inputs:color")
# Change attr on a second prim
cubePrim = stage.GetPrimAtPath(Sdf.Path("/Cube_5"))
cubeVisAttr = cubePrim.GetAttribute("visibility")
cubeVisAttr.Set("invisible", Usd.TimeCode(0.0))
changedAttrs = tracker.GetAllChangedAttributes()
self.assertEqual(len(changedAttrs), 2)
# Change a second attr on one of the prims
lightVisAttr = lightPrim.GetAttribute("visibility")
lightVisAttr.Set("invisible", Usd.TimeCode(0.0))
changedAttrs = tracker.GetAllChangedAttributes()
self.assertEqual(len(changedAttrs), 3)
# Change an untracked attr on a third prim
spherePrim = stage.GetPrimAtPath(Sdf.Path("/Sphere_2"))
displayColor = spherePrim.GetAttribute("primvars:displayColor")
newDisplayColor = Gf.Vec3f(0, 0.3, 0.3)
displayColor.Set(newDisplayColor, Usd.TimeCode(0.0))
changedAttrs = tracker.GetAllChangedAttributes()
self.assertEqual(len(changedAttrs), 3)
# Really make sure the stage is dead and cache is cleared for test independence
del stage
UsdUtils.StageCache.Get().Clear()
@tc_logger
def test_prim_changed(self):
from pxr import UsdUtils
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
lightPrim = stage.GetPrimAtPath(Sdf.Path("/DistantLight"))
colorAttr = lightPrim.GetAttribute("inputs:color")
tracker = Rt.ChangeTracker(stage)
tracker.TrackAttribute("inputs:color")
tracker.TrackAttribute("visibility")
# UsdPrim version of PrimChanged()
self.assertFalse(tracker.PrimChanged(lightPrim))
newColor = Gf.Vec3f(0.6, 0.7, 0.8)
colorAttr.Set(newColor, Usd.TimeCode(0.0))
self.assertTrue(tracker.PrimChanged(lightPrim))
# SdfPath version of PrimChanged()
cubePrim = stage.GetPrimAtPath(Sdf.Path("/Cube_5"))
self.assertFalse(tracker.PrimChanged(Sdf.Path("/Cube_5")))
cubeVisAttr = cubePrim.GetAttribute("visibility")
cubeVisAttr.Set("invisible", Usd.TimeCode(0.0))
self.assertTrue(tracker.PrimChanged(Sdf.Path("/Cube_5")))
# Change an untracked attr on a third prim
spherePrim = stage.GetPrimAtPath(Sdf.Path("/Sphere_2"))
displayColor = spherePrim.GetAttribute("primvars:displayColor")
newDisplayColor = Gf.Vec3f(0, 0.4, 0.4)
displayColor.Set(newDisplayColor, Usd.TimeCode(0.0))
self.assertFalse(tracker.PrimChanged(spherePrim))
# Really make sure the stage is dead and cache is cleared for test independence
del stage
UsdUtils.StageCache.Get().Clear()
@tc_logger
def test_attribute_changed(self):
from pxr import UsdUtils
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
lightPrim = stage.GetPrimAtPath(Sdf.Path("/DistantLight"))
colorAttr = lightPrim.GetAttribute("inputs:color")
tracker = Rt.ChangeTracker(stage)
tracker.TrackAttribute("inputs:color")
tracker.TrackAttribute("visibility")
# UsdPrim version of AttributeChanged()
self.assertFalse(tracker.AttributeChanged(colorAttr))
newColor = Gf.Vec3f(0.7, 0.8, 0.9)
colorAttr.Set(newColor, Usd.TimeCode(0.0))
self.assertTrue(tracker.AttributeChanged(colorAttr))
# SdfPath version of AttributeChanged()
cubePrim = stage.GetPrimAtPath(Sdf.Path("/Cube_5"))
self.assertFalse(tracker.AttributeChanged(Sdf.Path("/Cube_5.visibility")))
cubeVisAttr = cubePrim.GetAttribute("visibility")
cubeVisAttr.Set("invisible", Usd.TimeCode(0.0))
self.assertTrue(tracker.AttributeChanged(Sdf.Path("/Cube_5.visibility")))
# Change an untracked attr on a third prim
spherePrim = stage.GetPrimAtPath(Sdf.Path("/Sphere_2"))
displayColor = spherePrim.GetAttribute("primvars:displayColor")
newDisplayColor = Gf.Vec3f(0, 0.5, 0.5)
displayColor.Set(newDisplayColor, Usd.TimeCode(0.0))
self.assertFalse(tracker.AttributeChanged(displayColor))
# Really make sure the stage is dead and cache is cleared for test independence
del stage
UsdUtils.StageCache.Get().Clear()
@tc_logger
def test_get_changed_attributes(self):
from pxr import UsdUtils
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
lightPrim = stage.GetPrimAtPath(Sdf.Path("/DistantLight"))
cubePrim = stage.GetPrimAtPath(Sdf.Path("/Cube_5"))
spherePrim = stage.GetPrimAtPath(Sdf.Path("/Sphere_2"))
tracker = Rt.ChangeTracker(stage)
tracker.TrackAttribute("inputs:color")
tracker.TrackAttribute("visibility")
tracker.TrackAttribute("subdivisionScheme")
# Change one attr on a prim
lightColor = lightPrim.GetAttribute("inputs:color")
self.assertEqual(len(tracker.GetChangedAttributes(lightPrim)), 0)
newColor = Gf.Vec3f(0.2, 0.3, 0.4)
lightColor.Set(newColor, Usd.TimeCode(0.0))
testResult = tracker.GetChangedAttributes(lightPrim)
self.assertEqual(len(testResult), 1)
self.assertEqual(testResult[0], "inputs:color")
# Change multiple tracked attrs on a prim
cubeVis = cubePrim.GetAttribute("visibility")
cubeVis.Set("invisible", Usd.TimeCode(0.0))
cubeSubdiv = cubePrim.GetAttribute("subdivisionScheme")
cubeSubdiv.Set("loop", Usd.TimeCode(0.0))
self.assertEqual(len(tracker.GetChangedAttributes(cubePrim)), 2)
# Change untracked attr on a prim
displayColor = spherePrim.GetAttribute("primvars:displayColor")
newDisplayColor = Gf.Vec3f(0, 0.3, 0.5)
displayColor.Set(newDisplayColor, Usd.TimeCode(0.0))
self.assertEqual(len(tracker.GetChangedAttributes(spherePrim)), 0)
# Really make sure the stage is dead and cache is cleared for test independence
del stage
UsdUtils.StageCache.Get().Clear()
@tc_logger
def test_is_tracking_attribute(self):
from pxr import UsdUtils
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
tracker = Rt.ChangeTracker(stage)
self.assertFalse(tracker.IsTrackingAttribute("inputs:color"))
tracker.TrackAttribute("inputs:color")
self.assertTrue(tracker.IsTrackingAttribute("inputs:color"))
tracker.TrackAttribute("visibility")
self.assertTrue(tracker.IsTrackingAttribute("visibility"))
self.assertTrue(tracker.IsTrackingAttribute("inputs:color"))
tracker.StopTrackingAttribute("inputs:color")
self.assertTrue(tracker.IsTrackingAttribute("visibility"))
self.assertFalse(tracker.IsTrackingAttribute("inputs:color"))
tracker.StopTrackingAttribute("visibility")
self.assertFalse(tracker.IsTrackingAttribute("visibility"))
self.assertFalse(tracker.IsTrackingAttribute("fakeAttr"))
# Really make sure the stage is dead and cache is cleared for test independence
del stage
UsdUtils.StageCache.Get().Clear()
@tc_logger
def test_get_tracked_attributes(self):
from pxr import UsdUtils
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
tracker = Rt.ChangeTracker(stage)
self.assertEqual(len(tracker.GetTrackedAttributes()), 0)
tracker.TrackAttribute("inputs:color")
self.assertEqual(len(tracker.GetTrackedAttributes()), 1)
self.assertEqual(tracker.GetTrackedAttributes()[0], "inputs:color")
tracker.TrackAttribute("visibility")
self.assertEqual(len(tracker.GetTrackedAttributes()), 2)
tracker.StopTrackingAttribute("inputs:color")
self.assertEqual(len(tracker.GetTrackedAttributes()), 1)
self.assertEqual(tracker.GetTrackedAttributes()[0], "visibility")
# Really make sure the stage is dead and cache is cleared for test independence
del stage
UsdUtils.StageCache.Get().Clear()
| 17,463 | Python | 35.383333 | 87 | 0.664033 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/scenegraph/tests/testGfVec.py | # Copyright 2016 Pixar
#
# Licensed under the Apache License, Version 2.0 (the "Apache License")
# with the following modification; you may not use this file except in
# compliance with the Apache License and the following modification to it:
# Section 6. Trademarks. is deleted and replaced with:
#
# 6. Trademarks. This License does not grant permission to use the trade
# names, trademarks, service marks, or product names of the Licensor
# and its affiliates, except as required to comply with Section 4(c) of
# the License and to reproduce the content of the NOTICE file.
#
# You may obtain a copy of the Apache License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Apache License with the above modification is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the Apache License for the specific
# language governing permissions and limitations under the Apache License.
#
# Note: This is just pulled directly from USD and lightly modified
# https://github.com/PixarAnimationStudios/USD/blob/release/pxr/base/gf/testenv/testGfVec.py
from __future__ import division
__copyright__ = "Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import os
import platform
import sys
import time
import unittest
##### Uncomment for better assert messages
# if 'unittest.util' in __import__('sys').modules:
# # Show full diff in self.assertEqual.
# __import__('sys').modules['unittest.util']._MAX_LENGTH = 999999999
def setUpModule():
# pre-load USD before anything else to prevent crash
# from weird carb conflict
# FIXME ^^^
try:
from . import update_path_and_load_usd
update_path_and_load_usd()
except ImportError:
# not needed in Kit
pass
try:
import omni.kit.test
TestClass = omni.kit.test.AsyncTestCase
except ImportError:
TestClass = unittest.TestCase
import math
import sys
import unittest
def floatTypeRank(vec):
from usdrt import Gf
vecIntTypes = [Gf.Vec2i, Gf.Vec3i, Gf.Vec4i]
vecDoubleTypes = [Gf.Vec2d, Gf.Vec3d, Gf.Vec4d]
vecFloatTypes = [Gf.Vec2f, Gf.Vec3f, Gf.Vec4f]
vecHalfTypes = [Gf.Vec2h, Gf.Vec3h, Gf.Vec4h]
if vec in vecDoubleTypes:
return 3
elif vec in vecFloatTypes:
return 2
elif vec in vecHalfTypes:
return 1
def isFloatingPoint(vec):
from usdrt import Gf
vecIntTypes = [Gf.Vec2i, Gf.Vec3i, Gf.Vec4i]
vecDoubleTypes = [Gf.Vec2d, Gf.Vec3d, Gf.Vec4d]
vecFloatTypes = [Gf.Vec2f, Gf.Vec3f, Gf.Vec4f]
vecHalfTypes = [Gf.Vec2h, Gf.Vec3h, Gf.Vec4h]
return (vec in vecDoubleTypes) or (vec in vecFloatTypes) or (vec in vecHalfTypes)
def getEps(vec):
rank = floatTypeRank(vec)
if rank == 1:
return 1e-2
elif rank == 2:
return 1e-3
elif rank == 3:
return 1e-4
def vecWithType(vecType, type):
from usdrt import Gf
if vecType.dimension == 2:
if type == "d":
return Gf.Vec2d
elif type == "f":
return Gf.Vec2f
elif type == "h":
return Gf.Vec2h
elif type == "i":
return Gf.Vec2i
elif vecType.dimension == 3:
if type == "d":
return Gf.Vec3d
elif type == "f":
return Gf.Vec3f
elif type == "h":
return Gf.Vec3h
elif type == "i":
return Gf.Vec3i
elif vecType.dimension == 4:
if type == "d":
return Gf.Vec4d
elif type == "f":
return Gf.Vec4f
elif type == "h":
return Gf.Vec4h
elif type == "i":
return Gf.Vec4i
assert False, "No valid conversion for " + vecType + " to type " + type
return None
def checkVec(vec, values):
for i in range(len(vec)):
if vec[i] != values[i]:
return False
return True
def checkVecDot(v1, v2, dp):
if len(v1) != len(v2):
return False
checkdp = 0
for i in range(len(v1)):
checkdp += v1[i] * v2[i]
return checkdp == dp
def SetVec(vec, values):
for i in range(len(vec)):
vec[i] = values[i]
class TestGfVec(TestClass):
def ConstructorsTest(self, Vec):
# no arg constructor
self.assertIsInstance(Vec(), Vec)
# default constructor
v = Vec()
for x in v:
self.assertEqual(0, x)
# copy constructor
v = Vec()
for i in range(len(v)):
v[i] = i
v2 = Vec(v)
for i in range(len(v2)):
self.assertEqual(v[i], v2[i])
# explicit constructor
values = [3, 1, 4, 1]
if Vec.dimension == 2:
v = Vec(3, 1)
self.assertTrue(checkVec(v, values))
elif Vec.dimension == 3:
v = Vec(3, 1, 4)
self.assertTrue(checkVec(v, values))
elif Vec.dimension == 4:
v = Vec(3, 1, 4, 1)
self.assertTrue(checkVec(v, values))
else:
self.assertTrue(False, "No explicit constructor check for " + Vec)
# constructor taking single scalar value.
v = Vec(0)
self.assertTrue(all([x == 0 for x in v]))
v = Vec(1)
self.assertTrue(all([x == 1 for x in v]))
v = Vec(2)
self.assertTrue(all([x == 2 for x in v]))
# conversion from other types to this float type.
if isFloatingPoint(Vec):
for t in "dfih":
V = vecWithType(Vec, t)
self.assertTrue(Vec(V()))
# comparison to int type
Veci = vecWithType(Vec, "i")
vi = Veci()
SetVec(vi, (3, 1, 4, 1))
self.assertEqual(Vec(vi), vi)
if isFloatingPoint(Vec):
# Comparison to float type
for t in "dfh":
V = vecWithType(Vec, t)
v = V()
SetVec(v, (0.3, 0.1, 0.4, 0.1))
if floatTypeRank(Vec) >= floatTypeRank(V):
self.assertEqual(Vec(v), v)
else:
self.assertNotEqual(Vec(v), v)
def OperatorsTest(self, Vec):
from usdrt import Gf
v1 = Vec()
v2 = Vec()
# equality
SetVec(v1, [3, 1, 4, 1])
SetVec(v2, [3, 1, 4, 1])
self.assertEqual(v1, v2)
# inequality
SetVec(v1, [3, 1, 4, 1])
SetVec(v2, [5, 9, 2, 6])
self.assertNotEqual(v1, v2)
# component-wise addition
SetVec(v1, [3, 1, 4, 1])
SetVec(v2, [5, 9, 2, 6])
v3 = v1 + v2
v1 += v2
self.assertTrue(checkVec(v1, [8, 10, 6, 7]))
self.assertTrue(checkVec(v3, [8, 10, 6, 7]))
# component-wise subtraction
SetVec(v1, [3, 1, 4, 1])
SetVec(v2, [5, 9, 2, 6])
v3 = v1 - v2
v1 -= v2
self.assertTrue(checkVec(v1, [-2, -8, 2, -5]))
self.assertTrue(checkVec(v3, [-2, -8, 2, -5]))
# component-wise multiplication
SetVec(v1, [3, 1, 4, 1])
SetVec(v2, [5, 9, 2, 6])
v4 = v1 * 10
v5 = 10 * v1
v1 *= 10
self.assertTrue(checkVec(v1, [30, 10, 40, 10]))
self.assertTrue(checkVec(v4, [30, 10, 40, 10]))
self.assertTrue(checkVec(v5, [30, 10, 40, 10]))
# component-wise division
SetVec(v1, [3, 6, 9, 12])
v3 = v1 / 3
v1 /= 3
self.assertTrue(checkVec(v1, [1, 2, 3, 4]))
self.assertTrue(checkVec(v3, [1, 2, 3, 4]))
# dot product
SetVec(v1, [3, 1, 4, 1])
SetVec(v2, [5, 9, 2, 6])
dp = v1 * v2
dp2 = Gf.Dot(v1, v2)
dp3 = v1.GetDot(v2) # 2x compatibility
self.assertTrue(checkVecDot(v1, v2, dp))
self.assertTrue(checkVecDot(v1, v2, dp2))
self.assertTrue(checkVecDot(v1, v2, dp3))
# unary minus (negation)
SetVec(v1, [3, 1, 4, 1])
self.assertTrue(checkVec(-v1, [-3, -1, -4, -1]))
# repr
self.assertEqual(v1, eval(repr(v1)))
# string
self.assertTrue(len(str(Vec())) > 0)
# indexing
v = Vec()
for i in range(Vec.dimension):
v[i] = i + 1
self.assertEqual(v[-1], v[v.dimension - 1])
self.assertEqual(v[0], 1)
self.assertIn(v.dimension, v)
self.assertNotIn(v.dimension + 1, v)
with self.assertRaises(IndexError):
v[v.dimension + 1] = v.dimension + 1
# slicing
v = Vec()
value = [3, 1, 4, 1]
SetVec(v, value)
value = v[0 : v.dimension]
self.assertEqual(v[:], value)
self.assertEqual(v[:2], value[:2])
self.assertEqual(v[0:2], value[0:2])
self.assertEqual(v[-2:], value[-2:])
self.assertEqual(v[1:1], [])
if v.dimension > 2:
self.assertEqual(v[0:3:2], [3, 4])
v[:2] = (8, 9)
checkVec(v, [8, 9, 4, 1])
if v.dimension > 2:
v[:3:2] = [0, 1]
checkVec(v, [0, 9, 1, 1])
with self.assertRaises(ValueError):
# This should fail. Wrong length sequence
#
v[:2] = [1, 2, 3]
with self.assertRaises(TypeError):
# This should fail. Cannot use floats for indices
v[0.0:2.0] = [7, 7]
with self.assertRaises(TypeError):
# This should fail. Cannot convert None to vector data
#
v[:2] = [None, None]
def MethodsTest(self, Vec):
from usdrt import Gf
v1 = Vec()
v2 = Vec()
if isFloatingPoint(Vec):
eps = getEps(Vec)
# length
SetVec(v1, [3, 1, 4, 1])
l = Gf.GetLength(v1)
l2 = v1.GetLength()
self.assertTrue(Gf.IsClose(l, l2, eps), repr(l) + " " + repr(l2))
self.assertTrue(
Gf.IsClose(l, math.sqrt(Gf.Dot(v1, v1)), eps),
" ".join([repr(x) for x in [l, v1, math.sqrt(Gf.Dot(v1, v1))]]),
)
# Normalize...
SetVec(v1, [3, 1, 4, 1])
v2 = Vec(v1)
v2.Normalize()
nv = Gf.GetNormalized(v1)
nv2 = v1.GetNormalized()
nvcheck = v1 / Gf.GetLength(v1)
self.assertTrue(Gf.IsClose(nv, nvcheck, eps))
self.assertTrue(Gf.IsClose(nv2, nvcheck, eps))
self.assertTrue(Gf.IsClose(v2, nvcheck, eps))
SetVec(v1, [3, 1, 4, 1])
nv = v1.GetNormalized()
nvcheck = v1 / Gf.GetLength(v1)
self.assertTrue(Gf.IsClose(nv, nvcheck, eps)) # nv edit - linalg implementation not exactly equal
SetVec(v1, [0, 0, 0, 0])
v1.Normalize()
self.assertTrue(checkVec(v1, [0, 0, 0, 0]))
SetVec(v1, [2, 0, 0, 0])
Gf.Normalize(v1)
self.assertTrue(checkVec(v1, [1, 0, 0, 0]))
# projection
SetVec(v1, [3, 1, 4, 1])
SetVec(v2, [5, 9, 2, 6])
p1 = Gf.GetProjection(v1, v2)
p2 = v1.GetProjection(v2)
check = (v1 * v2) * v2
self.assertEqual(p1, check)
self.assertEqual(p2, check)
# complement
SetVec(v1, [3, 1, 4, 1])
SetVec(v2, [5, 9, 2, 6])
p1 = Gf.GetComplement(v1, v2)
p2 = v1.GetComplement(v2)
check = v1 - (v1 * v2) * v2
self.assertTrue((p1 == check) and (p2 == check))
# component-wise multiplication
SetVec(v1, [3, 1, 4, 1])
SetVec(v2, [5, 9, 2, 6])
v3 = Gf.CompMult(v1, v2)
self.assertTrue(checkVec(v3, [15, 9, 8, 6]))
# component-wise division
SetVec(v1, [3, 9, 18, 21])
SetVec(v2, [3, 3, 9, 7])
v3 = Gf.CompDiv(v1, v2)
self.assertTrue(checkVec(v3, [1, 3, 2, 3]))
# is close
SetVec(v1, [3, 1, 4, 1])
SetVec(v2, [5, 9, 2, 6])
self.assertTrue(Gf.IsClose(v1, v1, 0.1))
self.assertFalse(Gf.IsClose(v1, v2, 0.1))
# static Axis methods
for i in range(Vec.dimension):
v1 = Vec.Axis(i)
v2 = Vec()
v2[i] = 1
self.assertEqual(v1, v2)
v1 = Vec.XAxis()
self.assertTrue(checkVec(v1, [1, 0, 0, 0]))
v1 = Vec.YAxis()
self.assertTrue(checkVec(v1, [0, 1, 0, 0]))
if Vec.dimension != 2:
v1 = Vec.ZAxis()
self.assertTrue(checkVec(v1, [0, 0, 1, 0]))
if Vec.dimension == 3:
# cross product
SetVec(v1, [3, 1, 4, 0])
SetVec(v2, [5, 9, 2, 0])
v3 = Vec(Gf.Cross(v1, v2))
v4 = v1 ^ v2
v5 = v1.GetCross(v2) # 2x compatibility
check = Vec()
SetVec(check, [1 * 2 - 4 * 9, 4 * 5 - 3 * 2, 3 * 9 - 1 * 5, 0])
self.assertTrue(v3 == check and v4 == check and v5 == check)
# orthogonalize basis
# case 1: close to orthogonal, don't normalize
SetVec(v1, [1, 0, 0.1])
SetVec(v2, [0.1, 1, 0])
SetVec(v3, [0, 0.1, 1])
self.assertTrue(Vec.OrthogonalizeBasis(v1, v2, v3, False))
self.assertTrue(Gf.IsClose(Gf.Dot(v2, v1), 0, eps))
self.assertTrue(Gf.IsClose(Gf.Dot(v3, v1), 0, eps))
self.assertTrue(Gf.IsClose(Gf.Dot(v2, v3), 0, eps))
# case 2: far from orthogonal, normalize
SetVec(v1, [1, 2, 3])
SetVec(v2, [-1, 2, 3])
SetVec(v3, [-1, -2, 3])
self.assertTrue(Vec.OrthogonalizeBasis(v1, v2, v3, True))
self.assertTrue(Gf.IsClose(Gf.Dot(v2, v1), 0, eps))
self.assertTrue(Gf.IsClose(Gf.Dot(v3, v1), 0, eps))
self.assertTrue(Gf.IsClose(Gf.Dot(v2, v3), 0, eps))
self.assertTrue(Gf.IsClose(v1.GetLength(), 1, eps))
self.assertTrue(Gf.IsClose(v2.GetLength(), 1, eps))
self.assertTrue(Gf.IsClose(v3.GetLength(), 1, eps))
# case 3: already orthogonal - shouldn't change, even with large
# tolerance
SetVec(v1, [1, 0, 0])
SetVec(v2, [0, 1, 0])
SetVec(v3, [0, 0, 1])
vt1 = v1
vt2 = v2
vt3 = v3
self.assertTrue(Vec.OrthogonalizeBasis(v1, v2, v3, False)) # nv edit - no epsilon parameter
self.assertTrue(v1 == vt1)
self.assertTrue(v2 == vt2)
self.assertTrue(v3 == vt3)
# case 4: co-linear input vectors - should do nothing
SetVec(v1, [1, 0, 0])
SetVec(v2, [1, 0, 0])
SetVec(v3, [0, 0, 1])
vt1 = v1
vt2 = v2
vt3 = v3
self.assertFalse(Vec.OrthogonalizeBasis(v1, v2, v3, False)) # nv edit - no epsilon parameter
self.assertEqual(v1, vt1)
self.assertEqual(v2, vt2)
self.assertEqual(v3, vt3)
# build orthonormal frame
SetVec(v1, [1, 1, 1, 1])
(v2, v3) = v1.BuildOrthonormalFrame()
self.assertTrue(Gf.IsClose(Gf.Dot(v2, v1), 0, eps))
self.assertTrue(Gf.IsClose(Gf.Dot(v3, v1), 0, eps))
self.assertTrue(Gf.IsClose(Gf.Dot(v2, v3), 0, eps))
SetVec(v1, [0, 0, 0, 0])
(v2, v3) = v1.BuildOrthonormalFrame()
self.assertTrue(Gf.IsClose(v2, Vec(), eps))
self.assertTrue(Gf.IsClose(v3, Vec(), eps))
SetVec(v1, [1, 0, 0, 0])
(v2, v3) = v1.BuildOrthonormalFrame()
self.assertTrue(Gf.IsClose(Gf.Dot(v2, v1), 0, eps))
self.assertTrue(Gf.IsClose(Gf.Dot(v3, v1), 0, eps))
self.assertTrue(Gf.IsClose(Gf.Dot(v2, v3), 0, eps))
SetVec(v1, [1, 0, 0, 0])
(v2, v3) = v1.BuildOrthonormalFrame()
self.assertTrue(Gf.IsClose(Gf.Dot(v2, v1), 0, eps))
self.assertTrue(Gf.IsClose(Gf.Dot(v3, v1), 0, eps))
self.assertTrue(Gf.IsClose(Gf.Dot(v2, v3), 0, eps))
SetVec(v1, [1, 0, 0, 0])
(v2, v3) = v1.BuildOrthonormalFrame(2)
self.assertTrue(Gf.IsClose(Gf.Dot(v2, v1), 0, eps))
self.assertTrue(Gf.IsClose(Gf.Dot(v3, v1), 0, eps))
self.assertTrue(Gf.IsClose(Gf.Dot(v2, v3), 0, eps))
# test Slerp w/ orthogonal vectors
SetVec(v1, [1, 0, 0])
SetVec(v2, [0, 1, 0])
v3 = Gf.Slerp(0, v1, v2)
self.assertTrue(Gf.IsClose(v3, v1, eps))
v3 = Gf.Slerp(1, v1, v2)
self.assertTrue(Gf.IsClose(v3, v3, eps))
v3 = Gf.Slerp(0.5, v1, v2)
self.assertTrue(Gf.IsClose(v3, Vec(0.7071, 0.7071, 0), eps))
# test Slerp w/ nearly parallel vectors
SetVec(v1, [1, 0, 0])
SetVec(v2, [1.001, 0.0001, 0])
v2.Normalize()
v3 = Gf.Slerp(0, v1, v2)
self.assertTrue(Gf.IsClose(v3, v1, eps))
v3 = Gf.Slerp(1, v1, v2)
self.assertTrue(Gf.IsClose(v3, v3, eps))
v3 = Gf.Slerp(0.5, v1, v2)
self.assertTrue(Gf.IsClose(v3, v1, eps), [v3, v1, eps])
self.assertTrue(Gf.IsClose(v3, v2, eps))
# test Slerp w/ opposing vectors
SetVec(v1, [1, 0, 0])
SetVec(v2, [-1, 0, 0])
v3 = Gf.Slerp(0, v1, v2)
self.assertTrue(Gf.IsClose(v3, v1, eps))
v3 = Gf.Slerp(0.25, v1, v2)
self.assertTrue(Gf.IsClose(v3, Vec(0.70711, 0, -0.70711), eps))
v3 = Gf.Slerp(0.5, v1, v2)
self.assertTrue(Gf.IsClose(v3, Vec(0, 0, -1), eps))
v3 = Gf.Slerp(0.75, v1, v2)
self.assertTrue(Gf.IsClose(v3, Vec(-0.70711, 0, -0.70711), eps))
v3 = Gf.Slerp(1, v1, v2)
self.assertTrue(Gf.IsClose(v3, v3, eps))
# test Slerp w/ opposing vectors
SetVec(v1, [0, 1, 0])
SetVec(v2, [0, -1, 0])
v3 = Gf.Slerp(0, v1, v2)
self.assertTrue(Gf.IsClose(v3, v1, eps))
v3 = Gf.Slerp(0.25, v1, v2)
self.assertTrue(Gf.IsClose(v3, Vec(0, 0.70711, 0.70711), eps))
v3 = Gf.Slerp(0.5, v1, v2)
self.assertTrue(Gf.IsClose(v3, Vec(0, 0, 1), eps))
v3 = Gf.Slerp(0.75, v1, v2)
self.assertTrue(Gf.IsClose(v3, Vec(0, -0.70711, 0.70711), eps))
v3 = Gf.Slerp(1, v1, v2)
self.assertTrue(Gf.IsClose(v3, v3, eps))
def test_Types(self):
from usdrt import Gf
vecTypes = [
Gf.Vec2d,
Gf.Vec2f,
Gf.Vec2h,
Gf.Vec2i,
Gf.Vec3d,
Gf.Vec3f,
Gf.Vec3h,
Gf.Vec3i,
Gf.Vec4d,
Gf.Vec4f,
Gf.Vec4h,
Gf.Vec4i,
]
for Vec in vecTypes:
self.ConstructorsTest(Vec)
self.OperatorsTest(Vec)
self.MethodsTest(Vec)
def test_TupleToVec(self):
from usdrt import Gf
# Test passing tuples for vecs.
self.assertEqual(Gf.Dot((1, 1), (1, 1)), 2)
self.assertEqual(Gf.Dot((1, 1, 1), (1, 1, 1)), 3)
self.assertEqual(Gf.Dot((1, 1, 1, 1), (1, 1, 1, 1)), 4)
self.assertEqual(Gf.Dot((1.0, 1.0), (1.0, 1.0)), 2.0)
self.assertEqual(Gf.Dot((1.0, 1.0, 1.0), (1.0, 1.0, 1.0)), 3.0)
self.assertEqual(Gf.Dot((1.0, 1.0, 1.0, 1.0), (1.0, 1.0, 1.0, 1.0)), 4.0)
self.assertEqual(Gf.Vec2f((1, 1)), Gf.Vec2f(1, 1))
self.assertEqual(Gf.Vec3f((1, 1, 1)), Gf.Vec3f(1, 1, 1))
self.assertEqual(Gf.Vec4f((1, 1, 1, 1)), Gf.Vec4f(1, 1, 1, 1))
# Test passing lists for vecs.
self.assertEqual(Gf.Dot([1, 1], [1, 1]), 2)
self.assertEqual(Gf.Dot([1, 1, 1], [1, 1, 1]), 3)
self.assertEqual(Gf.Dot([1, 1, 1, 1], [1, 1, 1, 1]), 4)
self.assertEqual(Gf.Dot([1.0, 1.0], [1.0, 1.0]), 2.0)
self.assertEqual(Gf.Dot([1.0, 1.0, 1.0], [1.0, 1.0, 1.0]), 3.0)
self.assertEqual(Gf.Dot([1.0, 1.0, 1.0, 1.0], [1.0, 1.0, 1.0, 1.0]), 4.0)
self.assertEqual(Gf.Vec2f([1, 1]), Gf.Vec2f(1, 1))
self.assertEqual(Gf.Vec3f([1, 1, 1]), Gf.Vec3f(1, 1, 1))
self.assertEqual(Gf.Vec4f([1, 1, 1, 1]), Gf.Vec4f(1, 1, 1, 1))
# Test passing both for vecs.
self.assertEqual(Gf.Dot((1, 1), [1, 1]), 2)
self.assertEqual(Gf.Dot((1, 1, 1), (1, 1, 1)), 3)
self.assertEqual(Gf.Dot((1, 1, 1, 1), [1, 1, 1, 1]), 4)
self.assertEqual(Gf.Dot((1.0, 1.0), [1.0, 1.0]), 2.0)
self.assertEqual(Gf.Dot((1.0, 1.0, 1.0), [1.0, 1.0, 1.0]), 3.0)
self.assertEqual(Gf.Dot((1.0, 1.0, 1.0, 1.0), [1.0, 1.0, 1.0, 1.0]), 4.0)
self.assertEqual(Gf.Vec2f([1, 1]), Gf.Vec2f(1, 1))
self.assertEqual(Gf.Vec3f([1, 1, 1]), Gf.Vec3f(1, 1, 1))
self.assertEqual(Gf.Vec4f([1, 1, 1, 1]), Gf.Vec4f(1, 1, 1, 1))
def test_Exceptions(self):
from usdrt import Gf
with self.assertRaises(TypeError):
Gf.Dot("monkey", (1, 1))
with self.assertRaises(TypeError):
Gf.Dot("monkey", (1, 1, 1))
with self.assertRaises(TypeError):
Gf.Dot("monkey", (1, 1, 1, 1))
with self.assertRaises(TypeError):
Gf.Dot("monkey", (1.0, 1.0))
with self.assertRaises(TypeError):
Gf.Dot("monkey", (1.0, 1.0, 1.0))
with self.assertRaises(TypeError):
Gf.Dot("monkey", (1.0, 1.0, 1.0, 1.0))
with self.assertRaises(TypeError):
Gf.Dot((1, 1, 1, 1, 1, 1), (1, 1))
with self.assertRaises(TypeError):
Gf.Dot((1, 1, 1, 1, 1, 1), (1, 1, 1))
with self.assertRaises(TypeError):
Gf.Dot((1, 1, 1, 1, 1, 1), (1, 1, 1, 1))
with self.assertRaises(TypeError):
Gf.Dot((1.0, 1.0, 1.0, 1.0, 1.0, 1.0), (1.0, 1.0))
with self.assertRaises(TypeError):
Gf.Dot((1.0, 1.0, 1.0, 1.0, 1.0, 1.0), (1.0, 1.0, 1.0))
with self.assertRaises(TypeError):
Gf.Dot((1.0, 1.0, 1.0, 1.0, 1.0, 1.0), (1.0, 1.0, 1.0, 1.0))
with self.assertRaises(TypeError):
Gf.Dot(("a", "b"), (1, 1))
with self.assertRaises(TypeError):
Gf.Dot(("a", "b", "c"), (1, 1, 1))
with self.assertRaises(TypeError):
Gf.Dot(("a", "b", "c", "d"), (1, 1, 1, 1))
with self.assertRaises(TypeError):
Gf.Dot(("a", "b"), (1.0, 1.0))
with self.assertRaises(TypeError):
Gf.Dot(("a", "b", "c"), (1.0, 1.0, 1.0))
with self.assertRaises(TypeError):
Gf.Dot(("a", "b", "c", "d"), (1.0, 1.0, 1.0, 1.0))
| 23,709 | Python | 33.066092 | 110 | 0.502763 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/scenegraph/tests/test_array.py | __copyright__ = "Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import ctypes
import pathlib
import platform
import weakref
from . import tc_logger
def setUpModule():
# pre-load USD before anything else to prevent crash
# from weird carb conflict
# FIXME ^^^
try:
from . import update_path_and_load_usd
update_path_and_load_usd()
if platform.processor() == "aarch64":
# warp not supported on aarch64 yet for our testing
return
import warp as wp
wp.init()
except ImportError:
# not needed in Kit /
# warp not available in default kit install
# not needed in Kit
pass
try:
import omni.kit.test
TestClass = omni.kit.test.AsyncTestCase
TEST_DIR = str(pathlib.Path(__file__).parent.parent.parent.parent)
except ImportError:
from . import TestRtScenegraph
TestClass = TestRtScenegraph
TEST_DIR = "."
def warp_array_from_cuda_array_interface(a):
import warp as wp
cai = a.__cuda_array_interface__
return wp.types.array(
dtype=wp.vec3,
length=cai["shape"][0],
capacity=cai["shape"][0] * wp.types.type_size_in_bytes(wp.vec3),
ptr=cai["data"][0],
device="cuda",
owner=False,
requires_grad=False,
)
class TestVtArray(TestClass):
@tc_logger
def test_init(self):
from usdrt import Vt
empty = Vt.IntArray()
self.assertEquals(len(empty), 0)
allocated = Vt.IntArray(10)
self.assertEquals(len(allocated), 10)
from_list = Vt.IntArray([0, 1, 2, 3])
self.assertEquals(len(from_list), 4)
@tc_logger
def test_getset(self):
from usdrt import Vt
test_list = Vt.IntArray([0, 1, 2, 3])
self.assertEquals(len(test_list), 4)
for i in range(4):
self.assertEquals(test_list[i], i)
test_list[3] = 100
self.assertEquals(test_list[3], 100)
@tc_logger
def test_iterator(self):
from usdrt import Vt
test_list = Vt.IntArray([0, 1, 2, 3])
i = 0
for item in test_list:
self.assertEquals(i, item)
i += 1
@tc_logger
def test_is_fabric(self):
from usdrt import Sdf, Usd, Vt
test_list = Vt.IntArray([0, 1, 2, 3])
self.assertFalse(test_list.IsPythonData())
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
attr = prim.GetAttribute("faceVertexIndices")
self.assertTrue(attr)
result = attr.Get()
self.assertEquals(result[0], 1)
self.assertTrue(result.IsFabricData())
result[0] = 9
self.assertTrue(result.IsFabricData())
result2 = attr.Get()
self.assertTrue(result2.IsFabricData())
self.assertEquals(result2[0], 9)
result2.DetachFromSource()
result2[0] = 15
result3 = attr.Get()
self.assertEquals(result3[0], 9)
def _getNumpyPoints(self):
import numpy as np
points = np.zeros(shape=(1024, 3), dtype=np.float32)
points[0][0] = 999.0
points[0][1] = 998.0
points[0][2] = 997.0
points[1][0] = 1.0
points[1][1] = 2.0
points[1][2] = 3.0
points[10][0] = 10.0
points[10][1] = 20.0
points[10][2] = 30.0
return points
@tc_logger
def test_array_interface(self):
import numpy as np
from usdrt import Sdf, Usd, Vt
stage = Usd.Stage.CreateInMemory("test.usda")
self.assertTrue(stage)
prim = stage.DefinePrim(Sdf.Path("/prim"))
attr = prim.CreateAttribute("points", Sdf.ValueTypeNames.Point3fArray, True)
self.assertTrue(attr)
points = self._getNumpyPoints()
pointsRef = weakref.ref(points)
pointsId = id(points)
# Create a VtArray from a numpy array using the buffer protocol
vtPoints = Vt.Vec3fArray(points)
# Ensure the VtArray incremented the refcount on points
self.assertEqual(ctypes.c_long.from_address(pointsId).value, 2)
# Delete the numpy reference to check that the VtArray kept it alive
del points
# Ensure VtArray released the refcount on points
self.assertEqual(ctypes.c_long.from_address(pointsId).value, 1)
# Set the Fabric attribute which will make a copy from numpy to Fabric
self.assertTrue(attr.Set(vtPoints))
del vtPoints
# Ensure VtArray released the refcount on points
self.assertIsNone(pointsRef())
# Retrieve a new Fabric VtArray from usdrt
fabricPoints = attr.Get()
self.assertTrue(fabricPoints.IsFabricData())
# Create a new attribute which would invalidate any existing Fabric pointer
attr2 = prim.CreateAttribute("badattr", Sdf.ValueTypeNames.Float, True)
self.assertTrue(attr2.Set(3.5))
newPoints = np.array(fabricPoints)
# Delete the fabric VtArray to ensure the data was really copied into numpy
del fabricPoints
# Now compare the round-trip through usdrt was a success
points = self._getNumpyPoints()
for i in range(1024):
for j in range(3):
self.assertEqual(
points[i][j], newPoints[i][j], msg=f"points[{i}][{j}]: {points[i][j]} != {newPoints[i][j]}"
)
@tc_logger
def test_cuda_array_interface(self):
if platform.processor() == "aarch64":
return
import numpy as np
from usdrt import Sdf, Usd, Vt
try:
import warp as wp
except ImportError:
if TestClass is omni.kit.test.AsyncTestCase:
# warp not available for testing in kit at this time
return
raise
stage = Usd.Stage.CreateInMemory("test.usda")
self.assertTrue(stage)
prim = stage.DefinePrim(Sdf.Path("/prim"))
attr = prim.CreateAttribute("points", Sdf.ValueTypeNames.Point3fArray, True)
self.assertTrue(attr)
idattr = prim.CreateAttribute("faceVertexIndices", Sdf.ValueTypeNames.IntArray, True)
self.assertTrue(idattr)
tag = prim.CreateAttribute("Deformable", Sdf.ValueTypeNames.PrimTypeTag, True)
self.assertTrue(tag)
# First create a warp array from numpy
points = self._getNumpyPoints()
warpPoints = wp.array(points, device="cpu")
with wp.ScopedCudaGuard():
gpuWarpPoints = warpPoints.to("cuda")
warpId = id(gpuWarpPoints)
warpRef = weakref.ref(gpuWarpPoints)
# Create a VtArray from a warp array using the __cuda_array_interface__
self.assertEqual(ctypes.c_long.from_address(warpId).value, 1)
vtPoints = Vt.Vec3fArray(gpuWarpPoints)
self.assertEqual(ctypes.c_long.from_address(warpId).value, 2)
# Delete the warp reference to check that the VtArray kept it alive
del gpuWarpPoints
self.assertEqual(ctypes.c_long.from_address(warpId).value, 1)
# Set the Fabric attribute which will make a CUDA copy from warp to Fabric
self.assertTrue(attr.Set(vtPoints))
# OM-84460 - IntArray supported for 1d warp arrays
warp_ids = wp.zeros(shape=1024, dtype=int, device="cuda")
vt_ids = Vt.IntArray(warp_ids)
self.assertTrue(idattr.Set(vt_ids))
wp.synchronize()
# Check the VtArray destruction released the warp array
del vtPoints
self.assertIsNone(warpRef())
# Retrieve a new Fabric VtArray from usdrt
newVtPoints = attr.Get()
self.assertTrue(newVtPoints.HasFabricGpuData())
# Create a new attribute which would invalidate any existing Fabric pointer
attr2 = prim.CreateAttribute("badattr", Sdf.ValueTypeNames.Float, True)
attr2.Set(3.5)
newWarpPoints = warp_array_from_cuda_array_interface(newVtPoints)
# Delete the fabric VtArray to ensure the data was really copied into warp
del newVtPoints
newPoints = newWarpPoints.numpy()
# Now compare the round-trip through usdrt was a success
self.assertEqual(points.shape, newPoints.shape)
for i in range(1024):
for j in range(3):
self.assertEqual(
points[i][j], newPoints[i][j], msg=f"points[{i}][{j}]: {points[i][j]} != {newPoints[i][j]}"
)
@tc_logger
def test_repr(self):
from usdrt import Vt
test_array = Vt.IntArray(4)
result = "Vt.IntArray(4, ("
for i in range(4):
test_array[i] = i
result += str(i)
if i < 3:
result += ", "
else:
result += ")"
result += ")"
self.assertEqual(result, repr(test_array))
@tc_logger
def test_str(self):
from usdrt import Vt
from pxr import Vt as PxrVt
test_array = Vt.IntArray(range(4))
expected = str(PxrVt.IntArray(range(4)))
self.assertEqual(str(test_array), expected)
@tc_logger
def test_assetarray(self):
from usdrt import Sdf, Vt
test_array = Vt.AssetArray(4)
for i in range(4):
test_array[i] = Sdf.AssetPath(f"hello{i}", f"hello{i}.txt")
self.assertEqual(len(test_array), 4)
# This should not cause a crash
del test_array
@tc_logger
def test_arraybuffer_types(self):
import numpy as np
from usdrt import Vt
self.assertTrue(Vt.BoolArray(np.zeros(shape=(10, 1), dtype=np.bool_)).IsPythonData())
self.assertTrue(Vt.CharArray(np.zeros(shape=(10, 1), dtype=np.byte)).IsPythonData())
self.assertTrue(Vt.UCharArray(np.zeros(shape=(10, 1), dtype=np.ubyte)).IsPythonData())
self.assertTrue(Vt.DoubleArray(np.zeros(shape=(10, 1), dtype=np.float64)).IsPythonData())
self.assertTrue(Vt.FloatArray(np.zeros(shape=(10, 1), dtype=np.float32)).IsPythonData())
self.assertTrue(Vt.HalfArray(np.zeros(shape=(10, 1), dtype=np.float16)).IsPythonData())
self.assertTrue(Vt.IntArray(np.zeros(shape=(10, 1), dtype=np.intc)).IsPythonData())
self.assertTrue(Vt.Int64Array(np.zeros(shape=(10, 1), dtype=np.longlong)).IsPythonData())
self.assertTrue(Vt.ShortArray(np.zeros(shape=(10, 1), dtype=np.short)).IsPythonData())
self.assertTrue(Vt.UInt64Array(np.zeros(shape=(10, 1), dtype=np.ulonglong)).IsPythonData())
self.assertTrue(Vt.UIntArray(np.zeros(shape=(10, 1), dtype=np.uintc)).IsPythonData())
self.assertTrue(Vt.UShortArray(np.zeros(shape=(10, 1), dtype=np.ushort)).IsPythonData())
self.assertTrue(Vt.Matrix3dArray(np.zeros(shape=(10, 9), dtype=np.float64)).IsPythonData())
self.assertTrue(Vt.Matrix3fArray(np.zeros(shape=(10, 9), dtype=np.float32)).IsPythonData())
self.assertTrue(Vt.Matrix4dArray(np.zeros(shape=(10, 16), dtype=np.float64)).IsPythonData())
self.assertTrue(Vt.Matrix4fArray(np.zeros(shape=(10, 16), dtype=np.float32)).IsPythonData())
self.assertTrue(Vt.QuatdArray(np.zeros(shape=(10, 4), dtype=np.float64)).IsPythonData())
self.assertTrue(Vt.QuatfArray(np.zeros(shape=(10, 4), dtype=np.float32)).IsPythonData())
self.assertTrue(Vt.QuathArray(np.zeros(shape=(10, 4), dtype=np.float16)).IsPythonData())
self.assertTrue(Vt.Vec2dArray(np.zeros(shape=(10, 2), dtype=np.float64)).IsPythonData())
self.assertTrue(Vt.Vec3dArray(np.zeros(shape=(10, 3), dtype=np.float64)).IsPythonData())
self.assertTrue(Vt.Vec4dArray(np.zeros(shape=(10, 4), dtype=np.float64)).IsPythonData())
self.assertTrue(Vt.Vec2fArray(np.zeros(shape=(10, 2), dtype=np.float32)).IsPythonData())
self.assertTrue(Vt.Vec3fArray(np.zeros(shape=(10, 3), dtype=np.float32)).IsPythonData())
self.assertTrue(Vt.Vec4fArray(np.zeros(shape=(10, 4), dtype=np.float32)).IsPythonData())
self.assertTrue(Vt.Vec2hArray(np.zeros(shape=(10, 2), dtype=np.float16)).IsPythonData())
self.assertTrue(Vt.Vec3hArray(np.zeros(shape=(10, 3), dtype=np.float16)).IsPythonData())
self.assertTrue(Vt.Vec4hArray(np.zeros(shape=(10, 4), dtype=np.float16)).IsPythonData())
self.assertTrue(Vt.Vec2iArray(np.zeros(shape=(10, 2), dtype=np.intc)).IsPythonData())
self.assertTrue(Vt.Vec3iArray(np.zeros(shape=(10, 3), dtype=np.intc)).IsPythonData())
self.assertTrue(Vt.Vec4iArray(np.zeros(shape=(10, 4), dtype=np.intc)).IsPythonData())
@tc_logger
def test_implicit_conversion_bindings(self):
from usdrt import Gf, Sdf, Usd, Vt
stage = Usd.Stage.CreateInMemory("test.usda")
self.assertTrue(stage)
prim = stage.DefinePrim(Sdf.Path("/prim"))
# IntArray
intarray = prim.CreateAttribute("intarray", Sdf.ValueTypeNames.IntArray, True)
self.assertTrue(intarray)
intarray.Set(Vt.IntArray([0, 1, 2]))
intlist = list(prim.GetAttribute("intarray").Get())
self.assertEqual(len(intlist), 3)
intlist.extend([3])
self.assertEqual(len(intlist), 4)
self.assertTrue(prim.GetAttribute("intarray").Set(intlist))
updated_list = prim.GetAttribute("intarray").Get()
self.assertEqual(len(updated_list), 4)
self.assertEqual(list(updated_list), [0, 1, 2, 3])
# Point3fArray
points = prim.CreateAttribute("points", Sdf.ValueTypeNames.Point3fArray, True)
self.assertTrue(points)
points.Set(Vt.Vec3fArray([[0.0, 0.0, 0.0], [1.0, 1.0, 1.0], [2.0, 2.0, 2.0]]))
vertices = list(prim.GetAttribute("points").Get())
self.assertEqual(len(vertices), 3)
vertices.extend([[3.0, 3.0, 3.0]])
prim.GetAttribute("points").Set(vertices)
updated_vertices = prim.GetAttribute("points").Get()
self.assertEqual(len(updated_vertices), 4)
| 14,605 | Python | 34.537713 | 111 | 0.621294 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/scenegraph/tests/test_rtboundable.py | __copyright__ = "Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import os
import pathlib
import platform
import sys
import time
import unittest
from . import tc_logger
def setUpModule():
# pre-load USD before anything else to prevent crash
# from weird carb conflict
# FIXME ^^^
try:
from . import update_path_and_load_usd
update_path_and_load_usd()
except ImportError:
# not needed in Kit
pass
try:
import omni.kit.test
TestClass = omni.kit.test.AsyncTestCase
TEST_DIR = str(pathlib.Path(__file__).parent.parent.parent.parent)
except ImportError:
from . import TestRtScenegraph
TestClass = TestRtScenegraph
TEST_DIR = "."
class TestRtBoundable(TestClass):
@tc_logger
def test_ctor(self):
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
boundable = Rt.Boundable(prim)
self.assertTrue(boundable)
empty = Rt.Boundable()
self.assertFalse(empty)
@tc_logger
def test_get_prim(self):
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
boundable = Rt.Boundable(prim)
self.assertTrue(boundable)
check_prim = boundable.GetPrim()
self.assertEqual(prim.GetPath(), check_prim.GetPath())
@tc_logger
def test_get_path(self):
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
boundable = Rt.Boundable(prim)
self.assertTrue(boundable)
self.assertEqual(prim.GetPath(), boundable.GetPath())
@tc_logger
def test_world_extent(self):
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
boundable = Rt.Boundable(prim)
self.assertTrue(boundable)
extent = Gf.Range3d(Gf.Vec3d(-10, -10, -10), Gf.Vec3d(10, 10, 10))
attr = boundable.CreateWorldExtentAttr(extent)
self.assertTrue(attr)
attr = boundable.GetWorldExtentAttr()
self.assertTrue(attr)
world_ext = attr.Get()
self.assertEqual(extent, world_ext)
@tc_logger
def test_has_world_extent(self):
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
boundable = Rt.Boundable(prim)
self.assertTrue(boundable)
self.assertFalse(boundable.HasWorldExtent())
extent = Gf.Range3d(Gf.Vec3d(-10, -10, -10), Gf.Vec3d(10, 10, 10))
attr = boundable.CreateWorldExtentAttr(extent)
self.assertTrue(attr)
self.assertTrue(boundable.HasWorldExtent())
@tc_logger
def test_clear_world_extent(self):
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
boundable = Rt.Boundable(prim)
self.assertTrue(boundable)
self.assertFalse(boundable.HasWorldXform())
extent = Gf.Range3d(Gf.Vec3d(-10, -10, -10), Gf.Vec3d(10, 10, 10))
attr = boundable.CreateWorldExtentAttr(extent)
self.assertTrue(attr)
self.assertTrue(boundable.HasWorldExtent())
boundable.ClearWorldExtent()
self.assertFalse(boundable.HasWorldExtent())
@tc_logger
def test_set_world_extent_from_usd(self):
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
boundable = Rt.Boundable(prim)
self.assertTrue(boundable)
self.assertFalse(boundable.HasWorldExtent())
self.assertTrue(boundable.SetWorldExtentFromUsd())
self.assertTrue(boundable.HasWorldExtent())
attr = boundable.GetWorldExtentAttr()
self.assertTrue(attr)
extent = attr.Get()
expected = Gf.Range3d(Gf.Vec3d(247.11319, -249.90994, 0.0), Gf.Vec3d(247.11328, 249.91781, 500.0))
self.assertTrue(Gf.IsClose(extent.GetMin(), expected.GetMin(), 0.001))
self.assertTrue(Gf.IsClose(extent.GetMax(), expected.GetMax(), 0.001))
@tc_logger
def test_boundable_tokens(self):
from usdrt import Rt
self.assertEqual(Rt.Tokens.worldExtent, "_worldExtent")
@tc_logger
def test_repr_representation(self):
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
boundable = Rt.Boundable(prim)
expected = "Boundable(</Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back>)"
self.assertEqual(repr(boundable), expected)
| 6,321 | Python | 28.962085 | 106 | 0.655434 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/scenegraph/tests/test_rtxformable.py | __copyright__ = "Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import os
import pathlib
import platform
import sys
import time
import unittest
from . import tc_logger
def setUpModule():
# pre-load USD before anything else to prevent crash
# from weird carb conflict
# FIXME ^^^
try:
from . import update_path_and_load_usd
update_path_and_load_usd()
except ImportError:
# not needed in Kit
pass
try:
import omni.kit.test
TestClass = omni.kit.test.AsyncTestCase
TEST_DIR = str(pathlib.Path(__file__).parent.parent.parent.parent)
except ImportError:
from . import TestRtScenegraph
TestClass = TestRtScenegraph
TEST_DIR = "."
class TestRtXformable(TestClass):
@tc_logger
def test_ctor(self):
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
xformable = Rt.Xformable(prim)
self.assertTrue(xformable)
empty = Rt.Xformable()
self.assertFalse(empty)
@tc_logger
def test_get_prim(self):
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
xformable = Rt.Xformable(prim)
self.assertTrue(xformable)
check_prim = xformable.GetPrim()
self.assertEqual(prim.GetPath(), check_prim.GetPath())
@tc_logger
def test_get_path(self):
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
xformable = Rt.Xformable(prim)
self.assertTrue(xformable)
self.assertEqual(prim.GetPath(), xformable.GetPath())
@tc_logger
def test_world_position(self):
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
xformable = Rt.Xformable(prim)
self.assertTrue(xformable)
new_world_pos = Gf.Vec3d(100, 200, 300)
offset = Gf.Vec3d(100, 200, 300)
attr = xformable.CreateWorldPositionAttr(new_world_pos)
self.assertTrue(attr)
attr = xformable.GetWorldPositionAttr()
self.assertTrue(attr)
world_pos = attr.Get()
self.assertEqual(new_world_pos, world_pos)
world_pos += offset
attr.Set(world_pos)
@tc_logger
def test_world_orientation(self):
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
xformable = Rt.Xformable(prim)
self.assertTrue(xformable)
new_world_or = Gf.Quatf(0.5, -1, 2, -3)
attr = xformable.CreateWorldOrientationAttr(new_world_or)
self.assertTrue(attr)
attr = xformable.GetWorldOrientationAttr()
self.assertTrue(attr)
world_or = attr.Get()
self.assertEqual(new_world_or, world_or)
@tc_logger
def test_world_scale(self):
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
xformable = Rt.Xformable(prim)
self.assertTrue(xformable)
new_world_scale = Gf.Vec3f(100, 200, 300)
attr = xformable.CreateWorldScaleAttr(new_world_scale)
self.assertTrue(attr)
attr = xformable.GetWorldScaleAttr()
self.assertTrue(attr)
world_scale = attr.Get()
self.assertEqual(new_world_scale, world_scale)
@tc_logger
def test_local_matrix(self):
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
xformable = Rt.Xformable(prim)
self.assertTrue(xformable)
new_local_matrix = Gf.Matrix4d(2)
attr = xformable.CreateLocalMatrixAttr(new_local_matrix)
self.assertTrue(attr)
attr = xformable.GetLocalMatrixAttr()
self.assertTrue(attr)
local_matrix = attr.Get()
self.assertEqual(new_local_matrix, local_matrix)
@tc_logger
def test_has_world_xform(self):
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
xformable = Rt.Xformable(prim)
self.assertTrue(xformable)
self.assertFalse(xformable.HasWorldXform())
new_world_pos = Gf.Vec3d(100, 200, 300)
attr = xformable.CreateWorldPositionAttr(new_world_pos)
self.assertTrue(attr)
self.assertTrue(xformable.HasWorldXform())
@tc_logger
def test_clear_world_xform(self):
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
xformable = Rt.Xformable(prim)
self.assertTrue(xformable)
self.assertFalse(xformable.HasWorldXform())
new_world_pos = Gf.Vec3d(100, 200, 300)
attr = xformable.CreateWorldPositionAttr(new_world_pos)
self.assertTrue(attr)
self.assertTrue(xformable.HasWorldXform())
xformable.ClearWorldXform()
self.assertFalse(xformable.HasWorldXform())
@tc_logger
def test_set_world_xform_from_usd(self):
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
xformable = Rt.Xformable(prim)
self.assertTrue(xformable)
self.assertFalse(xformable.HasWorldXform())
self.assertTrue(xformable.SetWorldXformFromUsd())
self.assertTrue(xformable.HasWorldXform())
pos_attr = xformable.GetWorldPositionAttr()
self.assertTrue(pos_attr)
orient_attr = xformable.GetWorldOrientationAttr()
self.assertTrue(orient_attr)
scale_attr = xformable.GetWorldScaleAttr()
self.assertTrue(scale_attr)
self.assertTrue(Gf.IsClose(pos_attr.Get(), Gf.Vec3d(0, 0, 250), 0.00001))
self.assertTrue(Gf.IsClose(orient_attr.Get(), Gf.Quatf(0.5, -0.5, 0.5, -0.5), 0.00001))
self.assertTrue(Gf.IsClose(scale_attr.Get(), Gf.Vec3f(1, 1, 1), 0.00001))
@tc_logger
def test_has_local_xform(self):
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
xformable = Rt.Xformable(prim)
self.assertTrue(xformable)
self.assertFalse(xformable.HasLocalXform())
new_local_mat = Gf.Matrix4d(2)
attr = xformable.CreateLocalMatrixAttr(new_local_mat)
self.assertTrue(attr)
self.assertTrue(xformable.HasLocalXform())
@tc_logger
def test_clear_local_xform(self):
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
xformable = Rt.Xformable(prim)
self.assertTrue(xformable)
self.assertFalse(xformable.HasLocalXform())
new_local_mat = Gf.Matrix4d(2)
attr = xformable.CreateLocalMatrixAttr(new_local_mat)
self.assertTrue(attr)
self.assertTrue(xformable.HasLocalXform())
xformable.ClearLocalXform()
self.assertFalse(xformable.HasLocalXform())
@tc_logger
def test_set_local_xform_from_usd(self):
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
xformable = Rt.Xformable(prim)
self.assertTrue(xformable)
self.assertFalse(xformable.HasLocalXform())
self.assertTrue(xformable.SetLocalXformFromUsd())
self.assertTrue(xformable.HasLocalXform())
attr = xformable.GetLocalMatrixAttr()
self.assertTrue(attr)
self.assertTrue(Gf.IsClose(attr.Get(), Gf.Matrix4d(1), 0.00001))
@tc_logger
def test_tokens(self):
from usdrt import Rt
self.assertEqual(Rt.Tokens.worldPosition, "_worldPosition")
self.assertEqual(Rt.Tokens.worldOrientation, "_worldOrientation")
self.assertEqual(Rt.Tokens.worldScale, "_worldScale")
self.assertEqual(Rt.Tokens.localMatrix, "_localMatrix")
@tc_logger
def test_repr_representation(self):
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
xformable = Rt.Xformable(prim)
expected = "Xformable(</Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back>)"
self.assertEqual(repr(xformable), expected)
| 10,955 | Python | 29.518106 | 97 | 0.651118 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/scenegraph/tests/test_pointInstancer.py | __copyright__ = "Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import os
import pathlib
import platform
import sys
import time
import unittest
from . import tc_logger
def setUpModule():
# pre-load USD before anything else to prevent crash
# from weird carb conflict
# FIXME ^^^
try:
from . import update_path_and_load_usd
update_path_and_load_usd()
except ImportError:
# not needed in Kit
pass
try:
import omni.kit.test
TestClass = omni.kit.test.AsyncTestCase
TEST_DIR = str(pathlib.Path(__file__).parent.parent.parent.parent)
except ImportError:
from . import TestRtScenegraph
TestClass = TestRtScenegraph
TEST_DIR = "."
class TestUsdGeomPointInstancer(TestClass):
@tc_logger
def test_get_relationship(self):
from usdrt import Sdf, Usd, UsdGeom
stage = Usd.Stage.CreateInMemory("test.usda")
self.assertTrue(stage)
prim = stage.DefinePrim(Sdf.Path("/inst"), "PointInstancer")
self.assertFalse(prim.HasRelationship("prototypes"))
inst = UsdGeom.PointInstancer(prim)
self.assertTrue(inst)
# create attribute using prim api
rel = prim.CreateRelationship(UsdGeom.Tokens.prototypes, False)
self.assertTrue(rel)
# verify get attribute using schema api
protoRel = inst.GetPrototypesRel()
self.assertTrue(protoRel)
self.assertTrue(protoRel.GetName() == "prototypes")
@tc_logger
def test_create_relationship(self):
from usdrt import Sdf, Usd, UsdGeom
stage = Usd.Stage.CreateInMemory("test.usda")
self.assertTrue(stage)
prim = stage.DefinePrim(Sdf.Path("/inst"), "PointInstancer")
self.assertFalse(prim.HasRelationship("prototypes"))
# create rel using schema api
inst = UsdGeom.PointInstancer(prim)
self.assertTrue(inst)
rel = inst.CreatePrototypesRel()
# verify using prim api
self.assertTrue(rel)
self.assertTrue(prim.HasRelationship(UsdGeom.Tokens.prototypes))
self.assertTrue(rel.GetName() == "prototypes")
| 2,519 | Python | 27.965517 | 78 | 0.687177 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/scenegraph/tests/test_gf_vec_extras.py | __copyright__ = "Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import copy
import math
import os
import pathlib
import platform
import sys
import time
import unittest
from . import tc_logger
def setUpModule():
# pre-load USD before anything else to prevent crash
# from weird carb conflict
# FIXME ^^^
try:
from . import update_path_and_load_usd
update_path_and_load_usd()
except ImportError:
# not needed in Kit
pass
try:
import omni.kit.test
TestClass = omni.kit.test.AsyncTestCase
TEST_DIR = str(pathlib.Path(__file__).parent.parent.parent.parent)
except ImportError:
from . import TestRtScenegraph
TestClass = TestRtScenegraph
TEST_DIR = "."
def get_vec_info():
"""Return list of tuples of class, scalar size, item count, and format string"""
from usdrt import Gf
vec_info = [
(Gf.Vec2d, 8, 2, "d"),
(Gf.Vec2f, 4, 2, "f"),
(Gf.Vec2h, 2, 2, "e"),
(Gf.Vec2i, 4, 2, "i"),
(Gf.Vec3d, 8, 3, "d"),
(Gf.Vec3f, 4, 3, "f"),
(Gf.Vec3h, 2, 3, "e"),
(Gf.Vec3i, 4, 3, "i"),
(Gf.Vec4d, 8, 4, "d"),
(Gf.Vec4f, 4, 4, "f"),
(Gf.Vec4h, 2, 4, "e"),
(Gf.Vec4i, 4, 4, "i"),
]
return vec_info
def get_vec_numpy_types():
import numpy
import usdrt
equivalent_types = {
usdrt.Gf.Vec2d: numpy.double,
usdrt.Gf.Vec2f: numpy.single,
usdrt.Gf.Vec2h: numpy.half,
usdrt.Gf.Vec2i: numpy.int,
usdrt.Gf.Vec3d: numpy.double,
usdrt.Gf.Vec3f: numpy.single,
usdrt.Gf.Vec3h: numpy.half,
usdrt.Gf.Vec3i: numpy.int,
usdrt.Gf.Vec4d: numpy.double,
usdrt.Gf.Vec4f: numpy.single,
usdrt.Gf.Vec4h: numpy.half,
usdrt.Gf.Vec4i: numpy.int,
}
return equivalent_types
class TestGfVecBuffer(TestClass):
"""Test buffer protocol for usdrt.Gf.Vec* classes"""
@tc_logger
def test_buffer_inspect(self):
"""Use memoryview to validate that buffer protocol is implemented"""
vec_info = get_vec_info()
test_values = [9, 8, 7, 6]
for Vec, size, count, fmt in vec_info:
v = Vec(*test_values[:count])
view = memoryview(v)
self.assertEquals(view.itemsize, size)
self.assertEquals(view.ndim, 1)
self.assertEquals(view.shape, (count,))
self.assertEquals(view.format, fmt)
self.assertEquals(view.obj, Vec(*test_values[:count]))
@tc_logger
def test_buffer_init(self):
"""Validate initialization from an array using buffer protocol"""
import array
vec_info = get_vec_info()
test_values = [9, 8, 7, 6]
for Vec, size, count, fmt in vec_info:
if fmt == "e":
# GfHalf not supported with array.array
continue
test_array = array.array(fmt, test_values[:count])
test_vec = Vec(test_array)
self.assertEquals(test_vec, Vec(*test_values[:count]))
@tc_logger
def test_buffer_init_from_pxr_type(self):
"""Validate initialization from equivalent Pixar types"""
import pxr
import usdrt
vec_info = get_vec_info()
equivalent_types = {
usdrt.Gf.Vec2d: pxr.Gf.Vec2d,
usdrt.Gf.Vec2f: pxr.Gf.Vec2f,
usdrt.Gf.Vec2h: pxr.Gf.Vec2h,
usdrt.Gf.Vec2i: pxr.Gf.Vec2i,
usdrt.Gf.Vec3d: pxr.Gf.Vec3d,
usdrt.Gf.Vec3f: pxr.Gf.Vec3f,
usdrt.Gf.Vec3h: pxr.Gf.Vec3h,
usdrt.Gf.Vec3i: pxr.Gf.Vec3i,
usdrt.Gf.Vec4d: pxr.Gf.Vec4d,
usdrt.Gf.Vec4f: pxr.Gf.Vec4f,
usdrt.Gf.Vec4h: pxr.Gf.Vec4h,
usdrt.Gf.Vec4i: pxr.Gf.Vec4i,
}
test_values = [9, 8, 7, 6]
for Vec, size, count, fmt in vec_info:
test_pxr_type = equivalent_types[Vec](test_values[:count])
# Note that in all cases pybind choses the tuple initializer and
# not the buffer initializer. Oh well.
test_vec = Vec(test_pxr_type)
self.assertEquals(test_vec, Vec(*test_values[:count]))
@tc_logger
def test_buffer_init_from_numpy_type(self):
"""Test initialization from numpy types"""
import numpy
vec_info = get_vec_info()
equivalent_types = get_vec_numpy_types()
test_values = [9, 8, 7, 6]
for Vec, size, count, fmt in vec_info:
test_numpy_type = numpy.array(test_values[:count], dtype=equivalent_types[Vec])
# Note that in all cases except half pybind choses the tuple initializer and
# not the buffer initializer. Oh well.
test_vec = Vec(test_numpy_type)
self.assertEquals(test_vec, Vec(*test_values[:count]))
@tc_logger
def test_buffer_init_wrong_type(self):
"""Verify that an exception is raised with initializing via buffer with different data type"""
import array
vec_info = get_vec_info()
test_values = [9, 8, 7, 6]
for Vec, size, count, fmt in vec_info:
if fmt in ["e"]:
# GfHalf is tricky because it will cast from any
# numeric type, which pybind too-helpfully interprets
# into a tuple of GfHalf
continue
# Here, pybind will convert arrays of similar types to tuples
# which is fine I guess but makes testing harder to validate
# type correctness with buffer support
test_array = array.array("d" if fmt == "i" else "h", test_values[:count])
with self.assertRaises(ValueError):
test_vec = Vec(test_array)
@tc_logger
def test_buffer_init_wrong_size(self):
"""Verify that an exception is raised with initializing via buffer with different data array length"""
import array
vec_info = get_vec_info()
test_values = [9, 8, 7, 6, 5]
for Vec, size, count, fmt in vec_info:
if fmt in ["e"]:
# GfHalf not supported with array.array
continue
# Here, pybind will convert arrays of similar types to tuples
# which is fine I guess but makes testing harder to validate
# type correctness with buffer support
test_array = array.array(fmt, test_values)
with self.assertRaises(ValueError):
test_vec = Vec(test_array)
@tc_logger
def test_buffer_init_wrong_dimension(self):
"""Verify that an exception is raised with initializing via buffer with different data dimensions"""
import numpy
vec_info = get_vec_info()
equivalent_types = get_vec_numpy_types()
test_values = [9, 8, 7, 6]
for Vec, size, count, fmt in vec_info:
test_array = numpy.array([test_values[:count], test_values[:count]], dtype=equivalent_types[Vec])
with self.assertRaises(ValueError):
test_vec = Vec(test_array)
class TestGfVecCopy(TestClass):
"""Test copy and deepcopy support for Gf.Vec* classes"""
@tc_logger
def test_copy(self):
"""Test __copy__"""
vec_info = get_vec_info()
for Vec, size, count, fmt in vec_info:
x = Vec()
y = x
self.assertTrue(y is x)
y[0] = 10
self.assertEqual(x[0], 10)
z = copy.copy(y)
self.assertFalse(z is y)
y[0] = 100
self.assertEqual(z[0], 10)
@tc_logger
def test_deepcopy(self):
"""Test __deepcopy__"""
vec_info = get_vec_info()
for Vec, size, count, fmt in vec_info:
x = Vec()
y = x
self.assertTrue(y is x)
y[0] = 10
self.assertEqual(x[0], 10)
z = copy.deepcopy(y)
self.assertFalse(z is y)
y[0] = 100
self.assertEqual(z[0], 10)
class TestGfVecDebugging(TestClass):
"""Test human readable output functions for debugging"""
@tc_logger
def test_repr_representation(self):
"""Test __repr__"""
from usdrt import Gf
test_values = [9, 8, 7, 6]
test_vec = Gf.Vec4d(test_values)
expected = "Gf.Vec4d(9.0, 8.0, 7.0, 6.0)"
self.assertEqual(repr(test_vec), expected)
| 8,820 | Python | 28.208609 | 110 | 0.575397 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/scenegraph/tests/test_prim.py | __copyright__ = "Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import os
import pathlib
import platform
import sys
import time
import unittest
from . import tc_logger
def setUpModule():
# pre-load USD before anything else to prevent crash
# from weird carb conflict
# FIXME ^^^
try:
from . import update_path_and_load_usd
update_path_and_load_usd()
except ImportError:
# not needed in Kit
pass
try:
import omni.kit.test
TestClass = omni.kit.test.AsyncTestCase
TEST_DIR = str(pathlib.Path(__file__).parent.parent.parent.parent)
except ImportError:
from . import TestRtScenegraph
TestClass = TestRtScenegraph
TEST_DIR = "."
class TestUsdPrim(TestClass):
@tc_logger
def test_has_attribute(self):
from usdrt import Sdf, Usd, UsdGeom
# print("Attach to {}".format(os.getpid()))
# time.sleep(10)
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box"))
self.assertTrue(prim)
self.assertTrue(prim.HasAttribute(UsdGeom.Tokens.xformOpOrder))
self.assertFalse(prim.HasAttribute(UsdGeom.Tokens.radius))
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
self.assertTrue(prim.HasAttribute(UsdGeom.Tokens.faceVertexIndices))
# invalid prim should not cause crash
prim = stage.GetPrimAtPath(Sdf.Path("/Invalid"))
self.assertFalse(prim)
self.assertFalse(prim.HasAttribute(UsdGeom.Tokens.radius))
@tc_logger
def test_get_attribute(self):
from usdrt import Sdf, Usd, UsdGeom
# print("Attach to {}".format(os.getpid()))
# time.sleep(10)
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
attr = prim.GetAttribute(UsdGeom.Tokens.doubleSided)
self.assertTrue(attr)
self.assertTrue(attr.GetName() == UsdGeom.Tokens.doubleSided)
# TODO get value
# invalid prim should not cause crash
prim = stage.GetPrimAtPath(Sdf.Path("/Invalid"))
self.assertFalse(prim)
self.assertFalse(prim.GetAttribute(UsdGeom.Tokens.radius))
@tc_logger
def test_get_attributes(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
attributes = prim.GetAttributes()
self.assertTrue(len(attributes) == 12)
# invalid prim should not cause crash
prim = stage.GetPrimAtPath(Sdf.Path("/Invalid"))
self.assertFalse(prim)
self.assertFalse(prim.GetAttributes())
@tc_logger
def test_create_attribute(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.CreateInMemory("test.usda")
self.assertTrue(stage)
prim = stage.DefinePrim(Sdf.Path("/prim"))
self.assertFalse(prim.HasAttribute("myAttr"))
attr = prim.CreateAttribute("myAttr", Sdf.ValueTypeNames.Int, True)
self.assertTrue(attr)
self.assertTrue(prim.HasAttribute("myAttr"))
self.assertTrue(attr.GetName() == "myAttr")
@tc_logger
def test_create_attribute_invalid(self):
# Ensure creating attribute on invalid prim does not crash
from usdrt import Gf, Rt, Sdf, Usd
stage = Usd.Stage.CreateInMemory("test.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/invalid"))
self.assertFalse(prim)
self.assertFalse(prim.IsValid())
# this should not crash
attr = prim.CreateAttribute("testAttr", Sdf.ValueTypeNames.Int, True)
self.assertFalse(attr)
# this should not crash
xformable = Rt.Xformable(prim)
attr = xformable.CreateWorldPositionAttr(Gf.Vec3d(0, 200, 0))
self.assertFalse(attr)
@tc_logger
def test_has_relationship(self):
from usdrt import Sdf, Usd, UsdGeom, UsdShade
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall/Green1SG"))
self.assertTrue(prim)
self.assertTrue(prim.HasRelationship(UsdShade.Tokens.materialBinding))
self.assertFalse(prim.HasRelationship(UsdGeom.Tokens.proxyPrim))
# invalid prim should not cause crash
prim = stage.GetPrimAtPath(Sdf.Path("/Invalid"))
self.assertFalse(prim)
self.assertFalse(prim.HasRelationship(UsdShade.Tokens.materialBinding))
@tc_logger
def test_get_relationship(self):
from usdrt import Sdf, Usd, UsdShade
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall/Green1SG"))
self.assertTrue(prim)
rel = prim.GetRelationship(UsdShade.Tokens.materialBinding)
targets = rel.GetTargets()
self.assertEqual(len(targets), 1)
self.assertEqual(targets[0], Sdf.Path("/Cornell_Box/Root/Looks/Green1SG"))
# invalid prim should not cause crash
prim = stage.GetPrimAtPath(Sdf.Path("/Invalid"))
self.assertFalse(prim)
self.assertFalse(prim.GetRelationship(UsdShade.Tokens.materialBinding))
@tc_logger
def test_get_relationships(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall/Green1SG"))
self.assertTrue(prim)
relationships = prim.GetRelationships()
self.assertEqual(len(relationships), 1)
targets = relationships[0].GetTargets()
self.assertEqual(len(targets), 1)
self.assertEqual(targets[0], Sdf.Path("/Cornell_Box/Root/Looks/Green1SG"))
# non-authored relationships from schema (proxyPrim) not included here
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall"))
relationships = prim.GetRelationships()
self.assertEqual(len(relationships), 0)
# invalid prim should not cause crash
prim = stage.GetPrimAtPath(Sdf.Path("/Invalid"))
self.assertFalse(prim)
self.assertFalse(prim.GetRelationships())
@tc_logger
def test_create_relationship(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall/Green1SG"))
self.assertTrue(prim)
self.assertFalse(prim.HasRelationship("foobar"))
rel = prim.CreateRelationship("foobar")
self.assertTrue(prim.HasRelationship("foobar"))
self.assertFalse(rel.HasAuthoredTargets())
@tc_logger
def test_create_relationship_invalid(self):
# OM_81734 Ensure creating rel on invalid prim does not crash
from usdrt import Sdf, Usd
stage = Usd.Stage.CreateInMemory("test.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/invalid"))
self.assertFalse(prim)
self.assertFalse(prim.IsValid())
# this should not crash
rel = prim.CreateRelationship("testrel")
self.assertFalse(rel)
@tc_logger
def test_remove_property(self):
from usdrt import Sdf, Usd, UsdGeom
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall"))
self.assertTrue(prim)
self.assertTrue(prim.HasAttribute(UsdGeom.Tokens.extent))
self.assertTrue(prim.RemoveProperty(UsdGeom.Tokens.extent))
self.assertFalse(prim.HasAttribute(UsdGeom.Tokens.extent))
# invalid prim should not cause crash
prim = stage.GetPrimAtPath(Sdf.Path("/Invalid"))
self.assertFalse(prim)
self.assertFalse(prim.RemoveProperty(UsdGeom.Tokens.extent))
@tc_logger
def test_family(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP"))
self.assertTrue(prim)
child = prim.GetChild("White_Wall_Back")
self.assertTrue(child)
self.assertTrue(child.GetPath() == Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
parent = prim.GetParent()
self.assertTrue(parent)
self.assertTrue(parent.GetPath() == Sdf.Path("/Cornell_Box/Root"))
sibling = prim.GetNextSibling()
self.assertTrue(sibling)
self.assertTrue(sibling.GetPath() == Sdf.Path("/Cornell_Box/Root/Looks"))
children = prim.GetChildren()
i = 0
for child in children:
child_direct = prim.GetChild(child.GetName())
self.assertEqual(child.GetName(), child_direct.GetName())
i += 1
self.assertEqual(i, 5)
@tc_logger
def test_get_type(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP"))
self.assertTrue(prim)
test_type = prim.GetTypeName()
self.assertEqual(test_type, "Xform")
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
test_type = prim.GetTypeName()
self.assertEqual(test_type, "Mesh")
@tc_logger
def test_set_type(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP"))
self.assertTrue(prim)
self.assertEqual(prim.GetTypeName(), "Xform")
self.assertTrue(prim.SetTypeName("SkelRoot"))
self.assertEqual(prim.GetTypeName(), "SkelRoot")
@tc_logger
def test_has_authored_type(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Emissive_square/Root"))
self.assertTrue(prim)
self.assertFalse(prim.HasAuthoredTypeName())
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP"))
self.assertTrue(prim)
self.assertTrue(prim.HasAuthoredTypeName())
@tc_logger
def test_clear_type(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP"))
self.assertTrue(prim)
self.assertTrue(prim.HasAuthoredTypeName())
prim.ClearTypeName()
self.assertFalse(prim.HasAuthoredTypeName())
@tc_logger
def test_repr_representation(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP"))
self.assertTrue(prim)
expected = "Prim(</Cornell_Box/Root/Cornell_Box1_LP>)"
self.assertEqual(repr(prim), expected)
@tc_logger
def test_has_api(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/CylinderLight"))
self.assertTrue(prim)
self.assertTrue(prim.HasAPI("ShapingAPI"))
self.assertFalse(prim.HasAPI("DoesNotExist"))
@tc_logger
def test_apply_api(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/CylinderLight"))
self.assertTrue(prim)
self.assertTrue(prim.ApplyAPI("Test1"))
self.assertTrue(prim.HasAPI("Test1"))
self.assertTrue(prim.AddAppliedSchema("Test2"))
self.assertTrue(prim.HasAPI("Test2"))
@tc_logger
def test_remove_api(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/CylinderLight"))
self.assertTrue(prim)
self.assertTrue(prim.ApplyAPI("Test1"))
self.assertTrue(prim.HasAPI("Test1"))
self.assertTrue(prim.AddAppliedSchema("Test2"))
self.assertTrue(prim.HasAPI("Test2"))
self.assertTrue(prim.RemoveAPI("Test1"))
self.assertFalse(prim.HasAPI("Test1"))
self.assertTrue(prim.RemoveAppliedSchema("Test2"))
self.assertFalse(prim.HasAPI("Test2"))
@tc_logger
def test_get_applied_schemas(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/CylinderLight"))
self.assertTrue(prim)
schemas = prim.GetAppliedSchemas()
self.assertEqual(len(schemas), 5)
self.assertTrue("LightAPI" in schemas)
self.assertTrue("ShapingAPI" in schemas)
self.assertTrue("CollectionAPI" in schemas)
self.assertTrue("CollectionAPI:lightLink" in schemas)
self.assertTrue("CollectionAPI:shadowLink" in schemas)
@tc_logger
def test_get_stage(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/CylinderLight"))
self.assertTrue(prim)
# force stage2 out of scope
stage2 = prim.GetStage()
self.assertTrue(stage2)
del stage2
# ensure underlying shared data is unchanged
prim = stage.GetPrimAtPath(Sdf.Path("/CylinderLight"))
self.assertTrue(prim)
| 15,183 | Python | 31.444444 | 105 | 0.652704 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/scenegraph/tests/test_valuetypename.py | __copyright__ = "Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import os
import pathlib
import platform
import sys
import time
import unittest
from . import tc_logger
def setUpModule():
# pre-load USD before anything else to prevent crash
# from weird carb conflict
# FIXME ^^^
try:
from . import update_path_and_load_usd
update_path_and_load_usd()
except ImportError:
# not needed in Kit
pass
try:
import omni.kit.test
TestClass = omni.kit.test.AsyncTestCase
TEST_DIR = str(pathlib.Path(__file__).parent.parent.parent.parent)
except ImportError:
from . import TestRtScenegraph
TestClass = TestRtScenegraph
TEST_DIR = "."
class TestSdfValueTypeName(TestClass):
@tc_logger
def test_get_scalar_type(self):
from usdrt import Sdf
scalar_int = Sdf.ValueTypeNames.IntArray.scalarType
self.assertEqual(scalar_int, Sdf.ValueTypeNames.Int)
@tc_logger
def test_get_array_type(self):
from usdrt import Sdf
array_int = Sdf.ValueTypeNames.Int.arrayType
self.assertEqual(array_int, Sdf.ValueTypeNames.IntArray)
@tc_logger
def test_is_array(self):
from usdrt import Sdf
array_type = Sdf.ValueTypeNames.IntArray
scalar_type = Sdf.ValueTypeNames.Int
self.assertTrue(array_type.isArray)
self.assertFalse(scalar_type.isArray)
@tc_logger
def test_is_scalar(self):
from usdrt import Sdf
array_type = Sdf.ValueTypeNames.IntArray
scalar_type = Sdf.ValueTypeNames.Int
self.assertFalse(array_type.isScalar)
self.assertTrue(scalar_type.isScalar)
@tc_logger
def test_repr_representation(self):
from usdrt import Sdf
array_type = Sdf.ValueTypeNames.IntArray
scalar_type = Sdf.ValueTypeNames.Int
array_expected = "Sdf.ValueTypeName('int[]')"
scalar_expected = "Sdf.ValueTypeName('int')"
self.assertEquals(repr(array_type), array_expected)
self.assertEquals(repr(scalar_type), scalar_expected)
| 2,477 | Python | 25.361702 | 78 | 0.691966 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/scenegraph/tests/__init__.py | __copyright__ = "Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import gc
scan_for_test_modules = True
def tc_logger(func):
"""
Print TC macros about the test when running on TC
(unneeded in kit)
"""
def wrapper(*args, **kwargs):
func(*args, **kwargs)
# Always reset global stage cache and collect
# garbage to ensure stage and Fabric cleanup
from pxr import UsdUtils
UsdUtils.StageCache.Get().Clear()
gc.collect()
return wrapper
| 895 | Python | 27.903225 | 78 | 0.710615 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/scenegraph/tests/test_relationship.py | __copyright__ = "Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import os
import pathlib
import platform
import sys
import time
import unittest
from . import tc_logger
def setUpModule():
# pre-load USD before anything else to prevent crash
# from weird carb conflict
# FIXME ^^^
try:
from . import update_path_and_load_usd
update_path_and_load_usd()
except ImportError:
# not needed in Kit
pass
try:
import omni.kit.test
TestClass = omni.kit.test.AsyncTestCase
TEST_DIR = str(pathlib.Path(__file__).parent.parent.parent.parent)
except ImportError:
from . import TestRtScenegraph
TestClass = TestRtScenegraph
TEST_DIR = "."
class TestUsdRelationship(TestClass):
@tc_logger
def test_has_authored_targets(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
rel = stage.GetRelationshipAtPath(
Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall/Green1SG.material:binding")
)
self.assertTrue(rel)
self.assertTrue(rel.HasAuthoredTargets())
rel = stage.GetRelationshipAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall.proxyPrim"))
self.assertTrue(rel)
self.assertFalse(rel.HasAuthoredTargets())
# invalid rel should not cause crash
rel = stage.GetRelationshipAtPath(Sdf.Path("/Cornell_Box.invalid"))
self.assertFalse(rel)
self.assertFalse(rel.HasAuthoredTargets())
@tc_logger
def test_get_targets(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
rel = stage.GetRelationshipAtPath(
Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall/Green1SG.material:binding")
)
self.assertTrue(rel)
targets = rel.GetTargets()
self.assertEqual(len(targets), 1)
self.assertEqual(targets[0], Sdf.Path("/Cornell_Box/Root/Looks/Green1SG"))
# invalid rel should not cause crash
rel = stage.GetRelationshipAtPath(Sdf.Path("/Cornell_Box.invalid"))
self.assertFalse(rel)
self.assertFalse(rel.GetTargets())
@tc_logger
def test_add_target(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
rel = stage.GetRelationshipAtPath(
Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall/Green1SG.material:binding")
)
self.assertTrue(rel)
new_target = Sdf.Path("/Cornell_Box/Root/Looks/Red1SG")
self.assertTrue(rel.AddTarget(new_target))
targets = rel.GetTargets()
self.assertEqual(len(targets), 2)
self.assertEqual(targets[0], Sdf.Path("/Cornell_Box/Root/Looks/Green1SG"))
self.assertEqual(targets[1], new_target)
rel = stage.GetRelationshipAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall.proxyPrim"))
self.assertTrue(rel)
proxy_prim_target = Sdf.Path("/Cube_5")
self.assertTrue(rel.AddTarget(proxy_prim_target))
targets = rel.GetTargets()
self.assertEqual(len(targets), 1)
self.assertEqual(targets[0], proxy_prim_target)
# OM-75327 - add a target to a new relationship
prim = stage.GetPrimAtPath("/Cornell_Box")
self.assertTrue(prim)
rel = prim.CreateRelationship("testRel")
self.assertTrue(rel)
self.assertTrue(rel.AddTarget(proxy_prim_target))
targets = rel.GetTargets()
self.assertEqual(len(targets), 1)
self.assertEqual(targets[0], Sdf.Path("/Cube_5"))
rel = stage.GetRelationshipAtPath(Sdf.Path("/Cornell_Box.invalid"))
self.assertFalse(rel)
self.assertFalse(rel.AddTarget(proxy_prim_target))
@tc_logger
def test_remove_target(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
rel = stage.GetRelationshipAtPath(
Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall/Green1SG.material:binding")
)
self.assertTrue(rel)
# It's valid to try to remove a target that is not
# in the list of targets in the relationship
target_not_in_list = Sdf.Path("/Foo/Bar")
self.assertTrue(rel.RemoveTarget(target_not_in_list))
targets = rel.GetTargets()
self.assertEqual(len(targets), 1)
self.assertEqual(targets[0], Sdf.Path("/Cornell_Box/Root/Looks/Green1SG"))
# Removing a valid target will return empty target lists with GetTarget
target_in_list = Sdf.Path("/Cornell_Box/Root/Looks/Green1SG")
self.assertTrue(rel.RemoveTarget(target_in_list))
targets = rel.GetTargets()
self.assertEqual(len(targets), 0)
# invalid rel should not cause crash
rel = stage.GetRelationshipAtPath(Sdf.Path("/Cornell_Box.invalid"))
self.assertFalse(rel)
self.assertFalse(rel.RemoveTarget(target_not_in_list))
@tc_logger
def test_clear_targets(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
rel = stage.GetRelationshipAtPath(
Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall/Green1SG.material:binding")
)
self.assertTrue(rel)
targets = rel.GetTargets()
self.assertEqual(len(targets), 1)
self.assertEqual(targets[0], Sdf.Path("/Cornell_Box/Root/Looks/Green1SG"))
self.assertTrue(rel.ClearTargets(True))
targets = rel.GetTargets()
self.assertEqual(len(targets), 0)
# invalid rel should not cause crash
rel = stage.GetRelationshipAtPath(Sdf.Path("/Cornell_Box.invalid"))
self.assertFalse(rel)
self.assertFalse(rel.ClearTargets(True))
@tc_logger
def test_set_targets(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
rel = stage.GetRelationshipAtPath(
Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall/Green1SG.material:binding")
)
self.assertTrue(rel)
targets = rel.GetTargets()
self.assertEqual(len(targets), 1)
self.assertEqual(targets[0], Sdf.Path("/Cornell_Box/Root/Looks/Green1SG"))
new_targets = [Sdf.Path("/Cornell_Box/Root/Looks/Red1SG")]
self.assertTrue(rel.SetTargets(new_targets))
targets = rel.GetTargets()
self.assertEqual(len(targets), 1)
self.assertEqual(targets[0], Sdf.Path("/Cornell_Box/Root/Looks/Red1SG"))
too_many_targets = [Sdf.Path("/Foo"), Sdf.Path("/Bar")]
self.assertTrue(rel.SetTargets(too_many_targets))
targets = rel.GetTargets()
self.assertEqual(len(targets), 2)
self.assertEqual(targets[0], Sdf.Path("/Foo"))
self.assertEqual(targets[1], Sdf.Path("/Bar"))
# invalid rel should not cause crash
rel = stage.GetRelationshipAtPath(Sdf.Path("/Cornell_Box.invalid"))
self.assertFalse(rel)
self.assertFalse(rel.SetTargets(new_targets))
@tc_logger
def test_repr_representation(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
rel = stage.GetRelationshipAtPath(
Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall/Green1SG.material:binding")
)
self.assertTrue(rel)
expected = "Relationship(<material:binding>)"
self.assertEquals(repr(rel), expected)
| 8,239 | Python | 33.333333 | 109 | 0.653356 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/scenegraph/tests/testGfMath.py | #!/pxrpythonsubst
#
# Copyright 2016 Pixar
#
# Licensed under the Apache License, Version 2.0 (the "Apache License")
# with the following modification; you may not use this file except in
# compliance with the Apache License and the following modification to it:
# Section 6. Trademarks. is deleted and replaced with:
#
# 6. Trademarks. This License does not grant permission to use the trade
# names, trademarks, service marks, or product names of the Licensor
# and its affiliates, except as required to comply with Section 4(c) of
# the License and to reproduce the content of the NOTICE file.
#
# You may obtain a copy of the Apache License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Apache License with the above modification is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the Apache License for the specific
# language governing permissions and limitations under the Apache License.
#
from __future__ import division
# Note: This is just pulled directly from USD and lightly modified
# https://github.com/PixarAnimationStudios/USD/blob/release/pxr/base/gf/testenv/testGfMath.py
__copyright__ = "Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import math
import sys
import unittest
# In python 3 there is no type called "long", but a regular int is backed by
# a long. Fake it here so we can keep test coverage working for the types
# available in python 2, where there are separate int and long types
if sys.version_info.major >= 3:
long = int
def err(msg):
return "ERROR: " + msg + " failed"
def setUpModule():
# pre-load USD before anything else to prevent crash
# from weird carb conflict
# FIXME ^^^
try:
from . import update_path_and_load_usd
update_path_and_load_usd()
except ImportError:
# not needed in Kit
pass
try:
import omni.kit.test
TestClass = omni.kit.test.AsyncTestCase
except ImportError:
TestClass = unittest.TestCase
class TestGfMath(TestClass):
def _AssertListIsClose(self, first, second, delta=1e-6):
self.assertTrue(len(first) == len(second))
for (f, s) in zip(first, second):
self.assertAlmostEqual(f, s, delta=delta)
""" nv edit - no _HalfRoundTrip
def test_HalfRoundTrip(self):
from pxr.Gf import _HalfRoundTrip
self.assertEqual(1.0, _HalfRoundTrip(1.0))
self.assertEqual(1.0, _HalfRoundTrip(1))
self.assertEqual(2.0, _HalfRoundTrip(2))
self.assertEqual(3.0, _HalfRoundTrip(long(3)))
with self.assertRaises(TypeError):
_HalfRoundTrip([])
"""
def test_RadiansDegrees(self):
from usdrt.Gf import DegreesToRadians, RadiansToDegrees
self.assertEqual(0, RadiansToDegrees(0))
self.assertEqual(180, RadiansToDegrees(math.pi))
self.assertEqual(720, RadiansToDegrees(4 * math.pi))
self.assertEqual(0, DegreesToRadians(0))
self.assertEqual(math.pi, DegreesToRadians(180))
self.assertEqual(8 * math.pi, DegreesToRadians(4 * 360))
""" nv edit - not supporting some basic math stuff for now
def test_Sqr(self):
self.assertEqual(9, Sqr(3))
self.assertAlmostEqual(Sqr(math.sqrt(2)), 2, delta=1e-7)
self.assertEqual(5, Sqr(Vec2i(1,2)))
self.assertEqual(14, Sqr(Vec3i(1,2,3)))
self.assertEqual(5, Sqr(Vec2d(1,2)))
self.assertEqual(14, Sqr(Vec3d(1,2,3)))
self.assertEqual(30, Sqr(Vec4d(1,2,3,4)))
self.assertEqual(5, Sqr(Vec2f(1,2)))
self.assertEqual(14, Sqr(Vec3f(1,2,3)))
self.assertEqual(30, Sqr(Vec4f(1,2,3,4)))
def test_Sgn(self):
self.assertEqual(-1, Sgn(-3))
self.assertEqual(1, Sgn(3))
self.assertEqual(0, Sgn(0))
self.assertEqual(-1, Sgn(-3.3))
self.assertEqual(1, Sgn(3.3))
self.assertEqual(0, Sgn(0.0))
def test_Sqrt(self):
self.assertAlmostEqual( Sqrt(2), math.sqrt(2), delta=1e-5 )
self.assertAlmostEqual( Sqrtf(2), math.sqrt(2), delta=1e-5 )
def test_Exp(self):
self.assertAlmostEqual( Sqr(math.e), Exp(2), delta=1e-5 )
self.assertAlmostEqual( Sqr(math.e), Expf(2), delta=1e-5 )
def test_Log(self):
self.assertEqual(1, Log(math.e))
self.assertAlmostEqual(Log(Exp(math.e)), math.e, delta=1e-5)
self.assertAlmostEqual(Logf(math.e), 1, delta=1e-5)
self.assertAlmostEqual(Logf(Expf(math.e)), math.e, delta=1e-5)
def test_Floor(self):
self.assertEqual(3, Floor(3.141))
self.assertEqual(-4, Floor(-3.141))
self.assertEqual(3, Floorf(3.141))
self.assertEqual(-4, Floorf(-3.141))
def test_Ceil(self):
self.assertEqual(4, Ceil(3.141))
self.assertEqual(-3, Ceil(-3.141))
self.assertEqual(4, Ceilf(3.141))
self.assertEqual(-3, Ceilf(-3.141))
def test_Abs(self):
self.assertAlmostEqual(Abs(-3.141), 3.141, delta=1e-6)
self.assertAlmostEqual(Abs(3.141), 3.141, delta=1e-6)
self.assertAlmostEqual(Absf(-3.141), 3.141, delta=1e-6)
self.assertAlmostEqual(Absf(3.141), 3.141, delta=1e-6)
def test_Round(self):
self.assertEqual(3, Round(3.1))
self.assertEqual(4, Round(3.5))
self.assertEqual(-3, Round(-3.1))
self.assertEqual(-4, Round(-3.6))
self.assertEqual(3, Roundf(3.1))
self.assertEqual(4, Roundf(3.5))
self.assertEqual(-3, Roundf(-3.1))
self.assertEqual(-4, Roundf(-3.6))
def test_Pow(self):
self.assertEqual(16, Pow(2, 4))
self.assertEqual(16, Powf(2, 4))
def test_Clamp(self):
self.assertAlmostEqual(Clamp(3.141, 3.1, 3.2), 3.141, delta=1e-5)
self.assertAlmostEqual(Clamp(2.141, 3.1, 3.2), 3.1, delta=1e-5)
self.assertAlmostEqual(Clamp(4.141, 3.1, 3.2), 3.2, delta=1e-5)
self.assertAlmostEqual(Clampf(3.141, 3.1, 3.2), 3.141, delta=1e-5)
self.assertAlmostEqual(Clampf(2.141, 3.1, 3.2), 3.1, delta=1e-5)
self.assertAlmostEqual(Clampf(4.141, 3.1, 3.2), 3.2, delta=1e-5)
def test_Mod(self):
self.assertEqual(2, Mod(5, 3))
self.assertEqual(1, Mod(-5, 3))
self.assertEqual(2, Modf(5, 3))
self.assertEqual(1, Modf(-5, 3))
"""
""" nv edit - not supporting these for scalars
def test_Dot(self):
from usdrt.Gf import Dot
self.assertEqual(Dot(2.0, 3.0), 6.0)
self.assertEqual(Dot(-2.0, 3.0), -6.0)
def test_CompMult(self):
from usdrt.Gf import CompMult
self.assertEqual(CompMult(2.0, 3.0), 6.0)
self.assertEqual(CompMult(-2.0, 3.0), -6.0)
def test_CompDiv(self):
from usdrt.Gf import CompDiv
self.assertEqual(CompDiv(6.0, 3.0), 2.0)
self.assertEqual(CompDiv(-6.0, 3.0), -2.0)
"""
if __name__ == "__main__":
unittest.main()
| 7,394 | Python | 34.898058 | 93 | 0.649175 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/scenegraph/tests/test_gf_matrix_extras.py | __copyright__ = "Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import copy
import math
import os
import pathlib
import platform
import sys
import time
import unittest
from . import tc_logger
def setUpModule():
# pre-load USD before anything else to prevent crash
# from weird carb conflict
# FIXME ^^^
try:
from . import update_path_and_load_usd
update_path_and_load_usd()
except ImportError:
# not needed in Kit
pass
try:
import omni.kit.test
TestClass = omni.kit.test.AsyncTestCase
TEST_DIR = str(pathlib.Path(__file__).parent.parent.parent.parent)
except ImportError:
from . import TestRtScenegraph
TestClass = TestRtScenegraph
TEST_DIR = "."
def get_mat_info():
"""Return list of tuples of class, scalar size, item count, and format string"""
from usdrt import Gf
mat_info = [
(Gf.Matrix3d, 8, 9, "d"),
(Gf.Matrix3f, 4, 9, "f"),
(Gf.Matrix4d, 8, 16, "d"),
(Gf.Matrix4f, 4, 16, "f"),
]
return mat_info
def get_mat_numpy_types():
import numpy
import usdrt
equivalent_types = {
usdrt.Gf.Matrix3d: numpy.double,
usdrt.Gf.Matrix3f: numpy.single,
usdrt.Gf.Matrix4d: numpy.double,
usdrt.Gf.Matrix4f: numpy.single,
}
return equivalent_types
class TestGfMatBuffer(TestClass):
"""Test buffer protocol for usdrt.Gf.Matrix* classes"""
@tc_logger
def test_buffer_inspect(self):
"""Use memoryview to validate that buffer protocol is implemented"""
mat_info = get_mat_info()
test_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
for Mat, size, count, fmt in mat_info:
v = Mat(*test_values[:count])
view = memoryview(v)
self.assertEquals(view.itemsize, size)
self.assertEquals(view.ndim, 2)
self.assertEquals(view.shape, (math.sqrt(count), math.sqrt(count)))
self.assertEquals(view.format, fmt)
self.assertEquals(view.obj, Mat(*test_values[:count]))
@tc_logger
def test_buffer_init_from_pxr_type(self):
"""Validate initialization from equivalent Pixar types"""
import pxr
import usdrt
mat_info = get_mat_info()
equivalent_types = {
usdrt.Gf.Matrix3d: pxr.Gf.Matrix3d,
usdrt.Gf.Matrix3f: pxr.Gf.Matrix3f,
usdrt.Gf.Matrix4d: pxr.Gf.Matrix4d,
usdrt.Gf.Matrix4f: pxr.Gf.Matrix4f,
}
test_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
for Mat, size, count, fmt in mat_info:
test_pxr_type = equivalent_types[Mat](*test_values[:count])
test_mat = Mat(test_pxr_type)
self.assertEquals(test_mat, Mat(*test_values[:count]))
@tc_logger
def test_buffer_init_from_numpy_type(self):
"""Test initialization from numpy types"""
import numpy
mat_info = get_mat_info()
equivalent_types = get_mat_numpy_types()
test_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
for Mat, size, count, fmt in mat_info:
py_mat = []
stride = int(math.sqrt(count))
for i in range(stride):
py_mat.append(test_values[i * stride : i * stride + stride])
test_numpy_type = numpy.array(py_mat, dtype=equivalent_types[Mat])
test_mat = Mat(test_numpy_type)
self.assertEquals(test_mat, Mat(*test_values[:count]))
@tc_logger
def test_buffer_init_wrong_type(self):
"""Verify that an exception is raised with initializing via buffer with different data type"""
import numpy
mat_info = get_mat_info()
equivalent_types = get_mat_numpy_types()
test_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
for Mat, size, count, fmt in mat_info:
py_mat = []
stride = int(math.sqrt(count))
for i in range(stride):
py_mat.append(test_values[i * stride : i * stride + stride])
test_numpy_type = numpy.array(py_mat, dtype=numpy.int_)
with self.assertRaises(ValueError):
test_mat = Mat(test_numpy_type)
@tc_logger
def test_buffer_init_wrong_size(self):
"""Verify that an exception is raised with initializing via buffer with different data array length"""
import numpy
mat_info = get_mat_info()
equivalent_types = get_mat_numpy_types()
test_values = [[0, 1], [2, 3]]
for Mat, size, count, fmt in mat_info:
test_numpy_type = numpy.array(test_values, dtype=equivalent_types[Mat])
with self.assertRaises(ValueError):
test_mat = Mat(test_numpy_type)
@tc_logger
def test_buffer_init_wrong_dimension(self):
"""Verify that an exception is raised with initializing via buffer with different data dimensions"""
import numpy
mat_info = get_mat_info()
equivalent_types = get_mat_numpy_types()
test_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
for Mat, size, count, fmt in mat_info:
test_array = numpy.array(test_values[:count], dtype=equivalent_types[Mat])
with self.assertRaises(ValueError):
test_mat = Mat(test_array)
class TestGfMatrixGetSetItem(TestClass):
"""Test single-item accessors for usdrt.Gf.Matrix* classes"""
@tc_logger
def test_get_item(self):
"""Validate GetArrayItem on GfMatrix"""
from usdrt import Gf
for Mat in [Gf.Matrix3d, Gf.Matrix3f, Gf.Matrix4d, Gf.Matrix4f]:
items = Mat.dimension[0] * Mat.dimension[1]
m = Mat(*[i for i in range(items)])
for i in range(items):
self.assertTrue(m.GetArrayItem(i) == i)
@tc_logger
def test_set_item(self):
"""Validate SetArrayItem on GfMatrix"""
from usdrt import Gf
for Mat in [Gf.Matrix3d, Gf.Matrix3f, Gf.Matrix4d, Gf.Matrix4f]:
m = Mat()
self.assertEqual(m, Mat(1))
items = Mat.dimension[0] * Mat.dimension[1]
expected = Mat(*[i for i in range(items)])
for i in range(items):
m.SetArrayItem(i, i)
self.assertNotEqual(m, Mat(1))
self.assertEqual(m, expected)
class TestGfMatrixCopy(TestClass):
"""Test copy and deepcopy support for Gf.Mat* classes"""
@tc_logger
def test_copy(self):
"""Test __copy__"""
mat_info = get_mat_info()
for Mat, size, count, fmt in mat_info:
x = Mat()
y = x
self.assertTrue(y is x)
y[0, 0] = 10
self.assertEqual(x[0, 0], 10)
z = copy.copy(y)
self.assertFalse(z is y)
y[0, 0] = 100
self.assertEqual(z[0, 0], 10)
@tc_logger
def test_deepcopy(self):
"""Test __deepcopy__"""
mat_info = get_mat_info()
for Mat, size, count, fmt in mat_info:
x = Mat()
y = x
self.assertTrue(y is x)
y[0, 0] = 10
self.assertEqual(x[0, 0], 10)
z = copy.deepcopy(y)
self.assertFalse(z is y)
y[0, 0] = 100
self.assertEqual(z[0, 0], 10)
class TestGfMatrixDebugging(TestClass):
"""Test human readable output functions for debugging"""
@tc_logger
def test_repr_representation(self):
"""Test __repr__"""
from usdrt import Gf
test_vec = Gf.Vec4d(9, 8, 7, 6)
test_matrix = Gf.Matrix4d(test_vec) # Sets matrix to diagonal form (ith element on the diagonal set to vec[i])
expected = "Gf.Matrix4d(9.0, 0.0, 0.0, 0.0, 0.0, 8.0, 0.0, 0.0, 0.0, 0.0, 7.0, 0.0, 0.0, 0.0, 0.0, 6.0)"
self.assertEqual(repr(test_matrix), expected)
class TestGfMatrixSetLookAtExtras(TestClass):
"""More tests to validate SetLookAt"""
@tc_logger
def test_set_look_at_extras(self):
"""Test more points to ensure behavior match to Pixar implementation"""
from pxr import Gf
from usdrt import Gf as RtGf
target = [(0, 0, -20), (0, 0, -30), (0, 0, -40), (-10, 0, -40), (-20, 0, -40), (-30, 0, -40)]
eye = [(0, 0, 0), (0, 1, 0), (0, 2, 0), (0, 3, 0), (1, 3, 0), (2, 3, 0), (3, 3, 0)]
for eye_pos in eye:
for target_pos in target:
pxr_result = Gf.Matrix4d(1).SetLookAt(Gf.Vec3d(*eye_pos), Gf.Vec3d(*target_pos), Gf.Vec3d(0, 1, 0))
rt_result = RtGf.Matrix4d(1).SetLookAt(
RtGf.Vec3d(*eye_pos), RtGf.Vec3d(*target_pos), RtGf.Vec3d(0, 1, 0)
)
self.assertTrue(RtGf.IsClose(RtGf.Matrix4d(pxr_result), rt_result, 0.0001))
| 9,276 | Python | 28.925806 | 119 | 0.575571 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/scenegraph/tests/test_usd_collectionAPI.py | __copyright__ = "Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import os
import pathlib
import platform
import sys
import time
import unittest
from . import tc_logger
def setUpModule():
# pre-load USD before anything else to prevent crash
# from weird carb conflict
# FIXME ^^^
try:
from . import update_path_and_load_usd
update_path_and_load_usd()
except ImportError:
# not needed in Kit
pass
try:
import omni.kit.test
TestClass = omni.kit.test.AsyncTestCase
TEST_DIR = str(pathlib.Path(__file__).parent.parent.parent.parent)
except ImportError:
from . import TestRtScenegraph
TestClass = TestRtScenegraph
TEST_DIR = "."
class TestUsdCollectionAPI(TestClass):
@tc_logger
def test_boolean_operator(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/test_collection.usda")
self.assertTrue(stage)
testPrim = stage.GetPrimAtPath("/CollectionTest")
self.assertTrue(testPrim)
explicitColl = Usd.CollectionAPI(testPrim, "leafGeom")
self.assertTrue(explicitColl)
explicitColl = Usd.CollectionAPI(testPrim, "test")
self.assertFalse(explicitColl)
@tc_logger
def test_create_relationship(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/test_collection.usda")
self.assertTrue(stage)
testPrim = stage.GetPrimAtPath("/CollectionTest")
sphere = stage.GetPrimAtPath("/CollectionTest/Geom/Shapes/Sphere")
self.assertTrue(testPrim)
self.assertTrue(sphere.IsValid())
self.assertTrue(testPrim.ApplyAPI("CollectionAPI:test"))
explicitColl = Usd.CollectionAPI(testPrim, "test")
self.assertTrue(explicitColl)
# create rel using schema api
rel = explicitColl.CreateIncludesRel()
self.assertTrue(rel)
rel.AddTarget(sphere.GetPath())
self.assertTrue(rel.HasAuthoredTargets())
# verify using prim api
relVerify = testPrim.GetRelationship("collection:test:includes")
self.assertTrue(relVerify)
self.assertTrue(relVerify.HasAuthoredTargets())
@tc_logger
def test_get_relationship(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/test_collection.usda")
self.assertTrue(stage)
testPrim = stage.GetPrimAtPath("/CollectionTest")
sphere = stage.GetPrimAtPath("/CollectionTest/Geom/Shapes/Sphere")
self.assertTrue(testPrim)
self.assertTrue(sphere.IsValid())
self.assertTrue(testPrim.ApplyAPI("CollectionAPI:test"))
# create relationship using prim api
rel = testPrim.CreateRelationship("collection:test:includes", False)
self.assertTrue(rel)
rel.AddTarget(sphere.GetPath())
self.assertTrue(rel.HasAuthoredTargets())
# verify get relationship using schema api
coll = Usd.CollectionAPI(testPrim, "test")
inclRel = coll.GetIncludesRel()
self.assertTrue(inclRel)
self.assertTrue(inclRel.GetName() == "collection:test:includes")
self.assertTrue(inclRel.HasAuthoredTargets())
| 3,638 | Python | 29.325 | 81 | 0.685542 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/scenegraph/tests/test_attribute.py | __copyright__ = "Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import os
import pathlib
import platform
import sys
import time
import unittest
from . import tc_logger
def setUpModule():
# pre-load USD before anything else to prevent crash
# from weird carb conflict
# FIXME ^^^
try:
from . import update_path_and_load_usd
update_path_and_load_usd()
if platform.processor() == "aarch64":
# warp not supported on aarch64 yet for our testing
return
import warp as wp
wp.init()
except ImportError:
# not needed in Kit
pass
try:
import omni.kit.test
TestClass = omni.kit.test.AsyncTestCase
TEST_DIR = str(pathlib.Path(__file__).parent.parent.parent.parent)
except ImportError:
from . import TestRtScenegraph
TestClass = TestRtScenegraph
TEST_DIR = "."
class TestUsdAttribute(TestClass):
@tc_logger
def test_get(self):
from usdrt import Gf, Sdf, Usd, UsdGeom, UsdLux
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
attr = prim.GetAttribute(UsdGeom.Tokens.doubleSided)
self.assertTrue(attr)
result = False
result = attr.Get()
self.assertTrue(result)
self.assertTrue(isinstance(result, bool))
prim = stage.GetPrimAtPath(Sdf.Path("/DistantLight"))
self.assertTrue(prim)
attr = prim.GetAttribute(UsdLux.Tokens.inputsIntensity)
self.assertTrue(attr)
result = 5.0
result = attr.Get()
self.assertEquals(result, 150.0)
self.assertTrue(isinstance(result, float))
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
attr = prim.GetAttribute(UsdGeom.Tokens.faceVertexIndices)
self.assertTrue(attr)
result = attr.Get()
self.assertEquals(len(result), 4)
self.assertTrue(result.IsFabricData())
self.assertEquals(result[0], 1)
self.assertEquals(result[1], 3)
prim = stage.GetPrimAtPath(Sdf.Path("/DistantLight"))
attr = prim.GetAttribute(UsdLux.Tokens.inputsColor)
result = attr.Get()
self.assertTrue(isinstance(result, Gf.Vec3f))
self.assertEquals(result, Gf.Vec3f(1, 1, 1))
attr = prim.GetAttribute(UsdGeom.Tokens.visibility)
result = attr.Get()
self.assertEquals(result, UsdGeom.Tokens.inherited)
prim = stage.GetPrimAtPath(Sdf.Path("/Cube_5/subset/BasicShapeMaterial/BasicShapeMaterial"))
attr = prim.GetAttribute("path")
result = attr.Get()
self.assertEquals(result, "/Engine/BasicShapes/BasicShapeMaterial.BasicShapeMaterial")
# invalid attr should not cause crash
attr = prim.GetAttribute("invalid")
self.assertFalse(attr)
self.assertFalse(attr.Get())
@tc_logger
def test_set(self):
from usdrt import Gf, Sdf, Usd, UsdGeom, UsdLux, Vt
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
attr = prim.GetAttribute(UsdGeom.Tokens.doubleSided)
self.assertTrue(attr)
result = False
result = attr.Get()
self.assertTrue(result)
self.assertTrue(isinstance(result, bool))
attr.Set(False)
result = attr.Get()
self.assertFalse(result)
self.assertTrue(isinstance(result, bool))
prim = stage.GetPrimAtPath(Sdf.Path("/DistantLight"))
self.assertTrue(prim)
attr = prim.GetAttribute(UsdLux.Tokens.inputsIntensity)
self.assertTrue(attr)
result = 5.0
result = attr.Get()
self.assertEquals(result, 150.0)
self.assertTrue(isinstance(result, float))
attr.Set(15.5)
result = attr.Get()
self.assertEquals(result, 15.5)
self.assertTrue(isinstance(result, float))
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
attr = prim.GetAttribute(UsdGeom.Tokens.faceVertexIndices)
self.assertTrue(attr)
newValues = Vt.IntArray([9, 8, 7, 6])
self.assertTrue(attr.Set(newValues))
result = attr.Get()
self.assertEquals(len(result), 4)
self.assertTrue(result.IsFabricData())
for i in range(4):
self.assertEquals(result[i], 9 - i)
newValues = Vt.IntArray([0, 1, 2, 3, 4, 5, 6])
self.assertTrue(attr.Set(newValues))
result = attr.Get()
self.assertEquals(len(result), 7)
self.assertTrue(result.IsFabricData())
for i in range(7):
self.assertEquals(result[i], i)
prim = stage.GetPrimAtPath(Sdf.Path("/DistantLight"))
attr = prim.GetAttribute(UsdLux.Tokens.inputsColor)
newColor = Gf.Vec3f(0, 0.5, 0.5)
self.assertTrue(attr.Set(newColor))
vecCheck = attr.Get()
self.assertTrue(isinstance(vecCheck, Gf.Vec3f))
self.assertEquals(vecCheck, Gf.Vec3f(0, 0.5, 0.5))
# setting with an invalid type for the attr should fail
self.assertFalse(attr.Set("stringvalue"))
result = attr.Get()
self.assertEquals(result, Gf.Vec3f(0, 0.5, 0.5))
attr = prim.GetAttribute(UsdGeom.Tokens.visibility)
result = attr.Get()
self.assertEquals(result, UsdGeom.Tokens.inherited)
self.assertTrue(attr.Set(UsdGeom.Tokens.invisible))
result = attr.Get()
self.assertEquals(result, UsdGeom.Tokens.invisible)
prim = stage.GetPrimAtPath(Sdf.Path("/Cube_5/subset/BasicShapeMaterial/BasicShapeMaterial"))
attr = prim.GetAttribute("path")
result = attr.Get()
self.assertEquals(result, "/Engine/BasicShapes/BasicShapeMaterial.BasicShapeMaterial")
newString = "/Engine/BasicShapes/BasicShapeMaterial.BasicShapeMaterial100"
self.assertTrue(attr.Set(newString))
result = attr.Get()
self.assertEquals(result, "/Engine/BasicShapes/BasicShapeMaterial.BasicShapeMaterial100")
# invalid attr should not cause crash
attr = prim.GetAttribute("invalid")
self.assertFalse(attr)
self.assertFalse(attr.Set("stringvalue"))
@tc_logger
def test_has_value(self):
from usdrt import Sdf, Usd, UsdGeom
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
attr = prim.GetAttribute(UsdGeom.Tokens.doubleSided)
self.assertTrue(attr.HasValue())
attr2 = prim.GetAttribute(UsdGeom.Tokens.purpose)
self.assertFalse(attr2.HasValue())
# invalid attr should not cause crash
attr = prim.GetAttribute("invalid")
self.assertFalse(attr)
self.assertFalse(attr.HasValue())
@tc_logger
def test_name(self):
from usdrt import Sdf, Usd, UsdGeom
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
attr = prim.GetAttribute(UsdGeom.Tokens.primvarsDisplayColor)
self.assertTrue(attr)
self.assertTrue(attr.HasValue())
self.assertEquals(attr.GetName(), UsdGeom.Tokens.primvarsDisplayColor)
self.assertEquals(attr.GetBaseName(), "displayColor")
self.assertEquals(attr.GetNamespace(), "primvars")
parts = attr.SplitName()
self.assertEquals(len(parts), 2)
self.assertEquals(parts[0], "primvars")
self.assertEquals(parts[1], "displayColor")
@tc_logger
def test_create_every_attribute_type(self):
from usdrt import Gf, Sdf, Usd, Vt
stage = Usd.Stage.CreateInMemory("test.usda")
self.assertTrue(stage)
prim = stage.DefinePrim(Sdf.Path("/test"), "Xform")
self.assertTrue(prim)
# These are the types that I know are missing support, either
# because Fabric doesn't support them (string array), or USDRT hasn't implemented
# support yet (assets), or there will never be a Python rep (PrimTagType)
KNOWN_INVALID_TYPES = [
"StringArray",
]
KNOWN_UNSUPPORTED_TYPES = [
"Frame4d",
"Frame4dArray",
]
NO_DATA_TAG_TYPES = [
"PrimTypeTag",
"AppliedSchemaTypeTag",
"AncestorPrimTypeTag",
"Tag",
]
# These are the types that should be supported and are not for some
# reason - OM-53013
FIXME_UNSUPPORTED_TYPES = [
"Matrix2d",
"Matrix2dArray",
"TimeCode",
"TimeCodeArray",
]
for type_name in dir(Sdf.ValueTypeNames):
if type_name.startswith("__"):
continue
if type_name in KNOWN_INVALID_TYPES:
continue
value_type_name = getattr(Sdf.ValueTypeNames, type_name)
if not isinstance(value_type_name, Sdf.ValueTypeName):
continue
attr = prim.CreateAttribute(type_name, value_type_name, True)
self.assertTrue(attr)
result = attr.Get()
if result is None:
# Python bindings warn about unsupported type using C++ name,
# add a note to clarify using SdfValueTypeName
self.assertTrue(
type_name in KNOWN_UNSUPPORTED_TYPES
or type_name in FIXME_UNSUPPORTED_TYPES
or type_name in NO_DATA_TAG_TYPES
)
if type_name in FIXME_UNSUPPORTED_TYPES:
reason = "this will be fixed eventually"
elif type_name in KNOWN_UNSUPPORTED_TYPES:
reason = "this is intentional"
elif type_name in NO_DATA_TAG_TYPES:
reason = "expected no data attribute"
print(f"i.e. SdfValueTypeName.{type_name} - {reason}")
@tc_logger
def test_get_type(self):
from usdrt import Sdf, Usd, UsdGeom
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
attr = prim.GetAttribute(UsdGeom.Tokens.faceVertexCounts)
self.assertTrue(attr)
self.assertEqual(attr.GetTypeName(), Sdf.ValueTypeNames.IntArray)
attr = prim.GetAttribute(UsdGeom.Tokens.normals)
self.assertTrue(attr)
self.assertEqual(attr.GetTypeName(), Sdf.ValueTypeNames.Normal3fArray)
# invalid attr should not cause crash
attr = prim.GetAttribute("invalid")
self.assertFalse(attr)
self.assertFalse(attr.GetTypeName())
@tc_logger
def test_get_type(self):
from usdrt import Sdf, Usd, UsdGeom
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
attr = prim.GetAttribute(UsdGeom.Tokens.faceVertexCounts)
self.assertTrue(attr)
expected = "Attribute(</Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back.faceVertexCounts>)"
self.assertEqual(repr(attr), expected)
@tc_logger
def test_cpu_gpu_data_sync(self):
if platform.processor() == "aarch64":
return
from usdrt import Sdf, Usd, UsdGeom, Vt
try:
import warp as wp
except ImportError:
if TestClass is omni.kit.test.AsyncTestCase:
# warp not available for testing in kit at this time
return
raise
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
attr = prim.GetAttribute(UsdGeom.Tokens.points)
self.assertTrue(attr)
self.assertTrue(attr.IsCpuDataValid())
self.assertFalse(attr.IsGpuDataValid())
# Force sync to GPU
attr.SyncDataToGpu()
self.assertTrue(attr.IsCpuDataValid())
self.assertTrue(attr.IsGpuDataValid())
# Write a new GPU value
points = attr.Get()
wp_points = wp.array(points, device="cpu")
with wp.ScopedCudaGuard():
wpgpu_points = wp_points.to("cuda")
vt_gpu = Vt.Vec3fArray(wpgpu_points)
attr.Set(vt_gpu)
wp.synchronize()
self.assertFalse(attr.IsCpuDataValid())
self.assertTrue(attr.IsGpuDataValid())
# Force sync to CPU
attr.SyncDataToCpu()
self.assertTrue(attr.IsCpuDataValid())
self.assertTrue(attr.IsGpuDataValid())
# Invalidate data on CPU
attr.InvalidateCpuData()
self.assertFalse(attr.IsCpuDataValid())
self.assertTrue(attr.IsGpuDataValid())
# Invalidate data on GPU
attr.InvalidateGpuData()
self.assertTrue(attr.IsCpuDataValid())
self.assertFalse(attr.IsGpuDataValid())
# Test Connections
@tc_logger
def test_has_authored_connections(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
attr = stage.GetAttributeAtPath(Sdf.Path("/Cornell_Box/Root/Looks/Green1SG.outputs:mdl:displacement"))
self.assertTrue(attr)
self.assertTrue(attr.HasAuthoredConnections())
attr = stage.GetAttributeAtPath(Sdf.Path("/Cornell_Box/Root/Looks/Green1SG.outputs:surface"))
self.assertTrue(attr)
self.assertFalse(attr.HasAuthoredConnections())
attr = stage.GetAttributeAtPath(
Sdf.Path("/Cornell_Box/Root/Looks/Green1SG/Green_Side.info:implementationSource")
)
self.assertTrue(attr)
self.assertFalse(attr.HasAuthoredConnections())
# invalid attr should not cause crash
attr = stage.GetAttributeAtPath("/Cornell_Box.invalid")
self.assertFalse(attr)
self.assertFalse(attr.HasAuthoredConnections())
@tc_logger
def test_get_connections(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
attr = stage.GetAttributeAtPath(Sdf.Path("/Cornell_Box/Root/Looks/Green1SG.outputs:mdl:displacement"))
self.assertTrue(attr)
connections = attr.GetConnections()
self.assertEqual(len(connections), 1)
self.assertEqual(connections[0], Sdf.Path("/Cornell_Box/Root/Looks/Green1SG/Green_Side.outputs:out"))
# invalid attr should not cause crash
attr = stage.GetAttributeAtPath("/Cornell_Box.invalid")
self.assertFalse(attr)
self.assertFalse(attr.GetConnections())
@tc_logger
def test_add_connection(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
path = Sdf.Path("/Cornell_Box/Root/Looks/Green1SG.outputs:mdl:displacement")
attr = stage.GetAttributeAtPath(path)
self.assertTrue(attr)
new_connection = Sdf.Path("/Cornell_Box/Root/Looks/Green1SG.outputs:surface")
self.assertTrue(attr.AddConnection(new_connection))
connections = attr.GetConnections()
self.assertEqual(len(connections), 1)
self.assertEqual(connections[0], new_connection)
# add a connection to a new attribute
proxy_prim_connection = Sdf.Path("/Cube_5")
prim = stage.GetPrimAtPath("/Cornell_Box")
self.assertTrue(prim)
attr = prim.CreateAttribute("testAttr", Sdf.ValueTypeNames.Token, True)
self.assertTrue(attr)
self.assertTrue(attr.AddConnection(proxy_prim_connection))
connections = attr.GetConnections()
self.assertEqual(len(connections), 1)
self.assertEqual(connections[0], Sdf.Path("/Cube_5"))
# invalid attr should not cause crash
attr = stage.GetAttributeAtPath("/Cornell_Box.invalid")
self.assertFalse(attr)
self.assertFalse(attr.AddConnection(Sdf.Path("/Cube_5")))
@tc_logger
def test_remove_connection(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
attr = stage.GetAttributeAtPath(Sdf.Path("/Cornell_Box/Root/Looks/Green1SG.outputs:mdl:displacement"))
self.assertTrue(attr)
# It's valid to try to remove a connection that is not
# in the list of connections
connection_not_in_list = Sdf.Path("/Foo/Bar")
self.assertTrue(attr.RemoveConnection(connection_not_in_list))
connections = attr.GetConnections()
self.assertEqual(len(connections), 1)
self.assertEqual(connections[0], Sdf.Path("/Cornell_Box/Root/Looks/Green1SG/Green_Side.outputs:out"))
# Removing a valid connection will return empty connection lists with GetConnections
connection_in_list = Sdf.Path("/Cornell_Box/Root/Looks/Green1SG/Green_Side.outputs:out")
self.assertTrue(attr.RemoveConnection(connection_in_list))
connections = attr.GetConnections()
self.assertEqual(len(connections), 0)
# multiple connections not supported yet
# test removing if there are multiple in the list
# multiple_connections = [Sdf.Path("/Foo"), Sdf.Path("/Bar")]
# self.assertTrue(attr.SetConnections(multiple_connections))
# self.assertTrue(attr.RemoveConnection(Sdf.Path("/Bar")))
# connections = attr.GetConnections()
# self.assertEqual(len(connections), 1)
# self.assertEqual(connections[0], Sdf.Path("/Foo"))
# invalid attr should not cause crash
attr = stage.GetAttributeAtPath("/Cornell_Box.invalid")
self.assertFalse(attr)
self.assertFalse(attr.RemoveConnection(Sdf.Path("/Cube_5")))
@tc_logger
def test_clear_connections(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
attr = stage.GetAttributeAtPath(Sdf.Path("/Cornell_Box/Root/Looks/Green1SG.outputs:mdl:displacement"))
self.assertTrue(attr)
connections = attr.GetConnections()
self.assertEqual(len(connections), 1)
self.assertEqual(connections[0], Sdf.Path("/Cornell_Box/Root/Looks/Green1SG/Green_Side.outputs:out"))
self.assertTrue(attr.ClearConnections())
connections = attr.GetConnections()
self.assertEqual(len(connections), 0)
# invalid attr should not cause crash
attr = stage.GetAttributeAtPath("/Cornell_Box.invalid")
self.assertFalse(attr)
self.assertFalse(attr.ClearConnections())
@tc_logger
def test_set_connections(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
attr = stage.GetAttributeAtPath(Sdf.Path("/Cornell_Box/Root/Looks/Green1SG.outputs:mdl:displacement"))
self.assertTrue(attr)
connections = attr.GetConnections()
self.assertEqual(len(connections), 1)
self.assertEqual(connections[0], Sdf.Path("/Cornell_Box/Root/Looks/Green1SG/Green_Side.outputs:out"))
new_connections = [Sdf.Path("/Cornell_Box/Root/Looks/Red1SG/Red_Side.outputs:out")]
self.assertTrue(attr.SetConnections(new_connections))
connections = attr.GetConnections()
self.assertEqual(len(connections), 1)
self.assertEqual(connections[0], Sdf.Path("/Cornell_Box/Root/Looks/Red1SG/Red_Side.outputs:out"))
too_many_connections = [Sdf.Path("/Foo"), Sdf.Path("/Bar")]
# do nothing for now, this isnt supported
self.assertFalse(attr.SetConnections(too_many_connections))
connections = attr.GetConnections()
self.assertEqual(len(connections), 1)
# same as previous connection
self.assertEqual(connections[0], Sdf.Path("/Cornell_Box/Root/Looks/Red1SG/Red_Side.outputs:out"))
# invalid attr should not cause crash
attr = stage.GetAttributeAtPath("/Cornell_Box.invalid")
self.assertFalse(attr)
self.assertFalse(attr.SetConnections(new_connections))
| 21,466 | Python | 34.897993 | 110 | 0.642178 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/scenegraph/tests/testGfMatrix.py | # Copyright 2016 Pixar
#
# Licensed under the Apache License, Version 2.0 (the "Apache License")
# with the following modification; you may not use this file except in
# compliance with the Apache License and the following modification to it:
# Section 6. Trademarks. is deleted and replaced with:
#
# 6. Trademarks. This License does not grant permission to use the trade
# names, trademarks, service marks, or product names of the Licensor
# and its affiliates, except as required to comply with Section 4(c) of
# the License and to reproduce the content of the NOTICE file.
#
# You may obtain a copy of the Apache License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Apache License with the above modification is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the Apache License for the specific
# language governing permissions and limitations under the Apache License.
#
# Note: This is just pulled directly from USD and lightly modified
# https://github.com/PixarAnimationStudios/USD/blob/release/pxr/base/gf/testenv/testGfMatrix.py
from __future__ import division, print_function
__copyright__ = "Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import math
import sys
import unittest
##### Uncomment for better assert messages
# if 'unittest.util' in __import__('sys').modules:
# # Show full diff in self.assertEqual.
# __import__('sys').modules['unittest.util']._MAX_LENGTH = 999999999
def setUpModule():
# pre-load USD before anything else to prevent crash
# from weird carb conflict
# FIXME ^^^
try:
from . import update_path_and_load_usd
update_path_and_load_usd()
except ImportError:
# not needed in Kit
pass
try:
import omni.kit.test
TestClass = omni.kit.test.AsyncTestCase
except ImportError:
TestClass = unittest.TestCase
try:
import numpy
hasNumpy = True
except ImportError:
print("numpy not available, skipping buffer protocol tests")
hasNumpy = False
def makeValue(Value, vals):
if Value == float:
return Value(vals[0])
else:
v = Value()
for i in range(v.dimension):
v[i] = vals[i]
return v
class TestGfMatrix(TestClass):
def test_Basic(self):
from usdrt import Gf
Matrices = [ # (Gf.Matrix2d, Gf.Vec2d),
# (Gf.Matrix2f, Gf.Vec2f),
(Gf.Matrix3d, Gf.Vec3d),
(Gf.Matrix3f, Gf.Vec3f),
(Gf.Matrix4d, Gf.Vec4d),
(Gf.Matrix4f, Gf.Vec4f),
]
for (Matrix, Vec) in Matrices:
# constructors
self.assertIsInstance(Matrix(), Matrix)
self.assertIsInstance(Matrix(1), Matrix)
self.assertIsInstance(Matrix(Vec()), Matrix)
# python default constructor produces identity.
self.assertEqual(Matrix(), Matrix(1))
if hasNumpy:
# Verify population of numpy arrays.
emptyNumpyArray = numpy.empty((1, Matrix.dimension[0], Matrix.dimension[1]), dtype="float32")
emptyNumpyArray[0] = Matrix(1)
if Matrix.dimension == (2, 2):
self.assertIsInstance(Matrix(1, 2, 3, 4), Matrix)
self.assertEqual(Matrix().Set(1, 2, 3, 4), Matrix(1, 2, 3, 4))
array = numpy.array(Matrix(1, 2, 3, 4))
self.assertEqual(array.shape, (2, 2))
# XXX: Currently cannot round-trip Gf.Matrix*f through
# numpy.array
if Matrix != Gf.Matrix2f:
self.assertEqual(Matrix(array), Matrix(1, 2, 3, 4))
elif Matrix.dimension == (3, 3):
self.assertIsInstance(Matrix(1, 2, 3, 4, 5, 6, 7, 8, 9), Matrix)
self.assertEqual(Matrix().Set(1, 2, 3, 4, 5, 6, 7, 8, 9), Matrix(1, 2, 3, 4, 5, 6, 7, 8, 9))
array = numpy.array(Matrix(1, 2, 3, 4, 5, 6, 7, 8, 9))
self.assertEqual(array.shape, (3, 3))
# XXX: Currently cannot round-trip Gf.Matrix*f through
# numpy.array
if Matrix != Gf.Matrix3f:
self.assertEqual(Matrix(array), Matrix(1, 2, 3, 4, 5, 6, 7, 8, 9))
elif Matrix.dimension == (4, 4):
self.assertIsInstance(Matrix(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16), Matrix)
self.assertEqual(
Matrix().Set(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16),
Matrix(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16),
)
array = numpy.array(Matrix(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16))
self.assertEqual(array.shape, (4, 4))
# XXX: Currently cannot round-trip Gf.Matrix*f through
# numpy.array
if Matrix != Gf.Matrix4f:
self.assertEqual(Matrix(array), Matrix(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16))
else:
self.fail()
self.assertEqual(Matrix().SetIdentity(), Matrix(1))
self.assertEqual(Matrix().SetZero(), Matrix(0))
self.assertEqual(Matrix().SetDiagonal(0), Matrix().SetZero())
self.assertEqual(Matrix().SetDiagonal(1), Matrix().SetIdentity())
def test_Comparisons(self):
from usdrt import Gf
Matrices = [(Gf.Matrix3d, Gf.Matrix3f), (Gf.Matrix4d, Gf.Matrix4f)] # (Gf.Matrix2d, Gf.Matrix2f),
for (Matrix, Matrixf) in Matrices:
# Test comparison of Matrix and Matrixf
#
size = Matrix.dimension[0] * Matrix.dimension[1]
contents = list(range(1, size + 1))
md = Matrix(*contents)
mf = Matrixf(*contents)
self.assertEqual(md, mf)
contents.reverse()
md.Set(*contents)
mf.Set(*contents)
self.assertEqual(md, mf)
# Convert to double precision floating point values
contents = [1.0 / x for x in contents]
mf.Set(*contents)
md.Set(*contents)
# These should *NOT* be equal due to roundoff errors in the floats.
self.assertNotEqual(md, mf)
def test_Other(self):
from usdrt import Gf
Matrices = [ # (Gf.Matrix2d, Gf.Vec2d),
# (Gf.Matrix2f, Gf.Vec2f),
(Gf.Matrix3d, Gf.Vec3d),
(Gf.Matrix3f, Gf.Vec3f),
(Gf.Matrix4d, Gf.Vec4d),
(Gf.Matrix4f, Gf.Vec4f),
]
for (Matrix, Vec) in Matrices:
v = Vec()
for i in range(v.dimension):
v[i] = i
m1 = Matrix().SetDiagonal(v)
m2 = Matrix(0)
for i in range(m2.dimension[0]):
m2[i, i] = i
self.assertEqual(m1, m2)
v = Vec()
for i in range(v.dimension):
v[i] = 10
self.assertEqual(Matrix().SetDiagonal(v), Matrix().SetDiagonal(10))
self.assertEqual(type(Matrix()[0]), Vec)
m = Matrix()
m[0] = makeValue(Vec, (3, 1, 4, 1))
self.assertEqual(m[0], makeValue(Vec, (3, 1, 4, 1)))
m = Matrix()
m[-1] = makeValue(Vec, (3, 1, 4, 1))
self.assertEqual(m[-1], makeValue(Vec, (3, 1, 4, 1)))
m = Matrix()
m[0, 0] = 1
m[1, 0] = 2
m[0, 1] = 3
m[1, 1] = 4
self.assertTrue(m[0, 0] == 1 and m[1, 0] == 2 and m[0, 1] == 3 and m[1, 1] == 4)
m = Matrix()
m[-1, -1] = 1
m[-2, -1] = 2
m[-1, -2] = 3
m[-2, -2] = 4
self.assertTrue(m[-1, -1] == 1 and m[-2, -1] == 2 and m[-1, -2] == 3 and m[-2, -2] == 4)
m = Matrix()
for i in range(m.dimension[0]):
for j in range(m.dimension[1]):
m[i, j] = i * m.dimension[1] + j
m = m.GetTranspose()
for i in range(m.dimension[0]):
for j in range(m.dimension[1]):
self.assertEqual(m[j, i], i * m.dimension[1] + j)
self.assertEqual(Matrix(1).GetInverse(), Matrix(1))
self.assertEqual(Matrix(4).GetInverse() * Matrix(4), Matrix(1))
# nv edit - intentionally diverge from pixar's implementation
# GetInverse for zero matrix returns zero matrix instead of max float scale matrix
# "so that multiplying by this is less likely to be catastrophic."
self.assertEqual(Matrix(0).GetInverse(), Matrix(0))
self.assertEqual(Matrix(3).GetDeterminant(), 3 ** Matrix.dimension[0])
self.assertEqual(len(Matrix()), Matrix.dimension[0])
# Test GetRow, GetRow3, GetColumn
m = Matrix(1)
for i in range(m.dimension[0]):
for j in range(m.dimension[1]):
m[i, j] = i * m.dimension[1] + j
for i in range(m.dimension[0]):
j0 = i * m.dimension[1]
self.assertEqual(m.GetRow(i), makeValue(Vec, tuple(range(j0, j0 + m.dimension[1]))))
if Matrix == Gf.Matrix4d:
self.assertEqual(m.GetRow3(i), Gf.Vec3d(j0, j0 + 1, j0 + 2))
for j in range(m.dimension[1]):
self.assertEqual(
m.GetColumn(j), makeValue(Vec, tuple(j + x * m.dimension[0] for x in range(m.dimension[0])))
)
# Test SetRow, SetRow3, SetColumn
m = Matrix(1)
for i in range(m.dimension[0]):
j0 = i * m.dimension[1]
v = makeValue(Vec, tuple(range(j0, j0 + m.dimension[1])))
m.SetRow(i, v)
self.assertEqual(v, m.GetRow(i))
m = Matrix(1)
if Matrix == Gf.Matrix4d:
for i in range(m.dimension[0]):
j0 = i * m.dimension[1]
v = Gf.Vec3d(j0, j0 + 1, j0 + 2)
m.SetRow3(i, v)
self.assertEqual(v, m.GetRow3(i))
m = Matrix(1)
for j in range(m.dimension[0]):
v = makeValue(Vec, tuple(j + x * m.dimension[0] for x in range(m.dimension[0])))
m.SetColumn(i, v)
self.assertEqual(v, m.GetColumn(i))
m = Matrix(4)
m *= Matrix(1.0 / 4)
self.assertEqual(m, Matrix(1))
m = Matrix(4)
self.assertEqual(m * Matrix(1.0 / 4), Matrix(1))
self.assertEqual(Matrix(4) * 2, Matrix(8))
self.assertEqual(2 * Matrix(4), Matrix(8))
m = Matrix(4)
m *= 2
self.assertEqual(m, Matrix(8))
m = Matrix(3)
m += Matrix(2)
self.assertEqual(m, Matrix(5))
m = Matrix(3)
m -= Matrix(2)
self.assertEqual(m, Matrix(1))
self.assertEqual(Matrix(2) + Matrix(3), Matrix(5))
self.assertEqual(Matrix(4) - Matrix(4), Matrix(0))
self.assertEqual(-Matrix(-1), Matrix(1))
self.assertEqual(Matrix(3) / Matrix(2), Matrix(3) * Matrix(2).GetInverse())
self.assertEqual(Matrix(2) * makeValue(Vec, (3, 1, 4, 1)), makeValue(Vec, (6, 2, 8, 2)))
self.assertEqual(makeValue(Vec, (3, 1, 4, 1)) * Matrix(2), makeValue(Vec, (6, 2, 8, 2)))
Vecf = {Gf.Vec2d: Gf.Vec2f, Gf.Vec3d: Gf.Vec3f, Gf.Vec4d: Gf.Vec4f}.get(Vec)
if Vecf is not None:
self.assertEqual(Matrix(2) * makeValue(Vecf, (3, 1, 4, 1)), makeValue(Vecf, (6, 2, 8, 2)))
self.assertEqual(makeValue(Vecf, (3, 1, 4, 1)) * Matrix(2), makeValue(Vecf, (6, 2, 8, 2)))
self.assertTrue(2 in Matrix(2) and not 4 in Matrix(2))
m = Matrix(1)
try:
m[m.dimension[0] + 1] = Vec()
except:
pass
else:
self.fail()
m = Matrix(1)
try:
m[m.dimension[0] + 1, m.dimension[1] + 1] = 10
except:
pass
else:
self.fail()
m = Matrix(1)
try:
m[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] = 3
self.fail()
except:
pass
try:
x = m[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
self.fail()
except:
pass
m = Matrix(1)
try:
m["foo"] = 3
except:
pass
else:
self.fail()
self.assertEqual(m, eval(repr(m)))
self.assertTrue(len(str(Matrix())))
def test_Matrix3Transforms(self):
from usdrt import Gf
# TODO - Gf.Rotation not supported,
# so this test is currently a noop
Matrices = [ # (Gf.Matrix3d, Gf.Vec3d, Gf.Quatd),
# (Gf.Matrix3f, Gf.Vec3f, Gf.Quatf)
]
for (Matrix, Vec, Quat) in Matrices:
def _VerifyOrthonormVecs(mat):
v0 = Vec(mat[0][0], mat[0][1], mat[0][2])
v1 = Vec(mat[1][0], mat[1][1], mat[1][2])
v2 = Vec(mat[2][0], mat[2][1], mat[2][2])
self.assertTrue(
Gf.IsClose(Gf.Dot(v0, v1), 0, 0.0001)
and Gf.IsClose(Gf.Dot(v0, v2), 0, 0.0001)
and Gf.IsClose(Gf.Dot(v1, v2), 0, 0.0001)
)
m = Matrix()
m.SetRotate(Gf.Rotation(Gf.Vec3d(1, 0, 0), 30))
m2 = Matrix(m)
m_o = m.GetOrthonormalized()
self.assertEqual(m_o, m2)
m.Orthonormalize()
self.assertEqual(m, m2)
m = Matrix(3)
m_o = m.GetOrthonormalized()
# GetOrthonormalized() should not mutate m
self.assertNotEqual(m, m_o)
self.assertEqual(m_o, Matrix(1))
m.Orthonormalize()
self.assertEqual(m, Matrix(1))
m = Matrix(1, 0, 0, 1, 0, 0, 1, 0, 0)
# should print a warning
print("expect a warning about failed convergence in OrthogonalizeBasis:")
m.Orthonormalize()
m = Matrix(1, 0, 0, 1, 0, 0.0001, 0, 1, 0)
m_o = m.GetOrthonormalized()
_VerifyOrthonormVecs(m_o)
m.Orthonormalize()
_VerifyOrthonormVecs(m)
r = Matrix().SetRotate(Gf.Rotation(Gf.Vec3d(1, 0, 0), 30)).ExtractRotation()
r2 = Gf.Rotation(Gf.Vec3d(1, 0, 0), 30)
self.assertTrue(Gf.IsClose(r.axis, r2.axis, 0.0001) and Gf.IsClose(r.angle, r2.angle, 0.0001))
r = Matrix().SetRotate(Gf.Rotation(Gf.Vec3d(1, 1, 1), 60)).ExtractRotation()
r2 = Gf.Rotation(Gf.Vec3d(1, 1, 1), 60)
self.assertTrue(Gf.IsClose(r.axis, r2.axis, 0.0001) and Gf.IsClose(r.angle, r2.angle, 0.0001))
r = Matrix().SetRotate(Gf.Rotation(Gf.Vec3d(1, 1, 1), 90)).ExtractRotation()
r2 = Gf.Rotation(Gf.Vec3d(1, 1, 1), 90)
self.assertTrue(Gf.IsClose(r.axis, r2.axis, 0.0001) and Gf.IsClose(r.angle, r2.angle, 0.0001))
r = Matrix().SetRotate(Gf.Rotation(Gf.Vec3d(1, 1, 1), 120)).ExtractRotation()
r2 = Gf.Rotation(Gf.Vec3d(1, 1, 1), 120)
self.assertTrue(Gf.IsClose(r.axis, r2.axis, 0.0001) and Gf.IsClose(r.angle, r2.angle, 0.0001))
# Setting rotation using a quaternion should give the same results
# as setting a GfRotation.
rot = Gf.Rotation(Gf.Vec3d(1, 1, 1), 120)
quat = Quat(rot.GetQuaternion().GetReal(), Vec(rot.GetQuaternion().GetImaginary()))
r = Matrix().SetRotate(rot).ExtractRotation()
r2 = Matrix().SetRotate(quat).ExtractRotation()
self.assertTrue(Gf.IsClose(r.axis, r2.axis, 0.0001) and Gf.IsClose(r.angle, r2.angle, 0.0001))
self.assertEqual(Matrix().SetScale(10), Matrix(10))
m = Matrix().SetScale(Vec(1, 2, 3))
self.assertTrue(m[0, 0] == 1 and m[1, 1] == 2 and m[2, 2] == 3)
# Initializing with GfRotation should give same results as SetRotate.
r = Matrix().SetRotate(Gf.Rotation(Gf.Vec3d(1, 0, 0), 30)).ExtractRotation()
r2 = Matrix(Gf.Rotation(Gf.Vec3d(1, 0, 0), 30)).ExtractRotation()
self.assertTrue(Gf.IsClose(r.axis, r2.axis, 0.0001) and Gf.IsClose(r.angle, r2.angle, 0.0001))
# Initializing with a quaternion should give same results as SetRotate.
rot = Gf.Rotation(Gf.Vec3d(1, 1, 1), 120)
quat = Quat(rot.GetQuaternion().GetReal(), Vec(rot.GetQuaternion().GetImaginary()))
r = Matrix().SetRotate(quat).ExtractRotation()
r2 = Matrix(quat).ExtractRotation()
self.assertTrue(Gf.IsClose(r.axis, r2.axis, 0.0001) and Gf.IsClose(r.angle, r2.angle, 0.0001))
self.assertEqual(Matrix(1, 0, 0, 0, 1, 0, 0, 0, 1).GetHandedness(), 1.0)
self.assertEqual(Matrix(-1, 0, 0, 0, 1, 0, 0, 0, 1).GetHandedness(), -1.0)
self.assertEqual(Matrix(0, 0, 0, 0, 0, 0, 0, 0, 0).GetHandedness(), 0.0)
self.assertTrue(Matrix(1, 0, 0, 0, 1, 0, 0, 0, 1).IsRightHanded())
self.assertTrue(Matrix(-1, 0, 0, 0, 1, 0, 0, 0, 1).IsLeftHanded())
# Test that this does not generate a nan in the angle (bug #12744)
mx = Gf.Matrix3d(
0.999999999982236,
-5.00662622471027e-06,
2.07636574601397e-06,
5.00666175191934e-06,
1.0000000000332,
-2.19113616402155e-07,
-2.07635686422463e-06,
2.19131379884019e-07,
1,
)
r = mx.ExtractRotation()
# math.isnan won't be available until python 2.6
if sys.version_info[0] >= 2 and sys.version_info[1] >= 6:
self.assertFalse(math.isnan(r.angle))
else:
# If this fails, then r.angle is Nan. Works on linux, may not be portable.
self.assertEqual(r.angle, r.angle)
def test_Matrix4Transforms(self):
from usdrt import Gf
# nv edit - TODO support Quatd and Quatf
Matrices = [
(Gf.Matrix4d, Gf.Vec4d, Gf.Matrix3d, Gf.Vec3d), # , Gf.Quatd),
(Gf.Matrix4f, Gf.Vec4f, Gf.Matrix3f, Gf.Vec3f),
] # , Gf.Quatf)]
# for (Matrix, Vec, Matrix3, Vec3, Quat) in Matrices:
for (Matrix, Vec, Matrix3, Vec3) in Matrices:
def _VerifyOrthonormVecs(mat):
v0 = Vec3(mat[0][0], mat[0][1], mat[0][2])
v1 = Vec3(mat[1][0], mat[1][1], mat[1][2])
v2 = Vec3(mat[2][0], mat[2][1], mat[2][2])
self.assertTrue(
Gf.IsClose(Gf.Dot(v0, v1), 0, 0.0001)
and Gf.IsClose(Gf.Dot(v0, v2), 0, 0.0001)
and Gf.IsClose(Gf.Dot(v1, v2), 0, 0.0001)
)
m = Matrix()
m.SetLookAt(Vec3(1, 0, 0), Vec3(0, 0, 1), Vec3(0, 1, 0))
# nv edit - break this across multiple statements
self.assertTrue(Gf.IsClose(m[0], Vec(-0.707107, 0, 0.707107, 0), 0.0001))
self.assertTrue(Gf.IsClose(m[1], Vec(0, 1, 0, 0), 0.0001))
self.assertTrue(Gf.IsClose(m[2], Vec(-0.707107, 0, -0.707107, 0), 0.0001))
self.assertTrue(Gf.IsClose(m[3], Vec(0.707107, 0, -0.707107, 1), 0.0001))
# Transform
v = Gf.Vec3f(1, 1, 1)
v2 = Matrix(3).Transform(v)
self.assertEqual(v2, Gf.Vec3f(1, 1, 1))
self.assertEqual(type(v2), Gf.Vec3f)
v = Gf.Vec3d(1, 1, 1)
v2 = Matrix(3).Transform(v)
self.assertEqual(v2, Gf.Vec3d(1, 1, 1))
self.assertEqual(type(v2), Gf.Vec3d)
# TransformDir
v = Gf.Vec3f(1, 1, 1)
v2 = Matrix(3).TransformDir(v)
self.assertEqual(v2, Gf.Vec3f(3, 3, 3))
self.assertEqual(type(v2), Gf.Vec3f)
v = Gf.Vec3d(1, 1, 1)
v2 = Matrix(3).TransformDir(v)
self.assertEqual(v2, Gf.Vec3d(3, 3, 3))
self.assertEqual(type(v2), Gf.Vec3d)
# TransformAffine
v = Gf.Vec3f(1, 1, 1)
# nv edit - no implict conversion from tuple yet
v2 = Matrix(3).SetTranslateOnly(Vec3(1, 2, 3)).TransformAffine(v)
self.assertEqual(v2, Gf.Vec3f(4, 5, 6))
self.assertEqual(type(v2), Gf.Vec3f)
v = Gf.Vec3d(1, 1, 1)
# nv edit - no implict conversion from tuple yet
v2 = Matrix(3).SetTranslateOnly(Vec3(1, 2, 3)).TransformAffine(v)
self.assertEqual(v2, Gf.Vec3d(4, 5, 6))
self.assertEqual(type(v2), Gf.Vec3d)
# Constructor, SetRotate, and SetRotateOnly w/GfQuaternion
""" nv edit Gf.Rotation not supported
m = Matrix()
r = Gf.Rotation(Gf.Vec3d(1,0,0), 30)
quat = r.GetQuaternion()
m.SetRotate(Quat(quat.GetReal(), Vec3(quat.GetImaginary())))
m2 = Matrix(r, Vec3(0,0,0))
m_o = m.GetOrthonormalized()
self.assertEqual(m_o, m2)
m.Orthonormalize()
self.assertEqual(m, m2)
m3 = Matrix(1)
m3.SetRotateOnly(Quat(quat.GetReal(), Vec3(quat.GetImaginary())))
self.assertEqual(m2, m3)
# Constructor, SetRotate, and SetRotateOnly w/GfRotation
m = Matrix()
r = Gf.Rotation(Gf.Vec3d(1,0,0), 30)
m.SetRotate(r)
m2 = Matrix(r, Vec3(0,0,0))
m_o = m.GetOrthonormalized()
self.assertEqual(m_o, m2)
m.Orthonormalize()
self.assertEqual(m, m2)
m3 = Matrix(1)
m3.SetRotateOnly(r)
self.assertEqual(m2, m3)
# Constructor, SetRotate, and SetRotateOnly w/mx
m3d = Matrix3()
m3d.SetRotate(Gf.Rotation(Gf.Vec3d(1,0,0), 30))
m = Matrix(m3d, Vec3(0,0,0))
m2 = Matrix()
m2 = m2.SetRotate(m3d)
m3 = Matrix()
m3 = m2.SetRotateOnly(m3d)
self.assertEqual(m, m2)
self.assertEqual(m2, m3)
"""
m = Matrix().SetTranslate(Vec3(12, 13, 14)) * Matrix(3)
m.Orthonormalize()
t = Matrix().SetTranslate(m.ExtractTranslation())
mnot = m * t.GetInverse()
self.assertEqual(mnot, Matrix(1))
m = Matrix()
m.SetTranslate(Vec3(1, 2, 3))
m2 = Matrix(m)
m3 = Matrix(1)
m3.SetTranslateOnly(Vec3(1, 2, 3))
m_o = m.GetOrthonormalized()
self.assertEqual(m_o, m2)
self.assertEqual(m_o, m3)
m.Orthonormalize()
self.assertEqual(m, m2)
self.assertEqual(m, m3)
v = Vec3(11, 22, 33)
m = Matrix(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16).SetTranslateOnly(v)
self.assertEqual(m.ExtractTranslation(), v)
# Initializing with GfRotation should give same results as SetRotate
# and SetTransform
""" nv edit TODO
r = Matrix().SetRotate(Gf.Rotation(Gf.Vec3d(1,0,0),30)).ExtractRotation()
r2 = Matrix(Gf.Rotation(Gf.Vec3d(1,0,0),30), Vec3(1,2,3)).ExtractRotation()
r3 = Matrix().SetTransform(Gf.Rotation(Gf.Vec3d(1,0,0),30), Vec3(1,2,3)).ExtractRotation()
self.assertTrue(Gf.IsClose(r.axis, r2.axis, 0.0001) and \
Gf.IsClose(r.angle, r2.angle, 0.0001))
self.assertTrue(Gf.IsClose(r3.axis, r2.axis, 0.0001) and \
Gf.IsClose(r3.angle, r2.angle, 0.0001))
# Initializing with GfRotation should give same results as
# SetRotate(quaternion) and SetTransform
rot = Gf.Rotation(Gf.Vec3d(1,0,0),30)
quat = Quat(rot.GetQuaternion().GetReal(),
Vec3(rot.GetQuaternion().GetImaginary()))
r = Matrix().SetRotate(quat).ExtractRotation()
r2 = Matrix(rot, Vec3(1,2,3)).ExtractRotation()
r3 = Matrix().SetTransform(rot, Vec3(1,2,3)).ExtractRotation()
self.assertTrue(Gf.IsClose(r.axis, r2.axis, 0.0001) and \
Gf.IsClose(r.angle, r2.angle, 0.0001))
self.assertTrue(Gf.IsClose(r3.axis, r2.axis, 0.0001) and \
Gf.IsClose(r3.angle, r2.angle, 0.0001))
# Same test w/mx instead of GfRotation
mx3d = Matrix3(Gf.Rotation(Gf.Vec3d(1,0,0),30))
r4 = Matrix().SetTransform(mx3d, Vec3(1,2,3)).ExtractRotation()
r5 = Matrix(mx3d, Vec3(1,2,3)).ExtractRotation()
self.assertTrue(Gf.IsClose(r4.axis, r2.axis, 0.0001) and \
Gf.IsClose(r4.angle, r2.angle, 0.0001))
self.assertTrue(Gf.IsClose(r4.axis, r5.axis, 0.0001) and \
Gf.IsClose(r4.angle, r5.angle, 0.0001))
# ExtractQuat() and ExtractRotation() should yield
# equivalent rotations.
m = Matrix(mx3d, Vec3(1,2,3))
r1 = m.ExtractRotation()
r2 = Gf.Rotation(m.ExtractRotationQuat())
self.assertTrue(Gf.IsClose(r1.axis, r2.axis, 0.0001) and \
Gf.IsClose(r2.angle, r2.angle, 0.0001))
m4 = Matrix(mx3d, Vec3(1,2,3)).ExtractRotationMatrix()
self.assertEqual(m4, mx3d)
"""
# Initializing with GfMatrix3d
# nv edit - dumb, not supported
# m = Matrix(1,2,3,0,4,5,6,0,7,8,9,0,10,11,12,1)
# m2 = Matrix(Matrix3(1,2,3,4,5,6,7,8,9), Vec3(10, 11, 12))
# assert(m == m2)
m = Matrix(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1)
# should print a warning - nv edit - our implementation doesn't
# print("expect a warning about failed convergence in OrthogonalizeBasis:")
m.Orthonormalize()
m = Matrix(1, 0, 0, 0, 1, 0, 0.0001, 0, 0, 1, 0, 0, 0, 0, 0, 1)
m_o = m.GetOrthonormalized()
_VerifyOrthonormVecs(m_o)
m.Orthonormalize()
_VerifyOrthonormVecs(m)
m = Matrix()
m[3, 0] = 4
m[3, 1] = 5
m[3, 2] = 6
self.assertEqual(m.ExtractTranslation(), Vec3(4, 5, 6))
self.assertEqual(Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1).GetHandedness(), 1.0)
self.assertEqual(Matrix(-1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1).GetHandedness(), -1.0)
self.assertEqual(Matrix(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0).GetHandedness(), 0.0)
self.assertTrue(Matrix(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1).IsRightHanded())
self.assertTrue(Matrix(-1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1).IsLeftHanded())
# RemoveScaleShear
""" nv edit Gf.Rotation not supported
m = Matrix().SetRotate(Gf.Rotation(Gf.Vec3d(0,0,1), 45))
m = Matrix().SetScale(Vec3(3,4,2)) * m
m = Matrix().SetRotate(Gf.Rotation(Gf.Vec3d(1,0,0), -30)) * m
r = m.RemoveScaleShear()
ro = r
ro.Orthonormalize()
self.assertEqual(ro, r)
shear = Matrix(1,0,1,0, 0,1,0,0, 0,0,1,0, 0,0,0,1)
r = shear.RemoveScaleShear()
ro = r
ro.Orthonormalize()
self.assertEqual(ro, r)
m = Matrix().SetRotate(Gf.Rotation(Gf.Vec3d(0,0,1), 45))
m = Matrix().SetRotate(Gf.Rotation(Gf.Vec3d(1,0,0), -30)) * m
m = Matrix().SetRotate(Gf.Rotation(Gf.Vec3d(0,1,0), 59)) * m
r = m.RemoveScaleShear()
maxEltErr = 0
for i in range(4):
for j in range(4):
maxEltErr = max(maxEltErr, abs(r[i][j] - m[i][j]))
self.assertTrue(Gf.IsClose(maxEltErr, 0.0, 1e-5))
# IsClose
self.assertFalse(Gf.IsClose(Matrix(1), Matrix(1.0001), 1e-5))
self.assertTrue(Gf.IsClose(Matrix(1), Matrix(1.000001), 1e-5))
"""
def test_Matrix4Factoring(self):
from usdrt import Gf
""" nv edit Gf.Rotation not supported
Matrices = [(Gf.Matrix4d, Gf.Vec3d),
(Gf.Matrix4f, Gf.Vec3f)]
for (Matrix, Vec3) in Matrices:
def testFactor(m, expectSuccess, eps=None):
factor = lambda m : m.Factor()
if eps is not None:
factor = lambda m : m.Factor(eps)
(success, scaleOrientation, scale, rotation, \
translation, projection) = factor(m)
self.assertEqual(success, expectSuccess)
factorProduct = scaleOrientation * \
Matrix().SetScale(scale) * \
scaleOrientation.GetInverse() * \
rotation * \
Matrix().SetTranslate(translation) * \
projection
maxEltErr = 0
for i in range(4):
for j in range(4):
maxEltErr = max(maxEltErr, abs(factorProduct[i][j] - m[i][j]))
self.assertTrue(Gf.IsClose(maxEltErr, 0.0, 1e-5), maxEltErr)
# A rotate
m = Matrix().SetRotate(Gf.Rotation(Gf.Vec3d(1,0,0), 45))
testFactor(m,True)
# A couple of rotates
m = Matrix().SetRotate(Gf.Rotation(Gf.Vec3d(0,0,1), -45))
m = Matrix().SetRotate(Gf.Rotation(Gf.Vec3d(1,0,0), 45)) * m
testFactor(m,True)
# A scale
m = Matrix().SetScale(Vec3(3,1,4))
testFactor(m,True)
# A scale in a rotated space
m = Matrix().SetRotate(Gf.Rotation(Gf.Vec3d(0,0,1), 45))
m = Matrix().SetScale(Vec3(3,4,2)) * m
m = Matrix().SetRotate(Gf.Rotation(Gf.Vec3d(0,0,1), -45)) * m
testFactor(m,True)
# A nearly degenerate scale
if Matrix == Gf.Matrix4d:
eps = 1e-10
elif Matrix == Gf.Matrix4f:
eps = 1e-5
m = Matrix().SetScale((eps*2, 1, 1))
testFactor(m,True)
# Test with epsilon.
m = Matrix().SetScale((eps*2, 1, 1))
testFactor(m,False,eps*3)
# A singular (1) scale in a rotated space
m = Matrix().SetRotate(Gf.Rotation(Gf.Vec3d(1,1,1), Gf.Vec3d(1,0,0) ))
m = m * Matrix().SetScale(Vec3(0,1,1))
m = m * Matrix().SetRotate(Gf.Rotation(Gf.Vec3d(1,0,0), Gf.Vec3d(1,1,1) ))
testFactor(m,False)
# A singular (2) scale in a rotated space
m = Matrix().SetRotate(Gf.Rotation(Gf.Vec3d(1,1,1), Gf.Vec3d(1,0,0) ))
m = m * Matrix().SetScale(Vec3(0,0,1))
m = m * Matrix().SetRotate(Gf.Rotation(Gf.Vec3d(1,0,0), Gf.Vec3d(1,1,1) ))
testFactor(m,False)
# A scale in a sheared space
shear = Matrix(1)
shear.SetRow3(0, Vec3(1, 1, 1).GetNormalized())
m = shear.GetInverse() * Matrix().SetScale(Vec3(2,3,4)) * shear
testFactor(m,True)
# A singular (1) scale in a sheared space
shear = Matrix(1)
shear.SetRow3(0, Vec3(1, 1, 1).GetNormalized())
m = shear.GetInverse() * Matrix().SetScale(Vec3(2,0,4)) * shear
testFactor(m,False)
# A singular (2) scale in a sheared space
shear = Matrix(1)
shear.SetRow3(0, Vec3(1, 1, 1).GetNormalized())
m = shear.GetInverse() * Matrix().SetScale(Vec3(0,3,0)) * shear
testFactor(m,False)
# A scale and a rotate
m = Matrix().SetRotate(Gf.Rotation(Gf.Vec3d(0,0,1), Gf.Vec3d(1,1,-1) ))
m = Matrix().SetScale(Vec3(1,2,3)) * m
testFactor(m,True)
# A singular (1) scale and a rotate
m = Matrix().SetRotate(Gf.Rotation(Gf.Vec3d(0,0,1), Gf.Vec3d(1,1,-1) ))
m = Matrix().SetScale(Vec3(0,2,3)) * m
testFactor(m,False)
# A singular (2) scale and a rotate
m = Matrix().SetRotate(Gf.Rotation(Gf.Vec3d(0,0,1), Gf.Vec3d(1,1,-1) ))
m = Matrix().SetScale(Vec3(0,0,3)) * m
testFactor(m,False)
# A singular scale (1), rotate, translate
m = Matrix().SetTranslate(Vec3(3,1,4))
m = Matrix().SetRotate(Gf.Rotation(Gf.Vec3d(0,0,1), Gf.Vec3d(1,1,-1) )) * m
m = Matrix().SetScale(Vec3(0,2,3)) * m
testFactor(m,False)
# A translate, rotate, singular scale (1), translate
m = Matrix().SetTranslate(Vec3(3,1,4))
m = Matrix().SetRotate(Gf.Rotation(Gf.Vec3d(0,0,1), Gf.Vec3d(1,1,-1) )) * m
m = Matrix().SetScale(Vec3(0,2,3)) * m
m = Matrix().SetTranslate(Vec3(-10,-20,-30)) * m
testFactor(m,False)
"""
def test_Matrix4Determinant(self):
from usdrt import Gf
Matrices = [Gf.Matrix4d, Gf.Matrix4f]
for Matrix in Matrices:
# Test GetDeterminant and GetInverse on Matrix4
def AssertDeterminant(m, det):
# Unfortunately, we don't have an override of Gf.IsClose
# for Gf.Matrix4*
for row1, row2 in zip(m * m.GetInverse(), Matrix()):
self.assertTrue(Gf.IsClose(row1, row2, 1e-5))
self.assertTrue(Gf.IsClose(m.GetDeterminant(), det, 1e-5))
m1 = Matrix(0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0)
det1 = -1.0
m2 = Matrix(0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0)
det2 = -1.0
m3 = Matrix(0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0)
det3 = -1.0
m4 = Matrix(1.0, 2.0, -1.0, 3.0, 2.0, 1.0, 4.0, 5.1, 2.0, 3.0, 1.0, 6.0, 3.0, 2.0, 1.0, 1.0)
det4 = 16.8
AssertDeterminant(m1, det1)
AssertDeterminant(m2, det2)
AssertDeterminant(m3, det3)
AssertDeterminant(m4, det4)
AssertDeterminant(m1 * m1, det1 * det1)
AssertDeterminant(m1 * m4, det1 * det4)
AssertDeterminant(m1 * m3 * m4, det1 * det3 * det4)
AssertDeterminant(m1 * m3 * m4 * m2, det1 * det3 * det4 * det2)
AssertDeterminant(m2 * m3 * m4 * m2, det2 * det3 * det4 * det2)
| 35,507 | Python | 40.384615 | 118 | 0.514321 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/scenegraph/tests/test_assetpath.py | __copyright__ = "Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import os
import pathlib
import platform
import sys
import time
import unittest
from . import tc_logger
def setUpModule():
# pre-load USD before anything else to prevent crash
# from weird carb conflict
# FIXME ^^^
try:
from . import update_path_and_load_usd
update_path_and_load_usd()
except ImportError:
# not needed in Kit
pass
try:
import omni.kit.test
TestClass = omni.kit.test.AsyncTestCase
TEST_DIR = str(pathlib.Path(__file__).parent.parent.parent.parent)
except ImportError:
from . import TestRtScenegraph
TestClass = TestRtScenegraph
TEST_DIR = "."
class TestSdfAssetPath(TestClass):
@tc_logger
def test_ctor(self):
from usdrt import Sdf
emptypath = Sdf.AssetPath()
self.assertEqual(emptypath.path, "")
self.assertEqual(emptypath.resolvedPath, "")
asset_only = Sdf.AssetPath("hello")
self.assertEqual(asset_only.path, "hello")
self.assertEqual(asset_only.resolvedPath, "")
asset_and_resolved = Sdf.AssetPath("hello", "hello.txt")
self.assertEqual(asset_and_resolved.path, "hello")
self.assertEqual(asset_and_resolved.resolvedPath, "hello.txt")
@tc_logger
def test_get_asset(self):
from usdrt import Sdf, Usd, Vt
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath("/Cornell_Box/Root/Looks/Green1SG/Green_Side")
self.assertTrue(prim)
attr = prim.GetAttribute("info:mdl:sourceAsset")
self.assertTrue(attr)
self.assertTrue(attr.HasValue())
val = attr.Get()
self.assertEqual(val.path, "./Green_Side.mdl")
self.assertTrue(os.path.normpath(val.resolvedPath).endswith(os.path.normpath("data/usd/tests/Green_Side.mdl")))
@tc_logger
def test_get_assetlist(self):
from usdrt import Sdf, Usd, Vt
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/test_assetlist.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/World"))
self.assertTrue(prim)
attr = prim.GetAttribute("test:assetlist")
self.assertTrue(attr)
self.assertTrue(attr.HasValue())
val = attr.Get()
self.assertEqual(len(val), 3)
unresolved = ["./asset.txt", "./asset_other.txt", "./existing_1042.txt"]
resolved_ends = [
os.path.normpath(i)
for i in ["data/usd/tests/asset.txt", "data/usd/tests/asset_other.txt", "data/usd/tests/existing_1042.txt"]
]
for i in range(3):
self.assertEqual(val[i].path, unresolved[i])
self.assertTrue(os.path.normpath(val[i].resolvedPath).endswith(resolved_ends[i]))
@tc_logger
def test_set_asset(self):
from usdrt import Sdf, Usd, Vt
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath("/Cornell_Box/Root/Looks/Green1SG/Green_Side")
self.assertTrue(prim)
attr = prim.GetAttribute("info:mdl:sourceAsset")
self.assertTrue(attr)
self.assertTrue(attr.HasValue())
newval = Sdf.AssetPath("hello", "hello.txt")
self.assertTrue(attr.Set(newval))
val = attr.Get()
self.assertEqual(val.path, "hello")
self.assertEqual(val.resolvedPath, "hello.txt")
@tc_logger
def test_set_assetlist(self):
from usdrt import Sdf, Usd, Vt
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/test_assetlist.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/World"))
self.assertTrue(prim)
attr = prim.GetAttribute("test:assetlist")
self.assertTrue(attr)
self.assertTrue(attr.HasValue())
newval = Vt.AssetArray(4)
for i in range(4):
newval[i] = Sdf.AssetPath(f"hello{i}", f"hello{i}.txt")
attr.Set(newval)
# Freeing the original array must be fine
del newval
val = attr.Get()
self.assertEqual(len(val), 4)
for i in range(4):
self.assertEqual(val[i].path, f"hello{i}")
self.assertEqual(val[i].resolvedPath, f"hello{i}.txt")
| 4,750 | Python | 28.509317 | 119 | 0.638526 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/scenegraph/tests/test_cube.py | __copyright__ = "Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import os
import pathlib
import platform
import sys
import time
import unittest
from . import tc_logger
def setUpModule():
# pre-load USD before anything else to prevent crash
# from weird carb conflict
# FIXME ^^^
try:
from . import update_path_and_load_usd
update_path_and_load_usd()
except ImportError:
# not needed in Kit
pass
try:
import omni.kit.test
TestClass = omni.kit.test.AsyncTestCase
TEST_DIR = str(pathlib.Path(__file__).parent.parent.parent.parent)
except ImportError:
from . import TestRtScenegraph
TestClass = TestRtScenegraph
TEST_DIR = "."
class TestUsdGeomCube(TestClass):
@tc_logger
def test_get_attribute(self):
from usdrt import Sdf, Usd, UsdGeom
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cube.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cube/Geom/cube"))
self.assertTrue(prim)
cube = UsdGeom.Cube(prim)
self.assertTrue(cube)
# create attribute using prim api
attr = prim.CreateAttribute(UsdGeom.Tokens.size, Sdf.ValueTypeNames.Double, False)
self.assertTrue(attr)
# verify get attribute using schema api
cubeAttr = cube.GetSizeAttr()
self.assertTrue(cubeAttr)
self.assertTrue(cubeAttr.GetName() == "size")
val = cubeAttr.Get()
assert val == 25
@tc_logger
def test_create_attribute(self):
from usdrt import Sdf, Usd, UsdGeom
stage = Usd.Stage.CreateInMemory("test.usda")
self.assertTrue(stage)
prim = stage.DefinePrim(Sdf.Path("/Cube/Geom/cube"), "Cube")
self.assertFalse(prim.HasAttribute("size"))
# create attribute using schema api
cube = UsdGeom.Cube(prim)
self.assertTrue(cube)
attr = cube.CreateSizeAttr()
# verify using prim api
self.assertTrue(attr)
self.assertTrue(prim.HasAttribute(UsdGeom.Tokens.size))
self.assertTrue(attr.GetName() == "size")
@tc_logger
def test_boolean_operator(self):
from usdrt import Sdf, Usd, UsdGeom
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cube.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath("/Cube/Geom/cube")
self.assertTrue(prim)
# is this a valid schema object?
self.assertTrue(UsdGeom.Cube(prim))
self.assertTrue(prim)
self.assertFalse(UsdGeom.Cone(prim))
self.assertTrue(prim)
# verify we have an api applied
self.assertTrue(prim.HasAPI("MotionAPI"))
# is this a valid api applied in fabric?
self.assertTrue(UsdGeom.MotionAPI(prim))
self.assertFalse(UsdGeom.VisibilityAPI(prim))
@tc_logger
def test_define(self):
from usdrt import Sdf, Usd, UsdGeom
stage = Usd.Stage.CreateInMemory("test.usda")
self.assertTrue(stage)
prim = UsdGeom.Cube.Define(stage, Sdf.Path("/Cube/Geom/cube"))
self.assertTrue(prim)
| 3,504 | Python | 27.266129 | 90 | 0.658961 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/scenegraph/tests/test_schema_base.py | __copyright__ = "Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import os
import pathlib
import platform
import sys
import time
import unittest
from . import tc_logger
def setUpModule():
# pre-load USD before anything else to prevent crash
# from weird carb conflict
# FIXME ^^^
try:
from . import update_path_and_load_usd
update_path_and_load_usd()
except ImportError:
# not needed in Kit
pass
try:
import omni.kit.test
TestClass = omni.kit.test.AsyncTestCase
TEST_DIR = str(pathlib.Path(__file__).parent.parent.parent.parent)
except ImportError:
from . import TestRtScenegraph
TestClass = TestRtScenegraph
TEST_DIR = "."
class TestSchemaBase(TestClass):
@tc_logger
def test_invalid_schema_base(self):
from usdrt import Sdf, Usd
sb = Usd.SchemaBase()
# Conversion to bool should return False.
self.assertFalse(sb)
# It should still be safe to get the prim, but the prim will be invalid.
p = sb.GetPrim()
self.assertFalse(p.IsValid())
# It should still be safe to get the path, but the path will be empty.
self.assertEqual(sb.GetPrimPath(), Sdf.Path(""))
# Try creating a CollectionAPI from it, and make sure the result is
# a suitably invalid CollactionAPI object.
coll = Usd.CollectionAPI(sb, "newcollection")
self.assertFalse(coll)
# revisit
# with self.assertRaises(RuntimeError):
# coll.CreateExpansionRuleAttr()
class TestImports(TestClass):
@tc_logger
def test_usd_schema_imports(self):
try:
from usdrt import Usd
except ImportError:
self.fail("from usdrt import Usd failed")
try:
from usdrt import UsdGeom
except ImportError:
self.fail("from usdrt import UsdGeom failed")
try:
from usdrt import UsdLux
except ImportError:
self.fail("from usdrt import UsdLux failed")
try:
from usdrt import UsdMedia
except ImportError:
self.fail("from usdrt import UsdMedia failed")
try:
from usdrt import UsdRender
except ImportError:
self.fail("from usdrt import UsdRender failed")
try:
from usdrt import UsdShade
except ImportError:
self.fail("from usdrt import UsdShade failed")
try:
from usdrt import UsdSkel
except ImportError:
self.fail("from usdrt import UsdSkel failed")
try:
from usdrt import UsdUI
except ImportError:
self.fail("from usdrt import UsdUI failed")
try:
from usdrt import UsdVol
except ImportError:
self.fail("from usdrt import UsdVol failed")
# Nvidia Schemas
try:
from usdrt import UsdPhysics
except ImportError:
self.fail("from usdrt import UsdPhysics failed")
try:
from usdrt import PhysxSchema
except ImportError:
self.fail("from usdrt import PhysxSchema failed")
try:
from usdrt import ForceFieldSchema
except ImportError:
self.fail("from usdrt import ForceFieldSchema failed")
try:
from usdrt import DestructionSchema
except ImportError:
self.fail("from usdrt import DestructionSchema failed")
| 3,879 | Python | 27.740741 | 80 | 0.633668 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/scenegraph/tests/test_gf_range_extras.py | __copyright__ = "Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import copy
import math
import os
import pathlib
import platform
import sys
import time
import unittest
from . import tc_logger
def setUpModule():
# pre-load USD before anything else to prevent crash
# from weird carb conflict
# FIXME ^^^
try:
from . import update_path_and_load_usd
update_path_and_load_usd()
except ImportError:
# not needed in Kit
pass
try:
import omni.kit.test
TestClass = omni.kit.test.AsyncTestCase
TEST_DIR = str(pathlib.Path(__file__).parent.parent.parent.parent)
except ImportError:
from . import TestRtScenegraph
TestClass = TestRtScenegraph
TEST_DIR = "."
class TestGfRangeCopy(TestClass):
"""Test copy and deepcopy support for Gf.Range* classes"""
@tc_logger
def test_copy(self):
"""Test __copy__"""
from usdrt import Gf
x = Gf.Range3d()
y = x
self.assertTrue(y is x)
y.min[0] = 10
self.assertEqual(x.min[0], 10)
z = copy.copy(y)
self.assertFalse(z is y)
y.min[0] = 100
self.assertEqual(z.min[0], 10)
x = Gf.Range2d()
y = x
self.assertTrue(y is x)
y.min[0] = 20
self.assertEqual(x.min[0], 20)
z = copy.copy(y)
self.assertFalse(z is y)
y.min[0] = 200
self.assertEqual(z.min[0], 20)
x = Gf.Range1d()
y = x
self.assertTrue(y is x)
y.min = 30
self.assertEqual(x.min, 30)
z = copy.copy(y)
self.assertFalse(z is y)
y.min = 300
self.assertEqual(z.min, 30)
@tc_logger
def test_deepcopy(self):
"""Test __deepcopy__"""
from usdrt import Gf
x = Gf.Range3d()
y = x
self.assertTrue(y is x)
y.min[0] = 10
self.assertEqual(x.min[0], 10)
z = copy.deepcopy(y)
self.assertFalse(z is y)
y.min[0] = 100
self.assertEqual(z.min[0], 10)
x = Gf.Range2d()
y = x
self.assertTrue(y is x)
y.min[0] = 20
self.assertEqual(x.min[0], 20)
z = copy.deepcopy(y)
self.assertFalse(z is y)
y.min[0] = 200
self.assertEqual(z.min[0], 20)
x = Gf.Range1d()
y = x
self.assertTrue(y is x)
y.min = 30
self.assertEqual(x.min, 30)
z = copy.deepcopy(y)
self.assertFalse(z is y)
y.min = 300
self.assertEqual(z.min, 30)
class TestGfRangeDebugging(TestClass):
"""Test human readable output functions for debugging"""
@tc_logger
def test_repr_representation(self):
"""Test __repr__"""
from usdrt import Gf
test_min = Gf.Vec3d(1, 2, 3)
test_max = Gf.Vec3d(4, 5, 6)
test_range = Gf.Range3d(test_min, test_max)
expected = "Gf.Range3d(Gf.Vec3d(1.0, 2.0, 3.0), Gf.Vec3d(4.0, 5.0, 6.0))"
self.assertEqual(repr(test_range), expected)
| 3,417 | Python | 22.251701 | 81 | 0.581797 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/scenegraph/tests/testGfRange.py | #!/pxrpythonsubst
#
# Copyright 2016 Pixar
#
# Licensed under the Apache License, Version 2.0 (the "Apache License")
# with the following modification; you may not use this file except in
# compliance with the Apache License and the following modification to it:
# Section 6. Trademarks. is deleted and replaced with:
#
# 6. Trademarks. This License does not grant permission to use the trade
# names, trademarks, service marks, or product names of the Licensor
# and its affiliates, except as required to comply with Section 4(c) of
# the License and to reproduce the content of the NOTICE file.
#
# You may obtain a copy of the Apache License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Apache License with the above modification is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the Apache License for the specific
# language governing permissions and limitations under the Apache License.
#
# Note: This is just pulled directly from USD and modified
# (we only support Gf.Range3d classes, but not Gf.Range3f, so
# these tests are updated to reflect that)
# https://github.com/PixarAnimationStudios/USD/blob/release/pxr/base/gf/testenv/testGfRange.py
import math
import sys
import unittest
##### Uncomment for better assert messages
# if 'unittest.util' in __import__('sys').modules:
# # Show full diff in self.assertEqual.
# __import__('sys').modules['unittest.util']._MAX_LENGTH = 999999999
def setUpModule():
# pre-load USD before anything else to prevent crash
# from weird carb conflict
# FIXME ^^^
try:
from . import update_path_and_load_usd
update_path_and_load_usd()
except ImportError:
# not needed in Kit
pass
try:
import omni.kit.test
TestClass = omni.kit.test.AsyncTestCase
except ImportError:
TestClass = unittest.TestCase
from usdrt import Gf
def makeValue(Value, vals):
if Value == float:
return Value(vals[0])
else:
v = Value()
for i in range(v.dimension):
v[i] = vals[i]
return v
class TestGfRange(TestClass):
Ranges = [
(Gf.Range1d, float),
(Gf.Range2d, Gf.Vec2d),
(Gf.Range3d, Gf.Vec3d),
(Gf.Range1f, float),
(Gf.Range2f, Gf.Vec2f),
(Gf.Range3f, Gf.Vec3f),
]
def runTest(self):
for Range, Value in self.Ranges:
# constructors
self.assertIsInstance(Range(), Range)
self.assertIsInstance(Range(Value(), Value()), Range)
v = makeValue(Value, [1, 2, 3, 4])
r = Range()
r.min = v
self.assertEqual(r.min, v)
r.max = v
self.assertEqual(r.max, v)
r = Range()
self.assertTrue(r.IsEmpty())
r = Range(-1)
self.assertTrue(r.IsEmpty())
v1 = makeValue(Value, [-1, -2, -3, -4])
v2 = makeValue(Value, [1, 2, 3, 4])
r = Range(v2, v1)
self.assertTrue(r.IsEmpty())
r = Range(v1, v2)
self.assertFalse(r.IsEmpty())
r.SetEmpty()
self.assertTrue(r.IsEmpty())
r = Range(v1, v2)
self.assertEqual(r.GetSize(), v2 - v1)
v1 = makeValue(Value, [-1, 1, -11, 2])
v2 = makeValue(Value, [1, 3, -10, 2])
v3 = makeValue(Value, [0, 2, -10.5, 2])
v4 = makeValue(Value, [0, 0, 0, 0])
r1 = Range(v1, v2)
self.assertEqual(r1.GetMidpoint(), v3)
r1.SetEmpty()
r2 = Range()
self.assertEqual(r1.GetMidpoint(), v4)
self.assertEqual(r2.GetMidpoint(), v4)
v1 = makeValue(Value, [-1, -2, -3, -4])
v2 = makeValue(Value, [1, 2, 3, 4])
r = Range(v1, v2)
v1 = makeValue(Value, [0, 0, 0, 0])
v2 = makeValue(Value, [2, 3, 4, 5])
self.assertTrue(r.Contains(v1))
self.assertFalse(r.Contains(v2))
v1 = makeValue(Value, [-2, -4, -6, -8])
v2 = makeValue(Value, [2, 4, 6, 8])
r1 = Range(v1, v2)
v1 = makeValue(Value, [-1, -2, -3, -4])
v2 = makeValue(Value, [1, 2, 3, 4])
r2 = Range(v1, v2)
self.assertTrue(r1.Contains(r2))
self.assertFalse(r2.Contains(r1))
v1 = makeValue(Value, [-1, -2, -3, -4])
v2 = makeValue(Value, [2, 4, 6, 8])
v3 = makeValue(Value, [-2, -4, -6, -8])
v4 = makeValue(Value, [1, 2, 3, 4])
r1 = Range(v1, v2)
r2 = Range(v3, v4)
self.assertEqual(Range.GetUnion(r1, r2), Range(v3, v2))
self.assertEqual(Range.GetIntersection(r1, r2), Range(v1, v4))
r1 = Range(v1, v2)
self.assertEqual(r1.UnionWith(r2), Range(v3, v2))
r1 = Range(v1, v2)
self.assertEqual(r1.UnionWith(v3), Range(v3, v2))
r1 = Range(v1, v2)
self.assertEqual(r1.IntersectWith(r2), Range(v1, v4))
r1 = Range(v1, v2)
v5 = makeValue(Value, [100, 100, 100, 100])
dsqr = r1.GetDistanceSquared(v5)
if Value == float:
self.assertEqual(dsqr, 9604)
elif Value.dimension == 2:
self.assertEqual(dsqr, 18820)
elif Value.dimension == 3:
self.assertEqual(dsqr, 27656)
else:
self.fail()
r1 = Range(v1, v2)
v5 = makeValue(Value, [-100, -100, -100, -100])
dsqr = r1.GetDistanceSquared(v5)
if Value == float:
self.assertEqual(dsqr, 9801)
elif Value.dimension == 2:
self.assertEqual(dsqr, 19405)
elif Value.dimension == 3:
self.assertEqual(dsqr, 28814)
else:
self.fail()
v1 = makeValue(Value, [1, 2, 3, 4])
v2 = makeValue(Value, [2, 3, 4, 5])
v3 = makeValue(Value, [3, 4, 5, 6])
v4 = makeValue(Value, [4, 5, 6, 7])
r1 = Range(v1, v2)
r2 = Range(v2, v3)
r3 = Range(v3, v4)
r4 = Range(v4, v5)
self.assertEqual(r1 + r2, Range(makeValue(Value, [3, 5, 7, 9]), makeValue(Value, [5, 7, 9, 11])))
self.assertEqual(r1 - r2, Range(makeValue(Value, [-2, -2, -2, -2]), makeValue(Value, [0, 0, 0, 0])))
self.assertEqual(r1 * 10, Range(makeValue(Value, [10, 20, 30, 40]), makeValue(Value, [20, 30, 40, 50])))
self.assertEqual(10 * r1, Range(makeValue(Value, [10, 20, 30, 40]), makeValue(Value, [20, 30, 40, 50])))
tmp = r1 / 10
self.assertTrue(
Gf.IsClose(tmp.min, makeValue(Value, [0.1, 0.2, 0.3, 0.4]), 0.00001)
and Gf.IsClose(tmp.max, makeValue(Value, [0.2, 0.3, 0.4, 0.5]), 0.00001)
)
self.assertEqual(r1, Range(makeValue(Value, [1, 2, 3, 4]), makeValue(Value, [2, 3, 4, 5])))
self.assertFalse(r1 != Range(makeValue(Value, [1, 2, 3, 4]), makeValue(Value, [2, 3, 4, 5])))
r1 = Range(v1, v2)
r2 = Range(v2, v3)
r1 += r2
self.assertEqual(r1, Range(makeValue(Value, [3, 5, 7, 9]), makeValue(Value, [5, 7, 9, 11])))
r1 = Range(v1, v2)
r1 -= r2
self.assertEqual(r1, Range(makeValue(Value, [-2, -2, -2, -2]), makeValue(Value, [0, 0, 0, 0])))
r1 = Range(v1, v2)
r1 *= 10
self.assertEqual(r1, Range(makeValue(Value, [10, 20, 30, 40]), makeValue(Value, [20, 30, 40, 50])))
r1 = Range(v1, v2)
r1 *= -10
self.assertEqual(r1, Range(makeValue(Value, [-20, -30, -40, -50]), makeValue(Value, [-10, -20, -30, -40])))
r1 = Range(v1, v2)
r1 /= 10
self.assertTrue(
Gf.IsClose(r1.min, makeValue(Value, [0.1, 0.2, 0.3, 0.4]), 0.00001)
and Gf.IsClose(r1.max, makeValue(Value, [0.2, 0.3, 0.4, 0.5]), 0.00001)
)
self.assertEqual(r1, eval(repr(r1)))
self.assertTrue(len(str(Range())))
# now test GetCorner and GetOctant for Gf.Range2f and Gf.Range2d
Ranges = [(Gf.Range2d, Gf.Vec2d), (Gf.Range2f, Gf.Vec2f)]
for Range, Value in Ranges:
rf = Range.unitSquare()
self.assertTrue(
rf.GetCorner(0) == Value(0, 0)
and rf.GetCorner(1) == Value(1, 0)
and rf.GetCorner(2) == Value(0, 1)
and rf.GetCorner(3) == Value(1, 1)
)
self.assertTrue(
rf.GetQuadrant(0) == Range(Value(0, 0), Value(0.5, 0.5))
and rf.GetQuadrant(1) == Range(Value(0.5, 0), Value(1, 0.5))
and rf.GetQuadrant(2) == Range(Value(0, 0.5), Value(0.5, 1))
and rf.GetQuadrant(3) == Range(Value(0.5, 0.5), Value(1, 1))
)
# now test GetCorner and GetOctant for Gf.Range3f and Gf.Range3d
Ranges = [(Gf.Range3d, Gf.Vec3d), (Gf.Range3f, Gf.Vec3f)]
for Range, Value in Ranges:
rf = Range.unitCube()
self.assertTrue(
rf.GetCorner(0) == Value(0, 0, 0)
and rf.GetCorner(1) == Value(1, 0, 0)
and rf.GetCorner(2) == Value(0, 1, 0)
and rf.GetCorner(3) == Value(1, 1, 0)
and rf.GetCorner(4) == Value(0, 0, 1)
and rf.GetCorner(5) == Value(1, 0, 1)
and rf.GetCorner(6) == Value(0, 1, 1)
and rf.GetCorner(7) == Value(1, 1, 1)
and rf.GetCorner(8) == Value(0, 0, 0)
)
vals = [
[(0.0, 0.0, 0.0), (0.5, 0.5, 0.5)],
[(0.5, 0.0, 0.0), (1.0, 0.5, 0.5)],
[(0.0, 0.5, 0.0), (0.5, 1.0, 0.5)],
[(0.5, 0.5, 0.0), (1.0, 1.0, 0.5)],
[(0.0, 0.0, 0.5), (0.5, 0.5, 1.0)],
[(0.5, 0.0, 0.5), (1.0, 0.5, 1.0)],
[(0.0, 0.5, 0.5), (0.5, 1.0, 1.0)],
[(0.5, 0.5, 0.5), (1.0, 1.0, 1.0)],
]
ranges = [Range(Value(v[0]), Value(v[1])) for v in vals]
for i in range(8):
self.assertEqual(rf.GetOctant(i), ranges[i])
if __name__ == "__main__":
unittest.main()
| 10,526 | Python | 34.564189 | 119 | 0.51197 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/scenegraph/tests/test_stage.py | __copyright__ = "Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import os
import pathlib
import platform
import random
import sys
import tempfile
import time
import unittest
from . import tc_logger
def setUpModule():
# pre-load USD before anything else to prevent crash
# from weird carb conflict
# FIXME ^^^
try:
from . import update_path_and_load_usd
update_path_and_load_usd()
except ImportError:
# not needed in Kit
pass
try:
import omni.kit.test
TestClass = omni.kit.test.AsyncTestCase
TEST_DIR = str(pathlib.Path(__file__).parent.parent.parent.parent)
except ImportError:
from . import TestRtScenegraph
TestClass = TestRtScenegraph
TEST_DIR = "."
def get_tmp_usda_path(outdir):
timestr = time.strftime("%Y_%m_%d_%H_%M_%S", time.localtime())
randstr = random.randint(0, 32767)
return os.path.join(outdir, f"{timestr}_{randstr}.usda")
class TestUsdStage(TestClass):
@tc_logger
def test_open(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
@tc_logger
def test_create_new(self):
from usdrt import Sdf, Usd
with tempfile.TemporaryDirectory() as tempdir:
stage = Usd.Stage.CreateNew(get_tmp_usda_path(tempdir))
self.assertTrue(stage)
@tc_logger
def test_attach(self):
import pxr
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
cache = pxr.UsdUtils.StageCache.Get()
layer = pxr.Sdf.Layer.FindOrOpen(TEST_DIR + "/data/usd/tests/cornell.usda")
usd_stage = cache.FindOneMatching(layer)
stage_id = cache.GetId(usd_stage).ToLongInt()
attached_stage = Usd.Stage.Attach(stage_id)
self.assertTrue(attached_stage)
# verify attached stage can access stage in progress
prim = attached_stage.GetPrimAtPath(Sdf.Path("/Cornell_Box"))
self.assertTrue(prim)
# verify destruction of attached stage does not destroy stage in progress
del attached_stage
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box"))
self.assertTrue(prim)
cache.Clear()
@tc_logger
def test_attach_no_swh(self):
import pxr
from usdrt import Sdf, Usd
# Note - no SWH created here
stage = pxr.Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
cache = pxr.UsdUtils.StageCache.Get()
id = cache.Insert(stage)
stage_id = id.ToLongInt()
# This creates the SWH
self.assertFalse(Usd.Stage.SimStageWithHistoryExists(stage_id))
attached_stage = Usd.Stage.Attach(stage_id)
self.assertTrue(attached_stage)
self.assertTrue(Usd.Stage.SimStageWithHistoryExists(stage_id))
# verify attached stage can access stage in progress
prim = attached_stage.GetPrimAtPath(Sdf.Path("/Cornell_Box"))
self.assertTrue(prim)
# verify that assumed ownership cleans up SWH on destruction
self.assertTrue(Usd.Stage.SimStageWithHistoryExists(stage_id))
# deprecated API support for 104
self.assertTrue(Usd.Stage.StageWithHistoryExists(stage_id))
del attached_stage
self.assertFalse(Usd.Stage.SimStageWithHistoryExists(stage_id))
# deprecated API support for 104
self.assertFalse(Usd.Stage.StageWithHistoryExists(stage_id))
cache.Clear()
@tc_logger
def test_invalid_swh_id(self):
import pxr
from usdrt import Sdf, Usd
# OM-85698 can pass invalid ID to StageWithHistoryExists
self.assertFalse(Usd.Stage.SimStageWithHistoryExists(-1))
self.assertFalse(Usd.Stage.StageWithHistoryExists(-1))
@tc_logger
def test_get_sip_id(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
id = stage.GetStageReaderWriterId()
self.assertNotEqual(id.id, 0)
# deprecated API support for 104
id2 = stage.GetStageInProgressId()
self.assertNotEqual(id2.id, 0)
self.assertEqual(id.id, id2.id)
@tc_logger
def test_get_prim_at_path(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box"))
self.assertTrue(prim)
@tc_logger
def test_get_prim_at_path_invalid(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Invalid"))
self.assertFalse(prim)
@tc_logger
def test_get_prim_at_path_only_in_fabric(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
defined = stage.DefinePrim("/Test", "Cube")
self.assertTrue(defined)
got = stage.GetPrimAtPath("/Test")
self.assertTrue(got)
self.assertEqual(got.GetName(), "Test")
@tc_logger
def test_get_default_prim(self):
from usdrt import Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetDefaultPrim()
self.assertTrue(prim)
self.assertTrue(prim.GetName() == "Cornell_Box")
@tc_logger
def test_get_pseudo_root(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPseudoRoot()
self.assertTrue(prim)
self.assertTrue(prim.GetPath() == Sdf.Path("/"))
@tc_logger
def test_define_prim(self):
from usdrt import Sdf, Usd
with tempfile.TemporaryDirectory() as tempdir:
stage = Usd.Stage.CreateNew(get_tmp_usda_path(tempdir))
self.assertTrue(stage)
prim = stage.DefinePrim(Sdf.Path("/Test"), "Mesh")
self.assertTrue(prim)
self.assertEqual(prim.GetName(), "Test")
self.assertEqual(prim.GetTypeName(), "Mesh")
prim_notype = stage.DefinePrim(Sdf.Path("/Test2"))
self.assertTrue(prim_notype)
self.assertEqual(prim_notype.GetName(), "Test2")
self.assertEqual(prim_notype.GetTypeName(), "")
@tc_logger
def test_define_prim_with_complete_type(self):
from usdrt import Sdf, Usd
# OM-90066 - use either alias or complete type name to define prim
with tempfile.TemporaryDirectory() as tempdir:
stage = Usd.Stage.CreateNew(get_tmp_usda_path(tempdir))
self.assertTrue(stage)
prim = stage.DefinePrim(Sdf.Path("/Test"), "Mesh")
self.assertTrue(prim)
self.assertEqual(prim.GetName(), "Test")
self.assertEqual(prim.GetTypeName(), "Mesh")
prim = stage.DefinePrim(Sdf.Path("/Test2"), "UsdGeomMesh")
self.assertTrue(prim)
self.assertEqual(prim.GetTypeName(), "Mesh")
result = stage.GetPrimsWithTypeName("Xformable")
self.assertEqual(len(result), 2)
self.assertTrue(Sdf.Path("/Test") in result)
self.assertTrue(Sdf.Path("/Test2") in result)
@tc_logger
def test_get_attribute_at_path(self):
from usdrt import Sdf, Usd, UsdGeom
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
attr = stage.GetAttributeAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back.points"))
self.assertTrue(attr)
self.assertTrue(attr.HasValue())
self.assertTrue(attr.GetName() == UsdGeom.Tokens.points)
@tc_logger
def test_get_attribute_at_path_invalid(self):
from usdrt import Sdf, Usd, UsdGeom
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
attr = stage.GetAttributeAtPath(Sdf.Path("/Invalid.points"))
self.assertFalse(attr)
attr = stage.GetAttributeAtPath(Sdf.Path("/Cornell_Box.invalid"))
self.assertFalse(attr)
@tc_logger
def test_get_relationship_at_path(self):
from usdrt import Sdf, Usd, UsdShade
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
rel = stage.GetRelationshipAtPath(
Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/Green_Wall/Green1SG.material:binding")
)
self.assertTrue(rel)
self.assertTrue(rel.HasAuthoredTargets())
self.assertEqual(rel.GetName(), UsdShade.Tokens.materialBinding)
@tc_logger
def test_get_relationship_at_path_invalid(self):
from usdrt import Sdf, Usd, UsdShade
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
rel = stage.GetRelationshipAtPath(Sdf.Path("/Invalid.material:binding"))
self.assertFalse(rel)
rel = stage.GetRelationshipAtPath(Sdf.Path("/Cornell_Box.invalid"))
self.assertFalse(rel)
@tc_logger
def test_traverse(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box"))
self.assertTrue(prim)
prim_range = stage.Traverse()
self.assertTrue(prim_range)
count = 0
for this_prim in prim_range:
count += 1
prim = this_prim
self.assertTrue(count == 40)
self.assertEqual(prim.GetPath(), Sdf.Path("/RectLight"))
@tc_logger
def test_write_layer(self):
"""
Note that in this implementation, WriteToLayer has the same limitations
as Fabric's exportUsd. New prims are not typed, empty prims may be
defined as overs, etc...
"""
import pxr
from usdrt import Gf, Sdf, Usd, UsdGeom, Vt
stage = Usd.Stage.CreateInMemory("test.usda")
self.assertTrue(stage)
world = stage.DefinePrim(Sdf.Path("/World"), "Xform")
triangle = stage.DefinePrim(Sdf.Path("/World/Triangle"), "Mesh")
points = triangle.CreateAttribute(UsdGeom.Tokens.points, Sdf.ValueTypeNames.Point3fArray, False)
faceVertexCounts = triangle.CreateAttribute(UsdGeom.Tokens.faceVertexCounts, Sdf.ValueTypeNames.IntArray, False)
faceVertexIndices = triangle.CreateAttribute(
UsdGeom.Tokens.faceVertexIndices, Sdf.ValueTypeNames.IntArray, False
)
points.Set(Vt.Vec3fArray([Gf.Vec3f(1, 0, 0), Gf.Vec3f(0, 1, 0), Gf.Vec3f(-1, 0, 0)]))
faceVertexCounts.Set(Vt.IntArray([3]))
faceVertexIndices.Set(Vt.IntArray([0, 1, 2]))
with tempfile.TemporaryDirectory() as tempdir:
test_file = get_tmp_usda_path(tempdir)
stage.WriteToLayer(test_file)
# Verfiy that data was stored to the new layer
test_stage = pxr.Usd.Stage.Open(test_file)
attr = test_stage.GetAttributeAtPath(pxr.Sdf.Path("/World/Triangle.points"))
self.assertTrue(attr)
self.assertTrue(attr.HasValue())
self.assertEqual(len(attr.Get()), 3)
prim = test_stage.GetPrimAtPath(pxr.Sdf.Path("/World/Triangle"))
self.assertEqual(prim.GetTypeName(), "Mesh")
@tc_logger
def test_write_stage(self):
"""
Note that in this implementation, WriteToStage has the same limitations
as Fabric's cacheToUsd. Most importantly, new prims defined in
Fabric are not written out to the USD Stage
"""
import pxr
from usdrt import Gf, Sdf, Usd, UsdGeom, Vt
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
cache = pxr.UsdUtils.StageCache.Get()
layer = pxr.Sdf.Layer.FindOrOpen(TEST_DIR + "/data/usd/tests/cornell.usda")
usd_stage = cache.FindOneMatching(layer)
stage_id = cache.GetId(usd_stage).ToLongInt()
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
self.assertTrue(prim)
# Change doubleSided to False in Fabric
attr = prim.GetAttribute(UsdGeom.Tokens.doubleSided)
self.assertTrue(attr)
result = attr.Set(False)
self.assertTrue(result)
attr = prim.GetAttribute(UsdGeom.Tokens.normals)
self.assertTrue(attr)
result = attr.Get()
self.assertEquals(len(result), 4)
for i in range(4):
self.assertEquals(result[i], Gf.Vec3f(0, 0, -1))
# Change normals to (1, 0, 0) in Fabric
self.assertTrue(result.IsFabricData())
for i in range(4):
result[i] = Gf.Vec3f(1, 0, 0)
stage.WriteToStage()
usd_prim = usd_stage.GetPrimAtPath(pxr.Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back"))
# Verify doubleSided is now false on USD stage
usd_attr = usd_prim.GetAttribute(UsdGeom.Tokens.doubleSided)
self.assertFalse(usd_attr.Get())
# Verify normals are now (1, 0, 0) on USD stage
usd_attr = usd_prim.GetAttribute(UsdGeom.Tokens.normals)
new_normals = usd_attr.Get()
self.assertEquals(len(new_normals), 4)
for i in range(4):
self.assertEquals(new_normals[i], pxr.Gf.Vec3f(1, 0, 0))
# Clear stage cache, since we modified the USD stage
cache.Clear()
@tc_logger
def test_set_attribute_value(self):
from usdrt import Gf, Sdf, Usd, Vt
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
newNormals = Vt.Vec3fArray([Gf.Vec3f(1, 0, 0), Gf.Vec3f(1, 0, 0), Gf.Vec3f(1, 0, 0), Gf.Vec3f(1, 0, 0)])
attrPath = Sdf.Path("/Cornell_Box/Root/Cornell_Box1_LP/White_Wall_Back.normals")
result = stage.SetAttributeValue(attrPath, newNormals)
self.assertTrue(result)
attr = stage.GetAttributeAtPath(attrPath)
self.assertTrue(attr)
value = attr.Get()
for i in range(4):
self.assertEquals(value[i], Gf.Vec3f(1, 0, 0))
@tc_logger
def test_set_attribute_value_invalid_prim(self):
from usdrt import Gf, Sdf, Usd, Vt
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
newNormals = Vt.Vec3fArray([Gf.Vec3f(1, 0, 0), Gf.Vec3f(1, 0, 0), Gf.Vec3f(1, 0, 0), Gf.Vec3f(1, 0, 0)])
attrPath = Sdf.Path("/Invalid.normals")
result = stage.SetAttributeValue(attrPath, newNormals)
self.assertFalse(result)
@tc_logger
def test_has_prim_at_path(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
# No prims populated into Fabric yet
self.assertFalse(stage.HasPrimAtPath(Sdf.Path("/Cornell_Box")))
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box"))
# Prim is now in Fabric
self.assertTrue(stage.HasPrimAtPath(Sdf.Path("/Cornell_Box")))
# OM-87225
# prim not in fabric
self.assertFalse(stage.HasPrimAtPath(Sdf.Path("/Cube_5")))
# do a stage query, this will tag everything with metadata
paths = stage.GetPrimsWithTypeName("Mesh")
# prim not in fabric when we ignore tags by default
self.assertFalse(stage.HasPrimAtPath(Sdf.Path("/Cube_5")))
# prim in fabric if we include tags in the query
self.assertTrue(stage.HasPrimAtPath(Sdf.Path("/Cube_5"), excludeTags=False))
@tc_logger
def test_remove_prim(self):
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
# No prims populated into Fabric yet
self.assertFalse(stage.HasPrimAtPath(Sdf.Path("/Cornell_Box")))
prim = stage.GetPrimAtPath(Sdf.Path("/Cornell_Box"))
# Prim is now in Fabric
self.assertTrue(stage.HasPrimAtPath(Sdf.Path("/Cornell_Box")))
self.assertTrue(stage.RemovePrim(Sdf.Path("/Cornell_Box")))
# Prim removed from Fabric by RemovePrim
self.assertFalse(stage.HasPrimAtPath(Sdf.Path("/Cornell_Box")))
# Remove non-existant prim does not cause crash, but returns False
self.assertFalse(stage.RemovePrim(Sdf.Path("/Cornell_Box")))
@tc_logger
def test_remove_prim_from_usd(self):
import pxr
from usdrt import Sdf, Usd, UsdGeom
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
cache = pxr.UsdUtils.StageCache.Get()
layer = pxr.Sdf.Layer.FindOrOpen(TEST_DIR + "/data/usd/tests/cornell.usda")
usd_stage = cache.FindOneMatching(layer)
stage_id = cache.GetId(usd_stage).ToLongInt()
path = "/DistantLight/BillboardComponent_0"
# Populate into Fabric
prim = stage.GetPrimAtPath(Sdf.Path(path))
# Remove from USD stage
usd_stage.RemovePrim(path)
# The prim is still in Fabric
self.assertTrue(stage.HasPrimAtPath(Sdf.Path(path)))
expected_attrs = [UsdGeom.Tokens.visibility, UsdGeom.Tokens.xformOpOrder, "xformOp:transform"]
for attr in prim.GetAttributes():
self.assertTrue(attr.GetName() in expected_attrs)
# Removing prim from Fabric is okay
self.assertTrue(stage.RemovePrim(Sdf.Path(path)))
self.assertFalse(stage.HasPrimAtPath(Sdf.Path(path)))
cache.Clear()
@tc_logger
def test_repr_representation(self):
import pxr
from usdrt import Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
cache = pxr.UsdUtils.StageCache.Get()
layer = pxr.Sdf.Layer.FindOrOpen(TEST_DIR + "/data/usd/tests/cornell.usda")
usd_stage = cache.FindOneMatching(layer)
stage_id = cache.GetId(usd_stage).ToLongInt()
expected = "Stage(<ID: " + str(stage_id) + ">)"
self.assertEquals(repr(stage), expected)
@tc_logger
def test_layer_rewrite(self):
# OM-70883
import pxr
from usdrt import Gf, Sdf, Usd, UsdGeom, Vt
stage = Usd.Stage.CreateInMemory("test.usda")
self.assertTrue(stage)
world = stage.DefinePrim(Sdf.Path("/World"), "Xform")
triangle = stage.DefinePrim(Sdf.Path("/World/Triangle"), "Mesh")
points = triangle.CreateAttribute(UsdGeom.Tokens.points, Sdf.ValueTypeNames.Point3fArray, False)
faceVertexCounts = triangle.CreateAttribute(UsdGeom.Tokens.faceVertexCounts, Sdf.ValueTypeNames.IntArray, False)
faceVertexIndices = triangle.CreateAttribute(
UsdGeom.Tokens.faceVertexIndices, Sdf.ValueTypeNames.IntArray, False
)
points.Set(Vt.Vec3fArray([Gf.Vec3f(1, 0, 0), Gf.Vec3f(0, 1, 0), Gf.Vec3f(-1, 0, 0)]))
faceVertexCounts.Set(Vt.IntArray([3]))
faceVertexIndices.Set(Vt.IntArray([0, 1, 2]))
with tempfile.TemporaryDirectory() as tempdir:
test_file = get_tmp_usda_path(tempdir)
stage.WriteToLayer(test_file)
# In OM-70883, multiple WriteToLayer on the same file causes a crash
stage.WriteToLayer(test_file)
# Verfiy that data was stored to the new layer
test_stage = pxr.Usd.Stage.Open(test_file)
attr = test_stage.GetAttributeAtPath(pxr.Sdf.Path("/World/Triangle.points"))
self.assertTrue(attr)
self.assertTrue(attr.HasValue())
self.assertEqual(len(attr.Get()), 3)
prim = test_stage.GetPrimAtPath(pxr.Sdf.Path("/World/Triangle"))
self.assertEqual(prim.GetTypeName(), "Mesh")
@tc_logger
def test_get_prims_with_type_name(self):
from usdrt import Gf, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
paths = stage.GetPrimsWithTypeName("Mesh")
self.assertEqual(len(paths), 8)
paths = stage.GetPrimsWithTypeName("Shader")
self.assertEqual(len(paths), 5)
paths = stage.GetPrimsWithTypeName("Invalid")
self.assertEqual(len(paths), 0)
paths = stage.GetPrimsWithTypeName("UsdGeomBoundable")
aliasPaths = stage.GetPrimsWithTypeName("Boundable")
self.assertEqual(len(paths), len(aliasPaths))
@tc_logger
def test_get_prims_with_applied_api_name(self):
# Begin example query by API
from usdrt import Gf, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
paths = stage.GetPrimsWithAppliedAPIName("ShapingAPI")
self.assertEqual(len(paths), 2)
paths = stage.GetPrimsWithAppliedAPIName("CollectionAPI:lightLink")
self.assertEqual(len(paths), 5)
# End example query by API
paths = stage.GetPrimsWithAppliedAPIName("Invalid:test")
self.assertEqual(len(paths), 0)
@tc_logger
def test_get_prims_with_type_and_applied_api_name(self):
# Begin example query mixed
from usdrt import Gf, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
paths = stage.GetPrimsWithTypeAndAppliedAPIName("Mesh", ["CollectionAPI:test"])
self.assertEqual(len(paths), 1)
# End example query mixed
paths = stage.GetPrimsWithTypeAndAppliedAPIName("Invalid", ["Invalid:test"])
self.assertEqual(len(paths), 0)
@tc_logger
def test_get_stage_extent(self):
# Begin example stage extent
from usdrt import Gf, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/cornell.usda")
self.assertTrue(stage)
bound = stage.GetStageExtent()
self.assertTrue(Gf.IsClose(bound.GetMin(), Gf.Vec3d(-333.8142, -249.9100, -5.444), 0.01))
self.assertTrue(Gf.IsClose(bound.GetMax(), Gf.Vec3d(247.1132, 249.9178, 500.0), 0.01))
# End example stage extent
@tc_logger
def test_get_prims_with_type_and_scenegraph_instancing(self):
from usdrt import Gf, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/xform_component_hierarchy_instances.usda")
self.assertTrue(stage)
# There are 2 prototype proxy meshes on the stage
paths = stage.GetPrimsWithTypeName("Mesh")
self.assertEqual(len(paths), 2)
paths = stage.GetPrimsWithTypeName("Invalid")
self.assertEqual(len(paths), 0)
@tc_logger
def test_get_prims_with_type_and_unknown_schema(self):
from usdrt import Gf, Sdf, Usd
stage = Usd.Stage.Open(TEST_DIR + "/data/usd/tests/TestConversionOnLoad.usda")
self.assertTrue(stage)
# This is an old OG schema that no longer exists
paths = stage.GetPrimsWithTypeName("ComputeGraphSettings")
self.assertEqual(len(paths), 1)
| 23,789 | Python | 32.985714 | 120 | 0.638068 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/scenegraph/tests/test_schema_registry.py | __copyright__ = "Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import os
import pathlib
import platform
import sys
import time
import unittest
from . import tc_logger
def setUpModule():
# pre-load USD before anything else to prevent crash
# from weird carb conflict
# FIXME ^^^
try:
from . import update_path_and_load_usd
update_path_and_load_usd()
except ImportError:
# not needed in Kit
pass
try:
import omni.kit.test
TestClass = omni.kit.test.AsyncTestCase
TEST_DIR = str(pathlib.Path(__file__).parent.parent.parent.parent)
except ImportError:
from . import TestRtScenegraph
TestClass = TestRtScenegraph
TEST_DIR = "."
class TestSchemaRegistry(TestClass):
@tc_logger
def test_IsA(self):
from usdrt import Sdf, Usd, UsdGeom
stage = Usd.Stage.CreateInMemory("test.usda")
self.assertTrue(bool(stage))
prim = stage.DefinePrim(Sdf.Path("/cube"), "UsdGeomCube")
schemaRegistry = Usd.SchemaRegistry.GetInstance()
self.assertTrue(bool(schemaRegistry))
self.assertTrue(prim.IsA("UsdGeomCube"))
self.assertTrue(prim.IsA("Cube"))
self.assertTrue(prim.IsA(Usd.Typed))
self.assertTrue(prim.IsA(UsdGeom.Cube))
self.assertTrue(prim.IsA(UsdGeom.Xformable))
self.assertTrue(schemaRegistry.IsA(prim.GetTypeName(), Usd.Typed))
self.assertTrue(schemaRegistry.IsA(prim.GetTypeName(), UsdGeom.Cube))
self.assertTrue(schemaRegistry.IsA(UsdGeom.Cube, "UsdTyped"))
self.assertTrue(schemaRegistry.IsA(UsdGeom.Cube, Usd.Typed))
self.assertTrue(schemaRegistry.IsA(prim.GetTypeName(), "UsdTyped"))
self.assertTrue(schemaRegistry.IsA(prim.GetTypeName(), "UsdGeomCube"))
self.assertFalse(schemaRegistry.IsA(prim.GetTypeName(), "UsdGeomCone"))
self.assertFalse(schemaRegistry.IsA(prim.GetTypeName(), "Invalid"))
@tc_logger
def test_IsConcrete(self):
from usdrt import Sdf, Usd
self.assertFalse(Usd.SchemaRegistry.GetInstance().IsConcrete("UsdModelAPI"))
self.assertFalse(Usd.SchemaRegistry.GetInstance().IsConcrete("invalid"))
self.assertTrue(Usd.SchemaRegistry.GetInstance().IsConcrete("UsdGeomCube"))
self.assertTrue(Usd.SchemaRegistry.GetInstance().IsConcrete("Cube"))
@tc_logger
def test_IsAppliedAPISchema(self):
from usdrt import Sdf, Usd
self.assertFalse(Usd.SchemaRegistry.GetInstance().IsAppliedAPISchema("UsdGeomCube"))
self.assertTrue(Usd.SchemaRegistry.GetInstance().IsAppliedAPISchema("UsdGeomModelAPI"))
self.assertFalse(Usd.SchemaRegistry.GetInstance().IsAppliedAPISchema("invalid"))
@tc_logger
def test_IsMultipleApplyAPISchema(self):
from usdrt import Sdf, Usd
self.assertFalse(Usd.SchemaRegistry.GetInstance().IsMultipleApplyAPISchema("UsdGeomCube"))
self.assertTrue(Usd.SchemaRegistry.GetInstance().IsMultipleApplyAPISchema("UsdCollectionAPI"))
self.assertTrue(Usd.SchemaRegistry.GetInstance().IsMultipleApplyAPISchema("CollectionAPI"))
self.assertFalse(Usd.SchemaRegistry.GetInstance().IsMultipleApplyAPISchema("invalid"))
@tc_logger
def test_IsTyped(self):
from usdrt import Sdf, Usd
self.assertTrue(Usd.SchemaRegistry.GetInstance().IsTyped("UsdGeomCube"))
self.assertTrue(Usd.SchemaRegistry.GetInstance().IsTyped("Cube"))
self.assertFalse(Usd.SchemaRegistry.GetInstance().IsTyped("UsdModelAPI"))
self.assertFalse(Usd.SchemaRegistry.GetInstance().IsTyped("invalid"))
@tc_logger
def test_GetSchemaTypeName(self):
from usdrt import Sdf, Usd, UsdGeom
self.assertEqual(Usd.SchemaRegistry.GetInstance().GetSchemaTypeName(UsdGeom.Cube), "UsdGeomCube")
@tc_logger
def test_GetAliasFromName(self):
from usdrt import Sdf, Usd, UsdGeom
self.assertEqual(Usd.SchemaRegistry.GetInstance().GetAliasFromName("Cube"), "Cube")
self.assertEqual(Usd.SchemaRegistry.GetInstance().GetAliasFromName("UsdGeomCube"), "Cube")
self.assertEqual(Usd.SchemaRegistry.GetInstance().GetAliasFromName(""), "")
self.assertEqual(Usd.SchemaRegistry.GetInstance().GetAliasFromName("invalid"), "invalid")
| 4,667 | Python | 36.951219 | 105 | 0.716092 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/scenegraph/tests/testGfQuat.py | # Copyright 2016 Pixar
#
# Licensed under the Apache License, Version 2.0 (the "Apache License")
# with the following modification; you may not use this file except in
# compliance with the Apache License and the following modification to it:
# Section 6. Trademarks. is deleted and replaced with:
#
# 6. Trademarks. This License does not grant permission to use the trade
# names, trademarks, service marks, or product names of the Licensor
# and its affiliates, except as required to comply with Section 4(c) of
# the License and to reproduce the content of the NOTICE file.
#
# You may obtain a copy of the Apache License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Apache License with the above modification is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the Apache License for the specific
# language governing permissions and limitations under the Apache License.
#
# Note: This is just pulled directly from USD and modified
# (we only support Gf.Quat classes, but not Gf.Quaternion, so
# these tests are updated to reflect that)
# https://github.com/PixarAnimationStudios/USD/blob/release/pxr/base/gf/testenv/testGfQuaternion.py
from __future__ import division
__copyright__ = "Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import math
import sys
import unittest
##### Uncomment for better assert messages
# if 'unittest.util' in __import__('sys').modules:
# # Show full diff in self.assertEqual.
# __import__('sys').modules['unittest.util']._MAX_LENGTH = 999999999
def setUpModule():
# pre-load USD before anything else to prevent crash
# from weird carb conflict
# FIXME ^^^
try:
from . import update_path_and_load_usd
update_path_and_load_usd()
except ImportError:
# not needed in Kit
pass
try:
import omni.kit.test
TestClass = omni.kit.test.AsyncTestCase
except ImportError:
TestClass = unittest.TestCase
class TestGfQuaternion(TestClass):
def test_Constructors(self):
from usdrt import Gf
# self.assertIsInstance(Gf.Quaternion(), Gf.Quaternion)
# self.assertIsInstance(Gf.Quaternion(0), Gf.Quaternion)
# self.assertIsInstance(Gf.Quaternion(1, Gf.Vec3d(1,1,1)), Gf.Quaternion)
self.assertIsInstance(Gf.Quath(Gf.Quath()), Gf.Quath)
self.assertIsInstance(Gf.Quatf(Gf.Quatf()), Gf.Quatf)
self.assertIsInstance(Gf.Quatd(Gf.Quatd()), Gf.Quatd)
# Testing conversions between Quat[h,f,d]
self.assertIsInstance(Gf.Quath(Gf.Quatf()), Gf.Quath)
self.assertIsInstance(Gf.Quath(Gf.Quatd()), Gf.Quath)
self.assertIsInstance(Gf.Quatf(Gf.Quath()), Gf.Quatf)
self.assertIsInstance(Gf.Quatf(Gf.Quatd()), Gf.Quatf)
self.assertIsInstance(Gf.Quatd(Gf.Quath()), Gf.Quatd)
self.assertIsInstance(Gf.Quatd(Gf.Quatf()), Gf.Quatd)
def test_Properties(self):
from usdrt import Gf
# nv edit - use Quat classses instead of Quaternion
for Quat, Vec in ((Gf.Quatd, Gf.Vec3d), (Gf.Quatf, Gf.Vec3f), (Gf.Quath, Gf.Vec3h)):
q = Quat()
q.real = 10
self.assertEqual(q.real, 10)
q.imaginary = Vec(1, 2, 3)
self.assertEqual(q.imaginary, Vec(1, 2, 3))
def test_Methods(self):
from usdrt import Gf
# nv edit - use Quat classses instead of Quaternion
for Quat, Vec in ((Gf.Quatd, Gf.Vec3d), (Gf.Quatf, Gf.Vec3f), (Gf.Quath, Gf.Vec3h)):
q = Quat()
self.assertEqual(Quat.GetIdentity(), Quat(1, Vec()))
self.assertTrue(
Quat.GetIdentity().GetLength() == 1
and Gf.IsClose(Quat(1, Vec(2, 3, 4)).GetLength(), 5.4772255750516612, 0.00001)
)
q = Quat(1, Vec(2, 3, 4)).GetNormalized()
self.assertTrue(
Gf.IsClose(q.real, 0.182574, 0.0001)
and Gf.IsClose(q.imaginary, Vec(0.365148, 0.547723, 0.730297), 0.00001)
)
# nv edit - linalg does not support arbitrary epsilon here
# q = Quat(1,Vec(2,3,4)).GetNormalized(10)
# self.assertEqual(q, Quat.GetIdentity())
q = Quat(1, Vec(2, 3, 4))
q.Normalize()
self.assertTrue(
Gf.IsClose(q.real, 0.182574, 0.0001)
and Gf.IsClose(q.imaginary, Vec(0.365148, 0.547723, 0.730297), 0.00001)
)
# nv edit - linalg does not support arbitrary epsilon here
# q = Quat(1,Vec(2,3,4)).Normalize(10)
# self.assertEqual(q, Quat.GetIdentity())
if Quat == Gf.Quath:
# FIXME - below test does not pass for Quath:
# AssertionError: Gf.Quath(1.0, Gf.Vec3h(0.0, 0.0, 0.0)) != Gf.Quath(1.0, Gf.Vec3h(-0.0, -0.0, -0.0))
continue
q = Quat.GetIdentity()
self.assertEqual(q, q.GetInverse())
q = Quat(1, Vec(1, 2, 3))
q.Normalize()
(re, im) = (q.real, q.imaginary)
self.assertTrue(
Gf.IsClose(q.GetInverse().real, re, 0.00001) and Gf.IsClose(q.GetInverse().imaginary, -im, 0.00001)
)
def test_Operators(self):
from usdrt import Gf
# nv edit - use Quat classses instead of Quaternion
for Quat, Vec in ((Gf.Quatd, Gf.Vec3d), (Gf.Quatf, Gf.Vec3f), (Gf.Quath, Gf.Vec3h)):
q1 = Quat(1, Vec(2, 3, 4))
q2 = Quat(1, Vec(2, 3, 4))
self.assertEqual(q1, q2)
self.assertFalse(q1 != q2)
q2.real = 2
self.assertTrue(q1 != q2)
q = Quat(1, Vec(2, 3, 4)) * Quat.GetIdentity()
self.assertEqual(q, Quat(1, Vec(2, 3, 4)))
q = Quat(1, Vec(2, 3, 4))
q *= Quat.GetIdentity()
self.assertEqual(q, Quat(1, Vec(2, 3, 4)))
q *= 10
self.assertEqual(q, Quat(10, Vec(20, 30, 40)))
q = q * 10
self.assertEqual(q, Quat(100, Vec(200, 300, 400)))
q = 10 * q
self.assertEqual(q, Quat(1000, Vec(2000, 3000, 4000)))
q /= 100
self.assertEqual(q, Quat(10, Vec(20, 30, 40)))
q = q / 10
self.assertEqual(q, Quat(1, Vec(2, 3, 4)))
q += q
self.assertEqual(q, Quat(2, Vec(4, 6, 8)))
q -= Quat(1, Vec(2, 3, 4))
self.assertEqual(q, Quat(1, Vec(2, 3, 4)))
q = q + q
self.assertEqual(q, Quat(2, Vec(4, 6, 8)))
q = q - Quat(1, Vec(2, 3, 4))
self.assertEqual(q, Quat(1, Vec(2, 3, 4)))
q = q * q
self.assertEqual(q, Quat(-28, Vec(4, 6, 8)))
q1 = Quat(1, Vec(2, 3, 4)).GetNormalized()
q2 = Quat(4, Vec(3, 2, 1)).GetNormalized()
self.assertEqual(Gf.Slerp(0, q1, q2), q1)
# nv edit - these are close but not exact with our implementation
eps = 0.00001 if Quat in [Gf.Quatd, Gf.Quatf] else 0.001
# self.assertEqual(Gf.Slerp(1, q1, q2), q2)
self.assertTrue(Gf.IsClose(Gf.Slerp(1, q1, q2), q2, eps))
# self.assertEqual(Gf.Slerp(0.5, q1, q2), Quat(0.5, Vec(0.5, 0.5, 0.5)))
self.assertTrue(Gf.IsClose(Gf.Slerp(0.5, q1, q2), Quat(0.5, Vec(0.5, 0.5, 0.5)), eps))
# code coverage goodness
q1 = Quat(0, Vec(1, 1, 1))
q2 = Quat(0, Vec(-1, -1, -1))
q = Gf.Slerp(0.5, q1, q2)
self.assertTrue(Gf.IsClose(q.real, 0, 0.00001) and Gf.IsClose(q.imaginary, Vec(1, 1, 1), 0.00001))
q1 = Quat(0, Vec(1, 1, 1))
q2 = Quat(0, Vec(1, 1, 1))
q = Gf.Slerp(0.5, q1, q2)
self.assertTrue(Gf.IsClose(q.real, 0, 0.00001) and Gf.IsClose(q.imaginary, Vec(1, 1, 1), 0.00001))
self.assertEqual(q, eval(repr(q)))
self.assertTrue(len(str(Quat())))
for quatType in (Gf.Quatd, Gf.Quatf, Gf.Quath):
q1 = quatType(1, [2, 3, 4])
q2 = quatType(2, [3, 4, 5])
self.assertTrue(Gf.IsClose(Gf.Dot(q1, q2), 40, 0.00001))
if __name__ == "__main__":
unittest.main()
| 8,699 | Python | 37.157895 | 117 | 0.583975 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/UsdUI/_UsdUI.pyi | from __future__ import annotations
import usdrt.UsdUI._UsdUI
import typing
import usdrt.Sdf._Sdf
import usdrt.Usd._Usd
__all__ = [
"Backdrop",
"NodeGraphNodeAPI",
"SceneGraphPrimAPI",
"Tokens"
]
class Backdrop(usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateDescriptionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> Backdrop: ...
def GetDescriptionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class NodeGraphNodeAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateDisplayColorAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateExpansionStateAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateIconAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreatePosAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSizeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateStackingOrderAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDisplayColorAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetExpansionStateAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetIconAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPosAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSizeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetStackingOrderAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class SceneGraphPrimAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateDisplayGroupAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDisplayNameAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDisplayGroupAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDisplayNameAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Tokens():
closed = 'closed'
minimized = 'minimized'
open = 'open'
uiDescription = 'ui:description'
uiDisplayGroup = 'ui:displayGroup'
uiDisplayName = 'ui:displayName'
uiNodegraphNodeDisplayColor = 'ui:nodegraph:node:displayColor'
uiNodegraphNodeExpansionState = 'ui:nodegraph:node:expansionState'
uiNodegraphNodeIcon = 'ui:nodegraph:node:icon'
uiNodegraphNodePos = 'ui:nodegraph:node:pos'
uiNodegraphNodeSize = 'ui:nodegraph:node:size'
uiNodegraphNodeStackingOrder = 'ui:nodegraph:node:stackingOrder'
pass
| 3,245 | unknown | 40.088607 | 87 | 0.65886 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/UsdUI/__init__.py | __copyright__ = "Copyright (c) 2020-2021, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import omni.core
# TODO: auto-load requirements
from usdrt import Sdf
from ._UsdUI import *
| 550 | Python | 33.437498 | 83 | 0.794545 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/UsdPhysics/_UsdPhysics.pyi | from __future__ import annotations
import usdrt.UsdPhysics._UsdPhysics
import typing
import usdrt.Sdf._Sdf
import usdrt.Usd._Usd
import usdrt.UsdGeom._UsdGeom
__all__ = [
"ArticulationRootAPI",
"CollisionAPI",
"CollisionGroup",
"DistanceJoint",
"DriveAPI",
"FilteredPairsAPI",
"FixedJoint",
"Joint",
"LimitAPI",
"MassAPI",
"MaterialAPI",
"MeshCollisionAPI",
"PrismaticJoint",
"RevoluteJoint",
"RigidBodyAPI",
"Scene",
"SphericalJoint",
"Tokens"
]
class ArticulationRootAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class CollisionAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateCollisionEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSimulationOwnerRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetCollisionEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSimulationOwnerRel(self) -> usdrt.Usd._Usd.Relationship: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class CollisionGroup(usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateFilteredGroupsRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateInvertFilteredGroupsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMergeGroupNameAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> CollisionGroup: ...
def GetFilteredGroupsRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetInvertFilteredGroupsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMergeGroupNameAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class DistanceJoint(Joint, usdrt.UsdGeom._UsdGeom.Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateMaxDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMinDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> DistanceJoint: ...
def GetMaxDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMinDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class DriveAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateDampingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMaxForceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateStiffnessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTargetPositionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTargetVelocityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTypeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDampingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxForceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetStiffnessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetTargetPositionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetTargetVelocityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetTypeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim, arg1: TfToken) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase, arg1: TfToken) -> None: ...
def __repr__(self) -> str: ...
pass
class FilteredPairsAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateFilteredPairsRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetFilteredPairsRel(self) -> usdrt.Usd._Usd.Relationship: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class FixedJoint(Joint, usdrt.UsdGeom._UsdGeom.Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> FixedJoint: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Joint(usdrt.UsdGeom._UsdGeom.Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateBody0Rel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateBody1Rel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateBreakForceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateBreakTorqueAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateCollisionEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateExcludeFromArticulationAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateJointEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLocalPos0Attr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLocalPos1Attr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLocalRot0Attr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLocalRot1Attr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> Joint: ...
def GetBody0Rel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetBody1Rel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetBreakForceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetBreakTorqueAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCollisionEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetExcludeFromArticulationAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetJointEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLocalPos0Attr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLocalPos1Attr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLocalRot0Attr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLocalRot1Attr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class LimitAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateHighAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLowAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetHighAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLowAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim, arg1: TfToken) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase, arg1: TfToken) -> None: ...
def __repr__(self) -> str: ...
pass
class MassAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateCenterOfMassAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDensityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDiagonalInertiaAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMassAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreatePrincipalAxesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCenterOfMassAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDensityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDiagonalInertiaAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMassAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPrincipalAxesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class MaterialAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateDensityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDynamicFrictionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateRestitutionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateStaticFrictionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDensityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDynamicFrictionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetRestitutionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetStaticFrictionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class MeshCollisionAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateApproximationAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetApproximationAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PrismaticJoint(Joint, usdrt.UsdGeom._UsdGeom.Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLowerLimitAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateUpperLimitAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> PrismaticJoint: ...
def GetAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLowerLimitAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetUpperLimitAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class RevoluteJoint(Joint, usdrt.UsdGeom._UsdGeom.Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLowerLimitAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateUpperLimitAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> RevoluteJoint: ...
def GetAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLowerLimitAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetUpperLimitAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class RigidBodyAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateAngularVelocityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateKinematicEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateRigidBodyEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSimulationOwnerRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateStartsAsleepAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateVelocityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetAngularVelocityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetKinematicEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetRigidBodyEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSimulationOwnerRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetStartsAsleepAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetVelocityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Scene(usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateGravityDirectionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateGravityMagnitudeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> Scene: ...
def GetGravityDirectionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetGravityMagnitudeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class SphericalJoint(Joint, usdrt.UsdGeom._UsdGeom.Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateConeAngle0LimitAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateConeAngle1LimitAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> SphericalJoint: ...
def GetAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetConeAngle0LimitAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetConeAngle1LimitAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Tokens():
acceleration = 'acceleration'
angular = 'angular'
boundingCube = 'boundingCube'
boundingSphere = 'boundingSphere'
colliders = 'colliders'
convexDecomposition = 'convexDecomposition'
convexHull = 'convexHull'
distance = 'distance'
drive = 'drive'
force = 'force'
kilogramsPerUnit = 'kilogramsPerUnit'
limit = 'limit'
linear = 'linear'
meshSimplification = 'meshSimplification'
none = 'none'
physicsAngularVelocity = 'physics:angularVelocity'
physicsApproximation = 'physics:approximation'
physicsAxis = 'physics:axis'
physicsBody0 = 'physics:body0'
physicsBody1 = 'physics:body1'
physicsBreakForce = 'physics:breakForce'
physicsBreakTorque = 'physics:breakTorque'
physicsCenterOfMass = 'physics:centerOfMass'
physicsCollisionEnabled = 'physics:collisionEnabled'
physicsConeAngle0Limit = 'physics:coneAngle0Limit'
physicsConeAngle1Limit = 'physics:coneAngle1Limit'
physicsDamping = 'physics:damping'
physicsDensity = 'physics:density'
physicsDiagonalInertia = 'physics:diagonalInertia'
physicsDynamicFriction = 'physics:dynamicFriction'
physicsExcludeFromArticulation = 'physics:excludeFromArticulation'
physicsFilteredGroups = 'physics:filteredGroups'
physicsFilteredPairs = 'physics:filteredPairs'
physicsGravityDirection = 'physics:gravityDirection'
physicsGravityMagnitude = 'physics:gravityMagnitude'
physicsHigh = 'physics:high'
physicsInvertFilteredGroups = 'physics:invertFilteredGroups'
physicsJointEnabled = 'physics:jointEnabled'
physicsKinematicEnabled = 'physics:kinematicEnabled'
physicsLocalPos0 = 'physics:localPos0'
physicsLocalPos1 = 'physics:localPos1'
physicsLocalRot0 = 'physics:localRot0'
physicsLocalRot1 = 'physics:localRot1'
physicsLow = 'physics:low'
physicsLowerLimit = 'physics:lowerLimit'
physicsMass = 'physics:mass'
physicsMaxDistance = 'physics:maxDistance'
physicsMaxForce = 'physics:maxForce'
physicsMergeGroup = 'physics:mergeGroup'
physicsMinDistance = 'physics:minDistance'
physicsPrincipalAxes = 'physics:principalAxes'
physicsRestitution = 'physics:restitution'
physicsRigidBodyEnabled = 'physics:rigidBodyEnabled'
physicsSimulationOwner = 'physics:simulationOwner'
physicsStartsAsleep = 'physics:startsAsleep'
physicsStaticFriction = 'physics:staticFriction'
physicsStiffness = 'physics:stiffness'
physicsTargetPosition = 'physics:targetPosition'
physicsTargetVelocity = 'physics:targetVelocity'
physicsType = 'physics:type'
physicsUpperLimit = 'physics:upperLimit'
physicsVelocity = 'physics:velocity'
rotX = 'rotX'
rotY = 'rotY'
rotZ = 'rotZ'
transX = 'transX'
transY = 'transY'
transZ = 'transZ'
x = 'X'
y = 'Y'
z = 'Z'
pass
| 18,503 | unknown | 45.609572 | 111 | 0.662271 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/UsdPhysics/__init__.py | __copyright__ = "Copyright (c) 2020-2021, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import omni.core
# TODO: auto-load requirements
from usdrt import Sdf
from ._UsdPhysics import *
| 555 | Python | 33.749998 | 83 | 0.796396 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/PhysxSchema/_PhysxSchema.pyi | from __future__ import annotations
import usdrt.PhysxSchema._PhysxSchema
import typing
import usdrt.Sdf._Sdf
import usdrt.Usd._Usd
import usdrt.UsdGeom._UsdGeom
import usdrt.UsdPhysics._UsdPhysics
__all__ = [
"JointStateAPI",
"PhysxArticulationAPI",
"PhysxArticulationForceSensorAPI",
"PhysxAutoAttachmentAPI",
"PhysxAutoParticleClothAPI",
"PhysxCameraAPI",
"PhysxCameraDroneAPI",
"PhysxCameraFollowAPI",
"PhysxCameraFollowLookAPI",
"PhysxCameraFollowVelocityAPI",
"PhysxCharacterControllerAPI",
"PhysxCollisionAPI",
"PhysxContactReportAPI",
"PhysxConvexDecompositionCollisionAPI",
"PhysxConvexHullCollisionAPI",
"PhysxCookedDataAPI",
"PhysxDeformableAPI",
"PhysxDeformableBodyAPI",
"PhysxDeformableBodyMaterialAPI",
"PhysxDeformableSurfaceAPI",
"PhysxDeformableSurfaceMaterialAPI",
"PhysxDiffuseParticlesAPI",
"PhysxForceAPI",
"PhysxHairAPI",
"PhysxHairMaterialAPI",
"PhysxJointAPI",
"PhysxLimitAPI",
"PhysxMaterialAPI",
"PhysxPBDMaterialAPI",
"PhysxParticleAPI",
"PhysxParticleAnisotropyAPI",
"PhysxParticleClothAPI",
"PhysxParticleIsosurfaceAPI",
"PhysxParticleSamplingAPI",
"PhysxParticleSetAPI",
"PhysxParticleSmoothingAPI",
"PhysxParticleSystem",
"PhysxPhysicsAttachment",
"PhysxPhysicsDistanceJointAPI",
"PhysxPhysicsGearJoint",
"PhysxPhysicsInstancer",
"PhysxPhysicsJointInstancer",
"PhysxPhysicsRackAndPinionJoint",
"PhysxRigidBodyAPI",
"PhysxSDFMeshCollisionAPI",
"PhysxSceneAPI",
"PhysxSphereFillCollisionAPI",
"PhysxTendonAttachmentAPI",
"PhysxTendonAttachmentLeafAPI",
"PhysxTendonAttachmentRootAPI",
"PhysxTendonAxisAPI",
"PhysxTendonAxisRootAPI",
"PhysxTriangleMeshCollisionAPI",
"PhysxTriangleMeshSimplificationCollisionAPI",
"PhysxTriggerAPI",
"PhysxTriggerStateAPI",
"PhysxVehicleAPI",
"PhysxVehicleAckermannSteeringAPI",
"PhysxVehicleAutoGearBoxAPI",
"PhysxVehicleBrakesAPI",
"PhysxVehicleClutchAPI",
"PhysxVehicleContextAPI",
"PhysxVehicleControllerAPI",
"PhysxVehicleDriveBasicAPI",
"PhysxVehicleDriveStandardAPI",
"PhysxVehicleEngineAPI",
"PhysxVehicleGearsAPI",
"PhysxVehicleMultiWheelDifferentialAPI",
"PhysxVehicleSteeringAPI",
"PhysxVehicleSuspensionAPI",
"PhysxVehicleSuspensionComplianceAPI",
"PhysxVehicleTankControllerAPI",
"PhysxVehicleTankDifferentialAPI",
"PhysxVehicleTireAPI",
"PhysxVehicleTireFrictionTable",
"PhysxVehicleWheelAPI",
"PhysxVehicleWheelAttachmentAPI",
"PhysxVehicleWheelControllerAPI",
"TetrahedralMesh",
"Tokens"
]
class JointStateAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreatePositionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateVelocityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPositionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetVelocityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim, arg1: TfToken) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase, arg1: TfToken) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxArticulationAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateArticulationEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateEnabledSelfCollisionsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSleepThresholdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSolverPositionIterationCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSolverVelocityIterationCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateStabilizationThresholdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetArticulationEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetEnabledSelfCollisionsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSleepThresholdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSolverPositionIterationCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSolverVelocityIterationCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetStabilizationThresholdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxArticulationForceSensorAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateConstraintSolverForcesEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateForceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateForwardDynamicsForcesEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSensorEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTorqueAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateWorldFrameEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetConstraintSolverForcesEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetForceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetForwardDynamicsForcesEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSensorEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetTorqueAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetWorldFrameEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxAutoAttachmentAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateCollisionFilteringOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDeformableVertexOverlapOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateEnableCollisionFilteringAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateEnableDeformableFilteringPairsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateEnableDeformableVertexAttachmentsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateEnableRigidSurfaceAttachmentsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateRigidSurfaceSamplingDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCollisionFilteringOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDeformableVertexOverlapOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetEnableCollisionFilteringAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetEnableDeformableFilteringPairsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetEnableDeformableVertexAttachmentsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetEnableRigidSurfaceAttachmentsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetRigidSurfaceSamplingDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxAutoParticleClothAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateDisableMeshWeldingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSpringBendStiffnessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSpringDampingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSpringShearStiffnessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSpringStretchStiffnessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDisableMeshWeldingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSpringBendStiffnessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSpringDampingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSpringShearStiffnessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSpringStretchStiffnessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxCameraAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateAlwaysUpdateEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreatePhysxCameraSubjectRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetAlwaysUpdateEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPhysxCameraSubjectRel(self) -> usdrt.Usd._Usd.Relationship: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxCameraDroneAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateFeedForwardVelocityGainAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateFollowDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateFollowHeightAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateHorizontalVelocityGainAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMaxDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMaxSpeedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreatePositionOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateRotationFilterTimeConstantAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateVelocityFilterTimeConstantAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateVerticalVelocityGainAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFeedForwardVelocityGainAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFollowDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFollowHeightAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetHorizontalVelocityGainAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxSpeedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPositionOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetRotationFilterTimeConstantAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetVelocityFilterTimeConstantAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetVerticalVelocityGainAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxCameraFollowAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateCameraPositionTimeConstantAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateFollowMaxDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateFollowMaxSpeedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateFollowMinDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateFollowMinSpeedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateFollowTurnRateGainAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLookAheadMaxDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLookAheadMaxSpeedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLookAheadMinDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLookAheadMinSpeedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLookAheadTurnRateGainAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLookPositionHeightAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLookPositionTimeConstantAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreatePitchAngleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreatePitchAngleTimeConstantAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreatePositionOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSlowPitchAngleSpeedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSlowSpeedPitchAngleScaleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateVelocityNormalMinSpeedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateYawAngleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateYawRateTimeConstantAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCameraPositionTimeConstantAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFollowMaxDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFollowMaxSpeedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFollowMinDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFollowMinSpeedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFollowTurnRateGainAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLookAheadMaxDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLookAheadMaxSpeedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLookAheadMinDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLookAheadMinSpeedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLookAheadTurnRateGainAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLookPositionHeightAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLookPositionTimeConstantAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPitchAngleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPitchAngleTimeConstantAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPositionOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSlowPitchAngleSpeedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSlowSpeedPitchAngleScaleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetVelocityNormalMinSpeedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetYawAngleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetYawRateTimeConstantAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxCameraFollowLookAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateDownHillGroundAngleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDownHillGroundPitchAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateFollowReverseDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateFollowReverseSpeedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateUpHillGroundAngleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateUpHillGroundPitchAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateVelocityBlendTimeConstantAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDownHillGroundAngleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDownHillGroundPitchAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFollowReverseDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFollowReverseSpeedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetUpHillGroundAngleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetUpHillGroundPitchAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetVelocityBlendTimeConstantAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxCameraFollowVelocityAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxCharacterControllerAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateClimbingModeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateContactOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateInvisibleWallHeightAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMaxJumpHeightAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMoveTargetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateNonWalkableModeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateScaleCoeffAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSimulationOwnerRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateSlopeLimitAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateStepOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateUpAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateVolumeGrowthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetClimbingModeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetContactOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetInvisibleWallHeightAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxJumpHeightAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMoveTargetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetNonWalkableModeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetScaleCoeffAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSimulationOwnerRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetSlopeLimitAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetStepOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetUpAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetVolumeGrowthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxCollisionAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateContactOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMinTorsionalPatchRadiusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateRestOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTorsionalPatchRadiusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetContactOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMinTorsionalPatchRadiusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetRestOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetTorsionalPatchRadiusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxContactReportAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateReportPairsRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateThresholdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetReportPairsRel(self) -> usdrt.Usd._Usd.Relationship: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetThresholdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxConvexDecompositionCollisionAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateErrorPercentageAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateHullVertexLimitAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMaxConvexHullsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMinThicknessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateShrinkWrapAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateVoxelResolutionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetErrorPercentageAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetHullVertexLimitAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxConvexHullsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMinThicknessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetShrinkWrapAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetVoxelResolutionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxConvexHullCollisionAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateHullVertexLimitAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMinThicknessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetHullVertexLimitAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMinThicknessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxCookedDataAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateBufferAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetBufferAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim, arg1: TfToken) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase, arg1: TfToken) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxDeformableAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateDeformableEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateEnableCCDAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMaxDepenetrationVelocityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateRestPointsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSelfCollisionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSelfCollisionFilterDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSettlingThresholdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSimulationIndicesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSimulationOwnerRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateSimulationVelocitiesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSleepDampingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSleepThresholdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSolverPositionIterationCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateVertexVelocityDampingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDeformableEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetEnableCCDAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxDepenetrationVelocityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetRestPointsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSelfCollisionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSelfCollisionFilterDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSettlingThresholdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSimulationIndicesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSimulationOwnerRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetSimulationVelocitiesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSleepDampingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSleepThresholdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSolverPositionIterationCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetVertexVelocityDampingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxDeformableBodyAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateCollisionIndicesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateCollisionPointsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateCollisionRestPointsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDisableGravityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSimulationPointsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSimulationRestPointsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCollisionIndicesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCollisionPointsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCollisionRestPointsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDisableGravityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSimulationPointsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSimulationRestPointsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxDeformableBodyMaterialAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateDampingScaleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDensityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDynamicFrictionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateElasticityDampingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreatePoissonsRatioAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateYoungsModulusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDampingScaleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDensityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDynamicFrictionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetElasticityDampingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPoissonsRatioAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetYoungsModulusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxDeformableSurfaceAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateBendingStiffnessScaleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateCollisionIterationMultiplierAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateCollisionPairUpdateFrequencyAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateFlatteningEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMaxVelocityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetBendingStiffnessScaleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCollisionIterationMultiplierAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCollisionPairUpdateFrequencyAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFlatteningEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxVelocityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxDeformableSurfaceMaterialAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateDensityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDynamicFrictionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreatePoissonsRatioAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateThicknessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateYoungsModulusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDensityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDynamicFrictionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPoissonsRatioAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetThicknessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetYoungsModulusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxDiffuseParticlesAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateAirDragAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateBubbleDragAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateBuoyancyAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateCollisionDecayAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDiffuseParticlesEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDivergenceWeightAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateKineticEnergyWeightAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLifetimeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMaxDiffuseParticleMultiplierAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreatePressureWeightAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateThresholdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateUseAccurateVelocityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetAirDragAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetBubbleDragAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetBuoyancyAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCollisionDecayAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDiffuseParticlesEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDivergenceWeightAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetKineticEnergyWeightAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLifetimeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxDiffuseParticleMultiplierAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPressureWeightAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetThresholdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetUseAccurateVelocityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxForceAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateForceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateForceEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateModeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTorqueAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateWorldFrameEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetForceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetForceEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetModeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetTorqueAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetWorldFrameEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxHairAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateExternalCollisionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateGlobalShapeComplianceAtRootAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateGlobalShapeComplianceStrandAttenuationAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateInterHairRepulsionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLocalShapeMatchingComplianceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLocalShapeMatchingGroupOverlapAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLocalShapeMatchingGroupSizeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLocalShapeMatchingLinearStretchingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSegmentLengthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTwosidedAttachmentAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateVelSmoothingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetExternalCollisionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetGlobalShapeComplianceAtRootAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetGlobalShapeComplianceStrandAttenuationAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetInterHairRepulsionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLocalShapeMatchingComplianceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLocalShapeMatchingGroupOverlapAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLocalShapeMatchingGroupSizeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLocalShapeMatchingLinearStretchingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSegmentLengthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetTwosidedAttachmentAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetVelSmoothingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxHairMaterialAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateContactOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateContactOffsetMultiplierAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateCurveBendStiffnessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateCurveThicknessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDensityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDynamicFrictionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateYoungsModulusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetContactOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetContactOffsetMultiplierAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCurveBendStiffnessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCurveThicknessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDensityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDynamicFrictionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetYoungsModulusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxJointAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateArmatureAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateEnableProjectionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateJointFrictionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMaxJointVelocityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetArmatureAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetEnableProjectionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetJointFrictionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxJointVelocityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxLimitAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateBounceThresholdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateContactDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDampingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateRestitutionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateStiffnessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetBounceThresholdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetContactDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDampingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetRestitutionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetStiffnessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim, arg1: TfToken) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase, arg1: TfToken) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxMaterialAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateCompliantContactDampingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateCompliantContactStiffnessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateFrictionCombineModeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateImprovePatchFrictionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateRestitutionCombineModeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCompliantContactDampingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCompliantContactStiffnessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFrictionCombineModeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetImprovePatchFrictionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetRestitutionCombineModeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxPBDMaterialAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateAdhesionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateAdhesionOffsetScaleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateCflCoefficientAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateCohesionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDampingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDensityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDragAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateFrictionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateGravityScaleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLiftAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateParticleAdhesionScaleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateParticleFrictionScaleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSurfaceTensionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateViscosityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateVorticityConfinementAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetAdhesionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetAdhesionOffsetScaleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCflCoefficientAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCohesionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDampingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDensityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDragAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFrictionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetGravityScaleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLiftAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetParticleAdhesionScaleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetParticleFrictionScaleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSurfaceTensionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetViscosityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetVorticityConfinementAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxParticleAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateParticleEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateParticleGroupAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateParticleSystemRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateSelfCollisionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetParticleEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetParticleGroupAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetParticleSystemRel(self) -> usdrt.Usd._Usd.Relationship: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSelfCollisionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxParticleAnisotropyAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateMaxAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMinAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateParticleAnisotropyEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateScaleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMinAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetParticleAnisotropyEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetScaleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxParticleClothAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreatePressureAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateRestPointsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSelfCollisionFilterAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSpringDampingsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSpringIndicesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSpringRestLengthsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSpringStiffnessesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPressureAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetRestPointsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSelfCollisionFilterAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSpringDampingsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSpringIndicesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSpringRestLengthsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSpringStiffnessesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxParticleIsosurfaceAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateGridFilteringPassesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateGridSmoothingRadiusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateGridSpacingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateIsosurfaceEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMaxSubgridsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMaxTrianglesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMaxVerticesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateNumMeshNormalSmoothingPassesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateNumMeshSmoothingPassesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSurfaceDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetGridFilteringPassesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetGridSmoothingRadiusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetGridSpacingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetIsosurfaceEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxSubgridsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxTrianglesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxVerticesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetNumMeshNormalSmoothingPassesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetNumMeshSmoothingPassesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSurfaceDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxParticleSamplingAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateMaxSamplesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateParticlesRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateSamplingDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateVolumeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxSamplesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetParticlesRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetSamplingDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetVolumeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxParticleSetAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateFluidAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSimulationPointsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFluidAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSimulationPointsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxParticleSmoothingAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateParticleSmoothingEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateStrengthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetParticleSmoothingEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetStrengthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxParticleSystem(usdrt.UsdGeom._UsdGeom.Gprim, usdrt.UsdGeom._UsdGeom.Boundable, usdrt.UsdGeom._UsdGeom.Xformable, usdrt.UsdGeom._UsdGeom.Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateContactOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateEnableCCDAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateFluidRestOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateGlobalSelfCollisionEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMaxDepenetrationVelocityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMaxNeighborhoodAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMaxVelocityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateNonParticleCollisionEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateParticleContactOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateParticleSystemEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateRestOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSimulationOwnerRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateSolidRestOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSolverPositionIterationCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateWindAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> PhysxParticleSystem: ...
def GetContactOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetEnableCCDAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFluidRestOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetGlobalSelfCollisionEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxDepenetrationVelocityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxNeighborhoodAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxVelocityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetNonParticleCollisionEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetParticleContactOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetParticleSystemEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetRestOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSimulationOwnerRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetSolidRestOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSolverPositionIterationCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetWindAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxPhysicsAttachment(usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateActor0Rel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateActor1Rel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateAttachmentEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateCollisionFilterIndices0Attr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateCollisionFilterIndices1Attr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateFilterType0Attr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateFilterType1Attr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreatePoints0Attr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreatePoints1Attr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> PhysxPhysicsAttachment: ...
def GetActor0Rel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetActor1Rel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetAttachmentEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCollisionFilterIndices0Attr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCollisionFilterIndices1Attr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFilterType0Attr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFilterType1Attr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPoints0Attr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPoints1Attr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxPhysicsDistanceJointAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateSpringDampingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSpringEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSpringStiffnessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSpringDampingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSpringEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSpringStiffnessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxPhysicsGearJoint(usdrt.UsdPhysics._UsdPhysics.Joint, usdrt.UsdGeom._UsdGeom.Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateGearRatioAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateHinge0Rel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateHinge1Rel(self) -> usdrt.Usd._Usd.Relationship: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> PhysxPhysicsGearJoint: ...
def GetGearRatioAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetHinge0Rel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetHinge1Rel(self) -> usdrt.Usd._Usd.Relationship: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxPhysicsJointInstancer(PhysxPhysicsInstancer, usdrt.UsdGeom._UsdGeom.Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreatePhysicsBody0IndicesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreatePhysicsBody0sRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreatePhysicsBody1IndicesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreatePhysicsBody1sRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreatePhysicsLocalPos0sAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreatePhysicsLocalPos1sAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreatePhysicsLocalRot0sAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreatePhysicsLocalRot1sAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> PhysxPhysicsJointInstancer: ...
def GetPhysicsBody0IndicesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPhysicsBody0sRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetPhysicsBody1IndicesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPhysicsBody1sRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetPhysicsLocalPos0sAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPhysicsLocalPos1sAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPhysicsLocalRot0sAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPhysicsLocalRot1sAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxPhysicsInstancer(usdrt.UsdGeom._UsdGeom.Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreatePhysicsProtoIndicesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreatePhysicsPrototypesRel(self) -> usdrt.Usd._Usd.Relationship: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> PhysxPhysicsInstancer: ...
def GetPhysicsProtoIndicesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPhysicsPrototypesRel(self) -> usdrt.Usd._Usd.Relationship: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxPhysicsRackAndPinionJoint(usdrt.UsdPhysics._UsdPhysics.Joint, usdrt.UsdGeom._UsdGeom.Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateHingeRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreatePrismaticRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateRatioAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> PhysxPhysicsRackAndPinionJoint: ...
def GetHingeRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetPrismaticRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetRatioAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxRigidBodyAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateAngularDampingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateCfmScaleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateContactSlopCoefficientAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDisableGravityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateEnableCCDAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateEnableGyroscopicForcesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateEnableSpeculativeCCDAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLinearDampingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLockedPosAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLockedRotAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMaxAngularVelocityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMaxContactImpulseAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMaxDepenetrationVelocityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMaxLinearVelocityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateRetainAccelerationsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSleepThresholdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSolveContactAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSolverPositionIterationCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSolverVelocityIterationCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateStabilizationThresholdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetAngularDampingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCfmScaleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetContactSlopCoefficientAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDisableGravityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetEnableCCDAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetEnableGyroscopicForcesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetEnableSpeculativeCCDAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLinearDampingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLockedPosAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLockedRotAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxAngularVelocityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxContactImpulseAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxDepenetrationVelocityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxLinearVelocityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetRetainAccelerationsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSleepThresholdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSolveContactAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSolverPositionIterationCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSolverVelocityIterationCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetStabilizationThresholdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxSDFMeshCollisionAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateSdfBitsPerSubgridPixelAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSdfEnableRemeshingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSdfMarginAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSdfNarrowBandThicknessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSdfResolutionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSdfSubgridResolutionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSdfBitsPerSubgridPixelAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSdfEnableRemeshingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSdfMarginAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSdfNarrowBandThicknessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSdfResolutionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSdfSubgridResolutionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxSceneAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateBounceThresholdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateBroadphaseTypeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateCollisionSystemAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateEnableCCDAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateEnableEnhancedDeterminismAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateEnableGPUDynamicsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateEnableSceneQuerySupportAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateEnableStabilizationAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateFrictionCorrelationDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateFrictionOffsetThresholdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateFrictionTypeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateGpuCollisionStackSizeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateGpuFoundLostAggregatePairsCapacityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateGpuFoundLostPairsCapacityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateGpuHeapCapacityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateGpuMaxDeformableSurfaceContactsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateGpuMaxHairContactsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateGpuMaxNumPartitionsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateGpuMaxParticleContactsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateGpuMaxRigidContactCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateGpuMaxRigidPatchCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateGpuMaxSoftBodyContactsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateGpuTempBufferCapacityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateGpuTotalAggregatePairsCapacityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateInvertCollisionGroupFilterAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMaxBiasCoefficientAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMaxIterationCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMinIterationCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateReportKinematicKinematicPairsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateReportKinematicStaticPairsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSolverTypeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTimeStepsPerSecondAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateUpdateTypeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetBounceThresholdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetBroadphaseTypeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCollisionSystemAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetEnableCCDAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetEnableEnhancedDeterminismAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetEnableGPUDynamicsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetEnableSceneQuerySupportAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetEnableStabilizationAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFrictionCorrelationDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFrictionOffsetThresholdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFrictionTypeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetGpuCollisionStackSizeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetGpuFoundLostAggregatePairsCapacityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetGpuFoundLostPairsCapacityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetGpuHeapCapacityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetGpuMaxDeformableSurfaceContactsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetGpuMaxHairContactsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetGpuMaxNumPartitionsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetGpuMaxParticleContactsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetGpuMaxRigidContactCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetGpuMaxRigidPatchCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetGpuMaxSoftBodyContactsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetGpuTempBufferCapacityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetGpuTotalAggregatePairsCapacityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetInvertCollisionGroupFilterAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxBiasCoefficientAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxIterationCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMinIterationCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetReportKinematicKinematicPairsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetReportKinematicStaticPairsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSolverTypeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetTimeStepsPerSecondAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetUpdateTypeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxSphereFillCollisionAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateFillModeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMaxSpheresAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSeedCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateVoxelResolutionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFillModeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxSpheresAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSeedCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetVoxelResolutionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxTendonAttachmentAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateGearingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLocalPosAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateParentAttachmentAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateParentLinkRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetGearingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLocalPosAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetParentAttachmentAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetParentLinkRel(self) -> usdrt.Usd._Usd.Relationship: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim, arg1: TfToken) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase, arg1: TfToken) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxTendonAttachmentLeafAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateLowerLimitAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateRestLengthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateUpperLimitAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLowerLimitAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetRestLengthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetUpperLimitAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim, arg1: TfToken) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase, arg1: TfToken) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxTendonAttachmentRootAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateDampingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLimitStiffnessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateStiffnessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTendonEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDampingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLimitStiffnessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetStiffnessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetTendonEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim, arg1: TfToken) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase, arg1: TfToken) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxTendonAxisAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateForceCoefficientAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateGearingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateJointAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetForceCoefficientAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetGearingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetJointAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim, arg1: TfToken) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase, arg1: TfToken) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxTendonAxisRootAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateDampingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLimitStiffnessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLowerLimitAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateRestLengthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateStiffnessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTendonEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateUpperLimitAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDampingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLimitStiffnessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLowerLimitAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetRestLengthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetStiffnessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetTendonEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetUpperLimitAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim, arg1: TfToken) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase, arg1: TfToken) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxTriangleMeshCollisionAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateWeldToleranceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetWeldToleranceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxTriangleMeshSimplificationCollisionAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateSimplificationMetricAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateWeldToleranceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSimplificationMetricAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetWeldToleranceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxTriggerAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateEnterScriptTypeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLeaveScriptTypeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateOnEnterScriptAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateOnLeaveScriptAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetEnterScriptTypeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLeaveScriptTypeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetOnEnterScriptAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetOnLeaveScriptAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxTriggerStateAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateTriggeredCollisionsRel(self) -> usdrt.Usd._Usd.Relationship: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetTriggeredCollisionsRel(self) -> usdrt.Usd._Usd.Relationship: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxVehicleAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateDriveRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateHighForwardSpeedSubStepCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLateralStickyTireDampingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLateralStickyTireThresholdSpeedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLateralStickyTireThresholdTimeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLongitudinalStickyTireDampingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLongitudinalStickyTireThresholdSpeedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLongitudinalStickyTireThresholdTimeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLowForwardSpeedSubStepCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMinActiveLongitudinalSlipDenominatorAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMinLateralSlipDenominatorAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMinLongitudinalSlipDenominatorAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMinPassiveLongitudinalSlipDenominatorAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSubStepThresholdLongitudinalSpeedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSuspensionLineQueryTypeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateVehicleEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDriveRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetHighForwardSpeedSubStepCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLateralStickyTireDampingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLateralStickyTireThresholdSpeedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLateralStickyTireThresholdTimeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLongitudinalStickyTireDampingAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLongitudinalStickyTireThresholdSpeedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLongitudinalStickyTireThresholdTimeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLowForwardSpeedSubStepCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMinActiveLongitudinalSlipDenominatorAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMinLateralSlipDenominatorAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMinLongitudinalSlipDenominatorAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMinPassiveLongitudinalSlipDenominatorAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSubStepThresholdLongitudinalSpeedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSuspensionLineQueryTypeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetVehicleEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxVehicleAckermannSteeringAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateMaxSteerAngleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateStrengthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTrackWidthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateWheel0Attr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateWheel1Attr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateWheelBaseAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxSteerAngleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetStrengthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetTrackWidthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetWheel0Attr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetWheel1Attr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetWheelBaseAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxVehicleAutoGearBoxAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateDownRatiosAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLatencyAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateUpRatiosAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDownRatiosAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLatencyAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetUpRatiosAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxVehicleBrakesAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateMaxBrakeTorqueAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTorqueMultipliersAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateWheelsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxBrakeTorqueAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetTorqueMultipliersAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetWheelsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim, arg1: TfToken) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase, arg1: TfToken) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxVehicleClutchAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateStrengthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetStrengthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxVehicleContextAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateForwardAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLongitudinalAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateUpAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateUpdateModeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateVerticalAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetForwardAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLongitudinalAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetUpAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetUpdateModeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetVerticalAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxVehicleControllerAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateAcceleratorAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateBrake0Attr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateBrake1Attr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateBrakeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateHandbrakeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSteerAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSteerLeftAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSteerRightAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTargetGearAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetAcceleratorAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetBrake0Attr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetBrake1Attr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetBrakeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetHandbrakeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSteerAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSteerLeftAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSteerRightAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetTargetGearAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxVehicleDriveBasicAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreatePeakTorqueAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPeakTorqueAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxVehicleDriveStandardAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateAutoGearBoxRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateClutchRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateEngineRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateGearsRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetAutoGearBoxRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetClutchRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetEngineRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetGearsRel(self) -> usdrt.Usd._Usd.Relationship: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxVehicleEngineAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateDampingRateFullThrottleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDampingRateZeroThrottleClutchDisengagedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDampingRateZeroThrottleClutchEngagedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateIdleRotationSpeedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMaxRotationSpeedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMoiAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreatePeakTorqueAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTorqueCurveAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDampingRateFullThrottleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDampingRateZeroThrottleClutchDisengagedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDampingRateZeroThrottleClutchEngagedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetIdleRotationSpeedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxRotationSpeedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMoiAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPeakTorqueAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetTorqueCurveAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxVehicleGearsAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateRatioScaleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateRatiosAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSwitchTimeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetRatioScaleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetRatiosAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSwitchTimeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxVehicleMultiWheelDifferentialAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateAverageWheelSpeedRatiosAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTorqueRatiosAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateWheelsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetAverageWheelSpeedRatiosAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetTorqueRatiosAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetWheelsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxVehicleSteeringAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateAngleMultipliersAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMaxSteerAngleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateWheelsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetAngleMultipliersAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxSteerAngleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetWheelsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxVehicleSuspensionAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateCamberAtMaxCompressionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateCamberAtMaxDroopAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateCamberAtRestAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMaxCompressionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMaxDroopAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSpringDamperRateAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSpringStrengthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSprungMassAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTravelDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCamberAtMaxCompressionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCamberAtMaxDroopAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCamberAtRestAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxCompressionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxDroopAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSpringDamperRateAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSpringStrengthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSprungMassAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetTravelDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxVehicleSuspensionComplianceAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateSuspensionForceAppPointAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTireForceAppPointAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateWheelCamberAngleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateWheelToeAngleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSuspensionForceAppPointAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetTireForceAppPointAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetWheelCamberAngleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetWheelToeAngleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxVehicleTankControllerAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateThrust0Attr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateThrust1Attr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetThrust0Attr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetThrust1Attr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxVehicleTankDifferentialAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateNumberOfWheelsPerTrackAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateThrustIndexPerTrackAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTrackToWheelIndicesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateWheelIndicesInTrackOrderAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetNumberOfWheelsPerTrackAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetThrustIndexPerTrackAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetTrackToWheelIndicesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetWheelIndicesInTrackOrderAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxVehicleTireAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateCamberStiffnessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateCamberStiffnessPerUnitGravityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateFrictionTableRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateFrictionVsSlipGraphAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLatStiffXAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLatStiffYAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLateralStiffnessGraphAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLongitudinalStiffnessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLongitudinalStiffnessPerUnitGravityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateRestLoadAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCamberStiffnessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCamberStiffnessPerUnitGravityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFrictionTableRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetFrictionVsSlipGraphAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLatStiffXAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLatStiffYAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLateralStiffnessGraphAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLongitudinalStiffnessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLongitudinalStiffnessPerUnitGravityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetRestLoadAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxVehicleTireFrictionTable(usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateDefaultFrictionValueAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateFrictionValuesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateGroundMaterialsRel(self) -> usdrt.Usd._Usd.Relationship: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> PhysxVehicleTireFrictionTable: ...
def GetDefaultFrictionValueAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFrictionValuesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetGroundMaterialsRel(self) -> usdrt.Usd._Usd.Relationship: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxVehicleWheelAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateDampingRateAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMassAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMaxBrakeTorqueAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMaxHandBrakeTorqueAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMaxSteerAngleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMoiAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateRadiusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateToeAngleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateWidthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDampingRateAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMassAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxBrakeTorqueAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxHandBrakeTorqueAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaxSteerAngleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMoiAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetRadiusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetToeAngleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetWidthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxVehicleWheelAttachmentAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateCollisionGroupRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateDrivenAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateIndexAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSuspensionForceAppPointOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSuspensionFrameOrientationAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSuspensionFramePositionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSuspensionRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateSuspensionTravelDirectionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTireForceAppPointOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTireRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateWheelCenterOfMassOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateWheelFrameOrientationAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateWheelFramePositionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateWheelRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetCollisionGroupRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetDrivenAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetIndexAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSuspensionForceAppPointOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSuspensionFrameOrientationAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSuspensionFramePositionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSuspensionRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetSuspensionTravelDirectionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetTireForceAppPointOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetTireRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetWheelCenterOfMassOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetWheelFrameOrientationAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetWheelFramePositionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetWheelRel(self) -> usdrt.Usd._Usd.Relationship: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxVehicleWheelControllerAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateBrakeTorqueAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDriveTorqueAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSteerAngleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetBrakeTorqueAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDriveTorqueAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSteerAngleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class TetrahedralMesh(usdrt.UsdGeom._UsdGeom.PointBased, usdrt.UsdGeom._UsdGeom.Gprim, usdrt.UsdGeom._UsdGeom.Boundable, usdrt.UsdGeom._UsdGeom.Xformable, usdrt.UsdGeom._UsdGeom.Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateIndicesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> TetrahedralMesh: ...
def GetIndicesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Tokens():
acceleration = 'acceleration'
actor0 = 'actor0'
actor1 = 'actor1'
alwaysUpdateEnabled = 'alwaysUpdateEnabled'
asynchronous = 'Asynchronous'
attachmentEnabled = 'attachmentEnabled'
average = 'average'
bitsPerPixel16 = 'BitsPerPixel16'
bitsPerPixel32 = 'BitsPerPixel32'
bitsPerPixel8 = 'BitsPerPixel8'
bounceThreshold = 'bounceThreshold'
brakes0 = 'brakes0'
brakes1 = 'brakes1'
buffer = 'buffer'
clothConstaint = 'clothConstaint'
collisionFilterIndices0 = 'collisionFilterIndices0'
collisionFilterIndices1 = 'collisionFilterIndices1'
constrained = 'constrained'
contactDistance = 'contactDistance'
contactOffset = 'contactOffset'
convexDecomposition = 'convexDecomposition'
convexHull = 'convexHull'
damping = 'damping'
defaultFrictionValue = 'defaultFrictionValue'
disabled = 'Disabled'
easy = 'easy'
enableCCD = 'enableCCD'
filterType0 = 'filterType0'
filterType1 = 'filterType1'
flood = 'flood'
fluidRestOffset = 'fluidRestOffset'
force = 'force'
forceCoefficient = 'forceCoefficient'
frictionValues = 'frictionValues'
gPU = 'GPU'
gearing = 'gearing'
geometry = 'Geometry'
globalSelfCollisionEnabled = 'globalSelfCollisionEnabled'
groundMaterials = 'groundMaterials'
indices = 'indices'
jointAxis = 'jointAxis'
limitStiffness = 'limitStiffness'
localPos = 'localPos'
lowerLimit = 'lowerLimit'
mBP = 'MBP'
max = 'max'
maxBrakeTorque = 'maxBrakeTorque'
maxDepenetrationVelocity = 'maxDepenetrationVelocity'
maxNeighborhood = 'maxNeighborhood'
maxVelocity = 'maxVelocity'
min = 'min'
multiply = 'multiply'
negX = 'negX'
negY = 'negY'
negZ = 'negZ'
nonParticleCollisionEnabled = 'nonParticleCollisionEnabled'
offset = 'offset'
oneDirectional = 'oneDirectional'
pCM = 'PCM'
pGS = 'PGS'
parentAttachment = 'parentAttachment'
parentLink = 'parentLink'
particleContactOffset = 'particleContactOffset'
particleSystemEnabled = 'particleSystemEnabled'
patch = 'patch'
physicsBody0Indices = 'physics:body0Indices'
physicsBody0s = 'physics:body0s'
physicsBody1Indices = 'physics:body1Indices'
physicsBody1s = 'physics:body1s'
physicsGearRatio = 'physics:gearRatio'
physicsHinge = 'physics:hinge'
physicsHinge0 = 'physics:hinge0'
physicsHinge1 = 'physics:hinge1'
physicsLocalPos0s = 'physics:localPos0s'
physicsLocalPos1s = 'physics:localPos1s'
physicsLocalRot0s = 'physics:localRot0s'
physicsLocalRot1s = 'physics:localRot1s'
physicsPosition = 'physics:position'
physicsPrismatic = 'physics:prismatic'
physicsProtoIndices = 'physics:protoIndices'
physicsPrototypes = 'physics:prototypes'
physicsRatio = 'physics:ratio'
physicsVelocity = 'physics:velocity'
physxArticulationArticulationEnabled = 'physxArticulation:articulationEnabled'
physxArticulationEnabledSelfCollisions = 'physxArticulation:enabledSelfCollisions'
physxArticulationForceSensorConstraintSolverForcesEnabled = 'physxArticulationForceSensor:constraintSolverForcesEnabled'
physxArticulationForceSensorForce = 'physxArticulationForceSensor:force'
physxArticulationForceSensorForwardDynamicsForcesEnabled = 'physxArticulationForceSensor:forwardDynamicsForcesEnabled'
physxArticulationForceSensorSensorEnabled = 'physxArticulationForceSensor:sensorEnabled'
physxArticulationForceSensorTorque = 'physxArticulationForceSensor:torque'
physxArticulationForceSensorWorldFrameEnabled = 'physxArticulationForceSensor:worldFrameEnabled'
physxArticulationSleepThreshold = 'physxArticulation:sleepThreshold'
physxArticulationSolverPositionIterationCount = 'physxArticulation:solverPositionIterationCount'
physxArticulationSolverVelocityIterationCount = 'physxArticulation:solverVelocityIterationCount'
physxArticulationStabilizationThreshold = 'physxArticulation:stabilizationThreshold'
physxAutoAttachmentCollisionFilteringOffset = 'physxAutoAttachment:collisionFilteringOffset'
physxAutoAttachmentDeformableVertexOverlapOffset = 'physxAutoAttachment:deformableVertexOverlapOffset'
physxAutoAttachmentEnableCollisionFiltering = 'physxAutoAttachment:enableCollisionFiltering'
physxAutoAttachmentEnableDeformableFilteringPairs = 'physxAutoAttachment:enableDeformableFilteringPairs'
physxAutoAttachmentEnableDeformableVertexAttachments = 'physxAutoAttachment:enableDeformableVertexAttachments'
physxAutoAttachmentEnableRigidSurfaceAttachments = 'physxAutoAttachment:enableRigidSurfaceAttachments'
physxAutoAttachmentRigidSurfaceSamplingDistance = 'physxAutoAttachment:rigidSurfaceSamplingDistance'
physxAutoParticleClothDisableMeshWelding = 'physxAutoParticleCloth:disableMeshWelding'
physxAutoParticleClothSpringBendStiffness = 'physxAutoParticleCloth:springBendStiffness'
physxAutoParticleClothSpringDamping = 'physxAutoParticleCloth:springDamping'
physxAutoParticleClothSpringShearStiffness = 'physxAutoParticleCloth:springShearStiffness'
physxAutoParticleClothSpringStretchStiffness = 'physxAutoParticleCloth:springStretchStiffness'
physxCameraSubject = 'physxCamera:subject'
physxCharacterControllerClimbingMode = 'physxCharacterController:climbingMode'
physxCharacterControllerContactOffset = 'physxCharacterController:contactOffset'
physxCharacterControllerInvisibleWallHeight = 'physxCharacterController:invisibleWallHeight'
physxCharacterControllerMaxJumpHeight = 'physxCharacterController:maxJumpHeight'
physxCharacterControllerMoveTarget = 'physxCharacterController:moveTarget'
physxCharacterControllerNonWalkableMode = 'physxCharacterController:nonWalkableMode'
physxCharacterControllerScaleCoeff = 'physxCharacterController:scaleCoeff'
physxCharacterControllerSimulationOwner = 'physxCharacterController:simulationOwner'
physxCharacterControllerSlopeLimit = 'physxCharacterController:slopeLimit'
physxCharacterControllerStepOffset = 'physxCharacterController:stepOffset'
physxCharacterControllerUpAxis = 'physxCharacterController:upAxis'
physxCharacterControllerVolumeGrowth = 'physxCharacterController:volumeGrowth'
physxCollisionContactOffset = 'physxCollision:contactOffset'
physxCollisionCustomGeometry = 'physxCollisionCustomGeometry'
physxCollisionMinTorsionalPatchRadius = 'physxCollision:minTorsionalPatchRadius'
physxCollisionRestOffset = 'physxCollision:restOffset'
physxCollisionTorsionalPatchRadius = 'physxCollision:torsionalPatchRadius'
physxContactReportReportPairs = 'physxContactReport:reportPairs'
physxContactReportThreshold = 'physxContactReport:threshold'
physxConvexDecompositionCollisionErrorPercentage = 'physxConvexDecompositionCollision:errorPercentage'
physxConvexDecompositionCollisionHullVertexLimit = 'physxConvexDecompositionCollision:hullVertexLimit'
physxConvexDecompositionCollisionMaxConvexHulls = 'physxConvexDecompositionCollision:maxConvexHulls'
physxConvexDecompositionCollisionMinThickness = 'physxConvexDecompositionCollision:minThickness'
physxConvexDecompositionCollisionShrinkWrap = 'physxConvexDecompositionCollision:shrinkWrap'
physxConvexDecompositionCollisionVoxelResolution = 'physxConvexDecompositionCollision:voxelResolution'
physxConvexHullCollisionHullVertexLimit = 'physxConvexHullCollision:hullVertexLimit'
physxConvexHullCollisionMinThickness = 'physxConvexHullCollision:minThickness'
physxCookedData = 'physxCookedData'
physxDeformableBodyMaterialDampingScale = 'physxDeformableBodyMaterial:dampingScale'
physxDeformableBodyMaterialDensity = 'physxDeformableBodyMaterial:density'
physxDeformableBodyMaterialDynamicFriction = 'physxDeformableBodyMaterial:dynamicFriction'
physxDeformableBodyMaterialElasticityDamping = 'physxDeformableBodyMaterial:elasticityDamping'
physxDeformableBodyMaterialPoissonsRatio = 'physxDeformableBodyMaterial:poissonsRatio'
physxDeformableBodyMaterialYoungsModulus = 'physxDeformableBodyMaterial:youngsModulus'
physxDeformableCollisionIndices = 'physxDeformable:collisionIndices'
physxDeformableCollisionPoints = 'physxDeformable:collisionPoints'
physxDeformableCollisionRestPoints = 'physxDeformable:collisionRestPoints'
physxDeformableDeformableEnabled = 'physxDeformable:deformableEnabled'
physxDeformableDisableGravity = 'physxDeformable:disableGravity'
physxDeformableEnableCCD = 'physxDeformable:enableCCD'
physxDeformableMaxDepenetrationVelocity = 'physxDeformable:maxDepenetrationVelocity'
physxDeformableRestPoints = 'physxDeformable:restPoints'
physxDeformableSelfCollision = 'physxDeformable:selfCollision'
physxDeformableSelfCollisionFilterDistance = 'physxDeformable:selfCollisionFilterDistance'
physxDeformableSettlingThreshold = 'physxDeformable:settlingThreshold'
physxDeformableSimulationIndices = 'physxDeformable:simulationIndices'
physxDeformableSimulationOwner = 'physxDeformable:simulationOwner'
physxDeformableSimulationPoints = 'physxDeformable:simulationPoints'
physxDeformableSimulationRestPoints = 'physxDeformable:simulationRestPoints'
physxDeformableSimulationVelocities = 'physxDeformable:simulationVelocities'
physxDeformableSleepDamping = 'physxDeformable:sleepDamping'
physxDeformableSleepThreshold = 'physxDeformable:sleepThreshold'
physxDeformableSolverPositionIterationCount = 'physxDeformable:solverPositionIterationCount'
physxDeformableSurfaceBendingStiffnessScale = 'physxDeformableSurface:bendingStiffnessScale'
physxDeformableSurfaceCollisionIterationMultiplier = 'physxDeformableSurface:collisionIterationMultiplier'
physxDeformableSurfaceCollisionPairUpdateFrequency = 'physxDeformableSurface:collisionPairUpdateFrequency'
physxDeformableSurfaceFlatteningEnabled = 'physxDeformableSurface:flatteningEnabled'
physxDeformableSurfaceMaterialDensity = 'physxDeformableSurfaceMaterial:density'
physxDeformableSurfaceMaterialDynamicFriction = 'physxDeformableSurfaceMaterial:dynamicFriction'
physxDeformableSurfaceMaterialPoissonsRatio = 'physxDeformableSurfaceMaterial:poissonsRatio'
physxDeformableSurfaceMaterialThickness = 'physxDeformableSurfaceMaterial:thickness'
physxDeformableSurfaceMaterialYoungsModulus = 'physxDeformableSurfaceMaterial:youngsModulus'
physxDeformableSurfaceMaxVelocity = 'physxDeformableSurface:maxVelocity'
physxDeformableVertexVelocityDamping = 'physxDeformable:vertexVelocityDamping'
physxDiffuseParticlesAirDrag = 'physxDiffuseParticles:airDrag'
physxDiffuseParticlesBubbleDrag = 'physxDiffuseParticles:bubbleDrag'
physxDiffuseParticlesBuoyancy = 'physxDiffuseParticles:buoyancy'
physxDiffuseParticlesCollisionDecay = 'physxDiffuseParticles:collisionDecay'
physxDiffuseParticlesDiffuseParticlesEnabled = 'physxDiffuseParticles:diffuseParticlesEnabled'
physxDiffuseParticlesDivergenceWeight = 'physxDiffuseParticles:divergenceWeight'
physxDiffuseParticlesKineticEnergyWeight = 'physxDiffuseParticles:kineticEnergyWeight'
physxDiffuseParticlesLifetime = 'physxDiffuseParticles:lifetime'
physxDiffuseParticlesMaxDiffuseParticleMultiplier = 'physxDiffuseParticles:maxDiffuseParticleMultiplier'
physxDiffuseParticlesPressureWeight = 'physxDiffuseParticles:pressureWeight'
physxDiffuseParticlesThreshold = 'physxDiffuseParticles:threshold'
physxDiffuseParticlesUseAccurateVelocity = 'physxDiffuseParticles:useAccurateVelocity'
physxDroneCameraFeedForwardVelocityGain = 'physxDroneCamera:feedForwardVelocityGain'
physxDroneCameraFollowDistance = 'physxDroneCamera:followDistance'
physxDroneCameraFollowHeight = 'physxDroneCamera:followHeight'
physxDroneCameraHorizontalVelocityGain = 'physxDroneCamera:horizontalVelocityGain'
physxDroneCameraMaxDistance = 'physxDroneCamera:maxDistance'
physxDroneCameraMaxSpeed = 'physxDroneCamera:maxSpeed'
physxDroneCameraPositionOffset = 'physxDroneCamera:positionOffset'
physxDroneCameraRotationFilterTimeConstant = 'physxDroneCamera:rotationFilterTimeConstant'
physxDroneCameraVelocityFilterTimeConstant = 'physxDroneCamera:velocityFilterTimeConstant'
physxDroneCameraVerticalVelocityGain = 'physxDroneCamera:verticalVelocityGain'
physxFollowCameraCameraPositionTimeConstant = 'physxFollowCamera:cameraPositionTimeConstant'
physxFollowCameraFollowMaxDistance = 'physxFollowCamera:followMaxDistance'
physxFollowCameraFollowMaxSpeed = 'physxFollowCamera:followMaxSpeed'
physxFollowCameraFollowMinDistance = 'physxFollowCamera:followMinDistance'
physxFollowCameraFollowMinSpeed = 'physxFollowCamera:followMinSpeed'
physxFollowCameraFollowTurnRateGain = 'physxFollowCamera:followTurnRateGain'
physxFollowCameraLookAheadMaxSpeed = 'physxFollowCamera:lookAheadMaxSpeed'
physxFollowCameraLookAheadMinDistance = 'physxFollowCamera:lookAheadMinDistance'
physxFollowCameraLookAheadMinSpeed = 'physxFollowCamera:lookAheadMinSpeed'
physxFollowCameraLookAheadTurnRateGain = 'physxFollowCamera:lookAheadTurnRateGain'
physxFollowCameraLookPositionHeight = 'physxFollowCamera:lookPositionHeight'
physxFollowCameraLookPositionTimeConstant = 'physxFollowCamera:lookPositionTimeConstant'
physxFollowCameraPitchAngle = 'physxFollowCamera:pitchAngle'
physxFollowCameraPitchAngleTimeConstant = 'physxFollowCamera:pitchAngleTimeConstant'
physxFollowCameraPositionOffset = 'physxFollowCamera:positionOffset'
physxFollowCameraSlowPitchAngleSpeed = 'physxFollowCamera:slowPitchAngleSpeed'
physxFollowCameraSlowSpeedPitchAngleScale = 'physxFollowCamera:slowSpeedPitchAngleScale'
physxFollowCameraVelocityNormalMinSpeed = 'physxFollowCamera:velocityNormalMinSpeed'
physxFollowCameraYawAngle = 'physxFollowCamera:yawAngle'
physxFollowCameraYawRateTimeConstant = 'physxFollowCamera:yawRateTimeConstant'
physxFollowFollowCameraLookAheadMaxDistance = 'physxFollowFollowCamera:lookAheadMaxDistance'
physxFollowLookCameraDownHillGroundAngle = 'physxFollowLookCamera:downHillGroundAngle'
physxFollowLookCameraDownHillGroundPitch = 'physxFollowLookCamera:downHillGroundPitch'
physxFollowLookCameraFollowReverseDistance = 'physxFollowLookCamera:followReverseDistance'
physxFollowLookCameraFollowReverseSpeed = 'physxFollowLookCamera:followReverseSpeed'
physxFollowLookCameraUpHillGroundAngle = 'physxFollowLookCamera:upHillGroundAngle'
physxFollowLookCameraUpHillGroundPitch = 'physxFollowLookCamera:upHillGroundPitch'
physxFollowLookCameraVelocityBlendTimeConstant = 'physxFollowLookCamera:velocityBlendTimeConstant'
physxForceForce = 'physxForce:force'
physxForceForceEnabled = 'physxForce:forceEnabled'
physxForceMode = 'physxForce:mode'
physxForceTorque = 'physxForce:torque'
physxForceWorldFrameEnabled = 'physxForce:worldFrameEnabled'
physxHairExternalCollision = 'physxHair:externalCollision'
physxHairGlobalShapeComplianceAtRoot = 'physxHair:globalShapeComplianceAtRoot'
physxHairGlobalShapeComplianceStrandAttenuation = 'physxHair:globalShapeComplianceStrandAttenuation'
physxHairInterHairRepulsion = 'physxHair:interHairRepulsion'
physxHairLocalShapeMatchingCompliance = 'physxHair:localShapeMatchingCompliance'
physxHairLocalShapeMatchingGroupOverlap = 'physxHair:localShapeMatchingGroupOverlap'
physxHairLocalShapeMatchingGroupSize = 'physxHair:localShapeMatchingGroupSize'
physxHairLocalShapeMatchingLinearStretching = 'physxHair:localShapeMatchingLinearStretching'
physxHairMaterialContactOffset = 'physxHairMaterial:contactOffset'
physxHairMaterialContactOffsetMultiplier = 'physxHairMaterial:contactOffsetMultiplier'
physxHairMaterialCurveBendStiffness = 'physxHairMaterial:curveBendStiffness'
physxHairMaterialCurveThickness = 'physxHairMaterial:curveThickness'
physxHairMaterialDensity = 'physxHairMaterial:density'
physxHairMaterialDynamicFriction = 'physxHairMaterial:dynamicFriction'
physxHairMaterialYoungsModulus = 'physxHairMaterial:youngsModulus'
physxHairSegmentLength = 'physxHair:segmentLength'
physxHairTwosidedAttachment = 'physxHair:twosidedAttachment'
physxHairVelSmoothing = 'physxHair:velSmoothing'
physxJointArmature = 'physxJoint:armature'
physxJointEnableProjection = 'physxJoint:enableProjection'
physxJointJointFriction = 'physxJoint:jointFriction'
physxJointMaxJointVelocity = 'physxJoint:maxJointVelocity'
physxLimit = 'physxLimit'
physxMaterialCompliantContactDamping = 'physxMaterial:compliantContactDamping'
physxMaterialCompliantContactStiffness = 'physxMaterial:compliantContactStiffness'
physxMaterialFrictionCombineMode = 'physxMaterial:frictionCombineMode'
physxMaterialImprovePatchFriction = 'physxMaterial:improvePatchFriction'
physxMaterialRestitutionCombineMode = 'physxMaterial:restitutionCombineMode'
physxPBDMaterialAdhesion = 'physxPBDMaterial:adhesion'
physxPBDMaterialAdhesionOffsetScale = 'physxPBDMaterial:adhesionOffsetScale'
physxPBDMaterialCflCoefficient = 'physxPBDMaterial:cflCoefficient'
physxPBDMaterialCohesion = 'physxPBDMaterial:cohesion'
physxPBDMaterialDamping = 'physxPBDMaterial:damping'
physxPBDMaterialDensity = 'physxPBDMaterial:density'
physxPBDMaterialDrag = 'physxPBDMaterial:drag'
physxPBDMaterialFriction = 'physxPBDMaterial:friction'
physxPBDMaterialGravityScale = 'physxPBDMaterial:gravityScale'
physxPBDMaterialLift = 'physxPBDMaterial:lift'
physxPBDMaterialParticleAdhesionScale = 'physxPBDMaterial:particleAdhesionScale'
physxPBDMaterialParticleFrictionScale = 'physxPBDMaterial:particleFrictionScale'
physxPBDMaterialSurfaceTension = 'physxPBDMaterial:surfaceTension'
physxPBDMaterialViscosity = 'physxPBDMaterial:viscosity'
physxPBDMaterialVorticityConfinement = 'physxPBDMaterial:vorticityConfinement'
physxParticleAnisotropyMax = 'physxParticleAnisotropy:max'
physxParticleAnisotropyMin = 'physxParticleAnisotropy:min'
physxParticleAnisotropyParticleAnisotropyEnabled = 'physxParticleAnisotropy:particleAnisotropyEnabled'
physxParticleAnisotropyScale = 'physxParticleAnisotropy:scale'
physxParticleFluid = 'physxParticle:fluid'
physxParticleIsosurfaceGridFilteringPasses = 'physxParticleIsosurface:gridFilteringPasses'
physxParticleIsosurfaceGridSmoothingRadius = 'physxParticleIsosurface:gridSmoothingRadius'
physxParticleIsosurfaceGridSpacing = 'physxParticleIsosurface:gridSpacing'
physxParticleIsosurfaceIsosurfaceEnabled = 'physxParticleIsosurface:isosurfaceEnabled'
physxParticleIsosurfaceMaxSubgrids = 'physxParticleIsosurface:maxSubgrids'
physxParticleIsosurfaceMaxTriangles = 'physxParticleIsosurface:maxTriangles'
physxParticleIsosurfaceMaxVertices = 'physxParticleIsosurface:maxVertices'
physxParticleIsosurfaceNumMeshNormalSmoothingPasses = 'physxParticleIsosurface:numMeshNormalSmoothingPasses'
physxParticleIsosurfaceNumMeshSmoothingPasses = 'physxParticleIsosurface:numMeshSmoothingPasses'
physxParticleIsosurfaceSurfaceDistance = 'physxParticleIsosurface:surfaceDistance'
physxParticleParticleEnabled = 'physxParticle:particleEnabled'
physxParticleParticleGroup = 'physxParticle:particleGroup'
physxParticleParticleSystem = 'physxParticle:particleSystem'
physxParticlePressure = 'physxParticle:pressure'
physxParticleRestPoints = 'physxParticle:restPoints'
physxParticleSamplingMaxSamples = 'physxParticleSampling:maxSamples'
physxParticleSamplingParticles = 'physxParticleSampling:particles'
physxParticleSamplingSamplingDistance = 'physxParticleSampling:samplingDistance'
physxParticleSamplingVolume = 'physxParticleSampling:volume'
physxParticleSelfCollision = 'physxParticle:selfCollision'
physxParticleSelfCollisionFilter = 'physxParticle:selfCollisionFilter'
physxParticleSimulationPoints = 'physxParticle:simulationPoints'
physxParticleSmoothingParticleSmoothingEnabled = 'physxParticleSmoothing:particleSmoothingEnabled'
physxParticleSmoothingStrength = 'physxParticleSmoothing:strength'
physxParticleSpringDampings = 'physxParticle:springDampings'
physxParticleSpringIndices = 'physxParticle:springIndices'
physxParticleSpringRestLengths = 'physxParticle:springRestLengths'
physxParticleSpringStiffnesses = 'physxParticle:springStiffnesses'
physxPhysicsDistanceJointSpringDamping = 'physxPhysicsDistanceJoint:springDamping'
physxPhysicsDistanceJointSpringEnabled = 'physxPhysicsDistanceJoint:springEnabled'
physxPhysicsDistanceJointSpringStiffness = 'physxPhysicsDistanceJoint:springStiffness'
physxRigidBodyAngularDamping = 'physxRigidBody:angularDamping'
physxRigidBodyCfmScale = 'physxRigidBody:cfmScale'
physxRigidBodyContactSlopCoefficient = 'physxRigidBody:contactSlopCoefficient'
physxRigidBodyDisableGravity = 'physxRigidBody:disableGravity'
physxRigidBodyEnableCCD = 'physxRigidBody:enableCCD'
physxRigidBodyEnableGyroscopicForces = 'physxRigidBody:enableGyroscopicForces'
physxRigidBodyEnableSpeculativeCCD = 'physxRigidBody:enableSpeculativeCCD'
physxRigidBodyLinearDamping = 'physxRigidBody:linearDamping'
physxRigidBodyLockedPosAxis = 'physxRigidBody:lockedPosAxis'
physxRigidBodyLockedRotAxis = 'physxRigidBody:lockedRotAxis'
physxRigidBodyMaxAngularVelocity = 'physxRigidBody:maxAngularVelocity'
physxRigidBodyMaxContactImpulse = 'physxRigidBody:maxContactImpulse'
physxRigidBodyMaxDepenetrationVelocity = 'physxRigidBody:maxDepenetrationVelocity'
physxRigidBodyMaxLinearVelocity = 'physxRigidBody:maxLinearVelocity'
physxRigidBodyRetainAccelerations = 'physxRigidBody:retainAccelerations'
physxRigidBodySleepThreshold = 'physxRigidBody:sleepThreshold'
physxRigidBodySolveContact = 'physxRigidBody:solveContact'
physxRigidBodySolverPositionIterationCount = 'physxRigidBody:solverPositionIterationCount'
physxRigidBodySolverVelocityIterationCount = 'physxRigidBody:solverVelocityIterationCount'
physxRigidBodyStabilizationThreshold = 'physxRigidBody:stabilizationThreshold'
physxSDFMeshCollisionSdfBitsPerSubgridPixel = 'physxSDFMeshCollision:sdfBitsPerSubgridPixel'
physxSDFMeshCollisionSdfEnableRemeshing = 'physxSDFMeshCollision:sdfEnableRemeshing'
physxSDFMeshCollisionSdfMargin = 'physxSDFMeshCollision:sdfMargin'
physxSDFMeshCollisionSdfNarrowBandThickness = 'physxSDFMeshCollision:sdfNarrowBandThickness'
physxSDFMeshCollisionSdfResolution = 'physxSDFMeshCollision:sdfResolution'
physxSDFMeshCollisionSdfSubgridResolution = 'physxSDFMeshCollision:sdfSubgridResolution'
physxSceneBounceThreshold = 'physxScene:bounceThreshold'
physxSceneBroadphaseType = 'physxScene:broadphaseType'
physxSceneCollisionSystem = 'physxScene:collisionSystem'
physxSceneEnableCCD = 'physxScene:enableCCD'
physxSceneEnableEnhancedDeterminism = 'physxScene:enableEnhancedDeterminism'
physxSceneEnableGPUDynamics = 'physxScene:enableGPUDynamics'
physxSceneEnableSceneQuerySupport = 'physxScene:enableSceneQuerySupport'
physxSceneEnableStabilization = 'physxScene:enableStabilization'
physxSceneFrictionCorrelationDistance = 'physxScene:frictionCorrelationDistance'
physxSceneFrictionOffsetThreshold = 'physxScene:frictionOffsetThreshold'
physxSceneFrictionType = 'physxScene:frictionType'
physxSceneGpuCollisionStackSize = 'physxScene:gpuCollisionStackSize'
physxSceneGpuFoundLostAggregatePairsCapacity = 'physxScene:gpuFoundLostAggregatePairsCapacity'
physxSceneGpuFoundLostPairsCapacity = 'physxScene:gpuFoundLostPairsCapacity'
physxSceneGpuHeapCapacity = 'physxScene:gpuHeapCapacity'
physxSceneGpuMaxDeformableSurfaceContacts = 'physxScene:gpuMaxDeformableSurfaceContacts'
physxSceneGpuMaxHairContacts = 'physxScene:gpuMaxHairContacts'
physxSceneGpuMaxNumPartitions = 'physxScene:gpuMaxNumPartitions'
physxSceneGpuMaxParticleContacts = 'physxScene:gpuMaxParticleContacts'
physxSceneGpuMaxRigidContactCount = 'physxScene:gpuMaxRigidContactCount'
physxSceneGpuMaxRigidPatchCount = 'physxScene:gpuMaxRigidPatchCount'
physxSceneGpuMaxSoftBodyContacts = 'physxScene:gpuMaxSoftBodyContacts'
physxSceneGpuTempBufferCapacity = 'physxScene:gpuTempBufferCapacity'
physxSceneGpuTotalAggregatePairsCapacity = 'physxScene:gpuTotalAggregatePairsCapacity'
physxSceneInvertCollisionGroupFilter = 'physxScene:invertCollisionGroupFilter'
physxSceneMaxBiasCoefficient = 'physxScene:maxBiasCoefficient'
physxSceneMaxIterationCount = 'physxScene:maxIterationCount'
physxSceneMinIterationCount = 'physxScene:minIterationCount'
physxSceneReportKinematicKinematicPairs = 'physxScene:reportKinematicKinematicPairs'
physxSceneReportKinematicStaticPairs = 'physxScene:reportKinematicStaticPairs'
physxSceneSolverType = 'physxScene:solverType'
physxSceneTimeStepsPerSecond = 'physxScene:timeStepsPerSecond'
physxSceneUpdateType = 'physxScene:updateType'
physxSphereFillCollisionFillMode = 'physxSphereFillCollision:fillMode'
physxSphereFillCollisionMaxSpheres = 'physxSphereFillCollision:maxSpheres'
physxSphereFillCollisionSeedCount = 'physxSphereFillCollision:seedCount'
physxSphereFillCollisionVoxelResolution = 'physxSphereFillCollision:voxelResolution'
physxTendon = 'physxTendon'
physxTriangleMeshCollisionWeldTolerance = 'physxTriangleMeshCollision:weldTolerance'
physxTriangleMeshSimplificationCollisionMetric = 'physxTriangleMeshSimplificationCollision:metric'
physxTriangleMeshSimplificationCollisionWeldTolerance = 'physxTriangleMeshSimplificationCollision:weldTolerance'
physxTriggerEnterScriptType = 'physxTrigger:enterScriptType'
physxTriggerLeaveScriptType = 'physxTrigger:leaveScriptType'
physxTriggerOnEnterScript = 'physxTrigger:onEnterScript'
physxTriggerOnLeaveScript = 'physxTrigger:onLeaveScript'
physxTriggerTriggeredCollisions = 'physxTrigger:triggeredCollisions'
physxVehicleAckermannSteeringMaxSteerAngle = 'physxVehicleAckermannSteering:maxSteerAngle'
physxVehicleAckermannSteeringStrength = 'physxVehicleAckermannSteering:strength'
physxVehicleAckermannSteeringTrackWidth = 'physxVehicleAckermannSteering:trackWidth'
physxVehicleAckermannSteeringWheel0 = 'physxVehicleAckermannSteering:wheel0'
physxVehicleAckermannSteeringWheel1 = 'physxVehicleAckermannSteering:wheel1'
physxVehicleAckermannSteeringWheelBase = 'physxVehicleAckermannSteering:wheelBase'
physxVehicleAutoGearBoxDownRatios = 'physxVehicleAutoGearBox:downRatios'
physxVehicleAutoGearBoxLatency = 'physxVehicleAutoGearBox:latency'
physxVehicleAutoGearBoxUpRatios = 'physxVehicleAutoGearBox:upRatios'
physxVehicleBrakes = 'physxVehicleBrakes'
physxVehicleClutchStrength = 'physxVehicleClutch:strength'
physxVehicleContextForwardAxis = 'physxVehicleContext:forwardAxis'
physxVehicleContextLongitudinalAxis = 'physxVehicleContext:longitudinalAxis'
physxVehicleContextUpAxis = 'physxVehicleContext:upAxis'
physxVehicleContextUpdateMode = 'physxVehicleContext:updateMode'
physxVehicleContextVerticalAxis = 'physxVehicleContext:verticalAxis'
physxVehicleControllerAccelerator = 'physxVehicleController:accelerator'
physxVehicleControllerBrake = 'physxVehicleController:brake'
physxVehicleControllerBrake0 = 'physxVehicleController:brake0'
physxVehicleControllerBrake1 = 'physxVehicleController:brake1'
physxVehicleControllerHandbrake = 'physxVehicleController:handbrake'
physxVehicleControllerSteer = 'physxVehicleController:steer'
physxVehicleControllerSteerLeft = 'physxVehicleController:steerLeft'
physxVehicleControllerSteerRight = 'physxVehicleController:steerRight'
physxVehicleControllerTargetGear = 'physxVehicleController:targetGear'
physxVehicleDrive = 'physxVehicle:drive'
physxVehicleDriveBasicPeakTorque = 'physxVehicleDriveBasic:peakTorque'
physxVehicleDriveStandardAutoGearBox = 'physxVehicleDriveStandard:autoGearBox'
physxVehicleDriveStandardClutch = 'physxVehicleDriveStandard:clutch'
physxVehicleDriveStandardEngine = 'physxVehicleDriveStandard:engine'
physxVehicleDriveStandardGears = 'physxVehicleDriveStandard:gears'
physxVehicleEngineDampingRateFullThrottle = 'physxVehicleEngine:dampingRateFullThrottle'
physxVehicleEngineDampingRateZeroThrottleClutchDisengaged = 'physxVehicleEngine:dampingRateZeroThrottleClutchDisengaged'
physxVehicleEngineDampingRateZeroThrottleClutchEngaged = 'physxVehicleEngine:dampingRateZeroThrottleClutchEngaged'
physxVehicleEngineIdleRotationSpeed = 'physxVehicleEngine:idleRotationSpeed'
physxVehicleEngineMaxRotationSpeed = 'physxVehicleEngine:maxRotationSpeed'
physxVehicleEngineMoi = 'physxVehicleEngine:moi'
physxVehicleEnginePeakTorque = 'physxVehicleEngine:peakTorque'
physxVehicleEngineTorqueCurve = 'physxVehicleEngine:torqueCurve'
physxVehicleGearsRatioScale = 'physxVehicleGears:ratioScale'
physxVehicleGearsRatios = 'physxVehicleGears:ratios'
physxVehicleGearsSwitchTime = 'physxVehicleGears:switchTime'
physxVehicleHighForwardSpeedSubStepCount = 'physxVehicle:highForwardSpeedSubStepCount'
physxVehicleLateralStickyTireDamping = 'physxVehicle:lateralStickyTireDamping'
physxVehicleLateralStickyTireThresholdSpeed = 'physxVehicle:lateralStickyTireThresholdSpeed'
physxVehicleLateralStickyTireThresholdTime = 'physxVehicle:lateralStickyTireThresholdTime'
physxVehicleLongitudinalStickyTireDamping = 'physxVehicle:longitudinalStickyTireDamping'
physxVehicleLongitudinalStickyTireThresholdSpeed = 'physxVehicle:longitudinalStickyTireThresholdSpeed'
physxVehicleLongitudinalStickyTireThresholdTime = 'physxVehicle:longitudinalStickyTireThresholdTime'
physxVehicleLowForwardSpeedSubStepCount = 'physxVehicle:lowForwardSpeedSubStepCount'
physxVehicleMinActiveLongitudinalSlipDenominator = 'physxVehicle:minActiveLongitudinalSlipDenominator'
physxVehicleMinLateralSlipDenominator = 'physxVehicle:minLateralSlipDenominator'
physxVehicleMinLongitudinalSlipDenominator = 'physxVehicle:minLongitudinalSlipDenominator'
physxVehicleMinPassiveLongitudinalSlipDenominator = 'physxVehicle:minPassiveLongitudinalSlipDenominator'
physxVehicleMultiWheelDifferentialAverageWheelSpeedRatios = 'physxVehicleMultiWheelDifferential:averageWheelSpeedRatios'
physxVehicleMultiWheelDifferentialTorqueRatios = 'physxVehicleMultiWheelDifferential:torqueRatios'
physxVehicleMultiWheelDifferentialWheels = 'physxVehicleMultiWheelDifferential:wheels'
physxVehicleSteeringAngleMultipliers = 'physxVehicleSteering:angleMultipliers'
physxVehicleSteeringMaxSteerAngle = 'physxVehicleSteering:maxSteerAngle'
physxVehicleSteeringWheels = 'physxVehicleSteering:wheels'
physxVehicleSubStepThresholdLongitudinalSpeed = 'physxVehicle:subStepThresholdLongitudinalSpeed'
physxVehicleSuspensionCamberAtMaxCompression = 'physxVehicleSuspension:camberAtMaxCompression'
physxVehicleSuspensionCamberAtMaxDroop = 'physxVehicleSuspension:camberAtMaxDroop'
physxVehicleSuspensionCamberAtRest = 'physxVehicleSuspension:camberAtRest'
physxVehicleSuspensionComplianceSuspensionForceAppPoint = 'physxVehicleSuspensionCompliance:suspensionForceAppPoint'
physxVehicleSuspensionComplianceTireForceAppPoint = 'physxVehicleSuspensionCompliance:tireForceAppPoint'
physxVehicleSuspensionComplianceWheelCamberAngle = 'physxVehicleSuspensionCompliance:wheelCamberAngle'
physxVehicleSuspensionComplianceWheelToeAngle = 'physxVehicleSuspensionCompliance:wheelToeAngle'
physxVehicleSuspensionLineQueryType = 'physxVehicle:suspensionLineQueryType'
physxVehicleSuspensionMaxCompression = 'physxVehicleSuspension:maxCompression'
physxVehicleSuspensionMaxDroop = 'physxVehicleSuspension:maxDroop'
physxVehicleSuspensionSpringDamperRate = 'physxVehicleSuspension:springDamperRate'
physxVehicleSuspensionSpringStrength = 'physxVehicleSuspension:springStrength'
physxVehicleSuspensionSprungMass = 'physxVehicleSuspension:sprungMass'
physxVehicleSuspensionTravelDistance = 'physxVehicleSuspension:travelDistance'
physxVehicleTankControllerThrust0 = 'physxVehicleTankController:thrust0'
physxVehicleTankControllerThrust1 = 'physxVehicleTankController:thrust1'
physxVehicleTankDifferentialNumberOfWheelsPerTrack = 'physxVehicleTankDifferential:numberOfWheelsPerTrack'
physxVehicleTankDifferentialThrustIndexPerTrack = 'physxVehicleTankDifferential:thrustIndexPerTrack'
physxVehicleTankDifferentialTrackToWheelIndices = 'physxVehicleTankDifferential:trackToWheelIndices'
physxVehicleTankDifferentialWheelIndicesInTrackOrder = 'physxVehicleTankDifferential:wheelIndicesInTrackOrder'
physxVehicleTireCamberStiffness = 'physxVehicleTire:camberStiffness'
physxVehicleTireCamberStiffnessPerUnitGravity = 'physxVehicleTire:camberStiffnessPerUnitGravity'
physxVehicleTireFrictionTable = 'physxVehicleTire:frictionTable'
physxVehicleTireFrictionVsSlipGraph = 'physxVehicleTire:frictionVsSlipGraph'
physxVehicleTireLatStiffX = 'physxVehicleTire:latStiffX'
physxVehicleTireLatStiffY = 'physxVehicleTire:latStiffY'
physxVehicleTireLateralStiffnessGraph = 'physxVehicleTire:lateralStiffnessGraph'
physxVehicleTireLongitudinalStiffness = 'physxVehicleTire:longitudinalStiffness'
physxVehicleTireLongitudinalStiffnessPerUnitGravity = 'physxVehicleTire:longitudinalStiffnessPerUnitGravity'
physxVehicleTireRestLoad = 'physxVehicleTire:restLoad'
physxVehicleVehicleEnabled = 'physxVehicle:vehicleEnabled'
physxVehicleWheelAttachmentCollisionGroup = 'physxVehicleWheelAttachment:collisionGroup'
physxVehicleWheelAttachmentDriven = 'physxVehicleWheelAttachment:driven'
physxVehicleWheelAttachmentIndex = 'physxVehicleWheelAttachment:index'
physxVehicleWheelAttachmentSuspension = 'physxVehicleWheelAttachment:suspension'
physxVehicleWheelAttachmentSuspensionForceAppPointOffset = 'physxVehicleWheelAttachment:suspensionForceAppPointOffset'
physxVehicleWheelAttachmentSuspensionFrameOrientation = 'physxVehicleWheelAttachment:suspensionFrameOrientation'
physxVehicleWheelAttachmentSuspensionFramePosition = 'physxVehicleWheelAttachment:suspensionFramePosition'
physxVehicleWheelAttachmentSuspensionTravelDirection = 'physxVehicleWheelAttachment:suspensionTravelDirection'
physxVehicleWheelAttachmentTire = 'physxVehicleWheelAttachment:tire'
physxVehicleWheelAttachmentTireForceAppPointOffset = 'physxVehicleWheelAttachment:tireForceAppPointOffset'
physxVehicleWheelAttachmentWheel = 'physxVehicleWheelAttachment:wheel'
physxVehicleWheelAttachmentWheelCenterOfMassOffset = 'physxVehicleWheelAttachment:wheelCenterOfMassOffset'
physxVehicleWheelAttachmentWheelFrameOrientation = 'physxVehicleWheelAttachment:wheelFrameOrientation'
physxVehicleWheelAttachmentWheelFramePosition = 'physxVehicleWheelAttachment:wheelFramePosition'
physxVehicleWheelControllerBrakeTorque = 'physxVehicleWheelController:brakeTorque'
physxVehicleWheelControllerDriveTorque = 'physxVehicleWheelController:driveTorque'
physxVehicleWheelControllerSteerAngle = 'physxVehicleWheelController:steerAngle'
physxVehicleWheelDampingRate = 'physxVehicleWheel:dampingRate'
physxVehicleWheelMass = 'physxVehicleWheel:mass'
physxVehicleWheelMaxBrakeTorque = 'physxVehicleWheel:maxBrakeTorque'
physxVehicleWheelMaxHandBrakeTorque = 'physxVehicleWheel:maxHandBrakeTorque'
physxVehicleWheelMaxSteerAngle = 'physxVehicleWheel:maxSteerAngle'
physxVehicleWheelMoi = 'physxVehicleWheel:moi'
physxVehicleWheelRadius = 'physxVehicleWheel:radius'
physxVehicleWheelToeAngle = 'physxVehicleWheel:toeAngle'
physxVehicleWheelWidth = 'physxVehicleWheel:width'
points0 = 'points0'
points1 = 'points1'
posX = 'posX'
posY = 'posY'
posZ = 'posZ'
preventClimbing = 'preventClimbing'
preventClimbingForceSliding = 'preventClimbingForceSliding'
raycast = 'raycast'
referenceFrameIsCenterOfMass = 'physxVehicle:referenceFrameIsCenterOfMass'
restLength = 'restLength'
restOffset = 'restOffset'
restitution = 'restitution'
rotX = 'rotX'
rotY = 'rotY'
rotZ = 'rotZ'
sAP = 'SAP'
sAT = 'SAT'
scriptBuffer = 'scriptBuffer'
scriptFile = 'scriptFile'
sdf = 'sdf'
simulationOwner = 'simulationOwner'
solidRestOffset = 'solidRestOffset'
solverPositionIterationCount = 'solverPositionIterationCount'
sphereFill = 'sphereFill'
state = 'state'
stiffness = 'stiffness'
surface = 'surface'
sweep = 'sweep'
synchronous = 'Synchronous'
tGS = 'TGS'
tendonEnabled = 'tendonEnabled'
torqueMultipliers = 'torqueMultipliers'
transX = 'transX'
transY = 'transY'
transZ = 'transZ'
triangleMesh = 'triangleMesh'
twoDirectional = 'twoDirectional'
undefined = 'undefined'
upperLimit = 'upperLimit'
velocityChange = 'velocityChange'
vertices = 'Vertices'
wheels = 'wheels'
wind = 'wind'
x = 'X'
y = 'Y'
z = 'Z'
pass
| 143,948 | unknown | 58.556889 | 238 | 0.723081 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/PhysxSchema/__init__.py | __copyright__ = "Copyright (c) 2020-2021, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import omni.core
# TODO: auto-load requirements
from usdrt import Sdf
from ._PhysxSchema import *
| 556 | Python | 33.812498 | 83 | 0.796763 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/UsdRender/__init__.py | __copyright__ = "Copyright (c) 2020-2021, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import omni.core
# TODO: auto-load requirements
from usdrt import Sdf
from ._UsdRender import *
| 554 | Python | 33.687498 | 83 | 0.796029 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/UsdRender/_UsdRender.pyi | from __future__ import annotations
import usdrt.UsdRender._UsdRender
import typing
import usdrt.Sdf._Sdf
import usdrt.Usd._Usd
__all__ = [
"DenoisePass",
"Pass",
"Product",
"Settings",
"SettingsBase",
"Tokens",
"Var"
]
class DenoisePass(usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> DenoisePass: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Pass(usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateCommandAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDenoiseEnableAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDenoisePassRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateFileNameAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateInputPassesRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreatePassTypeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateRenderSourceRel(self) -> usdrt.Usd._Usd.Relationship: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> Pass: ...
def GetCommandAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDenoiseEnableAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDenoisePassRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetFileNameAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetInputPassesRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetPassTypeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetRenderSourceRel(self) -> usdrt.Usd._Usd.Relationship: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Product(SettingsBase, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateOrderedVarsRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateProductNameAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateProductTypeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> Product: ...
def GetOrderedVarsRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetProductNameAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetProductTypeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Settings(SettingsBase, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateIncludedPurposesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMaterialBindingPurposesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateProductsRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateRenderingColorSpaceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> Settings: ...
def GetIncludedPurposesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaterialBindingPurposesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetProductsRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetRenderingColorSpaceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class SettingsBase(usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateAspectRatioConformPolicyAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateCameraRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateDataWindowNDCAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDisableMotionBlurAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateInstantaneousShutterAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreatePixelAspectRatioAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateResolutionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetAspectRatioConformPolicyAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCameraRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetDataWindowNDCAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDisableMotionBlurAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetInstantaneousShutterAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPixelAspectRatioAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetResolutionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Tokens():
adjustApertureHeight = 'adjustApertureHeight'
adjustApertureWidth = 'adjustApertureWidth'
adjustPixelAspectRatio = 'adjustPixelAspectRatio'
aspectRatioConformPolicy = 'aspectRatioConformPolicy'
camera = 'camera'
color3f = 'color3f'
command = 'command'
cropAperture = 'cropAperture'
dataType = 'dataType'
dataWindowNDC = 'dataWindowNDC'
denoiseEnable = 'denoise:enable'
denoisePass = 'denoise:pass'
disableMotionBlur = 'disableMotionBlur'
expandAperture = 'expandAperture'
fileName = 'fileName'
full = 'full'
includedPurposes = 'includedPurposes'
inputPasses = 'inputPasses'
instantaneousShutter = 'instantaneousShutter'
intrinsic = 'intrinsic'
lpe = 'lpe'
materialBindingPurposes = 'materialBindingPurposes'
orderedVars = 'orderedVars'
passType = 'passType'
pixelAspectRatio = 'pixelAspectRatio'
preview = 'preview'
primvar = 'primvar'
productName = 'productName'
productType = 'productType'
products = 'products'
raster = 'raster'
raw = 'raw'
renderSettingsPrimPath = 'renderSettingsPrimPath'
renderSource = 'renderSource'
renderingColorSpace = 'renderingColorSpace'
resolution = 'resolution'
sourceName = 'sourceName'
sourceType = 'sourceType'
pass
class Var(usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateDataTypeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSourceNameAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSourceTypeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> Var: ...
def GetDataTypeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSourceNameAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSourceTypeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
| 7,749 | unknown | 43.034091 | 90 | 0.661247 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/Rt/__init__.py | __copyright__ = "Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import omni.core
# TODO: automate this
from usdrt import Gf, Sdf, Usd
from ._Rt import *
| 542 | Python | 32.937498 | 78 | 0.787823 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/Rt/_Rt.pyi | from __future__ import annotations
import usdrt.Rt._Rt
import typing
import usdrt.Gf._Gf
import usdrt.Sdf._Sdf
import usdrt.Usd._Usd
__all__ = [
"Boundable",
"ChangeTracker",
"Tokens",
"Xformable"
]
class Boundable(Xformable):
def ClearWorldExtent(self) -> bool: ...
def CreateWorldExtentAttr(self, defaultValue: usdrt.Gf._Gf.Range3d = Gf.Range3d(Gf.Vec3d(0.0, 0.0, 0.0), Gf.Vec3d(0.0, 0.0, 0.0))) -> usdrt.Usd._Usd.Attribute: ...
def GetWorldExtentAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def HasWorldExtent(self) -> bool: ...
def SetWorldExtentFromUsd(self) -> bool: ...
def __init__(self, prim: usdrt.Usd._Usd.Prim = Prim(invalid)) -> None: ...
def __repr__(self) -> str: ...
pass
class ChangeTracker():
@typing.overload
def AttributeChanged(self, attr: usdrt.Usd._Usd.Attribute) -> bool: ...
@typing.overload
def AttributeChanged(self, attrPath: usdrt.Sdf._Sdf.Path) -> bool: ...
def ClearChanges(self) -> None: ...
def GetAllChangedAttributes(self) -> typing.List[usdrt.Sdf._Sdf.Path]: ...
def GetAllChangedPrims(self) -> typing.List[usdrt.Sdf._Sdf.Path]: ...
@typing.overload
def GetChangedAttributes(self, prim: usdrt.Usd._Usd.Prim) -> typing.List[TfToken]: ...
@typing.overload
def GetChangedAttributes(self, primPath: usdrt.Sdf._Sdf.Path) -> typing.List[TfToken]: ...
def GetTrackedAttributes(self) -> typing.List[TfToken]: ...
def HasChanges(self) -> bool: ...
def IsChangeTrackingPaused(self) -> bool: ...
def IsTrackingAttribute(self, attrName: TfToken) -> bool: ...
def PauseTracking(self) -> None: ...
@typing.overload
def PrimChanged(self, prim: usdrt.Usd._Usd.Prim) -> bool: ...
@typing.overload
def PrimChanged(self, primPath: usdrt.Sdf._Sdf.Path) -> bool: ...
def ResumeTracking(self) -> None: ...
def StopTrackingAttribute(self, attrName: TfToken) -> None: ...
def TrackAttribute(self, attrName: TfToken) -> None: ...
def __init__(self, arg0: usdrt.Usd._Usd.Stage) -> None: ...
pass
class Tokens():
localMatrix = '_localMatrix'
worldExtent = '_worldExtent'
worldOrientation = '_worldOrientation'
worldPosition = '_worldPosition'
worldScale = '_worldScale'
pass
class Xformable():
def ClearLocalXform(self) -> bool: ...
def ClearWorldXform(self) -> bool: ...
def CreateLocalMatrixAttr(self, defaultValue: usdrt.Gf._Gf.Matrix4d = Gf.Matrix4d(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0)) -> usdrt.Usd._Usd.Attribute: ...
def CreateWorldOrientationAttr(self, defaultValue: usdrt.Gf._Gf.Quatf = Gf.Quatf(0.0, Gf.Vec3f(0.0, 0.0, 0.0))) -> usdrt.Usd._Usd.Attribute: ...
def CreateWorldPositionAttr(self, defaultValue: usdrt.Gf._Gf.Vec3d = Gf.Vec3d(0.0, 0.0, 0.0)) -> usdrt.Usd._Usd.Attribute: ...
def CreateWorldScaleAttr(self, defaultValue: usdrt.Gf._Gf.Vec3f = Gf.Vec3f(0.0, 0.0, 0.0)) -> usdrt.Usd._Usd.Attribute: ...
def GetLocalMatrixAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPath(self) -> usdrt.Sdf._Sdf.Path: ...
def GetPrim(self) -> usdrt.Usd._Usd.Prim: ...
def GetWorldOrientationAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetWorldPositionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetWorldScaleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def HasLocalXform(self) -> bool: ...
def HasWorldXform(self) -> bool: ...
def SetLocalXformFromUsd(self) -> bool: ...
def SetWorldXformFromUsd(self) -> bool: ...
def __bool__(self) -> bool: ...
def __init__(self, prim: usdrt.Usd._Usd.Prim = Prim(invalid)) -> None: ...
def __repr__(self) -> str: ...
pass
| 3,681 | unknown | 45.607594 | 202 | 0.642217 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/UsdLux/__init__.py | __copyright__ = "Copyright (c) 2020-2021, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import omni.core
# TODO: auto-load requirements
from usdrt import Sdf
from ._UsdLux import *
| 551 | Python | 33.499998 | 83 | 0.794918 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/UsdLux/_UsdLux.pyi | from __future__ import annotations
import usdrt.UsdLux._UsdLux
import typing
import usdrt.Sdf._Sdf
import usdrt.Usd._Usd
import usdrt.UsdGeom._UsdGeom
__all__ = [
"BoundableLightBase",
"CylinderLight",
"DiskLight",
"DistantLight",
"DomeLight",
"GeometryLight",
"LightAPI",
"LightFilter",
"LightListAPI",
"ListAPI",
"MeshLightAPI",
"NonboundableLightBase",
"PluginLight",
"PluginLightFilter",
"PortalLight",
"RectLight",
"ShadowAPI",
"ShapingAPI",
"SphereLight",
"Tokens",
"VolumeLightAPI"
]
class CylinderLight(BoundableLightBase, usdrt.UsdGeom._UsdGeom.Boundable, usdrt.UsdGeom._UsdGeom.Xformable, usdrt.UsdGeom._UsdGeom.Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateLengthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLightShaderIdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateRadiusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTreatAsLineAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> CylinderLight: ...
def GetLengthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLightShaderIdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetRadiusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetTreatAsLineAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class DiskLight(BoundableLightBase, usdrt.UsdGeom._UsdGeom.Boundable, usdrt.UsdGeom._UsdGeom.Xformable, usdrt.UsdGeom._UsdGeom.Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateLightShaderIdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateRadiusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> DiskLight: ...
def GetLightShaderIdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetRadiusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class BoundableLightBase(usdrt.UsdGeom._UsdGeom.Boundable, usdrt.UsdGeom._UsdGeom.Xformable, usdrt.UsdGeom._UsdGeom.Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class DistantLight(NonboundableLightBase, usdrt.UsdGeom._UsdGeom.Xformable, usdrt.UsdGeom._UsdGeom.Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateAngleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateIntensityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLightShaderIdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> DistantLight: ...
def GetAngleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetIntensityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLightShaderIdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class DomeLight(NonboundableLightBase, usdrt.UsdGeom._UsdGeom.Xformable, usdrt.UsdGeom._UsdGeom.Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateGuideRadiusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLightShaderIdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreatePortalsRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateTextureFileAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTextureFormatAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> DomeLight: ...
def GetGuideRadiusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLightShaderIdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPortalsRel(self) -> usdrt.Usd._Usd.Relationship: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetTextureFileAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetTextureFormatAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class GeometryLight(NonboundableLightBase, usdrt.UsdGeom._UsdGeom.Xformable, usdrt.UsdGeom._UsdGeom.Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateGeometryRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateLightShaderIdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> GeometryLight: ...
def GetGeometryRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetLightShaderIdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class LightAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateCollectionLightLinkIncludeRootAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateCollectionShadowLinkIncludeRootAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateColorAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateColorTemperatureAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDiffuseAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateEnableColorTemperatureAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateExposureAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateFiltersRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateIntensityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMaterialSyncModeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateNormalizeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateShaderIdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSpecularAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCollectionLightLinkIncludeRootAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCollectionShadowLinkIncludeRootAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetColorAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetColorTemperatureAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDiffuseAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetEnableColorTemperatureAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetExposureAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFiltersRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetIntensityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMaterialSyncModeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetNormalizeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetShaderIdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSpecularAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class LightFilter(usdrt.UsdGeom._UsdGeom.Xformable, usdrt.UsdGeom._UsdGeom.Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateCollectionFilterLinkIncludeRootAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateShaderIdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> LightFilter: ...
def GetCollectionFilterLinkIncludeRootAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetShaderIdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class LightListAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateLightListCacheBehaviorAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLightListRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetLightListCacheBehaviorAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLightListRel(self) -> usdrt.Usd._Usd.Relationship: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class ListAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateLightListCacheBehaviorAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLightListRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetLightListCacheBehaviorAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLightListRel(self) -> usdrt.Usd._Usd.Relationship: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class MeshLightAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateLightMaterialSyncModeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLightShaderIdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLightMaterialSyncModeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLightShaderIdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class NonboundableLightBase(usdrt.UsdGeom._UsdGeom.Xformable, usdrt.UsdGeom._UsdGeom.Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PluginLight(usdrt.UsdGeom._UsdGeom.Xformable, usdrt.UsdGeom._UsdGeom.Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> PluginLight: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PluginLightFilter(LightFilter, usdrt.UsdGeom._UsdGeom.Xformable, usdrt.UsdGeom._UsdGeom.Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> PluginLightFilter: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PortalLight(BoundableLightBase, usdrt.UsdGeom._UsdGeom.Boundable, usdrt.UsdGeom._UsdGeom.Xformable, usdrt.UsdGeom._UsdGeom.Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateLightShaderIdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> PortalLight: ...
def GetLightShaderIdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class RectLight(BoundableLightBase, usdrt.UsdGeom._UsdGeom.Boundable, usdrt.UsdGeom._UsdGeom.Xformable, usdrt.UsdGeom._UsdGeom.Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateHeightAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLightShaderIdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTextureFileAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateWidthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> RectLight: ...
def GetHeightAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLightShaderIdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetTextureFileAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetWidthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class ShadowAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateShadowColorAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateShadowDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateShadowEnableAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateShadowFalloffAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateShadowFalloffGammaAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetShadowColorAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetShadowDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetShadowEnableAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetShadowFalloffAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetShadowFalloffGammaAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class ShapingAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateShapingConeAngleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateShapingConeSoftnessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateShapingFocusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateShapingFocusTintAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateShapingIesAngleScaleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateShapingIesFileAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateShapingIesNormalizeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetShapingConeAngleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetShapingConeSoftnessAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetShapingFocusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetShapingFocusTintAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetShapingIesAngleScaleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetShapingIesFileAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetShapingIesNormalizeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class SphereLight(BoundableLightBase, usdrt.UsdGeom._UsdGeom.Boundable, usdrt.UsdGeom._UsdGeom.Xformable, usdrt.UsdGeom._UsdGeom.Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateLightShaderIdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateRadiusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTreatAsPointAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> SphereLight: ...
def GetLightShaderIdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetRadiusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetTreatAsPointAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Tokens():
angular = 'angular'
automatic = 'automatic'
collectionFilterLinkIncludeRoot = 'collection:filterLink:includeRoot'
collectionLightLinkIncludeRoot = 'collection:lightLink:includeRoot'
collectionShadowLinkIncludeRoot = 'collection:shadowLink:includeRoot'
consumeAndContinue = 'consumeAndContinue'
consumeAndHalt = 'consumeAndHalt'
cubeMapVerticalCross = 'cubeMapVerticalCross'
cylinderLight = 'CylinderLight'
diskLight = 'DiskLight'
distantLight = 'DistantLight'
domeLight = 'DomeLight'
extent = 'extent'
filterLink = 'filterLink'
geometry = 'geometry'
geometryLight = 'GeometryLight'
guideRadius = 'guideRadius'
ignore = 'ignore'
independent = 'independent'
inputsAngle = 'inputs:angle'
inputsColor = 'inputs:color'
inputsColorTemperature = 'inputs:colorTemperature'
inputsDiffuse = 'inputs:diffuse'
inputsEnableColorTemperature = 'inputs:enableColorTemperature'
inputsExposure = 'inputs:exposure'
inputsHeight = 'inputs:height'
inputsIntensity = 'inputs:intensity'
inputsLength = 'inputs:length'
inputsNormalize = 'inputs:normalize'
inputsRadius = 'inputs:radius'
inputsShadowColor = 'inputs:shadow:color'
inputsShadowDistance = 'inputs:shadow:distance'
inputsShadowEnable = 'inputs:shadow:enable'
inputsShadowFalloff = 'inputs:shadow:falloff'
inputsShadowFalloffGamma = 'inputs:shadow:falloffGamma'
inputsShapingConeAngle = 'inputs:shaping:cone:angle'
inputsShapingConeSoftness = 'inputs:shaping:cone:softness'
inputsShapingFocus = 'inputs:shaping:focus'
inputsShapingFocusTint = 'inputs:shaping:focusTint'
inputsShapingIesAngleScale = 'inputs:shaping:ies:angleScale'
inputsShapingIesFile = 'inputs:shaping:ies:file'
inputsShapingIesNormalize = 'inputs:shaping:ies:normalize'
inputsSpecular = 'inputs:specular'
inputsTextureFile = 'inputs:texture:file'
inputsTextureFormat = 'inputs:texture:format'
inputsWidth = 'inputs:width'
latlong = 'latlong'
lightFilterShaderId = 'lightFilter:shaderId'
lightFilters = 'light:filters'
lightLink = 'lightLink'
lightList = 'lightList'
lightListCacheBehavior = 'lightList:cacheBehavior'
lightMaterialSyncMode = 'light:materialSyncMode'
lightShaderId = 'light:shaderId'
materialGlowTintsLight = 'materialGlowTintsLight'
meshLight = 'MeshLight'
mirroredBall = 'mirroredBall'
noMaterialResponse = 'noMaterialResponse'
orientToStageUpAxis = 'orientToStageUpAxis'
portalLight = 'PortalLight'
portals = 'portals'
rectLight = 'RectLight'
shadowLink = 'shadowLink'
sphereLight = 'SphereLight'
treatAsLine = 'treatAsLine'
treatAsPoint = 'treatAsPoint'
volumeLight = 'VolumeLight'
pass
class VolumeLightAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateLightMaterialSyncModeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLightShaderIdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLightMaterialSyncModeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLightShaderIdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
| 21,824 | unknown | 48.377828 | 191 | 0.670867 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/Gf/__init__.py | __copyright__ = "Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
from ._Gf import *
| 470 | Python | 41.818178 | 78 | 0.795745 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/Gf/_Gf.pyi | from __future__ import annotations
import usdrt.Gf._Gf
import typing
__all__ = [
"CompDiv",
"CompMult",
"Cross",
"DegreesToRadians",
"Dot",
"GetComplement",
"GetLength",
"GetNormalized",
"GetProjection",
"IsClose",
"Lerp",
"Lerpf",
"Matrix3d",
"Matrix3f",
"Matrix4d",
"Matrix4f",
"Max",
"Min",
"Normalize",
"Quatd",
"Quatf",
"Quath",
"RadiansToDegrees",
"Range1d",
"Range1f",
"Range2d",
"Range2f",
"Range3d",
"Range3f",
"Rect2i",
"Slerp",
"Vec2d",
"Vec2f",
"Vec2h",
"Vec2i",
"Vec3d",
"Vec3f",
"Vec3h",
"Vec3i",
"Vec4d",
"Vec4f",
"Vec4h",
"Vec4i"
]
class Matrix3d():
def GetArrayItem(self, arg0: int) -> float: ...
def GetColumn(self, arg0: int) -> Vec3d: ...
def GetDeterminant(self) -> float: ...
def GetHandedness(self) -> int: ...
def GetInverse(self) -> Matrix3d: ...
def GetOrthonormalized(self) -> Matrix3d: ...
def GetRow(self, arg0: int) -> Vec3d: ...
def GetTranspose(self) -> Matrix3d: ...
def IsLeftHanded(self) -> bool: ...
def IsRightHanded(self) -> bool: ...
def Orthonormalize(self) -> bool: ...
def Set(self, arg0: float, arg1: float, arg2: float, arg3: float, arg4: float, arg5: float, arg6: float, arg7: float, arg8: float) -> Matrix3d: ...
def SetArrayItem(self, arg0: int, arg1: float) -> None: ...
def SetColumn(self, arg0: int, arg1: Vec3d) -> None: ...
@typing.overload
def SetDiagonal(self, arg0: float) -> Matrix3d: ...
@typing.overload
def SetDiagonal(self, arg0: Vec3d) -> Matrix3d: ...
def SetIdentity(self) -> Matrix3d: ...
def SetRow(self, arg0: int, arg1: Vec3d) -> None: ...
def SetZero(self) -> Matrix3d: ...
def __add__(self, arg0: Matrix3d) -> Matrix3d: ...
def __contains__(self, arg0: float) -> bool: ...
def __copy__(self) -> Matrix3d: ...
def __deepcopy__(self, memo: dict) -> Matrix3d: ...
@typing.overload
def __eq__(self, arg0: Matrix3d) -> bool: ...
@staticmethod
@typing.overload
def __eq__(*args, **kwargs) -> typing.Any: ...
@typing.overload
def __getitem__(self, arg0: tuple) -> float: ...
@typing.overload
def __getitem__(self, arg0: int) -> Vec3d: ...
def __iadd__(self, arg0: Matrix3d) -> Matrix3d: ...
def __imul__(self, arg0: float) -> Matrix3d: ...
@typing.overload
def __init__(self, arg0: Matrix3d) -> None: ...
@staticmethod
@typing.overload
def __init__(*args, **kwargs) -> typing.Any: ...
@typing.overload
def __init__(self, arg0: float, arg1: float, arg2: float, arg3: float, arg4: float, arg5: float, arg6: float, arg7: float, arg8: float) -> None: ...
@typing.overload
def __init__(self, arg0: Vec3d) -> None: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: float) -> None: ...
@typing.overload
def __init__(self, arg0: buffer) -> None: ...
def __isub__(self, arg0: Matrix3d) -> Matrix3d: ...
def __len__(self) -> int: ...
@typing.overload
def __mul__(self, arg0: float) -> Matrix3d: ...
@typing.overload
def __mul__(self, arg0: Matrix3d) -> Matrix3d: ...
@typing.overload
def __mul__(self, arg0: Vec3d) -> Vec3d: ...
@typing.overload
def __mul__(self, arg0: Vec3f) -> Vec3f: ...
@typing.overload
def __ne__(self, arg0: Matrix3d) -> bool: ...
@staticmethod
@typing.overload
def __ne__(*args, **kwargs) -> typing.Any: ...
def __neg__(self) -> Matrix3d: ...
def __repr__(self) -> str: ...
@typing.overload
def __rmul__(self, arg0: float) -> Matrix3d: ...
@typing.overload
def __rmul__(self, arg0: Vec3d) -> Vec3d: ...
@typing.overload
def __rmul__(self, arg0: Vec3f) -> Vec3f: ...
@typing.overload
def __setitem__(self, arg0: tuple, arg1: float) -> None: ...
@typing.overload
def __setitem__(self, arg0: int, arg1: Vec3d) -> None: ...
def __str__(self) -> str: ...
def __sub__(self, arg0: Matrix3d) -> Matrix3d: ...
def __truediv__(self, arg0: Matrix3d) -> Matrix3d: ...
__hash__ = None
dimension = (3, 3)
pass
class Matrix3f():
def GetArrayItem(self, arg0: int) -> float: ...
def GetColumn(self, arg0: int) -> Vec3f: ...
def GetDeterminant(self) -> float: ...
def GetHandedness(self) -> int: ...
def GetInverse(self) -> Matrix3f: ...
def GetOrthonormalized(self) -> Matrix3f: ...
def GetRow(self, arg0: int) -> Vec3f: ...
def GetTranspose(self) -> Matrix3f: ...
def IsLeftHanded(self) -> bool: ...
def IsRightHanded(self) -> bool: ...
def Orthonormalize(self) -> bool: ...
def Set(self, arg0: float, arg1: float, arg2: float, arg3: float, arg4: float, arg5: float, arg6: float, arg7: float, arg8: float) -> Matrix3f: ...
def SetArrayItem(self, arg0: int, arg1: float) -> None: ...
def SetColumn(self, arg0: int, arg1: Vec3f) -> None: ...
@typing.overload
def SetDiagonal(self, arg0: float) -> Matrix3f: ...
@typing.overload
def SetDiagonal(self, arg0: Vec3f) -> Matrix3f: ...
def SetIdentity(self) -> Matrix3f: ...
def SetRow(self, arg0: int, arg1: Vec3f) -> None: ...
def SetZero(self) -> Matrix3f: ...
def __add__(self, arg0: Matrix3f) -> Matrix3f: ...
def __contains__(self, arg0: float) -> bool: ...
def __copy__(self) -> Matrix3f: ...
def __deepcopy__(self, memo: dict) -> Matrix3f: ...
@typing.overload
def __eq__(self, arg0: Matrix3d) -> bool: ...
@typing.overload
def __eq__(self, arg0: Matrix3f) -> bool: ...
@typing.overload
def __getitem__(self, arg0: tuple) -> float: ...
@typing.overload
def __getitem__(self, arg0: int) -> Vec3f: ...
def __iadd__(self, arg0: Matrix3f) -> Matrix3f: ...
def __imul__(self, arg0: float) -> Matrix3f: ...
@typing.overload
def __init__(self, arg0: Matrix3d) -> None: ...
@typing.overload
def __init__(self, arg0: Matrix3f) -> None: ...
@typing.overload
def __init__(self, arg0: float, arg1: float, arg2: float, arg3: float, arg4: float, arg5: float, arg6: float, arg7: float, arg8: float) -> None: ...
@typing.overload
def __init__(self, arg0: Vec3f) -> None: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: float) -> None: ...
@typing.overload
def __init__(self, arg0: buffer) -> None: ...
def __isub__(self, arg0: Matrix3f) -> Matrix3f: ...
def __len__(self) -> int: ...
@typing.overload
def __mul__(self, arg0: float) -> Matrix3f: ...
@typing.overload
def __mul__(self, arg0: Matrix3f) -> Matrix3f: ...
@typing.overload
def __mul__(self, arg0: Vec3f) -> Vec3f: ...
@typing.overload
def __ne__(self, arg0: Matrix3d) -> bool: ...
@typing.overload
def __ne__(self, arg0: Matrix3f) -> bool: ...
def __neg__(self) -> Matrix3f: ...
def __repr__(self) -> str: ...
@typing.overload
def __rmul__(self, arg0: float) -> Matrix3f: ...
@typing.overload
def __rmul__(self, arg0: Vec3f) -> Vec3f: ...
@typing.overload
def __setitem__(self, arg0: tuple, arg1: float) -> None: ...
@typing.overload
def __setitem__(self, arg0: int, arg1: Vec3f) -> None: ...
def __str__(self) -> str: ...
def __sub__(self, arg0: Matrix3f) -> Matrix3f: ...
def __truediv__(self, arg0: Matrix3f) -> Matrix3f: ...
__hash__ = None
dimension = (3, 3)
pass
class Matrix4d():
@staticmethod
def ExtractRotation(*args, **kwargs) -> typing.Any: ...
@staticmethod
def ExtractRotationMatrix(*args, **kwargs) -> typing.Any: ...
def ExtractTranslation(self) -> Vec3d: ...
def GetArrayItem(self, arg0: int) -> float: ...
def GetColumn(self, arg0: int) -> Vec4d: ...
def GetDeterminant(self) -> float: ...
def GetDeterminant3(self) -> float: ...
def GetHandedness(self) -> int: ...
def GetInverse(self) -> Matrix4d: ...
def GetOrthonormalized(self) -> Matrix4d: ...
def GetRow(self, arg0: int) -> Vec4d: ...
def GetRow3(self, arg0: int) -> Vec3d: ...
def GetTranspose(self) -> Matrix4d: ...
def IsLeftHanded(self) -> bool: ...
def IsRightHanded(self) -> bool: ...
def Orthonormalize(self) -> bool: ...
def RemoveScaleShear(self) -> Matrix4d: ...
def Set(self, arg0: float, arg1: float, arg2: float, arg3: float, arg4: float, arg5: float, arg6: float, arg7: float, arg8: float, arg9: float, arg10: float, arg11: float, arg12: float, arg13: float, arg14: float, arg15: float) -> Matrix4d: ...
def SetArrayItem(self, arg0: int, arg1: float) -> None: ...
def SetColumn(self, arg0: int, arg1: Vec4d) -> None: ...
@typing.overload
def SetDiagonal(self, arg0: float) -> Matrix4d: ...
@typing.overload
def SetDiagonal(self, arg0: Vec4d) -> Matrix4d: ...
def SetIdentity(self) -> Matrix4d: ...
def SetLookAt(self, arg0: Vec3d, arg1: Vec3d, arg2: Vec3d) -> Matrix4d: ...
@staticmethod
def SetRotate(*args, **kwargs) -> typing.Any: ...
@staticmethod
def SetRotateOnly(*args, **kwargs) -> typing.Any: ...
def SetRow(self, arg0: int, arg1: Vec4d) -> None: ...
def SetRow3(self, arg0: int, arg1: Vec3d) -> None: ...
@typing.overload
def SetScale(self, arg0: float) -> Matrix4d: ...
@typing.overload
def SetScale(self, arg0: Vec3d) -> Matrix4d: ...
def SetTranslate(self, arg0: Vec3d) -> Matrix4d: ...
def SetTranslateOnly(self, arg0: Vec3d) -> Matrix4d: ...
def SetZero(self) -> Matrix4d: ...
@typing.overload
def Transform(self, arg0: Vec3f) -> Vec3f: ...
@typing.overload
def Transform(self, arg0: Vec3d) -> Vec3d: ...
@typing.overload
def TransformAffine(self, arg0: Vec3f) -> Vec3f: ...
@typing.overload
def TransformAffine(self, arg0: Vec3d) -> Vec3d: ...
@typing.overload
def TransformDir(self, arg0: Vec3f) -> Vec3f: ...
@typing.overload
def TransformDir(self, arg0: Vec3d) -> Vec3d: ...
def __add__(self, arg0: Matrix4d) -> Matrix4d: ...
def __contains__(self, arg0: float) -> bool: ...
def __copy__(self) -> Matrix4d: ...
def __deepcopy__(self, memo: dict) -> Matrix4d: ...
@typing.overload
def __eq__(self, arg0: Matrix4d) -> bool: ...
@staticmethod
@typing.overload
def __eq__(*args, **kwargs) -> typing.Any: ...
@typing.overload
def __getitem__(self, arg0: tuple) -> float: ...
@typing.overload
def __getitem__(self, arg0: int) -> Vec4d: ...
def __iadd__(self, arg0: Matrix4d) -> Matrix4d: ...
def __imul__(self, arg0: float) -> Matrix4d: ...
@typing.overload
def __init__(self, arg0: Matrix4d) -> None: ...
@staticmethod
@typing.overload
def __init__(*args, **kwargs) -> typing.Any: ...
@typing.overload
def __init__(self, arg0: float, arg1: float, arg2: float, arg3: float, arg4: float, arg5: float, arg6: float, arg7: float, arg8: float, arg9: float, arg10: float, arg11: float, arg12: float, arg13: float, arg14: float, arg15: float) -> None: ...
@typing.overload
def __init__(self, arg0: Vec4d) -> None: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: float) -> None: ...
@typing.overload
def __init__(self, arg0: buffer) -> None: ...
def __isub__(self, arg0: Matrix4d) -> Matrix4d: ...
def __len__(self) -> int: ...
@typing.overload
def __mul__(self, arg0: float) -> Matrix4d: ...
@typing.overload
def __mul__(self, arg0: Matrix4d) -> Matrix4d: ...
@typing.overload
def __mul__(self, arg0: Vec4d) -> Vec4d: ...
@typing.overload
def __mul__(self, arg0: Vec4f) -> Vec4f: ...
@typing.overload
def __ne__(self, arg0: Matrix4d) -> bool: ...
@staticmethod
@typing.overload
def __ne__(*args, **kwargs) -> typing.Any: ...
def __neg__(self) -> Matrix4d: ...
def __repr__(self) -> str: ...
@typing.overload
def __rmul__(self, arg0: float) -> Matrix4d: ...
@typing.overload
def __rmul__(self, arg0: Vec4d) -> Vec4d: ...
@typing.overload
def __rmul__(self, arg0: Vec4f) -> Vec4f: ...
@typing.overload
def __setitem__(self, arg0: tuple, arg1: float) -> None: ...
@typing.overload
def __setitem__(self, arg0: int, arg1: Vec4d) -> None: ...
def __str__(self) -> str: ...
def __sub__(self, arg0: Matrix4d) -> Matrix4d: ...
def __truediv__(self, arg0: Matrix4d) -> Matrix4d: ...
__hash__ = None
dimension = (4, 4)
pass
class Matrix4f():
@staticmethod
def ExtractRotation(*args, **kwargs) -> typing.Any: ...
@staticmethod
def ExtractRotationMatrix(*args, **kwargs) -> typing.Any: ...
def ExtractTranslation(self) -> Vec3f: ...
def GetArrayItem(self, arg0: int) -> float: ...
def GetColumn(self, arg0: int) -> Vec4f: ...
def GetDeterminant(self) -> float: ...
def GetDeterminant3(self) -> float: ...
def GetHandedness(self) -> int: ...
def GetInverse(self) -> Matrix4f: ...
def GetOrthonormalized(self) -> Matrix4f: ...
def GetRow(self, arg0: int) -> Vec4f: ...
def GetRow3(self, arg0: int) -> Vec3f: ...
def GetTranspose(self) -> Matrix4f: ...
def IsLeftHanded(self) -> bool: ...
def IsRightHanded(self) -> bool: ...
def Orthonormalize(self) -> bool: ...
def RemoveScaleShear(self) -> Matrix4f: ...
def Set(self, arg0: float, arg1: float, arg2: float, arg3: float, arg4: float, arg5: float, arg6: float, arg7: float, arg8: float, arg9: float, arg10: float, arg11: float, arg12: float, arg13: float, arg14: float, arg15: float) -> Matrix4f: ...
def SetArrayItem(self, arg0: int, arg1: float) -> None: ...
def SetColumn(self, arg0: int, arg1: Vec4f) -> None: ...
@typing.overload
def SetDiagonal(self, arg0: float) -> Matrix4f: ...
@typing.overload
def SetDiagonal(self, arg0: Vec4f) -> Matrix4f: ...
def SetIdentity(self) -> Matrix4f: ...
def SetLookAt(self, arg0: Vec3f, arg1: Vec3f, arg2: Vec3f) -> Matrix4f: ...
@staticmethod
def SetRotate(*args, **kwargs) -> typing.Any: ...
@staticmethod
def SetRotateOnly(*args, **kwargs) -> typing.Any: ...
def SetRow(self, arg0: int, arg1: Vec4f) -> None: ...
def SetRow3(self, arg0: int, arg1: Vec3f) -> None: ...
@typing.overload
def SetScale(self, arg0: float) -> Matrix4f: ...
@typing.overload
def SetScale(self, arg0: Vec3f) -> Matrix4f: ...
def SetTranslate(self, arg0: Vec3f) -> Matrix4f: ...
def SetTranslateOnly(self, arg0: Vec3f) -> Matrix4f: ...
def SetZero(self) -> Matrix4f: ...
@typing.overload
def Transform(self, arg0: Vec3f) -> Vec3f: ...
@typing.overload
def Transform(self, arg0: Vec3d) -> Vec3d: ...
@typing.overload
def TransformAffine(self, arg0: Vec3f) -> Vec3f: ...
@typing.overload
def TransformAffine(self, arg0: Vec3d) -> Vec3d: ...
@typing.overload
def TransformDir(self, arg0: Vec3f) -> Vec3f: ...
@typing.overload
def TransformDir(self, arg0: Vec3d) -> Vec3d: ...
def __add__(self, arg0: Matrix4f) -> Matrix4f: ...
def __contains__(self, arg0: float) -> bool: ...
def __copy__(self) -> Matrix4f: ...
def __deepcopy__(self, memo: dict) -> Matrix4f: ...
@typing.overload
def __eq__(self, arg0: Matrix4d) -> bool: ...
@typing.overload
def __eq__(self, arg0: Matrix4f) -> bool: ...
@typing.overload
def __getitem__(self, arg0: tuple) -> float: ...
@typing.overload
def __getitem__(self, arg0: int) -> Vec4f: ...
def __iadd__(self, arg0: Matrix4f) -> Matrix4f: ...
def __imul__(self, arg0: float) -> Matrix4f: ...
@typing.overload
def __init__(self, arg0: Matrix4d) -> None: ...
@typing.overload
def __init__(self, arg0: Matrix4f) -> None: ...
@typing.overload
def __init__(self, arg0: float, arg1: float, arg2: float, arg3: float, arg4: float, arg5: float, arg6: float, arg7: float, arg8: float, arg9: float, arg10: float, arg11: float, arg12: float, arg13: float, arg14: float, arg15: float) -> None: ...
@typing.overload
def __init__(self, arg0: Vec4f) -> None: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: float) -> None: ...
@typing.overload
def __init__(self, arg0: buffer) -> None: ...
def __isub__(self, arg0: Matrix4f) -> Matrix4f: ...
def __len__(self) -> int: ...
@typing.overload
def __mul__(self, arg0: float) -> Matrix4f: ...
@typing.overload
def __mul__(self, arg0: Matrix4f) -> Matrix4f: ...
@typing.overload
def __mul__(self, arg0: Vec4f) -> Vec4f: ...
@typing.overload
def __ne__(self, arg0: Matrix4d) -> bool: ...
@typing.overload
def __ne__(self, arg0: Matrix4f) -> bool: ...
def __neg__(self) -> Matrix4f: ...
def __repr__(self) -> str: ...
@typing.overload
def __rmul__(self, arg0: float) -> Matrix4f: ...
@typing.overload
def __rmul__(self, arg0: Vec4f) -> Vec4f: ...
@typing.overload
def __setitem__(self, arg0: tuple, arg1: float) -> None: ...
@typing.overload
def __setitem__(self, arg0: int, arg1: Vec4f) -> None: ...
def __str__(self) -> str: ...
def __sub__(self, arg0: Matrix4f) -> Matrix4f: ...
def __truediv__(self, arg0: Matrix4f) -> Matrix4f: ...
__hash__ = None
dimension = (4, 4)
pass
class Quatd():
def Dot(self, arg0: Quatd) -> float: ...
def GetConjugate(self) -> Quatd: ...
@staticmethod
def GetIdentity() -> Quatd: ...
def GetImaginary(self) -> Vec3d: ...
def GetInverse(self) -> Quatd: ...
def GetLength(self) -> float: ...
def GetLengthSq(self) -> float: ...
def GetNormalized(self) -> Quatd: ...
def GetReal(self) -> float: ...
def Normalize(self) -> float: ...
@typing.overload
def SetImaginary(self, imaginary: Vec3d) -> None: ...
@typing.overload
def SetImaginary(self, i: float, j: float, k: float) -> None: ...
def SetReal(self, real: float) -> None: ...
def Transform(self, point: Vec3d) -> Vec3d: ...
def __add__(self, arg0: Quatd) -> Quatd: ...
def __copy__(self) -> Quatd: ...
def __deepcopy__(self, memo: dict) -> Quatd: ...
def __eq__(self, arg0: Quatd) -> bool: ...
@typing.overload
def __getitem__(self, arg0: int) -> float: ...
@typing.overload
def __getitem__(self, arg0: slice) -> typing.List[float]: ...
def __iadd__(self, arg0: Quatd) -> Quatd: ...
@typing.overload
def __imul__(self, arg0: Quatd) -> Quatd: ...
@typing.overload
def __imul__(self, arg0: float) -> Quatd: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: float) -> None: ...
@typing.overload
def __init__(self, arg0: float, arg1: float, arg2: float, arg3: float) -> None: ...
@typing.overload
def __init__(self, arg0: float, arg1: Vec3d) -> None: ...
@typing.overload
def __init__(self, arg0: float, arg1: typing.Tuple[float, float, float]) -> None: ...
@typing.overload
def __init__(self, arg0: Quatd) -> None: ...
@staticmethod
@typing.overload
def __init__(*args, **kwargs) -> typing.Any: ...
@typing.overload
def __init__(self, arg0: buffer) -> None: ...
def __isub__(self, arg0: Quatd) -> Quatd: ...
def __itruediv__(self, arg0: float) -> Quatd: ...
def __len__(self) -> int: ...
@typing.overload
def __mul__(self, arg0: Quatd) -> Quatd: ...
@typing.overload
def __mul__(self, arg0: float) -> Quatd: ...
def __ne__(self, arg0: Quatd) -> bool: ...
def __neg__(self) -> Quatd: ...
def __repr__(self) -> str: ...
def __rmul__(self, arg0: float) -> Quatd: ...
@typing.overload
def __setitem__(self, arg0: int, arg1: float) -> None: ...
@typing.overload
def __setitem__(self, arg0: slice, arg1: typing.Sequence) -> None: ...
def __str__(self) -> str: ...
def __sub__(self, arg0: Quatd) -> Quatd: ...
def __truediv__(self, arg0: float) -> Quatd: ...
@property
def imaginary(self) -> Vec3d:
"""
:type: Vec3d
"""
@imaginary.setter
def imaginary(self, arg1: Vec3d) -> None:
pass
@property
def real(self) -> float:
"""
:type: float
"""
@real.setter
def real(self, arg1: float) -> None:
pass
__hash__ = None
pass
class Quatf():
def Dot(self, arg0: Quatf) -> float: ...
def GetConjugate(self) -> Quatf: ...
@staticmethod
def GetIdentity() -> Quatf: ...
def GetImaginary(self) -> Vec3f: ...
def GetInverse(self) -> Quatf: ...
def GetLength(self) -> float: ...
def GetLengthSq(self) -> float: ...
def GetNormalized(self) -> Quatf: ...
def GetReal(self) -> float: ...
def Normalize(self) -> float: ...
@typing.overload
def SetImaginary(self, imaginary: Vec3f) -> None: ...
@typing.overload
def SetImaginary(self, i: float, j: float, k: float) -> None: ...
def SetReal(self, real: float) -> None: ...
def Transform(self, point: Vec3f) -> Vec3f: ...
def __add__(self, arg0: Quatf) -> Quatf: ...
def __copy__(self) -> Quatf: ...
def __deepcopy__(self, memo: dict) -> Quatf: ...
def __eq__(self, arg0: Quatf) -> bool: ...
@typing.overload
def __getitem__(self, arg0: int) -> float: ...
@typing.overload
def __getitem__(self, arg0: slice) -> typing.List[float]: ...
def __iadd__(self, arg0: Quatf) -> Quatf: ...
@typing.overload
def __imul__(self, arg0: Quatf) -> Quatf: ...
@typing.overload
def __imul__(self, arg0: float) -> Quatf: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: float) -> None: ...
@typing.overload
def __init__(self, arg0: float, arg1: float, arg2: float, arg3: float) -> None: ...
@typing.overload
def __init__(self, arg0: float, arg1: Vec3f) -> None: ...
@typing.overload
def __init__(self, arg0: float, arg1: typing.Tuple[float, float, float]) -> None: ...
@typing.overload
def __init__(self, arg0: Quatd) -> None: ...
@typing.overload
def __init__(self, arg0: Quatf) -> None: ...
@staticmethod
@typing.overload
def __init__(*args, **kwargs) -> typing.Any: ...
@typing.overload
def __init__(self, arg0: buffer) -> None: ...
def __isub__(self, arg0: Quatf) -> Quatf: ...
def __itruediv__(self, arg0: float) -> Quatf: ...
def __len__(self) -> int: ...
@typing.overload
def __mul__(self, arg0: Quatf) -> Quatf: ...
@typing.overload
def __mul__(self, arg0: float) -> Quatf: ...
def __ne__(self, arg0: Quatf) -> bool: ...
def __neg__(self) -> Quatf: ...
def __repr__(self) -> str: ...
def __rmul__(self, arg0: float) -> Quatf: ...
@typing.overload
def __setitem__(self, arg0: int, arg1: float) -> None: ...
@typing.overload
def __setitem__(self, arg0: slice, arg1: typing.Sequence) -> None: ...
def __str__(self) -> str: ...
def __sub__(self, arg0: Quatf) -> Quatf: ...
def __truediv__(self, arg0: float) -> Quatf: ...
@property
def imaginary(self) -> Vec3f:
"""
:type: Vec3f
"""
@imaginary.setter
def imaginary(self, arg1: Vec3f) -> None:
pass
@property
def real(self) -> float:
"""
:type: float
"""
@real.setter
def real(self, arg1: float) -> None:
pass
__hash__ = None
pass
class Quath():
def Dot(self, arg0: Quath) -> GfHalf: ...
def GetConjugate(self) -> Quath: ...
@staticmethod
def GetIdentity() -> Quath: ...
def GetImaginary(self) -> Vec3h: ...
def GetInverse(self) -> Quath: ...
def GetLength(self) -> float: ...
def GetLengthSq(self) -> GfHalf: ...
def GetNormalized(self) -> Quath: ...
def GetReal(self) -> GfHalf: ...
def Normalize(self) -> float: ...
@typing.overload
def SetImaginary(self, imaginary: Vec3h) -> None: ...
@typing.overload
def SetImaginary(self, i: GfHalf, j: GfHalf, k: GfHalf) -> None: ...
def SetReal(self, real: GfHalf) -> None: ...
def Transform(self, point: Vec3h) -> Vec3h: ...
def __add__(self, arg0: Quath) -> Quath: ...
def __copy__(self) -> Quath: ...
def __deepcopy__(self, memo: dict) -> Quath: ...
def __eq__(self, arg0: Quath) -> bool: ...
@typing.overload
def __getitem__(self, arg0: int) -> GfHalf: ...
@typing.overload
def __getitem__(self, arg0: slice) -> typing.List[GfHalf]: ...
def __iadd__(self, arg0: Quath) -> Quath: ...
@typing.overload
def __imul__(self, arg0: Quath) -> Quath: ...
@typing.overload
def __imul__(self, arg0: GfHalf) -> Quath: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: GfHalf) -> None: ...
@typing.overload
def __init__(self, arg0: GfHalf, arg1: GfHalf, arg2: GfHalf, arg3: GfHalf) -> None: ...
@typing.overload
def __init__(self, arg0: GfHalf, arg1: Vec3h) -> None: ...
@typing.overload
def __init__(self, arg0: GfHalf, arg1: typing.Tuple[GfHalf, GfHalf, GfHalf]) -> None: ...
@typing.overload
def __init__(self, arg0: Quatd) -> None: ...
@typing.overload
def __init__(self, arg0: Quatf) -> None: ...
@typing.overload
def __init__(self, arg0: Quath) -> None: ...
@typing.overload
def __init__(self, arg0: buffer) -> None: ...
def __isub__(self, arg0: Quath) -> Quath: ...
def __itruediv__(self, arg0: GfHalf) -> Quath: ...
def __len__(self) -> int: ...
@typing.overload
def __mul__(self, arg0: Quath) -> Quath: ...
@typing.overload
def __mul__(self, arg0: GfHalf) -> Quath: ...
def __ne__(self, arg0: Quath) -> bool: ...
def __neg__(self) -> Quath: ...
def __repr__(self) -> str: ...
def __rmul__(self, arg0: GfHalf) -> Quath: ...
@typing.overload
def __setitem__(self, arg0: int, arg1: GfHalf) -> None: ...
@typing.overload
def __setitem__(self, arg0: slice, arg1: typing.Sequence) -> None: ...
def __str__(self) -> str: ...
def __sub__(self, arg0: Quath) -> Quath: ...
def __truediv__(self, arg0: GfHalf) -> Quath: ...
@property
def imaginary(self) -> Vec3h:
"""
:type: Vec3h
"""
@imaginary.setter
def imaginary(self, arg1: Vec3h) -> None:
pass
@property
def real(self) -> GfHalf:
"""
:type: GfHalf
"""
@real.setter
def real(self, arg1: GfHalf) -> None:
pass
__hash__ = None
pass
class Range1d():
@typing.overload
def Contains(self, arg0: float) -> bool: ...
@typing.overload
def Contains(self, arg0: Range1d) -> bool: ...
def GetDistanceSquared(self, arg0: float) -> float: ...
@staticmethod
def GetIntersection(arg0: Range1d, arg1: Range1d) -> Range1d: ...
def GetMax(self) -> float: ...
def GetMidpoint(self) -> float: ...
def GetMin(self) -> float: ...
def GetSize(self) -> float: ...
@staticmethod
def GetUnion(arg0: Range1d, arg1: Range1d) -> Range1d: ...
def IntersectWith(self, arg0: Range1d) -> Range1d: ...
def IsEmpty(self) -> bool: ...
def SetEmpty(self) -> None: ...
def SetMax(self, arg0: float) -> None: ...
def SetMin(self, arg0: float) -> None: ...
@typing.overload
def UnionWith(self, arg0: float) -> Range1d: ...
@typing.overload
def UnionWith(self, arg0: Range1d) -> Range1d: ...
def __add__(self, arg0: Range1d) -> Range1d: ...
def __copy__(self) -> Range1d: ...
def __deepcopy__(self, memo: dict) -> Range1d: ...
def __eq__(self, arg0: Range1d) -> bool: ...
def __iadd__(self, arg0: Range1d) -> Range1d: ...
def __imul__(self, arg0: float) -> Range1d: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: float) -> None: ...
@typing.overload
def __init__(self, arg0: Range1d) -> None: ...
@typing.overload
def __init__(self, arg0: float, arg1: float) -> None: ...
def __isub__(self, arg0: Range1d) -> Range1d: ...
def __itruediv__(self, arg0: float) -> Range1d: ...
def __mul__(self, arg0: float) -> Range1d: ...
def __ne__(self, arg0: Range1d) -> bool: ...
def __repr__(self) -> str: ...
def __rmul__(self, arg0: float) -> Range1d: ...
def __str__(self) -> str: ...
def __sub__(self, arg0: Range1d) -> Range1d: ...
def __truediv__(self, arg0: float) -> Range1d: ...
@property
def max(self) -> float:
"""
:type: float
"""
@max.setter
def max(self, arg1: float) -> None:
pass
@property
def min(self) -> float:
"""
:type: float
"""
@min.setter
def min(self, arg1: float) -> None:
pass
__hash__ = None
pass
class Range1f():
@typing.overload
def Contains(self, arg0: float) -> bool: ...
@typing.overload
def Contains(self, arg0: Range1f) -> bool: ...
def GetDistanceSquared(self, arg0: float) -> float: ...
@staticmethod
def GetIntersection(arg0: Range1f, arg1: Range1f) -> Range1f: ...
def GetMax(self) -> float: ...
def GetMidpoint(self) -> float: ...
def GetMin(self) -> float: ...
def GetSize(self) -> float: ...
@staticmethod
def GetUnion(arg0: Range1f, arg1: Range1f) -> Range1f: ...
def IntersectWith(self, arg0: Range1f) -> Range1f: ...
def IsEmpty(self) -> bool: ...
def SetEmpty(self) -> None: ...
def SetMax(self, arg0: float) -> None: ...
def SetMin(self, arg0: float) -> None: ...
@typing.overload
def UnionWith(self, arg0: float) -> Range1f: ...
@typing.overload
def UnionWith(self, arg0: Range1f) -> Range1f: ...
def __add__(self, arg0: Range1f) -> Range1f: ...
def __copy__(self) -> Range1f: ...
def __deepcopy__(self, memo: dict) -> Range1f: ...
def __eq__(self, arg0: Range1f) -> bool: ...
def __iadd__(self, arg0: Range1f) -> Range1f: ...
def __imul__(self, arg0: float) -> Range1f: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: float) -> None: ...
@typing.overload
def __init__(self, arg0: Range1f) -> None: ...
@typing.overload
def __init__(self, arg0: float, arg1: float) -> None: ...
def __isub__(self, arg0: Range1f) -> Range1f: ...
def __itruediv__(self, arg0: float) -> Range1f: ...
def __mul__(self, arg0: float) -> Range1f: ...
def __ne__(self, arg0: Range1f) -> bool: ...
def __repr__(self) -> str: ...
def __rmul__(self, arg0: float) -> Range1f: ...
def __str__(self) -> str: ...
def __sub__(self, arg0: Range1f) -> Range1f: ...
def __truediv__(self, arg0: float) -> Range1f: ...
@property
def max(self) -> float:
"""
:type: float
"""
@max.setter
def max(self, arg1: float) -> None:
pass
@property
def min(self) -> float:
"""
:type: float
"""
@min.setter
def min(self, arg1: float) -> None:
pass
__hash__ = None
pass
class Range2d():
@typing.overload
def Contains(self, arg0: Vec2d) -> bool: ...
@typing.overload
def Contains(self, arg0: Range2d) -> bool: ...
def GetCorner(self, arg0: int) -> Vec2d: ...
def GetDistanceSquared(self, arg0: Vec2d) -> float: ...
@staticmethod
def GetIntersection(arg0: Range2d, arg1: Range2d) -> Range2d: ...
def GetMax(self) -> Vec2d: ...
def GetMidpoint(self) -> Vec2d: ...
def GetMin(self) -> Vec2d: ...
def GetQuadrant(self, arg0: int) -> Range2d: ...
def GetSize(self) -> Vec2d: ...
@staticmethod
def GetUnion(arg0: Range2d, arg1: Range2d) -> Range2d: ...
def IntersectWith(self, arg0: Range2d) -> Range2d: ...
def IsEmpty(self) -> bool: ...
def SetEmpty(self) -> None: ...
def SetMax(self, arg0: Vec2d) -> None: ...
def SetMin(self, arg0: Vec2d) -> None: ...
@typing.overload
def UnionWith(self, arg0: Vec2d) -> Range2d: ...
@typing.overload
def UnionWith(self, arg0: Range2d) -> Range2d: ...
def __add__(self, arg0: Range2d) -> Range2d: ...
def __copy__(self) -> Range2d: ...
def __deepcopy__(self, memo: dict) -> Range2d: ...
def __eq__(self, arg0: Range2d) -> bool: ...
def __iadd__(self, arg0: Range2d) -> Range2d: ...
def __imul__(self, arg0: float) -> Range2d: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: float) -> None: ...
@typing.overload
def __init__(self, arg0: Range2d) -> None: ...
@typing.overload
def __init__(self, arg0: Vec2d, arg1: Vec2d) -> None: ...
def __isub__(self, arg0: Range2d) -> Range2d: ...
def __itruediv__(self, arg0: float) -> Range2d: ...
def __mul__(self, arg0: float) -> Range2d: ...
def __ne__(self, arg0: Range2d) -> bool: ...
def __repr__(self) -> str: ...
def __rmul__(self, arg0: float) -> Range2d: ...
def __str__(self) -> str: ...
def __sub__(self, arg0: Range2d) -> Range2d: ...
def __truediv__(self, arg0: float) -> Range2d: ...
@staticmethod
def unitSquare() -> Range2d: ...
@property
def max(self) -> Vec2d:
"""
:type: Vec2d
"""
@max.setter
def max(self, arg1: Vec2d) -> None:
pass
@property
def min(self) -> Vec2d:
"""
:type: Vec2d
"""
@min.setter
def min(self, arg1: Vec2d) -> None:
pass
__hash__ = None
pass
class Range2f():
@typing.overload
def Contains(self, arg0: Vec2f) -> bool: ...
@typing.overload
def Contains(self, arg0: Range2f) -> bool: ...
def GetCorner(self, arg0: int) -> Vec2f: ...
def GetDistanceSquared(self, arg0: Vec2f) -> float: ...
@staticmethod
def GetIntersection(arg0: Range2f, arg1: Range2f) -> Range2f: ...
def GetMax(self) -> Vec2f: ...
def GetMidpoint(self) -> Vec2f: ...
def GetMin(self) -> Vec2f: ...
def GetQuadrant(self, arg0: int) -> Range2f: ...
def GetSize(self) -> Vec2f: ...
@staticmethod
def GetUnion(arg0: Range2f, arg1: Range2f) -> Range2f: ...
def IntersectWith(self, arg0: Range2f) -> Range2f: ...
def IsEmpty(self) -> bool: ...
def SetEmpty(self) -> None: ...
def SetMax(self, arg0: Vec2f) -> None: ...
def SetMin(self, arg0: Vec2f) -> None: ...
@typing.overload
def UnionWith(self, arg0: Vec2f) -> Range2f: ...
@typing.overload
def UnionWith(self, arg0: Range2f) -> Range2f: ...
def __add__(self, arg0: Range2f) -> Range2f: ...
def __copy__(self) -> Range2f: ...
def __deepcopy__(self, memo: dict) -> Range2f: ...
def __eq__(self, arg0: Range2f) -> bool: ...
def __iadd__(self, arg0: Range2f) -> Range2f: ...
def __imul__(self, arg0: float) -> Range2f: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: float) -> None: ...
@typing.overload
def __init__(self, arg0: Range2f) -> None: ...
@typing.overload
def __init__(self, arg0: Vec2f, arg1: Vec2f) -> None: ...
def __isub__(self, arg0: Range2f) -> Range2f: ...
def __itruediv__(self, arg0: float) -> Range2f: ...
def __mul__(self, arg0: float) -> Range2f: ...
def __ne__(self, arg0: Range2f) -> bool: ...
def __repr__(self) -> str: ...
def __rmul__(self, arg0: float) -> Range2f: ...
def __str__(self) -> str: ...
def __sub__(self, arg0: Range2f) -> Range2f: ...
def __truediv__(self, arg0: float) -> Range2f: ...
@staticmethod
def unitSquare() -> Range2f: ...
@property
def max(self) -> Vec2f:
"""
:type: Vec2f
"""
@max.setter
def max(self, arg1: Vec2f) -> None:
pass
@property
def min(self) -> Vec2f:
"""
:type: Vec2f
"""
@min.setter
def min(self, arg1: Vec2f) -> None:
pass
__hash__ = None
pass
class Range3d():
@typing.overload
def Contains(self, arg0: Vec3d) -> bool: ...
@typing.overload
def Contains(self, arg0: Range3d) -> bool: ...
def GetCorner(self, arg0: int) -> Vec3d: ...
def GetDistanceSquared(self, arg0: Vec3d) -> float: ...
@staticmethod
def GetIntersection(arg0: Range3d, arg1: Range3d) -> Range3d: ...
def GetMax(self) -> Vec3d: ...
def GetMidpoint(self) -> Vec3d: ...
def GetMin(self) -> Vec3d: ...
def GetOctant(self, arg0: int) -> Range3d: ...
def GetSize(self) -> Vec3d: ...
@staticmethod
def GetUnion(arg0: Range3d, arg1: Range3d) -> Range3d: ...
def IntersectWith(self, arg0: Range3d) -> Range3d: ...
def IsEmpty(self) -> bool: ...
def SetEmpty(self) -> None: ...
def SetMax(self, arg0: Vec3d) -> None: ...
def SetMin(self, arg0: Vec3d) -> None: ...
@typing.overload
def UnionWith(self, arg0: Vec3d) -> Range3d: ...
@typing.overload
def UnionWith(self, arg0: Range3d) -> Range3d: ...
def __add__(self, arg0: Range3d) -> Range3d: ...
def __copy__(self) -> Range3d: ...
def __deepcopy__(self, memo: dict) -> Range3d: ...
def __eq__(self, arg0: Range3d) -> bool: ...
def __iadd__(self, arg0: Range3d) -> Range3d: ...
def __imul__(self, arg0: float) -> Range3d: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: float) -> None: ...
@typing.overload
def __init__(self, arg0: Range3d) -> None: ...
@typing.overload
def __init__(self, arg0: Vec3d, arg1: Vec3d) -> None: ...
def __isub__(self, arg0: Range3d) -> Range3d: ...
def __itruediv__(self, arg0: float) -> Range3d: ...
def __mul__(self, arg0: float) -> Range3d: ...
def __ne__(self, arg0: Range3d) -> bool: ...
def __repr__(self) -> str: ...
def __rmul__(self, arg0: float) -> Range3d: ...
def __str__(self) -> str: ...
def __sub__(self, arg0: Range3d) -> Range3d: ...
def __truediv__(self, arg0: float) -> Range3d: ...
@staticmethod
def unitCube() -> Range3d: ...
@property
def max(self) -> Vec3d:
"""
:type: Vec3d
"""
@max.setter
def max(self, arg1: Vec3d) -> None:
pass
@property
def min(self) -> Vec3d:
"""
:type: Vec3d
"""
@min.setter
def min(self, arg1: Vec3d) -> None:
pass
__hash__ = None
pass
class Range3f():
@typing.overload
def Contains(self, arg0: Vec3f) -> bool: ...
@typing.overload
def Contains(self, arg0: Range3f) -> bool: ...
def GetCorner(self, arg0: int) -> Vec3f: ...
def GetDistanceSquared(self, arg0: Vec3f) -> float: ...
@staticmethod
def GetIntersection(arg0: Range3f, arg1: Range3f) -> Range3f: ...
def GetMax(self) -> Vec3f: ...
def GetMidpoint(self) -> Vec3f: ...
def GetMin(self) -> Vec3f: ...
def GetOctant(self, arg0: int) -> Range3f: ...
def GetSize(self) -> Vec3f: ...
@staticmethod
def GetUnion(arg0: Range3f, arg1: Range3f) -> Range3f: ...
def IntersectWith(self, arg0: Range3f) -> Range3f: ...
def IsEmpty(self) -> bool: ...
def SetEmpty(self) -> None: ...
def SetMax(self, arg0: Vec3f) -> None: ...
def SetMin(self, arg0: Vec3f) -> None: ...
@typing.overload
def UnionWith(self, arg0: Vec3f) -> Range3f: ...
@typing.overload
def UnionWith(self, arg0: Range3f) -> Range3f: ...
def __add__(self, arg0: Range3f) -> Range3f: ...
def __copy__(self) -> Range3f: ...
def __deepcopy__(self, memo: dict) -> Range3f: ...
def __eq__(self, arg0: Range3f) -> bool: ...
def __iadd__(self, arg0: Range3f) -> Range3f: ...
def __imul__(self, arg0: float) -> Range3f: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: float) -> None: ...
@typing.overload
def __init__(self, arg0: Range3f) -> None: ...
@typing.overload
def __init__(self, arg0: Vec3f, arg1: Vec3f) -> None: ...
def __isub__(self, arg0: Range3f) -> Range3f: ...
def __itruediv__(self, arg0: float) -> Range3f: ...
def __mul__(self, arg0: float) -> Range3f: ...
def __ne__(self, arg0: Range3f) -> bool: ...
def __repr__(self) -> str: ...
def __rmul__(self, arg0: float) -> Range3f: ...
def __str__(self) -> str: ...
def __sub__(self, arg0: Range3f) -> Range3f: ...
def __truediv__(self, arg0: float) -> Range3f: ...
@staticmethod
def unitCube() -> Range3f: ...
@property
def max(self) -> Vec3f:
"""
:type: Vec3f
"""
@max.setter
def max(self, arg1: Vec3f) -> None:
pass
@property
def min(self) -> Vec3f:
"""
:type: Vec3f
"""
@min.setter
def min(self, arg1: Vec3f) -> None:
pass
__hash__ = None
pass
class Rect2i():
def Contains(self, arg0: Vec2i) -> bool: ...
def GetArea(self) -> int: ...
def GetCenter(self) -> Vec2i: ...
def GetHeight(self) -> int: ...
def GetIntersection(self, arg0: Rect2i) -> Rect2i: ...
def GetMax(self) -> Vec2i: ...
def GetMaxX(self) -> int: ...
def GetMaxY(self) -> int: ...
def GetMin(self) -> Vec2i: ...
def GetMinX(self) -> int: ...
def GetMinY(self) -> int: ...
def GetNormalized(self) -> Rect2i: ...
def GetSize(self) -> Vec2i: ...
def GetUnion(self, arg0: Rect2i) -> Rect2i: ...
def GetWidth(self) -> int: ...
def Intersect(self, arg0: Rect2i) -> Rect2i: ...
def IsEmpty(self) -> bool: ...
def IsNull(self) -> bool: ...
def IsValid(self) -> bool: ...
def SetMax(self, arg0: Vec2i) -> None: ...
def SetMaxX(self, arg0: int) -> None: ...
def SetMaxY(self, arg0: int) -> None: ...
def SetMin(self, arg0: Vec2i) -> None: ...
def SetMinX(self, arg0: int) -> None: ...
def SetMinY(self, arg0: int) -> None: ...
def Translate(self, arg0: Vec2i) -> None: ...
def Union(self, arg0: Rect2i) -> Rect2i: ...
def __add__(self, arg0: Rect2i) -> Rect2i: ...
def __copy__(self) -> Rect2i: ...
def __deepcopy__(self, memo: dict) -> Rect2i: ...
def __eq__(self, arg0: Rect2i) -> bool: ...
def __iadd__(self, arg0: Rect2i) -> Rect2i: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: Rect2i) -> None: ...
@typing.overload
def __init__(self, arg0: Vec2i, arg1: Vec2i) -> None: ...
@typing.overload
def __init__(self, arg0: Vec2i, arg1: int, arg2: int) -> None: ...
def __ne__(self, arg0: Rect2i) -> bool: ...
def __repr__(self) -> str: ...
def __str__(self) -> str: ...
@property
def area(self) -> int:
"""
:type: int
"""
@property
def center(self) -> Vec2i:
"""
:type: Vec2i
"""
@property
def height(self) -> int:
"""
:type: int
"""
@property
def max(self) -> Vec2i:
"""
:type: Vec2i
"""
@max.setter
def max(self, arg1: Vec2i) -> None:
pass
@property
def maxX(self) -> int:
"""
:type: int
"""
@maxX.setter
def maxX(self, arg1: int) -> None:
pass
@property
def maxY(self) -> int:
"""
:type: int
"""
@maxY.setter
def maxY(self, arg1: int) -> None:
pass
@property
def min(self) -> Vec2i:
"""
:type: Vec2i
"""
@min.setter
def min(self, arg1: Vec2i) -> None:
pass
@property
def minX(self) -> int:
"""
:type: int
"""
@minX.setter
def minX(self, arg1: int) -> None:
pass
@property
def minY(self) -> int:
"""
:type: int
"""
@minY.setter
def minY(self, arg1: int) -> None:
pass
@property
def size(self) -> Vec2i:
"""
:type: Vec2i
"""
@property
def width(self) -> int:
"""
:type: int
"""
__hash__ = None
pass
class Vec2d():
@staticmethod
def Axis(arg0: int) -> Vec2d: ...
def GetComplement(self, arg0: Vec2d) -> Vec2d: ...
def GetDot(self, arg0: Vec2d) -> float: ...
def GetLength(self) -> float: ...
def GetNormalized(self) -> Vec2d: ...
def GetProjection(self, arg0: Vec2d) -> Vec2d: ...
def Normalize(self) -> float: ...
@staticmethod
def XAxis() -> Vec2d: ...
@staticmethod
def YAxis() -> Vec2d: ...
def __add__(self, arg0: Vec2d) -> Vec2d: ...
def __copy__(self) -> Vec2d: ...
def __deepcopy__(self, memo: dict) -> Vec2d: ...
@typing.overload
def __eq__(self, arg0: Vec2d) -> bool: ...
@typing.overload
def __eq__(self, arg0: Vec2f) -> bool: ...
@staticmethod
@typing.overload
def __eq__(*args, **kwargs) -> typing.Any: ...
@typing.overload
def __getitem__(self, arg0: int) -> float: ...
@typing.overload
def __getitem__(self, arg0: slice) -> typing.List[float]: ...
def __iadd__(self, arg0: Vec2d) -> Vec2d: ...
def __imul__(self, arg0: float) -> Vec2d: ...
@staticmethod
@typing.overload
def __init__(*args, **kwargs) -> typing.Any: ...
@typing.overload
def __init__(self, arg0: Vec2f) -> None: ...
@typing.overload
def __init__(self, arg0: Vec2d) -> None: ...
@typing.overload
def __init__(self, arg0: float, arg1: float) -> None: ...
@typing.overload
def __init__(self, arg0: typing.Tuple[float, float]) -> None: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: float) -> None: ...
@typing.overload
def __init__(self, arg0: buffer) -> None: ...
def __isub__(self, arg0: Vec2d) -> Vec2d: ...
def __itruediv__(self, arg0: float) -> Vec2d: ...
def __len__(self) -> int: ...
@typing.overload
def __mul__(self, arg0: float) -> Vec2d: ...
@typing.overload
def __mul__(self, arg0: Vec2d) -> float: ...
@typing.overload
def __ne__(self, arg0: Vec2d) -> bool: ...
@typing.overload
def __ne__(self, arg0: Vec2f) -> bool: ...
@staticmethod
@typing.overload
def __ne__(*args, **kwargs) -> typing.Any: ...
def __neg__(self) -> Vec2d: ...
def __repr__(self) -> str: ...
def __rmul__(self, arg0: float) -> Vec2d: ...
@typing.overload
def __setitem__(self, arg0: int, arg1: float) -> None: ...
@typing.overload
def __setitem__(self, arg0: slice, arg1: typing.Sequence) -> None: ...
def __str__(self) -> str: ...
def __sub__(self, arg0: Vec2d) -> Vec2d: ...
def __truediv__(self, arg0: float) -> Vec2d: ...
__hash__ = None
__isGfVec = True
dimension = 2
pass
class Vec2f():
@staticmethod
def Axis(arg0: int) -> Vec2f: ...
def GetComplement(self, arg0: Vec2f) -> Vec2f: ...
def GetDot(self, arg0: Vec2f) -> float: ...
def GetLength(self) -> float: ...
def GetNormalized(self) -> Vec2f: ...
def GetProjection(self, arg0: Vec2f) -> Vec2f: ...
def Normalize(self) -> float: ...
@staticmethod
def XAxis() -> Vec2f: ...
@staticmethod
def YAxis() -> Vec2f: ...
def __add__(self, arg0: Vec2f) -> Vec2f: ...
def __copy__(self) -> Vec2f: ...
def __deepcopy__(self, memo: dict) -> Vec2f: ...
@typing.overload
def __eq__(self, arg0: Vec2f) -> bool: ...
@staticmethod
@typing.overload
def __eq__(*args, **kwargs) -> typing.Any: ...
@typing.overload
def __getitem__(self, arg0: int) -> float: ...
@typing.overload
def __getitem__(self, arg0: slice) -> typing.List[float]: ...
def __iadd__(self, arg0: Vec2f) -> Vec2f: ...
def __imul__(self, arg0: float) -> Vec2f: ...
@staticmethod
@typing.overload
def __init__(*args, **kwargs) -> typing.Any: ...
@typing.overload
def __init__(self, arg0: Vec2f) -> None: ...
@typing.overload
def __init__(self, arg0: float, arg1: float) -> None: ...
@typing.overload
def __init__(self, arg0: typing.Tuple[float, float]) -> None: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: float) -> None: ...
@typing.overload
def __init__(self, arg0: buffer) -> None: ...
def __isub__(self, arg0: Vec2f) -> Vec2f: ...
def __itruediv__(self, arg0: float) -> Vec2f: ...
def __len__(self) -> int: ...
@typing.overload
def __mul__(self, arg0: float) -> Vec2f: ...
@typing.overload
def __mul__(self, arg0: Vec2f) -> float: ...
@typing.overload
def __ne__(self, arg0: Vec2f) -> bool: ...
@staticmethod
@typing.overload
def __ne__(*args, **kwargs) -> typing.Any: ...
def __neg__(self) -> Vec2f: ...
def __repr__(self) -> str: ...
def __rmul__(self, arg0: float) -> Vec2f: ...
@typing.overload
def __setitem__(self, arg0: int, arg1: float) -> None: ...
@typing.overload
def __setitem__(self, arg0: slice, arg1: typing.Sequence) -> None: ...
def __str__(self) -> str: ...
def __sub__(self, arg0: Vec2f) -> Vec2f: ...
def __truediv__(self, arg0: float) -> Vec2f: ...
__hash__ = None
__isGfVec = True
dimension = 2
pass
class Vec2h():
@staticmethod
def Axis(arg0: int) -> Vec2h: ...
def GetComplement(self, arg0: Vec2h) -> Vec2h: ...
def GetDot(self, arg0: Vec2h) -> GfHalf: ...
def GetLength(self) -> float: ...
def GetNormalized(self) -> Vec2h: ...
def GetProjection(self, arg0: Vec2h) -> Vec2h: ...
def Normalize(self) -> float: ...
@staticmethod
def XAxis() -> Vec2h: ...
@staticmethod
def YAxis() -> Vec2h: ...
def __add__(self, arg0: Vec2h) -> Vec2h: ...
def __copy__(self) -> Vec2h: ...
def __deepcopy__(self, memo: dict) -> Vec2h: ...
@typing.overload
def __eq__(self, arg0: Vec2h) -> bool: ...
@typing.overload
def __eq__(self, arg0: Vec2i) -> bool: ...
@typing.overload
def __getitem__(self, arg0: int) -> GfHalf: ...
@typing.overload
def __getitem__(self, arg0: slice) -> typing.List[GfHalf]: ...
def __iadd__(self, arg0: Vec2h) -> Vec2h: ...
def __imul__(self, arg0: GfHalf) -> Vec2h: ...
@typing.overload
def __init__(self, arg0: Vec2i) -> None: ...
@typing.overload
def __init__(self, arg0: Vec2f) -> None: ...
@typing.overload
def __init__(self, arg0: Vec2d) -> None: ...
@typing.overload
def __init__(self, arg0: Vec2h) -> None: ...
@typing.overload
def __init__(self, arg0: GfHalf, arg1: GfHalf) -> None: ...
@typing.overload
def __init__(self, arg0: typing.Tuple[GfHalf, GfHalf]) -> None: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: GfHalf) -> None: ...
@typing.overload
def __init__(self, arg0: buffer) -> None: ...
def __isub__(self, arg0: Vec2h) -> Vec2h: ...
def __itruediv__(self, arg0: GfHalf) -> Vec2h: ...
def __len__(self) -> int: ...
@typing.overload
def __mul__(self, arg0: GfHalf) -> Vec2h: ...
@typing.overload
def __mul__(self, arg0: Vec2h) -> GfHalf: ...
@typing.overload
def __ne__(self, arg0: Vec2h) -> bool: ...
@typing.overload
def __ne__(self, arg0: Vec2i) -> bool: ...
def __neg__(self) -> Vec2h: ...
def __repr__(self) -> str: ...
def __rmul__(self, arg0: GfHalf) -> Vec2h: ...
@typing.overload
def __setitem__(self, arg0: int, arg1: GfHalf) -> None: ...
@typing.overload
def __setitem__(self, arg0: slice, arg1: typing.Sequence) -> None: ...
def __str__(self) -> str: ...
def __sub__(self, arg0: Vec2h) -> Vec2h: ...
def __truediv__(self, arg0: GfHalf) -> Vec2h: ...
__hash__ = None
__isGfVec = True
dimension = 2
pass
class Vec2i():
@staticmethod
def Axis(arg0: int) -> Vec2i: ...
def GetComplement(self, arg0: Vec2i) -> Vec2i: ...
def GetDot(self, arg0: Vec2i) -> int: ...
def GetLength(self) -> float: ...
def GetNormalized(self) -> Vec2i: ...
def GetProjection(self, arg0: Vec2i) -> Vec2i: ...
def Normalize(self) -> float: ...
@staticmethod
def XAxis() -> Vec2i: ...
@staticmethod
def YAxis() -> Vec2i: ...
def __add__(self, arg0: Vec2i) -> Vec2i: ...
def __copy__(self) -> Vec2i: ...
def __deepcopy__(self, memo: dict) -> Vec2i: ...
def __eq__(self, arg0: Vec2i) -> bool: ...
@typing.overload
def __getitem__(self, arg0: int) -> int: ...
@typing.overload
def __getitem__(self, arg0: slice) -> typing.List[int]: ...
def __iadd__(self, arg0: Vec2i) -> Vec2i: ...
def __imul__(self, arg0: int) -> Vec2i: ...
@typing.overload
def __init__(self, arg0: Vec2i) -> None: ...
@typing.overload
def __init__(self, arg0: Vec2f) -> None: ...
@typing.overload
def __init__(self, arg0: Vec2d) -> None: ...
@staticmethod
@typing.overload
def __init__(*args, **kwargs) -> typing.Any: ...
@typing.overload
def __init__(self, arg0: int, arg1: int) -> None: ...
@typing.overload
def __init__(self, arg0: typing.Tuple[int, int]) -> None: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: buffer) -> None: ...
def __isub__(self, arg0: Vec2i) -> Vec2i: ...
def __itruediv__(self, arg0: int) -> Vec2i: ...
def __len__(self) -> int: ...
@typing.overload
def __mul__(self, arg0: int) -> Vec2i: ...
@typing.overload
def __mul__(self, arg0: Vec2i) -> int: ...
def __ne__(self, arg0: Vec2i) -> bool: ...
def __neg__(self) -> Vec2i: ...
def __repr__(self) -> str: ...
def __rmul__(self, arg0: int) -> Vec2i: ...
@typing.overload
def __setitem__(self, arg0: int, arg1: int) -> None: ...
@typing.overload
def __setitem__(self, arg0: slice, arg1: typing.Sequence) -> None: ...
def __str__(self) -> str: ...
def __sub__(self, arg0: Vec2i) -> Vec2i: ...
def __truediv__(self, arg0: int) -> Vec2i: ...
__hash__ = None
__isGfVec = True
dimension = 2
pass
class Vec3d():
@staticmethod
def Axis(arg0: int) -> Vec3d: ...
def BuildOrthonormalFrame(self, eps: float = 1e-10) -> tuple: ...
def GetComplement(self, arg0: Vec3d) -> Vec3d: ...
def GetCross(self, arg0: Vec3d) -> Vec3d: ...
def GetDot(self, arg0: Vec3d) -> float: ...
def GetLength(self) -> float: ...
def GetNormalized(self) -> Vec3d: ...
def GetProjection(self, arg0: Vec3d) -> Vec3d: ...
def Normalize(self) -> float: ...
@staticmethod
def OrthogonalizeBasis(v1: Vec3d, v2: Vec3d, v3: Vec3d, normalize: bool = True) -> bool: ...
@staticmethod
def XAxis() -> Vec3d: ...
@staticmethod
def YAxis() -> Vec3d: ...
@staticmethod
def ZAxis() -> Vec3d: ...
def __add__(self, arg0: Vec3d) -> Vec3d: ...
def __copy__(self) -> Vec3d: ...
def __deepcopy__(self, memo: dict) -> Vec3d: ...
@typing.overload
def __eq__(self, arg0: Vec3d) -> bool: ...
@typing.overload
def __eq__(self, arg0: Vec3f) -> bool: ...
@staticmethod
@typing.overload
def __eq__(*args, **kwargs) -> typing.Any: ...
@typing.overload
def __getitem__(self, arg0: int) -> float: ...
@typing.overload
def __getitem__(self, arg0: slice) -> typing.List[float]: ...
def __iadd__(self, arg0: Vec3d) -> Vec3d: ...
def __imul__(self, arg0: float) -> Vec3d: ...
@staticmethod
@typing.overload
def __init__(*args, **kwargs) -> typing.Any: ...
@typing.overload
def __init__(self, arg0: Vec3f) -> None: ...
@typing.overload
def __init__(self, arg0: Vec3d) -> None: ...
@typing.overload
def __init__(self, arg0: float, arg1: float, arg2: float) -> None: ...
@typing.overload
def __init__(self, arg0: typing.Tuple[float, float, float]) -> None: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: float) -> None: ...
@typing.overload
def __init__(self, arg0: buffer) -> None: ...
def __isub__(self, arg0: Vec3d) -> Vec3d: ...
def __itruediv__(self, arg0: float) -> Vec3d: ...
def __len__(self) -> int: ...
@typing.overload
def __mul__(self, arg0: float) -> Vec3d: ...
@typing.overload
def __mul__(self, arg0: Vec3d) -> float: ...
@typing.overload
def __ne__(self, arg0: Vec3d) -> bool: ...
@typing.overload
def __ne__(self, arg0: Vec3f) -> bool: ...
@staticmethod
@typing.overload
def __ne__(*args, **kwargs) -> typing.Any: ...
def __neg__(self) -> Vec3d: ...
def __repr__(self) -> str: ...
def __rmul__(self, arg0: float) -> Vec3d: ...
@typing.overload
def __setitem__(self, arg0: int, arg1: float) -> None: ...
@typing.overload
def __setitem__(self, arg0: slice, arg1: typing.Sequence) -> None: ...
def __str__(self) -> str: ...
def __sub__(self, arg0: Vec3d) -> Vec3d: ...
def __truediv__(self, arg0: float) -> Vec3d: ...
def __xor__(self, arg0: Vec3d) -> Vec3d: ...
__hash__ = None
__isGfVec = True
dimension = 3
pass
class Vec3f():
@staticmethod
def Axis(arg0: int) -> Vec3f: ...
def BuildOrthonormalFrame(self, eps: float = 1e-10) -> tuple: ...
def GetComplement(self, arg0: Vec3f) -> Vec3f: ...
def GetCross(self, arg0: Vec3f) -> Vec3f: ...
def GetDot(self, arg0: Vec3f) -> float: ...
def GetLength(self) -> float: ...
def GetNormalized(self) -> Vec3f: ...
def GetProjection(self, arg0: Vec3f) -> Vec3f: ...
def Normalize(self) -> float: ...
@staticmethod
def OrthogonalizeBasis(v1: Vec3f, v2: Vec3f, v3: Vec3f, normalize: bool = True) -> bool: ...
@staticmethod
def XAxis() -> Vec3f: ...
@staticmethod
def YAxis() -> Vec3f: ...
@staticmethod
def ZAxis() -> Vec3f: ...
def __add__(self, arg0: Vec3f) -> Vec3f: ...
def __copy__(self) -> Vec3f: ...
def __deepcopy__(self, memo: dict) -> Vec3f: ...
@typing.overload
def __eq__(self, arg0: Vec3f) -> bool: ...
@staticmethod
@typing.overload
def __eq__(*args, **kwargs) -> typing.Any: ...
@typing.overload
def __getitem__(self, arg0: int) -> float: ...
@typing.overload
def __getitem__(self, arg0: slice) -> typing.List[float]: ...
def __iadd__(self, arg0: Vec3f) -> Vec3f: ...
def __imul__(self, arg0: float) -> Vec3f: ...
@staticmethod
@typing.overload
def __init__(*args, **kwargs) -> typing.Any: ...
@typing.overload
def __init__(self, arg0: Vec3f) -> None: ...
@typing.overload
def __init__(self, arg0: float, arg1: float, arg2: float) -> None: ...
@typing.overload
def __init__(self, arg0: typing.Tuple[float, float, float]) -> None: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: float) -> None: ...
@typing.overload
def __init__(self, arg0: buffer) -> None: ...
def __isub__(self, arg0: Vec3f) -> Vec3f: ...
def __itruediv__(self, arg0: float) -> Vec3f: ...
def __len__(self) -> int: ...
@typing.overload
def __mul__(self, arg0: float) -> Vec3f: ...
@typing.overload
def __mul__(self, arg0: Vec3f) -> float: ...
@typing.overload
def __ne__(self, arg0: Vec3f) -> bool: ...
@staticmethod
@typing.overload
def __ne__(*args, **kwargs) -> typing.Any: ...
def __neg__(self) -> Vec3f: ...
def __repr__(self) -> str: ...
def __rmul__(self, arg0: float) -> Vec3f: ...
@typing.overload
def __setitem__(self, arg0: int, arg1: float) -> None: ...
@typing.overload
def __setitem__(self, arg0: slice, arg1: typing.Sequence) -> None: ...
def __str__(self) -> str: ...
def __sub__(self, arg0: Vec3f) -> Vec3f: ...
def __truediv__(self, arg0: float) -> Vec3f: ...
def __xor__(self, arg0: Vec3f) -> Vec3f: ...
__hash__ = None
__isGfVec = True
dimension = 3
pass
class Vec3h():
@staticmethod
def Axis(arg0: int) -> Vec3h: ...
def BuildOrthonormalFrame(self, eps: float = 1e-10) -> tuple: ...
def GetComplement(self, arg0: Vec3h) -> Vec3h: ...
def GetCross(self, arg0: Vec3h) -> Vec3h: ...
def GetDot(self, arg0: Vec3h) -> GfHalf: ...
def GetLength(self) -> float: ...
def GetNormalized(self) -> Vec3h: ...
def GetProjection(self, arg0: Vec3h) -> Vec3h: ...
def Normalize(self) -> float: ...
@staticmethod
def OrthogonalizeBasis(v1: Vec3h, v2: Vec3h, v3: Vec3h, normalize: bool = True) -> bool: ...
@staticmethod
def XAxis() -> Vec3h: ...
@staticmethod
def YAxis() -> Vec3h: ...
@staticmethod
def ZAxis() -> Vec3h: ...
def __add__(self, arg0: Vec3h) -> Vec3h: ...
def __copy__(self) -> Vec3h: ...
def __deepcopy__(self, memo: dict) -> Vec3h: ...
@typing.overload
def __eq__(self, arg0: Vec3h) -> bool: ...
@typing.overload
def __eq__(self, arg0: Vec3i) -> bool: ...
@typing.overload
def __getitem__(self, arg0: int) -> GfHalf: ...
@typing.overload
def __getitem__(self, arg0: slice) -> typing.List[GfHalf]: ...
def __iadd__(self, arg0: Vec3h) -> Vec3h: ...
def __imul__(self, arg0: GfHalf) -> Vec3h: ...
@typing.overload
def __init__(self, arg0: Vec3i) -> None: ...
@typing.overload
def __init__(self, arg0: Vec3f) -> None: ...
@typing.overload
def __init__(self, arg0: Vec3d) -> None: ...
@typing.overload
def __init__(self, arg0: Vec3h) -> None: ...
@typing.overload
def __init__(self, arg0: GfHalf, arg1: GfHalf, arg2: GfHalf) -> None: ...
@typing.overload
def __init__(self, arg0: typing.Tuple[GfHalf, GfHalf, GfHalf]) -> None: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: GfHalf) -> None: ...
@typing.overload
def __init__(self, arg0: buffer) -> None: ...
def __isub__(self, arg0: Vec3h) -> Vec3h: ...
def __itruediv__(self, arg0: GfHalf) -> Vec3h: ...
def __len__(self) -> int: ...
@typing.overload
def __mul__(self, arg0: GfHalf) -> Vec3h: ...
@typing.overload
def __mul__(self, arg0: Vec3h) -> GfHalf: ...
@typing.overload
def __ne__(self, arg0: Vec3h) -> bool: ...
@typing.overload
def __ne__(self, arg0: Vec3i) -> bool: ...
def __neg__(self) -> Vec3h: ...
def __repr__(self) -> str: ...
def __rmul__(self, arg0: GfHalf) -> Vec3h: ...
@typing.overload
def __setitem__(self, arg0: int, arg1: GfHalf) -> None: ...
@typing.overload
def __setitem__(self, arg0: slice, arg1: typing.Sequence) -> None: ...
def __str__(self) -> str: ...
def __sub__(self, arg0: Vec3h) -> Vec3h: ...
def __truediv__(self, arg0: GfHalf) -> Vec3h: ...
def __xor__(self, arg0: Vec3h) -> Vec3h: ...
__hash__ = None
__isGfVec = True
dimension = 3
pass
class Vec3i():
@staticmethod
def Axis(arg0: int) -> Vec3i: ...
def BuildOrthonormalFrame(self, eps: float = 1e-10) -> tuple: ...
def GetComplement(self, arg0: Vec3i) -> Vec3i: ...
def GetCross(self, arg0: Vec3i) -> Vec3i: ...
def GetDot(self, arg0: Vec3i) -> int: ...
def GetLength(self) -> float: ...
def GetNormalized(self) -> Vec3i: ...
def GetProjection(self, arg0: Vec3i) -> Vec3i: ...
def Normalize(self) -> float: ...
@staticmethod
def OrthogonalizeBasis(v1: Vec3i, v2: Vec3i, v3: Vec3i, normalize: bool = True) -> bool: ...
@staticmethod
def XAxis() -> Vec3i: ...
@staticmethod
def YAxis() -> Vec3i: ...
@staticmethod
def ZAxis() -> Vec3i: ...
def __add__(self, arg0: Vec3i) -> Vec3i: ...
def __copy__(self) -> Vec3i: ...
def __deepcopy__(self, memo: dict) -> Vec3i: ...
def __eq__(self, arg0: Vec3i) -> bool: ...
@typing.overload
def __getitem__(self, arg0: int) -> int: ...
@typing.overload
def __getitem__(self, arg0: slice) -> typing.List[int]: ...
def __iadd__(self, arg0: Vec3i) -> Vec3i: ...
def __imul__(self, arg0: int) -> Vec3i: ...
@typing.overload
def __init__(self, arg0: Vec3i) -> None: ...
@typing.overload
def __init__(self, arg0: Vec3f) -> None: ...
@typing.overload
def __init__(self, arg0: Vec3d) -> None: ...
@staticmethod
@typing.overload
def __init__(*args, **kwargs) -> typing.Any: ...
@typing.overload
def __init__(self, arg0: int, arg1: int, arg2: int) -> None: ...
@typing.overload
def __init__(self, arg0: typing.Tuple[int, int, int]) -> None: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: buffer) -> None: ...
def __isub__(self, arg0: Vec3i) -> Vec3i: ...
def __itruediv__(self, arg0: int) -> Vec3i: ...
def __len__(self) -> int: ...
@typing.overload
def __mul__(self, arg0: int) -> Vec3i: ...
@typing.overload
def __mul__(self, arg0: Vec3i) -> int: ...
def __ne__(self, arg0: Vec3i) -> bool: ...
def __neg__(self) -> Vec3i: ...
def __repr__(self) -> str: ...
def __rmul__(self, arg0: int) -> Vec3i: ...
@typing.overload
def __setitem__(self, arg0: int, arg1: int) -> None: ...
@typing.overload
def __setitem__(self, arg0: slice, arg1: typing.Sequence) -> None: ...
def __str__(self) -> str: ...
def __sub__(self, arg0: Vec3i) -> Vec3i: ...
def __truediv__(self, arg0: int) -> Vec3i: ...
def __xor__(self, arg0: Vec3i) -> Vec3i: ...
__hash__ = None
__isGfVec = True
dimension = 3
pass
class Vec4d():
@staticmethod
def Axis(arg0: int) -> Vec4d: ...
def GetComplement(self, arg0: Vec4d) -> Vec4d: ...
def GetDot(self, arg0: Vec4d) -> float: ...
def GetLength(self) -> float: ...
def GetNormalized(self) -> Vec4d: ...
def GetProjection(self, arg0: Vec4d) -> Vec4d: ...
def Normalize(self) -> float: ...
@staticmethod
def WAxis() -> Vec4d: ...
@staticmethod
def XAxis() -> Vec4d: ...
@staticmethod
def YAxis() -> Vec4d: ...
@staticmethod
def ZAxis() -> Vec4d: ...
def __add__(self, arg0: Vec4d) -> Vec4d: ...
def __copy__(self) -> Vec4d: ...
def __deepcopy__(self, memo: dict) -> Vec4d: ...
@typing.overload
def __eq__(self, arg0: Vec4d) -> bool: ...
@typing.overload
def __eq__(self, arg0: Vec4f) -> bool: ...
@staticmethod
@typing.overload
def __eq__(*args, **kwargs) -> typing.Any: ...
@typing.overload
def __getitem__(self, arg0: int) -> float: ...
@typing.overload
def __getitem__(self, arg0: slice) -> typing.List[float]: ...
def __iadd__(self, arg0: Vec4d) -> Vec4d: ...
def __imul__(self, arg0: float) -> Vec4d: ...
@staticmethod
@typing.overload
def __init__(*args, **kwargs) -> typing.Any: ...
@typing.overload
def __init__(self, arg0: Vec4f) -> None: ...
@typing.overload
def __init__(self, arg0: Vec4d) -> None: ...
@typing.overload
def __init__(self, arg0: float, arg1: float, arg2: float, arg3: float) -> None: ...
@typing.overload
def __init__(self, arg0: typing.Tuple[float, float, float, float]) -> None: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: float) -> None: ...
@typing.overload
def __init__(self, arg0: buffer) -> None: ...
def __isub__(self, arg0: Vec4d) -> Vec4d: ...
def __itruediv__(self, arg0: float) -> Vec4d: ...
def __len__(self) -> int: ...
@typing.overload
def __mul__(self, arg0: float) -> Vec4d: ...
@typing.overload
def __mul__(self, arg0: Vec4d) -> float: ...
@typing.overload
def __ne__(self, arg0: Vec4d) -> bool: ...
@typing.overload
def __ne__(self, arg0: Vec4f) -> bool: ...
@staticmethod
@typing.overload
def __ne__(*args, **kwargs) -> typing.Any: ...
def __neg__(self) -> Vec4d: ...
def __repr__(self) -> str: ...
def __rmul__(self, arg0: float) -> Vec4d: ...
@typing.overload
def __setitem__(self, arg0: int, arg1: float) -> None: ...
@typing.overload
def __setitem__(self, arg0: slice, arg1: typing.Sequence) -> None: ...
def __str__(self) -> str: ...
def __sub__(self, arg0: Vec4d) -> Vec4d: ...
def __truediv__(self, arg0: float) -> Vec4d: ...
__hash__ = None
__isGfVec = True
dimension = 4
pass
class Vec4f():
@staticmethod
def Axis(arg0: int) -> Vec4f: ...
def GetComplement(self, arg0: Vec4f) -> Vec4f: ...
def GetDot(self, arg0: Vec4f) -> float: ...
def GetLength(self) -> float: ...
def GetNormalized(self) -> Vec4f: ...
def GetProjection(self, arg0: Vec4f) -> Vec4f: ...
def Normalize(self) -> float: ...
@staticmethod
def WAxis() -> Vec4f: ...
@staticmethod
def XAxis() -> Vec4f: ...
@staticmethod
def YAxis() -> Vec4f: ...
@staticmethod
def ZAxis() -> Vec4f: ...
def __add__(self, arg0: Vec4f) -> Vec4f: ...
def __copy__(self) -> Vec4f: ...
def __deepcopy__(self, memo: dict) -> Vec4f: ...
@typing.overload
def __eq__(self, arg0: Vec4f) -> bool: ...
@staticmethod
@typing.overload
def __eq__(*args, **kwargs) -> typing.Any: ...
@typing.overload
def __getitem__(self, arg0: int) -> float: ...
@typing.overload
def __getitem__(self, arg0: slice) -> typing.List[float]: ...
def __iadd__(self, arg0: Vec4f) -> Vec4f: ...
def __imul__(self, arg0: float) -> Vec4f: ...
@staticmethod
@typing.overload
def __init__(*args, **kwargs) -> typing.Any: ...
@typing.overload
def __init__(self, arg0: Vec4f) -> None: ...
@typing.overload
def __init__(self, arg0: float, arg1: float, arg2: float, arg3: float) -> None: ...
@typing.overload
def __init__(self, arg0: typing.Tuple[float, float, float, float]) -> None: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: float) -> None: ...
@typing.overload
def __init__(self, arg0: buffer) -> None: ...
def __isub__(self, arg0: Vec4f) -> Vec4f: ...
def __itruediv__(self, arg0: float) -> Vec4f: ...
def __len__(self) -> int: ...
@typing.overload
def __mul__(self, arg0: float) -> Vec4f: ...
@typing.overload
def __mul__(self, arg0: Vec4f) -> float: ...
@typing.overload
def __ne__(self, arg0: Vec4f) -> bool: ...
@staticmethod
@typing.overload
def __ne__(*args, **kwargs) -> typing.Any: ...
def __neg__(self) -> Vec4f: ...
def __repr__(self) -> str: ...
def __rmul__(self, arg0: float) -> Vec4f: ...
@typing.overload
def __setitem__(self, arg0: int, arg1: float) -> None: ...
@typing.overload
def __setitem__(self, arg0: slice, arg1: typing.Sequence) -> None: ...
def __str__(self) -> str: ...
def __sub__(self, arg0: Vec4f) -> Vec4f: ...
def __truediv__(self, arg0: float) -> Vec4f: ...
__hash__ = None
__isGfVec = True
dimension = 4
pass
class Vec4h():
@staticmethod
def Axis(arg0: int) -> Vec4h: ...
def GetComplement(self, arg0: Vec4h) -> Vec4h: ...
def GetDot(self, arg0: Vec4h) -> GfHalf: ...
def GetLength(self) -> float: ...
def GetNormalized(self) -> Vec4h: ...
def GetProjection(self, arg0: Vec4h) -> Vec4h: ...
def Normalize(self) -> float: ...
@staticmethod
def WAxis() -> Vec4h: ...
@staticmethod
def XAxis() -> Vec4h: ...
@staticmethod
def YAxis() -> Vec4h: ...
@staticmethod
def ZAxis() -> Vec4h: ...
def __add__(self, arg0: Vec4h) -> Vec4h: ...
def __copy__(self) -> Vec4h: ...
def __deepcopy__(self, memo: dict) -> Vec4h: ...
@typing.overload
def __eq__(self, arg0: Vec4h) -> bool: ...
@typing.overload
def __eq__(self, arg0: Vec4i) -> bool: ...
@typing.overload
def __getitem__(self, arg0: int) -> GfHalf: ...
@typing.overload
def __getitem__(self, arg0: slice) -> typing.List[GfHalf]: ...
def __iadd__(self, arg0: Vec4h) -> Vec4h: ...
def __imul__(self, arg0: GfHalf) -> Vec4h: ...
@typing.overload
def __init__(self, arg0: Vec4i) -> None: ...
@typing.overload
def __init__(self, arg0: Vec4f) -> None: ...
@typing.overload
def __init__(self, arg0: Vec4d) -> None: ...
@typing.overload
def __init__(self, arg0: Vec4h) -> None: ...
@typing.overload
def __init__(self, arg0: GfHalf, arg1: GfHalf, arg2: GfHalf, arg3: GfHalf) -> None: ...
@typing.overload
def __init__(self, arg0: typing.Tuple[GfHalf, GfHalf, GfHalf, GfHalf]) -> None: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: GfHalf) -> None: ...
@typing.overload
def __init__(self, arg0: buffer) -> None: ...
def __isub__(self, arg0: Vec4h) -> Vec4h: ...
def __itruediv__(self, arg0: GfHalf) -> Vec4h: ...
def __len__(self) -> int: ...
@typing.overload
def __mul__(self, arg0: GfHalf) -> Vec4h: ...
@typing.overload
def __mul__(self, arg0: Vec4h) -> GfHalf: ...
@typing.overload
def __ne__(self, arg0: Vec4h) -> bool: ...
@typing.overload
def __ne__(self, arg0: Vec4i) -> bool: ...
def __neg__(self) -> Vec4h: ...
def __repr__(self) -> str: ...
def __rmul__(self, arg0: GfHalf) -> Vec4h: ...
@typing.overload
def __setitem__(self, arg0: int, arg1: GfHalf) -> None: ...
@typing.overload
def __setitem__(self, arg0: slice, arg1: typing.Sequence) -> None: ...
def __str__(self) -> str: ...
def __sub__(self, arg0: Vec4h) -> Vec4h: ...
def __truediv__(self, arg0: GfHalf) -> Vec4h: ...
__hash__ = None
__isGfVec = True
dimension = 4
pass
class Vec4i():
@staticmethod
def Axis(arg0: int) -> Vec4i: ...
def GetComplement(self, arg0: Vec4i) -> Vec4i: ...
def GetDot(self, arg0: Vec4i) -> int: ...
def GetLength(self) -> float: ...
def GetNormalized(self) -> Vec4i: ...
def GetProjection(self, arg0: Vec4i) -> Vec4i: ...
def Normalize(self) -> float: ...
@staticmethod
def WAxis() -> Vec4i: ...
@staticmethod
def XAxis() -> Vec4i: ...
@staticmethod
def YAxis() -> Vec4i: ...
@staticmethod
def ZAxis() -> Vec4i: ...
def __add__(self, arg0: Vec4i) -> Vec4i: ...
def __copy__(self) -> Vec4i: ...
def __deepcopy__(self, memo: dict) -> Vec4i: ...
def __eq__(self, arg0: Vec4i) -> bool: ...
@typing.overload
def __getitem__(self, arg0: int) -> int: ...
@typing.overload
def __getitem__(self, arg0: slice) -> typing.List[int]: ...
def __iadd__(self, arg0: Vec4i) -> Vec4i: ...
def __imul__(self, arg0: int) -> Vec4i: ...
@typing.overload
def __init__(self, arg0: Vec4i) -> None: ...
@typing.overload
def __init__(self, arg0: Vec4f) -> None: ...
@typing.overload
def __init__(self, arg0: Vec4d) -> None: ...
@staticmethod
@typing.overload
def __init__(*args, **kwargs) -> typing.Any: ...
@typing.overload
def __init__(self, arg0: int, arg1: int, arg2: int, arg3: int) -> None: ...
@typing.overload
def __init__(self, arg0: typing.Tuple[int, int, int, int]) -> None: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: buffer) -> None: ...
def __isub__(self, arg0: Vec4i) -> Vec4i: ...
def __itruediv__(self, arg0: int) -> Vec4i: ...
def __len__(self) -> int: ...
@typing.overload
def __mul__(self, arg0: int) -> Vec4i: ...
@typing.overload
def __mul__(self, arg0: Vec4i) -> int: ...
def __ne__(self, arg0: Vec4i) -> bool: ...
def __neg__(self) -> Vec4i: ...
def __repr__(self) -> str: ...
def __rmul__(self, arg0: int) -> Vec4i: ...
@typing.overload
def __setitem__(self, arg0: int, arg1: int) -> None: ...
@typing.overload
def __setitem__(self, arg0: slice, arg1: typing.Sequence) -> None: ...
def __str__(self) -> str: ...
def __sub__(self, arg0: Vec4i) -> Vec4i: ...
def __truediv__(self, arg0: int) -> Vec4i: ...
__hash__ = None
__isGfVec = True
dimension = 4
pass
@typing.overload
def CompDiv(arg0: Vec2f, arg1: Vec2f) -> Vec2f:
pass
@typing.overload
def CompDiv(arg0: Vec2d, arg1: Vec2d) -> Vec2d:
pass
@typing.overload
def CompDiv(arg0: Vec2i, arg1: Vec2i) -> Vec2i:
pass
@typing.overload
def CompDiv(arg0: Vec2h, arg1: Vec2h) -> Vec2h:
pass
@typing.overload
def CompDiv(arg0: Vec3f, arg1: Vec3f) -> Vec3f:
pass
@typing.overload
def CompDiv(arg0: Vec3d, arg1: Vec3d) -> Vec3d:
pass
@typing.overload
def CompDiv(arg0: Vec3i, arg1: Vec3i) -> Vec3i:
pass
@typing.overload
def CompDiv(arg0: Vec3h, arg1: Vec3h) -> Vec3h:
pass
@typing.overload
def CompDiv(arg0: Vec4f, arg1: Vec4f) -> Vec4f:
pass
@typing.overload
def CompDiv(arg0: Vec4d, arg1: Vec4d) -> Vec4d:
pass
@typing.overload
def CompDiv(arg0: Vec4i, arg1: Vec4i) -> Vec4i:
pass
@typing.overload
def CompDiv(arg0: Vec4h, arg1: Vec4h) -> Vec4h:
pass
@typing.overload
def CompMult(arg0: Vec2f, arg1: Vec2f) -> Vec2f:
pass
@typing.overload
def CompMult(arg0: Vec2d, arg1: Vec2d) -> Vec2d:
pass
@typing.overload
def CompMult(arg0: Vec2i, arg1: Vec2i) -> Vec2i:
pass
@typing.overload
def CompMult(arg0: Vec2h, arg1: Vec2h) -> Vec2h:
pass
@typing.overload
def CompMult(arg0: Vec3f, arg1: Vec3f) -> Vec3f:
pass
@typing.overload
def CompMult(arg0: Vec3d, arg1: Vec3d) -> Vec3d:
pass
@typing.overload
def CompMult(arg0: Vec3i, arg1: Vec3i) -> Vec3i:
pass
@typing.overload
def CompMult(arg0: Vec3h, arg1: Vec3h) -> Vec3h:
pass
@typing.overload
def CompMult(arg0: Vec4f, arg1: Vec4f) -> Vec4f:
pass
@typing.overload
def CompMult(arg0: Vec4d, arg1: Vec4d) -> Vec4d:
pass
@typing.overload
def CompMult(arg0: Vec4i, arg1: Vec4i) -> Vec4i:
pass
@typing.overload
def CompMult(arg0: Vec4h, arg1: Vec4h) -> Vec4h:
pass
@typing.overload
def Cross(arg0: Vec3f, arg1: Vec3f) -> Vec3f:
pass
@typing.overload
def Cross(arg0: Vec3d, arg1: Vec3d) -> Vec3d:
pass
@typing.overload
def Cross(arg0: Vec3i, arg1: Vec3i) -> Vec3i:
pass
@typing.overload
def Cross(arg0: Vec3h, arg1: Vec3h) -> Vec3h:
pass
def DegreesToRadians(arg0: float) -> float:
pass
@typing.overload
def Dot(arg0: Vec2f, arg1: Vec2f) -> float:
pass
@typing.overload
def Dot(arg0: Vec2d, arg1: Vec2d) -> float:
pass
@typing.overload
def Dot(arg0: Vec2i, arg1: Vec2i) -> int:
pass
@typing.overload
def Dot(arg0: Vec2h, arg1: Vec2h) -> GfHalf:
pass
@typing.overload
def Dot(arg0: Vec3f, arg1: Vec3f) -> float:
pass
@typing.overload
def Dot(arg0: Vec3d, arg1: Vec3d) -> float:
pass
@typing.overload
def Dot(arg0: Vec3i, arg1: Vec3i) -> int:
pass
@typing.overload
def Dot(arg0: Vec3h, arg1: Vec3h) -> GfHalf:
pass
@typing.overload
def Dot(arg0: Vec4f, arg1: Vec4f) -> float:
pass
@typing.overload
def Dot(arg0: Vec4d, arg1: Vec4d) -> float:
pass
@typing.overload
def Dot(arg0: Vec4i, arg1: Vec4i) -> int:
pass
@typing.overload
def Dot(arg0: Vec4h, arg1: Vec4h) -> GfHalf:
pass
@typing.overload
def Dot(arg0: Quatd, arg1: Quatd) -> float:
pass
@typing.overload
def Dot(arg0: Quatf, arg1: Quatf) -> float:
pass
@typing.overload
def Dot(arg0: Quath, arg1: Quath) -> GfHalf:
pass
@typing.overload
def GetComplement(arg0: Vec2f, arg1: Vec2f) -> Vec2f:
pass
@typing.overload
def GetComplement(arg0: Vec2d, arg1: Vec2d) -> Vec2d:
pass
@typing.overload
def GetComplement(arg0: Vec2i, arg1: Vec2i) -> Vec2i:
pass
@typing.overload
def GetComplement(arg0: Vec2h, arg1: Vec2h) -> Vec2h:
pass
@typing.overload
def GetComplement(arg0: Vec3f, arg1: Vec3f) -> Vec3f:
pass
@typing.overload
def GetComplement(arg0: Vec3d, arg1: Vec3d) -> Vec3d:
pass
@typing.overload
def GetComplement(arg0: Vec3i, arg1: Vec3i) -> Vec3i:
pass
@typing.overload
def GetComplement(arg0: Vec3h, arg1: Vec3h) -> Vec3h:
pass
@typing.overload
def GetComplement(arg0: Vec4f, arg1: Vec4f) -> Vec4f:
pass
@typing.overload
def GetComplement(arg0: Vec4d, arg1: Vec4d) -> Vec4d:
pass
@typing.overload
def GetComplement(arg0: Vec4i, arg1: Vec4i) -> Vec4i:
pass
@typing.overload
def GetComplement(arg0: Vec4h, arg1: Vec4h) -> Vec4h:
pass
@typing.overload
def GetLength(arg0: Vec2f) -> float:
pass
@typing.overload
def GetLength(arg0: Vec2d) -> float:
pass
@typing.overload
def GetLength(arg0: Vec2i) -> float:
pass
@typing.overload
def GetLength(arg0: Vec2h) -> float:
pass
@typing.overload
def GetLength(arg0: Vec3f) -> float:
pass
@typing.overload
def GetLength(arg0: Vec3d) -> float:
pass
@typing.overload
def GetLength(arg0: Vec3i) -> float:
pass
@typing.overload
def GetLength(arg0: Vec3h) -> float:
pass
@typing.overload
def GetLength(arg0: Vec4f) -> float:
pass
@typing.overload
def GetLength(arg0: Vec4d) -> float:
pass
@typing.overload
def GetLength(arg0: Vec4i) -> float:
pass
@typing.overload
def GetLength(arg0: Vec4h) -> float:
pass
@typing.overload
def GetNormalized(arg0: Vec2f) -> Vec2f:
pass
@typing.overload
def GetNormalized(arg0: Vec2d) -> Vec2d:
pass
@typing.overload
def GetNormalized(arg0: Vec2i) -> Vec2i:
pass
@typing.overload
def GetNormalized(arg0: Vec2h) -> Vec2h:
pass
@typing.overload
def GetNormalized(arg0: Vec3f) -> Vec3f:
pass
@typing.overload
def GetNormalized(arg0: Vec3d) -> Vec3d:
pass
@typing.overload
def GetNormalized(arg0: Vec3i) -> Vec3i:
pass
@typing.overload
def GetNormalized(arg0: Vec3h) -> Vec3h:
pass
@typing.overload
def GetNormalized(arg0: Vec4f) -> Vec4f:
pass
@typing.overload
def GetNormalized(arg0: Vec4d) -> Vec4d:
pass
@typing.overload
def GetNormalized(arg0: Vec4i) -> Vec4i:
pass
@typing.overload
def GetNormalized(arg0: Vec4h) -> Vec4h:
pass
@typing.overload
def GetProjection(arg0: Vec2f, arg1: Vec2f) -> Vec2f:
pass
@typing.overload
def GetProjection(arg0: Vec2d, arg1: Vec2d) -> Vec2d:
pass
@typing.overload
def GetProjection(arg0: Vec2i, arg1: Vec2i) -> Vec2i:
pass
@typing.overload
def GetProjection(arg0: Vec2h, arg1: Vec2h) -> Vec2h:
pass
@typing.overload
def GetProjection(arg0: Vec3f, arg1: Vec3f) -> Vec3f:
pass
@typing.overload
def GetProjection(arg0: Vec3d, arg1: Vec3d) -> Vec3d:
pass
@typing.overload
def GetProjection(arg0: Vec3i, arg1: Vec3i) -> Vec3i:
pass
@typing.overload
def GetProjection(arg0: Vec3h, arg1: Vec3h) -> Vec3h:
pass
@typing.overload
def GetProjection(arg0: Vec4f, arg1: Vec4f) -> Vec4f:
pass
@typing.overload
def GetProjection(arg0: Vec4d, arg1: Vec4d) -> Vec4d:
pass
@typing.overload
def GetProjection(arg0: Vec4i, arg1: Vec4i) -> Vec4i:
pass
@typing.overload
def GetProjection(arg0: Vec4h, arg1: Vec4h) -> Vec4h:
pass
@typing.overload
def IsClose(arg0: float, arg1: float, arg2: float) -> bool:
pass
@typing.overload
def IsClose(arg0: Vec2f, arg1: Vec2f, arg2: float) -> bool:
pass
@typing.overload
def IsClose(arg0: Vec2d, arg1: Vec2d, arg2: float) -> bool:
pass
@typing.overload
def IsClose(arg0: Vec2i, arg1: Vec2i, arg2: float) -> bool:
pass
@typing.overload
def IsClose(arg0: Vec2h, arg1: Vec2h, arg2: float) -> bool:
pass
@typing.overload
def IsClose(arg0: Vec3f, arg1: Vec3f, arg2: float) -> bool:
pass
@typing.overload
def IsClose(arg0: Vec3d, arg1: Vec3d, arg2: float) -> bool:
pass
@typing.overload
def IsClose(arg0: Vec3i, arg1: Vec3i, arg2: float) -> bool:
pass
@typing.overload
def IsClose(arg0: Vec3h, arg1: Vec3h, arg2: float) -> bool:
pass
@typing.overload
def IsClose(arg0: Vec4f, arg1: Vec4f, arg2: float) -> bool:
pass
@typing.overload
def IsClose(arg0: Vec4d, arg1: Vec4d, arg2: float) -> bool:
pass
@typing.overload
def IsClose(arg0: Vec4i, arg1: Vec4i, arg2: float) -> bool:
pass
@typing.overload
def IsClose(arg0: Vec4h, arg1: Vec4h, arg2: float) -> bool:
pass
@typing.overload
def IsClose(arg0: Matrix4d, arg1: Matrix4d, arg2: float) -> bool:
pass
@typing.overload
def IsClose(arg0: Matrix4f, arg1: Matrix4f, arg2: float) -> bool:
pass
@typing.overload
def IsClose(arg0: Quatd, arg1: Quatd, arg2: float) -> bool:
pass
@typing.overload
def IsClose(arg0: Quatf, arg1: Quatf, arg2: float) -> bool:
pass
@typing.overload
def IsClose(arg0: Quath, arg1: Quath, arg2: float) -> bool:
pass
@typing.overload
def Lerp(alpha: float, a: float, b: float) -> float:
pass
@typing.overload
def Lerp(alpha: float, a: Vec2f, b: Vec2f) -> Vec2f:
pass
@typing.overload
def Lerp(alpha: float, a: Vec2d, b: Vec2d) -> Vec2d:
pass
@typing.overload
def Lerp(alpha: float, a: Vec2i, b: Vec2i) -> Vec2i:
pass
@typing.overload
def Lerp(alpha: float, a: Vec2h, b: Vec2h) -> Vec2h:
pass
@typing.overload
def Lerp(alpha: float, a: Vec3f, b: Vec3f) -> Vec3f:
pass
@typing.overload
def Lerp(alpha: float, a: Vec3d, b: Vec3d) -> Vec3d:
pass
@typing.overload
def Lerp(alpha: float, a: Vec3i, b: Vec3i) -> Vec3i:
pass
@typing.overload
def Lerp(alpha: float, a: Vec3h, b: Vec3h) -> Vec3h:
pass
@typing.overload
def Lerp(alpha: float, a: Vec4f, b: Vec4f) -> Vec4f:
pass
@typing.overload
def Lerp(alpha: float, a: Vec4d, b: Vec4d) -> Vec4d:
pass
@typing.overload
def Lerp(alpha: float, a: Vec4i, b: Vec4i) -> Vec4i:
pass
@typing.overload
def Lerp(alpha: float, a: Vec4h, b: Vec4h) -> Vec4h:
pass
def Lerpf(alpha: float, a: float, b: float) -> float:
pass
@typing.overload
def Max(arg0: float, arg1: float) -> float:
pass
@typing.overload
def Max(arg0: float, arg1: float, arg2: float) -> float:
pass
@typing.overload
def Max(arg0: float, arg1: float, arg2: float, arg3: float) -> float:
pass
@typing.overload
def Max(arg0: float, arg1: float, arg2: float, arg3: float, arg4: float) -> float:
pass
@typing.overload
def Max(arg0: int, arg1: int) -> int:
pass
@typing.overload
def Max(arg0: int, arg1: int, arg2: int) -> int:
pass
@typing.overload
def Max(arg0: int, arg1: int, arg2: int, arg3: int) -> int:
pass
@typing.overload
def Max(arg0: int, arg1: int, arg2: int, arg3: int, arg4: int) -> int:
pass
@typing.overload
def Min(arg0: float, arg1: float) -> float:
pass
@typing.overload
def Min(arg0: float, arg1: float, arg2: float) -> float:
pass
@typing.overload
def Min(arg0: float, arg1: float, arg2: float, arg3: float) -> float:
pass
@typing.overload
def Min(arg0: float, arg1: float, arg2: float, arg3: float, arg4: float) -> float:
pass
@typing.overload
def Min(arg0: int, arg1: int) -> int:
pass
@typing.overload
def Min(arg0: int, arg1: int, arg2: int) -> int:
pass
@typing.overload
def Min(arg0: int, arg1: int, arg2: int, arg3: int) -> int:
pass
@typing.overload
def Min(arg0: int, arg1: int, arg2: int, arg3: int, arg4: int) -> int:
pass
@typing.overload
def Normalize(arg0: Vec2f) -> float:
pass
@typing.overload
def Normalize(arg0: Vec2d) -> float:
pass
@typing.overload
def Normalize(arg0: Vec2i) -> float:
pass
@typing.overload
def Normalize(arg0: Vec2h) -> float:
pass
@typing.overload
def Normalize(arg0: Vec3f) -> float:
pass
@typing.overload
def Normalize(arg0: Vec3d) -> float:
pass
@typing.overload
def Normalize(arg0: Vec3i) -> float:
pass
@typing.overload
def Normalize(arg0: Vec3h) -> float:
pass
@typing.overload
def Normalize(arg0: Vec4f) -> float:
pass
@typing.overload
def Normalize(arg0: Vec4d) -> float:
pass
@typing.overload
def Normalize(arg0: Vec4i) -> float:
pass
@typing.overload
def Normalize(arg0: Vec4h) -> float:
pass
def RadiansToDegrees(arg0: float) -> float:
pass
@typing.overload
def Slerp(alpha: float, v1: Vec2f, v2: Vec2f) -> Vec2f:
pass
@typing.overload
def Slerp(alpha: float, v1: Vec2d, v2: Vec2d) -> Vec2d:
pass
@typing.overload
def Slerp(alpha: float, v1: Vec2i, v2: Vec2i) -> Vec2i:
pass
@typing.overload
def Slerp(alpha: float, v1: Vec2h, v2: Vec2h) -> Vec2h:
pass
@typing.overload
def Slerp(alpha: float, v1: Vec3f, v2: Vec3f) -> Vec3f:
pass
@typing.overload
def Slerp(alpha: float, v1: Vec3d, v2: Vec3d) -> Vec3d:
pass
@typing.overload
def Slerp(alpha: float, v1: Vec3i, v2: Vec3i) -> Vec3i:
pass
@typing.overload
def Slerp(alpha: float, v1: Vec3h, v2: Vec3h) -> Vec3h:
pass
@typing.overload
def Slerp(alpha: float, v1: Vec4f, v2: Vec4f) -> Vec4f:
pass
@typing.overload
def Slerp(alpha: float, v1: Vec4d, v2: Vec4d) -> Vec4d:
pass
@typing.overload
def Slerp(alpha: float, v1: Vec4i, v2: Vec4i) -> Vec4i:
pass
@typing.overload
def Slerp(alpha: float, v1: Vec4h, v2: Vec4h) -> Vec4h:
pass
@typing.overload
def Slerp(arg0: float, arg1: Quatd, arg2: Quatd) -> Quatd:
pass
@typing.overload
def Slerp(arg0: float, arg1: Quatf, arg2: Quatf) -> Quatf:
pass
@typing.overload
def Slerp(arg0: float, arg1: Quath, arg2: Quath) -> Quath:
pass
| 88,989 | unknown | 33.41222 | 249 | 0.566182 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/ForceFieldSchema/__init__.py | __copyright__ = "Copyright (c) 2020-2021, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import omni.core
# TODO: auto-load requirements
from usdrt import Sdf
from ._ForceFieldSchema import *
| 561 | Python | 34.124998 | 83 | 0.798574 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/ForceFieldSchema/_ForceFieldSchema.pyi | from __future__ import annotations
import usdrt.ForceFieldSchema._ForceFieldSchema
import typing
import usdrt.Usd._Usd
__all__ = [
"PhysxForceFieldAPI",
"PhysxForceFieldConicalAPI",
"PhysxForceFieldDragAPI",
"PhysxForceFieldLinearAPI",
"PhysxForceFieldNoiseAPI",
"PhysxForceFieldPlanarAPI",
"PhysxForceFieldRingAPI",
"PhysxForceFieldSphericalAPI",
"PhysxForceFieldSpinAPI",
"PhysxForceFieldWindAPI",
"Tokens"
]
class PhysxForceFieldAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreatePositionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateRangeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSurfaceAreaScaleEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSurfaceSampleDensityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPositionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetRangeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSurfaceAreaScaleEnabledAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSurfaceSampleDensityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim, arg1: TfToken) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase, arg1: TfToken) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxForceFieldConicalAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateAngleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateConstantAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDirectionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateInverseSquareAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLinearAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLinearFalloffAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreatePowerFalloffAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetAngleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetConstantAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDirectionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetInverseSquareAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLinearAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLinearFalloffAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPowerFalloffAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim, arg1: TfToken) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase, arg1: TfToken) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxForceFieldDragAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateLinearAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMinimumSpeedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSquareAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLinearAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMinimumSpeedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSquareAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim, arg1: TfToken) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase, arg1: TfToken) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxForceFieldLinearAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateConstantAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDirectionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateInverseSquareAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLinearAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetConstantAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDirectionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetInverseSquareAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLinearAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim, arg1: TfToken) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase, arg1: TfToken) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxForceFieldNoiseAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateAmplitudeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDragAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateFrequencyAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetAmplitudeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDragAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFrequencyAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim, arg1: TfToken) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase, arg1: TfToken) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxForceFieldPlanarAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateConstantAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateInverseSquareAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLinearAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateNormalAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetConstantAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetInverseSquareAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLinearAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetNormalAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim, arg1: TfToken) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase, arg1: TfToken) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxForceFieldRingAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateConstantAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateInverseSquareAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLinearAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateNormalAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateRadiusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSpinConstantAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSpinInverseSquareAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSpinLinearAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetConstantAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetInverseSquareAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLinearAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetNormalAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetRadiusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSpinConstantAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSpinInverseSquareAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSpinLinearAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim, arg1: TfToken) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase, arg1: TfToken) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxForceFieldSphericalAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateConstantAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateInverseSquareAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLinearAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetConstantAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetInverseSquareAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLinearAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim, arg1: TfToken) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase, arg1: TfToken) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxForceFieldSpinAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateConstantAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateInverseSquareAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLinearAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSpinAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetConstantAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetInverseSquareAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLinearAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSpinAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim, arg1: TfToken) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase, arg1: TfToken) -> None: ...
def __repr__(self) -> str: ...
pass
class PhysxForceFieldWindAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateAverageDirectionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateAverageSpeedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDirectionVariationAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDirectionVariationFrequencyAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDragAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSpeedVariationAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSpeedVariationFrequencyAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetAverageDirectionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetAverageSpeedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDirectionVariationAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDirectionVariationFrequencyAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDragAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSpeedVariationAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetSpeedVariationFrequencyAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim, arg1: TfToken) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase, arg1: TfToken) -> None: ...
def __repr__(self) -> str: ...
pass
class Tokens():
forceFieldBodies = 'forceFieldBodies'
physxForceField = 'physxForceField'
physxForceFieldConicalAngle = 'physxForceFieldConical:angle'
physxForceFieldConicalConstant = 'physxForceFieldConical:constant'
physxForceFieldConicalInverseSquare = 'physxForceFieldConical:inverseSquare'
physxForceFieldConicalLinear = 'physxForceFieldConical:linear'
physxForceFieldConicalLinearFalloff = 'physxForceFieldConical:linearFalloff'
physxForceFieldConicalPowerFalloff = 'physxForceFieldConical:powerFalloff'
physxForceFieldDragLinear = 'physxForceFieldDrag:linear'
physxForceFieldDragMinimumSpeed = 'physxForceFieldDrag:minimumSpeed'
physxForceFieldDragSquare = 'physxForceFieldDrag:square'
physxForceFieldEnabled = 'physxForceField:enabled'
physxForceFieldLinearConstant = 'physxForceFieldLinear:constant'
physxForceFieldLinearDirection = 'physxForceFieldLinear:direction'
physxForceFieldLinearInverseSquare = 'physxForceFieldLinear:inverseSquare'
physxForceFieldLinearLinear = 'physxForceFieldLinear:linear'
physxForceFieldNoiseAmplitude = 'physxForceFieldNoise:amplitude'
physxForceFieldNoiseDrag = 'physxForceFieldNoise:drag'
physxForceFieldNoiseFrequency = 'physxForceFieldNoise:frequency'
physxForceFieldPlanarConstant = 'physxForceFieldPlanar:constant'
physxForceFieldPlanarInverseSquare = 'physxForceFieldPlanar:inverseSquare'
physxForceFieldPlanarLinear = 'physxForceFieldPlanar:linear'
physxForceFieldPlanarNormal = 'physxForceFieldPlanar:normal'
physxForceFieldPosition = 'physxForceField:position'
physxForceFieldRange = 'physxForceField:range'
physxForceFieldRingConstant = 'physxForceFieldRing:constant'
physxForceFieldRingInverseSquare = 'physxForceFieldRing:inverseSquare'
physxForceFieldRingLinear = 'physxForceFieldRing:linear'
physxForceFieldRingNormalAxis = 'physxForceFieldRing:normalAxis'
physxForceFieldRingRadius = 'physxForceFieldRing:radius'
physxForceFieldRingSpinConstant = 'physxForceFieldRing:spinConstant'
physxForceFieldRingSpinInverseSquare = 'physxForceFieldRing:spinInverseSquare'
physxForceFieldRingSpinLinear = 'physxForceFieldRing:spinLinear'
physxForceFieldSphericalConstant = 'physxForceFieldSpherical:constant'
physxForceFieldSphericalInverseSquare = 'physxForceFieldSpherical:inverseSquare'
physxForceFieldSphericalLinear = 'physxForceFieldSpherical:linear'
physxForceFieldSpinConstant = 'physxForceFieldSpin:constant'
physxForceFieldSpinInverseSquare = 'physxForceFieldSpin:inverseSquare'
physxForceFieldSpinLinear = 'physxForceFieldSpin:linear'
physxForceFieldSpinSpinAxis = 'physxForceFieldSpin:spinAxis'
physxForceFieldSurfaceAreaScaleEnabled = 'physxForceField:surfaceAreaScaleEnabled'
physxForceFieldSurfaceSampleDensity = 'physxForceField:surfaceSampleDensity'
physxForceFieldWindAverageDirection = 'physxForceFieldWind:averageDirection'
physxForceFieldWindAverageSpeed = 'physxForceFieldWind:averageSpeed'
physxForceFieldWindDirectionVariation = 'physxForceFieldWind:directionVariation'
physxForceFieldWindDirectionVariationFrequency = 'physxForceFieldWind:directionVariationFrequency'
physxForceFieldWindDrag = 'physxForceFieldWind:drag'
physxForceFieldWindSpeedVariation = 'physxForceFieldWind:speedVariation'
physxForceFieldWindSpeedVariationFrequency = 'physxForceFieldWind:speedVariationFrequency'
pass
| 14,685 | unknown | 53.798507 | 102 | 0.704869 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/UsdShade/__init__.py | __copyright__ = "Copyright (c) 2020-2021, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import omni.core
# TODO: auto-load requirements
from usdrt import Sdf
from ._UsdShade import *
| 553 | Python | 33.624998 | 83 | 0.79566 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/UsdShade/_UsdShade.pyi | from __future__ import annotations
import usdrt.UsdShade._UsdShade
import typing
import usdrt.Sdf._Sdf
import usdrt.Usd._Usd
__all__ = [
"ConnectableAPI",
"CoordSysAPI",
"Material",
"MaterialBindingAPI",
"NodeDefAPI",
"NodeGraph",
"Shader",
"Tokens"
]
class ConnectableAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class CoordSysAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Material(NodeGraph, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateDisplacementAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSurfaceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateVolumeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> Material: ...
def GetDisplacementAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSurfaceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetVolumeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class MaterialBindingAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class NodeDefAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateIdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateImplementationSourceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetIdAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetImplementationSourceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class NodeGraph(usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> NodeGraph: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Shader(usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> Shader: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Tokens():
allPurpose = ''
bindMaterialAs = 'bindMaterialAs'
coordSys = 'coordSys:'
displacement = 'displacement'
fallbackStrength = 'fallbackStrength'
full = 'full'
id = 'id'
infoId = 'info:id'
infoImplementationSource = 'info:implementationSource'
inputs = 'inputs:'
interfaceOnly = 'interfaceOnly'
materialBind = 'materialBind'
materialBinding = 'material:binding'
materialBindingCollection = 'material:binding:collection'
materialVariant = 'materialVariant'
outputs = 'outputs:'
outputsDisplacement = 'outputs:displacement'
outputsSurface = 'outputs:surface'
outputsVolume = 'outputs:volume'
preview = 'preview'
sdrMetadata = 'sdrMetadata'
sourceAsset = 'sourceAsset'
sourceCode = 'sourceCode'
strongerThanDescendants = 'strongerThanDescendants'
subIdentifier = 'subIdentifier'
surface = 'surface'
universalRenderContext = ''
universalSourceType = ''
volume = 'volume'
weakerThanDescendants = 'weakerThanDescendants'
pass
| 5,048 | unknown | 35.854014 | 88 | 0.634509 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/DestructionSchema/__init__.py | __copyright__ = "Copyright (c) 2020-2021, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import omni.core
# TODO: auto-load requirements
from usdrt import Sdf
from ._DestructionSchema import *
| 562 | Python | 34.187498 | 83 | 0.798932 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/DestructionSchema/_DestructionSchema.pyi | from __future__ import annotations
import usdrt.DestructionSchema._DestructionSchema
import typing
import usdrt.Usd._Usd
__all__ = [
"DestructibleBaseAPI",
"DestructibleBondAPI",
"DestructibleChunkAPI",
"DestructibleInstAPI",
"Tokens"
]
class DestructibleBaseAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateDefaultBondStrengthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDefaultChunkStrengthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSupportDepthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDefaultBondStrengthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDefaultChunkStrengthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSupportDepthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class DestructibleBondAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateAreaAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateAttachedRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateCentroidAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateNormalAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateStrengthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateUnbreakableAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetAreaAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetAttachedRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetCentroidAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetNormalAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetStrengthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetUnbreakableAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class DestructibleChunkAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateCentroidAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateParentChunkRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateStrengthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateVolumeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCentroidAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetParentChunkRel(self) -> usdrt.Usd._Usd.Relationship: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetStrengthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetVolumeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class DestructibleInstAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateBaseRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetBaseRel(self) -> usdrt.Usd._Usd.Relationship: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Tokens():
destructArea = 'destruct:area'
destructAttached = 'destruct:attached'
destructBase = 'destruct:base'
destructCentroid = 'destruct:centroid'
destructDefaultBondStrength = 'destruct:defaultBondStrength'
destructDefaultChunkStrength = 'destruct:defaultChunkStrength'
destructNormal = 'destruct:normal'
destructParentChunk = 'destruct:parentChunk'
destructStrength = 'destruct:strength'
destructSupportDepth = 'destruct:supportDepth'
destructUnbreakable = 'destruct:unbreakable'
destructVolume = 'destruct:volume'
pass
| 4,304 | unknown | 43.381443 | 84 | 0.667519 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/Vt/__init__.py | __copyright__ = "Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import omni.core
from ._Vt import *
| 488 | Python | 36.615382 | 78 | 0.795082 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/Vt/_Vt.pyi | from __future__ import annotations
import usdrt.Vt._Vt
import typing
import numpy
import usdrt.Gf._Gf
_Shape = typing.Tuple[int, ...]
__all__ = [
"AssetArray",
"BoolArray",
"CharArray",
"DoubleArray",
"FloatArray",
"HalfArray",
"Int64Array",
"IntArray",
"Matrix3dArray",
"Matrix3fArray",
"Matrix4dArray",
"Matrix4fArray",
"QuatdArray",
"QuatfArray",
"QuathArray",
"ShortArray",
"StringArray",
"TokenArray",
"UCharArray",
"UInt64Array",
"UIntArray",
"UShortArray",
"Vec2dArray",
"Vec2fArray",
"Vec2hArray",
"Vec2iArray",
"Vec3dArray",
"Vec3fArray",
"Vec3hArray",
"Vec3iArray",
"Vec4dArray",
"Vec4fArray",
"Vec4hArray",
"Vec4iArray"
]
class AssetArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
@staticmethod
def __getitem__(*args, **kwargs) -> typing.Any: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.uint64]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[usdrt::SdfAssetPath]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
@staticmethod
def __setitem__(*args, **kwargs) -> typing.Any: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class BoolArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> bool: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[bool]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[bool]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: bool) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class CharArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> str: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.int8]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[str]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: str) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class DoubleArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> float: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.float64]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[float]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: float) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class FloatArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> float: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.float32]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[float]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: float) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class HalfArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> GfHalf: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.float16]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[GfHalf]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: GfHalf) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class Int64Array():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> int: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.int64]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[int]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: int) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class IntArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> int: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.int32]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[int]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: int) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class Matrix3dArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> usdrt.Gf._Gf.Matrix3d: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.float64]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[usdrt.Gf._Gf.Matrix3d]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: usdrt.Gf._Gf.Matrix3d) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class Matrix3fArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> usdrt.Gf._Gf.Matrix3f: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.float32]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[usdrt.Gf._Gf.Matrix3f]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: usdrt.Gf._Gf.Matrix3f) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class Matrix4dArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> usdrt.Gf._Gf.Matrix4d: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.float64]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[usdrt.Gf._Gf.Matrix4d]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: usdrt.Gf._Gf.Matrix4d) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class Matrix4fArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> usdrt.Gf._Gf.Matrix4f: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.float32]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[usdrt.Gf._Gf.Matrix4f]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: usdrt.Gf._Gf.Matrix4f) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class QuatdArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> usdrt.Gf._Gf.Quatd: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.float64]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[usdrt.Gf._Gf.Quatd]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: usdrt.Gf._Gf.Quatd) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class QuatfArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> usdrt.Gf._Gf.Quatf: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.float32]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[usdrt.Gf._Gf.Quatf]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: usdrt.Gf._Gf.Quatf) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class QuathArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> usdrt.Gf._Gf.Quath: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.float16]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[usdrt.Gf._Gf.Quath]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: usdrt.Gf._Gf.Quath) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class ShortArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> int: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.int16]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[int]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: int) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class StringArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> str: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.int8]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[str]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: str) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class TokenArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> TfToken: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.uint64]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[TfToken]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: TfToken) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class UCharArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> int: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.uint8]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[int]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: int) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class UInt64Array():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> int: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.uint64]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[int]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: int) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class UIntArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> int: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.uint32]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[int]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: int) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class UShortArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> int: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.uint16]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[int]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: int) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class Vec2dArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> usdrt.Gf._Gf.Vec2d: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.float64]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[usdrt.Gf._Gf.Vec2d]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: usdrt.Gf._Gf.Vec2d) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class Vec2fArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> usdrt.Gf._Gf.Vec2f: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.float32]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[usdrt.Gf._Gf.Vec2f]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: usdrt.Gf._Gf.Vec2f) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class Vec2hArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> usdrt.Gf._Gf.Vec2h: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.float16]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[usdrt.Gf._Gf.Vec2h]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: usdrt.Gf._Gf.Vec2h) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class Vec2iArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> usdrt.Gf._Gf.Vec2i: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.int32]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[usdrt.Gf._Gf.Vec2i]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: usdrt.Gf._Gf.Vec2i) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class Vec3dArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> usdrt.Gf._Gf.Vec3d: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.float64]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[usdrt.Gf._Gf.Vec3d]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: usdrt.Gf._Gf.Vec3d) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class Vec3fArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> usdrt.Gf._Gf.Vec3f: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.float32]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[usdrt.Gf._Gf.Vec3f]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: usdrt.Gf._Gf.Vec3f) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class Vec3hArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> usdrt.Gf._Gf.Vec3h: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.float16]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[usdrt.Gf._Gf.Vec3h]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: usdrt.Gf._Gf.Vec3h) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class Vec3iArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> usdrt.Gf._Gf.Vec3i: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.int32]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[usdrt.Gf._Gf.Vec3i]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: usdrt.Gf._Gf.Vec3i) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class Vec4dArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> usdrt.Gf._Gf.Vec4d: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.float64]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[usdrt.Gf._Gf.Vec4d]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: usdrt.Gf._Gf.Vec4d) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class Vec4fArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> usdrt.Gf._Gf.Vec4f: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.float32]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[usdrt.Gf._Gf.Vec4f]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: usdrt.Gf._Gf.Vec4f) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class Vec4hArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> usdrt.Gf._Gf.Vec4h: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.float16]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[usdrt.Gf._Gf.Vec4h]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: usdrt.Gf._Gf.Vec4h) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
class Vec4iArray():
def DetachFromSource(self) -> None: ...
def HasFabricGpuData(self) -> bool: ...
def IsFabricData(self) -> bool: ...
def IsOwnData(self) -> bool: ...
def IsPythonData(self) -> bool: ...
def __getitem__(self, arg0: int) -> usdrt.Gf._Gf.Vec4i: ...
@typing.overload
def __init__(self) -> None: ...
@typing.overload
def __init__(self, arg0: int) -> None: ...
@typing.overload
def __init__(self, arg0: object) -> None: ...
@typing.overload
def __init__(self, arg0: numpy.ndarray[numpy.int32]) -> None: ...
@typing.overload
def __init__(self, arg0: typing.List[usdrt.Gf._Gf.Vec4i]) -> None: ...
def __iter__(self) -> typing.Iterator: ...
def __len__(self) -> int: ...
def __repr__(self) -> str: ...
def __setitem__(self, arg0: int, arg1: usdrt.Gf._Gf.Vec4i) -> None: ...
def __str__(self) -> str: ...
@property
def __array_interface__(self) -> dict:
"""
:type: dict
"""
@property
def __cuda_array_interface__(self) -> dict:
"""
:type: dict
"""
pass
| 38,143 | unknown | 31.601709 | 78 | 0.523556 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/UsdGeom/__init__.py | __copyright__ = "Copyright (c) 2020-2021, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import omni.core
# TODO: auto-load requirements
from usdrt import Sdf
from ._UsdGeom import *
| 552 | Python | 33.562498 | 83 | 0.79529 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/UsdGeom/_UsdGeom.pyi | from __future__ import annotations
import usdrt.UsdGeom._UsdGeom
import typing
import usdrt.Sdf._Sdf
import usdrt.Usd._Usd
__all__ = [
"BasisCurves",
"Boundable",
"Camera",
"Capsule",
"Cone",
"Cube",
"Curves",
"Cylinder",
"Gprim",
"HermiteCurves",
"Imageable",
"Mesh",
"ModelAPI",
"MotionAPI",
"NurbsCurves",
"NurbsPatch",
"Plane",
"PointBased",
"PointInstancer",
"Points",
"PrimvarsAPI",
"Scope",
"Sphere",
"Subset",
"Tokens",
"VisibilityAPI",
"Xform",
"XformCommonAPI",
"Xformable"
]
class BasisCurves(Curves, PointBased, Gprim, Boundable, Xformable, Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateBasisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTypeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateWrapAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> BasisCurves: ...
def GetBasisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetTypeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetWrapAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Boundable(Xformable, Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateExtentAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetExtentAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Camera(Xformable, Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateClippingPlanesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateClippingRangeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateExposureAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateFStopAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateFocalLengthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateFocusDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateHorizontalApertureAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateHorizontalApertureOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateProjectionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateShutterCloseAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateShutterOpenAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateStereoRoleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateVerticalApertureAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateVerticalApertureOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> Camera: ...
def GetClippingPlanesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetClippingRangeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetExposureAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFStopAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFocalLengthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFocusDistanceAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetHorizontalApertureAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetHorizontalApertureOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetProjectionAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetShutterCloseAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetShutterOpenAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetStereoRoleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetVerticalApertureAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetVerticalApertureOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Capsule(Gprim, Boundable, Xformable, Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateExtentAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateHeightAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateRadiusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> Capsule: ...
def GetAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetExtentAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetHeightAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetRadiusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Cone(Gprim, Boundable, Xformable, Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateExtentAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateHeightAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateRadiusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> Cone: ...
def GetAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetExtentAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetHeightAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetRadiusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Cube(Gprim, Boundable, Xformable, Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateExtentAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSizeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> Cube: ...
def GetExtentAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSizeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Curves(PointBased, Gprim, Boundable, Xformable, Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateCurveVertexCountsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateWidthsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCurveVertexCountsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetWidthsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Cylinder(Gprim, Boundable, Xformable, Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateExtentAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateHeightAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateRadiusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> Cylinder: ...
def GetAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetExtentAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetHeightAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetRadiusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class HermiteCurves(Curves, PointBased, Gprim, Boundable, Xformable, Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateTangentsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> HermiteCurves: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetTangentsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Mesh(PointBased, Gprim, Boundable, Xformable, Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateCornerIndicesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateCornerSharpnessesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateCreaseIndicesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateCreaseLengthsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateCreaseSharpnessesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateFaceVaryingLinearInterpolationAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateFaceVertexCountsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateFaceVertexIndicesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateHoleIndicesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateInterpolateBoundaryAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateSubdivisionSchemeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTriangleSubdivisionRuleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> Mesh: ...
def GetCornerIndicesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCornerSharpnessesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCreaseIndicesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCreaseLengthsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetCreaseSharpnessesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFaceVaryingLinearInterpolationAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFaceVertexCountsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFaceVertexIndicesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetHoleIndicesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetInterpolateBoundaryAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetSubdivisionSchemeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetTriangleSubdivisionRuleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class NurbsCurves(Curves, PointBased, Gprim, Boundable, Xformable, Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateFormAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateKnotsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateOrderAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreatePointWeightsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateRangesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> NurbsCurves: ...
def GetFormAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetKnotsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetOrderAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPointWeightsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetRangesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class NurbsPatch(PointBased, Gprim, Boundable, Xformable, Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreatePointWeightsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTrimCurveCountsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTrimCurveKnotsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTrimCurveOrdersAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTrimCurvePointsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTrimCurveRangesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateTrimCurveVertexCountsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateUFormAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateUKnotsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateUOrderAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateURangeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateUVertexCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateVFormAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateVKnotsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateVOrderAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateVRangeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateVVertexCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> NurbsPatch: ...
def GetPointWeightsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetTrimCurveCountsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetTrimCurveKnotsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetTrimCurveOrdersAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetTrimCurvePointsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetTrimCurveRangesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetTrimCurveVertexCountsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetUFormAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetUKnotsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetUOrderAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetURangeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetUVertexCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetVFormAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetVKnotsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetVOrderAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetVRangeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetVVertexCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Plane(Gprim, Boundable, Xformable, Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDoubleSidedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateExtentAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateLengthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateWidthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> Plane: ...
def GetAxisAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDoubleSidedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetExtentAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetLengthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetWidthAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Points(PointBased, Gprim, Boundable, Xformable, Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateIdsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateWidthsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> Points: ...
def GetIdsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetWidthsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PointBased(Gprim, Boundable, Xformable, Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateAccelerationsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateNormalsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreatePointsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateVelocitiesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetAccelerationsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetNormalsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPointsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetVelocitiesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Gprim(Boundable, Xformable, Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateDisplayColorAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDisplayOpacityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateDoubleSidedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateOrientationAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDisplayColorAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDisplayOpacityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetDoubleSidedAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetOrientationAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Scope(Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> Scope: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Sphere(Gprim, Boundable, Xformable, Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateExtentAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateRadiusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> Sphere: ...
def GetExtentAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetRadiusAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Imageable(usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateProxyPrimRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreatePurposeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateVisibilityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetProxyPrimRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetPurposeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetVisibilityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class ModelAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateModelApplyDrawModeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateModelCardGeometryAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateModelCardTextureXNegAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateModelCardTextureXPosAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateModelCardTextureYNegAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateModelCardTextureYPosAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateModelCardTextureZNegAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateModelCardTextureZPosAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateModelDrawModeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateModelDrawModeColorAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetModelApplyDrawModeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetModelCardGeometryAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetModelCardTextureXNegAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetModelCardTextureXPosAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetModelCardTextureYNegAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetModelCardTextureYPosAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetModelCardTextureZNegAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetModelCardTextureZPosAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetModelDrawModeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetModelDrawModeColorAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class MotionAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateMotionBlurScaleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateNonlinearSampleCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateVelocityScaleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMotionBlurScaleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetNonlinearSampleCountAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetVelocityScaleAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PointInstancer(Boundable, Xformable, Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateAccelerationsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateAngularVelocitiesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateIdsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateInvisibleIdsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateOrientationsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreatePositionsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateProtoIndicesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreatePrototypesRel(self) -> usdrt.Usd._Usd.Relationship: ...
def CreateScalesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateVelocitiesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> PointInstancer: ...
def GetAccelerationsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetAngularVelocitiesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetIdsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetInvisibleIdsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetOrientationsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPositionsAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetProtoIndicesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPrototypesRel(self) -> usdrt.Usd._Usd.Relationship: ...
def GetScalesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetVelocitiesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class PrimvarsAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Subset(usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateElementTypeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateFamilyNameAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateIndicesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> Subset: ...
def GetElementTypeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFamilyNameAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetIndicesAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Tokens():
accelerations = 'accelerations'
all = 'all'
angularVelocities = 'angularVelocities'
axis = 'axis'
basis = 'basis'
bezier = 'bezier'
bilinear = 'bilinear'
boundaries = 'boundaries'
bounds = 'bounds'
box = 'box'
bspline = 'bspline'
cards = 'cards'
catmullClark = 'catmullClark'
catmullRom = 'catmullRom'
clippingPlanes = 'clippingPlanes'
clippingRange = 'clippingRange'
closed = 'closed'
constant = 'constant'
cornerIndices = 'cornerIndices'
cornerSharpnesses = 'cornerSharpnesses'
cornersOnly = 'cornersOnly'
cornersPlus1 = 'cornersPlus1'
cornersPlus2 = 'cornersPlus2'
creaseIndices = 'creaseIndices'
creaseLengths = 'creaseLengths'
creaseSharpnesses = 'creaseSharpnesses'
cross = 'cross'
cubic = 'cubic'
curveVertexCounts = 'curveVertexCounts'
default_ = 'default'
doubleSided = 'doubleSided'
edgeAndCorner = 'edgeAndCorner'
edgeOnly = 'edgeOnly'
elementSize = 'elementSize'
elementType = 'elementType'
exposure = 'exposure'
extent = 'extent'
extentsHint = 'extentsHint'
fStop = 'fStop'
face = 'face'
faceVarying = 'faceVarying'
faceVaryingLinearInterpolation = 'faceVaryingLinearInterpolation'
faceVertexCounts = 'faceVertexCounts'
faceVertexIndices = 'faceVertexIndices'
familyName = 'familyName'
focalLength = 'focalLength'
focusDistance = 'focusDistance'
form = 'form'
fromTexture = 'fromTexture'
guide = 'guide'
guideVisibility = 'guideVisibility'
height = 'height'
hermite = 'hermite'
holeIndices = 'holeIndices'
horizontalAperture = 'horizontalAperture'
horizontalApertureOffset = 'horizontalApertureOffset'
ids = 'ids'
inactiveIds = 'inactiveIds'
indices = 'indices'
inherited = 'inherited'
interpolateBoundary = 'interpolateBoundary'
interpolation = 'interpolation'
invisible = 'invisible'
invisibleIds = 'invisibleIds'
knots = 'knots'
left = 'left'
leftHanded = 'leftHanded'
length = 'length'
linear = 'linear'
loop = 'loop'
metersPerUnit = 'metersPerUnit'
modelApplyDrawMode = 'model:applyDrawMode'
modelCardGeometry = 'model:cardGeometry'
modelCardTextureXNeg = 'model:cardTextureXNeg'
modelCardTextureXPos = 'model:cardTextureXPos'
modelCardTextureYNeg = 'model:cardTextureYNeg'
modelCardTextureYPos = 'model:cardTextureYPos'
modelCardTextureZNeg = 'model:cardTextureZNeg'
modelCardTextureZPos = 'model:cardTextureZPos'
modelDrawMode = 'model:drawMode'
modelDrawModeColor = 'model:drawModeColor'
mono = 'mono'
motionBlurScale = 'motion:blurScale'
motionNonlinearSampleCount = 'motion:nonlinearSampleCount'
motionVelocityScale = 'motion:velocityScale'
nonOverlapping = 'nonOverlapping'
none = 'none'
nonperiodic = 'nonperiodic'
normals = 'normals'
open = 'open'
order = 'order'
orientation = 'orientation'
orientations = 'orientations'
origin = 'origin'
orthographic = 'orthographic'
partition = 'partition'
periodic = 'periodic'
perspective = 'perspective'
pinned = 'pinned'
pivot = 'pivot'
pointWeights = 'pointWeights'
points = 'points'
positions = 'positions'
power = 'power'
primvarsDisplayColor = 'primvars:displayColor'
primvarsDisplayOpacity = 'primvars:displayOpacity'
projection = 'projection'
protoIndices = 'protoIndices'
prototypes = 'prototypes'
proxy = 'proxy'
proxyPrim = 'proxyPrim'
proxyVisibility = 'proxyVisibility'
purpose = 'purpose'
radius = 'radius'
ranges = 'ranges'
render = 'render'
renderVisibility = 'renderVisibility'
right = 'right'
rightHanded = 'rightHanded'
scales = 'scales'
shutterClose = 'shutter:close'
shutterOpen = 'shutter:open'
size = 'size'
smooth = 'smooth'
stereoRole = 'stereoRole'
subdivisionScheme = 'subdivisionScheme'
tangents = 'tangents'
triangleSubdivisionRule = 'triangleSubdivisionRule'
trimCurveCounts = 'trimCurve:counts'
trimCurveKnots = 'trimCurve:knots'
trimCurveOrders = 'trimCurve:orders'
trimCurvePoints = 'trimCurve:points'
trimCurveRanges = 'trimCurve:ranges'
trimCurveVertexCounts = 'trimCurve:vertexCounts'
type = 'type'
uForm = 'uForm'
uKnots = 'uKnots'
uOrder = 'uOrder'
uRange = 'uRange'
uVertexCount = 'uVertexCount'
unauthoredValuesIndex = 'unauthoredValuesIndex'
uniform = 'uniform'
unrestricted = 'unrestricted'
upAxis = 'upAxis'
vForm = 'vForm'
vKnots = 'vKnots'
vOrder = 'vOrder'
vRange = 'vRange'
vVertexCount = 'vVertexCount'
varying = 'varying'
velocities = 'velocities'
vertex = 'vertex'
verticalAperture = 'verticalAperture'
verticalApertureOffset = 'verticalApertureOffset'
visibility = 'visibility'
visible = 'visible'
width = 'width'
widths = 'widths'
wrap = 'wrap'
x = 'X'
xformOpOrder = 'xformOpOrder'
y = 'Y'
z = 'Z'
pass
class VisibilityAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
def CreateGuideVisibilityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateProxyVisibilityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateRenderVisibilityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetGuideVisibilityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetProxyVisibilityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetRenderVisibilityAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Xform(Xformable, Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> Xform: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class XformCommonAPI(usdrt.Usd._Usd.APISchemaBase, usdrt.Usd._Usd.SchemaBase):
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Xformable(Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateXformOpOrderAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetXformOpOrderAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
| 35,108 | unknown | 45.379128 | 129 | 0.654865 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/UsdMedia/__init__.py | __copyright__ = "Copyright (c) 2020-2021, NVIDIA CORPORATION. All rights reserved."
__license__ = """
NVIDIA CORPORATION and its licensors retain all intellectual property
and proprietary rights in and to this software, related documentation
and any modifications thereto. Any use, reproduction, disclosure or
distribution of this software and related documentation without an express
license agreement from NVIDIA CORPORATION is strictly prohibited.
"""
import omni.core
# TODO: auto-load requirements
from usdrt import Sdf
from ._UsdMedia import *
| 553 | Python | 33.624998 | 83 | 0.79566 |
omniverse-code/kit/exts/usdrt.scenegraph/usdrt/UsdMedia/_UsdMedia.pyi | from __future__ import annotations
import usdrt.UsdMedia._UsdMedia
import typing
import usdrt.Sdf._Sdf
import usdrt.Usd._Usd
import usdrt.UsdGeom._UsdGeom
__all__ = [
"SpatialAudio",
"Tokens"
]
class SpatialAudio(usdrt.UsdGeom._UsdGeom.Xformable, usdrt.UsdGeom._UsdGeom.Imageable, usdrt.Usd._Usd.Typed, usdrt.Usd._Usd.SchemaBase):
def CreateAuralModeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateEndTimeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateFilePathAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateGainAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateMediaOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreatePlaybackModeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def CreateStartTimeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def Define(stage: usdrt.Usd._Usd.Stage, path: usdrt.Sdf._Sdf.Path) -> SpatialAudio: ...
def GetAuralModeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetEndTimeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetFilePathAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetGainAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetMediaOffsetAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def GetPlaybackModeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
@staticmethod
def GetSchemaTypeName() -> TfToken: ...
def GetStartTimeAttr(self) -> usdrt.Usd._Usd.Attribute: ...
def __bool__(self) -> bool: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.Prim) -> None: ...
@typing.overload
def __init__(self, arg0: usdrt.Usd._Usd.SchemaBase) -> None: ...
def __repr__(self) -> str: ...
pass
class Tokens():
auralMode = 'auralMode'
endTime = 'endTime'
filePath = 'filePath'
gain = 'gain'
loopFromStage = 'loopFromStage'
loopFromStart = 'loopFromStart'
loopFromStartToEnd = 'loopFromStartToEnd'
mediaOffset = 'mediaOffset'
nonSpatial = 'nonSpatial'
onceFromStart = 'onceFromStart'
onceFromStartToEnd = 'onceFromStartToEnd'
playbackMode = 'playbackMode'
spatial = 'spatial'
startTime = 'startTime'
pass
| 2,148 | unknown | 37.374999 | 136 | 0.669926 |
omniverse-code/kit/exts/usdrt.scenegraph/include/usdrt/scenegraph/base/gf/vec2f.h | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
//
#pragma once
#include <usdrt/gf/vec.h>
| 477 | C | 35.769228 | 77 | 0.784067 |
omniverse-code/kit/exts/usdrt.scenegraph/include/usdrt/scenegraph/base/gf/range1f.h | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
//
#pragma once
#include <usdrt/gf/range.h>
| 479 | C | 35.923074 | 77 | 0.784969 |
omniverse-code/kit/exts/usdrt.scenegraph/include/usdrt/scenegraph/base/gf/vec2d.h | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
//
#pragma once
#include <usdrt/gf/vec.h>
| 477 | C | 35.769228 | 77 | 0.784067 |
omniverse-code/kit/exts/usdrt.scenegraph/include/usdrt/scenegraph/base/gf/range3f.h | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
//
#pragma once
#include <usdrt/gf/range.h>
| 479 | C | 35.923074 | 77 | 0.784969 |
omniverse-code/kit/exts/usdrt.scenegraph/include/usdrt/scenegraph/base/gf/matrix4f.h | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
#pragma once
#include <usdrt/gf/matrix.h>
| 477 | C | 38.83333 | 77 | 0.790356 |
omniverse-code/kit/exts/usdrt.scenegraph/include/usdrt/scenegraph/base/gf/half.h | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
//
#pragma once
#include <usdrt/gf/half.h>
| 478 | C | 35.846151 | 77 | 0.784519 |
omniverse-code/kit/exts/usdrt.scenegraph/include/usdrt/scenegraph/base/gf/matrix3d.h | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
#pragma once
#include <usdrt/gf/matrix.h>
| 477 | C | 38.83333 | 77 | 0.790356 |
omniverse-code/kit/exts/usdrt.scenegraph/include/usdrt/scenegraph/base/gf/vec4i.h | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
//
#pragma once
#include <usdrt/gf/vec.h>
| 477 | C | 35.769228 | 77 | 0.784067 |
omniverse-code/kit/exts/usdrt.scenegraph/include/usdrt/scenegraph/base/gf/quatf.h | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
//
#pragma once
#include <usdrt/gf/quat.h>
| 478 | C | 35.846151 | 77 | 0.784519 |
omniverse-code/kit/exts/usdrt.scenegraph/include/usdrt/scenegraph/base/gf/vec3f.h | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
//
#pragma once
#include <usdrt/gf/vec.h>
| 477 | C | 35.769228 | 77 | 0.784067 |
omniverse-code/kit/exts/usdrt.scenegraph/include/usdrt/scenegraph/base/gf/range2d.h | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
//
#pragma once
#include <usdrt/gf/range.h>
| 479 | C | 35.923074 | 77 | 0.784969 |
omniverse-code/kit/exts/usdrt.scenegraph/include/usdrt/scenegraph/base/gf/rect2i.h | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
//
#pragma once
#include <usdrt/gf/rect.h>
| 478 | C | 35.846151 | 77 | 0.784519 |
omniverse-code/kit/exts/usdrt.scenegraph/include/usdrt/scenegraph/base/gf/vec2h.h | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
//
#pragma once
#include <usdrt/gf/vec.h>
| 477 | C | 35.769228 | 77 | 0.784067 |
omniverse-code/kit/exts/usdrt.scenegraph/include/usdrt/scenegraph/base/gf/math.h | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
//
#pragma once
#include <usdrt/gf/math.h>
| 478 | C | 35.846151 | 77 | 0.784519 |
omniverse-code/kit/exts/usdrt.scenegraph/include/usdrt/scenegraph/base/gf/range1d.h | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
//
#pragma once
#include <usdrt/gf/range.h>
| 479 | C | 35.923074 | 77 | 0.784969 |
omniverse-code/kit/exts/usdrt.scenegraph/include/usdrt/scenegraph/base/gf/vec4f.h | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
//
#pragma once
#include <usdrt/gf/vec.h>
| 477 | C | 35.769228 | 77 | 0.784067 |
omniverse-code/kit/exts/usdrt.scenegraph/include/usdrt/scenegraph/base/gf/quath.h | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
//
#pragma once
#include <usdrt/gf/quat.h>
| 478 | C | 35.846151 | 77 | 0.784519 |
omniverse-code/kit/exts/usdrt.scenegraph/include/usdrt/scenegraph/base/gf/vec2i.h | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
//
#pragma once
#include <usdrt/gf/vec.h>
| 477 | C | 35.769228 | 77 | 0.784067 |
omniverse-code/kit/exts/usdrt.scenegraph/include/usdrt/scenegraph/base/gf/matrix4d.h | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
#pragma once
#include <usdrt/gf/matrix.h>
| 477 | C | 38.83333 | 77 | 0.790356 |
omniverse-code/kit/exts/usdrt.scenegraph/include/usdrt/scenegraph/base/gf/range2f.h | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
//
#pragma once
#include <usdrt/gf/range.h>
| 479 | C | 35.923074 | 77 | 0.784969 |
omniverse-code/kit/exts/usdrt.scenegraph/include/usdrt/scenegraph/base/gf/vec3h.h | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
//
#pragma once
#include <usdrt/gf/vec.h>
| 477 | C | 35.769228 | 77 | 0.784067 |
omniverse-code/kit/exts/usdrt.scenegraph/include/usdrt/scenegraph/base/gf/matrix3f.h | // Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto. Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
#pragma once
#include <usdrt/gf/matrix.h>
| 477 | C | 38.83333 | 77 | 0.790356 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.