Skip to content

Commit b3aef33

Browse files
author
Matthieu Hog
committedOct 8, 2024
changes for uid renaming
added back menu after update fix for existing symlink
1 parent b477031 commit b3aef33

File tree

3 files changed

+28
-14
lines changed

3 files changed

+28
-14
lines changed
 

‎meshroom/core/plugin.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,11 @@ def installPlugin(pluginUrl):
170170
if isLocal:
171171
os.symlink(pluginParam.nodesFolder, intallFolder)
172172
if os.path.isdir(pluginParam.pipelineFolder):
173-
os.symlink(pluginParam.pipelineFolder, os.path.join(pluginsPipelinesFolder, pluginParam.pluginName))
173+
pipelineFolderLink = os.path.join(pluginsPipelinesFolder, pluginParam.pluginName)
174+
if os.path.exists(pipelineFolderLink):
175+
logging.warn("Plugin already installed, will overwrite")
176+
os.unlink(pipelineFolderLink)
177+
os.symlink(pluginParam.pipelineFolder, pipelineFolderLink)
174178
else:
175179
copy_tree(pluginParam.nodesFolder, intallFolder)
176180
if os.path.isdir(pluginParam.pipelineFolder):
@@ -298,7 +302,7 @@ def getCommandLine(chunk):
298302
raise RuntimeError("The project needs to be saved to use plugin nodes")
299303
saved_graph = loadGraph(chunk.node.graph.filepath)
300304
if (str(chunk.node) not in [str(f) for f in saved_graph._nodes._objects]
301-
or chunk.node._uids[0] != saved_graph.findNode(str(chunk.node))._uids[0] ):
305+
or chunk.node._uid != saved_graph.findNode(str(chunk.node))._uid ):
302306
raise RuntimeError("The changes needs to be saved to use plugin nodes")
303307

304308
cmdPrefix = ""
@@ -342,7 +346,7 @@ def getCommandLine(chunk):
342346

343347
return command
344348

345-
# you may use these to esplicitly define Pluginnodes
349+
# you may use these to explicitly define Pluginnodes
346350
class PluginNode(desc.Node):
347351
pass
348352

‎meshroom/ui/qml/Application.qml

+21-10
Original file line numberDiff line numberDiff line change
@@ -825,6 +825,18 @@ Page {
825825
ToolTip.visible: hovered
826826
ToolTip.text: removeImagesFromAllGroupsAction.tooltip
827827
}
828+
829+
MenuItem {
830+
action: installPluginFromFolderAction
831+
ToolTip.visible: hovered
832+
ToolTip.text: "Install plugin from a folder"
833+
}
834+
835+
MenuItem {
836+
action: installPluginFromURLAction
837+
ToolTip.visible: hovered
838+
ToolTip.text: "Install plugin from a local or online url"
839+
}
828840
}
829841
MenuSeparator { }
830842
Action {
@@ -1298,18 +1310,17 @@ Page {
12981310
var n = _reconstruction.upgradeNode(node)
12991311
_reconstruction.selectedNode = n
13001312
}
1301-
}
13021313

1303-
onDoBuild: {
1304-
try {
1305-
_reconstruction.buildNode(node.name)
1306-
node.isNotBuilt=false
1307-
} catch (error) {
1308-
//NOTE: could do an error popup
1309-
console.log("Build error:")
1310-
console.log(error)
1314+
onDoBuild: {
1315+
try {
1316+
_reconstruction.buildNode(node.name)
1317+
node.isNotBuilt=false
1318+
} catch (error) {
1319+
//NOTE: could do an error popup
1320+
console.log("Build error:")
1321+
console.log(error)
1322+
}
13111323
}
1312-
13131324
}
13141325
}
13151326
}

‎meshroom/ui/qml/GraphEditor/Node.qml

-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ Item {
3131
property point position: Qt.point(x, y)
3232
/// Styling
3333
property color shadowColor: "#cc000000"
34-
//readonly property color defaultColor: isCompatibilityNode ? "#444" : ((isPlugin && isNotBuilt) ? "#444": (!node.isComputable ? "#BA3D69" : activePalette.base))
3534
readonly property color defaultColor: isCompatibilityNode ? "#444" : (!node.isComputable ? "#BA3D69" : activePalette.base)
3635
property color baseColor: defaultColor
3736

0 commit comments

Comments
 (0)
Please sign in to comment.