Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagepy
# 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 definedefined 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