Extensions: remove unused operators
Remove: - EXTENSIONS_OT_dummy_progress it was mainly useful for development. - EXTENSIONS_OT_package_enable_not_installed as it's no longer used.
This commit is contained in:
@@ -1539,30 +1539,6 @@ class _ExtCmdMixIn:
|
||||
del self._runtime_handle
|
||||
|
||||
|
||||
class EXTENSIONS_OT_dummy_progress(Operator, _ExtCmdMixIn):
|
||||
bl_idname = "extensions.dummy_progress"
|
||||
bl_label = "Ext Demo"
|
||||
__slots__ = _ExtCmdMixIn.cls_slots
|
||||
|
||||
def exec_command_iter(self, is_modal):
|
||||
from . import bl_extension_utils
|
||||
|
||||
return bl_extension_utils.CommandBatch(
|
||||
title="Dummy Progress",
|
||||
batch=[
|
||||
partial(
|
||||
bl_extension_utils.dummy_progress,
|
||||
use_idle=is_modal,
|
||||
python_args=bpy.app.python_args,
|
||||
),
|
||||
],
|
||||
batch_job_limit=1,
|
||||
)
|
||||
|
||||
def exec_command_finish(self, canceled):
|
||||
_preferences_ui_redraw()
|
||||
|
||||
|
||||
class EXTENSIONS_OT_repo_sync(Operator, _ExtCmdMixIn):
|
||||
bl_idname = "extensions.repo_sync"
|
||||
bl_label = "Ext Repo Sync"
|
||||
@@ -4026,22 +4002,6 @@ class EXTENSIONS_OT_userpref_allow_online_popup(Operator):
|
||||
col.label(text=line, translate=False)
|
||||
|
||||
|
||||
class EXTENSIONS_OT_package_enable_not_installed(Operator):
|
||||
"""Turn on this extension"""
|
||||
bl_idname = "extensions.package_enable_not_installed"
|
||||
bl_label = "Enable Extension"
|
||||
|
||||
@classmethod
|
||||
def poll(cls, _context):
|
||||
cls.poll_message_set("Extension needs to be installed before it can be enabled")
|
||||
return False
|
||||
|
||||
def execute(self, _context):
|
||||
# This operator only exists to be able to show disabled check-boxes for extensions
|
||||
# while giving users a reasonable explanation on why is that.
|
||||
return {'CANCELLED'}
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Register
|
||||
#
|
||||
@@ -4085,12 +4045,6 @@ classes = (
|
||||
EXTENSIONS_OT_userpref_show_online,
|
||||
EXTENSIONS_OT_userpref_allow_online,
|
||||
EXTENSIONS_OT_userpref_allow_online_popup,
|
||||
|
||||
# Dummy, just shows a message.
|
||||
EXTENSIONS_OT_package_enable_not_installed,
|
||||
|
||||
# Dummy commands (for testing).
|
||||
EXTENSIONS_OT_dummy_progress,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -21,8 +21,6 @@ __all__ = (
|
||||
|
||||
"pkg_make_obsolete_for_testing",
|
||||
|
||||
"dummy_progress",
|
||||
|
||||
# Public Stand-Alone Utilities.
|
||||
"pkg_theme_file_list",
|
||||
"pkg_manifest_params_compatible_or_error",
|
||||
@@ -707,26 +705,6 @@ def pkg_uninstall(
|
||||
yield [COMPLETE_ITEM]
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Public Demo Actions
|
||||
#
|
||||
|
||||
def dummy_progress(
|
||||
*,
|
||||
use_idle: bool,
|
||||
python_args: Sequence[str],
|
||||
) -> Generator[InfoItemSeq, bool, None]:
|
||||
"""
|
||||
Implementation:
|
||||
``bpy.ops.extensions.dummy_progress()``.
|
||||
"""
|
||||
yield from command_output_from_json_0([
|
||||
"dummy-progress",
|
||||
"--time-duration=1.0",
|
||||
], use_idle=use_idle, python_args=python_args)
|
||||
yield [COMPLETE_ITEM]
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Public (non-command-line-wrapping) functions
|
||||
#
|
||||
|
||||
@@ -5453,10 +5453,10 @@ def argparse_create_dummy_repo(subparsers: "argparse._SubParsersAction[argparse.
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Dummy Output
|
||||
|
||||
|
||||
def argparse_create_dummy_progress(subparsers: "argparse._SubParsersAction[argparse.ArgumentParser]") -> None:
|
||||
subparse = subparsers.add_parser(
|
||||
"dummy-progress",
|
||||
@@ -5506,6 +5506,9 @@ def argparse_create_dummy_progress(subparsers: "argparse._SubParsersAction[argpa
|
||||
)
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Top Level Argument Parser
|
||||
|
||||
def argparse_create(
|
||||
args_internal: bool = True,
|
||||
args_extra_subcommands_fn: ArgsSubparseFn | None = None,
|
||||
|
||||
@@ -135,8 +135,6 @@ def blender_test_run(temp_dir_local: str) -> None:
|
||||
remote_url=remote_url,
|
||||
)
|
||||
|
||||
bpy.ops.extensions.dummy_progress()
|
||||
|
||||
bpy.ops.extensions.repo_sync(
|
||||
repo_directory=temp_dir_local,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user