For what it is (in Actor.init():
self.Actor_initialized = 1
From whom .assign(), .setGeomNode() are inherited, I have not found them in DirectObject and NodePath. What they are doing ?
The Actor_initialized bit is just intended to make sure that no harm ensues if the Actor constructor is inadvertently called twice (for instance, due to multiple inheritance).
assign() is inherited from NodePath; it copies the NodePath value from another NodePath.
setGeomNode() is not inherited, it is defined within Actor. It specifies the node that is considered the “geom node” of the Actor, or the root of the character hierarchy.
whence were obtained? :
(showbase.Loader.Loader or showbase.ShowBase.ShowBase or …), what types it returns - Character, GeomNode …?
is there LOD in the static model ?
Actor.__geomNode is set internally within the Actor code; you can tell this because the leading double underscore is the Python convention for a private member.
autobind() is a C++ function that is documents in the API reference.
loader.loadModel() is the standard way to load an egg file or other model file from Python. There are many many examples of its use in pretty much every sample program. It returns a NodePath.
is this equivalent ?
[color=green]self.assign(NodePath()) and [color=green]NodePath.copyTo(self)
i didn’t find autobind() in c++/python reference, give me a link please.
No, these are not equivalent. Remember, a NodePath is just a handle to a PandaNode, and the NodePath itself doesn’t contain any data other than that handle.
So np1.assign(np2) changes the handle within np1 to be the same handle within np2. But np1.copyTo(np2), on the other hand, makes a complete copy of the PandaNode referenced by np1, and attaches that copy as a child of np2 (and returns a new NodePath that references the copy).
The auto_bind() function is described here. It’s a low-level function defined within Panda to facilitate the binding of animations with skeletons.
You appear to be studying the code in Actor.py to understand precisely what it is doing. This is commendable, but if your ultimate goal is to learn Panda, this may not be the best approach–Actor.py is hardly a shining example of clean, readable Panda code. On the other hand, if your goal is to come to a complete understanding of Actor for some other reason, it might actually be better to gain more experience with Panda first, so that it will be easier to understand the techniques that are employed by this code.
autoBind () and auto_bind() - not a trivial task of searching for a newbie, 'll know how to dig ).