Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
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. CheckType doesn't seem to exist in the C++ API.
C4DAtom::IsInstanceOf()
CheckType()
CheckType
CheckType returns True if 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 CheckType just an alias, or is there a semantical difference?
True
Obase
IsInstanceOf
In other posts here, people seem to use IsInstanceOf throughout. Python itself has its own type() and isinstance() functions for the actual class structure, so I am a bit confused now.
type()
isinstance()
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.
Cheers, Maxime.
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.