SOLVED. Replacement sub-parts of an Actor panda3d

How can I replace a sub-part of my actor?

I want to replace a sub-part with your “part dictionary” and “dictionary of animation dictionaries” of the part, for example the head, torso, legs, etc.

Note:

I want to change the part after creating the actor

myactor = Actor(
 
    # part dictionary
    {"head":"char/dogMM/dogMM_Shorts-head-mod", 
     "torso":"char/dogMM/dogMM_Shorts-torso-mod", 
     "legs":"char/dogMM/dogMM_Shorts-legs-mod"}, 
 
    # dictionary of anim dictionaries
    {"head":{"walk":"char/dogMM/dogMM_Shorts-head-walk", 
             "run":"char/dogMM/dogMM_Shorts-head-run"}, 
     "torso":{"walk":"char/dogMM/dogMM_Shorts-torso-walk", 
              "run":"char/dogMM/dogMM_Shorts-torso-run"}, 
     "legs":{"walk":"char/dogMM/dogMM_Shorts-legs-walk", 
             "run":"char/dogMM/dogMM_Shorts-legs-run"} 
     })

regards

You can call loadModel() to add parts to an existing Actor. You can call removePart() to remove an existing part.

You can also call hidePart() and showPart() to hide and show existing parts without removing them, which may be an easier and faster way to achieve the same effect, depending on your precise needs.

David

I found the actor’s properties. thank you very much

https://www.panda3d.org/reference/1.8.0/python/namespaceactor.Actor.php#a8516f8879ececa16a675b6a7a88b36f6