-
Notifications
You must be signed in to change notification settings - Fork 202
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this being used somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please place this in a separate file like all the other custom controls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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/ | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As agreed, we won't support this for 2022, so just wrap all this in if(MAYA_APP_VERSION VERSION_GREATER_EQUAL 2023)
@@ -29,6 +29,7 @@ foreach(_SUBDIR ${MAYAUSD_AE_TEMPLATES}) | |||
${_SUBDIR}/displayCustomControl.py | |||
${_SUBDIR}/enumCustomControl.py | |||
${_SUBDIR}/imageCustomControl.py | |||
${_SUBDIR}/lightCustomControl.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this one to the section below and just install it only for 2023.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just remove this one from here (as you have it below).
from .observers import UfeAttributesObserver, UfeConnectionChangedObserver, UsdNoticeListener | ||
|
||
import sys |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need "sys"?
@@ -21,8 +21,10 @@ | |||
from .displayCustomControl import DisplayCustomControl | |||
from .materialCustomControl import MaterialCustomControl | |||
from .metadataCustomControl import MetadataCustomControl | |||
from .lightCustomControl import LightLinkingCustomControl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As agreed we won't support this in 2022.
Initial iteration of the new light attributes:
includeRoot
light attributeThe main new file is the
widget.py
under the collection folder. The common folder are for inheriting different Qt classes and themes.