LumaPictures / usd-qt

Reusable Qt Components for Pixar's USD
Other
153 stars 41 forks source link

Ability to provide a custom MenuBuilder #7

Closed csaez closed 6 years ago

csaez commented 6 years ago

Hi there,

In previous iterations we were able to seamlessly integrate our in-house commands into context menues by providing a custom MenuBuilder layering the in-house logic, unfortunately looks like this feature is not available anymore.

https://github.com/LumaPictures/usd-qt/blob/9d87cada5ad65fd118bbbc8a36db167f7d66f741/pxr/usdQt/qtUtils.py#L288

Do you envision a better way to integrate custom systems into context menus? Otherwise, would it be possible to provide a setter of sorts so we can provide our own MenuBuilder externally?

Thanks!

csaez commented 6 years ago

Oh, scratch that... After further inspection, it looks like the new approach is to provide a custom OutlinerRole wrapping the execution of our in-house commands in MenuAction instances.

Sorry for the noise.

nrusch commented 6 years ago

Cool, glad you got it sorted.