TransformControls question

Hey, so I have some code to use a recursive raycaster object to select dae models in the scene. I then have it select the object with TransformControls. I can successfully move the dae I’m testing by manually attaching TransformControls to it, but when I use the raycaster, it selects models in the dae instead of the entire dae scene. Those sub-models cannot be moved, as when I move the TransformControls gizmo, only the gizmo moves, not the actual model. I’ve noticed the same issue in the ThreeJS editor, where I can only move the entire model right after importing, but if I try to select it after that it doesn’t work. This could be related to an armature I have in my dae. If so, is there a way to apply the armature and then get rid of it? I don’t need any animation, so if the problem is with the armature then it would be fine to discard it.

Ok, I can confirm it is most likely because of the armature. I have removed it in blender and it seems to work fine. My only questions left are these:

  1. How can I automate applying and removing the armature?
  2. How can I have the raycaster select the entire mesh and not just part of it?

Hm, I was able to get it to work by using this:

transformControl.attach( selectedObject.parent.children[0]);
instead of this:
transformControl.attach( selectedObject);