-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support display and connection of attributes that are part of GroupAttributes
#2544
Open
cbentejac
wants to merge
8
commits into
develop
Choose a base branch
from
dev/connectGroupAttrs
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+448
−40
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cbentejac
force-pushed
the
dev/connectGroupAttrs
branch
2 times, most recently
from
September 23, 2024 16:57
12210e5
to
12bc150
Compare
cbentejac
changed the title
Add display of attributes that are part of
Add display of attributes that are part of Sep 23, 2024
GroupAttributes
GroupAttributes
and allow connection of these attributes to other ones
cbentejac
force-pushed
the
dev/connectGroupAttrs
branch
from
September 26, 2024 15:07
66ce81e
to
0e0455d
Compare
cbentejac
force-pushed
the
dev/connectGroupAttrs
branch
from
October 4, 2024 16:12
0e0455d
to
0cdfd8b
Compare
cbentejac
changed the title
Add display of attributes that are part of
Support display and connection of attributes that are part of Oct 8, 2024
GroupAttributes
and allow connection of these attributes to other onesGroupAttributes
cbentejac
force-pushed
the
fix/minorUiFixes
branch
from
October 15, 2024 14:05
dcece1d
to
12249de
Compare
cbentejac
force-pushed
the
dev/connectGroupAttrs
branch
from
October 16, 2024 07:54
0cdfd8b
to
3e6b6c0
Compare
For attributes in `GroupAttribute` and `ListAttribute`, the notion of parent attribute exists through the `root` property. As a parent can itself have a parent, the `depth` property describes how many levels there are between the attribute and the root level. A value of 0 means that the attribute is at the root level, and it increases as it gets deeper.
`flattenedChildren` returns the list of all the attributes that refer to this attribute as their parent (either direct or indirect) through the `root` property. The search for the children attributes is recursive and alllows to retrieve at once all the nested attributes, independently from their level. At the moment, only `ListAttribute` and `GroupAttribute` will return a non-empty list of flattened children attributes.
…escription's The `exposed` property, which determines whether the attribute is displayed on the upper part of the node in the Graph Editor, is set for each attribute individually in their node's description. If an attribute has a parent (meaning it depends on a `GroupAttribute` or a `ListAttribute`) whose `exposed` property value differs, it does not make sense to display it separately from it. The attribute's `exposed` should align with its parent's.
If an attribute belongs to a `GroupAttribute` or a `ListAttribute`, it has a parent, and its full name is "parentName.attributeName". Instead of displaying only "attributeName" in the tooltip, this commit now displays "parentName.attributeName" to ensure that the link is obvious.
cbentejac
force-pushed
the
dev/connectGroupAttrs
branch
from
October 21, 2024 09:04
3e6b6c0
to
ab0a2b9
Compare
The test ensures that if the attributes within `GroupAttributes` are connected to each other, the graph can be saved and reloaded without triggering compatibility issues for these nodes.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR is based on #2538 and must be merged once #2538 itself has been integrated into
develop
.It also relies on some UI fixes introduced in #2563.
The main feature of this pull request is that it adds the support of connections between attributes that are part of a
GroupAttribute
. Prior to this PR, these attributes could neither be connected individually, nor be displayed in the Graph Editor; they were however visible and editable in the Node Editor.GroupAttributes
are now displayed in the Graph Editor with a tiny "+" symbol which means they can be expanded when clicked upon. When this happens, all the children attributes of the clickedGroupAttribute
are displayed below it, with an italic font to indicate visually a difference. Children attributes are displayed recursively, and aGroupAttribute
that contains a childGroupAttribute
will have it displayed as well (but collapsed by default).Connections between the attributes are shown when both attributes are currently displayed in the Graph Editor. If one of the attributes is hidden, the edge will disappear, but the pin of the attribute that is still visible will remain full, signalling an existing connection.
2024-10-07_17-56-36.mp4
Features list
GroupAttribute
or aListAttribute
(or both). An attribute that has no parent will have a depth of 0, and it will increase of 1 for every parent;exposed
property take precedence over their own. This for example prevents having attributes within groups that are exposed while the group itself is not, which would break the hierarchy of the display for theseGroupAttributes
;GroupAttributes
and display their children attributes in their node in the Graph Editor. These children attributes are graphically connectable.childAttribute
is a child of a groupgroupAttribute
, its name will be displayed asgroupAttribute.childAttribute
, making the relationship between the two obvious.