Beginner Blender Python Exercise: Repeating code with for loops

preview_player
Показать описание

This is a video exercise for Blender Python beginners.
We will write a Python script that will use a Python for loop to repeat code to create a scene.

00:00 - Intro
00:55 - Setup Workspace
01:14 - Write down the steps
03:20 - Import bpy
03:48 - Add a triangle mesh
06:16 - Rotate mesh
11:36 - Convert mesh into a curve
12:14 - Add a bevel to the curve
14:07 - Add a for loop
18:15 - Summary
19:03 - Exercise #1
22:35 - Exercise #2
24:54 - Outro

Intro Music
Fiery Trails - Silent Partner

Background Music
Where To - Birocratic

Outro Music
Geographer - Easy Shake

#blender #python #scripting
Рекомендации по теме
Комментарии
Автор

in case you didnt know: you can use ctrl+f to find and replace in blender API, also alt+p will run the script

rando
Автор

Another useful tutorial has landed! Good stuff :)

BrettKromkamp
Автор

Thank you for the useful tutorials

I found one helpful trick for scripting in Blender text editor.
If you want to enable autocomplete in the text editor follow these steps:
1. Open Blender preferences
2. Go to the Keymap tab
3. Scroll down to Text, open Text(Global)
4. Click on + Add New
5. Select text.autocomplete
6. Bind it with any keyboard key want (I choose Tab key)

Now you have autocomplete enabled in the text editor.

Cheers

konradkisiel
Автор

This was very helpful for understand not just for loops but also how variables are used! Looking forward to learning more so I can take on my insane idea of writing an MVR importer for blender.

digitaldragondamnati
Автор

Or just use:
+= i
for z rotation
Thanks for the tutorial!)

АмброджодеПредис-зл
Автор

Don't want to start a patreon page or an udemy like course? the videos are very good and I think we should pay more for it.

fenyess
Автор

Hahahaha, I had 30 min trying to figure out the last exercise but it was hard for me. I didn't know it would be something that simple.

daniellunazapata
Автор

So the list of numbers in the Python Console ARE the radiuses of each hexagon? The "for i in range(0.1, 10): ...i... 0.1 through 0.9?

jmfs
Автор

im lost in the "i" part, where i can find a video about math or programming to understand this? thank you

perkonsstudio
Автор

I had pasted the same code, but my hexagon has a big gap rather than yours whose gap is literally negligible.

sudhanrimal
welcome to shbcf.ru