2
$\begingroup$

This might be a really stupid question-I'm working in bpy right now and want to add a plane at a specific location...I know that How to add an object at a specific posistion in Blender Game Engine works for bge but am not sure if it'll work in bpy...

$\endgroup$
4
$\begingroup$

The tooltip of the Add > Mesh > Plane menu path shows this information, press Ctrl+C to copy it to clipboard.

Tooltip

enter image description here

All of these menu items trigger operators and take several optional arguments, location=(x,y,z) included. The same applies to the other items in the Curve, Surface Metaball etc., menus.

Docs

The total list can be found in several locations, in the docs

Blender's Python Console

use the auto complete feature (ctrl+space) in the Blender python console after typing bpy.ops.mesh.primitive_

enter image description here

The arguments to the bpy.ops.* can be found doing auto completion too

enter image description here

Info Panel

You can see the history of most of the code which has been triggered in the UI, in the Info panel if you drag it down

enter image description here

$\endgroup$
  • $\begingroup$ "CTRL-C on a ToolTip" to copy the datapath or the Python function is a great TIP..works with SHIFT-CTRL-C on fields with values and checkboxes in all other windows $\endgroup$ – Master Heavy Oct 18 '19 at 6:27
0
$\begingroup$
bpy.ops.mesh.primitive_plane_add(location=(x,y,z)) 

does the trick

$\endgroup$
  • $\begingroup$ will you please add more to this answer, to make it more useful for future viewers. $\endgroup$ – David Aug 2 '15 at 2:24

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.