Skip to content
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

Add display of attributes that are part of GroupAttributes and allow connection of these attributes to other ones #2544

Draft
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

cbentejac
Copy link
Contributor

Description

This PR is based on #2538 and must be merged once #2538 itself has been integrated into develop.

Features list

@cbentejac cbentejac added this to the Meshroom 2024.1.0 milestone Sep 20, 2024
Base automatically changed from dev/simplifyNodeAPI to develop September 20, 2024 20:57
@cbentejac cbentejac force-pushed the dev/connectGroupAttrs branch 2 times, most recently from 12210e5 to 12bc150 Compare September 23, 2024 16:57
@cbentejac cbentejac changed the title Add display of attributes that are part of GroupAttributes Add display of attributes that are part of GroupAttributes and allow connection of these attributes to other ones Sep 23, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant