I am new to Python and Blender and would like to know:
- How to convert Blender scripts (bpy) to Python scripts (py)?
- What is the difference between Blender scripts and Python scripts?
I am new to Python and Blender and would like to know:
Scripts written for Blender are Python scripts (*.py
). The difference is that they may use Blender's API through import bpy
which is not available to a regular Python interpreter out of the box. If the script is using anything from the bpy
namespace it can't be executed outside of Blender, that is unless you build and install Blender as a Python module. In this case you get (limited) access to Blender's Python API to functionality that does not require a UI. As long as a Python script does not use Blender's API, then it can be executed by a regular Python interpreter without any modifications.
How to convert Blender scripts to Python scripts?
You don't. If it uses Blender's API you can either execute it in Blender or you have to install Blender as Python module for your Python interpreter.
What is the difference between Blender scripts and Python scripts?
The use of Blender's API is the difference. Other than that they are just regular Python scripts, the programming language is the same.