<div dir="ltr">Many thanks Bastien!<div>    It makes total sense! I've been using it today and it is sooo helpful to know this. Is this documented somewhere? I'd like to read more about it. Interesting, seems to only work with relative paths? Is that correct? If so is this based on a user pref setting or just how it is?</div><div><br></div><div>Kind Regards<br><div>                                </div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 24, 2016 at 8:00 PM,  <span dir="ltr"><<a href="mailto:bf-python-request@blender.org" target="_blank">bf-python-request@blender.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send Bf-python mailing list submissions to<br>
        <a href="mailto:bf-python@blender.org">bf-python@blender.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://lists.blender.org/mailman/listinfo/bf-python" rel="noreferrer" target="_blank">https://lists.blender.org/mailman/listinfo/bf-python</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:bf-python-request@blender.org">bf-python-request@blender.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:bf-python-owner@blender.org">bf-python-owner@blender.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Bf-python digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. duplicate name entries in D.objects (James Crowther)<br>
   2. Re: duplicate name entries in D.objects (Bastien Montagne)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Fri, 24 Jun 2016 10:47:30 +1000<br>
From: James Crowther <<a href="mailto:jamesharrycrowther@gmail.com">jamesharrycrowther@gmail.com</a>><br>
Subject: [Bf-python] duplicate name entries in D.objects<br>
To: <a href="mailto:bf-python@blender.org">bf-python@blender.org</a><br>
Message-ID:<br>
        <<a href="mailto:CAJOwpNumH1_K2Ypdgi5rTY023dbpC3P_rEMf2NAELimWJFpHLQ@mail.gmail.com">CAJOwpNumH1_K2Ypdgi5rTY023dbpC3P_rEMf2NAELimWJFpHLQ@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi, just trying to understand why there are sometimes more than one entry<br>
in D.objects with the same name? This behaviour was a little unexpected for<br>
me since I had assumed that these collection types behaved similarly to<br>
python dictionaries since they resemble them closely in that they have a<br>
name, value pattern.<br>
However, in a python dictionary it is not valid to have two entries with<br>
the same name. This is certainly not the case for D.objects which clearly<br>
can support more than one entry with the same name.<br>
<br>
I have experimented with renaming objects from the properties panel. Lets<br>
say there is an object named 'Cube', if I add another object and rename it<br>
to 'Cube', the object that had originally held the name 'Cube' is renamed<br>
to 'Cube.001'<br>
<br>
So I was surprised to find that in D.objects, there are duplicates and<br>
would like to understand why this happens, how to reproduce this behaviour<br>
and whether this is useful behaviour or a byproduct of some other feature?<br>
<br>
Kind Regards<br>
<br>
James<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.blender.org/pipermail/bf-python/attachments/20160624/b31c9fca/attachment.html" rel="noreferrer" target="_blank">http://lists.blender.org/pipermail/bf-python/attachments/20160624/b31c9fca/attachment.html</a><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Fri, 24 Jun 2016 09:59:31 +0200<br>
From: Bastien Montagne <<a href="mailto:montagne29@wanadoo.fr">montagne29@wanadoo.fr</a>><br>
Subject: Re: [Bf-python] duplicate name entries in D.objects<br>
To: <a href="mailto:bf-python@blender.org">bf-python@blender.org</a><br>
Message-ID: <<a href="mailto:63814405-a438-1831-194b-73a2918d33c0@wanadoo.fr">63814405-a438-1831-194b-73a2918d33c0@wanadoo.fr</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi James,<br>
<br>
Name uniqueness of IDs (by types) is only ensured inside a given .blend<br>
file. It means that if you link datablocks from libraries, you can<br>
easily end up with several ones of the same type and the same name.<br>
<br>
To access those, you must use the tuple (ID_name, lib_path) (lib_path<br>
being None for current .blend data) - same to uniquely identify them in<br>
a dict e.g.:<br>
<br>
bpy.data.objects["Cube", "/my/path/to/library.blend"]<br>
<br>
Cheers,<br>
Bastien<br>
<br>
Le 24/06/2016 ? 02:47, James Crowther a ?crit :<br>
> Hi, just trying to understand why there are sometimes more than one<br>
> entry in D.objects with the same name? This behaviour was a little<br>
> unexpected for me since I had assumed that these collection types<br>
> behaved similarly to python dictionaries since they resemble them<br>
> closely in that they have a name, value pattern.<br>
> However, in a python dictionary it is not valid to have two entries<br>
> with the same name. This is certainly not the case for D.objects which<br>
> clearly can support more than one entry with the same name.<br>
><br>
> I have experimented with renaming objects from the properties panel.<br>
> Lets say there is an object named 'Cube', if I add another object and<br>
> rename it to 'Cube', the object that had originally held the name<br>
> 'Cube' is renamed to 'Cube.001'<br>
><br>
> So I was surprised to find that in D.objects, there are duplicates and<br>
> would like to understand why this happens, how to reproduce this<br>
> behaviour and whether this is useful behaviour or a byproduct of some<br>
> other feature?<br>
><br>
> Kind Regards<br>
><br>
> James<br>
><br>
><br>
> _______________________________________________<br>
> Bf-python mailing list<br>
> <a href="mailto:Bf-python@blender.org">Bf-python@blender.org</a><br>
> <a href="https://lists.blender.org/mailman/listinfo/bf-python" rel="noreferrer" target="_blank">https://lists.blender.org/mailman/listinfo/bf-python</a><br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <a href="http://lists.blender.org/pipermail/bf-python/attachments/20160624/e52e264b/attachment-0001.htm" rel="noreferrer" target="_blank">http://lists.blender.org/pipermail/bf-python/attachments/20160624/e52e264b/attachment-0001.htm</a><br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
Bf-python mailing list<br>
<a href="mailto:Bf-python@blender.org">Bf-python@blender.org</a><br>
<a href="https://lists.blender.org/mailman/listinfo/bf-python" rel="noreferrer" target="_blank">https://lists.blender.org/mailman/listinfo/bf-python</a><br>
<br>
<br>
End of Bf-python Digest, Vol 133, Issue 7<br>
*****************************************<br>
</blockquote></div><br></div>