Skip to content

Commit

Permalink
Merge pull request #1042 from alicevision/fix/loading3DExternalFiles
Browse files Browse the repository at this point in the history
[ui] Viewer3D: fix loading external files
  • Loading branch information
fabiencastan authored Aug 24, 2020
2 parents 04c21ff + 65138c6 commit 5a6f94e
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions meshroom/ui/qml/Viewer3D/MediaLibrary.qml
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,12 @@ Entity {
property string rawSource: attribute ? attribute.value : model.source
// whether dependencies are statified (applies for output/connected input attributes only)
readonly property bool dependencyReady: {
if(!attribute)
// if the node is removed, the attribute will be invalid
return false

const rootAttribute = attribute.isLink ? attribute.rootLinkParam : attribute
if(rootAttribute.isOutput)
return rootAttribute.node.globalStatus === "SUCCESS"
return true // is an input param so no dependency
if(attribute) {
const rootAttribute = attribute.isLink ? attribute.rootLinkParam : attribute
if(rootAttribute.isOutput)
return rootAttribute.node.globalStatus === "SUCCESS"
}
return true // is an input param without link (so no dependency) or an external file
}
// source based on raw source + dependency status
property string currentSource: dependencyReady ? rawSource : ""
Expand Down

0 comments on commit 5a6f94e

Please sign in to comment.