Python is one of the programming languages. It has the feature of ** simple and easy to read ** compared to other languages. Computational and rich in available ** libraries **.
Point: ** Library ** A useful ** code collection ** that someone has put together
Point: ** Code ** ** Instructions ** to a computer
◯ ** Version 2.91.0 ** will be used for explanation.
1-1-0. Open Blender. 1-1-1. Click ** Scripting **.
1-1-2. Click the "+ New" button.
1-1-3. Click "Text" to change it to ~ .py.
Now you're ready to write code in a text editor!
● 3D Viewport: Where to edit in 3D ● Python Console: A place to test short code ● Info: Where to display what you have done ● Text Editor: Where to edit the code
◯ Use the Text Editor to add the monkey to the (0,0,5) point of the 3D Viewport.
2-0-0: ** @ 3D Viewport **: Delete the default cube with the X key. 2-0-1: ** @ 3D Viewport **: Select shift + A key → Mesh → monkey. 2-0-2: ** @ Info **: The code for adding monkey is displayed. Right-click and copy it.
2-0-3: ** @ Text Editor **: Right-click or command + V to paste. 2-0-4: ** @ Text Editor **: Change the appearance coordinates of monkey.
2-0-5: ** @ Text Editor **: Write import bpy
on the first line.
2-0-6: ** @ Text Editor **: Press the play button to execute the code.
2-0-7: ** @ 3D Viewport **: Check if the monkey appears at the specified position.
◯ Use the Python Console to add a large monkey to the (0,5,0) point in the 3D Viewport.
Import bpy
is not required on the console.2-1-0: ** @ Text Editor **: Change size to 5 and location to (0,5,0) and copy the code.
2-1-1: ** @ Python Console **: Paste the code and press Enter.
2-1-2: ** @ 3D Viewport **: Check if a large monkey appears.
File → Save As → Save as ~ .blend
3-1-0: Click Text → Save As.
3-1-1: Select the location (folder) you want to save and press Sava As to save.
The details of the code will be explained in the next article. All operations are displayed as code in ** Info **, so please try various things !!
I want to make a good article, so I would be grateful if you could give me a lot of opinions on twitter etc. Thank you!!
Recommended Posts