State:New|TargetRelease:No Target|icon_bug|icon_katana|database:public|Resolution:Fixed|BugID:303883|
Problem summary:
Customers may wish to create a customized light filter class that supports child packages. This should be possible by inheriting from GroupPackage and LightFilterPackage, but due to an issue with the order of inheritance of GroupPackage / LightFilterPackage, such a class definition results in a TypeError.
Steps to reproduce:
Run the following code in the Python tab:
from Katana import Pluginsimport PackageSuperToolAPIGroupPackage = PackageSuperToolAPI.Packages.GroupPackageLightFilterPackage = Plugins.GafferThreeAPI.PackageClasses.LightFilterPackageclass CustomLightFilterPackage(LightFilterPackage, GroupPackage): pass Expected behaviour:
The code runs without errors
Actual behaviour:
A TypeError is raised:
File "<string>", line 7, in <module> class CustomLightFilterPackage(LightFilterPackage, GroupPackage):TypeError: Error when calling the metaclass bases Cannot create a consistent method resolution order (MRO) for bases Mixin, Package Workaround:
No known workaround.
Reproduced versions/platforms:
Customer version/platform:
Not supplied
We're sorry to hear that
Please tell us why