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.
-
Related: http://blender.stackexchange.com/a/47678/2843 – Samoth Apr 10 '16 at 19:04
3 Answers
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).
- 16,043
- 1
- 40
- 72
-
thanks for the link.if u know where i can find the code for basic edit mode functions like extrude, creating basic mesh like cube, bevel ,etc. And ill also be searching for them. Thanks again – Yamin Nather Jan 12 '16 at 04:24
-
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:
- 3,234
- 3
- 21
- 85
- 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

