chore: checkpoint web Blender migration source, tools and docs
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled

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:
mes123456
2026-11-10 11:18:01 +08:00
parent 122142c26c
commit f3e21c6b98
6887 changed files with 257154 additions and 12294 deletions

View File

@@ -0,0 +1,49 @@
"""Asynchronous access to the application's actual Blender WebEngine.
This is a WebEngine command interface, not the desktop bpy module.
"""
import json
import contextvars
from _web_blender_host import request as _request
_session_run = contextvars.ContextVar('web_blender_run', default=0)
async def _call(method, value):
response = await _request(_session_run.get(), method, json.dumps(value, allow_nan=False))
return json.loads(response)
async def snapshot():
"""Read the current authoritative scene snapshot."""
return await _call('snapshot', {})
async def context():
"""Read the active native workspace, screen, area and bound editor data."""
return await _call('context', {})
async def command(payload):
"""Apply one WebEngine command through the normal Main transaction path."""
if not isinstance(payload, dict):
raise TypeError('command requires a dictionary')
return await _call('command', payload)
async def operators():
"""List operators implemented by the compiled WebEngine."""
return await _call('operators', {})
async def operator(identifier, **properties):
"""Invoke a source-backed operator in the current WebEngine context."""
return await _call('operator', {'operator': identifier, 'properties': properties})
async def data_blocks(**query):
return await _call('data_blocks', query)
async def properties(**query):
return await _call('properties', query)