Is great for testing one-liners it has autocompletion so you can inspect the API quickly.īutton tooltips show Python attributes and operator names (when enabled see above). This document its intended to familiarize you with Blender Python APIĪ quick list of helpful things to know before starting: Subscribe to changes to data and it’s properties.ĭefine new settings in existing Blender data. Modify user preferences, keymaps and themes.Ĭreate user interface elements such as menus, headers and panels.Ĭreate new rendering engines that integrate with Blender. Run the script (or save it and add it through the Preferences like before) and it will appear in the Object menu.Īfter selecting it from the menu, you can choose how many instances of the cube you want create.But some areas are still being extended and improved.Įdit any data the user interface can (Scenes, Meshes, Particles etc.). remove ( menu_func ) if _name_ = "_main_" : register () unregister_class ( ObjectCursorArray ) bpy. # handle the keymap for km, kmi in addon_keymaps : km. # Can avoid strange issues like keymap still referring to operators already unregistered. append (( km, kmi )) def unregister (): # Note: when unregistering, it's usually good practice to do it in reverse order you registered. bl_idname, 'T', 'PRESS', ctrl = True, shift = True ) kmi. new ( name = 'Object Mode', space_type = 'EMPTY' ) kmi = km. window_manager # Note that in background mode (no GUI available), keyconfigs are not available either, # so we have to check this to avoid nasty errors in background case. append ( menu_func ) # handle the keymap wm = bpy. register_class ( ObjectCursorArray ) bpy. bl_idname ) # store keymaps here to access after registration addon_keymaps = def register (): bpy. Bl_info = def menu_func ( self, context ): self.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |