Procedural

class guerilla.Procedural

Bases: guerilla.Primitive

A scriptable procedural 3d renderable object.

A Procedural contains a lua script describing how to subdivide the primitive at render time.

bake()

Bake the procedural and pass it in “Read” mode. This methods is only for the HairAndFur procedural.

static bakeall()

Bake the procedurals which are marked as Bake

baketoarchive(file)

Write the procedural geometry to the given file (only ghostdata and obj files are supported at the moment)

The result of the baking process creates a group containing primitives with the baked shapes.

Parameters:file (str) – The file path to write
createref(parent, name, filename)

Create a ProceduralRef to a gprocedural file

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

The created reference

Return type:

ref

static forceallbaked()

Force all the procedurals as Bake, then bake tham all, and force them all as Read back.

This function is an alias for Procedural.forcebake with the full list of all bakeable procedurals.

static forcebake(procedurals=None)

Force procedurals to bake their implantation and switch them to Read –

procedurals is a list of path strings or procedural nodes to force baking. When

no list is provided (nil/None) then all procedurals which are not already set to Read are forced.

param procedurals:
 The optional list of procedurals to bake

– :type procedurals: {Procedural or string}

getimplantationmode()

Check if the procedural can its implantationmode forced to baked

hasimplantationmode()

Check if the procedural has an implantation mode

overrideinheritedattr(plugname, value)

Override the attribute

Parameters:
  • plugname (str) – The attribute plug name
  • value (any) – The attribute value
setimplantationmodebake(mode)

Force the implantationmode to baking

Parameters:mode (str) – The implantationmode to set
setinheritedattr(plugname, inherited, value=None)

Set the inheritance status of the attribute

Parameters:
  • plugname (str) – The attribute plug name
  • inherited ([bool or nil]) – True or nil if the attribute is to be inherited, false otherwise
  • value (any) – The attribute value if not inherited, or nil to set to default
setprocparam(name, value)

Set a procedural parameter value, create the plug if does not exist

Parameters:
  • name (str) – The parameter name (must begin with ‘procparam’)
  • value (any) – The value of the parameter, nil or None to reset the parameter to the default state