0
$\begingroup$

If I create an object...

circle = bpy.ops.mesh.primitive_circle_add(radius=size, view_align=False, enter_editmode=False, location=(x, y, z))

What is returned (circle), is not the actual object... It's a creation object. So how do I think get/access that object? It doesn't seem like that creation object has the name/id of the object.

I am still trying to wrap my head around how blender has this 'context' based approach. Is it a fair parallel that blender almost works like DOM elements? It's a hierarchy, and you have to query objects to 'get' them?

Edit:

After thinking about this more... Maybe I'm going about it wrong? Should I create a primitive object (the object that hold the actual data), then use a method to add it into the scene?

$\endgroup$
  • $\begingroup$ Once you've added the object with the command bpy.ops.mesh.primitive_circle_add() it will be the active object; as such you can then assign it to a variable my_obj = bpy.context.active_object $\endgroup$ – Ratt Dec 9 '18 at 18:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.