
Explore scripting with Python inside Blender's integrated scripting section to gain basic knowledge for creating addons and custom shapes, with practical, concise explanations for completing the practices.
Navigate to the scripting section and log actions while writing Python code to add, modify, and delete cubes in Blender, importing bpy and adjusting location and scale.
Create a blender mesh from vertices, edges, and faces with bpy.data.meshes.new and mesh.from_pydata, then build figures from a single vertex to a four-vertex plane.
Create edges to connect vertices and form a square by using vertex indices 0 and 1, then connect remaining vertices and replace the scene with the new connected edges.
Create a face by using four vertices, delete or comment out edge creation so edges form automatically, then add [0,1,2,3] to my_faces to define the vertex path.
Create a cube by adding four vertices to my_verts for the top and five faces to my_faces using vertex information, delete the figure, and rerun the code.
Create a Blender addon by writing a Python file like CustomMesh.py. Define CustomMeshAddon with bl_idname, bl_label, and execute, then implement register and unregister for the main __name__ check.
Configure a new blender menu item with python by creating menu_func using self.layout.operator for CustomMeshAddon, label, and cube icon; register and append to the add mesh menu, then unregister.
Copy the previous code into the execute function inside CustomMesh.py and ensure proper alignment. Remove unused code and add return {FINISHED} to indicate successful Blender execution.
Install the blender addon by saving changes, naming the file CustomMesh.py, enabling it in preferences, and then adding and removing the Custom Mesh from the scene.
Expose custom properties in the Blender addon to modify behavior. Use a size_input float property to resize the figure by adjusting vertex positions on the x and y axes.
Extend the base addon to create a rose curve figure in Blender with Python. Rename to RoseCurveAddon, label Rose Curve, set mesh.rose_curve, delete size_input, and switch ICON to GRAPH.
Add float properties a_input and b_input (range 1–5) and an int property segments_input (range 2–500) to control curve center, angle, and position in the figure.
Compute x and y with parametric formulas using math.cos and math.sin, derive t from sec, and push vertices to my_verts to plot a curve.
Create faces in Blender using a Python loop that tracks vert_count and i, appending quad faces with vertices i, i+1, i+3, i+2, and reducing vert_count while increasing i.
Install the addon, save the code as RoseCurve.py, switch to the Layout section, add a rose curve, and adjust a, b, and segments in the bottom left panel.
Apply a solidify modifier to the curve with bmesh, evaluate the modifiers, set thickness to 0.5 and offset to 0, then update the mesh and preview the rose curve.
Learn to create custom properties in Blender using Python, map solidify_input and subdivision_input to mod and mod2, save and reinstall the addon, and adjust the rose curve addon.
Hello and welcome.
If you are a python developer who is interested in implementing your knowledge to automate the creation of 3D figures, this course is for you.
This course focuses on the creation of 3D figures by using simple and complex programming logic.
For this, we will use Blender and his integrated scripting section that allow us to code and access the blender api.
We will learn how to use the scripting section and the sections that compose it.
We will create figures by using vertices, edges and faces.
And finally, we will create Addons that will allow us to execute the code outside the scripting section by integrating the logic into the user interface.
In this course you will learn:
How to use the scripting section of blender
Create objects from vertices, edges and faces
Basic use of the libraries bpy and bmesh to access the blender api
Create a Blender Addon and assign it a custom menu item
Implement a parametric formula to create a rose curve
This course is for everybody. You may need to know about basic scripting but if you are new with programming or with python, the course is explained step by step so you can follow and finish it.
This course may be attractive to you because it can help you to implement mathematical formulas that are used to plot graphics into blender and create custom figures with it.
I hope you find the content useful and that you can apply it to your personal projects.
Have fun and happy learning.