State:Closed|icon_bug|icon_katana|database:public|Resolution:Fixed|BugID:533146|TargetRelease:6.0v2|
Problem summary:
When loading custom MSC plugins on the KATANA_RESOURCES path, internal plugins will be prioritized over the custom ones.
Steps to reproduce:
Create a MSC plugin file in the Plugins dir with a very similar 3Delight color MSC to the internal 3Delight MSC, e.g:
from PluginAPI.BaseMaterialSoloingConverter import BaseMaterialSoloingConverterimport NodegraphAPIclass BaseDeprioritized3DelightMSC(BaseMaterialSoloingConverter):def getName(self): return str(type(self).__name__)def getBaseShadingNodeType(self): return "DlShadingNode"def _checkCompatibleRaise(self, portToSolo): if self.isCompatible(portToSolo): return raise RuntimeError(f"Port to solo, with tags {portToSolo.getTags()}, is incompatible " + f"with {type(self).__name__}.")class Deprioritized3DelightColorMSC(BaseDeprioritized3DelightMSC):def isCompatible(self, portToSolo): return ("color" in portToSolo.getTags() and (portToSolo.getNode().getType() == self.getBaseShadingNodeType()))def createConversionNetwork(self, portToSolo, mscContainerGroup): self._checkCompatibleRaise(portToSolo) surfaceShader = self._createShadingNode("surfaceShader", mscContainerGroup) return (surfaceShader.getInputPort("i_color"), { "dlSurface": surfaceShader.getOutputPort("outColor") })PluginRegistry = [ ("MaterialSoloingConverter", 1, "Deprioritized3DelightColorMSC", Deprioritized3DelightColorMSC), ] 4. Launch Katana (confirm plugin path is picked up)
5. Create an NMC with a dlColor node inside it
6. In the python tab run the following:
from PyUtilModule.MaterialSoloingConverterPlugins import ( GetMaterialSoloingConverters, GetPreferredMaterialSoloingConverterByPortType )colorPort = NodegraphAPI.GetNode('dlColor').getOutputPort('outColor') print(GetMaterialSoloingConverters()) 6. And then run the following:
print(GetPreferredMaterialSoloingConverterByPortType(colorPort)) Expected behaviour:
The output of GetPreferredMaterialSoloingConverterByPortType should be: <__plugins4__.Deprioritized3DelightMSC.Deprioritized3DelightColorMSC object at 0x000001979F7EBBE0>
Actual behaviour:
The output of GetPreferredMaterialSoloingConverterByPortType is: <__plugins5__.MaterialSoloingConverters3Delight.ColorToDlSurfaceMSC3Delight object at 0x000001979F7F1640>
Workaround:
No known workaround.
Tested versions/platforms:
Customer version/platform:
Not supplied
We're sorry to hear that
Please tell us why