<div>Hi everyone, </div><div><div><br></div><div>I am looking for a Python method to link/append/import objects in Blender that would give me back some info about what has been appended (in the best case a list of the imported objects instances)... </div>

<div><br></div><div>For instance: let say that in a .blend file I have a car made of the main structure which contain 4 wheels. </div><div>Code:</div><div>bpy.ops.wm.link_append(directory=&quot;/home/pierrick/atrv.blend/Object&quot;, link=False, </div>

<div>  files=[{&#39;name&#39;: &#39;ATRV&#39;}, {&#39;name&#39;: &#39;Wheel.4&#39;}, {&#39;name&#39;: &#39;Wheel.3&#39;}, {&#39;name&#39;: &#39;Wheel.2&#39;}, {&#39;name&#39;: &#39;Wheel.1&#39;}])</div><div><br></div><div>

if there was already an object called ATRV, my car will be renamed ATRV.001, </div><div>it would be nice to get an instance of the objects, to avoid pasing by bpy.data.object </div><div><br></div><div>Same with collada: it would be amazing if: </div>

<div>Code:</div><div>bpy.ops.wm.collada_import(filepath=&quot;/home/pierrick/atrv.dae&quot;)</div><div><br></div><div>could return something like: </div><div>Code:</div><div>you_just_imported = { </div><div>  &#39;ATRV&#39;: [ </div>

<div>    &#39;Wheel1&#39;, </div><div>    &#39;Wheel2&#39;, </div><div>    &#39;Wheel3&#39;, </div><div>    &#39;Wheel4&#39; </div><div>  ] </div><div>}</div><div><br></div><div><br></div><div>Where the string are the real-name of the object in the Blender instance. </div>

<div>With .001 if there was already another object with the same name in the scene. </div><div><br></div><div>... </div><div>In fact, I&#39;m working on Robotics <a href="http://wiki.blender.org/index.php/Robotics:Contents">http://wiki.blender.org/index.php/Robotics:Contents</a> </div>

<div><a href="https://github.com/pierriko/morse/blob/master/src/morse/builder/morsebuilder.py#L61">https://github.com/pierriko/morse/blob/master/src/morse/builder/morsebuilder.py#L61</a> </div><div><a href="https://github.com/pierriko/morse/blob/master/examples/morse/scenarii/ros_example.py">https://github.com/pierriko/morse/blob/master/examples/morse/scenarii/ros_example.py</a> </div>

<div><a href="http://www.openrobots.org/wiki/morse">http://www.openrobots.org/wiki/morse</a> </div><div>... </div><div><br></div><div>Any idea? shall I open an issue for that? </div><div>Cheers,</div></div><div><br></div>

<div>Pierrick</div><div><br></div><div>= This message is cross-posted on <a href="http://www.blender.org/forum/viewtopic.php?t=20112">http://www.blender.org/forum/viewtopic.php?t=20112</a> =</div>