Hi, I’m trying to apply material properties to active objects in a paraview session through python.
The premise is that if I execute the steps manually I can get the materials correctly in place. If I emulate the python trace through an external script I get the following error:
> Generic Warning: In vtkOSPRayMaterialHelpers.cxx, line 358
> Warning: unrecognized material “”, using a default obj
This is the script I’m using:
materialLibrary1 = GetMaterialLibrary()
materialLibrary1.LoadMaterials = '*path_to_material/library.json*'
renderView1.OSPRayMaterialLibrary = materialLibrary1
renderView1.EnableRayTracing = 1
renderView1.BackEnd = 'OSPRay pathtracer'
renderView1.SamplesPerPixel = 4
obj = GetActiveSource()
obj_display = GetDisplayProperties(obj,view=renderView1)
obj_display.OSPRayMaterial = 'Material_Name'
Did anyone face similar issues?