Skip to content

[core] Add new type of ChoiceParam that changes dynamically#2350

Merged
cbentejac merged 5 commits into
developfrom
dev/dynamicChoices
Apr 8, 2024
Merged

[core] Add new type of ChoiceParam that changes dynamically#2350
cbentejac merged 5 commits into
developfrom
dev/dynamicChoices

Conversation

@Just-Kiel

@Just-Kiel Just-Kiel commented Mar 27, 2024

Copy link
Copy Markdown
Contributor

Add new type of ChoiceParam that changes dynamically according to other values.

When value of an attribute is changed onAttributeChanged is called, allowing to have unique reaction within node files.

Also add of callDesc function to be able to have other functions such as onNodeCreated at creation of node.

@Just-Kiel Just-Kiel self-assigned this Mar 27, 2024
@Just-Kiel Just-Kiel force-pushed the dev/dynamicChoices branch 2 times, most recently from 153e970 to b42e647 Compare March 28, 2024 10:57
… to other values

Add new type of ChoiceParam that changes dynamically according to other
values.

When value of an attribute is changed onAttributeChanged is called,
allowing to have unique reaction within node files.

Also add of callDesc function to be able to have other functions such as
onNodeCreated at creation of node.
@Just-Kiel Just-Kiel force-pushed the dev/dynamicChoices branch from b42e647 to 498fd6c Compare March 28, 2024 11:07
Update of values from tuple to list for ChoiceParam to be consistent
everywhere.

Before it was not a problem but because of dynamic choices we expect it
to be editable list.
… list

Check of value type of ChoiceParam according to first value in list.

We want to support something else than string.
Renaming and documentation added to onAttributeChanged and
optionalCallOnDescriptor.
Comment thread meshroom/core/desc.py Outdated
Comment thread meshroom/core/attribute.py Outdated

@fabiencastan fabiencastan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, just one minor thing to fix.

@Just-Kiel Just-Kiel force-pushed the dev/dynamicChoices branch from dc166c3 to eda3203 Compare April 8, 2024 10:05
@cbentejac cbentejac added this to the Meshroom 2024.1.0 milestone Apr 8, 2024
@cbentejac cbentejac merged commit 9edfc39 into develop Apr 8, 2024
@cbentejac cbentejac deleted the dev/dynamicChoices branch April 8, 2024 12:52
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.

3 participants