Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
JenNVIDIA committed Oct 31, 2023
1 parent c2b7202 commit d450326
Show file tree
Hide file tree
Showing 16 changed files with 65 additions and 20 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ _*/
/app

exts/omni.example.gesture_adv/*
link_app.sh
tools/packman/python.sh

10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ Run:

```shell
# Linux
~$ link_app.sh
~$ ./link_app.sh
```

If successful you should see `app` folder link in the root of this repo.

If multiple Omniverse apps is installed script will select recommended one. Or you can explicitly pass an app:
If multiple Omniverse apps are installed the script will select the recommended one. Or you can explicitly pass an app:

```bash
# Windows
Expand All @@ -67,10 +67,10 @@ If multiple Omniverse apps is installed script will select recommended one. Or y

```shell
# Linux
> link_app.sh --app code
~$ ./link_app.sh --app code
```

You can also just pass a path to create link to:
You can also pass a path that leads to the Omniverse package folder to create the link:

```bash
# Windows
Expand All @@ -79,7 +79,7 @@ You can also just pass a path to create link to:

```shell
# Linux
> link_app.sh --path "home/bob/.local/share/ov/pkg/create-2022.1.3"
~$ ./link_app.sh --path "home/bob/.local/share/ov/pkg/create-2022.1.3"
```

## Contributing
Expand Down
10 changes: 8 additions & 2 deletions exts/docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,7 @@ def move(transform, shape):

2. **Add** the following import at the top of the `window.py`:
- `from functools import partial`
- Partial functions allow for a more limited function with fewer parameters and fixed values.

3. **Update** DragGesture's `on_changed_fn` to look like the following:

Expand Down Expand Up @@ -653,6 +654,7 @@ class GestureWindowExample(ui.Window):
]
)
transform = sc.Transform(transform=sc.Matrix44.get_translation_matrix(0,0,-1))
with transform:
sc.Rectangle(
2,
2,
Expand Down Expand Up @@ -765,6 +767,7 @@ class GestureWindowExample(ui.Window):
]
)
transform = sc.Transform(transform=sc.Matrix44.get_translation_matrix(0,0,-1))
with transform:
sc.Rectangle(
2,
2,
Expand Down Expand Up @@ -903,7 +906,7 @@ class LineManipulator(sc.Manipulator):

## Step 7.4: Add a Gesture Manager

The Gesture Manager works the same way when added in `window.py`. However, this time we will specify which gesture to prevent.
The Gesture Manager works the same way when added in `line.py`. However, this time we will specify which gesture to prevent.

1. **Add** the following code after the imports:
```python
Expand Down Expand Up @@ -960,6 +963,9 @@ class LineManipulator(sc.Manipulator):
)
```

**Save** `line.py` and go back to Omniverse. Now we can freely drag the line in the viewport.
**Save** `line.py` and go back to Omniverse. Now we can freely drag the line along the X-Axis in the viewport.

![](./images/step7-4.gif)


Scene manipulators are essential tools in NVIDIA Omniverse for controlling, editing, and arranging 3D scenes. Explore [advanced scene manipulator](https://github.com/NVIDIA-Omniverse/kit-extension-sample-ui-scene) options to deepen your understanding of creating custom scene manipulation tools.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
# Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
Expand Down
8 changes: 8 additions & 0 deletions link_app.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

set -e

SCRIPT_DIR=$(dirname ${BASH_SOURCE})
cd "$SCRIPT_DIR"

exec "tools/packman/python.sh" tools/scripts/link_app.py $@
2 changes: 1 addition & 1 deletion tools/packman/bootstrap/configure.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:: Copyright 2019 NVIDIA CORPORATION
:: Copyright 2023 NVIDIA CORPORATION
::
:: Licensed under the Apache License, Version 2.0 (the "License");
:: you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion tools/packman/bootstrap/download_file_from_url.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<#
Copyright 2019 NVIDIA CORPORATION
Copyright 2023 NVIDIA CORPORATION
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:: Copyright 2019 NVIDIA CORPORATION
:: Copyright 2023 NVIDIA CORPORATION
::
:: Licensed under the Apache License, Version 2.0 (the "License");
:: you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion tools/packman/bootstrap/generate_temp_file_name.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<#
Copyright 2019 NVIDIA CORPORATION
Copyright 2023 NVIDIA CORPORATION
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion tools/packman/bootstrap/generate_temp_folder.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<#
Copyright 2019 NVIDIA CORPORATION
Copyright 2023 NVIDIA CORPORATION
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion tools/packman/bootstrap/install_package.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2019 NVIDIA CORPORATION
# Copyright 2023 NVIDIA CORPORATION

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion tools/packman/packman
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# Copyright 2019-2020 NVIDIA CORPORATION
# Copyright 2023 NVIDIA CORPORATION

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
32 changes: 32 additions & 0 deletions tools/packman/python.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

# Copyright 2023 NVIDIA CORPORATION

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -e

PACKMAN_CMD="$(dirname "${BASH_SOURCE}")/packman"
if [ ! -f "$PACKMAN_CMD" ]; then
PACKMAN_CMD="${PACKMAN_CMD}.sh"
fi
source "$PACKMAN_CMD" init
export PYTHONPATH="${PM_MODULE_DIR}:${PYTHONPATH}"
export PYTHONNOUSERSITE=1

# workaround for our python not shipping with certs
if [[ -z ${SSL_CERT_DIR:-} ]]; then
export SSL_CERT_DIR=/etc/ssl/certs/
fi

"${PM_PYTHON}" -u "$@"

0 comments on commit d450326

Please sign in to comment.