Merge branch 'master' into blender2.8
authorCampbell Barton <ideasman42@gmail.com>
Thu, 28 Jun 2018 21:57:00 +0000 (23:57 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 28 Jun 2018 21:57:00 +0000 (23:57 +0200)
19 files changed:
1  2 
release/scripts/modules/bl_i18n_utils/utils_spell_check.py
release/scripts/presets/keyconfig/3dsmax.py
release/scripts/presets/keyconfig/maya.py
release/scripts/startup/bl_ui/space_topbar.py
release/scripts/startup/bl_ui/space_userpref.py
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/resources.c
source/blender/editors/screen/screen_intern.h
source/blender/editors/screen/screen_ops.c
source/blender/editors/screen/screendump.c
source/blender/editors/space_info/space_info.c
source/blender/editors/space_node/space_node.c
source/blender/editors/space_sequencer/space_sequencer.c
source/blender/editors/space_statusbar/space_statusbar.c
source/blender/makesdna/DNA_userdef_types.h
source/blender/makesrna/intern/rna_userdef.c
source/blender/windowmanager/WM_api.h
source/blender/windowmanager/WM_types.h
source/blender/windowmanager/intern/wm_window.c

index bb147dab6a655a8cc8684f77998e05ac76f710f6,0000000000000000000000000000000000000000..ece8666d39811cd59c5598039af34fb9ca6ca818
mode 100644,000000..100644
--- /dev/null
@@@ -1,601 -1,0 +1,600 @@@
-         layout.operator("screen.screencast")
 +# ##### BEGIN GPL LICENSE BLOCK #####
 +#
 +#  This program is free software; you can redistribute it and/or
 +#  modify it under the terms of the GNU General Public License
 +#  as published by the Free Software Foundation; either version 2
 +#  of the License, or (at your option) any later version.
 +#
 +#  This program is distributed in the hope that it will be useful,
 +#  but WITHOUT ANY WARRANTY; without even the implied warranty of
 +#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 +#  GNU General Public License for more details.
 +#
 +#  You should have received a copy of the GNU General Public License
 +#  along with this program; if not, write to the Free Software Foundation,
 +#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 +#
 +# ##### END GPL LICENSE BLOCK #####
 +
 +# <pep8 compliant>
 +import bpy
 +from bpy.types import Header, Menu, Panel
 +
 +
 +class TOPBAR_HT_upper_bar(Header):
 +    bl_space_type = 'TOPBAR'
 +
 +    def draw(self, context):
 +        region = context.region
 +
 +        if region.alignment == 'RIGHT':
 +            self.draw_right(context)
 +        else:
 +            self.draw_left(context)
 +
 +    def draw_left(self, context):
 +        layout = self.layout
 +
 +        window = context.window
 +        screen = context.screen
 +
 +        layout.operator("wm.splash", text="", icon='BLENDER', emboss=False)
 +
 +        INFO_MT_editor_menus.draw_collapsible(context, layout)
 +
 +        layout.separator()
 +
 +        if not screen.show_fullscreen:
 +            layout.template_ID_tabs(
 +                window, "workspace",
 +                new="workspace.workspace_add_menu",
 +                unlink="workspace.workspace_delete",
 +            )
 +        else:
 +            layout.operator(
 +                "screen.back_to_previous",
 +                icon='SCREEN_BACK',
 +                text="Back to Previous",
 +            )
 +
 +    def draw_right(self, context):
 +        layout = self.layout
 +
 +        window = context.window
 +        scene = window.scene
 +
 +        # Active workspace view-layer is retrieved through window, not through workspace.
 +        layout.template_ID(window, "scene", new="scene.new", unlink="scene.delete")
 +
 +        row = layout.row(align=True)
 +        row.template_search(
 +            window, "view_layer",
 +            scene, "view_layers",
 +            new="scene.view_layer_add",
 +            unlink="scene.view_layer_remove")
 +
 +
 +class TOPBAR_HT_lower_bar(Header):
 +    bl_space_type = 'TOPBAR'
 +    bl_region_type = 'WINDOW'
 +
 +    def draw(self, context):
 +        layout = self.layout
 +        region = context.region
 +
 +        if region.alignment == 'LEFT':
 +            self.draw_left(context)
 +        elif region.alignment == 'RIGHT':
 +            self.draw_right(context)
 +        else:
 +            self.draw_center(context)
 +
 +    def draw_left(self, context):
 +        layout = self.layout
 +        mode = context.mode
 +
 +        # Active Tool
 +        # -----------
 +        from .space_toolsystem_common import ToolSelectPanelHelper
 +        ToolSelectPanelHelper.draw_active_tool_header(context, layout)
 +
 +        # Object Mode Options
 +        # -------------------
 +
 +        # Example of how toolsettings can be accessed as pop-overs.
 +
 +        # TODO(campbell): editing options should be after active tool options
 +        # (obviously separated for from the users POV)
 +        draw_fn = getattr(_draw_left_context_mode, mode, None)
 +        if draw_fn is not None:
 +            draw_fn(context, layout)
 +
 +        # Note: general mode options should be added to 'draw_right'.
 +        if mode == 'SCULPT':
 +            layout.popover_group(space_type='PROPERTIES', region_type='WINDOW', context=".paint_common", category="")
 +        elif mode == 'PAINT_VERTEX':
 +            layout.popover_group(space_type='PROPERTIES', region_type='WINDOW', context=".paint_common", category="")
 +        elif mode == 'PAINT_WEIGHT':
 +            layout.popover_group(space_type='PROPERTIES', region_type='WINDOW', context=".paint_common", category="")
 +        elif mode == 'PAINT_TEXTURE':
 +            layout.popover_group(space_type='PROPERTIES', region_type='WINDOW', context=".paint_common", category="")
 +        elif mode == 'EDIT_ARMATURE':
 +            pass
 +        elif mode == 'EDIT_CURVE':
 +            pass
 +        elif mode == 'EDIT_MESH':
 +            pass
 +        elif mode == 'POSE':
 +            pass
 +        elif mode == 'PARTICLE':
 +            layout.popover_group(space_type='PROPERTIES', region_type='WINDOW', context=".paint_common", category="")
 +
 +    def draw_center(self, context):
 +        pass
 +
 +    def draw_right(self, context):
 +        layout = self.layout
 +
 +        # General options, note, these _could_ display at the RHS of the draw_left callback.
 +        # we just want them not to be confused with tool options.
 +        mode = context.mode
 +
 +        if mode == 'SCULPT':
 +            layout.popover_group(space_type='PROPERTIES', region_type='WINDOW', context=".sculpt_mode", category="")
 +        elif mode == 'PAINT_VERTEX':
 +            layout.popover_group(space_type='PROPERTIES', region_type='WINDOW', context=".vertexpaint", category="")
 +        elif mode == 'PAINT_WEIGHT':
 +            layout.popover_group(space_type='PROPERTIES', region_type='WINDOW', context=".weightpaint", category="")
 +        elif mode == 'PAINT_TEXTURE':
 +            layout.popover_group(space_type='PROPERTIES', region_type='WINDOW', context=".imagepaint", category="")
 +        elif mode == 'EDIT_ARMATURE':
 +            layout.popover_group(space_type='PROPERTIES', region_type='WINDOW', context=".armature_edit", category="")
 +        elif mode == 'EDIT_CURVE':
 +            layout.popover_group(space_type='PROPERTIES', region_type='WINDOW', context=".curve_edit", category="")
 +        elif mode == 'EDIT_MESH':
 +            layout.popover_group(space_type='PROPERTIES', region_type='WINDOW', context=".mesh_edit", category="")
 +        elif mode == 'POSE':
 +            layout.popover_group(space_type='PROPERTIES', region_type='WINDOW', context=".posemode", category="")
 +        elif mode == 'PARTICLE':
 +            layout.popover_group(space_type='PROPERTIES', region_type='WINDOW', context=".particlemode", category="")
 +
 +
 +class _draw_left_context_mode:
 +    @staticmethod
 +    def SCULPT(context, layout):
 +        brush = context.tool_settings.sculpt.brush
 +        if brush is None:
 +            return
 +
 +        from .properties_paint_common import UnifiedPaintPanel
 +
 +        UnifiedPaintPanel.prop_unified_size(layout, context, brush, "size", slider=True, text="Radius")
 +        UnifiedPaintPanel.prop_unified_strength(layout, context, brush, "strength", slider=True, text="Strength")
 +        layout.prop(brush, "direction", text="", expand=True)
 +
 +    def PAINT_TEXTURE(context, layout):
 +        brush = context.tool_settings.vertex_paint.brush
 +        if brush is None:
 +            return
 +
 +        from .properties_paint_common import UnifiedPaintPanel
 +
 +        layout.prop(brush, "color", text="")
 +        UnifiedPaintPanel.prop_unified_size(layout, context, brush, "size", slider=True, text="Radius")
 +        UnifiedPaintPanel.prop_unified_strength(layout, context, brush, "strength", slider=True, text="Strength")
 +
 +    def PAINT_VERTEX(context, layout):
 +        brush = context.tool_settings.vertex_paint.brush
 +        if brush is None:
 +            return
 +
 +        from .properties_paint_common import UnifiedPaintPanel
 +
 +        layout.prop(brush, "color", text="")
 +        UnifiedPaintPanel.prop_unified_size(layout, context, brush, "size", slider=True, text="Radius")
 +        UnifiedPaintPanel.prop_unified_strength(layout, context, brush, "strength", slider=True, text="Strength")
 +
 +    def PAINT_WEIGHT(context, layout):
 +        brush = context.tool_settings.weight_paint.brush
 +        if brush is None:
 +            return
 +
 +        from .properties_paint_common import UnifiedPaintPanel
 +
 +        UnifiedPaintPanel.prop_unified_weight(layout, context, brush, "weight", slider=True, text="Weight")
 +        UnifiedPaintPanel.prop_unified_size(layout, context, brush, "size", slider=True, text="Radius")
 +        UnifiedPaintPanel.prop_unified_strength(layout, context, brush, "strength", slider=True, text="Strength")
 +
 +
 +class TOPBAR_PT_pivot_point(Panel):
 +    bl_space_type = 'TOPBAR'
 +    bl_region_type = 'HEADER'
 +    bl_label = "Pivot Point"
 +
 +    def draw(self, context):
 +        toolsettings = context.tool_settings
 +        obj = context.active_object
 +        mode = context.mode
 +
 +        layout = self.layout
 +        col = layout.column()
 +        col.label("Pivot Point")
 +        col.prop(toolsettings, "transform_pivot_point", expand=True)
 +
 +        col.separator()
 +
 +        if (obj is None) or (mode in {'OBJECT', 'POSE', 'WEIGHT_PAINT'}):
 +            col.prop(
 +                toolsettings,
 +                "use_transform_pivot_point_align",
 +                text="Center Points Only",
 +            )
 +
 +
 +class TOPBAR_PT_snapping(Panel):
 +    bl_space_type = 'TOPBAR'
 +    bl_region_type = 'HEADER'
 +    bl_label = "Snapping"
 +
 +    def draw(self, context):
 +        toolsettings = context.tool_settings
 +        snap_elements = toolsettings.snap_elements
 +        obj = context.active_object
 +        mode = context.mode
 +        object_mode = 'OBJECT' if obj is None else obj.mode
 +
 +        layout = self.layout
 +        col = layout.column()
 +        col.label("Snapping")
 +        col.prop(toolsettings, "snap_elements", expand=True)
 +
 +        col.separator()
 +        if 'INCREMENT' in snap_elements:
 +            col.prop(toolsettings, "use_snap_grid_absolute")
 +
 +        if snap_elements != {'INCREMENT'}:
 +            col.label("Target")
 +            row = col.row(align=True)
 +            row.prop(toolsettings, "snap_target", expand=True)
 +
 +            if obj:
 +                if object_mode == 'EDIT':
 +                    col.prop(toolsettings, "use_snap_self")
 +                if object_mode in {'OBJECT', 'POSE', 'EDIT'}:
 +                    col.prop(toolsettings, "use_snap_align_rotation", text="Align Rotation")
 +
 +            if 'FACE' in snap_elements:
 +                col.prop(toolsettings, "use_snap_project", text="Project Elements")
 +
 +            if 'VOLUME' in snap_elements:
 +                col.prop(toolsettings, "use_snap_peel_object")
 +
 +
 +class INFO_MT_editor_menus(Menu):
 +    bl_idname = "INFO_MT_editor_menus"
 +    bl_label = ""
 +
 +    def draw(self, context):
 +        self.draw_menus(self.layout, context)
 +
 +    @staticmethod
 +    def draw_menus(layout, context):
 +        layout.menu("INFO_MT_file")
 +        layout.menu("INFO_MT_edit")
 +
 +        layout.menu("INFO_MT_render")
 +
 +        layout.menu("INFO_MT_window")
 +        layout.menu("INFO_MT_help")
 +
 +
 +class INFO_MT_file(Menu):
 +    bl_label = "File"
 +
 +    def draw(self, context):
 +        layout = self.layout
 +
 +        layout.operator_context = 'INVOKE_AREA'
 +        layout.operator("wm.read_homefile", text="New", icon='NEW')
 +        layout.operator("wm.open_mainfile", text="Open...", icon='FILE_FOLDER')
 +        layout.menu("INFO_MT_file_open_recent")
 +        layout.operator("wm.revert_mainfile")
 +        layout.operator("wm.recover_last_session")
 +        layout.operator("wm.recover_auto_save", text="Recover Auto Save...")
 +
 +        layout.separator()
 +
 +        layout.operator_context = 'EXEC_AREA' if context.blend_data.is_saved else 'INVOKE_AREA'
 +        layout.operator("wm.save_mainfile", text="Save", icon='FILE_TICK')
 +
 +        layout.operator_context = 'INVOKE_AREA'
 +        layout.operator("wm.save_as_mainfile", text="Save As...")
 +        layout.operator_context = 'INVOKE_AREA'
 +        layout.operator("wm.save_as_mainfile", text="Save Copy...").copy = True
 +
 +        layout.separator()
 +
 +        layout.operator_context = 'INVOKE_AREA'
 +        layout.operator("wm.save_homefile")
 +        layout.operator("wm.read_factory_settings")
 +
 +        layout.separator()
 +
 +        layout.operator_context = 'INVOKE_AREA'
 +        layout.operator("wm.link", text="Link", icon='LINK_BLEND')
 +        layout.operator("wm.append", text="Append", icon='APPEND_BLEND')
 +        layout.menu("INFO_MT_file_previews")
 +
 +        layout.separator()
 +
 +        layout.menu("INFO_MT_file_import", icon='IMPORT')
 +        layout.menu("INFO_MT_file_export", icon='EXPORT')
 +
 +        layout.separator()
 +
 +        layout.menu("INFO_MT_file_external_data")
 +
 +        layout.separator()
 +
 +        layout.operator_context = 'EXEC_AREA'
 +        if bpy.data.is_dirty and context.user_preferences.view.use_quit_dialog:
 +            layout.operator_context = 'INVOKE_SCREEN'  # quit dialog
 +        layout.operator("wm.quit_blender", text="Quit", icon='QUIT')
 +
 +
 +class INFO_MT_file_import(Menu):
 +    bl_idname = "INFO_MT_file_import"
 +    bl_label = "Import"
 +
 +    def draw(self, context):
 +        if bpy.app.build_options.collada:
 +            self.layout.operator("wm.collada_import", text="Collada (Default) (.dae)")
 +        if bpy.app.build_options.alembic:
 +            self.layout.operator("wm.alembic_import", text="Alembic (.abc)")
 +
 +
 +class INFO_MT_file_export(Menu):
 +    bl_idname = "INFO_MT_file_export"
 +    bl_label = "Export"
 +
 +    def draw(self, context):
 +        if bpy.app.build_options.collada:
 +            self.layout.operator("wm.collada_export", text="Collada (Default) (.dae)")
 +        if bpy.app.build_options.alembic:
 +            self.layout.operator("wm.alembic_export", text="Alembic (.abc)")
 +
 +
 +class INFO_MT_file_external_data(Menu):
 +    bl_label = "External Data"
 +
 +    def draw(self, context):
 +        layout = self.layout
 +
 +        icon = 'CHECKBOX_HLT' if bpy.data.use_autopack else 'CHECKBOX_DEHLT'
 +        layout.operator("file.autopack_toggle", icon=icon)
 +
 +        layout.separator()
 +
 +        pack_all = layout.row()
 +        pack_all.operator("file.pack_all")
 +        pack_all.active = not bpy.data.use_autopack
 +
 +        unpack_all = layout.row()
 +        unpack_all.operator("file.unpack_all")
 +        unpack_all.active = not bpy.data.use_autopack
 +
 +        layout.separator()
 +
 +        layout.operator("file.make_paths_relative")
 +        layout.operator("file.make_paths_absolute")
 +        layout.operator("file.report_missing_files")
 +        layout.operator("file.find_missing_files")
 +
 +
 +class INFO_MT_file_previews(Menu):
 +    bl_label = "Data Previews"
 +
 +    def draw(self, context):
 +        layout = self.layout
 +
 +        layout.operator("wm.previews_ensure")
 +        layout.operator("wm.previews_batch_generate")
 +
 +        layout.separator()
 +
 +        layout.operator("wm.previews_clear")
 +        layout.operator("wm.previews_batch_clear")
 +
 +
 +class INFO_MT_game(Menu):
 +    bl_label = "Game"
 +
 +    def draw(self, context):
 +        layout = self.layout
 +
 +        gs = context.scene.game_settings
 +
 +        layout.operator("view3d.game_start")
 +
 +        layout.separator()
 +
 +        layout.prop(gs, "show_debug_properties")
 +        layout.prop(gs, "show_framerate_profile")
 +        layout.prop(gs, "show_physics_visualization")
 +        layout.prop(gs, "use_deprecation_warnings")
 +        layout.prop(gs, "use_animation_record")
 +        layout.separator()
 +        layout.prop(gs, "use_auto_start")
 +
 +
 +class INFO_MT_render(Menu):
 +    bl_label = "Render"
 +
 +    def draw(self, context):
 +        layout = self.layout
 +
 +        rd = context.scene.render
 +
 +        layout.operator("render.render", text="Render Image", icon='RENDER_STILL').use_viewport = True
 +        props = layout.operator("render.render", text="Render Animation", icon='RENDER_ANIMATION')
 +        props.animation = True
 +        props.use_viewport = True
 +        layout.operator("sound.mixdown", text="Render Audio", icon='PLAY_AUDIO')
 +
 +        layout.separator()
 +
 +        layout.prop_menu_enum(rd, "display_mode", text="Display Mode")
 +        layout.prop(rd, "use_lock_interface", text="Lock Interface")
 +
 +        layout.separator()
 +
 +        props = layout.operator("render.opengl", text="OpenGL Render Image", icon='RENDER_STILL')
 +        props.view_context = False
 +        props = layout.operator("render.opengl", text="OpenGL Render Animation", icon='RENDER_ANIMATION')
 +        props.view_context = False
 +        props.animation = True
 +        layout.menu("INFO_MT_opengl_render")
 +
 +        layout.separator()
 +
 +        layout.operator("render.view_show")
 +        layout.operator("render.play_rendered_anim", icon='PLAY')
 +
 +
 +class INFO_MT_opengl_render(Menu):
 +    bl_label = "OpenGL Render Options"
 +
 +    def draw(self, context):
 +        layout = self.layout
 +
 +        rd = context.scene.render
 +        layout.prop(rd, "use_antialiasing")
 +        layout.prop(rd, "use_full_sample")
 +
 +        layout.prop_menu_enum(rd, "antialiasing_samples")
 +        layout.prop_menu_enum(rd, "alpha_mode")
 +
 +
 +class INFO_MT_edit(Menu):
 +    bl_label = "Edit"
 +
 +    def draw(self, context):
 +        layout = self.layout
 +
 +        layout.operator("ed.undo")
 +        layout.operator("ed.redo")
 +
 +        layout.separator()
 +
 +        layout.operator("ed.undo_history", text="Undo History...")
 +
 +        layout.separator()
 +
 +        layout.operator("screen.repeat_last")
 +        layout.operator("screen.repeat_history", text="Repeat History...")
 +
 +        layout.separator()
 +
 +        layout.operator("screen.redo_last", text="Adjust Last Operation...")
 +
 +        layout.separator()
 +
 +        # Should move elsewhere (impacts outliner & 3D view).
 +        tool_settings = context.tool_settings
 +        layout.prop(tool_settings, "lock_object_mode")
 +
 +        layout.separator()
 +
 +        layout.operator("screen.userpref_show", text="User Preferences...", icon='PREFERENCES')
 +
 +
 +class INFO_MT_window(Menu):
 +    bl_label = "Window"
 +
 +    def draw(self, context):
 +        import sys
 +
 +        layout = self.layout
 +
 +        layout.operator("wm.window_new")
 +        layout.operator("wm.window_fullscreen_toggle", icon='FULLSCREEN_ENTER')
 +
 +        layout.separator()
 +
 +        layout.operator("screen.screenshot")
 +
 +        if sys.platform[:3] == "win":
 +            layout.separator()
 +            layout.operator("wm.console_toggle", icon='CONSOLE')
 +
 +        if context.scene.render.use_multiview:
 +            layout.separator()
 +            layout.operator("wm.set_stereo_3d")
 +
 +
 +class INFO_MT_help(Menu):
 +    bl_label = "Help"
 +
 +    def draw(self, context):
 +        layout = self.layout
 +
 +        layout.operator(
 +            "wm.url_open", text="Manual", icon='HELP',
 +        ).url = "https://docs.blender.org/manual/en/dev/"
 +        layout.operator(
 +            "wm.url_open", text="Release Log", icon='URL',
 +        ).url = "http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/%d.%d" % bpy.app.version[:2]
 +        layout.separator()
 +
 +        layout.operator(
 +            "wm.url_open", text="Blender Website", icon='URL',
 +        ).url = "https://www.blender.org"
 +        layout.operator(
 +            "wm.url_open", text="Blender Store", icon='URL',
 +        ).url = "https://store.blender.org"
 +        layout.operator(
 +            "wm.url_open", text="Developer Community", icon='URL',
 +        ).url = "https://www.blender.org/get-involved/"
 +        layout.operator(
 +            "wm.url_open", text="User Community", icon='URL',
 +        ).url = "https://www.blender.org/support/user-community"
 +        layout.separator()
 +        layout.operator(
 +            "wm.url_open", text="Report a Bug", icon='URL',
 +        ).url = "https://developer.blender.org/maniphest/task/edit/form/1"
 +        layout.separator()
 +
 +        layout.operator(
 +            "wm.url_open", text="Python API Reference", icon='URL',
 +        ).url = bpy.types.WM_OT_doc_view._prefix
 +
 +        layout.operator("wm.operator_cheat_sheet", icon='TEXT')
 +        layout.operator("wm.sysinfo", icon='TEXT')
 +        layout.separator()
 +
 +        layout.operator("wm.splash", icon='BLENDER')
 +
 +
 +classes = (
 +    TOPBAR_HT_upper_bar,
 +    TOPBAR_HT_lower_bar,
 +    TOPBAR_PT_pivot_point,
 +    TOPBAR_PT_snapping,
 +    INFO_MT_editor_menus,
 +    INFO_MT_file,
 +    INFO_MT_file_import,
 +    INFO_MT_file_export,
 +    INFO_MT_file_external_data,
 +    INFO_MT_file_previews,
 +    INFO_MT_edit,
 +    INFO_MT_game,
 +    INFO_MT_render,
 +    INFO_MT_opengl_render,
 +    INFO_MT_window,
 +    INFO_MT_help,
 +)
 +
 +if __name__ == "__main__":  # only for live edit.
 +    from bpy.utils import register_class
 +    for cls in classes:
 +        register_class(cls)
index be5b77bbd3a1cb3d2fe6d64ff5b3e8a8b242f982,6418db3e2795ed5466640a2162ec480957ad080c..8a7af5b39c20ffc29dee459580556256a4826307
@@@ -4687,12 -4493,9 +4687,11 @@@ void ED_operatortypes_screen(void
        WM_operatortype_append(SCREEN_OT_back_to_previous);
        WM_operatortype_append(SCREEN_OT_spacedata_cleanup);
        WM_operatortype_append(SCREEN_OT_screenshot);
-       WM_operatortype_append(SCREEN_OT_screencast);
        WM_operatortype_append(SCREEN_OT_userpref_show);
 +      WM_operatortype_append(SCREEN_OT_drivers_editor_show);
        WM_operatortype_append(SCREEN_OT_region_blend);
        WM_operatortype_append(SCREEN_OT_space_context_cycle);
 +      WM_operatortype_append(SCREEN_OT_workspace_cycle);
  
        /*frame changes*/
        WM_operatortype_append(SCREEN_OT_frame_offset);
index fbe0b8dc40ec7a804f883aff3dd104dd2bd336b2,ec486954ba30699d454350ee60d8ea211af62b19..781e183ae037b6a6cb32b4ec08eabcf0d8923bba
@@@ -308,258 -298,3 +298,4 @@@ void SCREEN_OT_screenshot(wmOperatorTyp
        RNA_def_boolean(ot->srna, "full", 1, "Full Screen",
                        "Capture the whole window (otherwise only capture the active area)");
  }
- /* *************** screenshot movie job ************************* */
- typedef struct ScreenshotJob {
-       Main *bmain;
-       Scene *scene;
-       wmWindowManager *wm;
-       unsigned int *dumprect;
-       int x, y, dumpsx, dumpsy;
-       const short *stop;
-       const short *do_update;
-       ReportList reports;
-       bMovieHandle *movie_handle;
-       void *movie_ctx;
- } ScreenshotJob;
- static void screenshot_freejob(void *sjv)
- {
-       ScreenshotJob *sj = sjv;
-       if (sj->dumprect)
-               MEM_freeN(sj->dumprect);
-       if (sj->movie_handle) {
-               bMovieHandle *mh = sj->movie_handle;
-               mh->end_movie(sj->movie_ctx);
-               mh->context_free(sj->movie_ctx);
-       }
-       MEM_freeN(sj);
- }
- /* called before redraw notifiers, copies a new dumprect */
- static void screenshot_updatejob(void *sjv)
- {
-       ScreenshotJob *sj = sjv;
-       unsigned int *dumprect;
-       if (sj->dumprect == NULL) {
-               dumprect = MEM_mallocN(sizeof(int) * sj->dumpsx * sj->dumpsy, "dumprect");
-               screenshot_read_pixels(sj->x, sj->y, sj->dumpsx, sj->dumpsy, (unsigned char *)dumprect);
-               sj->dumprect = dumprect;
-       }
- }
- /* only this runs inside thread */
- static void screenshot_startjob(void *sjv, short *stop, short *do_update, float *UNUSED(progress))
- {
-       ScreenshotJob *sj = sjv;
-       RenderData rd = sj->scene->r;
-       bMovieHandle *mh = NULL;
-       /* we need this as local variables for renderdata */
-       rd.frs_sec = U.scrcastfps;
-       rd.frs_sec_base = 1.0f;
-       if (BKE_imtype_is_movie(rd.im_format.imtype)) {
-               mh = BKE_movie_handle_get(sj->scene->r.im_format.imtype);
-               if (mh == NULL) {
-                       printf("Movie format unsupported\n");
-                       return;
-               }
-               sj->movie_ctx = mh->context_create();
-               sj->movie_handle = mh;
-               if (!mh->start_movie(sj->movie_ctx, sj->scene, &rd, sj->dumpsx, sj->dumpsy, &sj->reports, false, "")) {
-                       printf("screencast job stopped\n");
-                       return;
-               }
-       }
-       sj->stop = stop;
-       sj->do_update = do_update;
-       *do_update = true; /* wait for opengl rect */
-       while (*stop == 0) {
-               if (sj->dumprect) {
-                       if (mh) {
-                               if (mh->append_movie(sj->movie_ctx, &rd, rd.sfra, rd.cfra, (int *)sj->dumprect,
-                                                    sj->dumpsx, sj->dumpsy, "", &sj->reports))
-                               {
-                                       BKE_reportf(&sj->reports, RPT_INFO, "Appended frame: %d", rd.cfra);
-                                       printf("Appended frame %d\n", rd.cfra);
-                               }
-                               else {
-                                       break;
-                               }
-                       }
-                       else {
-                               ImBuf *ibuf = IMB_allocImBuf(sj->dumpsx, sj->dumpsy, rd.im_format.planes, 0);
-                               char name[FILE_MAX];
-                               int ok;
-                               BKE_image_path_from_imformat(
-                                       name, rd.pic, BKE_main_blendfile_path(sj->bmain), rd.cfra,
-                                       &rd.im_format, (rd.scemode & R_EXTENSION) != 0, true, NULL);
-                               ibuf->rect = sj->dumprect;
-                               ok = BKE_imbuf_write(ibuf, name, &rd.im_format);
-                               if (ok == 0) {
-                                       printf("Write error: cannot save %s\n", name);
-                                       BKE_reportf(&sj->reports, RPT_INFO, "Write error: cannot save %s", name);
-                                       break;
-                               }
-                               else {
-                                       printf("Saved file: %s\n", name);
-                                       BKE_reportf(&sj->reports, RPT_INFO, "Saved file: %s", name);
-                               }
-                               /* imbuf knows which rects are not part of ibuf */
-                               IMB_freeImBuf(ibuf);
-                       }
-                       MEM_freeN(sj->dumprect);
-                       sj->dumprect = NULL;
-                       *do_update = true;
-                       rd.cfra++;
-               }
-               else
-                       PIL_sleep_ms(U.scrcastwait);
-       }
-       if (mh) {
-               mh->end_movie(sj->movie_ctx);
-               mh->context_free(sj->movie_ctx);
-               sj->movie_handle = NULL;
-       }
-       BKE_report(&sj->reports, RPT_INFO, "Screencast job stopped");
- }
- /* Helper callback for drawing the cursor itself */
- static void screencast_draw_cursor(bContext *UNUSED(C), int x, int y, void *UNUSED(p_ptr))
- {
-       GPU_line_smooth(true);
-       GPU_blend(true);
-       Gwn_VertFormat *format = immVertexFormat();
-       unsigned int pos = GWN_vertformat_attr_add(format, "pos", GWN_COMP_F32, 2, GWN_FETCH_FLOAT);
-       immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
-       immUniformColor4ub(0, 0, 0, 32);
-       imm_draw_circle_fill_2d(pos, (float)x, (float)y, 20, 40);
-       immUniformColor4ub(255, 255, 255, 128);
-       imm_draw_circle_wire_2d(pos, (float)x, (float)y, 20, 40);
-       immUnbindProgram();
-       GPU_blend(false);
-       GPU_line_smooth(false);
- }
- /* Turn brush cursor in 3D view on/off */
- static void screencast_cursor_toggle(wmWindowManager *wm, short enable)
- {
-       static void *cursor = NULL;
-       if (cursor && !enable) {
-               /* clear cursor */
-               WM_paint_cursor_end(wm, cursor);
-               cursor = NULL;
-       }
-       else if (enable) {
-               /* enable cursor */
-               cursor = WM_paint_cursor_activate(wm, NULL, screencast_draw_cursor, NULL);
-       }
- }
- static void screenshot_endjob(void *sjv)
- {
-       ScreenshotJob *sj = sjv;
-       screencast_cursor_toggle(sj->wm, 0);
- }
- static int screencast_exec(bContext *C, wmOperator *op)
- {
-       wmWindowManager *wm = CTX_wm_manager(C);
-       wmWindow *win = CTX_wm_window(C);
-       bScreen *screen = CTX_wm_screen(C);
-       wmJob *wm_job;
-       ScreenshotJob *sj;
-       /* if called again, stop the running job */
-       if (WM_jobs_test(wm, screen, WM_JOB_TYPE_SCREENCAST))
-               WM_jobs_stop(wm, screen, screenshot_startjob);
-       wm_job = WM_jobs_get(wm, win, screen, "Screencast", 0, WM_JOB_TYPE_SCREENCAST);
-       sj = MEM_callocN(sizeof(ScreenshotJob), "screenshot job");
-       /* setup sj */
-       if (RNA_boolean_get(op->ptr, "full")) {
-               sj->x = 0;
-               sj->y = 0;
-               sj->dumpsx = WM_window_pixels_x(win);
-               sj->dumpsy = WM_window_pixels_y(win);
-       }
-       else {
-               ScrArea *curarea = CTX_wm_area(C);
-               sj->x = curarea->totrct.xmin;
-               sj->y = curarea->totrct.ymin;
-               sj->dumpsx = curarea->totrct.xmax - sj->x;
-               sj->dumpsy = curarea->totrct.ymax - sj->y;
-       }
-       sj->bmain = CTX_data_main(C);
-       sj->scene = CTX_data_scene(C);
-       sj->wm = wm;
-       BKE_reports_init(&sj->reports, RPT_PRINT);
-       /* setup job */
-       WM_jobs_customdata_set(wm_job, sj, screenshot_freejob);
-       WM_jobs_timer(wm_job, 0.1, 0, NC_SCREEN | ND_SCREENCAST);
-       WM_jobs_callbacks(wm_job, screenshot_startjob, NULL, screenshot_updatejob, screenshot_endjob);
-       WM_jobs_start(sj->wm, wm_job);
-       screencast_cursor_toggle(sj->wm, 1);
-       WM_event_add_notifier(C, NC_SCREEN | ND_SCREENCAST, screen);
-       return OPERATOR_FINISHED;
- }
- void SCREEN_OT_screencast(wmOperatorType *ot)
- {
-       ot->name = "Make Screencast";
-       ot->idname = "SCREEN_OT_screencast";
-       ot->description = "Capture a video of the active area or whole Blender window";
-       ot->invoke = WM_operator_confirm;
-       ot->exec = screencast_exec;
-       ot->poll = screenshot_poll;  /* shared poll */
-       ot->flag = 0;
-       RNA_def_property(ot->srna, "filepath", PROP_STRING, PROP_FILEPATH);
-       RNA_def_boolean(ot->srna, "full", 1, "Full Screen",
-                       "Capture the whole window (otherwise only capture the active area)");
- }
 +
index 4273404ac90d57932412371d7f3db0bc5120a86f,9ffa73af52be502c3c4ffad99ad919ee06bf8d87..b3c1a1635acc85afaba87887fc40ca1f5563aea4
@@@ -264,9 -256,8 +264,9 @@@ static void info_header_listener
        /* context changes */
        switch (wmn->category) {
                case NC_SCREEN:
-                       if (ELEM(wmn->data, ND_LAYER, ND_SCREENCAST, ND_ANIMPLAY)) {
 -                      if (ELEM(wmn->data, ND_ANIMPLAY))
++                      if (ELEM(wmn->data, ND_LAYER, ND_ANIMPLAY)) {
                                ED_region_tag_redraw(ar);
 +                      }
                        break;
                case NC_WM:
                        if (wmn->data == ND_JOB)
index 14ba9280a7558977648652527abe8856e904069b,b63d053b7037b1e6bc5c2fe25451e4ce2ba5c198..fd485028f8e6662de33154f946b9ed3871daced3
@@@ -758,23 -742,12 +758,22 @@@ static void node_region_listener
        /* context changes */
        switch (wmn->category) {
                case NC_SPACE:
 -                      if (wmn->data == ND_SPACE_NODE)
 -                              ED_region_tag_redraw(ar);
 +                      switch (wmn->data) {
 +                              case ND_SPACE_NODE:
 +                                      ED_region_tag_redraw(ar);
 +                                      break;
 +                              case ND_SPACE_NODE_VIEW:
 +                                      WM_manipulatormap_tag_refresh(mmap);
 +                                      break;
 +                      }
                        break;
                case NC_SCREEN:
 +                      if (wmn->data == ND_LAYOUTSET || wmn->action == NA_EDITED) {
 +                              WM_manipulatormap_tag_refresh(mmap);
 +                      }
                        switch (wmn->data) {
-                               case ND_SCREENCAST:
                                case ND_ANIMPLAY:
 +                              case ND_LAYER:
                                        ED_region_tag_redraw(ar);
                                        break;
                        }
index a66b36c2580ca0066434ae02147e2a710e32aae1,0000000000000000000000000000000000000000..5ff32b98f906e5d108c34cfe2528069b69ebad7b
mode 100644,000000..100644
--- /dev/null
@@@ -1,187 -1,0 +1,187 @@@
-                       if (ELEM(wmn->data, ND_LAYER, ND_SCREENCAST, ND_ANIMPLAY)) {
 +/*
 + * ***** BEGIN GPL LICENSE BLOCK *****
 + *
 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License
 + * as published by the Free Software Foundation; either version 2
 + * of the License, or (at your option) any later version.
 + *
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
 + * along with this program; if not, write to the Free Software Foundation,
 + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 + *
 + * ***** END GPL LICENSE BLOCK *****
 + */
 +
 +/** \file blender/editors/space_statusbar/space_statusbar.c
 + *  \ingroup spstatusbar
 + */
 +
 +
 +#include <string.h>
 +#include <stdio.h>
 +
 +#include "MEM_guardedalloc.h"
 +
 +#include "BLI_blenlib.h"
 +
 +#include "BKE_context.h"
 +#include "BKE_screen.h"
 +
 +#include "ED_screen.h"
 +#include "ED_space_api.h"
 +
 +#include "RNA_access.h"
 +
 +#include "UI_interface.h"
 +#include "UI_view2d.h"
 +
 +#include "WM_api.h"
 +#include "WM_types.h"
 +#include "WM_message.h"
 +
 +
 +/* ******************** default callbacks for statusbar space ********************  */
 +
 +static SpaceLink *statusbar_new(const ScrArea *UNUSED(area), const Scene *UNUSED(scene))
 +{
 +      ARegion *ar;
 +      SpaceStatusBar *sstatusbar;
 +
 +      sstatusbar = MEM_callocN(sizeof(*sstatusbar), "init statusbar");
 +      sstatusbar->spacetype = SPACE_STATUSBAR;
 +
 +      /* header region */
 +      ar = MEM_callocN(sizeof(*ar), "header for statusbar");
 +      BLI_addtail(&sstatusbar->regionbase, ar);
 +      ar->regiontype = RGN_TYPE_HEADER;
 +      ar->alignment = RGN_ALIGN_NONE;
 +
 +      return (SpaceLink *)sstatusbar;
 +}
 +
 +/* not spacelink itself */
 +static void statusbar_free(SpaceLink *UNUSED(sl))
 +{
 +
 +}
 +
 +
 +/* spacetype; init callback */
 +static void statusbar_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(sa))
 +{
 +
 +}
 +
 +static SpaceLink *statusbar_duplicate(SpaceLink *sl)
 +{
 +      SpaceStatusBar *sstatusbarn = MEM_dupallocN(sl);
 +
 +      /* clear or remove stuff from old */
 +
 +      return (SpaceLink *)sstatusbarn;
 +}
 +
 +
 +
 +/* add handlers, stuff you only do once or on area/region changes */
 +static void statusbar_header_region_init(wmWindowManager *UNUSED(wm), ARegion *region)
 +{
 +      if (ELEM(region->alignment, RGN_ALIGN_RIGHT)) {
 +              region->flag |= RGN_FLAG_DYNAMIC_SIZE;
 +      }
 +      ED_region_header_init(region);
 +}
 +
 +static void statusbar_operatortypes(void)
 +{
 +
 +}
 +
 +static void statusbar_keymap(struct wmKeyConfig *UNUSED(keyconf))
 +{
 +
 +}
 +
 +static void statusbar_header_region_listener(
 +        bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar,
 +        wmNotifier *wmn, const Scene *UNUSED(scene))
 +{
 +      /* context changes */
 +      switch (wmn->category) {
 +              case NC_SCREEN:
++                      if (ELEM(wmn->data, ND_LAYER, ND_ANIMPLAY)) {
 +                              ED_region_tag_redraw(ar);
 +                      }
 +                      break;
 +              case NC_WM:
 +                      if (wmn->data == ND_JOB)
 +                              ED_region_tag_redraw(ar);
 +                      break;
 +              case NC_SCENE:
 +                      if (wmn->data == ND_RENDER_RESULT)
 +                              ED_region_tag_redraw(ar);
 +                      break;
 +              case NC_SPACE:
 +                      if (wmn->data == ND_SPACE_INFO)
 +                              ED_region_tag_redraw(ar);
 +                      break;
 +              case NC_ID:
 +                      if (wmn->action == NA_RENAME)
 +                              ED_region_tag_redraw(ar);
 +                      break;
 +      }
 +}
 +
 +static void statusbar_header_region_message_subscribe(
 +        const bContext *UNUSED(C),
 +        WorkSpace *UNUSED(workspace), Scene *UNUSED(scene),
 +        bScreen *UNUSED(screen), ScrArea *UNUSED(sa), ARegion *ar,
 +        struct wmMsgBus *mbus)
 +{
 +      wmMsgSubscribeValue msg_sub_value_region_tag_redraw = {
 +              .owner = ar,
 +              .user_data = ar,
 +              .notify = ED_region_do_msg_notify_tag_redraw,
 +      };
 +
 +      WM_msg_subscribe_rna_anon_prop(mbus, Window, view_layer, &msg_sub_value_region_tag_redraw);
 +      WM_msg_subscribe_rna_anon_prop(mbus, ViewLayer, name, &msg_sub_value_region_tag_redraw);
 +}
 +
 +/* only called once, from space/spacetypes.c */
 +void ED_spacetype_statusbar(void)
 +{
 +      SpaceType *st = MEM_callocN(sizeof(*st), "spacetype statusbar");
 +      ARegionType *art;
 +
 +      st->spaceid = SPACE_STATUSBAR;
 +      strncpy(st->name, "Status Bar", BKE_ST_MAXNAME);
 +
 +      st->new = statusbar_new;
 +      st->free = statusbar_free;
 +      st->init = statusbar_init;
 +      st->duplicate = statusbar_duplicate;
 +      st->operatortypes = statusbar_operatortypes;
 +      st->keymap = statusbar_keymap;
 +
 +      /* regions: header window */
 +      art = MEM_callocN(sizeof(*art), "spacetype statusbar header region");
 +      art->regionid = RGN_TYPE_HEADER;
 +      art->prefsizey = 0.8f * HEADERY;
 +      art->prefsizex = UI_UNIT_X * 5; /* Mainly to avoid glitches */
 +      art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_HEADER;
 +      art->init = statusbar_header_region_init;
 +      art->layout = ED_region_header_layout;
 +      art->draw = ED_region_header_draw;
 +      art->listener = statusbar_header_region_listener;
 +      art->message_subscribe = statusbar_header_region_message_subscribe;
 +      BLI_addhead(&st->regiontypes, art);
 +
 +      BKE_spacetype_register(st);
 +}
index 3ba9e4fb3db12b1e7a059de56403e8ecb1d0cf0a,2d52c1a67defe6d3d7bea44bdc2451ebd354e642..18ec9f37f86730426e49c56d2ffdbc6c912a1c96
@@@ -584,8 -527,7 +584,7 @@@ typedef struct UserDef 
        int view_frame_keyframes; /* number of keyframes to zoom around current frame */
        float view_frame_seconds; /* seconds to zoom around current frame */
  
-       short scrcastfps;               /* frame rate for screencast to be played back */
-       short scrcastwait;              /* milliseconds between screencast snapshots */
 -      char _pad0[4];
++      char _pad1[4];
  
        short widget_unit;              /* private, defaults to 20 for 72 DPI setting */
        short anisotropic_filter;
Simple merge
index 929617aab04bbd88ab98e9d9d0ac963e6521e559,80f1e8e1ee1ddbc0b6417b6674d3d1b7ec269ba4..339271e354ea19117e3a10271ed35fe2a1c6a323
@@@ -269,10 -258,9 +269,9 @@@ typedef struct wmNotifier 
  #define ND_JOB                                (5<<16)
  #define ND_UNDO                               (6<<16)
  
 -      /* NC_SCREEN screen */
 -#define ND_SCREENBROWSE               (1<<16)
 -#define ND_SCREENDELETE               (2<<16)
 +      /* NC_SCREEN */
 +#define ND_LAYOUTBROWSE               (1<<16)
 +#define ND_LAYOUTDELETE               (2<<16)
- #define ND_SCREENCAST         (3<<16)
  #define ND_ANIMPLAY                   (4<<16)
  #define ND_GPENCIL                    (5<<16)
  #define ND_EDITOR_CHANGED     (6<<16) /*sent to new editors after switching to them*/