mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-03 08:48:40 +02:00
[ui] Inspector3D: add media contextual menu
Contextual menu to expose additional actions: * open media containing folder * copy media path * advanced manual control over media (un)loading + fix MediaLibrary to avoid binding loop on 'visible' when directly modifying 'request' property
This commit is contained in:
parent
272cd24fb9
commit
c3750a33c3
3 changed files with 37 additions and 5 deletions
|
@ -194,10 +194,8 @@ Entity {
|
|||
if(attribute) {
|
||||
model.source = rawSource;
|
||||
}
|
||||
// auto-restore entity if raw source is in cache ...
|
||||
// auto-restore entity if raw source is in cache
|
||||
model.requested = forceRequest || (!model.valid && model.requested) || cache.contains(rawSource);
|
||||
// ... and update media visibility (useful if media was hidden but loaded back from cache)
|
||||
model.visible = model.requested;
|
||||
model.valid = Filepath.exists(rawSource) && dependencyReady;
|
||||
}
|
||||
|
||||
|
@ -211,9 +209,13 @@ Entity {
|
|||
remove(index)
|
||||
}
|
||||
|
||||
onCurrentSourceChanged: updateModelAndCache()
|
||||
onCurrentSourceChanged: updateModelAndCache(false)
|
||||
|
||||
onFinalSourceChanged: {
|
||||
// update media visibility
|
||||
// (useful if media was explicitly unloaded or hidden but loaded back from cache)
|
||||
model.visible = model.requested;
|
||||
|
||||
var cachedObject = cache.pop(rawSource);
|
||||
cached = cachedObject !== undefined;
|
||||
if(cached) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue