~ubuntu-branches/ubuntu/trusty/blender/trusty

« back to all changes in this revision

Viewing changes to release/scripts/addons/add_curve_sapling/__init__.py

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
bl_info = {
20
20
    "name": "Sapling",
21
21
    "author": "Andrew Hale (TrumanBlending)",
22
 
    "version": (0, 2, 5),
23
 
    "blender": (2, 5, 9),
 
22
    "version": (0, 2, 6),
 
23
    "blender": (2, 64, 0),
24
24
    "location": "View3D > Add > Curve",
25
25
    "description": ("Adds a parametric tree. The method is presented by "
26
26
    "Jason Weber & Joseph Penn in their paper 'Creation and Rendering of "
27
27
    "Realistic Trees'."),
28
28
    "warning": "",  # used for warning icon and text in addons panel
29
 
    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.5/Py/"\
 
29
    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"\
30
30
        "Scripts/Curve/Sapling_Tree",
31
31
    "tracker_url": "http://projects.blender.org/tracker/"\
32
32
        "?func=detail&atid=469&aid=27226&group_id=153",
74
74
 
75
75
 
76
76
def getPresetpath():
77
 
    '''Support user defined scripts directory
 
77
    """Support user defined scripts directory
78
78
       Find the first ocurrence of add_curve_sapling/presets in possible script paths
79
 
       and return it as preset path'''
 
79
       and return it as preset path"""
80
80
    presetpath = ""
81
81
    for p in bpy.utils.script_paths():
82
82
        presetpath = os.path.join(p, 'addons', 'add_curve_sapling', 'presets')
86
86
 
87
87
 
88
88
class ExportData(bpy.types.Operator):
89
 
    '''This operator handles writing presets to file'''
 
89
    """This operator handles writing presets to file"""
90
90
    bl_idname = 'sapling.exportdata'
91
91
    bl_label = 'Export Preset'
92
92
 
114
114
 
115
115
 
116
116
class ImportData(bpy.types.Operator):
117
 
    '''This operator handles importing existing presets'''
 
117
    """This operator handles importing existing presets"""
118
118
    bl_idname = 'sapling.importdata'
119
119
    bl_label = 'Import Preset'
120
120
 
135
135
 
136
136
 
137
137
class PresetMenu(bpy.types.Menu):
138
 
    '''Create the preset menu by finding all preset files
139
 
    in the preset directory
140
 
    '''
 
138
    """Create the preset menu by finding all preset files """ \
 
139
    """in the preset directory"""
141
140
    bl_idname = "sapling.presetmenu"
142
141
    bl_label = "Presets"
143
142
 
170
169
        items=settings,
171
170
        default='0', update=no_update_tree)
172
171
    bevel = BoolProperty(name='Bevel',
173
 
        description='Whether the curve is bevelled',
 
172
        description='Whether the curve is beveled',
174
173
        default=False, update=update_tree)
175
174
    prune = BoolProperty(name='Prune',
176
175
        description='Whether the tree is pruned',
379
378
    presetName = StringProperty(name='Preset Name',
380
379
        description='The name of the preset to be saved',
381
380
        default='',
382
 
        subtype='FILENAME', update=no_update_tree)
 
381
        subtype='FILE_NAME', update=no_update_tree)
383
382
    limitImport = BoolProperty(name='Limit Import',
384
383
        description='Limited imported tree to 2 levels & no leaves for speed',
385
384
        default=True, update=no_update_tree)