pymel.core.effects

Functions related to fx

Functions

addDynamic Makes the objectspecified as second argument the source of an existing field or emitter specified as the first argument.
addPP Adds per-point (per-cv, per-vertex, or per-particle) attribute capability for an attribute of an emitter or field.
air The air field simulates the effects of moving air.
arrayMapper Create an arrayMapper node and connect it to a target object. If the -type flag is used, then this command also creates an external node used for computing the output values. If the input attribute does not already exist, it will be created. The output attribute must exists. If a flag is omitted, the selection list will be used to supply the needed objects. If none are found, that action is omitted.
collision The collision command causes particles to collide with geometry.
colorAtPoint The colorAtPointcommand is used to query textures or ocean shaders at passed in uv coordinates. (For ocean shaders uv is x and z in worldspace ). The return value is a floating point array whose size is determined by either the number of input uv arguments passed in and the the queried value. One can query alpha only, rgb only, or rgba values. The returned array is only single indexed, so if rgb is specified then the index for red values would be index * 3. Blue is index * 3 + 1, and green is index * 3 + 2. For rgba use a multiple of 4 instead of 3. For alpha only one can simply use the index. There are two basic argument formats that may be used: colorAtPoint -u 0 -v 0 -u .2 -v .1 etc.. for all points or colorAtPoint -mu 0 -mv 0 -xu 1 -xv 1 -su 10 -sv 10 // samples 100 points If one is sampling several points and they are all in a regular grid formation it is more efficient to call this routine with the latter method, which uses a min/max uv and number of samples, rather than a long argument list of uv coords. return values (-o A or RGB or RGBA )individual UV coordinates to sample (-u float -v float )(numbers of calls to -u and -v must match)uniform grid of points to sample (-su int -sv int)(may not use this in combination with -u or -v)bounds for sample grid (-mu float -mv float -xu float -xv float)
connectDynamic Dynamic connection specifies that the force fields, emitters, or collisions of an object affect another dynamic object.
constrain This command constrains rigid bodies to the world or other rigid bodies.
drag Drag exerts a friction, or braking force proportional to the speed of a moving object.
dynCache Cache the current state of all particle shapes at the current time.
dynControl Flags:
dynExport Export particle data to disk files.
dynExpression This command describes an expression that belongs to the specified particle shape.
dynGlobals This node edits and queries the attributes of the active dynGlobals node in the scene. There can be only one active node of this type. The active dynGlobals node is the first one that was created, either with a createNodecommand or by accessing/editing any of the attributes on the node through this command.
dynPaintEditor Create a editor window that can be painted into
dynPref This action modifies and queries the current state of autoCreate rigid bodies, run up to current time, and run up from(previous time or start time). In query mode, return type is based on queried flag.
dynRelEdPanel This command creates a Dynamics Relationship Editor panel. A relationship editor panel has a dynamics relationship editor (see the command dynRelEditor). It displays the Dynamics relationships of the selected objects. As the active list changes, the information displayed in the Relationship Editor changes.
dynRelEditor This command created a Dynamics Relationship Editor editor. The editor displays the connections of selected objects. As the active list changes, the information displayed in the editor changes. You can add relationships by drag-and-dropping the object to be connect to from a UI like the outliner onto the editor. You can remove relationships by selecting the connect objects in the editor and pressing REMOVE. You can show the relationships in the modeling window by pressing SHOW. The influences linked to the last object put into the editor are shown in yellow.
emit The emitaction allows users to add particles to an existing particle object without the use of an emitter.
emitter Creates an emitter object.
event The event command assigns collision events to a particle object.
expression This command describes an expression that belongs to the current scene.
expressionEditorListen Listens for messages for the Expression Editor, at its request, and communicates them to it. This action is for internal use only and should not be called by users. This action should be called only by the Expression Editor.
fluidCacheInfo A command to get information about the fluids cache.
fluidEmitter Creates an emitter object.
fluidVoxelInfo Provides basic information about the mapping of a fluid voxel grid into world- or object space of the fluid.
getDefaultBrush The command returns the name of the default Paint Effects brush.
getFluidAttr Returns values of built-in fluid attributes such as density, velocity, etc., for individual grid cells or for all cells in the grid.
getParticleAttr This action will return either an array of values, or the average value and maximum offset, for a specied per-particle attribute of a particle object or component.
goal Specifies the given objects as being goals for the given particle object.
gravity A gravity field simulates the Earth’s gravitational force. It pulls objects in a fixed direction (generally downward) entirely independent of their position or mass. The transform is the associated dependency node. Use connectDynamic to cause the field to affect a dynamic object. If fields are created, this command returns the names of each of the fields. If a field was queried, the results of the query are returned. If a field was edited, the field name is returned. If object names are provided or the active selection list is non-empty, the command creates a field for every object in the list and calls addDynamic to add it to the object. If the list is empty, the command defaults to -pos 0 0 0. Setting the -pos flag with objects named on the command line is an error. The default for -dx -dy -dz is always the opposite of the current up direction. For example, if the current up direction is (0,1,0) (a standard Maya configuration), then the gravity default is -dx 0 -dy -1 -dz 0. The default for -a is 9.8. 9.8 meters per second squared happens to be standard Earth gravity, but in fact Maya interprets this value as centimeters per second squared. If we were to use it as meters per second squared then with default Maya units, your particles would vanish almost in the wink of an eye. If you want a different value, set it in the gravity option box.
loadFluid A command to set builtin fluid attributes such as Density, Velocity, etc for individual grid cells or for all cells in the grid. (Note that setting force is an alternate way of setting velocity at one time step - it does not load and reapply the force each timestep. FIX: need a world space option as well? In query mode, return type is based on queried flag.
nBase Edits one or more nBase objects. Note that nBase objects include nCloth, nRigid and nParticle objects, but the options on this command do not currently apply to nParticle objects.
nParticle The nParticle command creates a new nParticle object from a list of world space points. If an nParticle object is created, the command returns the names of the new particle shape and its associated particle object dependency node. If an object was queried, the results of the query are returned. Per particle attributes can be queried using the particleId or the order of the particle in the particle array. If an object was edited, nothing is returned.
newton A Newton field pulls an object towards the exerting object with force dependent on the exerting object’s mass, using Newton’s universal law of gravitation. The transform is the associated dependency node. Use connectDynamic to cause the field to affect a dynamic object. If fields are created, this command returns the names of each of the fields. If a field was queried, the results of the query are returned. If a field was edited, the field name is returned. If object names are provided or the active selection list is non-empty, the command creates a field for every object in the list and calls addDynamic to add it to the object. If the list is empty, the command defaults to -pos 0 0 0. Setting the -pos flag with objects named on the command line is an error.
paintEffectsDisplay Command to set the global display methods for paint effects items In query mode, return type is based on queried flag.
particle The particle command creates a new particle object from a list of world space points.
particleExists This command is used to query if a particle or soft object with the given name exists.
particleFill This command generates an nParticle system that fills the selected object with a grid of particles.
particleInstancer This command is used to create a particle instancer node and set the proper attributes in the particle shape and in the instancer node.
particleRenderInfo This action provides information access to the particle render subclasses.
pfxstrokes This command will loop through all the Paint Effects strokes, including pfxHair nodes, and write the current state of all the tubes to a file. For normal stroke nodes tubes must be ON in the brush or there will be no output. For pfxHair nodes there will always be output, but the format is different than for stroke nodes(however one can assign a brush with tubes = ON to a pfxHair node, in which case it will output the same format as strokes). The general file format is ASCII, using commas to separate numerical values and newlines between blocks of data. The format used for pfxHair nodes presents the hair curves points in order from root to tip of the hair. The hairs follow sequentially in the following fashion: NumCvs pointX,pointY,pointZ, normalX,normalY,normalZ, width, colorR,colorG,colorB, paramU pointX,pointY,pointZ, normalX,normalY,normalZ, width, colorR,colorG,colorB, paramU etc... NumCvs pointX,pointY,pointZ, normalX,normalY,normalZ, width, colorR,colorG,colorB, paramU etc.. The format used to output files for brushes with tubes=ON is more complex. The tubes can branch and the order the segments are written is the same order they are drawn in. Slowly drawing a tall grass brush in the paint effects panel can help to illustrate the order the segments will appear in the file. New tubes can start growingbefore others are finished. There is no line for NumCvs. Instead all data for each segment appears on each line. The data on each line is the same as passed into the paint effects runtime function. See the argument list of paintRuntimeFunc.mel for the order and a description of these parameters. The parameters match up exactly in the order they appear on a line of the output file with the order of arguments to this function. If one wishes to parse the output file and connect the segments together into curves the branchId, parentId and siblingCnt parameters can help when sorting which segment connects to which line. Using the -postCallback option will write out the tubes data after it has been proessed by the runTime callback.
radial A radial field pushes objects directly towards or directly away from it, like a magnet.
resampleFluid A command to extend the fluid grid, keeping the voxels the same size, and keeping the existing contents of the fluid in the same place.
rigidBody This command creates a rigid body from a polygonal or nurbs surface.
rigidSolver This command sets the attributes for the rigid solver In query mode, return type is based on queried flag.
runup runup plays the scene through a frame of frames, forcing dynamic objects to evaluate as it does so. If no max frame is specified, runup runs up to the current time.
saveFluid A command to save the current state of the fluid to the initial state cache.
saveInitialState saveInitialState saves the current state of dynamics objects as the initial state. A dynamic object is a particle shape, rigid body, rigid constraint or rigid solver. If no objects are specified, it saves the initial state for any selected objects. It returns the names of the objects for which initial state was saved.
setDynamic setDynamic sets the isDynamic attribute of particle objects on or off. If no objects are specified, it sets the attribute for any selected objects. If -all is thrown, it sets the attribute for all particle objects in the scene. By default it sets the attribute true (on); if the -off flag is thrown, it sets the attribute false (off). WARNING: setDynamic is obsolescent. This is the last version of Maya in which it will be supported.
setFluidAttr Sets values of built-in fluid attributes such as density, velocity, etc., for individual grid cells or for all cells in the grid.
setParticleAttr This action will set the value of the chosen attribute for every particle or selected component in the selected or passed particle object.
soft Makes a soft body from the object(s) passed on the command line or in the selection list.
spring The spring command can do any of the following:* create a new spring object (shape plus transform).
stroke The stroke command creates a new Paint Effects stroke node.
truncateFluidCache This command sets the end time of a fluid cache to the current time.
truncateHairCache This command sets the end time of a hair cache to the current time.
turbulence A turbulence field causes irregularities (also called ‘noise’ or ‘jitter’) in the motion of affected objects.
uniform A uniform field pushes objects in a fixed direction.
volumeAxis A volume axis field can push particles in four directions, defined with respect to a volume: along the axis, away from the axis or center, around the axis, and in a user-specified direction.
vortex A vortex field pulls objects in a circular direction, like a whirlpool or tornado.

Table Of Contents

Previous topic

pymel.core.datatypes.metaReadOnlyAttr

Commands

Modules

This Page