I am experiancing a bug in Rhino 7 (latest version) when using attached models via Worksession Manager.
When I change the color of a material in the attached model, save the changes and then click on “Update” in the Worksession Manager of the attaching model, the change in color is not visible in Rhino itself (The rendering window shows the old color and in the Materials section, the material also has its old color.)
In addition: When using the .NET SDK to retrieve the material object of the geometry that has the changed material, it gives me a material object, that is not contained in the Rhino Document object.
var material = rhinoObject.GetMaterial(true);
material.Id is not a member of rhinoObject.Document.Materials.Select(m => m.Id).ToList()
I have provided a minimally reproducible case with “Orange Can.3dm” and “Gem Cube.3dm”. “Orange Can.3dm” is supposed to be attached to “Gem Cube.3dm”.
After attachment, calling rhinoObject.GetMaterial(true).Id via .NET SDK, (rhinoObject is the Can geometry from the attached model), I get “6b27027f-5a05-4e0e-b313-0cafd7865338”.
Then, I go the the second instance of Rhino that has Orange Can.3dm open and change the color of that material.
After clicking Update in Worksession Manager in Gem Cube.3dm, calling rhinoObject.GetMaterial(true).Id via .NET SDK returns “cf2be1de-b81c-4d69-9418-dde91d266086”. This Guid is not present in the Material Table of the containing document.
Orange Can.3dm (197.3 KB)
Gem Cube.3dm (41.1 KB)