Skip to content

Conversation

@almarouk
Copy link
Member

@almarouk almarouk commented Jun 28, 2023

Copy link
Member

@fabiencastan fabiencastan left a comment

Choose a reason for hiding this comment

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

We cannot have hardcoded information from nodes in the code engine.

Comment on lines 3 to 23
def getNodeClass(nodeType: str):
"""
Returns the appropriate subclass of `meshroom.core.node.Node` based on `nodeType`.

Inputs
------
nodeType: str
the name of the node type

Returns
-------
type[Node]
the corresponding type class
"""
if nodeType=="Meshing":
from meshroom.core.nodes.MeshingNode import MeshingNode
cls = MeshingNode
else:
from meshroom.core.node import Node
cls = Node
return cls No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

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

The NodeDesc should be able to create a node, with a default implementation that returns "Node".
And then a NodeDesc could override the default Node without having hardcoded node names in the engine.

Copy link
Member Author

@almarouk almarouk Aug 29, 2023

Choose a reason for hiding this comment

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

Proposed solution (see 87a8376):

  • move bounding box update handling to the Meshing node description
  • give Node object reference to the corresponding node description
  • add a third attribute dictionary in Node (in addition to internal and IO attributes dictionaries) that gives a flexibility to add runtime-related attributes that can be used in qml code

@almarouk almarouk requested a review from fabiencastan August 29, 2023 12:43
@cbentejac cbentejac added this to the Meshroom 2023.3.0 milestone Sep 12, 2023
@almarouk almarouk force-pushed the dev/bboxMeshing branch 2 times, most recently from 9a10a6b to 0992734 Compare March 18, 2024 11:55
- fix circular dependacy issue in import
- fix dirty hack for reading python variable "automaticBBoxValid" in qml
- remove hardcoded nodes information from the code engine
- add "runtime attributes" for more flexibility
@fabiencastan fabiencastan removed this from the Meshroom 2025.1.0 milestone Jun 5, 2025
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