diff options
Diffstat (limited to 'release/scripts/startup/bl_ui/space_view3d.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 68 |
1 files changed, 63 insertions, 5 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 22869c0273a..4a55212ffca 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -50,6 +50,8 @@ class VIEW3D_HT_header(Header): # Particle edit if mode == 'PARTICLE_EDIT': row.prop(toolsettings.particle_edit, "select_mode", text="", expand=True) + elif mode == 'HAIR_EDIT': + row.prop(toolsettings.hair_edit, "select_mode", text="", expand=True) # Occlude geometry if ((view.viewport_shade not in {'BOUNDBOX', 'WIREFRAME'} and (mode == 'PARTICLE_EDIT' or (mode == 'EDIT' and obj.type == 'MESH'))) or @@ -141,7 +143,7 @@ class VIEW3D_MT_editor_menus(Menu): layout.menu("VIEW3D_MT_select_paint_mask") elif mesh.use_paint_mask_vertex and mode_string == 'PAINT_WEIGHT': layout.menu("VIEW3D_MT_select_paint_mask_vertex") - elif mode_string != 'SCULPT': + elif mode_string not in {'SCULPT'}: layout.menu("VIEW3D_MT_select_%s" % mode_string.lower()) if mode_string == 'OBJECT': @@ -162,7 +164,7 @@ class VIEW3D_MT_editor_menus(Menu): elif obj: if mode_string != 'PAINT_TEXTURE': layout.menu("VIEW3D_MT_%s" % mode_string.lower()) - if mode_string in {'SCULPT', 'PAINT_VERTEX', 'PAINT_WEIGHT', 'PAINT_TEXTURE'}: + if mode_string in {'SCULPT', 'PAINT_VERTEX', 'PAINT_WEIGHT', 'PAINT_TEXTURE', 'HAIR'}: layout.menu("VIEW3D_MT_brush") if mode_string == 'SCULPT': layout.menu("VIEW3D_MT_hide_mask") @@ -919,6 +921,13 @@ class VIEW3D_MT_select_paint_mask_vertex(Menu): layout.operator("paint.vert_select_ungrouped", text="Ungrouped Verts") +class VIEW3D_MT_select_hair(Menu): + bl_label = "Select" + + def draw(self, context): + layout = self.layout + + class VIEW3D_MT_angle_control(Menu): bl_label = "Angle Control" @@ -1145,6 +1154,7 @@ class VIEW3D_MT_object(Menu): layout.menu("VIEW3D_MT_object_parent") layout.menu("VIEW3D_MT_object_track") layout.menu("VIEW3D_MT_object_group") + layout.menu("VIEW3D_MT_object_cachelib") layout.menu("VIEW3D_MT_object_constraints") layout.separator() @@ -1411,6 +1421,29 @@ class VIEW3D_MT_object_group(Menu): layout.operator("group.objects_remove_active") +class VIEW3D_MT_object_cachelib(Menu): + bl_label = "Cache Library" + + @classmethod + def poll(cls, context): + ob = context.active_object + if not (ob and ob.cache_library): + return False + return True + + def draw(self, context): + layout = self.layout + scene = context.scene + ob = context.active_object + cachelib = ob.cache_library + + layout.operator("cachelibrary.bake", text="Bake") + props = layout.operator("cachelibrary.archive_slice", text="Slice") + props.input_filepath = cachelib.input_filepath + props.start_frame = scene.frame_start + props.end_frame = scene.frame_end + + class VIEW3D_MT_object_constraints(Menu): bl_label = "Constraints" @@ -1529,7 +1562,7 @@ class VIEW3D_MT_brush(Menu): layout.separator() # brush paint modes - layout.menu("VIEW3D_MT_brush_paint_modes") + layout.menu("VIEW3D_MT_brush_object_modes") # brush tool if context.sculpt_object: @@ -1539,6 +1572,8 @@ class VIEW3D_MT_brush(Menu): layout.prop_menu_enum(brush, "image_tool") elif context.vertex_paint_object or context.weight_paint_object: layout.prop_menu_enum(brush, "vertex_tool") + elif context.hair_edit_object: + layout.prop_menu_enum(brush, "hair_tool") # skip if no active brush if not brush: @@ -1566,7 +1601,7 @@ class VIEW3D_MT_brush(Menu): layout.operator("sculpt.set_persistent_base") -class VIEW3D_MT_brush_paint_modes(Menu): +class VIEW3D_MT_brush_object_modes(Menu): bl_label = "Enabled Modes" def draw(self, context): @@ -1579,6 +1614,7 @@ class VIEW3D_MT_brush_paint_modes(Menu): layout.prop(brush, "use_paint_vertex", text="Vertex Paint") layout.prop(brush, "use_paint_weight", text="Weight Paint") layout.prop(brush, "use_paint_image", text="Texture Paint") + layout.prop(brush, "use_hair_edit", text="Hair Edit") # ********** Vertex paint menu ********** @@ -1806,6 +1842,9 @@ class VIEW3D_MT_particle_specials(Menu): layout.separator() layout.operator("particle.mirror") + layout.separator() + + layout.operator("particle.shape_propagate_to_all") if particle_edit.select_mode == 'POINT': layout.separator() @@ -1831,6 +1870,14 @@ class VIEW3D_MT_particle_specials(Menu): class VIEW3D_MT_particle_showhide(ShowHideMenu, Menu): _operator_name = "particle" +# ********** Hair menu ********** + +class VIEW3D_MT_hair(Menu): + bl_label = "Hair" + + def draw(self, context): + layout = self.layout + # ********** Pose Menu ********** @@ -2877,7 +2924,8 @@ class VIEW3D_PT_view3d_cursor(Panel): layout = self.layout view = context.space_data - layout.column().prop(view, "cursor_location", text="Location") + col = layout.column() + col.prop(view, "cursor_location", text="Location") class VIEW3D_PT_view3d_name(Panel): @@ -2892,6 +2940,7 @@ class VIEW3D_PT_view3d_name(Panel): def draw(self, context): layout = self.layout + view = context.space_data ob = context.active_object row = layout.row() row.label(text="", icon='OBJECT_DATA') @@ -2904,6 +2953,10 @@ class VIEW3D_PT_view3d_name(Panel): row.label(text="", icon='BONE_DATA') row.prop(bone, "name", text="") + row = layout.row(align=True) + row.prop(ob, "color", text="") + row.prop(ob, "show_wire_color", text="", toggle=True, icon='WIRE') + class VIEW3D_PT_view3d_display(Panel): bl_space_type = 'VIEW_3D' @@ -2925,6 +2978,7 @@ class VIEW3D_PT_view3d_display(Panel): col = layout.column() col.prop(view, "show_only_render") col.prop(view, "show_world") + col.prop(view, "show_motionpaths") col = layout.column() display_all = not view.show_only_render @@ -3025,6 +3079,9 @@ class VIEW3D_PT_view3d_shading(Panel): if not scene.render.use_shading_nodes: col.prop(gs, "material_mode", text="") + if view.viewport_shade in {'BOUNDBOX', 'WIREFRAME', 'SOLID'}: + col.prop(view, "use_wire_color") + if view.viewport_shade == 'SOLID': col.prop(view, "show_textured_solid") col.prop(view, "use_matcap") @@ -3462,3 +3519,4 @@ def unregister(): if __name__ == "__main__": register() + |