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

Compute or Submit selected nodes #2459

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Just-Kiel
Copy link
Contributor

Description

With this feature, it is possible to submit or compute the current selected nodes even if they are not next to each other. The dependencies are defined separately to then create the tasks.

@Just-Kiel Just-Kiel added this to the Meshroom 2024.1.0 milestone Jul 5, 2024
@Just-Kiel Just-Kiel self-assigned this Jul 5, 2024
@Just-Kiel Just-Kiel force-pushed the dev/submitOrComputeSubgraph branch from b9e8fd1 to 32b53e8 Compare July 15, 2024 09:44
Comment on lines +458 to +476
MenuItem {
text: "Compute Selected Node(s)"
visible: uigraph.selectedNodes.count > 0
height: visible ? implicitHeight : 0

enabled: {
var canCompute = false
for (var i = 0; i < uigraph.selectedNodes.count; ++i) {
if (uigraph.graph.canCompute(uigraph.selectedNodes.at(i)) && uigraph.graph.canSubmitOrCompute(uigraph.selectedNodes.at(i))%2 == 1){
canCompute = true
}
}
return canCompute
}

onTriggered: {
computeRequest(uigraph.selectedNodes)
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

There is no need to add a second menu to compute/submit the selected nodes. Everything that's done with these menus should instead be done with the regular "Compute" and "Submit" to avoid confusions for the user.

Comment on lines +484 to +500
MenuItem {
text: "Submit Selected Node(s)"
visible: uigraph.selectedNodes.count > 0
height: visible ? implicitHeight : 0

enabled: {
var canSubmit = false
for (var i = 0; i < uigraph.selectedNodes.count; ++i) {
if (uigraph.graph.canCompute(uigraph.selectedNodes.at(i)) && uigraph.graph.canSubmitOrCompute(uigraph.selectedNodes.at(i)) > 1){
canSubmit = true
}
}
return canSubmit
}

onTriggered: {
submitRequest(uigraph.selectedNodes)
Copy link
Contributor

Choose a reason for hiding this comment

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

Same

enabled: {
var canCompute = false
for (var i = 0; i < uigraph.selectedNodes.count; ++i) {
if (uigraph.graph.canCompute(uigraph.selectedNodes.at(i)) && uigraph.graph.canSubmitOrCompute(uigraph.selectedNodes.at(i))%2 == 1){
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (uigraph.graph.canCompute(uigraph.selectedNodes.at(i)) && uigraph.graph.canSubmitOrCompute(uigraph.selectedNodes.at(i))%2 == 1){
if (uigraph.graph.canCompute(uigraph.selectedNodes.at(i)) && uigraph.graph.canSubmitOrCompute(uigraph.selectedNodes.at(i)) % 2 == 1) {

enabled: {
var canSubmit = false
for (var i = 0; i < uigraph.selectedNodes.count; ++i) {
if (uigraph.graph.canCompute(uigraph.selectedNodes.at(i)) && uigraph.graph.canSubmitOrCompute(uigraph.selectedNodes.at(i)) > 1){
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (uigraph.graph.canCompute(uigraph.selectedNodes.at(i)) && uigraph.graph.canSubmitOrCompute(uigraph.selectedNodes.at(i)) > 1){
if (uigraph.graph.canCompute(uigraph.selectedNodes.at(i)) && uigraph.graph.canSubmitOrCompute(uigraph.selectedNodes.at(i)) > 1) {

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.

None yet

2 participants