Results 1 to 5 of 5
  1. #1
    Member DragonLEE's Avatar
    Join Date
    Aug 2010
    Location
    Turkey
    Posts
    159

    Help for VSE Script Panel

    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_region_type="UI"
    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=layout.row()
    row.prop(self,'ad')#--------- ERROR --------------------------------


    -------------------------------------------------------------------------

    How can I add a property?



  2. #2
    Member Atom's Avatar
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    11,632
    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.
    I rarely use Blender anymore.
    Houdini Indie is only $200.00 and Apprentice is free!
    Atom's Links Page



  3. #3
    Member
    Join Date
    Dec 2011
    Location
    Germany
    Posts
    3,991
    operators and ID types can have properties, panels can't.

    Add your properties to e.g. WindowManager

    Code:
    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:

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



  4. #4
    Member DragonLEE's Avatar
    Join Date
    Aug 2010
    Location
    Turkey
    Posts
    159
    thank you. script %95 completed



  5. #5
    Member
    Join Date
    Feb 2010
    Location
    Warsaw
    Posts
    22
    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?



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •