-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add ability to register selection callbacks in usdview #663
base: dev
Are you sure you want to change the base?
Add ability to register selection callbacks in usdview #663
Conversation
Filed as internal issue #USD-4840. |
Thanks, Aloys - this is clearly needed! Can we plus the low-level Qt pattern with RAII to ensure the signal gets properly disconnected when the plugin widget dies? I.e. something like CreateSelectionSignalConnector(callback) that returns an object whose del will disconnect? |
Hi Spiff, thanks this makes sense indeed! |
From JP: Connect to the File > Open event
Introduce RAII pattern for Qt signal-slot connection
|
Thank you, JP, and Aloys! Given the information you reported, it seems like the RAII mechanism I asked for is not useful indeed, and sets up conflicting terminology in the API. Could I ask you to remove it, and also provide a brief doc string for the remaining four new methods? Thanks, looking forward to accepting this! |
I don't think you wanted to tag me here @aloysbaillet Nice to meet another Aloys though :) |
/AzurePipelines run |
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
Description of Change(s)
The UsdviewApi class now includes two new methods:
AddPrimSelectionChangedCallback()
andRemovePrimSelectionChangedCallback()
. These methods allow third-party plugins to connect Qt slots with thesignalPrimSelectionChanged
Qt signal that is emitted by the internalSelectionDataModel
object.This allows plugin views to synchronise themselves as the application selection changes.