-
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
MAYA-123507 - PluginLight needs to use the Light Icon instead of falling back to Xform icon #2406
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ | |
|
||
import ufe | ||
import mayaUsd | ||
from pxr import Usd | ||
from pxr import Usd, Tf | ||
|
||
from shiboken2 import wrapInstance | ||
from PySide2.QtGui import QIcon | ||
|
@@ -85,9 +85,7 @@ def testUIIcons(self): | |
# All the prim types to test | ||
usdVer = Usd.GetVersion() | ||
primTypes = [ | ||
# Prim Type # Icon file name | ||
('ALExamplePolyCubeNode', 'out_USD_UsdTyped.png'), | ||
('ALFrameRange', 'out_USD_UsdTyped.png'), | ||
# Prim Type # Icon file name | ||
('ALMayaReference', 'out_USD_MayaReference.png'), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about the ALMayaReference? Should it be moved too? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The schema for that one is in |
||
('Backdrop', 'out_USD_UsdTyped.png'), | ||
('BasisCurves', 'out_USD_UsdGeomCurves.png'), | ||
|
@@ -114,7 +112,7 @@ def testUIIcons(self): | |
('NurbsPatch', 'out_USD_NurbsPatch.png'), | ||
('OpenVDBAsset', 'out_USD_UsdGeomXformable.png'), | ||
('PackedJointAnimation', 'out_USD_SkelAnimation.png'), | ||
('PluginLight', 'out_USD_UsdGeomXformable.png' if usdVer >= (0, 21, 11) else 'out_USD_UsdLuxLight.png'), | ||
('PluginLight', 'out_USD_PluginLight.png'), | ||
('PluginLightFilter', 'out_USD_LightFilter.png'), | ||
('PointInstancer', 'out_USD_PointInstancer.png'), | ||
('Points', 'out_USD_Points.png'), | ||
|
@@ -146,6 +144,14 @@ def testUIIcons(self): | |
('PhysicsSphericalJoint', 'out_USD_UsdTyped.png') | ||
]) | ||
|
||
# Special case for node types which are in an AL schema. | ||
# They aren't available when compiling without the AL plugin. | ||
if Usd.SchemaRegistry.IsConcrete(Tf.Type.FindByName('AL_usd_FrameRange')): | ||
primTypes.extend([ | ||
('ALExamplePolyCubeNode', 'out_USD_UsdTyped.png'), | ||
('ALFrameRange', 'out_USD_UsdTyped.png') | ||
]) | ||
Comment on lines
+147
to
+153
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you build locally without the AL plugin you won't have the schema that defines these two node types. |
||
|
||
for ty,iname in primTypes: | ||
prim = self.stage.DefinePrim('/%s' % ty, ty) | ||
ufeIcon = self._getUIInfoIcon(ty) | ||
|
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.
Oops realized (after running preflight) that I forgot to add the icon here. This makes it work no matter what the USD version.