chore: checkpoint web Blender migration source, tools and docs
Accumulated uncommitted work: GHOST Web backend, WebGL/GPU web layer, web workflow engine and protocol, tooling, docs and task records. Large generated evidence, user-testing archives, build snapshots and imported test assets remain untracked. Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -493,6 +493,11 @@ class ToolSelectPanelHelper:
|
||||
|
||||
@classmethod
|
||||
def _km_action_simple(cls, kc_default, kc, context_descr, label, keymap_fn):
|
||||
if (startup := bpy.utils._web_startup_state) is not None:
|
||||
# Includes dynamic ToolDefs first materialized during startup. Keep
|
||||
# their callable until the native keymap transaction is published.
|
||||
startup.track_tool_helper(cls)
|
||||
startup.track_tool_container(keymap_fn)
|
||||
km_idname = "{:s} {:s}, {:s}".format(cls.keymap_prefix, context_descr, label)
|
||||
km = kc.keymaps.get(km_idname)
|
||||
km_kwargs = dict(space_type=cls.bl_space_type, region_type='WINDOW', tool=True)
|
||||
@@ -516,6 +521,8 @@ class ToolSelectPanelHelper:
|
||||
|
||||
@classmethod
|
||||
def register(cls):
|
||||
if (startup := bpy.utils._web_startup_state) is not None:
|
||||
startup.track_tool_helper(cls)
|
||||
wm = bpy.context.window_manager
|
||||
# Write into defaults, users may modify in preferences.
|
||||
kc_default = wm.keyconfigs.default
|
||||
@@ -1038,12 +1045,18 @@ def _activate_by_item(context, space_type, item, index, *, as_fallback=False):
|
||||
|
||||
idname_fallback = (item_fallback and item_fallback.idname) or ""
|
||||
keymap_fallback = (item_fallback and item_fallback.keymap and item_fallback.keymap[0]) or ""
|
||||
# `from_dict` stores a tuple key-map as `[builder_callable]` and only swaps in
|
||||
# the real key-map name once the tool's key-map is registered. A workspace
|
||||
# entered before that registration still holds the callable here, so only
|
||||
# extend a real name instead of raising on `callable + str`.
|
||||
if keymap_fallback and not isinstance(keymap_fallback, str):
|
||||
keymap_fallback = ""
|
||||
if keymap_fallback:
|
||||
keymap_fallback = keymap_fallback + " (fallback)"
|
||||
|
||||
tool.setup(
|
||||
idname=item.idname,
|
||||
keymap=item.keymap[0] if item.keymap is not None else "",
|
||||
keymap=item.keymap[0] if item.keymap is not None and isinstance(item.keymap[0], str) else "",
|
||||
cursor=item.cursor or 'DEFAULT',
|
||||
options=item.options or set(),
|
||||
gizmo_group=gizmo_group,
|
||||
|
||||
Reference in New Issue
Block a user