feat(web): studio worlds, camera-view/offscreen environment parity, material and undo coverage
Environment lighting: - ship all eight desktop studiolights/world datasets (WBENV1 float32) and a shared loader used by both the main viewport and the offscreen worker - add the N-panel "studio 环境" selector - rotate the world background together with the environment (backgroundRotation/backgroundIntensity), so camera view and offscreen renders match the desktop Mapping-node behaviour Verification (Chromium, OPFS, NOT_CLAIMED): - environment lighting + 8 world pixel identity - camera-view rotation correspondence (camera matrices, 207 samples) - offscreen vs on-screen background parity after hiding geometry (1305 samples) - metals case extended with material-field OPFS roundtrip - material Principled edits and rename undo/redo - eight studio worlds: pairwise frame differences + luminance rank correlation - undo history depth capped at 64 steps and undo across OPFS save/reopen Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -45,5 +45,5 @@ def dll_exists(lib_name, lib_display_name) -> bool:
|
||||
print(
|
||||
'ERROR',
|
||||
'{} is not available because library could not be found at %s'.format(lib_display_name) %
|
||||
path.absolute())
|
||||
(path.absolute() if path is not None else '(unsupported platform)'))
|
||||
return exists
|
||||
|
||||
@@ -2,7 +2,11 @@
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
from ctypes import *
|
||||
try:
|
||||
from ctypes import *
|
||||
_CTYPES_AVAILABLE = True
|
||||
except ImportError: # Web/WASM builds omit the _ctypes extension.
|
||||
_CTYPES_AVAILABLE = False
|
||||
|
||||
from ...io.exp.binary_data import BinaryData
|
||||
from ...io.com.library import dll_path
|
||||
@@ -14,6 +18,9 @@ def encode_scene_primitives(scenes, export_settings):
|
||||
Moves position, normal and texture coordinate attributes into a Draco encoded buffer.
|
||||
"""
|
||||
|
||||
if not _CTYPES_AVAILABLE:
|
||||
raise RuntimeError("Draco compression is unavailable in this build (no ctypes)")
|
||||
|
||||
# Load DLL and setup function signatures.
|
||||
dll = cdll.LoadLibrary(str(dll_path('bf_intern_draco_bridge', 'Draco').resolve()))
|
||||
|
||||
|
||||
@@ -2,7 +2,11 @@
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import ctypes
|
||||
try:
|
||||
import ctypes
|
||||
_CTYPES_AVAILABLE = True
|
||||
except ImportError: # Web/WASM builds omit the _ctypes extension.
|
||||
_CTYPES_AVAILABLE = False
|
||||
import numpy as np
|
||||
|
||||
from ...io.com.library import dll_path
|
||||
@@ -36,6 +40,8 @@ class MeshoptEncoder:
|
||||
@staticmethod
|
||||
def load_library(export_settings):
|
||||
"""Load the Meshopt encoder library."""
|
||||
if not _CTYPES_AVAILABLE:
|
||||
raise RuntimeError("Meshopt compression is unavailable in this build (no ctypes)")
|
||||
if 'meshopt_encoder' in export_settings.keys():
|
||||
return
|
||||
lib_path = MeshoptEncoder.find_library()
|
||||
|
||||
Reference in New Issue
Block a user