Rename all log tags to match English module names
[EBENEN] → [LAYERS], [EBENEN-BE] → [LAYERS-BE] [ZEICHNUNGSEBENEN] → [DRAWING-LEVELS] [GESTALTUNG] → [STYLES] [OBERLEISTE] → [TOOLBAR] [WERKZEUGE] → [TOOLS] [DIMENSIONEN] → [DIMENSIONS] [AUSSCHNITTE] → [VIEWPORTS] [MASSSTAB] → [SCALE] [SCHNITT] → [SECTION], [SCHNITT_GRIPS] → [SECTION-GRIPS] [WAND_GRIPS] → [WALL-GRIPS], [TREPPE_GRIPS] → [STAIR-GRIPS] [CURVE_DOTS] → [CURVE-DOTS] [panel_base] → [CORE] [ALIAS-LOADER] → [ALIASES] [BEGIN-CMD] → [CMD-HOOK]
This commit is contained in:
+18
-18
@@ -582,7 +582,7 @@ def _try_load_png_white(png_path, size):
|
||||
g.Dispose()
|
||||
return target
|
||||
except Exception as ex:
|
||||
print("[panel_base] PNG-load failed:", ex)
|
||||
print("[CORE] PNG-load failed:", ex)
|
||||
return None
|
||||
|
||||
|
||||
@@ -628,7 +628,7 @@ def _try_load_svg_white(svg_path, size):
|
||||
g.Dispose()
|
||||
return target
|
||||
except Exception as ex:
|
||||
print("[panel_base] SVG-load failed:", ex)
|
||||
print("[CORE] SVG-load failed:", ex)
|
||||
return None
|
||||
|
||||
|
||||
@@ -717,7 +717,7 @@ def make_panel_icon(name_or_letter, bg_hex):
|
||||
if os.path.isfile(png_path):
|
||||
icon_bmp = _try_load_png_white(png_path, size - 8)
|
||||
if icon_bmp is not None: chosen_path = png_path
|
||||
else: print("[panel_base] PNG loaded but Bitmap is None:",
|
||||
else: print("[CORE] PNG loaded but Bitmap is None:",
|
||||
png_path)
|
||||
# PNG-not-found ist normal: Fallback auf SVG dann Material-Font.
|
||||
# Nur loggen wenn final ALLES failt (s.u.).
|
||||
@@ -734,12 +734,12 @@ def make_panel_icon(name_or_letter, bg_hex):
|
||||
size - 2*pad, size - 2*pad)
|
||||
used_svg = True
|
||||
used_material = True # → kein Letter-Fallback
|
||||
print("[panel_base] Icon path: {} ← {}".format(
|
||||
print("[CORE] Icon path: {} ← {}".format(
|
||||
name_or_letter, chosen_path))
|
||||
except Exception as ex:
|
||||
print("[panel_base] Icon composite error:", ex)
|
||||
print("[CORE] Icon composite error:", ex)
|
||||
except Exception as ex:
|
||||
print("[panel_base] Icon path check error:", ex)
|
||||
print("[CORE] Icon path check error:", ex)
|
||||
|
||||
# 1) Material-Icon-Font (wenn keine SVG present)
|
||||
mat_cp = _MATERIAL_CODEPOINTS.get(name_or_letter)
|
||||
@@ -759,7 +759,7 @@ def make_panel_icon(name_or_letter, bg_hex):
|
||||
drawing.Colors.White)
|
||||
used_material = True
|
||||
except Exception as ex:
|
||||
print("[panel_base] Material render error:", ex)
|
||||
print("[CORE] Material render error:", ex)
|
||||
used_material = False
|
||||
|
||||
# 2) Fallback: Buchstabe (erstes Zeichen bzw. eingegebener Buchstabe)
|
||||
@@ -787,7 +787,7 @@ def make_panel_icon(name_or_letter, bg_hex):
|
||||
tag, safe, bg_hex.lstrip("#")))
|
||||
bmp.Save(path, drawing.ImageFormat.Png)
|
||||
except Exception as ex:
|
||||
print("[panel_base] Icon save error:", ex)
|
||||
print("[CORE] Icon save error:", ex)
|
||||
path = None
|
||||
# WICHTIG: Mac Rhinos RegisterPanel meldet "expected Icon, got Icon"
|
||||
# wenn wir Eto.Drawing.Icon uebergeben — die API erwartet
|
||||
@@ -797,35 +797,35 @@ def make_panel_icon(name_or_letter, bg_hex):
|
||||
try:
|
||||
import System.Drawing as _sd
|
||||
ic = _sd.Icon(path)
|
||||
print("[panel_base] Icon created via System.Drawing.Icon(path) [{}]".format(tag))
|
||||
print("[CORE] Icon created via System.Drawing.Icon(path) [{}]".format(tag))
|
||||
return ic
|
||||
except Exception as ex:
|
||||
print("[panel_base] System.Drawing.Icon(path) failed:", ex)
|
||||
print("[CORE] System.Drawing.Icon(path) failed:", ex)
|
||||
# System.Drawing.Bitmap als Fallback (manche RegisterPanel-Overloads akzeptieren Bitmap)
|
||||
try:
|
||||
import System.Drawing as _sd
|
||||
bmp_sd = _sd.Bitmap(path)
|
||||
print("[panel_base] Icon created via System.Drawing.Bitmap(path) [{}]".format(tag))
|
||||
print("[CORE] Icon created via System.Drawing.Bitmap(path) [{}]".format(tag))
|
||||
return bmp_sd
|
||||
except Exception as ex:
|
||||
print("[panel_base] System.Drawing.Bitmap(path) failed:", ex)
|
||||
print("[CORE] System.Drawing.Bitmap(path) failed:", ex)
|
||||
# Eto.Drawing.Icon als letzter Versuch — falls Rhino-Version anders ist
|
||||
try:
|
||||
ic = drawing.Icon(path)
|
||||
print("[panel_base] Icon erzeugt via Eto.Drawing.Icon(path) [{}]".format(tag))
|
||||
print("[CORE] Icon erzeugt via Eto.Drawing.Icon(path) [{}]".format(tag))
|
||||
return ic
|
||||
except Exception as ex:
|
||||
print("[panel_base] Eto.Drawing.Icon(path) failed:", ex)
|
||||
print("[CORE] Eto.Drawing.Icon(path) failed:", ex)
|
||||
# Bitmap-Fallback (in-memory) — wenn alles vorherige fehlschlaegt
|
||||
try:
|
||||
ic = drawing.Icon(1.0, bmp)
|
||||
print("[panel_base] Icon erzeugt via Eto.Drawing.Icon(scale, bmp) [{}]".format(tag))
|
||||
print("[CORE] Icon erzeugt via Eto.Drawing.Icon(scale, bmp) [{}]".format(tag))
|
||||
return ic
|
||||
except Exception: pass
|
||||
print("[panel_base] Icon Fallback: Eto.Bitmap zurueck ({})".format(tag))
|
||||
print("[CORE] Icon Fallback: Eto.Bitmap zurueck ({})".format(tag))
|
||||
return bmp
|
||||
except Exception as ex:
|
||||
print("[panel_base] Icon-Erstellung failed:", ex)
|
||||
print("[CORE] Icon-Erstellung failed:", ex)
|
||||
return None
|
||||
|
||||
|
||||
@@ -839,7 +839,7 @@ def find_plugin():
|
||||
if p is not None:
|
||||
return p
|
||||
except Exception as ex:
|
||||
print("[panel_base] Plugin-Suche:", ex)
|
||||
print("[CORE] Plugin-Suche:", ex)
|
||||
return None
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user