Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ActRec/actrec/functions/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
# relative imports
from ..log import logger
from .. import shared_data
from ... import __package__ as base_package
if TYPE_CHECKING:
from ..preferences import AR_preferences
from ..properties.shared import AR_action
Expand All @@ -32,7 +33,6 @@
Font_analysis = object
# endregion

__module__ = __package__.split(".")[0]

# region functions

Expand Down Expand Up @@ -411,7 +411,7 @@ def run_queued_macros(context_copy: dict, action_type: str, action_id: str, star
else:
temp_override = context.temp_override(**context_copy)
with temp_override:
ActRec_pref = context.preferences.addons[__module__].preferences
ActRec_pref = get_preferences(context)
action = getattr(ActRec_pref, action_type)[action_id]
play(context, action.macros, action, action_type, start)

Expand Down Expand Up @@ -904,6 +904,6 @@ def get_preferences(context: Context) -> AR_preferences:
Returns:
AR_preferences: preferences of this addon
"""
return context.preferences.addons[__module__].preferences
return context.preferences.addons[base_package].preferences

# endregion
3 changes: 2 additions & 1 deletion ActRec/actrec/preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# relative imports
from . import properties, functions, config, update, keymap, log, shared_data
from .log import logger, log_sys
from .. import __package__ as base_package

if TYPE_CHECKING:
def get_preferences(): return
Expand All @@ -24,7 +25,7 @@ def get_preferences(): return


class AR_preferences(AddonPreferences):
bl_idname = __package__.split(".")[0]
bl_idname = base_package

def update_is_loaded(self, context: Context) -> None:
context.scene.name = context.scene.name
Expand Down
4 changes: 2 additions & 2 deletions ActRec/actrec/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
from . import config
from .log import logger
from .functions.shared import get_preferences
from .. import __package__ as base_package
if TYPE_CHECKING:
from .preferences import AR_preferences
else:
AR_preferences = AddonPreferences
# endregion


__module__ = __package__.split(".")[0]


class Update_manager:
Expand Down Expand Up @@ -57,7 +57,7 @@ def on_start(dummy: Scene = None) -> None:
ActRec_pref = get_preferences(bpy.context)
if not (ActRec_pref.auto_update and Update_manager.version_file_thread is None):
return
t = threading.Thread(target=no_stream_download_version_file, args=[__module__], daemon=True)
t = threading.Thread(target=no_stream_download_version_file, args=[base_package], daemon=True)
t.start()
Update_manager.version_file_thread = t

Expand Down
10 changes: 10 additions & 0 deletions ActRec/blender_manifest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
schema_version = "1.0.0"
id = "actionrecorder"
name = "ActionRecorder"
version = "4.1.2"
tagline = "Record and replay Blender actions"
maintainer = "RivinHD"
type = "add-on"
blender_version_min = "4.2.0"
license = ["SPDX:GPL-3.0-or-later"]
website = "https://github.com/InamuraJIN/ActionRecorder"