algorithmic modeling for Rhino
Hi
Does anyone have a script to add a default rhino materials to a document. (If the script also specifies the ambient colour even better!)
I just want to add them so they are visible in the material table and not applied to an object.
I'll add them to objects later on through gh. I just want to set up the rhino document first.
Thankyou.
Tags:
Hi John,
a developer of Materials told me:
In RhinoCommon, you can do:
RhinoDoc.ActiveDoc.RenderMaterials.Add()
And you can create a material using
RenderMaterial.CreateBasicMaterial()
In rhinoscript there are a few meethods for Materials. You can change the target of the rhinoscriptsyntax functions with
import Rhino
import scriptcontext as sc
sc.doc = Rhino.RhinoDoc.ActiveDoc
after this, you can run normal rhinoscriptsyntax functions in GhPython, too.
Thanks
Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by