Duplicating parts of a model

Hi! I’m sort of new to using Python & Panda3D in general, and I’d like to figure out how to add more arms to my model.

Here’s the code:

cog = Actor ('/Users/pamorin/Desktop/ttoff-alpha/resources/phase_3.5/models/char/suitA-mod.bam', {'ANIM':'/Users/pamorin/Desktop/ttoff-alpha/resources/phase_7/models/char/suitA-fountain-pen.bam'})
cog.loop('ANIM')
cog.reparentTo(render)
cog.find('**/hands').setColor(0.3, 0.3, 0.55, 1.0)
cog.setPos(0, -10, 0)

myTex = loader.loadTexture('/Users/pamorin/Desktop/ttoff-alpha/resources/phase_3.5/maps/l_blazer.jpg')
cog.findAllMatches('**/torso').setTexture(myTex, 1)
myTex2 = loader.loadTexture('/Users/pamorin/Desktop/ttoff-alpha/resources/phase_3.5/maps/l_leg.jpg')
cog.findAllMatches('**/legs').setTexture(myTex2, 1)
myTex3 = loader.loadTexture('/Users/pamorin/Desktop/ttoff-alpha/resources/phase_3.5/maps/l_sleeve.jpg')
cog.findAllMatches('**/arms').setTexture(myTex3, 1)

head = loader.loadModel('/Users/pamorin/Desktop/ttoff-alpha/resources/phase_4/models/char/suitA-heads.bam').find('**/legaleagle')
head.reparentTo(cog.find('**/joint_head'))

Then here’s the parts of the “cog” model:

PandaNode models
  ModelRoot suitA-mod.egg
    Character suitA
      GeomNode legs (1 geoms: S:(TextureAttrib))
      GeomNode  (6 geoms: S:(ColorAttrib TextureAttrib))
      GeomNode hands (2 geoms: S:(ColorAttrib TextureAttrib))
      GeomNode torso (1 geoms: S:(TextureAttrib))
      GeomNode arms (1 geoms: S:(TextureAttrib))
      ModelNode joint_Lhold T:m(pos -3.8686 -0.0661902 5.3884 hpr 3.42359 0.144555 0.209412) E:(CharacterJointEffect)
      ModelNode joint_Rhold T:m(pos 4.62322 -0.128683 5.3331 hpr -0.222782 0 0) E:(CharacterJointEffect)
      ModelNode joint_head T:m(pos 0 0 6.05805) E:(CharacterJointEffect)
      ModelNode joint_nameTag E:(CharacterJointEffect)
      ModelNode joint_shadow T:m(pos 0 0 0.00625) E:(CharacterJointEffect)
      ModelNode joint_attachMeter T:m(pos 0 0.854822 4.8371 hpr 0 -12.6051 0) E:(CharacterJointEffect)
      ModelNode to_shoulder T:m(pos 0 0 5.42172) E:(CharacterJointEffect)
      ModelNode to_head T:m(pos 0 0 6.05807) E:(CharacterJointEffect)

I’m trying to duplicate the arms before I start making a texture, since I’m making something funny for a friend…
But I can’t figure it out for the life of me D:

Since it does appear to be a multipart character, you should be able to just find() the appropriate arms part and use copyTo(cog) and then position the returned NodePath as you wish. I don’t know how well this will work with animated models, though; it might screw up the skinning information.

Ah, thank you! It worked first try, believe it or not. :mrgreen:

It did then sorta screw with the hand textures, but I was able to correct that.

EDIT

I swapped out the animation and I just.

“hey steve whats up”
“nothing just chilling out with FOUR ARMS”