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...
2 Answers
The tooltip of the Add > Mesh > Plane menu path shows this information, press Ctrl+C to copy it to clipboard.
Tooltip
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_
The arguments to the bpy.ops.*
can be found doing auto completion too
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
-
$\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$ Commented Oct 18, 2019 at 6:27
bpy.ops.mesh.primitive_plane_add(location=(x,y,z))
does the trick
-
$\begingroup$ will you please add more to this answer, to make it more useful for future viewers. $\endgroup$– DavidCommented Aug 2, 2015 at 2:24