Help for VSE Script Panel

(DragonLEE) #1

bl_info = {
“name”: “Sequencer Motion Blur”,
“author”: “SayPRODUCTIONS”,
“version”: (1, 0),
“blender”: (2, 6, 9),
“api”: 33333,
“location”: “View3D > Add > Mesh”,
“description”: “Sequencer Motion Blur”,
“warning”: “”,
“wiki_url”: “”,
“tracker_url”: “”,
“category”: “Sequencer”}
import bpy
from bpy.props import *
class svemotionblur(bpy.types.Panel):
bl_space_type =“SEQUENCE_EDITOR”
bl_label =“Motion Blur”

ad=IntProperty( name='',min=0,max=10,default=   1,description='Fuga')
dr=BoolProperty(name='',             default=True,description='Dairesel')
gr=BoolProperty(name='',             default=True,description='Dairesel')

def draw(self, context):
    layout = self.layout
    row.prop(self,'ad')#--------- ERROR --------------------------------

How can I add a property?

(Atom) #2

If you right-click on any of the other working Properties in that panel choose Edit Source from the popup menu. You will notice the official Blender code does not include any of the properties inside the class. It may be a limitation. But if you follow suite and include them as a type, like the official code, it should work.

(CoDEmanX) #3

operators and ID types can have properties, panels can’t.

Add your properties to e.g. WindowManager

def register():
    # ...
    bpy.types.WindowManager.dr = BoolProperty(name="", default=True, description="Dairesel", options={'SKIP_SAVE'})

def unregister():
    # ...
    del bpy.types.WindowManager.dr

And use like:

def draw(self, context):
    layout = self.layout
    row = layout.row()
    row.prop(context.window_manager, "dr")

(DragonLEE) #4

thank you. script %95 completed

(Sambor) #5

Hi. I’m writing a script to distribute objects in a certain pattern upon few certain values, and need input in the UI for this values.
Can i register an entire ProperyGroup as Your example bpy.types.WindowManager.dr or do i have to register each value separately?