Skip to content

Commit 3654022

Browse files
committed
REMIX-4798, REMIX-4766: Add more helpful node/port tooltips for Remix Logic Graph Editor
1 parent cb794dd commit 3654022

File tree

16 files changed

+226
-18
lines changed

16 files changed

+226
-18
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4242
- REMIX-4715: Make "Edit Graph" dialog a bit easier to use
4343
- Centralized prim type icon mappings in omni.flux.utils.common for reuse across extensions
4444
- Update hdremix and omni_core_materials to ext-a9cbe4d-main
45+
- REMIX-4798: Logic Graph Editor: Improved node + port tooltips and added documentation links
4546

4647
### Fixed
4748
- Improved Pyright configuration by generating a list of search paths
@@ -52,6 +53,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5253
- Fixed code formatting and lint errors across multiple extensions
5354
- REMIX-4593: Fixed logic graph and particle properties panel not preserving expansion state across refreshes
5455
- Improved a few UX issues with the Logic Properties pane
56+
- REMIX-4766: Added input validation to ensure a valid graph prim name is provided for new graphs
5557

5658
### Removed
5759
- Removed Waypoint support based on deprecated kit sample waypoint extension

docs/howto/learning-logic.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Creating Remix Logic Graphs
2+
3+
```{warning}
4+
This documentation is a work in progress.
5+
```
6+
7+
## Overview
8+
9+
Remix Logic introduces a powerful paradigm to introduce a new layer of control for remix mods.
10+
11+
Once basic asset replacements have been done, Modders often want to make the replacement content react to the state of the game. The Remix Logic system provides a flexible way to sense what's happening in the game, make decisions based on that information, and then apply visual changes accordingly. This unlocks a whole new layer of dynamic visuals.
12+
13+
```{seealso}
14+
See also the [Remix Logic Component Documentation](https://github.com/NVIDIAGameWorks/dxvk-remix/blob/main/documentation/RemixLogic.md) in the DXVK Remix repository.
15+
```
16+
17+
***
18+
19+
<sub>Need to leave feedback about the RTX Remix Documentation? [Click here](https://github.com/NVIDIAGameWorks/rtx-remix/issues/new?assignees=nvdamien&labels=documentation%2Cfeedback%2Ctriage&projects=&template=documentation_feedback.yml&title=%5BDocumentation+feedback%5D%3A+) </sub>

index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ docs/howto/learning-assets
4646
docs/howto/learning-materials
4747
docs/howto/learning-lighting
4848
docs/howto/learning-particles
49+
docs/howto/learning-logic
4950
docs/howto/learning-packaging
5051
docs/howto/learning-aitexturetools
5152
docs/howto/learning-restapi

source/extensions/lightspeed.common/config/extension.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
# Semantic Versioning is used: https://semver.org/
3-
version = "1.13.0"
3+
version = "1.14.0"
44

55
# Lists people or organizations that are considered the "authors" of the package.
66
authors = ["Alexander Jaus <[email protected]>"]

source/extensions/lightspeed.common/docs/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Changelog
22
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
33

4+
## [1.14.0]
5+
### Added
6+
- Added documentation URL constants for logic graphs and dxvk-remix
7+
48
## [1.13.0]
59
### Added
610
- Added constants for logic graph creation and editing

source/extensions/lightspeed.common/lightspeed/common/constants.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@
282282
DOCUMENTATION_URL = "https://docs.omniverse.nvidia.com/kit/docs/rtx_remix/latest/"
283283
DOCUMENTATION_ROOT_URL = f"{DOCUMENTATION_URL}docs/"
284284
QUICK_START_GUIDE_URL = f"{DOCUMENTATION_ROOT_URL}gettingstarted/learning-toolkitsetup.html"
285+
LOGIC_DOCUMENTATION_URL = f"{DOCUMENTATION_ROOT_URL}howto/learning-logic.html"
285286
RELEASE_NOTES_URL = f"{DOCUMENTATION_ROOT_URL}remix-releasenotes.html"
286287

287288
TUTORIALS_URL = f"{DOCUMENTATION_ROOT_URL}tutorials/tutorial-videos.html"
@@ -290,6 +291,8 @@
290291
)
291292
GITHUB_URL = "https://github.com/NVIDIAGameWorks/rtx-remix/"
292293
REPORT_ISSUE_URL = "https://github.com/NVIDIAGameWorks/rtx-remix/issues"
294+
DXVK_REMIX_GITHUB_URL = "https://github.com/NVIDIAGameWorks/dxvk-remix/"
295+
DXVK_REMIX_DOCUMENTATION_URL = f"{DXVK_REMIX_GITHUB_URL}blob/main/documentation"
293296

294297
REMIX_CATEGORIES = {
295298
"World UI": {

source/extensions/lightspeed.trex.logic.widget/config/extension.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
title = "Remix Logic Graph Editor"
33
description = "Component editor window for Remix Component Graphs"
4-
version = "1.2.0"
4+
version = "1.3.0"
55
authors = ["Chris Grebeldinger <[email protected]>", "Dean Edmonds <[email protected]>", "Nicolas Kendall-Bar <[email protected]>"]
66
repository = "https://gitlab-master.nvidia.com/lightspeedrtx/lightspeed-kit/-/tree/main/source/extensions/lightspeed.trex.logic.widget"
77
keywords = ["graph", "logic", "component", "remix", "ui"]

source/extensions/lightspeed.trex.logic.widget/docs/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ This document records all notable changes to the **lightspeed.trex.logic.widget*
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com). The project adheres to [Semantic Versioning](https://semver.org).
66

7+
## [1.3.0]
8+
### Added
9+
- Added node type descriptions in tooltips when hovering over nodes
10+
- Added port type info for union/any attributes showing valid connection types
11+
- Added custom documentation routing for Remix nodes to dxvk-remix docs
12+
13+
### Changed
14+
- Improved graph name input with validation for valid USD prim identifiers
15+
- Help button now links to Remix logic documentation
16+
717
## [1.2.0]
818
### Added
919
- Added missing (select all, select none, and delete selection) actions & hotkeys to the Logic Graph widget

source/extensions/lightspeed.trex.logic.widget/lightspeed/trex/logic/widget/extension.py

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
__all__ = ["RemixLogicGraphExtension"]
2121

2222
import asyncio
23+
import webbrowser
2324
from contextlib import suppress
2425
from functools import lru_cache, partial
2526
from typing import List
@@ -28,10 +29,12 @@
2829
import omni.appwindow
2930
import omni.ext
3031
import omni.graph.core as og
32+
import omni.graph.window.core.graph_delegate as graph_delegate
33+
import omni.graph.window.core.graph_operations as graph_operations
3134
import omni.kit.app
3235
import omni.kit.notification_manager as nm
3336
import omni.ui as ui
34-
from lightspeed.common.constants import GlobalEventNames, WindowNames
37+
from lightspeed.common.constants import DXVK_REMIX_DOCUMENTATION_URL, GlobalEventNames, WindowNames
3538
from lightspeed.events_manager import get_instance as _get_event_manager_instance
3639
from omni.graph.window.core import OmniGraphCatalogTreeDelegate, graph_config, register_stage_graph_opener
3740
from pxr import Sdf, Usd
@@ -43,6 +46,7 @@
4346
from .workspace import RemixLogicGraphWorkspaceWindow
4447

4548
_extension_instance = None
49+
_original_show_help_for_node_type = None
4650

4751

4852
@lru_cache
@@ -56,6 +60,31 @@ def get_instance() -> RemixLogicGraphExtension:
5660
return _extension_instance
5761

5862

63+
def _remix_show_help_for_node_type(node_type: str | og.NodeType):
64+
"""Custom help function that handles Remix nodes with custom documentation."""
65+
66+
if isinstance(node_type, str):
67+
node_type_name = node_type
68+
elif isinstance(node_type, og.NodeType):
69+
node_type_name = node_type.get_node_type()
70+
else:
71+
return
72+
73+
# Check if it's a Remix/lightspeed node
74+
if node_type_name.startswith("lightspeed."):
75+
# Construct docs URL based on the node type for Remix nodes
76+
if node_type_name.startswith("lightspeed.trex.logic."):
77+
component_name = node_type_name.split(".")[-1]
78+
doc_url = f"{DXVK_REMIX_DOCUMENTATION_URL}/components/{component_name}.md"
79+
else:
80+
doc_url = f"{DXVK_REMIX_DOCUMENTATION_URL}/components"
81+
webbrowser.open(doc_url)
82+
else:
83+
# Fall back to original behavior for non-Remix nodes
84+
if _original_show_help_for_node_type:
85+
_original_show_help_for_node_type(node_type)
86+
87+
5988
class RemixLogicGraphExtension(omni.ext.IExt):
6089
"""The entry point for the extension"""
6190

@@ -117,6 +146,12 @@ def on_startup(self, ext_id: str):
117146
self.on_load_existing_graph_action,
118147
)
119148

149+
# Monkey patch show_help_for_node_type to handle Remix nodes
150+
global _original_show_help_for_node_type
151+
_original_show_help_for_node_type = graph_operations.show_help_for_node_type
152+
graph_operations.show_help_for_node_type = _remix_show_help_for_node_type
153+
graph_delegate.show_help_for_node_type = _remix_show_help_for_node_type
154+
120155
def on_shutdown(self):
121156
global _extension_instance
122157
_extension_instance = None
@@ -145,6 +180,13 @@ def on_shutdown(self):
145180
self._create_graph_sub = None
146181
self._edit_graph_sub = None
147182

183+
# Restore original show_help_for_node_type
184+
global _original_show_help_for_node_type
185+
if _original_show_help_for_node_type is not None:
186+
graph_operations.show_help_for_node_type = _original_show_help_for_node_type
187+
graph_delegate.show_help_for_node_type = _original_show_help_for_node_type
188+
_original_show_help_for_node_type = None
189+
148190
def show_window(self, value: bool):
149191
"""Show/hide the window"""
150192
if value:

source/extensions/lightspeed.trex.logic.widget/lightspeed/trex/logic/widget/graph_model.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,37 @@
1616
"""
1717

1818
import carb.settings
19+
import omni.graph.core as og
1920
from omni.graph.window.core import OmniGraphModel
21+
from pxr import Sdf
2022

2123

2224
class RemixLogicGraphModel(OmniGraphModel):
25+
2326
def cull_legacy_prims(self):
2427
"""Return True if the OgnPrim nodes should not be created in the graph"""
2528
return not carb.settings.get_settings().get("/persistent/omnigraph/createPrimNodes")
29+
30+
def get_port_type(self, path: Sdf.Path) -> str | None:
31+
"""Returns the description of the port's attribute type, or None if there is a problem"""
32+
# Get the parent's result first
33+
result = super().get_port_type(path)
34+
35+
# If it's an unresolved union, provide more details
36+
attr: og.Attribute | None = self.get_attribute_from_path(path)
37+
if attr is not None:
38+
extended_type = attr.get_extended_type()
39+
if extended_type == og.ExtendedAttributeType.EXTENDED_ATTR_TYPE_UNION:
40+
union_types: list[str] = attr.get_union_types() # type: ignore
41+
# A little bit sneaky here but we use the opening/closing parenthesis from port_tooltip_text
42+
if union_types:
43+
return (
44+
f"Flexible type)\n\t"
45+
f"Connect a port to specify type.\n\t(Valid types: {', '.join(union_types)}"
46+
)
47+
return "Flexible type)\n\tConnect a port to specify type. \n\t(Could not determine valid types."
48+
49+
if extended_type == og.ExtendedAttributeType.EXTENDED_ATTR_TYPE_ANY:
50+
return "Flexible type)\n\tConnect a port to specify type.\n\t(Valid types: Any"
51+
52+
return result

0 commit comments

Comments
 (0)