<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
    <title></title>
  </head>

  <body>
    <p style="margin: 0px;"><span></span></p>

    <p> </p>

    <div style="margin: 5px 0px 5px 0px; font-family: monospace;">
      On October 11, 2010 at 2:57 AM Alberto Torres <kungfoobar@gmail.com> wrote:<br />
      <br />
      > Hi,<br />
      ><br />
      > The .001, .002, etc prefix is added automatically whenever there is an<br />
      > object with the same name. To refer to the new object, do this:<br />
      >
    </div>

    <p style="margin: 0px;"> </p>

    <p style="margin: 0px;">OK, but that just restates what I already wrote and doesn't address my questions.  Yes, these suffixes are auto-generated. (I, too, initially called them "prefixes" when I started writing my previous post -- it's a strange tendency to say the latter in stead of the former :-))</p>

    <p style="margin: 0px;"> </p>

    <div style="margin: 5px 0px 5px 0px; font-family: monospace;">
      > new_object = current_scene.objects.new(mesh_name, 'mynewobjectname')<br />
      > new_object.setLocation(....)<br />
      >
    </div>

    <p style="margin: 0px;"> </p>

    <p style="margin: 0px;">and the above also works for me, as I said in the original post, and is not part of the issue.</p>

    <p style="margin: 0px;"> </p>

    <p style="margin: 0px;">The issue is referring to the object AFTER it's created (via the above command), by name.</p>

    <p style="margin: 0px;"> </p>

    <p style="margin: 0px;">Using  'mynewobjectname' with Blender.Object.Get(...) is what fails.</p>

    <p style="margin: 0px;"> </p>

    <p style="margin: 0px;">You have to include the suffix (it appears): Blender.Object.Get('mynewobjectname.001'), in order to get the right reference.</p>

    <p style="margin: 0px;"> </p>

    <p style="margin: 0px;">My question was -- is that necessarily so, in all cases of object creation?  And how can I ask python what the particular suffix is? I don't want to have to "guess", algorithmically.</p>

    <p style="margin: 0px;"> </p>

    <p style="margin: 0px;"> </p>

    <div style="margin: 5px 0px 5px 0px; font-family: monospace;">
      > Regards<br />
      ><br />
      > --<br />
      > Alberto Torres<br />
      ><br />
      ><br />
      ><br />
      > On Mon, Oct 11, 2010 at 3:11 AM, andrew2006@flight.us<br />
      > <andrew2006@flight.us> wrote:<br />
      > > current_scene.objects.new(mesh_name, 'mynewobjectname')<br />
      > _______________________________________________<br />
      > Bf-python mailing list<br />
      > Bf-python@blender.org<br />
      > http://lists.blender.org/mailman/listinfo/bf-python<br />
    </div>
  </body>
</html>