Material/Ebene-Separation: Hatch raus aus Material (Refactor a)
Material ist jetzt rein 3D — Section-Hatch (2D-Schnitt) wird nicht mehr
am Material definiert, sondern am Layer (via Rhino-Layer-Dialog oder
spaeter via Ebenen-Settings + neuer Hatch-Tab im Project-Settings).
Schema-Aenderungen:
- _normalize_material: hatch + scale entfernt
- _MATERIAL_LIBRARY (elemente.py): hatch + scale aus allen Builtin-Mats
- _get_all_materials: ohne hatch
- _send_state materials payload: nur {name, color}
- Library import_material: PBR + Texturen werden weitergegeben
Backend:
- _ensure_material_sublayer: erstellt Sublayer mit Color, RESETTET aber
alten SectionHatchIndex auf -1 (= "kein eigener Hatch") damit
Inheritance/User-Override greift. Vorher wurden alte Material-Hatch-
Werte da haengen geblieben.
Frontend:
- MaterialDetail: Schraffur-Section entfernt
- hatchPatterns-Prop entfernt
Konsequenz: existierende Waende verlieren ihren Section-Hatch beim
naechsten Regen. User definiert Section-Hatches jetzt auf Layer-Ebene.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+8
-6
@@ -82,28 +82,28 @@ def _write_seed_manifest(path):
|
||||
"type": "material", "version": 1,
|
||||
"name": "Beton — Sichtbeton",
|
||||
"tags": ["beton", "tragwerk", "roh"],
|
||||
"data": {"color": "#a8a39b", "hatch": "Solid", "scale": 1.0},
|
||||
"data": {"color": "#a8a39b"},
|
||||
},
|
||||
{
|
||||
"id": "mat-mauerwerk-backstein-v1",
|
||||
"type": "material", "version": 1,
|
||||
"name": "Mauerwerk — Backstein",
|
||||
"tags": ["mauerwerk", "stein"],
|
||||
"data": {"color": "#a45a3c", "hatch": "Solid", "scale": 1.0},
|
||||
"data": {"color": "#a45a3c"},
|
||||
},
|
||||
{
|
||||
"id": "mat-daemmung-mineralwolle-v1",
|
||||
"type": "material", "version": 1,
|
||||
"name": "Daemmung — Mineralwolle",
|
||||
"tags": ["daemmung", "weich"],
|
||||
"data": {"color": "#e8d36b", "hatch": "Solid", "scale": 1.0},
|
||||
"data": {"color": "#e8d36b"},
|
||||
},
|
||||
{
|
||||
"id": "mat-holz-fichte-v1",
|
||||
"type": "material", "version": 1,
|
||||
"name": "Holz — Fichte",
|
||||
"tags": ["holz", "ausbau"],
|
||||
"data": {"color": "#c8a06a", "hatch": "Solid", "scale": 1.0},
|
||||
"data": {"color": "#c8a06a"},
|
||||
},
|
||||
{
|
||||
"id": "sym-nordpfeil-01",
|
||||
@@ -192,11 +192,13 @@ def import_material(doc, item):
|
||||
new_mat = {
|
||||
"name": item.get("name") or "Unbenannt",
|
||||
"color": data.get("color", "#888888"),
|
||||
"hatch": data.get("hatch", "Solid"),
|
||||
"scale": float(data.get("scale", 1.0) or 1.0),
|
||||
"source": "library",
|
||||
"libraryId": item.get("id"),
|
||||
}
|
||||
# PBR + Textur-Felder, falls Library-Item welche hat
|
||||
for k in ("roughness", "reflection", "transparency", "iorN",
|
||||
"uvScaleM", "textures"):
|
||||
if k in data: new_mat[k] = data[k]
|
||||
# Lazy-Import um Zyklen zu vermeiden
|
||||
import rhinopanel
|
||||
settings = rhinopanel.load_project_settings(doc)
|
||||
|
||||
Reference in New Issue
Block a user