pymel.core.system.clearCache

clearCache(*args, **kwargs)

Even though dependency graph values are computed or dirty they may still occupy space temporarily within the nodes. This command goes in to all of the data that can be regenerated if required and removes it from the caches (datablocks), thus clearing up space in memory.

Flags:
Long name (short name) Argument Types Properties
allNodes (all) bool ../../../_images/create.gif
 
If toggled then all nodes in the graph are cleared. Otherwise only those nodes that are selected are cleared.
computed (c) bool ../../../_images/create.gif
 
If toggled then remove all data that is computable. (Warning: If the data is requested for redraw then the recompute will immediately fill the data back in.)
dirty (d) bool ../../../_images/create.gif
 
If toggled then remove all heavy data that is dirty.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.clearCache

Example:

import pymel.core as pm

# Clear one node's datablock cache
pm.clearCache( 'node' )
# Clear caches in all dependency graph nodes
pm.clearCache( all=True )
# Result: 0 #

Previous topic

pymel.core.system.cacheFileTrack

Next topic

pymel.core.system.cmdFileOutput

Core

Core Modules

Other Modules

This Page