What is the difference between CheckType() and IsInstanceOf()?
Cairyn last edited by Cairyn
So, I normally use
C4DAtom::IsInstanceOf()to get the C4D type of an object, as this function supports the plugin IDs. But in fact, in Python there is another function
CheckType()in the same class... and I cannot see what the difference between both is.
CheckTypedoesn't seem to exist in the C++ API.
Trueif you test against a base type like
Obase, just like
IsInstanceOf. In the Python documentation, the description for both functions is the same to the letter. Is
CheckTypejust an alias, or is there a semantical difference?
In other posts here, people seem to use
IsInstanceOfthroughout. Python itself has its own
isinstance()functions for the actual class structure, so I am a bit confused now.
m_adam last edited by
Hi @Cairyn, if you speak about C4DAtom.CheckType then yes it's only an alias for IsInstanceOf (I will add a note about it in the next documentation).
Why it's there I have no clue, to be honest.
Thanks a lot for this question/feedback.
Cairyn last edited by
Yes, C4DAtom.CheckType() in Python. Thanks for the confirmation, it bugged me that it was only in the Python doc but not in the C++ doc.