Hi,
I am currently trying to learn how to create addons for blender with python. My first project is going to be creating an exporter for a somewhat obscure games engine.
In doing so I need to get the user to configure there blender project in a specific manner such as specific scene names and custom properties etc.
My first problem is:
I want to create a panel in the properties window under the scene tabs. However, I would like it to appear as the first panel to appear eg [MyPanel, Scene, Audio, etc…]
Taking the simple panel demo what modification need to be made to get it to appear at the top of the tab?
Please note I have spent the last 2hrs going through the api documentation and as far as I can tell there is no way to do this other than have this scrip run before scripts\startup\bl_ui\properties_scene.py
Any help would be greatly appreciated.
Thanks
import bpy
class LayoutDemoPanel(bpy.types.Panel):
"""Creates a Panel in the scene context of the properties editor"""
bl_label = "Layout Demo"
bl_idname = "SCENE_PT_layout"
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
bl_context = "scene"
def draw(self, context):
layout = self.layout
sc = context.scene
#Create a simple row.
layout.label(text=" Simple Row:")
row = layout.row()
row.prop(sc, "frame_start")
row.prop(sc, "frame_end")
def register():
bpy.utils.register_class(LayoutDemoPanel)
def unregister():
bpy.utils.unregister_class(LayoutDemoPanel)
if __name__ == "__main__":
register()