~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to release/scripts/ui/properties_data_modifier.py

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2012-07-23 08:54:18 UTC
  • mfrom: (14.2.16 sid)
  • mto: (14.2.19 sid)
  • mto: This revision was merged to the branch mainline in revision 42.
  • Revision ID: package-import@ubuntu.com-20120723085418-9foz30v6afaf5ffs
Tags: 2.63a-2
* debian/: Cycles support added (Closes: #658075)
  For now, this top feature has been enabled only
  on [any-amd64 any-i386] architectures because
  of OpenImageIO failing on all others
* debian/: scripts installation path changed
  from /usr/lib to /usr/share:
  + debian/patches/: patchset re-worked for path changing
  + debian/control: "Breaks" field added on yafaray-exporter

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# ##### BEGIN GPL LICENSE BLOCK #####
2
 
#
3
 
#  This program is free software; you can redistribute it and/or
4
 
#  modify it under the terms of the GNU General Public License
5
 
#  as published by the Free Software Foundation; either version 2
6
 
#  of the License, or (at your option) any later version.
7
 
#
8
 
#  This program is distributed in the hope that it will be useful,
9
 
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
10
 
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
 
#  GNU General Public License for more details.
12
 
#
13
 
#  You should have received a copy of the GNU General Public License
14
 
#  along with this program; if not, write to the Free Software Foundation,
15
 
#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16
 
#
17
 
# ##### END GPL LICENSE BLOCK #####
18
 
 
19
 
# <pep8 compliant>
20
 
import bpy
21
 
 
22
 
narrowui = bpy.context.user_preferences.view.properties_width_check
23
 
narrowmod = 260
24
 
 
25
 
 
26
 
class DataButtonsPanel(bpy.types.Panel):
27
 
    bl_space_type = 'PROPERTIES'
28
 
    bl_region_type = 'WINDOW'
29
 
    bl_context = "modifier"
30
 
 
31
 
 
32
 
class DATA_PT_modifiers(DataButtonsPanel):
33
 
    bl_label = "Modifiers"
34
 
 
35
 
    def draw(self, context):
36
 
        layout = self.layout
37
 
 
38
 
        ob = context.object
39
 
        wide_ui = context.region.width > narrowui
40
 
        compact_mod = context.region.width < narrowmod
41
 
 
42
 
        layout.operator_menu_enum("object.modifier_add", "type")
43
 
 
44
 
        for md in ob.modifiers:
45
 
            box = layout.template_modifier(md, compact=compact_mod)
46
 
            if box:
47
 
                # match enum type to our functions, avoids a lookup table.
48
 
                getattr(self, md.type)(box, ob, md, wide_ui)
49
 
 
50
 
    # the mt.type enum is (ab)used for a lookup on function names
51
 
    # ...to avoid lengthy if statements
52
 
    # so each type must have a function here.
53
 
 
54
 
    def ARMATURE(self, layout, ob, md, wide_ui):
55
 
        split = layout.split()
56
 
 
57
 
        col = split.column()
58
 
        col.label(text="Object:")
59
 
        col.prop(md, "object", text="")
60
 
 
61
 
        if wide_ui:
62
 
            col = split.column()
63
 
        col.label(text="Vertex Group::")
64
 
        col.prop_object(md, "vertex_group", ob, "vertex_groups", text="")
65
 
        sub = col.column()
66
 
        sub.active = bool(md.vertex_group)
67
 
        sub.prop(md, "invert")
68
 
 
69
 
        split = layout.split()
70
 
 
71
 
        col = split.column()
72
 
        col.label(text="Bind To:")
73
 
        col.prop(md, "use_vertex_groups", text="Vertex Groups")
74
 
        col.prop(md, "use_bone_envelopes", text="Bone Envelopes")
75
 
 
76
 
        if wide_ui:
77
 
            col = split.column()
78
 
        col.label(text="Deformation:")
79
 
        col.prop(md, "quaternion")
80
 
        col.prop(md, "multi_modifier")
81
 
 
82
 
    def ARRAY(self, layout, ob, md, wide_ui):
83
 
        if wide_ui:
84
 
            layout.prop(md, "fit_type")
85
 
        else:
86
 
            layout.prop(md, "fit_type", text="")
87
 
 
88
 
 
89
 
        if md.fit_type == 'FIXED_COUNT':
90
 
            layout.prop(md, "count")
91
 
        elif md.fit_type == 'FIT_LENGTH':
92
 
            layout.prop(md, "length")
93
 
        elif md.fit_type == 'FIT_CURVE':
94
 
            layout.prop(md, "curve")
95
 
 
96
 
        layout.separator()
97
 
 
98
 
        split = layout.split()
99
 
 
100
 
        col = split.column()
101
 
        col.prop(md, "constant_offset")
102
 
        sub = col.column()
103
 
        sub.active = md.constant_offset
104
 
        sub.prop(md, "constant_offset_displacement", text="")
105
 
 
106
 
        col.separator()
107
 
 
108
 
        col.prop(md, "merge_adjacent_vertices", text="Merge")
109
 
        sub = col.column()
110
 
        sub.active = md.merge_adjacent_vertices
111
 
        sub.prop(md, "merge_end_vertices", text="First Last")
112
 
        sub.prop(md, "merge_distance", text="Distance")
113
 
 
114
 
        if wide_ui:
115
 
            col = split.column()
116
 
        col.prop(md, "relative_offset")
117
 
        sub = col.column()
118
 
        sub.active = md.relative_offset
119
 
        sub.prop(md, "relative_offset_displacement", text="")
120
 
 
121
 
        col.separator()
122
 
 
123
 
        col.prop(md, "add_offset_object")
124
 
        sub = col.column()
125
 
        sub.active = md.add_offset_object
126
 
        sub.prop(md, "offset_object", text="")
127
 
 
128
 
        layout.separator()
129
 
 
130
 
        col = layout.column()
131
 
        col.prop(md, "start_cap")
132
 
        col.prop(md, "end_cap")
133
 
 
134
 
    def BEVEL(self, layout, ob, md, wide_ui):
135
 
        split = layout.split()
136
 
 
137
 
        col = split.column()
138
 
        col.prop(md, "width")
139
 
 
140
 
        if wide_ui:
141
 
            col = split.column()
142
 
        col.prop(md, "only_vertices")
143
 
 
144
 
        layout.label(text="Limit Method:")
145
 
        layout.row().prop(md, "limit_method", expand=True)
146
 
        if md.limit_method == 'ANGLE':
147
 
            layout.prop(md, "angle")
148
 
        elif md.limit_method == 'WEIGHT':
149
 
            layout.row().prop(md, "edge_weight_method", expand=True)
150
 
 
151
 
    def BOOLEAN(self, layout, ob, md, wide_ui):
152
 
        split = layout.split()
153
 
 
154
 
        col = split.column()
155
 
        col.label(text="Operation:")
156
 
        col.prop(md, "operation", text="")
157
 
 
158
 
        if wide_ui:
159
 
            col = split.column()
160
 
        col.label(text="Object:")
161
 
        col.prop(md, "object", text="")
162
 
 
163
 
    def BUILD(self, layout, ob, md, wide_ui):
164
 
        split = layout.split()
165
 
 
166
 
        col = split.column()
167
 
        col.prop(md, "frame_start")
168
 
        col.prop(md, "length")
169
 
 
170
 
        if wide_ui:
171
 
            col = split.column()
172
 
        col.prop(md, "randomize")
173
 
        sub = col.column()
174
 
        sub.active = md.randomize
175
 
        sub.prop(md, "seed")
176
 
 
177
 
    def CAST(self, layout, ob, md, wide_ui):
178
 
        split = layout.split(percentage=0.25)
179
 
 
180
 
        if wide_ui:
181
 
            split.label(text="Cast Type:")
182
 
            split.prop(md, "cast_type", text="")
183
 
        else:
184
 
            layout.prop(md, "cast_type", text="")
185
 
 
186
 
        split = layout.split(percentage=0.25)
187
 
 
188
 
        col = split.column()
189
 
        col.prop(md, "x")
190
 
        col.prop(md, "y")
191
 
        col.prop(md, "z")
192
 
 
193
 
        col = split.column()
194
 
        col.prop(md, "factor")
195
 
        col.prop(md, "radius")
196
 
        col.prop(md, "size")
197
 
        col.prop(md, "from_radius")
198
 
 
199
 
        split = layout.split()
200
 
 
201
 
        col = split.column()
202
 
        col.label(text="Vertex Group:")
203
 
        col.prop_object(md, "vertex_group", ob, "vertex_groups", text="")
204
 
        if wide_ui:
205
 
            col = split.column()
206
 
        col.label(text="Control Object:")
207
 
        col.prop(md, "object", text="")
208
 
        if md.object:
209
 
            col.prop(md, "use_transform")
210
 
 
211
 
    def CLOTH(self, layout, ob, md, wide_ui):
212
 
        layout.label(text="See Cloth panel.")
213
 
 
214
 
    def COLLISION(self, layout, ob, md, wide_ui):
215
 
        layout.label(text="See Collision panel.")
216
 
 
217
 
    def CURVE(self, layout, ob, md, wide_ui):
218
 
        split = layout.split()
219
 
 
220
 
        col = split.column()
221
 
        col.label(text="Object:")
222
 
        col.prop(md, "object", text="")
223
 
        if wide_ui:
224
 
            col = split.column()
225
 
        col.label(text="Vertex Group:")
226
 
        col.prop_object(md, "vertex_group", ob, "vertex_groups", text="")
227
 
        layout.label(text="Deformation Axis:")
228
 
        layout.row().prop(md, "deform_axis", expand=True)
229
 
 
230
 
    def DECIMATE(self, layout, ob, md, wide_ui):
231
 
        layout.prop(md, "ratio")
232
 
        layout.label(text="Face Count: %s" % str(md.face_count))
233
 
 
234
 
    def DISPLACE(self, layout, ob, md, wide_ui):
235
 
        split = layout.split()
236
 
 
237
 
        col = split.column()
238
 
        col.label(text="Texture:")
239
 
        col.prop(md, "texture", text="")
240
 
        col.label(text="Vertex Group:")
241
 
        col.prop_object(md, "vertex_group", ob, "vertex_groups", text="")
242
 
 
243
 
        if wide_ui:
244
 
            col = split.column()
245
 
        col.label(text="Direction:")
246
 
        col.prop(md, "direction", text="")
247
 
        col.label(text="Texture Coordinates:")
248
 
        col.prop(md, "texture_coordinates", text="")
249
 
        if md.texture_coordinates == 'OBJECT':
250
 
            layout.prop(md, "texture_coordinate_object", text="Object")
251
 
        elif md.texture_coordinates == 'UV' and ob.type == 'MESH':
252
 
            layout.prop_object(md, "uv_layer", ob.data, "uv_textures")
253
 
 
254
 
        layout.separator()
255
 
 
256
 
        split = layout.split()
257
 
 
258
 
        col = split.column()
259
 
        col.prop(md, "midlevel")
260
 
 
261
 
        if wide_ui:
262
 
            col = split.column()
263
 
        col.prop(md, "strength")
264
 
 
265
 
    def EDGE_SPLIT(self, layout, ob, md, wide_ui):
266
 
        split = layout.split()
267
 
 
268
 
        col = split.column()
269
 
        col.prop(md, "use_edge_angle", text="Edge Angle")
270
 
        sub = col.column()
271
 
        sub.active = md.use_edge_angle
272
 
        sub.prop(md, "split_angle")
273
 
 
274
 
        if wide_ui:
275
 
            col = split.column()
276
 
        col.prop(md, "use_sharp", text="Sharp Edges")
277
 
 
278
 
    def EXPLODE(self, layout, ob, md, wide_ui):
279
 
        split = layout.split()
280
 
 
281
 
        col = split.column()
282
 
        col.label(text="Vertex group:")
283
 
        col.prop_object(md, "vertex_group", ob, "vertex_groups", text="")
284
 
        sub = col.column()
285
 
        sub.active = bool(md.vertex_group)
286
 
        sub.prop(md, "protect")
287
 
 
288
 
        if wide_ui:
289
 
            col = split.column()
290
 
        col.prop(md, "split_edges")
291
 
        col.prop(md, "unborn")
292
 
        col.prop(md, "alive")
293
 
        col.prop(md, "dead")
294
 
        col.prop(md, "size")
295
 
 
296
 
        layout.operator("object.explode_refresh", text="Refresh")
297
 
 
298
 
    def FLUID_SIMULATION(self, layout, ob, md, wide_ui):
299
 
        layout.label(text="See Fluid panel.")
300
 
 
301
 
    def HOOK(self, layout, ob, md, wide_ui):
302
 
        split = layout.split()
303
 
 
304
 
        col = split.column()
305
 
        col.label(text="Object:")
306
 
        col.prop(md, "object", text="")
307
 
        if md.object and md.object.type == 'ARMATURE':
308
 
            col.label(text="Bone:")
309
 
            col.prop_object(md, "subtarget", md.object.data, "bones", text="")
310
 
        if wide_ui:
311
 
            col = split.column()
312
 
        col.label(text="Vertex Group:")
313
 
        col.prop_object(md, "vertex_group", ob, "vertex_groups", text="")
314
 
 
315
 
        layout.separator()
316
 
 
317
 
        split = layout.split()
318
 
 
319
 
        col = split.column()
320
 
        col.prop(md, "falloff")
321
 
        col.prop(md, "force", slider=True)
322
 
        if wide_ui:
323
 
            col = split.column()
324
 
        else:
325
 
            col.separator()
326
 
        col.operator("object.hook_reset", text="Reset")
327
 
        col.operator("object.hook_recenter", text="Recenter")
328
 
 
329
 
        if ob.mode == 'EDIT':
330
 
            layout.separator()
331
 
            row = layout.row()
332
 
            row.operator("object.hook_select", text="Select")
333
 
            row.operator("object.hook_assign", text="Assign")
334
 
 
335
 
    def LATTICE(self, layout, ob, md, wide_ui):
336
 
        split = layout.split()
337
 
 
338
 
        col = split.column()
339
 
        col.label(text="Object:")
340
 
        col.prop(md, "object", text="")
341
 
 
342
 
        if wide_ui:
343
 
            col = split.column()
344
 
        col.label(text="Vertex Group:")
345
 
        col.prop_object(md, "vertex_group", ob, "vertex_groups", text="")
346
 
 
347
 
    def MASK(self, layout, ob, md, wide_ui):
348
 
        split = layout.split()
349
 
 
350
 
        col = split.column()
351
 
        col.label(text="Mode:")
352
 
        col.prop(md, "mode", text="")
353
 
        if wide_ui:
354
 
            col = split.column()
355
 
        if md.mode == 'ARMATURE':
356
 
            col.label(text="Armature:")
357
 
            col.prop(md, "armature", text="")
358
 
        elif md.mode == 'VERTEX_GROUP':
359
 
            col.label(text="Vertex Group:")
360
 
            col.prop_object(md, "vertex_group", ob, "vertex_groups", text="")
361
 
 
362
 
        sub = col.column()
363
 
        sub.active = bool(md.vertex_group)
364
 
        sub.prop(md, "invert")
365
 
 
366
 
    def MESH_DEFORM(self, layout, ob, md, wide_ui):
367
 
        split = layout.split()
368
 
        col = split.column()
369
 
        sub = col.column()
370
 
        sub.label(text="Object:")
371
 
        sub.prop(md, "object", text="")
372
 
        sub.active = not md.is_bound
373
 
        if wide_ui:
374
 
            col = split.column()
375
 
        col.label(text="Vertex Group:")
376
 
        col.prop_object(md, "vertex_group", ob, "vertex_groups", text="")
377
 
 
378
 
        sub = col.column()
379
 
        sub.active = bool(md.vertex_group)
380
 
        sub.prop(md, "invert")
381
 
 
382
 
        layout.separator()
383
 
 
384
 
        if md.is_bound:
385
 
            layout.operator("object.meshdeform_bind", text="Unbind")
386
 
        else:
387
 
            layout.operator("object.meshdeform_bind", text="Bind")
388
 
 
389
 
            split = layout.split()
390
 
 
391
 
            col = split.column()
392
 
            col.prop(md, "precision")
393
 
 
394
 
            if wide_ui:
395
 
                col = split.column()
396
 
            col.prop(md, "dynamic")
397
 
 
398
 
    def MIRROR(self, layout, ob, md, wide_ui):
399
 
        layout.prop(md, "merge_limit")
400
 
        if wide_ui:
401
 
            split = layout.split(percentage=0.25)
402
 
        else:
403
 
            split = layout.split(percentage=0.4)
404
 
 
405
 
        col = split.column()
406
 
        col.label(text="Axis:")
407
 
        col.prop(md, "x")
408
 
        col.prop(md, "y")
409
 
        col.prop(md, "z")
410
 
 
411
 
        if wide_ui:
412
 
            col = split.column()
413
 
        else:
414
 
            subsplit = layout.split()
415
 
            col = subsplit.column()
416
 
        col.label(text="Options:")
417
 
        col.prop(md, "clip", text="Clipping")
418
 
        col.prop(md, "mirror_vertex_groups", text="Vertex Groups")
419
 
 
420
 
        col = split.column()
421
 
        col.label(text="Textures:")
422
 
        col.prop(md, "mirror_u", text="U")
423
 
        col.prop(md, "mirror_v", text="V")
424
 
 
425
 
        col = layout.column()
426
 
        col.label(text="Mirror Object:")
427
 
        col.prop(md, "mirror_object", text="")
428
 
 
429
 
    def MULTIRES(self, layout, ob, md, wide_ui):
430
 
        if wide_ui:
431
 
            layout.row().prop(md, "subdivision_type", expand=True)
432
 
        else:
433
 
            layout.row().prop(md, "subdivision_type", text="")
434
 
 
435
 
        split = layout.split()
436
 
        col = split.column()
437
 
        col.prop(md, "levels", text="Preview")
438
 
        col.prop(md, "sculpt_levels", text="Sculpt")
439
 
        col.prop(md, "render_levels", text="Render")
440
 
        col.prop(bpy.context.tool_settings.sculpt, "fast_navigate")
441
 
 
442
 
        if wide_ui:
443
 
            col = split.column()
444
 
 
445
 
        col.enabled = ob.mode != 'EDIT'
446
 
        col.operator("object.multires_subdivide", text="Subdivide")
447
 
        col.operator("object.multires_higher_levels_delete", text="Delete Higher")
448
 
        col.operator("object.multires_reshape", text="Reshape")
449
 
        col.prop(md, "optimal_display")
450
 
 
451
 
        layout.separator()
452
 
 
453
 
        col = layout.column()
454
 
        row = col.row()
455
 
        if md.external:
456
 
            row.operator("object.multires_external_pack", text="Pack External")
457
 
            row.label()
458
 
            row = col.row()
459
 
            row.prop(md, "filepath", text="")
460
 
        else:
461
 
            row.operator("object.multires_external_save", text="Save External...")
462
 
            row.label()
463
 
 
464
 
    def PARTICLE_INSTANCE(self, layout, ob, md, wide_ui):
465
 
        layout.prop(md, "object")
466
 
        layout.prop(md, "particle_system_number", text="Particle System")
467
 
 
468
 
        split = layout.split()
469
 
        col = split.column()
470
 
        col.label(text="Create From:")
471
 
        col.prop(md, "normal")
472
 
        col.prop(md, "children")
473
 
        col.prop(md, "size")
474
 
 
475
 
        if wide_ui:
476
 
            col = split.column()
477
 
        col.label(text="Show Particles When:")
478
 
        col.prop(md, "alive")
479
 
        col.prop(md, "unborn")
480
 
        col.prop(md, "dead")
481
 
 
482
 
        layout.separator()
483
 
 
484
 
        layout.prop(md, "use_path", text="Create Along Paths")
485
 
 
486
 
        split = layout.split()
487
 
        split.active = md.use_path
488
 
        col = split.column()
489
 
        col.row().prop(md, "axis", expand=True)
490
 
        col.prop(md, "keep_shape")
491
 
 
492
 
        if wide_ui:
493
 
            col = split.column()
494
 
        col.prop(md, "position", slider=True)
495
 
        col.prop(md, "random_position", text="Random", slider=True)
496
 
 
497
 
    def PARTICLE_SYSTEM(self, layout, ob, md, wide_ui):
498
 
        layout.label(text="See Particle panel.")
499
 
 
500
 
    def SCREW(self, layout, ob, md, wide_ui):
501
 
        split = layout.split()
502
 
 
503
 
        col = split.column()
504
 
        col.prop(md, "axis")
505
 
        col.prop(md, "object", text="AxisOb")
506
 
        col.prop(md, "angle")
507
 
        col.prop(md, "steps")
508
 
        col.prop(md, "render_steps")
509
 
 
510
 
        if wide_ui:
511
 
            col = split.column()
512
 
        row = col.row()
513
 
        row.active = (md.object is None or md.use_object_screw_offset == False)
514
 
        row.prop(md, "screw_offset")
515
 
        row = col.row()
516
 
        row.active = (md.object is not None)
517
 
        row.prop(md, "use_object_screw_offset")
518
 
        col.prop(md, "use_normal_calculate")
519
 
        col.prop(md, "use_normal_flip")
520
 
        col.prop(md, "iterations")
521
 
 
522
 
    def SHRINKWRAP(self, layout, ob, md, wide_ui):
523
 
        split = layout.split()
524
 
        col = split.column()
525
 
        col.label(text="Target:")
526
 
        col.prop(md, "target", text="")
527
 
        if wide_ui:
528
 
            col = split.column()
529
 
        col.label(text="Vertex Group:")
530
 
        col.prop_object(md, "vertex_group", ob, "vertex_groups", text="")
531
 
 
532
 
        split = layout.split()
533
 
 
534
 
        col = split.column()
535
 
        col.prop(md, "offset")
536
 
        col.prop(md, "subsurf_levels")
537
 
 
538
 
        if wide_ui:
539
 
            col = split.column()
540
 
            col.label(text="Mode:")
541
 
        col.prop(md, "mode", text="")
542
 
 
543
 
        if wide_ui:
544
 
            split = layout.split(percentage=0.25)
545
 
        else:
546
 
            split = layout.split(percentage=0.35)
547
 
        col = split.column()
548
 
 
549
 
        if md.mode == 'PROJECT':
550
 
            col.label(text="Axis:")
551
 
            col.prop(md, "x")
552
 
            col.prop(md, "y")
553
 
            col.prop(md, "z")
554
 
 
555
 
            col = split.column()
556
 
            col.label(text="Direction:")
557
 
            col.prop(md, "negative")
558
 
            col.prop(md, "positive")
559
 
 
560
 
            if wide_ui:
561
 
                col = split.column()
562
 
            else:
563
 
                subsplit = layout.split()
564
 
                col = subsplit.column()
565
 
            col.label(text="Cull Faces:")
566
 
            col.prop(md, "cull_front_faces", text="Front")
567
 
            col.prop(md, "cull_back_faces", text="Back")
568
 
 
569
 
            layout.label(text="Auxiliary Target:")
570
 
            layout.prop(md, "auxiliary_target", text="")
571
 
 
572
 
        elif md.mode == 'NEAREST_SURFACEPOINT':
573
 
            layout.prop(md, "keep_above_surface")
574
 
 
575
 
    def SIMPLE_DEFORM(self, layout, ob, md, wide_ui):
576
 
        split = layout.split()
577
 
 
578
 
        col = split.column()
579
 
        col.label(text="Mode:")
580
 
        col.prop(md, "mode", text="")
581
 
 
582
 
        if wide_ui:
583
 
            col = split.column()
584
 
        col.label(text="Vertex Group:")
585
 
        col.prop_object(md, "vertex_group", ob, "vertex_groups", text="")
586
 
 
587
 
        split = layout.split()
588
 
 
589
 
        col = split.column()
590
 
        col.label(text="Origin:")
591
 
        col.prop(md, "origin", text="")
592
 
        sub = col.column()
593
 
        sub.active = (md.origin != "")
594
 
        sub.prop(md, "relative")
595
 
 
596
 
        if wide_ui:
597
 
            col = split.column()
598
 
        col.label(text="Deform:")
599
 
        col.prop(md, "factor")
600
 
        col.prop(md, "limits", slider=True)
601
 
        if md.mode in ('TAPER', 'STRETCH'):
602
 
            col.prop(md, "lock_x_axis")
603
 
            col.prop(md, "lock_y_axis")
604
 
 
605
 
    def SMOKE(self, layout, ob, md, wide_ui):
606
 
        layout.label(text="See Smoke panel.")
607
 
 
608
 
    def SMOOTH(self, layout, ob, md, wide_ui):
609
 
        split = layout.split(percentage=0.25)
610
 
 
611
 
        col = split.column()
612
 
        col.label(text="Axis:")
613
 
        col.prop(md, "x")
614
 
        col.prop(md, "y")
615
 
        col.prop(md, "z")
616
 
 
617
 
        col = split.column()
618
 
        col.prop(md, "factor")
619
 
        col.prop(md, "repeat")
620
 
        col.label(text="Vertex Group:")
621
 
        col.prop_object(md, "vertex_group", ob, "vertex_groups", text="")
622
 
 
623
 
    def SOFT_BODY(self, layout, ob, md, wide_ui):
624
 
        layout.label(text="See Soft Body panel.")
625
 
 
626
 
    def SOLIDIFY(self, layout, ob, md, wide_ui):
627
 
 
628
 
        split = layout.split()
629
 
 
630
 
        col = split.column()
631
 
        col.prop(md, "thickness")
632
 
        col.prop_object(md, "vertex_group", ob, "vertex_groups", text="")
633
 
 
634
 
        col.label(text="Crease:")
635
 
        col.prop(md, "edge_crease_inner", text="Inner")
636
 
        col.prop(md, "edge_crease_outer", text="Outer")
637
 
        col.prop(md, "edge_crease_rim", text="Rim")
638
 
 
639
 
        if wide_ui:
640
 
            col = split.column()
641
 
 
642
 
        col.prop(md, "offset")
643
 
        colsub = col.column()
644
 
        colsub.active = (md.vertex_group is not "")
645
 
        colsub.prop(md, "invert", text="Invert")
646
 
 
647
 
        col.prop(md, "use_even_offset")
648
 
        col.prop(md, "use_quality_normals")
649
 
 
650
 
        col.prop(md, "use_rim")
651
 
        colsub = col.column()
652
 
        colsub.active = md.use_rim
653
 
        colsub.prop(md, "use_rim_material")
654
 
 
655
 
        # col = layout.column()
656
 
        # col.label(text="Vertex Group:")
657
 
        # col.prop_object(md, "vertex_group", ob, "vertex_groups", text="")
658
 
 
659
 
    def SUBSURF(self, layout, ob, md, wide_ui):
660
 
        if wide_ui:
661
 
            layout.row().prop(md, "subdivision_type", expand=True)
662
 
        else:
663
 
            layout.row().prop(md, "subdivision_type", text="")
664
 
 
665
 
        split = layout.split()
666
 
        col = split.column()
667
 
        col.label(text="Subdivisions:")
668
 
        col.prop(md, "levels", text="View")
669
 
        col.prop(md, "render_levels", text="Render")
670
 
 
671
 
        if wide_ui:
672
 
            col = split.column()
673
 
        col.label(text="Options:")
674
 
        col.prop(md, "subsurf_uv")
675
 
        col.prop(md, "optimal_display")
676
 
 
677
 
    def SURFACE(self, layout, ob, md, wide_ui):
678
 
        layout.label(text="See Fields panel.")
679
 
 
680
 
    def UV_PROJECT(self, layout, ob, md, wide_ui):
681
 
        if ob.type == 'MESH':
682
 
            split = layout.split()
683
 
 
684
 
            col = split.column()
685
 
            col.label(text="Image:")
686
 
            col.prop(md, "image", text="")
687
 
 
688
 
            if wide_ui:
689
 
                col = split.column()
690
 
            col.label(text="UV Layer:")
691
 
            col.prop_object(md, "uv_layer", ob.data, "uv_textures", text="")
692
 
 
693
 
            split = layout.split()
694
 
            col = split.column()
695
 
            col.prop(md, "override_image")
696
 
            col.prop(md, "num_projectors", text="Projectors")
697
 
            for proj in md.projectors:
698
 
                col.prop(proj, "object", text="")
699
 
 
700
 
            if wide_ui:
701
 
                col = split.column()
702
 
            sub = col.column(align=True)
703
 
            sub.prop(md, "aspect_x", text="Aspect X")
704
 
            sub.prop(md, "aspect_y", text="Aspect Y")
705
 
 
706
 
            sub = col.column(align=True)
707
 
            sub.prop(md, "scale_x", text="Scale X")
708
 
            sub.prop(md, "scale_y", text="Scale Y")
709
 
 
710
 
    def WAVE(self, layout, ob, md, wide_ui):
711
 
        split = layout.split()
712
 
 
713
 
        col = split.column()
714
 
        col.label(text="Motion:")
715
 
        col.prop(md, "x")
716
 
        col.prop(md, "y")
717
 
        col.prop(md, "cyclic")
718
 
 
719
 
        if wide_ui:
720
 
            col = split.column()
721
 
        col.prop(md, "normals")
722
 
        sub = col.column()
723
 
        sub.active = md.normals
724
 
        sub.prop(md, "x_normal", text="X")
725
 
        sub.prop(md, "y_normal", text="Y")
726
 
        sub.prop(md, "z_normal", text="Z")
727
 
 
728
 
        split = layout.split()
729
 
 
730
 
        col = split.column()
731
 
        col.label(text="Time:")
732
 
        sub = col.column(align=True)
733
 
        sub.prop(md, "time_offset", text="Offset")
734
 
        sub.prop(md, "lifetime", text="Life")
735
 
        col.prop(md, "damping_time", text="Damping")
736
 
 
737
 
        if wide_ui:
738
 
            col = split.column()
739
 
        col.label(text="Position:")
740
 
        sub = col.column(align=True)
741
 
        sub.prop(md, "start_position_x", text="X")
742
 
        sub.prop(md, "start_position_y", text="Y")
743
 
        col.prop(md, "falloff_radius", text="Falloff")
744
 
 
745
 
        layout.separator()
746
 
 
747
 
        layout.prop(md, "start_position_object")
748
 
        layout.prop_object(md, "vertex_group", ob, "vertex_groups")
749
 
        layout.prop(md, "texture")
750
 
        layout.prop(md, "texture_coordinates")
751
 
        if md.texture_coordinates == 'MAP_UV' and ob.type == 'MESH':
752
 
            layout.prop_object(md, "uv_layer", ob.data, "uv_textures")
753
 
        elif md.texture_coordinates == 'OBJECT':
754
 
            layout.prop(md, "texture_coordinates_object")
755
 
 
756
 
        layout.separator()
757
 
 
758
 
        split = layout.split()
759
 
 
760
 
        col = split.column()
761
 
        col.prop(md, "speed", slider=True)
762
 
        col.prop(md, "height", slider=True)
763
 
 
764
 
        if wide_ui:
765
 
            col = split.column()
766
 
        col.prop(md, "width", slider=True)
767
 
        col.prop(md, "narrowness", slider=True)
768
 
 
769
 
 
770
 
classes = [
771
 
    DATA_PT_modifiers]
772
 
 
773
 
 
774
 
def register():
775
 
    register = bpy.types.register
776
 
    for cls in classes:
777
 
        register(cls)
778
 
 
779
 
 
780
 
def unregister():
781
 
    unregister = bpy.types.unregister
782
 
    for cls in classes:
783
 
        unregister(cls)
784
 
 
785
 
if __name__ == "__main__":
786
 
    register()