0

I'm trying to find the scripts which execute blender functions like bpy.ops.mesh.primitive_plane_add(), but I can't find those scripts. If anyone knows how to do this, please reply.

360ueck
  • 1,516
  • 3
  • 19
  • 27

3 Answers3

2

Most of Blender's core operations are not python scripts, but rather compiled C++ code. If you want to see how these are written, you can download and investigate Blender's source code.

Most addons are a different matter. They're almost all in Python, and you can usually find these in the Scripts/Addons folder under blender's installation directory (for instance in my Win7 installation: C:\Program Files\Blender Foundation\Blender\2.76\scripts\addons).

TLousky
  • 16,043
  • 1
  • 40
  • 72
0

These are no Scripts in all cases but you can use the Blender Python API which is pretty well documented, e.g. for your asked bpy.ops.mesh.primitive_plane_add. They usually invoke direct C functions as well, just the API calls can be done in Python - which is quite handy for scripting. All these available Operators are later appended to the Blender Python object that you can access via bpy. for scripting.

There is a great built-in history of most of your executed commands hidden in the Info View (where your File menu is located) which you can show by resizing your Info View to somewhat bigger:

Resize Info View

Samoth
  • 3,234
  • 3
  • 21
  • 85
-1

Open a Text Editor View and open one of the Python Template files:

Python Templates

Samoth
  • 3,234
  • 3
  • 21
  • 85
  • When this answer is "Not useful" as the DV states: Then what exactly is not useful with it? It acutally shows where you can find some of the useful Python codes in Blender. – Samoth Apr 11 '16 at 08:16