Quantcast
Channel: Rhino Developer - McNeel Forum
Viewing all articles
Browse latest Browse all 8519

Grasshopper Python Component Render Material Vray

$
0
0

Hi All,

in a Grasshopper Python Component I would like to get a list of all materials in the document to read their RGB values. My materials are Vray materials. There are no Rhino materials present in the file. I cannot use Rhino materials for this.

Rhino Version 6 SR26
Vray Version 3.60.03

I tried so far:

  1. scriptcontext.doc.Materials -> not supported in GH
  2. Rhino.RhinoDoc.ActiveDoc.Materials -> Holds the same number of materials as listed in the Vray Asset Editor UI. So I assume those are the Vray materials. But all Rhino.RhinoDoc.ActiveDoc.Materials[i].DiffuseColor values are unrelated to the actual values set up in the Vray materials.
  3. Rhino.RhinoDoc.ActiveDoc.RenderMaterials -> is empty
  4. I applied the Vray materials in Rhino to Brep objects. Loaded those objects into GH as Geometry and use them inside the GH Python Component to do rhinoscriptsyntax.ObjectMaterialIndex(guid) -> always gives me -1. This works in normal Rhino Python Scripts, but not in the GH Python component.

I know @clement did some work in this direction with Python Script. Did you ever get it to work in GH Python?

Any ideas are greatly appreciated. Thanks for your help.
Silvan

4 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 8519

Trending Articles