Running into a Goo error:
"Warning: Custom Preview: input 2 material. error: Data conversion failed from Goo to Shader
assignedColors = [‘(105, 26, 64)’, ‘(158, 54, 104)’, ‘(246, 169, 206)’, ‘(253, 227, 240)’]
specular = [‘(254,254,254)’]
emission = [‘(0,0,0)’]
createdMaterial = gh.CreateMaterial(assignedColors, specular, emission, ‘0’, ‘10’)
renderReady = gh.CustomPreview(gobs,createdMaterial)
This is the object I’m getting when I print createdMaterial
[<Rhino.Display.DisplayMaterial object at 0x0000000000000084 [Rhino.Display.DisplayMaterial]>, <Rhino.Display.DisplayMaterial object at 0x0000000000000085 [Rhino.Display.DisplayMaterial]>, <Rhino.Display.DisplayMaterial object at 0x0000000000000086 [Rhino.Display.DisplayMaterial]>, <Rhino.Display.DisplayMaterial object at 0x0000000000000087 [Rhino.Display.DisplayMaterial]>]
I’m creating the assignedColors list programmatically in a script as well as the geometry that gets the material added to it. In Grasshopper, everything works fine, I can use the data from the Python script to Create Material and render a Custom Preview in Grasshopper and then be able to render in Rhino and get what I’m expecting. But looks like I’m not giving the customPreview component what it wants in the Python script.
What is the Shader data type shape supposed to look like?
Is there a better method for what I’m trying to achieve?
Thanks in advance.