<!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 6, 2010 at 1:40 AM Goat Man <goatman.py@gmail.com> wrote:<br />
      <br />
      > if the mesh is dynamic you need to call update.<br />
      > ob.getData().update()<br />
      > and its not a bad idea to remake the display lists<br />
      > ob.makeDisplayList()<br />
      >
    </div>

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

    <p style="margin: 0px;">i discovered that bp appends a suffix to the base name you declare in "current_scene.objects.new(mesh_name, 'mynewobjectname')"</p>

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

    <p style="margin: 0px;">where 'mynewobjectname' acquires a three-digit suffix (starting with ".001")</p>

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

    <p style="margin: 0px;">And to refer to the newly created object one must include the auto-assigned prefix, like so:</p>

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

    <p style="margin: 0px;">Blender.Object.Get('mynewobjectname.001')</p>

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

    <p style="margin: 0px;">That is where my failure was, apparently, when trying to create the object variable "obj": obj=Blender.Object.Get('cylmesh')</p>

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

    <p style="margin: 0px;">The correction, it seems, is obj=Blender.Object.Get('cylmesh.001')</p>

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

    <p style="margin: 0px;">1) Am I correct here?  (referring to the object with the ".001" appears to target the object I want.</p>

    <p style="margin: 0px;">2) Is there a better way to refer to the new object?</p>

    <p style="margin: 0px;">3) Is there a way to find out what the autogenerated suffix is?  I don't want to depend on some concurrent loop-incremented variable (independently/redundantly created suffix), where, at some 23rd iteration, the creation of the mesh object fails and my own suffixes no longer align with those created by the Object.Get method. How can I capture/see what the new suffix is, explicitly?</p>

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

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

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

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

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

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

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

    <div style="margin: 5px 0px 5px 0px; font-family: monospace;">
      ><br />
      > On Wed, Oct 6, 2010 at 12:27 AM, Glen Pike <glen@engineeredarts.co.uk>wrote:<br />
      ><br />
      > >  Hmm,<br />
      > ><br />
      > >     Okay...<br />
      > ><br />
      > >     Not sure about dynamic meshes - check you are not still in Editing mode<br />
      > ><br />
      > > http://www.blender.org/documentation/249PythonDoc/Window-module.html#EditMode<br />
      > ><br />
      > >     1.    Try moving an object you have not created with a script - you<br />
      > > probably did that already.<br />
      > >     2.    Try placing your mesh at a non-zero location - might be a problem<br />
      > > when creating it.<br />
      > >     3.    When you get your mesh, can you see the location from<br />
      > > getLocation()?<br />
      > ><br />
      > >     Apart from that I can't really help much, sorry.<br />
      > ><br />
      > >     Glen<br />
      > ><br />
      > ><br />
      > ><br />
      > ><br />
      > > On 05/10/2010 17:09, andrew2006@flight.us wrote:<br />
      > ><br />
      > ><br />
      > >  On October 5, 2010 at 3:38 PM Glen Pike <glen@engineeredarts.co.uk><glen@engineeredarts.co.uk>wrote:<br />
      > ><br />
      > > >   You might need to call Blender.Redraw(-1)<br />
      > ><br />
      > ><br />
      > ><br />
      > > Tried Redraw(-1) -- no difference<br />
      > ><br />
      > ><br />
      > ><br />
      > ><br />
      > >  ><br />
      > > > http://www.blender.org/documentation/249PythonDoc/frames.html<br />
      > > ><br />
      > > ><br />
      > > ><br />
      > > > On 05/10/2010 16:27, andrew2006@flight.us wrote:<br />
      > > > ><br />
      > > > > hi, all<br />
      > > > ><br />
      > > > > i am very new to both blender, python and blender python.<br />
      > > > ><br />
      > > > > I have a rudimentary script creating a mesh primitive (cylinder)<br />
      > > > ><br />
      > > > > I get the object handle like so: obj=Blender.Object.Get('cylmesh')<br />
      > > > ><br />
      > > > > then I do<br />
      > > > ><br />
      > > > > obj.setLocation(x,y,0.5)<br />
      > > > ><br />
      > > > > -- or, alternatively ---<br />
      > > > ><br />
      > > > > obj.LocX=x<br />
      > > > > obj.LocY=y<br />
      > > > ><br />
      > > > > (my "x" and "y" are non-zero)<br />
      > > > ><br />
      > > > > but the mesh stays at the origin<br />
      > > > ><br />
      > > > > the "setLocation()" call doesn't seem to have an effect, nor do the<br />
      > > > > "Loc[X,Y,Z]" assignments<br />
      > > > ><br />
      > > > > yet, there are no errors reported<br />
      > > > ><br />
      > > > > blender version: 2.49b<br />
      > > > ><br />
      > > > > tia<br />
      > > > ><br />
      > > > > andrew<br />
      > > > ><br />
      > > > ><br />
      > > > > _______________________________________________<br />
      > > > > Bf-python mailing list<br />
      > > > > Bf-python@blender.org<br />
      > > > > http://lists.blender.org/mailman/listinfo/bf-python<br />
      > > ><br />
      > ><br />
      > ><br />
      > > _______________________________________________<br />
      > > Bf-python mailing listBf-python@blender.orghttp://lists.blender.org/mailman/listinfo/bf-python<br />
      > ><br />
      > ><br />
      > ><br />
      > > _______________________________________________<br />
      > > Bf-python mailing list<br />
      > > Bf-python@blender.org<br />
      > > http://lists.blender.org/mailman/listinfo/bf-python<br />
      > ><br />
      > ><br />
    </div>
  </body>
</html>