InstancingUtils

class InstancingUtils.InstancingUtils(root_node, out_file)
get_sources()
write_attrs()
InstancingUtils.cleanup_groups()
InstancingUtils.convert_instances_to_particles(asset_root, delete_instances=False)

Converts geometry instances into particles.

Creates a single particle system. This particle system will contain one particle per instanced object.

parents particle system under passed asset_root

@param: delete_instances - Set to True if you want to delete all instanced objects after conversion

InstancingUtils.process_instances(asset_root, delete_instances=True)

Creates a particle object for each object instanced under the given asset_root and stores the instancer information for each particle instancer into its particle shape node The pre-requisites for pre-built particle instances that the particles should have at least rotPP, scalePP and instIDPP, and these per-particle attributes names are a mandatory for this method

Parameters:
  • asset_root
  • delete_instances – Set True if you want to delete all instancers after storing sources
Returns:

True or list of instanced objects, otherwise returns []