Skip to content

Commit

Permalink
changes for uid renaming
Browse files Browse the repository at this point in the history
added back menu after update

fix for existing symlink
  • Loading branch information
Matthieu Hog committed Oct 8, 2024
1 parent b477031 commit b3aef33
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 14 deletions.
10 changes: 7 additions & 3 deletions meshroom/core/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,11 @@ def installPlugin(pluginUrl):
if isLocal:
os.symlink(pluginParam.nodesFolder, intallFolder)
if os.path.isdir(pluginParam.pipelineFolder):
os.symlink(pluginParam.pipelineFolder, os.path.join(pluginsPipelinesFolder, pluginParam.pluginName))
pipelineFolderLink = os.path.join(pluginsPipelinesFolder, pluginParam.pluginName)
if os.path.exists(pipelineFolderLink):
logging.warn("Plugin already installed, will overwrite")
os.unlink(pipelineFolderLink)
os.symlink(pluginParam.pipelineFolder, pipelineFolderLink)
else:
copy_tree(pluginParam.nodesFolder, intallFolder)
if os.path.isdir(pluginParam.pipelineFolder):
Expand Down Expand Up @@ -298,7 +302,7 @@ def getCommandLine(chunk):
raise RuntimeError("The project needs to be saved to use plugin nodes")
saved_graph = loadGraph(chunk.node.graph.filepath)
if (str(chunk.node) not in [str(f) for f in saved_graph._nodes._objects]
or chunk.node._uids[0] != saved_graph.findNode(str(chunk.node))._uids[0] ):
or chunk.node._uid != saved_graph.findNode(str(chunk.node))._uid ):
raise RuntimeError("The changes needs to be saved to use plugin nodes")

cmdPrefix = ""
Expand Down Expand Up @@ -342,7 +346,7 @@ def getCommandLine(chunk):

return command

# you may use these to esplicitly define Pluginnodes
# you may use these to explicitly define Pluginnodes
class PluginNode(desc.Node):
pass

Expand Down
31 changes: 21 additions & 10 deletions meshroom/ui/qml/Application.qml
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,18 @@ Page {
ToolTip.visible: hovered
ToolTip.text: removeImagesFromAllGroupsAction.tooltip
}

MenuItem {
action: installPluginFromFolderAction
ToolTip.visible: hovered
ToolTip.text: "Install plugin from a folder"
}

MenuItem {
action: installPluginFromURLAction
ToolTip.visible: hovered
ToolTip.text: "Install plugin from a local or online url"
}
}
MenuSeparator { }
Action {
Expand Down Expand Up @@ -1298,18 +1310,17 @@ Page {
var n = _reconstruction.upgradeNode(node)
_reconstruction.selectedNode = n
}
}

onDoBuild: {
try {
_reconstruction.buildNode(node.name)
node.isNotBuilt=false
} catch (error) {
//NOTE: could do an error popup
console.log("Build error:")
console.log(error)
onDoBuild: {
try {
_reconstruction.buildNode(node.name)
node.isNotBuilt=false
} catch (error) {
//NOTE: could do an error popup
console.log("Build error:")
console.log(error)
}
}

}
}
}
Expand Down
1 change: 0 additions & 1 deletion meshroom/ui/qml/GraphEditor/Node.qml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ Item {
property point position: Qt.point(x, y)
/// Styling
property color shadowColor: "#cc000000"
//readonly property color defaultColor: isCompatibilityNode ? "#444" : ((isPlugin && isNotBuilt) ? "#444": (!node.isComputable ? "#BA3D69" : activePalette.base))
readonly property color defaultColor: isCompatibilityNode ? "#444" : (!node.isComputable ? "#BA3D69" : activePalette.base)
property color baseColor: defaultColor

Expand Down

0 comments on commit b3aef33

Please sign in to comment.