AcademySoftwareFoundation / AcademySoftwareFoundation/MaterialX

Specification Proposal: Support for nodegraph inheritance

Open
#932 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.3k
Forks
451
Avg merge
6d 6h
Merged PRs (30d)
5

Description

# Nodegraph Inheritance Proposal

This proposal is to allow for one nodegraph to inherit from another nodegraph.
This is for the same purpose of any existing support for inheritance including per node, and per nodedef.

There possible interpretations are as follows, given a nodegraph B which inherits from nodegraph A:

1. B only inherits the interface of A but the "internals" (nodes in the nodegraph) do not necessary need to match A.
2. B inherits all the elements( nodes, inputs, outputs and interfaces) of A.
3. B inherits all internal elements (nodes, inputs, outputs) but not interfaces of A.

1, and 2 are "additive" model in which the interface cannot change.
3. Allows for arbitrary interface changes.

# Properties:
1. There are interfaces to query only those elements belonging to B.
2. There are interfaces to query all elements in A and B.
3. All existing nodegraph associations can still be supported including:
- usage as compound nodegraphs
- usage as functional nodegraphs. Supporting nodedef and implementations to both use inheritance.
- association via implementation elements (part of 1.39 specification addition).

# Examples

`USDUvTexture` definition. (Note that all outputs must be defined due to an issue which exists at time of writing with signature resolution).
```xml





















```
Implementation with inheritance with additional output.
```xml























```
Current implementation:
```xml












































```

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are identified. The proposal presents three inheritance models and requests query interfaces plus compatibility with existing nodegraph associations; the implementation's completion criteria would need to be defined before work can begin.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.