Make Standalone Viewer automatically link when it opens

There is a linked option in the configuration options, but it does not work. Is it an issue?
Edit:
Without using a script, I would need to check that option and click the button every time to enable it.

// ViewerAutoLink
// (c) 2023 Ken

// This is a script for Directory Opus.
// See https://www.gpsoft.com.au/DScripts/redirect.asp?page=scripts for development information.



// Called by Directory Opus to initialize the script
function OnInit(initData)
{
	initData.name = "ViewerAutoLink";
	initData.version = "1.0";
	initData.copyright = "(c) 2023 Ken";
//	initData.url = "https://resource.dopus.com/c/buttons-scripts/16";
	initData.desc = "Auto-track the selected file in the window in which the viewer is opened";
	initData.default_enable = true;
	initData.min_version = "13.0";


}

// Called when an event takes place in the standalone viewer
function OnViewerEvent(viewerEventData)
{
	if (!viewerEventData.viewer.parentlisterlinked && viewerEventData.event == "setfocus")
	    viewerEventData.viewer.Command('listerlink')
}
1 Like

Do you mean Preferences / Viewer / Standalone Viewer / Link both ways (file display selection tracks Lister-linked viewer)?

That works. It doesn't auto-link anything though. It changes what happens when a viewer is linked.

Opening a linked viewer can be done via commands. With the Opus 13 default toolbars, a right-click on the viewer pane button (left of the search field, top-right of the window) will open a lister-linked viewer.

That button runs this:

Show LISTERLINK USEEXISTING=yes,avoid

You could change other buttons/events that open viewers to do the same if you want them to always be lister-linked.

Got it, I'll set up a shortcut key for this, thanks!
Show FULLSCREEN LISTERLINK USEEXISTING=yes,avoid

1 Like

See how you find it. If you think it's an option a lot of people might want, we could probably add a checkbox in Preferences to make it the default (without having to know about commands etc.).

I always saw lister-linking as something that would be really useful for some tasks, but also get in the way with others, so I didn't originally think about making it the viewer's default mode. But you're the second person to ask about it, so maybe it makes sense as an option.

But see how you find it, in case you end up wanting to turn it on and off all the time, in which case an on/off option wouldn't help. :smiley:

2 Likes

try this method to have it always enabled

1 Like

I think it's very useful, especially the search results list.
I assigned the shortcut key F11 and the command Show FULLSCREEN LISTERLINK USEEXISTING=yes,avoid to the list, and the viewer also assigned the same shortcut key F11 and the command Show VIEWERCMD=close.

@galaxyhub This is for people who want to set as default viewer.
I'm not sure what other people want.

I, too, think it's very useful. I set it to left double-click for images.

IMO this should be default. Would be nice to have it in the preferences :ok_hand:.

2 Likes

Being an artist having to manage tons of images, this is the ONE option I've been missing since I have dopus. It should definitely be an option. You click any image in Dopus, it updates the Standalone Viewer with that image. Exactly the same behavior as the Viewer Pane inside the main Dopus Window.

Thanks a lot galaxyhub for the script. So great to see this finally working in Dopus 13.

Little issue though:

  • If I'm in the Standalone Viewer or the main Dopus, if I click on different images, if updates the Standalone Viewer's image: perfect.
  • But if I'm in the main window, and I move in the images using the keys on keyboard,then for some reason there's a delay before the image actually appears in the Lister-Linked Standalone Window.

Not sure what might cause that.

Hopefuly we'll soon have an option to tick in preferences to get this function accessible easily for artists who have to go through tons of images per day.

Cheers. Great update so far, just for that.

I've been using the lister-linked for a few hours. And I'd say it would be much better to have a button IN the Standalone Viewer, to be able in 1 click to link or unlink the Viewer. Most of the time I'm personaly super happy to finally be able to see the Viewer updated as I browser my files. But right now, working on datasets to train an AI model, I realize that being able to link or not the viewer, quickly (rather than just something to tick in preferences, which would already be something), with just button.

There already is. :slight_smile: Your Viewer toolbar just needs updating to the new defaults. (Only happens automatically if it had not been edited, to avoid trashing people’s modifications when they update.)

1 Like