Created
October 31, 2021 19:27
-
-
Save AquariusPower/1b1f747f11dfe35c3456f8c9e7e22981 to your computer and use it in GitHub Desktop.
how to easily find my own way on blender's python?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Q: | |
I never coded in python, but already in C++ and Java. | |
By "find my way" I mean a tip that will help me avoid creating many questions | |
AND also almost not have to study the documentation. | |
A: | |
Blender has a python console with auto completion (TAB key)! | |
Starting on "bpy." we can navigate thru all sub data/variable/function structures! | |
If you hit an iteration, as soon it suggests `['` just remove those chars and put a `.`, it may further expand into sub structures/vars etc! | |
Knowing programming in general (logic and basic words), on the script editor, type what you think that may be correct, if it highlights it is correct ex.: `True`, and not `TRUE` nor `true`. | |
I've created many simple scripts like that without having to read anything from the documentation. | |
PS.: `def` is the function definition key like `def myFunction()` | |
Any more/better tips? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment