This question feels a bit awkward, like it’s simultaneously small enough to just be asked on the discord but at the same time I feel what I need to ask would make sense without a bit of background information attached, so here we go.
I’m using interrogate to generate c++ wrappers for a custom class that derives from ActorNode, which in turn derives from PhysicalNode.
When I initially compiled the pyd file and tried to test it I was met with this error:
file "boxToolNeo.py", line 14, in <module>
from gamecode.acrossGame.playerEntityBase import *
NameError: name 'PhysicalNode' is not defined
After a little research I discovered from here the -import command for Interrogate_module. After a little more expirementation, I discovered that if I use -import panda3d.physics everything works perfectly.
I do worry about this though, since this would probably import the entirety of panda3d.physics instead of the components that are actually utilized. I of course tried something like -import panda3d.physics.ActorNode but this got me a much more vague error.
does anyone happen to know of a cheaper way of dealing with this sort of problem?
Thanks,
JAMS
EDIT: this might have something to do with the fact that interrogate’ s only generating an init/pyinit function for the library, and not the module. For now, I’ll treat that as a separate issue.
Double Edit: I forgot to mention that importing panda3d.core resolves the actornode dependency, but not the actornode’s own dependency of physicalnode.