any efficient way to load instance in physics scene?

Hi all,

I am trying to load all instance_rigid_body and instance_rigid_constraint and then assemble them together for our engine format. We have to load from <physics_scene> because there is possible of overriding information between instance_rigid_body and rigid_body (5-15 in spec)

Here is the pipeline of parsing physics scene:

<instance_rigid_constraint> + physics_mode url ==> <rigid_constraint> in <physics_model> ==> <rigid_body> in <physics_model> ==> have to search <instance_rigid_body> in <physics_scene> for that?

It seems that we have to do some search to retrieve <instance_rigid_body> information if we start from <instance_rigid_constraints>. Is there any better way to load them?

Thanks a lot

I just want to point another possible drawbacks about current Maya plug-ins and please let me know if I am wrong,

  1. Not use <rigid_body> in <physics_model> efficiently. For example, there are 5 <instance_rigid_body> and 5 <rigid_body> in my sample file. So no use of feature of instance. I assume that there should be less than 5 <rigid_body>, and <instance_rigid_body> can override information of <rigid_body>.

  2. Even we have several different characters and each of them is assigned physics property in Maya. The exported DAE file only contains one physics model and everything is in it. Should I change some property to make plug-ins generate several physics models?

Thanks a lot