How to Get a Joint Object from a tag

On 25/03/2014 at 09:18, xxxxxxxx wrote:

So I am coding a python tag plugin and I have a text box that I can drag a joint object to, but how do I pull that data from the text box in code.  What type of object should I use to get that data?  This is the code I have in the python file

SOURCE_LINK = 1001
FINAL_LINK = 1002

def Execute(self, tag, doc, op, bt, priority, flags) :
      tag = op.GetFirstTag()
      data = tag.GetDataInstance()
      pos = op.GetAbsPos()
      self.source_cd = c4d.modules.character.CAJointObject()
      self.final_cd = c4d.modules.character.CAJointObject()
      self.source_cd = data.GetData(SOURCE_LINK)
      self.final_cd = data.GetData(FINAL_LINK)

My plan is to take the y value of the source joint and apply it to the final joint, Is this the correct way to get that Joint object?

Any thoughts would be greatly appreciated.
Jimmy

On 25/03/2014 at 13:36, xxxxxxxx wrote:

So it looks as if I've found the solution in the following code.

self.source_cd = c4d.modules.character.CAJointObject()            
       self.final_cd = c4d.modules.character.CAJointObject()

self.source_cd = data.GetData(SOURCE_LINK)
      self.final_cd = data.GetData(FINAL_LINK)
     
      myMatrix = c4d.Matrix()
      myMatrix,len = self.source_cd.GetBone()

Now off to learn about the Matrix object 🙂