Commit graph

43 commits

Author SHA1 Message Date
Fabien Castan
06543f89a9 [core] use more explicit argument name: setupFileRef 2019-09-21 18:19:17 +02:00
Fabien Castan
231125efdf [ui] improve meshroom command line
- "meshroom -h / --help": now provides command line documentation (so
argparse is done before GUI creation)
- new positional argument to set project file or input folder
- new "--pipeline" option to set a default pipeline, also support an
environment variable
2019-09-12 21:14:52 +02:00
Yann Lanthony
d229743c3d
[ui] update graph computing status when NodeChunks change
Ensure graph computing status is properly updated after deleting a node that was running
2019-07-25 14:40:05 +02:00
Yann Lanthony
36fc7ea069
[ui] GraphEditor: add "Refresh Nodes Status" MenuItem
Enables the user to force the re-evaluation of nodes status.
2019-07-24 18:04:39 +02:00
Yann Lanthony
f6a42cb86e
[ui] Nodes status monitoring simplification
* store status file last modification time on NodeChunk
* ChunksMonitor: don't stop the underlying thread when changing chunks, only modify the list of monitored files + use a mutex for thread-safety
2019-07-24 18:02:29 +02:00
Yann Lanthony
88b0297660
[ui] Graph: update ChunkMonitor after 'saveAs'
Saving file on disk impacts cache folder location and therefore status files paths; force re-evaluation of monitored filepaths at the end of a "saveAs" operation.
2019-07-08 19:48:06 +02:00
Yann Lanthony
e40b0e57b8
[ui] ChunksMonitor: asynchronous status files modification time polling
* make last modification time check on status asynchronous using a dedicated thread + use a ThreadPool to run tasks in parallel
* avoid UI freeze when checking for status updates + increase performances
2019-05-07 12:32:38 +02:00
Yann Lanthony
fc3e17e6d4 [ui] Graph: force '.mg' extensions on saved files
Depending on the 'Save File Dialog' used (OS/Qt fallback implementation), it is possible to save the meshroom graph with another extension, making it impossible to reload it via File>Open (due to the filter allowing only *.mg files).
2019-01-29 16:12:19 +01:00
Yann Lanthony
d10c779914 [ui] GraphEditor: add "Delete From Here" in node contextual menu
* ease the deletion of a branch from a given starting point
* accessible with alt+del on a node
* re-order menu to put the most destructive operation (Clear Data) at the very end
2019-01-07 10:47:25 +01:00
Yann Lanthony
1f2baf43c3 [ui.utils] makeProperty: generate and store reset calllback on instance
* change 'destroyCallback' function to 'resetOnDestroy' boolean parameter
* create a dedicated lambda to reset value to None when object is destroyed and attach it to the target instance
* only way to keep a reference to this function that can be used for destroyed signal (dis)connection with instance accessible
2018-12-13 15:54:44 +01:00
Yann Lanthony
05854ed897 [ui] UIGraph: add hoveredNode property + node hovering visual feedback
* keep track of currently hovered node in UIGraph on Python side
* Node: show border on hover + make MouseArea contain everything else to always get hover events, even when cursor is over children attribute pins
2018-12-07 16:07:42 +01:00
Yann Lanthony
5b991053a8 [ui] UIGraph: add selectedNode property
move node selection management to the Python side
2018-12-07 16:07:42 +01:00
Yann Lanthony
400835d8f8 [core] Attribute: expose 'fullName' as property 2018-11-19 15:17:36 +01:00
Yann Lanthony
fc8ea7ca18 [ui] GraphLayout: fix bouding box computation
correctly initialize width and height with first item
2018-08-06 10:37:45 +02:00
Yann Lanthony
72a657ec48 [ui] hide 'Submit' button if no submitter available 2018-08-03 17:24:04 +02:00
Yann Lanthony
2bd06c4edb [ui][graph] do layout reset for graphs without NodesPositions Feature
allow to set initial position for older projects or new projects that have not been saved yet
2018-07-26 22:46:23 +02:00
Yann Lanthony
f415745a4a [ui] make Nodes moves undoable
Handle nodes move and auto-layout on Python side by using GraphLayout and MoveNodeCommand.

* Node QML component relies on underlying core.Node object's position
* MoveNodeCommand is called after a Node has been dragged
* partial/full auto-layout for specific graph operations (Duplication, Augmentation...) are now part of those operations
* serialized position in node data allows to properly restore nodes coordinates on undo/redo
* remove all layout/node moving code from QML
2018-07-26 22:46:22 +02:00
Yann Lanthony
830173047c [ui][commands] Duplicate/UpgradeNode: return created Node instances 2018-07-26 22:43:48 +02:00
Yann Lanthony
734540abba [ui] add 'GraphLayout' python class
this class aims to replace auto layout done on the QML side, to rely on MoveNodeCommand and be accessible from Python code
2018-07-26 21:44:50 +02:00
Yann Lanthony
ac4772fc57 [ui][commands] add MoveNodeCommand
add undoable command to move a Node to a target position
2018-07-26 18:01:11 +02:00
Yann Lanthony
dd3d9cd54b [core][ui] add upgradeAllNodes methods
+ check if node is upgradable in UpgradeNodeCommand
2018-07-20 17:55:30 +02:00
Yann Lanthony
2952e11691 [core] move duplicateNode methods to core.graph
handle this low-level operation engine side

* fix ListAttribute children links duplication
* handle CompatibilityNode duplication
* move corresponding unit test in test_graph.py
* [ui] add DuplicateNodeCommand
2018-07-19 13:50:45 +02:00
Yann Lanthony
a18d75c0f9 [ui][commands] expose UpgradeNode command 2018-07-19 13:50:45 +02:00
Yann Lanthony
1d309136ec [core][node] serialization: rename 'attributes' to 'inputs' 2018-07-19 13:50:45 +02:00
Yann Lanthony
dbf2649621 [ui.graph] fix node duplication method
* duplicate all nodes before re-creating edges
* add unit test
2018-06-27 18:46:51 +02:00
Yann Lanthony
1f675a0e42 [core] split graph.py into separate modules
core.graph is now splitted into: 
  * graph.py
  * node.py
  * attribute.py
2018-06-26 12:19:14 +02:00
Yann Lanthony
168866aed0 [core] rename 'graph.isLink' to 'graph.isLinkExpression'
avoid confusion with Attribute.isLink method
2018-06-18 14:58:36 +02:00
Yann Lanthony
99d6068250 [graph] make ListAttribute connectable at root level
ListAttribute can now be connected :
 * at root level to another ListAttribute (new)
 * at child level to basic Attributes
2018-06-18 14:58:35 +02:00
Yann Lanthony
2cd724f957 [graph] ListAttribute: replace '__getitem__ by 'at'
__getitem__ is spuriously called when the object is used inside a Qt model and exposed to QML, leading to unexpected behaviors
2018-06-18 14:43:18 +02:00
Yann Lanthony
5b586a2810 [ui] use sorted NodeChunks to handle global progression
Simplify global progression handling by directly considering the list of NodeChunks (sorted by visit order) instead of the list of Nodes.
2018-05-28 16:23:01 +02:00
Yann Lanthony
2e4d9b85e6 [ui] UIGraph: rename 'addNode' to 'addNewNode' to match core.graph API 2018-03-21 15:53:34 +01:00
Yann Lanthony
4f392a310b [commands] GroupedGraphModification: add 'disableUpdates' option
gives control over whether graph updates should be disabled during this grouped modification
2018-03-21 15:53:34 +01:00
Yann Lanthony
88d5c0ca3f [ui] UIGraph: add Node duplication methods
* duplicate one node
* duplicate all nodes from a specific node
2018-02-12 17:59:07 +01:00
Yann Lanthony
25992286d0 [ui] add partial graph submission up to a certain node 2018-02-07 14:35:50 +01:00
Yann Lanthony
4a71ebb212 [ui] add UIGraph.resetAttribute method 2018-02-05 18:24:13 +01:00
Yann Lanthony
aa0f08354b [ui] UIGraph: stop previous graph execution before setting the new one 2018-01-15 15:15:46 +01:00
Yann Lanthony
4e5b995618 [ui] handle python values in UIGraph.appendAttribute 2018-01-15 15:02:18 +01:00
Yann Lanthony
affd2b2fdf [ui] add UIGraph.begin/endModification methods
alternative to create grouped graph modifications where the use of a contextmanager is not possible
2018-01-15 14:59:02 +01:00
Yann Lanthony
4ea793be74 [ui] return command result after pushing it to the undo stack
this allows to directly retrieve, for instance, the node created by UIGraph.addNode method
2018-01-12 13:59:07 +01:00
Yann Lanthony
49c3491534 [graph] expose NodeChunks log files as properties 2017-12-28 21:26:26 +01:00
Yann Lanthony
531d75140f [ui] ChunksMonitor: evaluate status filepaths at each timer event
Don't store status filepaths since they might change after a graph update, without the NodeChunks being themselves modified.
2017-12-04 12:36:21 +01:00
Yann Lanthony
16db901d86 [core] NodeChunks as a ListModel + [ui] DFS sorted nodes proxy model
* core: NodeChunks are now stored in a ListModel inside Node
* ui: introduce SortedModelByReference
* ui: UIGraph exposes a proxy model of its graph's nodes sorted as visited by DFS (instead of another model of chunks)
* ui: added NodeChunks Component
2017-11-28 21:43:15 +01:00
Yann Lanthony
0e08291f8a [ui] introduce UIGraph + ChunksMonitor
* extract UIGraph from Reconstruction: base class that wraps a core.Graph, without knowledge of photogrammetry pipeline
* ChunksMonitor: watch NodeChunks status files for external changes to keep UI updated even when the graph is being computed externally
* Reconstruction inherits UIGraph with photogrammetry specific features
2017-11-24 17:20:13 +01:00