Blender Python Scripting Tutorial - Building a keyframe addon! (Beginners)

preview_player
Показать описание
I’ll walk you through creating your very own Python add-on script that adds key frames step by step as well as explaining the concepts that you need to understand in order to implement some of its features into your own scripts. Thanks for watching, I’d appreciate suggestions or feedback to help increase the quality of my future tutorials.

Additional notes:

bl_info uses curly braces, I didn’t mention that in the video

You can enable word wrapping which is the middle icon on the top right which was disabled throughout the video

Make sure to add comments, it’s super useful so when you go back to your code later you won’t be confused trying to figure out what a certain line does, instead you can mark a comment using the hash key “#” then writing out your comment. That line is only for reference and won’t be executed.

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

Thanks for contributing, but I believe my script is identical to yours and, when run, kicked the below ERROR. Worse yet, the SimplePanel and Panel Templates refer to OBJECT PROPERTIES PANEL vs 3D Viewport (not sure why this was chosen as a "simple" example), and the API Documentation wasn't helpful. [MY SYS] I'm running Blender 4.0.1 on Windows10. (Note that somehow Bl updated automatically from 3.4 to 3.6, then 3.6 to 4.0.1, but my user-apps-Blender folder appears current to only version 3.4). Please help!!!!

The error is as follows:
Python: Traceback (most recent call last):
File "C:\Users\... .blend\Keyframe_addMod.py", line 19, in <module>

class
AttributeError: 'module' object has no attribute 'panel'



😩

darylcraig
Автор

Further to my earlier comment, on running the script, I first received a syntax error along with a SUGGESTED correction (which I already made). The correction changed the single equal sign per your video to the DOUBLE EQUAL in the following. (Who am I to argue with the Interpreter!?) By the way, I've reviewed several video tutorials + articles and tried to run a downloaded script that also drew errors (different file altogether). But despite prior programming, this is my first attempt at both Python and scripting for Blender... very frustrating!
if __name__ == "__main__":
register

darylcraig