-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve sample context exploration #679
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use option action for viewing mode Do not throw an exception when, during the loading of a plugin picker action, a plugin is not available Add general shortcuts to the view plugin Change option action selection icon Small cosmetic code changes Remove widget fader debug print statements
…n the view plugin sampler action
…Studio/core into feature/sample_context
alxvth
approved these changes
Sep 12, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose of this PR
This PR provides extended sampling support in view plugins by offering more flexibility on how sample information is collected and presented to the user (see videos below).
Sampling is based on either:
SamplingMode::Selection
)In this mode, the view plugin updates the sample context whenever its selection changes, it calls
ViewPluginSamplerAction::setSampleContext(const SampleContext& sampleContext)
. The sample context is aQVariantMap
and depends on the type of view plugin.SamplingMode::FocusRegion
)The
ViewPluginSamplerAction::sampleContextRequested()
signal is called periodically in this mode. The view plugin collects the samples in response to the signal and callsViewPluginSamplerAction::setSampleContext(const SampleContext& sampleContext)
to update the current sample context.When the current sample context changes, an HTML-formatted view string is generated by calling the current
ViewPluginSamplerAction::ViewGeneratorFunction
, which is set withViewPluginSamplerAction::setViewGeneratorFunction(...)
. The generated view is then either:ViewingMode::None
)ViewingMode::Tooltip
)ViewingMode::Windowed
)Note:
ViewPluginSamplerAction::initialize(...)
needs to be called for this action to work properly. In addition to a pointer to a view plugin, it requires two pointers to pixel selection actions:To this end, the
ViewPluginSamplerAction
is extended with aViewingMode
setting that determines whether the sample information is shown in theViewPlugin
tooltip or a separate view plugin.Added plugin
To facilitate the windowed view of view plugin samples, a
SampleScopePlugin
has been developed.Added actions
Selecting the source plugin in the
SampleScopePlugin
user interface is possible using a newly introducedPluginPickerAction
. This action resembles theDatasetPickerAction
.On the horizon...
It would be nice to hide/show the sample context window based on the view plugin focus. However, due to technical limitations, this isn't easy at the moment.
Note: To test this out, I'd advise to use this branch in concert with this SPP branch.