Merge branch 'master' into blender2.8
authorCampbell Barton <ideasman42@gmail.com>
Sat, 7 Jul 2018 06:53:00 +0000 (08:53 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 7 Jul 2018 06:53:00 +0000 (08:53 +0200)
1  2 
release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
release/scripts/startup/bl_ui/space_view3d.py
source/blender/python/simple_enum_gen.py

index fa37197f3ffc7d48d9ca52bcf7698c5ba2f6b15b,0a365c6a20ca1b75db3a8ed333e62504d587e8a3..8a3acd033f3e23d1411972b3f64945311fb1644f
@@@ -3663,74 -3441,41 +3658,61 @@@ class VIEW3D_PT_view3d_camera_lock(Pane
      def draw(self, context):
          layout = self.layout
  
 +        layout.use_property_split = True
 +        layout.use_property_decorate = False  # No animation.
 +
          view = context.space_data
 -        layout.column().prop(view, "cursor_location", text="Location")
 +
 +        col = layout.column(align=True)
 +        subcol = col.column()
 +        subcol.active = bool(view.region_3d.view_perspective != 'CAMERA' or view.region_quadviews)
 +
 +        subcol.prop(view, "lock_object")
 +        lock_object = view.lock_object
 +        if lock_object:
 +            if lock_object.type == 'ARMATURE':
 +                subcol.prop_search(
 +                    view, "lock_bone", lock_object.data,
 +                    "edit_bones" if lock_object.mode == 'EDIT'
 +                    else "bones",
 +                    text=""
 +                )
 +        else:
 +            subcol.prop(view, "lock_cursor", text="Lock to 3D Cursor")
 +
 +        col.prop(view, "lock_camera")
  
  
 -class VIEW3D_PT_view3d_name(Panel):
 +class VIEW3D_PT_view3d_cursor(Panel):
      bl_space_type = 'VIEW_3D'
      bl_region_type = 'UI'
 -    bl_label = "Item"
 -
 -    @classmethod
 -    def poll(cls, context):
 -        return (context.active_object is not None)
 +    bl_label = "3D Cursor"
  
-     @classmethod
-     def poll(cls, context):
-         view = context.space_data
-         return (view is not None)
      def draw(self, context):
          layout = self.layout
 +        layout.use_property_split = True
  
 -        ob = context.active_object
 -        row = layout.row()
 -        row.label(text="", icon='OBJECT_DATA')
 -        row.prop(ob, "name", text="")
 +        view = context.space_data
  
 -        if ob.type == 'ARMATURE' and ob.mode in {'EDIT', 'POSE'}:
 -            bone = context.active_bone
 -            if bone:
 -                row = layout.row()
 -                row.label(text="", icon='BONE_DATA')
 -                row.prop(bone, "name", text="")
 +        layout.column().prop(view, "cursor_location", text="Location")
  
  
 -class VIEW3D_PT_view3d_display(Panel):
 +class VIEW3D_PT_shading(Panel):
      bl_space_type = 'VIEW_3D'
 -    bl_region_type = 'UI'
 -    bl_label = "Display"
 -    bl_options = {'DEFAULT_CLOSED'}
 +    bl_region_type = 'HEADER'
 +    bl_label = "Shading"
 +    bl_ui_units_x = 11
 +
-     @classmethod
-     def poll(cls, context):
-         return True
 +    def draw(self, context):
 +        pass
 +
 +
 +class VIEW3D_PT_shading_lighting(Panel):
 +    bl_space_type = 'VIEW_3D'
 +    bl_region_type = 'HEADER'
 +    bl_label = "Lighting"
 +    bl_parent_id = 'VIEW3D_PT_shading'
  
-     @classmethod
-     def poll(cls, context):
-         return True
      def draw(self, context):
          layout = self.layout
  
@@@ -3807,129 -3542,35 +3789,125 @@@ class VIEW3D_PT_shading_options(Panel)
  
      def draw(self, context):
          layout = self.layout
 +
          view = context.space_data
 +        shading = view.shading
 +
 +        if not shading.light == 'MATCAP':
 +            row = layout.row()
 +            row.prop(shading, "show_specular_highlight")
 +
 +        row = layout.split(0.4)
 +        row.prop(shading, "show_xray")
 +        sub = row.row()
 +        sub.active = shading.show_xray
 +        sub.prop(shading, "xray_alpha", text="")
 +
 +        row = layout.split(0.4)
 +        row.active = not shading.show_xray
 +        row.prop(shading, "show_shadows")
 +        sub = row.row()
 +        sub.active = shading.show_shadows and not shading.show_xray
 +        sub.prop(shading, "shadow_intensity", text="")
 +
 +        row = layout.split(0.4)
 +        row.active = not shading.show_xray
 +        row.prop(shading, "show_cavity")
 +        sub = row.column(align=True)
 +        sub.active = not shading.show_xray and shading.show_cavity
 +        sub.prop(shading, "cavity_ridge_factor")
 +        sub.prop(shading, "cavity_valley_factor")
 +
 +        row = layout.split(0.4)
 +        row.prop(shading, "show_object_outline")
 +        sub = row.row()
 +        sub.active = shading.show_object_outline
 +        sub.prop(shading, "object_outline_color", text="")
 +
 +        layout.prop(view, "show_world")
 +
 +
 +class VIEW3D_PT_overlay(Panel):
 +    bl_space_type = 'VIEW_3D'
 +    bl_region_type = 'HEADER'
 +    bl_label = "Overlays"
 +    bl_ui_units_x = 14
  
-     @classmethod
-     def poll(cls, context):
-         return True
 -        basic_stereo = context.scene.render.views_format == 'STEREO_3D'
 +    def draw(self, context):
 +        layout = self.layout
 +
 +        view = context.space_data
 +        shading = view.shading
 +        overlay = view.overlay
 +        display_all = overlay.show_overlays
  
          col = layout.column()
 -        col.row().prop(view, "stereo_3d_camera", expand=True)
 +        col.active = display_all
 +
 +        split = col.split()
 +
 +        sub = split.column()
 +        sub.prop(view, "show_manipulator", text="Manipulators")
 +        sub.prop(overlay, "show_text", text="Text")
 +        sub.prop(overlay, "show_cursor", text="3D Cursor")
 +        sub.prop(overlay, "show_outline_selected")
 +        sub.prop(overlay, "show_all_objects_origin")
 +
 +        sub = split.column()
 +        sub.prop(overlay, "show_relationship_lines")
 +        sub.prop(overlay, "show_motion_paths")
 +        #sub.prop(overlay, "show_onion_skins")
 +        sub.prop(overlay, "show_face_orientation")
 +        sub.prop(overlay, "show_backface_culling")
 +        if shading.type == 'MATERIAL':
 +            sub.prop(overlay, "show_look_dev")
  
 -        col.label(text="Display:")
 -        row = col.row()
 -        row.active = basic_stereo
 -        row.prop(view, "show_stereo_3d_cameras")
 -        row = col.row()
 -        row.active = basic_stereo
 -        split = row.split()
 -        split.prop(view, "show_stereo_3d_convergence_plane")
 -        split = row.split()
 -        split.prop(view, "stereo_3d_convergence_plane_alpha", text="Alpha")
 -        split.active = view.show_stereo_3d_convergence_plane
          row = col.row()
 -        split = row.split()
 -        split.prop(view, "show_stereo_3d_volume")
 -        split = row.split()
 -        split.prop(view, "stereo_3d_volume_alpha", text="Alpha")
 +        row.prop(overlay, "show_wireframes")
 +        sub = row.row()
 +        sub.active = overlay.show_wireframes
 +        sub.prop(overlay, "wireframe_threshold", text="")
  
  
 -class VIEW3D_PT_view3d_shading(Panel):
 +        col = layout.column()
 +        col.active = display_all
 +        split = col.split(percentage=0.55)
 +        split.prop(overlay, "show_floor", text="Grid Floor")
 +
 +        row = split.row(align=True)
 +        row.prop(overlay, "show_axis_x", text="X", toggle=True)
 +        row.prop(overlay, "show_axis_y", text="Y", toggle=True)
 +        row.prop(overlay, "show_axis_z", text="Z", toggle=True)
 +
 +        if overlay.show_floor:
 +            sub = col.column(align=True)
 +            sub.active = bool(overlay.show_floor or view.region_quadviews or not view.region_3d.is_perspective)
 +            subsub = sub.column(align=True)
 +            subsub.active = overlay.show_floor
 +            subsub.prop(overlay, "grid_scale", text="Scale")
 +            subsub.prop(overlay, "grid_subdivisions", text="Subdivisions")
 +
 +        col.prop(view, "show_reconstruction", text="Motion Tracking")
 +        if view.show_reconstruction:
 +            sub = col.column(align=True)
 +            sub.active = view.show_reconstruction
 +            sub.prop(view, "show_camera_path", text="Camera Path")
 +            sub.prop(view, "show_bundle_names", text="3D Marker Names")
 +            sub.label(text="Track Type and Size:")
 +            row = sub.row(align=True)
 +            row.prop(view, "tracks_draw_type", text="")
 +            row.prop(view, "tracks_draw_size", text="")
 +
 +
 +class VIEW3D_PT_overlay_edit_mesh(Panel):
      bl_space_type = 'VIEW_3D'
 -    bl_region_type = 'UI'
 -    bl_label = "Shading"
 +    bl_region_type = 'HEADER'
 +    bl_parent_id = 'VIEW3D_PT_overlay'
 +    bl_label = "Edit Mesh"
 +
 +    @classmethod
 +    def poll(cls, context):
 +        return context.mode == 'EDIT_MESH'
  
      def draw(self, context):
          layout = self.layout
@@@ -4263,37 -3886,30 +4241,32 @@@ class VIEW3D_PT_snapping(Panel)
  
  class VIEW3D_PT_transform_orientations(Panel):
      bl_space_type = 'VIEW_3D'
 -    bl_region_type = 'UI'
 +    bl_region_type = 'HEADER'
      bl_label = "Transform Orientations"
 -    bl_options = {'DEFAULT_CLOSED'}
 +    bl_ui_units_x = 8
  
-     @classmethod
-     def poll(cls, context):
-         view = context.space_data
-         return (view)
      def draw(self, context):
          layout = self.layout
 +        layout.label("Transform Orientations")
  
 -        view = context.space_data
 -        orientation = view.current_orientation
 +        scene = context.scene
 +        orientation = scene.current_orientation
  
 -        row = layout.row(align=True)
 -        row.prop(view, "transform_orientation", text="")
 -        row.operator("transform.create_orientation", text="", icon='ZOOMIN')
 +        row = layout.row()
 +        col = row.column()
 +        col.prop(scene, "transform_orientation", expand=True)
 +        row.operator("transform.create_orientation", text="", icon='ZOOMIN', emboss=False).use = True
  
          if orientation:
 -            row = layout.row(align=True)
 +            row = layout.row(align=False)
              row.prop(orientation, "name", text="")
 -            row.operator("transform.delete_orientation", text="", icon='X')
 +            row.operator("transform.delete_orientation", text="", icon='X', emboss=False)
  
  
 -class VIEW3D_PT_etch_a_ton(Panel):
 +class VIEW3D_PT_quad_view(Panel):
      bl_space_type = 'VIEW_3D'
      bl_region_type = 'UI'
 -    bl_label = "Skeleton Sketching"
 +    bl_label = "Quad View"
      bl_options = {'DEFAULT_CLOSED'}
  
      @classmethod
      def draw(self, context):
          layout = self.layout
  
 -        toolsettings = context.scene.tool_settings
 +        view = context.space_data
  
 +        region = view.region_quadviews[2]
          col = layout.column()
 +        col.prop(region, "lock_rotation")
 +        row = col.row()
 +        row.enabled = region.lock_rotation
 +        row.prop(region, "show_sync_view")
 +        row = col.row()
 +        row.enabled = region.lock_rotation and region.show_sync_view
 +        row.prop(region, "use_box_clip")
  
 -        col.prop(toolsettings, "use_etch_quick")
 -        col.prop(toolsettings, "use_etch_overdraw")
  
 -        col.separator()
 +class VIEW3D_PT_view3d_stereo(Panel):
 +    bl_space_type = 'VIEW_3D'
 +    bl_region_type = 'UI'
 +    bl_label = "Stereoscopy"
 +    bl_options = {'DEFAULT_CLOSED'}
  
 -        col.prop(toolsettings, "etch_convert_mode")
 +    @classmethod
 +    def poll(cls, context):
 +        scene = context.scene
  
 -        if toolsettings.etch_convert_mode == 'LENGTH':
 -            col.prop(toolsettings, "etch_length_limit")
 -        elif toolsettings.etch_convert_mode == 'ADAPTIVE':
 -            col.prop(toolsettings, "etch_adaptive_limit")
 -        elif toolsettings.etch_convert_mode == 'FIXED':
 -            col.prop(toolsettings, "etch_subdivision_number")
 -        elif toolsettings.etch_convert_mode == 'RETARGET':
 -            col.prop(toolsettings, "etch_template")
 -            col.prop(toolsettings, "etch_roll_mode")
 +        multiview = scene.render.use_multiview
-         return context.space_data and multiview
++        return multiview
  
 -            col.separator()
 +    def draw(self, context):
 +        layout = self.layout
 +        view = context.space_data
  
 -            colsub = col.column(align=True)
 -            colsub.prop(toolsettings, "use_etch_autoname")
 -            sub = colsub.column(align=True)
 -            sub.enabled = not toolsettings.use_etch_autoname
 -            sub.prop(toolsettings, "etch_number")
 -            sub.prop(toolsettings, "etch_side")
 +        basic_stereo = context.scene.render.views_format == 'STEREO_3D'
  
 -        col.separator()
 +        col = layout.column()
 +        col.row().prop(view, "stereo_3d_camera", expand=True)
  
 -        col.operator("sketch.convert", text="Convert to Bones")
 -        col.operator("sketch.delete", text="Delete Strokes")
 +        col.label(text="Display:")
 +        row = col.row()
 +        row.active = basic_stereo
 +        row.prop(view, "show_stereo_3d_cameras")
 +        row = col.row()
 +        row.active = basic_stereo
 +        split = row.split()
 +        split.prop(view, "show_stereo_3d_convergence_plane")
 +        split = row.split()
 +        split.prop(view, "stereo_3d_convergence_plane_alpha", text="Alpha")
 +        split.active = view.show_stereo_3d_convergence_plane
 +        row = col.row()
 +        split = row.split()
 +        split.prop(view, "show_stereo_3d_volume")
 +        split = row.split()
 +        split.prop(view, "stereo_3d_volume_alpha", text="Alpha")
  
  
  class VIEW3D_PT_context_properties(Panel):