Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Current »

Add this script to a "Batch Script" editor (F10) and execute it with Script > Run.

The script activates the "WetDry Map" feature and the appropriate export resource for objects inside a group named "Objects":

# Define the texture's parameters
textureResolution = 1024
filterLoops       = 1
filterStrength    = 0.1
pixelStrength     = 255
ageing            = 0.5

# Get the group "Objects" and its nodes
objectGroup = scene.getGroup("Objects")
groupNodes  = objectGroup.getNodes()
 
# Loop through the objects
for entry in groupNodes:
 
	# Check if the node is really an object.
	# If yes, activate the texture and apply the values define above
	if (entry.getType() == TYPE_OBJECT):
		entry.setParameter("WetDry texture", True)
		entry.setParameter("Resolution", textureResolution)
		entry.setParameter("Filter loops #", filterLoops)
		entry.setParameter("Filter strength", filterStrength)
		entry.setParameter("Pixel strength", pixelStrength)
		entry.setParameter("Ageing", ageing)
 
		entry.activeExportResource(4, True) #activate the wet-dry option with code 4
		entry.activeExportData(True) #activate the object's global export resource
  • No labels