<div dir="ltr">Hi there, <div>             I'm in need of some help with understanding the 'dupli_group' attribute. I have a script that looks at this attribute to find what groups are there. But, most of the time my script returns that this attribute is None. Occasionally it will return the group which I assume is the normal behaviour of this attribute. It seems to be random whether my script finds the attribute to contain the correct value. </div><div><br></div><div>I'm trying to debug why this might occur. I have a theory that it may be because my script attempts to determine which attributes are readonly; by attempting to write to all the attributes of the object in question. For example, take the cube on the default scene. I do this by using the following:</div><div><br></div><div>for attr in dir(D.objects['Cube']):</div><div><br></div><div>  # get the data of the attribute<br></div><div>attr_data = getattr(D.objects['Cube'], attr)<br></div><div><br></div><div>if type(attr_data) in {str, int, Vector, Color, Euler, float, bool}:<br></div><div><br></div><div>    try:</div><div>      </div><div>        setattr(D.objects['Cube'], attr, attr_data)</div><div><br></div><div>       </div><div><br></div><div>    except:</div><div>        read_only.append(attr)</div><div><br></div><div>elif type(attr_data) is None:</div><div>    #add the attribute to a list of attributes that are not yet initialised with any data. </div><div>    cls_uninitialised.append(attr)</div><div><br></div><div><br></div><div>This is all done during one update frame in blender, the above code is called from a handler in bpy.app.handlers.scene_update_post</div><div><br></div><div>As far as I can tell this is the only attribute that does this. Most of the time the 'dupli_group' attribute ends up in in the cls_initialised list since the result of type(attr_data) is None. But when I check manually for example:</div><div><br></div><div>>>>D.objects['some_object'].dupli_group</div><div>bpy.data.groups['some_group']</div><div><br></div><div>So, I guess I'm really interested to know if dupli_group is always guaranteed to have a value if the object is actually using it and if setting other attributes of the same object might cause it to momentarily be set to None. </div><div><br></div><div>Since this behaviour appears to be random at the moment, I am guessing it could be due to the fact that python dictionaries store key, value pairs in a different order each time and occasionally this order results in the dupli_group attribute being something other than None in my code.</div><div>That is a long shot though, since it seems rather odd that this would be the case.</div><div><br></div><div>I'd appreciate answers to my direct question on the effect of setting attributes and also any other ideas for things to try!</div><div><br></div><div>Thanks!</div><div><br>James</div><div><br></div><div><br></div></div>