Material

class guerilla.Material

Bases: guerilla.Shader, guerilla.HostNode

A Material, contains a Surface Shader, a Displacement Shader and a Line Shader

createref(parent, name, filename)

Create a MaterialRef to a gmaterial file

Parameters:
  • parent (Node) – The parent to create the MaterialRef in
  • name (str) – The name of the MaterialRef
  • filename (str) – The path to the referenced Material
Returns:

The created reference

Return type:

ref

getprimitives()

Get the list of primitives or subprimitives connected to this material.

Example :

LUA{ – show all connected primitive and subprimitives local primitivesorsubs = MyMaterial:getprimitives () for primorsub, state in pairs (primitivesorsubs) do

print (MyMaterial:getpath () .. ” –> ” .. primorsub:getpath ())

end }

return:the connected primitives and subprimitives
rtype:table