pymel.core.effects.fluidCacheInfo

fluidCacheInfo(*args, **kwargs)

A command to get information about the fluids cache. Get the startFrame and resolution for InitialConditions. Get the endFrame as well for a playback cache. Note that for the playback cache, it will look at the current time (or last frame if the current time is past end of cache) In query mode, return type is based on queried flag.

Flags:
Long name (short name) Argument Types Properties
attribute (at) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

Modifier to the hasDataflag, used to query whether a cache has data (at the current time) for a specific fluid attribute. Valid attribute values are density, velocity, temperature, fuel, color, coordinates(for texture coordinates), falloff.

cacheTime (t) time ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

Only valid with the -hasData flag. The time the -hasData flag uses when it queries the cache to see if there is data. Flag can have multiple arguments, passed either as a tuple or a list.

endFrame (ef) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Returns end time of cache as float.
hasCache (hc) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Returns true if fluid has specified cache, false if not.
hasData (hd) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 

Queries whether a given cache has data in it at the time specified by the -time flag. (If not -time flag is present, -hasData assumes the current time.) When used with the attributeflag, indicates if data for the specified attribute exists in the cache. When used without the attributeflag, hasDataindicates whether there is data in the cache for any of the valid fluid attributes.

initialConditions (ic) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Specifies the cache to be queried is the Initial Conditionscache.
playback (pb) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Specifies the cache to be queried is the Playbackcache.
resolution (re) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Returns cache resolution as float[].
startFrame (sf) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Returns start time for cache as float.

Derived from mel command maya.cmds.fluidCacheInfo

Example:

import pymel.core as pm

# get start frame for Initial Conditions Cache
pm.fluidCacheInfo( ic=True, sf=True )
# get resolution for Initial Conditions Cache
pm.fluidCacheInfo( ic=True, re=True )
# get end frame for Playback Cache
pm.fluidCacheInfo( pb=True, ef=True )
# get resolution for Playback Cache
pm.fluidCacheInfo( pb=True, re=True )
# Is there data for any of the valid properties
# in the playback cache?
pm.fluidCacheInfo( pb=True, hd=True )
# Is there density data in the playback cache?
pm.fluidCacheInfo( at='density', pb=True, hd=True )

Previous topic

pymel.core.effects.expressionEditorListen

Next topic

pymel.core.effects.fluidEmitter

Core

Core Modules

Other Modules

This Page