Conversation
Most likely yes.
You cannot, not unless pybind has something for it. The common thing to do is parse the C++ text files, which in our case might be possible? E.g. any line that starts with
Shouldn't we override it, to return our own name? |
|
@scottenglert I thought I could add you as a reviewer but looks like I can't, so quick ping to notify you of this PR.
Yeah, that's why I wanted to dynamically get the name of the class to avoid re-implementing this in all subclasses. I just noticed that the tests technically failed but they got marked as if they passed on the github actions, not quite sure why that is but I can look into that as well. |
|
Has anyone actually have used the "className" in real code? I have not and I agree with just calling the |
|
Ahaha, good point! Safe to ignore that method. :) |
|
I think I'll implement it but raise something like |
This PR implements the Bindings for
MFnBaseand makesMFnDependencyNodea subclass of it, as well asMFnDagNodea subclass ofMFnDependencyNodeI also noticed that the MDGModifier and MDagModifier classes were defined exactly like the other classes in
ForwardDeclarations.inlso I've updated that.MFnBasehas two methods that have been added in Maya 2020, I think I managed to get them to compile only for the right releases of cmdc but we'll see.I do feel like this means we should release a version of the stubs per maya version though? Otherwise when working with 2019 we'll get completion on methods that don't exist.
I'm expecting this to fail at the moment because
MFnBase::className()returnsMFnBaseand notFnBaselike I think we would expect.I'm not actually sure how to dynamically get the name of the class in C++?
I'm also not really sure that this even matters as we can just call
MFnBase.__name__in python.