file_path stringlengths 20 202 | content stringlengths 9 3.85M | size int64 9 3.85M | lang stringclasses 9
values | avg_line_length float64 3.33 100 | max_line_length int64 8 993 | alphanum_fraction float64 0.26 0.93 |
|---|---|---|---|---|---|---|
leggedrobotics/viplanner/viplanner/config/costmap_cfg.py | # Copyright (c) 2023-2024, ETH Zurich (Robotics Systems Lab)
# Author: Pascal Roth
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
# python
import os
from dataclasses import dataclass
from typing import Optional
import yaml
class Loader(yaml.SafeLoader):
pass
def construct_GeneralCostMapConfi... | 6,332 | Python | 30.984848 | 149 | 0.695515 |
leggedrobotics/viplanner/viplanner/config/coco_sem_meta.py | # Copyright (c) 2023-2024, ETH Zurich (Robotics Systems Lab)
# Author: Pascal Roth
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
# Modified from https://github.com/google-research/deeplab2/blob/main/data/coco_constants.py
# File containing the meta info of all classes from the COCO dataset.
COCO_CA... | 14,752 | Python | 38.341333 | 92 | 0.46814 |
leggedrobotics/viplanner/viplanner/utils/dataset.py | # Copyright (c) 2023-2024, ETH Zurich (Robotics Systems Lab)
# Author: Pascal Roth
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
import copy
import math
# python
import os
import random
import shutil
from pathlib import Path
from random import sample
from typing import Dict, List, Optional, Tuple
... | 51,127 | Python | 38.481081 | 135 | 0.542707 |
leggedrobotics/viplanner/viplanner/utils/torchutil.py | # Copyright (c) 2023-2024, ETH Zurich (Robotics Systems Lab)
# Author: Pascal Roth
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
import torch
import torch.fft
class EarlyStopScheduler(torch.optim.lr_scheduler.ReduceLROnPlateau):
def __init__(
self,
optimizer,
mode="min"... | 2,233 | Python | 28.394736 | 115 | 0.543215 |
leggedrobotics/viplanner/viplanner/utils/trainer.py | # Copyright (c) 2023-2024, ETH Zurich (Robotics Systems Lab)
# Author: Pascal Roth
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
import contextlib
# python
import os
from typing import List, Optional, Tuple
import matplotlib.pyplot as plt
import numpy as np
import torch
import torch.nn as nn
impor... | 22,112 | Python | 34.608696 | 112 | 0.510899 |
leggedrobotics/viplanner/viplanner/utils/eval_utils.py | # Copyright (c) 2023-2024, ETH Zurich (Robotics Systems Lab)
# Author: Pascal Roth
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
# python
import os
from typing import List, Optional, Union
import matplotlib.pyplot as plt
import numpy as np
import torch
import yaml
# viplanner
from viplanner.config... | 18,324 | Python | 37.906582 | 195 | 0.560358 |
boredengineering/awesome_terrains/exts/omni.isaac.terrain_generator/omni/isaac/terrain_generator/extension.py | import omni.ext
import omni.ui as ui
from .terrain_utils import *
from omni.isaac.core.utils.stage import add_reference_to_stage, get_current_stage
from omni.isaac.core.utils.prims import define_prim, get_prim_at_path
import omni.usd
# Functions and vars are available to other extension as usual in python: `example.p... | 5,526 | Python | 52.14423 | 182 | 0.666305 |
boredengineering/awesome_terrains/exts/omni.isaac.terrain_generator/omni/isaac/terrain_generator/create_terrain_demo.py | import os, sys
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
sys.path.append(SCRIPT_DIR)
import omni
from omni.isaac.kit import SimulationApp
import numpy as np
import torch
simulation_app = SimulationApp({"headless": False})
from abc import abstractmethod
from omni.isaac.core.tasks import BaseTask
from om... | 6,310 | Python | 41.355704 | 166 | 0.61775 |
boredengineering/awesome_terrains/exts/omni.isaac.terrain_generator/docs/README.md | # Awesome Terrain Generator Example [omni.isaac.terrain_generator]
This extension is intened to help to explore how to programatically generate terrains for OIGE (Omniverse Isaac Gym Reinforcement Learning Environments for Isaac Sim).
| 237 | Markdown | 46.599991 | 167 | 0.827004 |
USDSync/MetaCloudExplorer/README.md | # USDSync.com
# Meta Cloud Explorer (MCE)
# NVIDIA Onmiverse Extension, a Scene Authoring Tool
(In Beta Development phase)

The true power of the Metaverse is to gai... | 9,153 | Markdown | 93.371133 | 429 | 0.799847 |
USDSync/MetaCloudExplorer/azure-pipelines.yml | # Python package
# Create and test a Python package on multiple Python versions.
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
trigger:
- main
pool:
vmImage: ubuntu-latest
strateg... | 849 | YAML | 21.972972 | 113 | 0.696113 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/meta/cloud/explorer/azure/csv_data_manager.py | # Selection UI window for importing CSV files
import carb
from omni.kit.window.file_importer import get_file_importer
import os.path
import asyncio
from pathlib import Path
# external python lib
import csv
import itertools
from .data_store import DataStore
from .prim_utils import cleanup_prim_path
import omni.kit.notif... | 9,552 | Python | 35.323194 | 162 | 0.573702 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/meta/cloud/explorer/azure/widget_info_manipulator.py | ## Copyright (c) 2018-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 softw... | 8,503 | Python | 40.082125 | 117 | 0.57662 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/meta/cloud/explorer/azure/button.py | from .constant import COLORS, LightColors, DarkColors, MouseKey
from .style import get_ui_style
from .rectangle import DashRectangle, OpaqueRectangle
from omni import ui
class InvisibleButton(ui.Button):
STYLE = {
"InvisibleButton": {"background_color": COLORS.TRANSPARENT},
"InvisibleButton.Label"... | 10,437 | Python | 32.242038 | 115 | 0.566734 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/meta/cloud/explorer/azure/group_type.py |
from .group_base import GroupBase
from pxr import Gf, UsdGeom, UsdLux, Usd, Sdf
from .math_utils import calcPlaneSizeForGroup
from .prim_utils import cleanup_prim_path
import locale
import asyncio
import carb
import omni.client
import omni.kit.app
import omni.ui as ui
import omni.usd
import omni.kit.commands
class T... | 4,647 | Python | 31.732394 | 109 | 0.572628 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/meta/cloud/explorer/azure/scatter_on_planes.py | # 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 rel... | 1,510 | Python | 25.982142 | 76 | 0.602649 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/meta/cloud/explorer/azure/style_button.py |
__all__ = ["button_style"]
button_styles = {
"Button": {
"border_width": 0.5,
"border_radius": 0.0,
"margin": 4.0,
"padding": 4.0,
"font_size" : 20
},
"Button::subs": {
"background_color": 0x0096C8FA,
"background_gradient_color": 0xFFFAB26D,
... | 2,488 | Python | 25.478723 | 48 | 0.546222 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/meta/cloud/explorer/azure/pillow_text.py | import glob
from PIL import Image, ImageDraw, ImageFont, ImageDraw
import io
import asyncio
import os
import time
import sys
import os.path as path
from pathlib import Path
import omni.kit.pipapi
from datetime import datetime, timedelta
#Create and draw images in async contexxt
async def draw_text_on_image_at_position... | 4,635 | Python | 30.753424 | 169 | 0.63754 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/meta/cloud/explorer/azure/math_utils.py |
# Calculate the size of the Plane to place Resource Group X's items on
# using 2D spaces here, will locate all the items on a plane the size of the group
# 1x, 2x2, 3x3, 4x4, 5x5, 6x6, 7x7, 8x8, etc... what size do we need?
import math
from pxr import Gf
__all__ = ["calcPlaneSizeForGroup"]
from re import I
from ty... | 1,686 | Python | 32.739999 | 146 | 0.677343 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/meta/cloud/explorer/azure/scatter_complex.py | __all__ = ["distributePlanes"]
from typing import List, Optional
import random
from pxr import Gf
def distributePlanes(
UpAxis: 'Z',
count: List[int],
distance: List[float],
sizes: List[float],
randomization: List[float],
seed: Optional[int] = None,
scaleFactor:float=1.0
):
#print(... | 1,255 | Python | 24.632653 | 70 | 0.517928 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/meta/cloud/explorer/azure/style.py | from .constant import COLORS, LightColors, DarkColors, FontSize
from omni import ui
import carb.settings
def get_ui_style():
settings = carb.settings.get_settings()
style = settings.get_as_string("/persistent/app/window/uiStyle")
if not style:
style = "NvidiaDark"
return style
class DefaultW... | 3,323 | Python | 39.048192 | 116 | 0.607884 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/meta/cloud/explorer/azure/omni_utils.py | # 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 rel... | 5,525 | Python | 32.490909 | 127 | 0.618643 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/meta/cloud/explorer/azure/data_manager.py | # This class manages both the offline data and online data
from typing import Dict
from .Singleton import Singleton
from .csv_data_manager import CSVDataManager
from .azure_data_manager_stub import AzureDataManager
#Azure API disabled in this version, due to:
from .data_store import DataStore
from .prim_utils import ... | 21,491 | Python | 37.174067 | 159 | 0.593551 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/meta/cloud/explorer/azure/stage_position.py | __all__ = ["scatterWithPlaneSize"]
from typing import List, Optional
import random
from pxr import Gf
def scatterWithPlaneSize(
count: List[int],
distance: List[float],
sizes: List[float],
randomization: List[float],
id_count: int = 1,
seed: Optional[int] = None,
scaleFactor:float=1.0... | 2,305 | Python | 24.340659 | 116 | 0.509328 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/meta/cloud/explorer/azure/data_store.py |
__all__ = ["Save_Config_Data", "Load_Config_Data"]
import carb
from .Singleton import Singleton
import omni.ui as ui
from .combo_box_model import ComboBoxModel
from pathlib import Path
import os
CURRENT_PATH = Path(__file__).parent
DATA_PATH = CURRENT_PATH.joinpath("temp")
RES_PATH = CURRENT_PATH.parent.parent.paren... | 12,674 | Python | 47.563218 | 150 | 0.621272 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/meta/cloud/explorer/azure/group_aad.py |
from .group_base import GroupBase
from pxr import Gf, UsdGeom, UsdLux, Usd, Sdf
import locale
class AADGrpView(GroupBase):
def __init__(self, viewPath:str, scale:float, upAxis:str, shapeUpAxis:str):
self._scale = scale
self._upAxis = upAxis
self._shapeUpAxis = shapeUpAxis
self.vi... | 879 | Python | 28.333332 | 83 | 0.588168 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/meta/cloud/explorer/azure/extension.py | import sys
import carb
import omni.ext
import asyncio
from functools import partial
import omni.ext
import omni.kit.ui
import omni.ui as ui
import omni.kit.pipapi
# Requires Code 2022.1.2+ - Blocked by typing_extensions incompatibility
from omni.kit.viewport.utility import get_active_viewport_window
from .views import... | 3,749 | Python | 43.117647 | 168 | 0.672713 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/meta/cloud/explorer/azure/azure_data_manager.py | # import omni.kit.pipapi
# import carb
# import os
# import json
# import sys
# from datetime import datetime
# import omni.kit.notification_manager as nm
# omni.kit.pipapi.install("azure-identity", module="azure-identity", ignore_import_check=True, ignore_cache=True, surpress_output=False,use_online_index=True )
# om... | 13,676 | Python | 38.758721 | 178 | 0.568368 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/meta/cloud/explorer/azure/rectangle.py | from omni import ui
from .constant import COLORS
# A rectangle that will block mouse events to deeper
class OpaqueRectangle(ui.Rectangle):
def __init__(self, **kwargs):
kwargs["opaque_for_mouse_events"] = True
kwargs["mouse_pressed_fn"] = lambda *_: self._dummy()
super().__init__(**kwargs... | 2,269 | Python | 36.833333 | 117 | 0.555751 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/meta/cloud/explorer/azure/packer.py | """
MIT License
Copyright (c) 2016 Michael Shihrer (michael@shihrer.me)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, ... | 5,737 | Python | 34.419753 | 104 | 0.625937 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/meta/cloud/explorer/azure/style_meta.py | # 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 rel... | 3,926 | Python | 34.378378 | 117 | 0.670148 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/meta/cloud/explorer/azure/group_base.py | from abc import ABC, abstractmethod
import omni.client
import omni.kit.app
import omni.ui as ui
import omni.usd
import omni.kit.commands
from pathlib import Path
import shutil
import os
import asyncio
import locale
import carb
from .prim_utils import create_plane
from .prim_utils import get_font_size_from_length
fr... | 11,167 | Python | 35.736842 | 142 | 0.563535 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/meta/cloud/explorer/azure/Singleton.py | class Singleton:
"""
A non-thread-safe helper class to ease implementing singletons.
This should be used as a decorator -- not a metaclass -- to the
class that should be a singleton.
The decorated class can define one `__init__` function that
takes only the `self` argument. Also, the decorated ... | 1,279 | Python | 33.594594 | 76 | 0.647381 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/meta/cloud/explorer/azure/unit_tests.py | import unittest
from .math_utils import calcPlaneSizeForGroup
class TestRGPlaneSizeCalc(unittest.TestCase):
def test_lower(self):
planeSize = calcPlaneSizeForGroup(1)
self.assertEqual(planeSize, 1)
def test_lower(self):
planeSize = calcPlaneSizeForGroup(2)
self.assertEqual(pla... | 823 | Python | 24.749999 | 45 | 0.665857 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/meta/cloud/explorer/azure/azure_resource_map.py | shape_usda_name = {
"AAD":"omniverse://localhost/MCE/3dIcons/AzureAAD_1.1.usd",
"Resource_Group":"omniverse://localhost/MCE/3dIcons/Resource_Groups_3.0.usd",
"Storage_account":"omniverse://localhost/MCE/3dIcons/StorageAccounts_2_8.usd",
"App_Service":"omniverse://localhost/MCE/3dIcons/AppServices_1.... | 9,535 | Python | 81.206896 | 115 | 0.745254 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/meta/cloud/explorer/azure/object_info_model.py | # 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 rel... | 5,078 | Python | 35.021276 | 110 | 0.611461 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/meta/cloud/explorer/azure/stage_manager.py | # This class is intended to manage the stage
# Using the requested view and the loaded dataset, we need to translate data into Prims
# There are 2 variables here. The prims you want to see, and the way you want to see them
# the data gives resource counts by subscription, group, or location.
# it also contains reso... | 11,398 | Python | 36.49671 | 177 | 0.631953 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/meta/cloud/explorer/azure/prim_utils.py | __all__ = ["create_plane", "get_font_size_from_length", "get_parent_child_prim_path", "create_and_place_prim", "log_transforms", "only_select_parent_prims"]
import sys
from tokenize import Double
import omni.usd
import omni.kit.commands
import shutil
import carb
from pathlib import Path
from pxr import Sdf
from pxr imp... | 6,658 | Python | 30.861244 | 156 | 0.580955 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/meta/cloud/explorer/azure/constant.py | from enum import Enum, IntEnum
import carb.settings
FONT_OFFSET_Y = carb.settings.get_settings().get("/app/font/offset_y") or 0
class FontSize:
Normal = 14 # Default (In VIEW, 18 pixels in real, configed by /app/font/size)
Large = 16 # real size = round(18*16/14) = 21
XLarge = 18 # real size = round(1... | 2,654 | Python | 25.55 | 83 | 0.674077 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/meta/cloud/explorer/azure/azure_map_primitives.py |
shape_usda_name = {
"AAD": "omniverse://localhost/MCE/cube.usda",
"Resource Group": "omniverse://localhost/MCE/cube.usda",
"Storage account": "omniverse://localhost/MCE/cube.usda",
"App Service": "omniverse://localhost/MCE/cube.usda",
"Subscription": "omniverse://localhost/MCE/cube.usda",
"API ... | 4,482 | Python | 58.773333 | 86 | 0.682954 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/meta/cloud/explorer/azure/views.py | # import from omniverse
from ctypes import alignment
from omni.ui.workspace_utils import TOP
# import from other extension py
from .combo_box_model import ComboBoxModel
from .style_button import button_styles
from .style_meta import meta_window_style, get_gradient_color, build_gradient_image
from .style_meta import ... | 32,845 | Python | 49.845201 | 254 | 0.565505 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/meta/cloud/explorer/azure/azure_resource_map_backup.py | shape_usda_name = {
"AAD":"omniverse://localhost/MCE/3dIcons/AzureAAD_1.1.usd",
"Resource_Group":"omniverse://localhost/MCE/3dIcons/Resource_Groups_2.0.usd",
"Storage_account":"omniverse://localhost/MCE/3dIcons/StorageAccounts_2_8.usd",
"App_Service":"omniverse://localhost/MCE/3dIcons/AppServices_1_2.us... | 5,596 | Python | 73.626666 | 114 | 0.738206 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/config/extension.toml | [package]
title = "Meta Cloud Explorer (Azure)"
description="An Omniverse scene authoring tool to help visualize your Azure Infrastructure in your own private Metaverse!"
version = "2022.1.3"
category = "Browsers"
authors = ["USDSync.com, MetaCloudExplorer.com - Gavin Stevens"]
preview_image = "data/resources/azurescal... | 1,247 | TOML | 29.439024 | 122 | 0.718524 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/docs/CHANGELOG.md | # CHANGELOG
## [2022.3.0] - 2022-11-27
### Added
- update for 2022.3, Requires Omni.Phyx.Commands extension, python library workaround outlined on wiki.
## [2022.1.3-pre] - 2022-09-08
### Added
- updated readme, some issues with release tag pulling main instead.
- merging 2022.1.3 with main
## [2022.1.3-pre] - 2022-... | 513 | Markdown | 21.347825 | 103 | 0.692008 |
USDSync/MetaCloudExplorer/exts/meta.cloud.explorer.azure/docs/README.md | # USDSync.com
# Meta Cloud Explorer (MCE)
# NVIDIA Onmiverse Extension, a Scene Authoring Tool
(In Beta Development phase)
Quickly connect to your Cloud Infrastructure and visualize it in your private Omniverse!*
This extension generates digital models of your Cloud Infrastructure that can be used to gain insights to... | 1,233 | Markdown | 46.461537 | 209 | 0.801298 |
mati-nvidia/mc-widget-library/exts/mc.widgets/mc/widgets/extension.py | import omni.ext
from .demo import DemoWindow
# Any class derived from `omni.ext.IExt` in top level module (defined in `python.modules` of `extension.toml`) will be
# instantiated when extension gets enabled and `on_startup(ext_id)` will be called. Later when extension gets disabled
# on_shutdown() is called.
class MyE... | 931 | Python | 43.38095 | 119 | 0.693878 |
mati-nvidia/mc-widget-library/exts/mc.widgets/mc/widgets/__init__.py | from .extension import *
from ._widgets import CheckBoxGroup, TabGroup | 70 | Python | 34.499983 | 45 | 0.814286 |
mati-nvidia/omni-code-with-me/README.md | # Code With Me
This repository contains NVIDIA Omniverse extensions and projects created during [my live coding sessions
on YouTube](https://www.youtube.com/@mati-codes). The goal of these projects and live coding sessions is to teach Omniverse development by example and to show developer workflows for creating Omnive... | 787 | Markdown | 70.636357 | 242 | 0.80305 |
mati-nvidia/omni-code-with-me/exts/maticodes.tutorial.framework.core/README.md | # Tutorial Framework [maticodes.tutorial.framework.core]
A framework for creating in-app tutorials for NVIDIA Omniverse.
| 122 | Markdown | 29.749993 | 63 | 0.819672 |
mati-nvidia/omni-code-with-me/exts/maticodes.tutorial.framework.core/maticodes/tutorial/framework/core/extension.py | # SPDX-License-Identifier: Apache-2.0
import omni.ext
import omni.ui as ui
from .window import TutorialWindow
# Any class derived from `omni.ext.IExt` in top level module (defined in `python.modules` of `extension.toml`) will be
# instantiated when extension gets enabled and `on_startup(ext_id)` will be called. Lat... | 949 | Python | 36.999999 | 119 | 0.734457 |
mati-nvidia/omni-code-with-me/exts/maticodes.tutorial.framework.core/maticodes/tutorial/framework/core/window.py | # SPDX-License-Identifier: Apache-2.0
import omni.ui as ui
class TutorialWindow(ui.Window):
def __init__(self):
super().__init__("Tutorial", width=300, height=300)
self.frame.set_build_fn(self._build_window)
step1 = Step(50, "Step 1", "This is step 1")
step2 = Step(60, "Step 2", "... | 1,878 | Python | 29.803278 | 71 | 0.518104 |
mati-nvidia/omni-code-with-me/exts/maticodes.tutorial.framework.core/docs/CHANGELOG.md | # Changelog
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [0.1.0] - 2023-05-09
- Pre-release version. Still WIP.
| 155 | Markdown | 16.333332 | 80 | 0.670968 |
mati-nvidia/omni-code-with-me/exts/maticodes.notify.reminder/README.md | # Save Reminder [maticodes.notify.reminder]
A simple extension that reminds you to save your work on a timer.

## Preferences
There are a few preferences that you can set to customize the functionality. You can access the preferences by clicking on Edit->Preferences.

| 320 | Markdown | 31.099997 | 141 | 0.775 |
mati-nvidia/omni-code-with-me/exts/maticodes.notify.reminder/maticodes/notify/reminder/preferences.py | # SPDX-License-Identifier: Apache-2.0
from omni.kit.window.preferences import PreferenceBuilder
from omni.kit.widget.settings.settings_widget import SettingType
import omni.ui as ui
from . import constants as c
class SaveReminderPreferences(PreferenceBuilder):
def __init__(self):
super().__init__("Remind... | 1,041 | Python | 39.076922 | 107 | 0.572526 |
mati-nvidia/omni-code-with-me/exts/maticodes.notify.reminder/maticodes/notify/reminder/constants.py | # SPDX-License-Identifier: Apache-2.0
import carb
SAVE_REMINDER_FIRED = carb.events.type_from_string("maticodes.notify.reminder.SAVE_REMINDER_FIRED")
SAVE_INTERVAL_SETTING = "/persistent/exts/maticodes.notify.reminder/save/interval"
SAVE_ENABLED_SETTING = "/persistent/exts/maticodes.notify.reminder/save/enabled"
SAVE... | 478 | Python | 38.916663 | 99 | 0.792887 |
mati-nvidia/omni-code-with-me/exts/maticodes.notify.reminder/maticodes/notify/reminder/extension.py | # SPDX-License-Identifier: Apache-2.0
import asyncio
import carb
import carb.settings
import omni.ext
import omni.kit.app
import omni.kit.notification_manager as nm
import omni.kit.window.preferences
import omni.usd
from . import constants as c
from .preferences import SaveReminderPreferences
class MaticodesNotify... | 2,676 | Python | 44.372881 | 120 | 0.692078 |
mati-nvidia/omni-code-with-me/exts/maticodes.soundboard.window/maticodes/soundboard/window/widgets.py | # SPDX-License-Identifier: Apache-2.0
import asyncio
import copy
from functools import partial
import carb
import omni.kit.app
import omni.kit.uiaudio
from omni import ui
from .config import ConfigManager, Settings
from .constants import (
DEFAULT_BUTTON_COLOR,
EDIT_BAR_HEIGHT,
GUTTER_WIDTH,
REORDER_... | 10,065 | Python | 41.652542 | 117 | 0.567213 |
mati-nvidia/omni-code-with-me/exts/maticodes.soundboard.window/maticodes/soundboard/window/config.py | # SPDX-License-Identifier: Apache-2.0
import copy
import json
import os
from pathlib import Path
import carb.settings
import carb.tokens
import omni.kit.app
class ConfigManager:
default_config = {}
user_config = {}
default_config_path = "data/default_config.json"
@classmethod
def _read_json(cls... | 3,203 | Python | 28.943925 | 109 | 0.632532 |
mati-nvidia/omni-code-with-me/exts/maticodes.soundboard.window/maticodes/soundboard/window/style.py | # SPDX-License-Identifier: Apache-2.0
import omni.ui as ui
slot_style = {
"ColorWidget": {
"margin_height": 5
},
"Rectangle::edit_bar": {
"background_color": ui.color(.04),
"border_radius": 7
}
}
def get_button_style(color):
return {
"": {
"background_c... | 619 | Python | 23.799999 | 77 | 0.513732 |
mati-nvidia/omni-code-with-me/exts/maticodes.soundboard.window/maticodes/soundboard/window/constants.py | # SPDX-License-Identifier: Apache-2.0
from pathlib import Path
import carb
REORDER_EVENT = "maticodes.soundboard.window.BUTTONS_REORDERED"
SOUNDS_CHANGED_EVENT = "maticodes.soundboard.window.SOUNDS_CHANGED"
DATA_DIR = Path("${omni_data}/exts/maticodes.soundboard.window")
USER_CONFIG_PATH = DATA_DIR / "user.config"
... | 403 | Python | 24.249998 | 67 | 0.754342 |
mati-nvidia/omni-code-with-me/exts/maticodes.soundboard.window/maticodes/soundboard/window/extension.py | # SPDX-License-Identifier: Apache-2.0
from .config import SettingsManager
import omni.ext
import omni.kit.app
from .window import Soundboard
# Any class derived from `omni.ext.IExt` in top level module (defined in `python.modules` of `extension.toml`) will be
# instantiated when extension gets enabled and `on_start... | 2,157 | Python | 35.576271 | 119 | 0.639777 |
mati-nvidia/omni-code-with-me/exts/maticodes.soundboard.window/maticodes/soundboard/window/window.py | # SPDX-License-Identifier: Apache-2.0
import copy
import shutil
from functools import partial
from pathlib import Path
from typing import List
import carb.tokens
import omni.kit.app
import omni.kit.uiaudio
import omni.ui as ui
from omni.kit.window.drop_support import ExternalDragDrop
from .config import ConfigManage... | 8,034 | Python | 41.739361 | 114 | 0.582898 |
mati-nvidia/omni-code-with-me/exts/maticodes.soundboard.window/maticodes/soundboard/window/scripts/create_default_config.py | # SPDX-License-Identifier: Apache-2.0
import json
from pathlib import Path
config_path = Path(__file__).parent.parent.parent.parent / "data" / "default_config.json"
sounds = {
"Applause": {
"uri": "data/sounds/applause.wav"
},
"Door Bell": {
"uri": "data/sounds/door_bell.wav"
},
"... | 1,441 | Python | 21.888889 | 89 | 0.536433 |
mati-nvidia/omni-code-with-me/exts/maticodes.soundboard.window/config/extension.toml | [package]
# Semantic Versioning is used: https://semver.org/
version = "1.0.0"
# The title and description fields are primarily for displaying extension info in UI
title = "Soundboard Window"
description="A sound effects soundboard. Just for fun and for learning."
# Path (relative to the root) or content of readme ma... | 1,301 | TOML | 27.304347 | 116 | 0.737125 |
mati-nvidia/omni-code-with-me/exts/maticodes.soundboard.window/docs/README.md | # Soundboard Window
This is a simple sound effects soundboard extension. Have some fun with it and use it for learning
Kit. Sound of the concepts that you can learn from the Code With Me recordings and this repository:
- Drag and Drop
- External Drag and Drop
- Modal Window
- Using persistent and transient carb.settin... | 1,151 | Markdown | 38.724137 | 187 | 0.762815 |
mati-nvidia/omni-code-with-me/exts/maticodes.layers.mute/maticodes/layers/mute/extension.py | import carb
import omni.ext
from .window import LayerMuteWindow
class LayersVisibilityExtension(omni.ext.IExt):
def on_startup(self, ext_id):
self._window = LayerMuteWindow("Layers Mute Window", width=300, height=300)
def on_shutdown(self):
self._window.destroy()
| 292 | Python | 21.53846 | 83 | 0.712329 |
mati-nvidia/omni-code-with-me/exts/maticodes.layers.mute/maticodes/layers/mute/window.py | from functools import partial
import carb
import omni.kit.commands
import omni.kit.usd.layers as usd_layers
import omni.ui as ui
import omni.usd
class LayerMuteWindow(ui.Window):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# Using ui.Frame.set_build_fn() provides a func... | 2,596 | Python | 40.887096 | 110 | 0.616333 |
mati-nvidia/omni-code-with-me/exts/maticodes.layers.mute/docs/README.md | # Layers Mute Window [maticodes.layers.mute]
A simple extension showing how to create a UI to replicate the mute functionality of the Layers Window.
| 150 | Markdown | 36.749991 | 103 | 0.8 |
mati-nvidia/omni-code-with-me/scripts/create_blenshapes.py | # SPDX-License-Identifier: Apache-2.0
import math
from pxr import Usd, UsdGeom, UsdSkel, Gf, Vt
stage = Usd.Stage.CreateNew("blendshapes.usda")
xform: UsdGeom.Xform = UsdGeom.Xform.Define(stage, "/World")
stage.SetDefaultPrim(xform.GetPrim())
stage.SetStartTimeCode(1.0)
stage.SetEndTimeCode(17.0)
UsdGeom.SetStageMe... | 2,929 | Python | 32.295454 | 86 | 0.707067 |
mati-nvidia/omni-code-with-me/scripts/basic_skel.py | # SPDX-License-Identifier: Apache-2.0
from pxr import Usd, UsdGeom, UsdSkel, Gf, Vt
stage = Usd.Stage.CreateNew("test_arm.usda")
xform: UsdGeom.Xform = UsdGeom.Xform.Define(stage, "/World")
stage.SetDefaultPrim(xform.GetPrim())
stage.SetStartTimeCode(1.0)
stage.SetEndTimeCode(10.0)
UsdGeom.SetStageMetersPerUnit(stag... | 3,222 | Python | 33.655914 | 82 | 0.655183 |
mati-nvidia/omni-code-with-me/scripts/create_prvw_surf.py | # SPDX-License-Identifier: Apache-2.0
import omni.usd
from pxr import UsdShade, UsdGeom, Sdf
stage = omni.usd.get_context().get_stage()
UsdGeom.SetStageUpAxis(stage, UsdGeom.Tokens.y)
billboard = UsdGeom.Mesh.Define(stage, "/World/billboard")
billboard.CreatePointsAttr([(-100, -100, 0), (100, -100, 0), (100, 100, 0),... | 6,068 | Python | 60.30303 | 146 | 0.798451 |
mati-nvidia/omni-code-with-me/scripts/mesh_example.py | # SPDX-License-Identifier: Apache-2.0
from pxr import Usd, UsdGeom, UsdSkel, Gf, Vt
stage = Usd.Stage.CreateNew("test_mesh.usda")
xform: UsdGeom.Xform = UsdGeom.Xform.Define(stage, "/World")
stage.SetDefaultPrim(xform.GetPrim())
# Create Mesh
mesh = UsdGeom.Mesh.Define(stage, "/World/Mesh")
points = Vt.Vec3fArray(... | 880 | Python | 24.911764 | 73 | 0.614773 |
mati-nvidia/omni-code-with-me/scripts/variant_set_basics.py | # SPDX-License-Identifier: Apache-2.0
import omni.usd
from pxr import UsdGeom
stage = omni.usd.get_context().get_stage()
xform: UsdGeom.Xform = UsdGeom.Xform.Define(stage, "/World/MyPlane")
plane: UsdGeom.Mesh = UsdGeom.Mesh.Define(stage, "/World/MyPlane/Plane")
# plane.CreatePointsAttr().Set([(-50, 0, -50), (50, 0,... | 3,934 | Python | 36.122641 | 120 | 0.647687 |
mati-nvidia/omni-code-with-me/scripts/multi_render_ctx_mtl.py | # SPDX-License-Identifier: Apache-2.0
from pxr import Sdf, UsdShade, Gf
import omni.usd
stage = omni.usd.get_context().get_stage()
mtl_path = Sdf.Path("/World/Looks/OmniSurface")
mtl = UsdShade.Material.Define(stage, mtl_path)
shader = UsdShade.Shader.Define(stage, mtl_path.AppendPath("Shader"))
shader.CreateImpleme... | 1,690 | Python | 50.242423 | 103 | 0.787574 |
mati-nvidia/scene-api-sample/README.md | # Scene API Sample Extension

## Adding This Extension
To add a this extension to your Omniverse app:
1. Go into: Extension Manager -> Gear Icon -> Extension Search Path
2. Add this as a search path: `git://github.com/matiascodesal/scene-api-sam... | 349 | Markdown | 42.749995 | 104 | 0.767908 |
mati-nvidia/scene-api-sample/exts/maticodes.scene.sample/maticodes/scene/sample/manipulators.py | from omni.ui import color as cl
from omni.ui import scene as sc
class SelectionMarker(sc.Manipulator):
"""A manipulator that adds a circle with crosshairs above the selected prim."""
def __init__(self, **kwargs):
super().__init__(**kwargs)
self._radius = 5
self._thickness = 2
s... | 1,091 | Python | 35.399999 | 100 | 0.587534 |
mati-nvidia/scene-api-sample/exts/maticodes.scene.sample/maticodes/scene/sample/extension.py | import omni.ext
import omni.kit.commands
import omni.ui as ui
from omni.ui import scene as sc
import omni.usd
from .models import CameraModel, SelectionModel
from .manipulators import SelectionMarker
# Any class derived from `omni.ext.IExt` in top level module (defined in `python.modules` of `extension.toml`) will b... | 1,802 | Python | 36.562499 | 119 | 0.660932 |
mati-nvidia/scene-api-sample/exts/maticodes.scene.sample/maticodes/scene/sample/models.py | from typing import List
import carb
import omni.kit.viewport_legacy as vp
from omni.ui import scene as sc
import omni.usd
from pxr import Gf, Sdf, Tf, Usd, UsdGeom
class SelectionModel(sc.AbstractManipulatorModel):
"""A data model storing the current selected object.
Tracks selection changes using omni.usd.... | 6,588 | Python | 37.086705 | 145 | 0.592289 |
mati-nvidia/scene-api-sample/exts/maticodes.scene.sample/config/extension.toml | [package]
# Semantic Versionning is used: https://semver.org/
version = "1.1.0"
# The title and description fields are primarily for displaying extension info in UI
title = "Scene API Sample"
description="A sample of how to mark an selected object using the omni.ui.scene API."
authors=["Matias Codesal <mcodesal@nvidia... | 945 | TOML | 28.562499 | 105 | 0.731217 |
mati-nvidia/omni-bookshelf-generator/README.md | # Bookshelf Generator
This NVIDIA Omniverse Kit Extension procedurally creates bookshelves with variable height and width and it fills the shelves with books. It is part of a series of live coding sessions that I worked on. This is a great project to study if you are interested in learning more about USD, PointInstanc... | 1,589 | Markdown | 39.76923 | 469 | 0.773442 |
mati-nvidia/omni-bookshelf-generator/exts/maticodes.generator.bookshelf/maticodes/generator/bookshelf/extension.py | # SPDX-License-Identifier: Apache-2.0
import omni.ext
from .ui import BookshelfGenWindow
# Any class derived from `omni.ext.IExt` in top level module (defined in `python.modules` of `extension.toml`) will be
# instantiated when extension gets enabled and `on_startup(ext_id)` will be called. Later when extension get... | 974 | Python | 37.999998 | 119 | 0.727926 |
mati-nvidia/omni-bookshelf-generator/exts/maticodes.generator.bookshelf/maticodes/generator/bookshelf/utils.py |
from signal import SIG_DFL
# SPDX-License-Identifier: Apache-2.0
from pxr import UsdGeom
def stage_up_adjust(stage, values, vec_type):
if UsdGeom.GetStageUpAxis(stage) == UsdGeom.Tokens.z:
return vec_type(values[0], values[2], values[1])
else:
return vec_type(*values) | 296 | Python | 23.749998 | 57 | 0.689189 |
mati-nvidia/omni-bookshelf-generator/exts/maticodes.generator.bookshelf/maticodes/generator/bookshelf/generator.py | # SPDX-License-Identifier: Apache-2.0
import random
import typing
import weakref
from pathlib import Path
import carb
import omni.kit.app
import omni.kit.commands
import omni.usd
from omni.kit.property.usd.prim_selection_payload import PrimSelectionPayload
from pxr import Gf, Sdf, Usd, UsdGeom
from .utils import sta... | 14,328 | Python | 43.638629 | 140 | 0.619417 |
mati-nvidia/omni-bookshelf-generator/exts/maticodes.generator.bookshelf/maticodes/generator/bookshelf/ui.py | # SPDX-License-Identifier: Apache-2.0
import carb
import omni.ui as ui
import omni.usd
from omni.kit.property.usd.relationship import RelationshipEditWidget
from .generator import BookshelfGenerator
class PrototypesRelEditWidget(RelationshipEditWidget):
def __init__(self, stage, attr_name, prim_paths):
... | 7,894 | Python | 46.848485 | 124 | 0.529263 |
mati-nvidia/omni-bookshelf-generator/exts/maticodes.generator.bookshelf/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 = "Bookshelf Generator"
description="A procedural modeling tool for creating bookshelves with arrayed books."
author = "Matias Codesal"
# Path (rel... | 1,129 | TOML | 27.974358 | 118 | 0.74225 |
mati-nvidia/omni-bookshelf-generator/exts/maticodes.generator.bookshelf/docs/CHANGELOG.md | ## [Unreleased]
## [1.0.0] - 2022-10-13
### Added
- Initial release of the Bookshelf Generator. Feature complete from the live coding sessions. | 144 | Markdown | 27.999994 | 93 | 0.715278 |
mati-nvidia/omni-bookshelf-generator/exts/maticodes.generator.bookshelf/docs/README.md | # Bookshelf Generator
A procedural modeling tool for creating bookshelves with arrayed books. You can set parameters like height, width, and number
of shelves to control the generator. The extension comes with a sample book asset or you can use your own books or props
as prototypes for the PointInstancer.
## Usage
1.... | 1,020 | Markdown | 55.722219 | 130 | 0.77549 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.