~ubuntu-branches/ubuntu/utopic/blender/utopic-proposed

« back to all changes in this revision

Viewing changes to release/scripts/startup/bl_ui/space_view3d_toolbar.py

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-02-19 11:24:23 UTC
  • mfrom: (14.2.23 sid)
  • Revision ID: package-import@ubuntu.com-20140219112423-rkmaz2m7ha06d4tk
Tags: 2.69-3ubuntu1
* Merge with Debian; remaining changes:
  - Configure without OpenImageIO on armhf, as it is not available on
    Ubuntu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
def draw_keyframing_tools(context, layout):
44
44
    col = layout.column(align=True)
45
45
    col.label(text="Keyframes:")
46
 
    row = col.row()
 
46
    row = col.row(align=True)
47
47
    row.operator("anim.keyframe_insert_menu", text="Insert")
48
48
    row.operator("anim.keyframe_delete_v3d", text="Remove")
49
49
 
54
54
 
55
55
    col.label(text="Grease Pencil:")
56
56
 
57
 
    row = col.row()
 
57
    row = col.row(align=True)
58
58
    row.operator("gpencil.draw", text="Draw").mode = 'DRAW'
59
59
    row.operator("gpencil.draw", text="Line").mode = 'DRAW_STRAIGHT'
60
60
 
61
 
    row = col.row()
 
61
    row = col.row(align=True)
62
62
    row.operator("gpencil.draw", text="Poly").mode = 'DRAW_POLY'
63
63
    row.operator("gpencil.draw", text="Erase").mode = 'ERASER'
64
64
 
65
 
    row = col.row()
 
65
    row = col.row(align=True)
66
66
    row.prop(context.tool_settings, "use_grease_pencil_sessions")
67
67
 
68
68
    col.operator("view3d.ruler")
112
112
        draw_repeat_tools(context, layout)
113
113
 
114
114
        draw_gpencil_tools(context, layout)
115
 
        col = layout.column(align=True)
116
115
 
117
116
 
118
117
class VIEW3D_PT_tools_rigidbody(View3DPanel, Panel):
125
124
 
126
125
        col = layout.column(align=True)
127
126
        col.label(text="Add/Remove:")
128
 
        row = col.row()
 
127
        row = col.row(align=True)
129
128
        row.operator("rigidbody.objects_add", text="Add Active").type = 'ACTIVE'
130
129
        row.operator("rigidbody.objects_add", text="Add Passive").type = 'PASSIVE'
131
 
        row = col.row()
 
130
        row = col.row(align=True)
132
131
        row.operator("rigidbody.objects_remove", text="Remove")
133
132
 
134
133
        col = layout.column(align=True)
175
174
        col.operator("mesh.subdivide")
176
175
        col.operator("mesh.loopcut_slide")
177
176
        col.operator("mesh.duplicate_move", text="Duplicate")
178
 
        col.operator("mesh.spin")
179
 
        col.operator("mesh.screw")
 
177
        row = col.row(align=True)
 
178
        row.operator("mesh.spin")
 
179
        row.operator("mesh.screw")
180
180
 
181
181
        row = col.row(align=True)
182
182
        props = row.operator("mesh.knife_tool", text="Knife")
186
186
        props.use_occlude_geometry = False
187
187
        props.only_selected = True
188
188
        col.operator("mesh.knife_project")
 
189
        col.operator("mesh.bisect")
189
190
 
190
191
        col = layout.column(align=True)
191
192
        col.label(text="Remove:")
234
235
        col = layout.column(align=True)
235
236
        col.prop(mesh, "use_mirror_x")
236
237
 
237
 
        row = col.row()
 
238
        row = col.row(align=True)
238
239
        row.active = ob.data.use_mirror_x
239
240
        row.prop(mesh, "use_mirror_topology")
240
241
 
277
278
        col.operator("curve.switch_direction")
278
279
        col.operator("curve.spline_type_set")
279
280
        col.operator("curve.radius_set")
280
 
        col.operator("curve.smooth_radius")
281
281
 
282
282
        col = layout.column(align=True)
283
283
        col.label(text="Handles:")
284
 
        row = col.row()
 
284
        row = col.row(align=True)
285
285
        row.operator("curve.handle_type_set", text="Auto").type = 'AUTOMATIC'
286
286
        row.operator("curve.handle_type_set", text="Vector").type = 'VECTOR'
287
 
        row = col.row()
 
287
        row = col.row(align=True)
288
288
        row.operator("curve.handle_type_set", text="Align").type = 'ALIGNED'
289
289
        row.operator("curve.handle_type_set", text="Free").type = 'FREE_ALIGN'
290
290
 
463
463
 
464
464
        col = layout.column(align=True)
465
465
        col.label(text="In-Between:")
466
 
        row = col.row()
 
466
        row = col.row(align=True)
467
467
        row.operator("pose.push", text="Push")
468
468
        row.operator("pose.relax", text="Relax")
469
469
        col.operator("pose.breakdown", text="Breakdowner")
470
470
 
471
471
        col = layout.column(align=True)
472
472
        col.label(text="Pose:")
473
 
        row = col.row()
 
473
        row = col.row(align=True)
474
474
        row.operator("pose.copy", text="Copy")
475
475
        row.operator("pose.paste", text="Paste")
476
476
 
609
609
 
610
610
            # use_original_normal and sculpt_plane
611
611
            if capabilities.has_sculpt_plane:
 
612
                col.separator()
612
613
                row = col.row(align=True)
613
 
                col.separator()
614
614
 
615
615
                if brush.use_original_normal:
616
616
                    row.prop(brush, "use_original_normal", toggle=True, text="", icon='LOCKED')
676
676
            col = layout.column(align=True)
677
677
            col.label(text="Overlay:")
678
678
 
679
 
            row = col.row()
 
679
            row = col.row(align=True)
680
680
            if brush.use_cursor_overlay:
681
681
                row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
682
682
            else:
683
683
                row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
684
684
 
685
 
            sub = row.row()
 
685
            sub = row.row(align=True)
686
686
            sub.prop(brush, "cursor_overlay_alpha", text="Alpha")
687
687
            sub.prop(brush, "use_cursor_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
688
688
 
703
703
            self.prop_unified_strength(row, context, brush, "strength", text="Strength")
704
704
            self.prop_unified_strength(row, context, brush, "use_pressure_strength")
705
705
 
706
 
            row = col.row(align=True)
707
 
 
708
706
            col.prop(brush, "blend", text="Blend")
709
707
 
710
708
            col = layout.column()
714
712
            col = layout.column(align=True)
715
713
            col.label(text="Overlay:")
716
714
 
717
 
            row = col.row()
 
715
            row = col.row(align=True)
718
716
            if brush.use_cursor_overlay:
719
717
                row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
720
718
            else:
721
719
                row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
722
720
 
723
 
            sub = row.row()
 
721
            sub = row.row(align=True)
724
722
            sub.prop(brush, "cursor_overlay_alpha", text="Alpha")
725
723
            sub.prop(brush, "use_cursor_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
726
724
 
740
738
            self.prop_unified_strength(row, context, brush, "strength", text="Strength")
741
739
            self.prop_unified_strength(row, context, brush, "use_pressure_strength")
742
740
 
743
 
            row = col.row(align=True)
744
 
 
745
741
            col.prop(brush, "vertex_tool", text="Blend")
746
742
 
747
743
            col = layout.column()
772
768
            col = layout.column(align=True)
773
769
            col.label(text="Overlay:")
774
770
 
775
 
            row = col.row()
 
771
            row = col.row(align=True)
776
772
            if brush.use_cursor_overlay:
777
773
                row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
778
774
            else:
779
775
                row.prop(brush, "use_cursor_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
780
776
 
781
 
            sub = row.row()
 
777
            sub = row.row(align=True)
782
778
            sub.prop(brush, "cursor_overlay_alpha", text="Alpha")
783
779
            sub.prop(brush, "use_cursor_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
784
780
 
811
807
        col.active = brush.brush_capabilities.has_overlay
812
808
        col.label(text="Overlay:")
813
809
 
814
 
        row = col.row()
 
810
        row = col.row(align=True)
815
811
        if tex_slot.map_mode != 'STENCIL':
816
812
            if brush.use_primary_overlay:
817
813
                row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
818
814
            else:
819
815
                row.prop(brush, "use_primary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
820
816
 
821
 
        sub = row.row()
 
817
        sub = row.row(align=True)
822
818
        sub.prop(brush, "texture_overlay_alpha", text="Alpha")
823
819
        sub.prop(brush, "use_primary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
824
820
 
849
845
        col.active = brush.brush_capabilities.has_overlay
850
846
        col.label(text="Overlay:")
851
847
 
852
 
        row = col.row()
 
848
        row = col.row(align=True)
853
849
        if tex_slot_alpha.map_mode != 'STENCIL':
854
850
            if brush.use_secondary_overlay:
855
851
                row.prop(brush, "use_secondary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
856
852
            else:
857
853
                row.prop(brush, "use_secondary_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
858
854
 
859
 
        sub = row.row()
 
855
        sub = row.row(align=True)
860
856
        sub.prop(brush, "mask_overlay_alpha", text="Alpha")
861
857
        sub.prop(brush, "use_secondary_overlay_override", toggle=True, text="", icon='BRUSH_DATA')
862
858
 
917
913
                    row.prop(brush, "use_relative_jitter", text="", icon='UNLOCKED')
918
914
                    row.prop(brush, "jitter_absolute")
919
915
                row.prop(brush, "use_pressure_jitter", toggle=True, text="")
 
916
 
920
917
            if brush.sculpt_capabilities.has_smooth_stroke:
921
918
                col = layout.column()
922
919
                col.separator()
949
946
            sub.prop(brush, "smooth_stroke_radius", text="Radius", slider=True)
950
947
            sub.prop(brush, "smooth_stroke_factor", text="Factor", slider=True)
951
948
 
 
949
        layout.prop(settings, "input_samples")
 
950
 
952
951
 
953
952
class VIEW3D_PT_tools_brush_curve(Panel, View3DPaintPanel):
954
953
    bl_label = "Curve"
1032
1031
        layout.prop(sculpt, "use_deform_only")
1033
1032
        layout.prop(sculpt, "show_diffuse_color")
1034
1033
 
1035
 
        layout.prop(sculpt, "input_samples")
1036
 
 
1037
1034
        self.unified_paint_settings(layout, context)
1038
1035
 
1039
1036
 
1052
1049
 
1053
1050
        col = layout.column(align=True)
1054
1051
        col.label(text="Mirror:")
1055
 
        row = col.row()
 
1052
        row = col.row(align=True)
1056
1053
        row.prop(sculpt, "use_symmetry_x", text="X", toggle=True)
1057
1054
        row.prop(sculpt, "use_symmetry_y", text="Y", toggle=True)
1058
1055
        row.prop(sculpt, "use_symmetry_z", text="Z", toggle=True)
1140
1137
        wpaint = tool_settings.weight_paint
1141
1138
 
1142
1139
        col = layout.column()
 
1140
        row = col.row()
1143
1141
 
1144
 
        col.prop(wpaint, "use_all_faces")
1145
 
        col.prop(wpaint, "use_normal")
1146
 
        col.prop(wpaint, "use_spray")
1147
 
        col.prop(wpaint, "use_group_restrict")
 
1142
        row.prop(wpaint, "use_all_faces")
 
1143
        row.prop(wpaint, "use_normal")
 
1144
        col = layout.column()
 
1145
        row = col.row()
 
1146
        row.prop(wpaint, "use_spray")
 
1147
        row.prop(wpaint, "use_group_restrict")
1148
1148
 
1149
1149
        obj = context.weight_paint_object
1150
1150
        if obj.type == 'MESH':
1154
1154
            row.active = mesh.use_mirror_x
1155
1155
            row.prop(mesh, "use_mirror_topology")
1156
1156
 
1157
 
        col.prop(wpaint, "input_samples")
1158
 
 
1159
1157
        col.label("Show Zero Weights:")
1160
1158
        sub = col.row()
1161
1159
        sub.active = (not tool_settings.use_multipaint)
1177
1175
        vpaint = toolsettings.vertex_paint
1178
1176
 
1179
1177
        col = layout.column()
 
1178
        row = col.row()
1180
1179
        #col.prop(vpaint, "mode", text="")
1181
 
        col.prop(vpaint, "use_all_faces")
1182
 
        col.prop(vpaint, "use_normal")
 
1180
        row.prop(vpaint, "use_all_faces")
 
1181
        row.prop(vpaint, "use_normal")
1183
1182
        col.prop(vpaint, "use_spray")
1184
1183
 
1185
 
        col.prop(vpaint, "input_samples")
1186
 
 
1187
1184
        self.unified_paint_settings(col, context)
1188
1185
 
1189
1186
# Commented out because the Apply button isn't an operator yet, making these settings useless
1213
1210
        ipaint = toolsettings.image_paint
1214
1211
        settings = toolsettings.image_paint
1215
1212
 
1216
 
        layout.prop(ipaint, "input_samples")
1217
 
 
1218
1213
        col = layout.column()
1219
1214
        col.prop(ipaint, "use_occlude")
1220
1215
        col.prop(ipaint, "use_backface_culling")
1334
1329
        if pe.is_hair:
1335
1330
            col.active = pe.is_editable
1336
1331
            col.prop(pe, "use_emitter_deflect", text="Deflect emitter")
1337
 
            sub = col.row()
 
1332
            sub = col.row(align=True)
1338
1333
            sub.active = pe.use_emitter_deflect
1339
1334
            sub.prop(pe, "emitter_distance", text="Distance")
1340
1335
 
1358
1353
            if pe.type == 'PARTICLES':
1359
1354
                col.prop(pe, "show_particles", text="Particles")
1360
1355
            col.prop(pe, "use_fade_time")
1361
 
            sub = col.row()
 
1356
            sub = col.row(align=True)
1362
1357
            sub.active = pe.use_fade_time
1363
1358
            sub.prop(pe, "fade_frames", slider=True)
1364
1359