EMSUSD-1518 As an artist, I want the ability to determine whether a collection includes all objects by default or not#3988
Conversation
6974ebc to
e795d1a
Compare
| ### Returns the scaled value. | ||
| return float(value) / self.uiScaleFactor | ||
|
|
||
| def icon(self, name: str) -> QIcon: |
There was a problem hiding this comment.
Is this being used somewhere?
There was a problem hiding this comment.
No, I can remove the icon function
| parentWidget.layout().addWidget(self.widget) | ||
|
|
||
| except Exception as ex: | ||
| logger.exception(ex) |
There was a problem hiding this comment.
Why do we need a logger? Can you just use print instead? Maya captures stdout for the Script Editor.
| logging.basicConfig(level=logging.DEBUG) | ||
| logger = logging.getLogger(__name__) | ||
|
|
||
| class LightLinkingCustomControl(object): |
There was a problem hiding this comment.
Please place this in a separate file like all the other custom controls.
seando-adsk
left a comment
There was a problem hiding this comment.
custom control should be a separate file.
| parentWidget.layout().addWidget(self.widget) | ||
|
|
||
| except Exception as ex: | ||
| print(ex) |
There was a problem hiding this comment.
Not a huge deal but could be a bit more descriptive:
print('Failed to create Light custom control: %s' % (ex))
| # Install shared components | ||
|
|
||
| set(MAYAUSD_SHARED_COMPONENTS usd-shared-components/src/python/usdSharedComponents) | ||
| install(FILES | ||
| ${MAYAUSD_SHARED_COMPONENTS}/collection/__init__.py | ||
| ${MAYAUSD_SHARED_COMPONENTS}/collection/widget.py | ||
| DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/python/usd_shared_components/collection/ | ||
| ) | ||
|
|
||
| install(FILES | ||
| ${MAYAUSD_SHARED_COMPONENTS}/common/__init__.py | ||
| ${MAYAUSD_SHARED_COMPONENTS}/common/list.py | ||
| ${MAYAUSD_SHARED_COMPONENTS}/common/persistentStorage.py | ||
| ${MAYAUSD_SHARED_COMPONENTS}/common/resizable.py | ||
| ${MAYAUSD_SHARED_COMPONENTS}/common/theme.py | ||
| DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/python/usd_shared_components/common/ | ||
| ) No newline at end of file |
There was a problem hiding this comment.
As agreed, we won't support this for 2022, so just wrap all this in if(MAYA_APP_VERSION VERSION_GREATER_EQUAL 2023)
| ${_SUBDIR}/displayCustomControl.py | ||
| ${_SUBDIR}/enumCustomControl.py | ||
| ${_SUBDIR}/imageCustomControl.py | ||
| ${_SUBDIR}/lightCustomControl.py |
There was a problem hiding this comment.
Move this one to the section below and just install it only for 2023.
There was a problem hiding this comment.
Just remove this one from here (as you have it below).
| from .lightCustomControl import LightLinkingCustomControl | ||
| from .observers import UfeAttributesObserver, UfeConnectionChangedObserver, UsdNoticeListener | ||
|
|
||
| import sys |
| from .displayCustomControl import DisplayCustomControl | ||
| from .materialCustomControl import MaterialCustomControl | ||
| from .metadataCustomControl import MetadataCustomControl | ||
| from .lightCustomControl import LightLinkingCustomControl |
There was a problem hiding this comment.
I think you could wrap this in a try/except block and set a boolean variable such as lightLinkingSupported. Then at line 649 below only do it when that variable is True.
seando-adsk
left a comment
There was a problem hiding this comment.
As agreed we won't support this in 2022.
Initial iteration of the new light attributes:
includeRootlight attributeThe main new file is the
widget.pyunder the collection folder. The common folder are for inheriting different Qt classes and themes.