file_path
stringlengths
21
207
content
stringlengths
5
1.02M
size
int64
5
1.02M
lang
stringclasses
9 values
avg_line_length
float64
2.5
98.5
max_line_length
int64
5
993
alphanum_fraction
float64
0.27
0.91
mati-nvidia/developer-office-hours/exts/maticodes.doh_2022_09_02/scripts/what_is_cl.py
# SPDX-License-Identifier: Apache-2.0 import omni.ui as ui from omni.ui import color as cl # import omni.ui.color as color my_window = ui.Window("Example Window", width=300, height=300) with my_window.frame: with ui.VStack(): ui.Label("Hello World!", style={"color": cl(0.0, 1.0, 0.0)})
303
Python
22.384614
68
0.673267
mati-nvidia/developer-office-hours/exts/maticodes.doh_2022_09_02/config/extension.toml
[package] # Semantic Versionning is used: https://semver.org/ version = "1.0.0" # The title and description fields are primarily for displaying extension info in UI title = "2022-09-02: Dev Office Hours" description="Sample code from the Dev Office Hour held on 2022-09-02" # Path (relative to the root) or content of ...
784
TOML
26.068965
113
0.732143
mati-nvidia/developer-office-hours/exts/maticodes.doh_2022_09_02/docs/README.md
# Developer Office Hour - 09/02/2022 This is the sample code from the Developer Office Hour held on 09/02/2022, Mati answered some developer questions from the NVIDIA Omniverse forums regarding Kit, Omniverse Code, Python, and USD. ## Questions - What's the difference between a shape and a mesh? - How do I import cl? ...
405
Markdown
39.599996
194
0.748148
mati-nvidia/developer-office-hours/exts/maticodes.doh_2022_11_18/maticodes/doh_2022_11_18/extension.py
# SPDX-License-Identifier: Apache-2.0 import carb import omni.ext from omni.kit.viewport.utility import get_active_viewport_window import omni.ui as ui class MyExtension(omni.ext.IExt): def on_startup(self, ext_id): carb.log_info("[maticodes.doh_2022_11_18] Dev Office Hours Extension (2022-11-18) startu...
990
Python
32.033332
100
0.59596
mati-nvidia/developer-office-hours/exts/maticodes.doh_2022_11_18/maticodes/doh_2022_11_18/__init__.py
# SPDX-License-Identifier: Apache-2.0 from .extension import *
64
Python
15.249996
37
0.75
mati-nvidia/developer-office-hours/exts/maticodes.doh_2022_11_18/scripts/placer_model.py
# SPDX-License-Identifier: Apache-2.0 import omni.ui as ui my_window = ui.Window("Example Window", width=300, height=300) model = ui.SimpleFloatModel() sub = None with my_window.frame: with ui.VStack(): ui.FloatSlider(model=model) def body_moved(body, model): if body.offset_x....
996
Python
34.607142
94
0.589357
mati-nvidia/developer-office-hours/exts/maticodes.doh_2022_11_18/config/extension.toml
[package] # Semantic Versionning is used: https://semver.org/ version = "1.0.0" # The title and description fields are primarily for displaying extension info in UI title = "2022-11-18: Dev Office Hours" description="Sample code from the Dev Office Hour held on 2022-11-18" # Path (relative to the root) or content of ...
784
TOML
26.068965
113
0.732143
mati-nvidia/developer-office-hours/exts/maticodes.doh_2022_11_18/docs/README.md
# Developer Office Hour - 11/18/2022 This is the sample code from the Developer Office Hour held on 11/18/2022, Mati answered some developer questions from the NVIDIA Omniverse forums regarding Kit, Omniverse Code, Python, and USD. ## Questions - How do I add widgets on top of the viewport? (ViewportWindow.get_frame)...
431
Markdown
46.999995
114
0.770302
mati-nvidia/developer-office-hours/exts/maticodes.doh_2022_10_07/maticodes/doh_2022_10_07/extension.py
# SPDX-License-Identifier: Apache-2.0 import carb import omni.ext import omni.ui as ui class MyWindow(ui.Window): def __init__(self, title: str = None, **kwargs): super().__init__(title, **kwargs) self.frame.set_build_fn(self._build_window) def _build_window(self): with ui.ScrollingF...
1,005
Python
28.588234
100
0.595025
mati-nvidia/developer-office-hours/exts/maticodes.doh_2022_10_07/maticodes/doh_2022_10_07/__init__.py
# SPDX-License-Identifier: Apache-2.0 from .extension import *
64
Python
15.249996
37
0.75
mati-nvidia/developer-office-hours/exts/maticodes.doh_2022_10_07/scripts/usd_update_stream.py
# SPDX-License-Identifier: Apache-2.0 import omni.usd from pxr import UsdGeom, Gf stage = omni.usd.get_context().get_stage() cube = stage.GetPrimAtPath("/World/Cube") def print_pos(changed_path): print(changed_path) if changed_path.IsPrimPath(): prim_path = changed_path else: prim_path = ...
813
Python
37.761903
97
0.719557
mati-nvidia/developer-office-hours/exts/maticodes.doh_2022_10_07/scripts/create_viewport.py
# SPDX-License-Identifier: Apache-2.0 import carb import omni.kit.viewport.utility as vp_utils from omni.kit.widget.viewport.api import ViewportAPI vp_window = vp_utils.create_viewport_window("My Viewport") vp_window.viewport_api.fill_frame = True vp_api: ViewportAPI = vp_window.viewport_api carb.settings.get_settin...
392
Python
27.071427
66
0.770408
mati-nvidia/developer-office-hours/exts/maticodes.doh_2022_10_07/config/extension.toml
[package] # Semantic Versionning is used: https://semver.org/ version = "1.0.0" # The title and description fields are primarily for displaying extension info in UI title = "2022-10-07: Dev Office Hours" description="Sample code from the Dev Office Hour held on 2022-10-07" # Path (relative to the root) or content of ...
784
TOML
26.068965
113
0.732143
mati-nvidia/developer-office-hours/exts/maticodes.doh_2022_10_07/docs/README.md
# Developer Office Hour - 10/07/2022 This is the sample code from the Developer Office Hour held on 10/07/2022, Mati answered some developer questions from the NVIDIA Omniverse forums regarding Kit, Omniverse Code, Python, and USD. ## Questions - How do I create another viewport? - How do I use the Script Node?
315
Markdown
38.499995
114
0.771429
mati-nvidia/developer-office-hours/exts/maticodes.doh_2022_12_02/maticodes/doh_2022_12_02/extension.py
# SPDX-License-Identifier: Apache-2.0 import carb import omni.ext import omni.ui as ui class MyWindow(ui.Window): def __init__(self, title: str = None, **kwargs): super().__init__(title, **kwargs) self.frame.set_build_fn(self._build_window) def _build_window(self): with ui.ScrollingF...
1,442
Python
28.448979
100
0.549237
mati-nvidia/developer-office-hours/exts/maticodes.doh_2022_12_02/maticodes/doh_2022_12_02/__init__.py
# SPDX-License-Identifier: Apache-2.0 from .extension import *
64
Python
15.249996
37
0.75
mati-nvidia/developer-office-hours/exts/maticodes.doh_2022_12_02/scripts/spawn_objects.py
# SPDX-License-Identifier: Apache-2.0 import carb.events import omni.kit.app import omni.kit.commands import logging time_since_last_create = 0 update_stream = omni.kit.app.get_app().get_update_event_stream() def on_update(e: carb.events.IEvent): global time_since_last_create carb.log_info(f"Update: {e.pay...
745
Python
27.692307
86
0.69396
mati-nvidia/developer-office-hours/exts/maticodes.doh_2022_12_02/config/extension.toml
[package] # Semantic Versionning is used: https://semver.org/ version = "1.0.0" # The title and description fields are primarily for displaying extension info in UI title = "2022-12-02: Dev Office Hours" description="Sample code from the Dev Office Hour held on 2022-12-02" # Path (relative to the root) or content of ...
784
TOML
26.068965
113
0.732143
mati-nvidia/developer-office-hours/exts/maticodes.doh_2022_12_02/docs/README.md
# Developer Office Hour - 12/02/2022 This is the sample code from the Developer Office Hour held on 12/02/2022, Mati answered some developer questions from the NVIDIA Omniverse forums regarding Kit, Omniverse Code, Python, and USD. ## Questions - How do I uninstall an extension? - How do I export USDZ? - Where is the...
416
Markdown
40.699996
114
0.769231
mati-nvidia/developer-office-hours/exts/maticodes.doh_2022_08_12/maticodes/doh_2022_08_12/extension.py
# SPDX-License-Identifier: Apache-2.0 import carb import omni.ext from omni.kit.viewport.utility import get_active_viewport_window import omni.ui as ui from .viewport_scene import ViewportScene from .object_info_model import ObjectInfoModel class MyWindow(ui.Window): def __init__(self, title: str = None, delega...
1,997
Python
31.754098
119
0.618928
mati-nvidia/developer-office-hours/exts/maticodes.doh_2022_08_12/maticodes/doh_2022_08_12/viewport_scene.py
# SPDX-License-Identifier: Apache-2.0 # 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 #...
1,938
Python
37.779999
89
0.676987
mati-nvidia/developer-office-hours/exts/maticodes.doh_2022_08_12/maticodes/doh_2022_08_12/__init__.py
# SPDX-License-Identifier: Apache-2.0 from .extension import *
64
Python
15.249996
37
0.75
mati-nvidia/developer-office-hours/exts/maticodes.doh_2022_08_12/maticodes/doh_2022_08_12/object_info_model.py
# SPDX-License-Identifier: Apache-2.0 # 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 #...
3,774
Python
36.376237
110
0.63646
mati-nvidia/developer-office-hours/exts/maticodes.doh_2022_08_12/maticodes/doh_2022_08_12/object_info_manipulator.py
# SPDX-License-Identifier: Apache-2.0 # 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 #...
2,870
Python
43.859374
112
0.617073
mati-nvidia/developer-office-hours/exts/maticodes.doh_2022_08_12/scripts/viewport_popup_notification.py
# SPDX-License-Identifier: Apache-2.0 # https://docs.omniverse.nvidia.com/py/kit/source/extensions/omni.kit.notification_manager/docs/index.html?highlight=omni%20kit%20notification_manager# import carb def clicked_ok(): carb.log_info("User clicked ok") def clicked_cancel(): carb.log_info("User clicked cance...
723
Python
27.959999
151
0.755187
mati-nvidia/developer-office-hours/exts/maticodes.doh_2022_08_12/scripts/create_many_prims.py
# SPDX-License-Identifier: Apache-2.0 from pxr import UsdGeom import omni.kit.commands import omni.usd stage = omni.usd.get_context().get_stage() cube_paths = [] for i in range(10): cube_path = omni.usd.get_stage_next_free_path(stage, "/World/Cube", prepend_default_prim=False) cube_paths.append(cube_path) ...
445
Python
28.733331
99
0.719101
mati-nvidia/developer-office-hours/exts/maticodes.doh_2022_08_12/scripts/refer_to_child_prim.py
# SPDX-License-Identifier: Apache-2.0 # https://docs.omniverse.nvidia.com/prod_usd/prod_usd/quick-start/hierarchy.html import omni.usd stage = omni.usd.get_context().get_stage() starting_prim = stage.GetPrimAtPath("/World/New") for shape in starting_prim.GetChildren(): print(shape) for shape_child in shape.Ge...
408
Python
24.562498
80
0.720588
mati-nvidia/developer-office-hours/exts/maticodes.doh_2022_08_12/scripts/create_group_anywhere.py
# SPDX-License-Identifier: Apache-2.0 from pxr import Sdf import omni.kit.commands import omni.usd stage = omni.usd.get_context().get_stage() children = [] for i in range(3): child = omni.usd.get_stage_next_free_path(stage, "/World/Cube", prepend_default_prim=False) children.append(child) omni.kit.comman...
715
Python
33.095237
108
0.731469
mati-nvidia/developer-office-hours/exts/maticodes.doh_2022_08_12/scripts/does_prim_exist.py
# SPDX-License-Identifier: Apache-2.0 from pxr import Usd, UsdGeom import omni.usd stage = omni.usd.get_context().get_stage() prim = stage.GetPrimAtPath("/World/New/Hello") print(prim) print(prim.IsValid()) prim = stage.GetPrimAtPath("/World/New/Fake") print(prim) print(prim.IsValid())
290
Python
19.785713
46
0.737931
mati-nvidia/developer-office-hours/exts/maticodes.doh_2022_08_12/config/extension.toml
[package] # Semantic Versionning is used: https://semver.org/ version = "1.0.0" # The title and description fields are primarily for displaying extension info in UI title = "2022-08-12: Dev Office Hours" description="Sample code from the Dev Office Hour held on 2022-08-12" # Path (relative to the root) or content of ...
784
TOML
26.068965
113
0.732143
mati-nvidia/developer-office-hours/exts/maticodes.doh_2022_08_12/docs/README.md
# Developer Office Hour - 08/12/2022 This is the sample code from the Developer Office Hour held on 08/12/2022, Mati answered some developer questions from the NVIDIA Omniverse forums regarding Kit, Omniverse Code, Python, and USD. ## Questions - How do I create many prims at available prim paths? - How do I create a...
605
Markdown
45.615381
114
0.758678