Merge branch 'master' into blender2.8
authorCampbell Barton <ideasman42@gmail.com>
Mon, 4 Jun 2018 07:06:14 +0000 (09:06 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 4 Jun 2018 07:06:14 +0000 (09:06 +0200)
14 files changed:
1  2 
release/scripts/startup/bl_ui/space_dopesheet.py
release/scripts/startup/bl_ui/space_time.py
source/blender/bmesh/intern/bmesh_mesh.c
source/blender/python/bmesh/CMakeLists.txt
source/blender/python/bmesh/bmesh_py_types.c
source/blender/python/generic/bgl.c
source/blender/python/generic/blf_py_api.c
source/blender/python/generic/bpy_internal_import.c
source/blender/python/generic/bpy_internal_import.h
source/blender/python/intern/bpy.c
source/blender/python/intern/bpy_app.c
source/blender/python/intern/bpy_interface.c
source/blender/python/intern/bpy_rna_anim.c
source/blender/python/intern/bpy_rna_callback.c

@@@ -118,33 -117,12 +118,33 @@@ class DOPESHEET_HT_header(Header)
  
          row = layout.row(align=True)
          row.template_header()
-         
 -        DOPESHEET_MT_editor_menus.draw_collapsible(context, layout)
 -
 +        # XXX: perhaps our mode menu can be retired eventually when we get editor submodes in the main menu?
          layout.prop(st, "mode", text="")
  
 +        if st.mode == 'TIMELINE':
 +            TIME_MT_editor_menus.draw_collapsible(context, layout)
 +            TIME_HT_editor_buttons.draw_header(context, layout)
 +        else:
 +            DOPESHEET_MT_editor_menus.draw_collapsible(context, layout)
 +            DOPESHEET_HT_editor_buttons.draw_header(context, layout)
 +
 +
 +# Header for "normal" dopesheet editor modes (e.g. Dope Sheet, Action, Shape Keys, etc.)
 +# XXX: Temporary, until we have editor submodes in the actual editors menu
 +class DOPESHEET_HT_editor_buttons(Header):
 +    bl_idname = "DOPESHEET_HT_editor_buttons"
 +    bl_space_type = 'DOPESHEET_EDITOR'
 +    bl_label = ""
 +
 +    def draw(self, context):
 +        pass
 +
 +    @staticmethod
 +    def draw_header(context, layout):
 +        st = context.space_data
 +        toolsettings = context.tool_settings
 +
          if st.mode in {'ACTION', 'SHAPEKEY'}:
              row = layout.row(align=True)
              row.operator("action.layer_prev", text="", icon='TRIA_DOWN')
@@@ -277,35 -232,46 +277,35 @@@ class TIME_PT_keyframing_settings(Timel
  
      def draw(self, context):
          layout = self.layout
 -        toolsettings = context.tool_settings
 -
 -        layout.prop_enum(toolsettings, "auto_keying_mode", 'ADD_REPLACE_KEYS')
 -        layout.prop_enum(toolsettings, "auto_keying_mode", 'REPLACE_KEYS')
  
 +        scene = context.scene
 +        toolsettings = context.tool_settings
 +        userprefs = context.user_preferences
  
 -def marker_menu_generic(layout):
 -    from bpy import context
 -
 -    # layout.operator_context = 'EXEC_REGION_WIN'
 -
 -    layout.column()
 -    layout.operator("marker.add", "Add Marker")
 -    layout.operator("marker.duplicate", text="Duplicate Marker")
 -
 -    if len(bpy.data.scenes) > 10:
 -        layout.operator_context = 'INVOKE_DEFAULT'
 -        layout.operator("marker.make_links_scene", text="Duplicate Marker to Scene...", icon='OUTLINER_OB_EMPTY')
 -    else:
 -        layout.operator_menu_enum("marker.make_links_scene", "scene", text="Duplicate Marker to Scene")
 -
 -    layout.operator("marker.delete", text="Delete Marker")
 -
 -    layout.separator()
 -
 -    layout.operator("marker.rename", text="Rename Marker")
 -    layout.operator("marker.move", text="Grab/Move Marker")
 +        col = layout.column(align=True)
 +        col.label("Active Keying Set:")
 +        row = col.row(align=True)
 +        row.prop_search(scene.keying_sets_all, "active", scene, "keying_sets_all", text="")
 +        row.operator("anim.keyframe_insert", text="", icon='KEY_HLT')
 +        row.operator("anim.keyframe_delete", text="", icon='KEY_DEHLT')
  
 -    layout.separator()
 +        col = layout.column(align=True)
 +        col.label("New Keyframe Type:")
 +        col.prop(toolsettings, "keyframe_type", text="")
-         
 -    layout.operator("screen.marker_jump", text="Jump to Next Marker").next = True
 -    layout.operator("screen.marker_jump", text="Jump to Previous Marker").next = False
 +        col = layout.column(align=True)
 +        col.label("Auto Keyframing:")
 +        row = col.row()
 +        row.prop(toolsettings, "auto_keying_mode", text="")
 +        row.prop(toolsettings, "use_keyframe_insert_keyingset", text="")
 +        if not userprefs.edit.use_keyframe_insert_available:
 +            col.prop(toolsettings, "use_record_with_nla", text="Layered Recording")
  
 -    layout.separator()
 -    ts = context.tool_settings
 -    layout.prop(ts, "lock_markers")
  
 +###################################
  
  classes = (
 -    TIME_HT_header,
 +    TIME_HT_editor_buttons,
      TIME_MT_editor_menus,
      TIME_MT_marker,
      TIME_MT_view,
Simple merge
Simple merge
@@@ -231,10 -231,9 +231,10 @@@ PyObject *pyrna_struct_keyframe_insert(
                 * strips themselves. These are stored separately or else the properties will
                 * not have any effect.
                 */
 +              struct Depsgraph *depsgraph = CTX_data_depsgraph(BPy_GetContext());
                ReportList reports;
                short result = 0;
-               
                PointerRNA ptr = self->ptr;
                PropertyRNA *prop = NULL;
                const char *prop_name;
                if (prop) {
                        NlaStrip *strip = (NlaStrip *)ptr.data;
                        FCurve *fcu = list_find_fcurve(&strip->fcurves, RNA_property_identifier(prop), index);
-                       
 -                      result = insert_keyframe_direct(&reports, ptr, prop, fcu, cfra, keytype, options);
 +                      result = insert_keyframe_direct(depsgraph, &reports, ptr, prop, fcu, cfra, keytype, options);
                }
                else {
                        BKE_reportf(&reports, RPT_ERROR, "Could not resolve path (%s)", path_full);