I want to model dressed

I created a body model and a coat model. They have same animated. I try:

self.pandaActor.pose("stand",1)
self.coat.pose("stand",1)

self.coat.reparentTo(self.pandaActor)

self.coat.exposeJoint(None,"modelRoot","Neck").reparentTo(
		self.pandaActor.exposeJoint(None,"modelRoot","Neck"))
self.coat.exposeJoint(None,"modelRoot","Ribcage").reparentTo(
		self.pandaActor.exposeJoint(None,"modelRoot","Ribcage"))
self.coat.exposeJoint(None,"modelRoot","Spine").reparentTo(
		self.pandaActor.exposeJoint(None,"modelRoot","Spine"))
self.coat.exposeJoint(None,"modelRoot","Hip").reparentTo(
		self.pandaActor.exposeJoint(None,"modelRoot","Hip"))
self.coat.exposeJoint(None,"modelRoot","Shoulder.L").reparentTo(
		self.pandaActor.exposeJoint(None,"modelRoot","Shoulder.L"))
self.coat.exposeJoint(None,"modelRoot","Shoulder.R").reparentTo(
		self.pandaActor.exposeJoint(None,"modelRoot","Shoulder.R"))

When I use:

shoulderL = self.pandaActor.controlJoint(None,"modelRoot","Shoulder.L")
shoulderL.setPos(x,y,z)

self.pandaActor can change, but self.coat can’t change. I try:

self.t1 = self.coat.exposeJoint(None,"modelRoot","Shoulder.L")
self.t2 = self.pandaActor.exposeJoint(None,"modelRoot","Shoulder.L")
self.t1.reparentTo(self.t2)

Still no effect

Now I use

self.pandaActor = Actor("models/c_a_b_body",
			{"stand": "models/c_a_b_body-stand",
			"run":"models/c_a_b_body-run"})
self.pandaActor.reparentTo(self.render)
self.coat = Actor("models/c_a_b_coat",
			{"stand": "models/c_a_b_body-stand"})
self.coat.reparentTo(self.pandaActor)
self.skirt = Actor("models/c_a_b_skirt_01",
			{"stand": "models/c_a_b_body-stand"})
self.skirt.reparentTo(self.pandaActor)
self.pandaActor.pose("stand",1)
self.coat.pose("stand",1)
self.skirt.pose("stand",1)

I’m sorry, I don’t understand what question you are asking.

David

I’m sorry too, my english is terrible. I have a body model and a coat model, they are have skeleton. I want the joint for coat model follow joint for body model, when the animation is played or use joint.setPos().

self.coat.exposeJoint(None,"modelRoot","Neck").reparentTo(self.pandaActor.exposeJoint(None,"modelRoot","Neck"))

self.coat is a coat model, self.pandaAcotr is a body model. Neck is a joint.

You can’t reparent just a single joint. You can only reparent the whole model. So reparenting won’t work for a coat.

Generally, to make something like a coat that animates with the rest of the body, you will have to animate the coat and the body together in the modeling package, then attach them both to the same parent node in Panda (but not attaching the coat to the body).

David

Are you saying, the coat should play the same animation as the body at the same time? That would technically be two actors animating as one…

Yes, that’s what it would be.