Colours in exports from materials and appearances; Appearance command
- Bodies export (STEP, 3MF) in the colour they are shown in: an appearance,
else the physical material's look, else the colour the body was imported
with (Document::body_color / painted). Physical materials used to export
no colour at all.
- AppearanceCommand (Modify): a colour per body ("#rrggbb" or [r, g, b];
null follows the material again), kept in the design and across renames.
- Material looks move to solvecraft-doc (material_color); the viewport draws
appearance, material or imported colour, as exported.
- Engine test: brass and red ABS bodies export, re-import with their RGB, and
keep it through open and export again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AS5Tn3xieewUSg3uxrMVdL
This commit is contained in:
1 parent
578b35e88a
commit
ae4570ed39
8 files changed
+200
-86
No files matched your search
@@ -219,6 +219,9 @@ fn rename_body(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
if let Some(m) = d.materials.remove(&old) {
|
||||
d.materials.insert(name.to_string(), m);
|
||||
}
|
||||
if let Some(c) = d.appearances.remove(&old) {
|
||||
d.appearances.insert(name.to_string(), c);
|
||||
}
|
||||
if let Some(c) = d.body_components.remove(&old) {
|
||||
d.body_components.insert(name.to_string(), c);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user