Animation Options#

Animation commands are used to create and control object-based and image-based animations in the viewport.

Object features#

AnimationController#

class AnimationController[source]#

The AnimationController object controls all object-based animation to be displayed in the viewports. The AnimationController object has no constructor. Abaqus creates the animationController member when it creates the Session object.

Notes

This object can be accessed by:

import animation
session.viewports[name].animationController
Attributes:
animationType: SymbolicConstant

A SymbolicConstant specifying the type of movie to play. Possible values are SCALE_FACTOR, HARMONIC, TIME_HISTORY, and NONE. The default value is NONE.

state: SymbolicConstant

A SymbolicConstant specifying the state of the animation controller. Possible values are STOP and PLAY. The default value is STOP.

Methods

decrementFrame()

This method decrements the animation frame.

incrementFrame()

This method increments the animation frame.

play([duration])

This method begins the animation.

setValues([animationType])

This method modifies the AnimationController object.

showFirstFrame()

This method renders the first frame of the animation.

showFrame([frame, value])

This method renders the specified frame of the animation.

showLastFrame()

This method renders the last frame of the animation.

stop()

This method stops the animation.

decrementFrame()[source]#

This method decrements the animation frame.

incrementFrame()[source]#

This method increments the animation frame.

play(duration: SymbolicConstantType = 'UNLIMITED')[source]#

This method begins the animation.

Parameters:
duration

The SymbolicConstant UNLIMITED or an Int specifying how many seconds to play the animation. The default value is UNLIMITED.

Raises:
  • If *animationType*=NONE:

    AnimationError: animationType not set

setValues(animationType: SymbolicConstantType = 'NONE')[source]#

This method modifies the AnimationController object.

Parameters:
animationType

A SymbolicConstant specifying the type of movie to play. Possible values are SCALE_FACTOR, HARMONIC, TIME_HISTORY, and NONE. The default value is NONE.

Raises:
RangeError
showFirstFrame()[source]#

This method renders the first frame of the animation.

showFrame(frame: int | None = None, value: float | None = None)[source]#

This method renders the specified frame of the animation.

Parameters:
frame

An Int specifying the frame number.

value

A Float specifying the frame: for *animationType*=TIME_HISTORY the frame with the time nearest to this value, for *animationType*=HARMONIC the frame with the angle nearest to this value, for *animationType*=SCALE_FACTOR the frame with the scale value nearest to this value.

showLastFrame()[source]#

This method renders the last frame of the animation.

stop()[source]#

This method stops the animation.

AnimationOptions#

class AnimationOptions[source]#

The AnimationOptions object is used to store values and attributes associated with an AnimationController object. The AnimationOptions object has no constructor command. Abaqus creates the animationOptions member when it creates the AnimationController object.

Notes

This object can be accessed by:

import animation
session.animationOptions
Attributes:
mode: SymbolicConstant

A SymbolicConstant specifying the animation mode. Possible values are PLAY_ONCE, LOOP, LOOP_BACKWARD, and SWING. The default value is LOOP.

frameRate: int

An Int specifying the animation rate in frames/second. Possible values are 1 ≤≤ frameRate ≤≤ 100. The default value is 50.

frameCounter: Boolean

A Boolean specifying whether to show the frame counter. The default value is ON.

relativeScaling: SymbolicConstant

A SymbolicConstant specifying the relative scaling when the AnimationController object’s animationType=SCALE_FACTOR or HARMONIC. Possible values are FULL_CYCLE and HALF_CYCLE. The default value is HALF_CYCLE.

numScaleFactorFrames: int

An Int specifying the number of frames to be used when the AnimationController object’s animationType=SCALE_FACTOR or HARMONIC. The default value is 7.

timeHistoryMode: SymbolicConstant

A SymbolicConstant specifying whether the time history animation is time based or frame based. Possible values are FRAME_BASED and TIME_BASED. The default value is FRAME_BASED.

maxTime: float

A Float specifying the maximum time for time based time history animation when maxTimeAutoCompute = False.

maxTimeAutoCompute: Boolean

A Boolean specifying whether the animation maximum time value should be computed from the active frames when timeHistoryMode is set to TIME_BASED. The default value is ON.

maxTimeAutoValue: float

A Float specifying the maximum time when timeHistoryMode is set to TIME_BASED and the maxTimeAutoCompute value is True. This value is computed as the maximum time of all active frames displayed in viewports where the animation is active.

minTime: float

A Float specifying the minimum time for time based time history animation when minTimeAutoCompute = False.

minTimeAutoCompute: Boolean

A Boolean specifying whether the animation minimum time value should be computed from the active frames when timeHistoryMode is set to TIME_BASED. The default value is ON.

minTimeAutoValue: float

A Float specifying the minimum time when timeHistoryMode is set to TIME_BASED and the minTimeAutoCompute value is True. This value is computed as the minimum time of all active frames displayed in viewports where the animation is active.

timeIncrement: float

A Float specifying the time increment for frame selection when timeHistoryMode is set to TIME_BASED.

xyUseHighlightMethod: Boolean

A Boolean specifying whether to use the highlight method to draw the time tracker line and symbols. The default value is ON.

xyShowLine: Boolean

A Boolean specifying whether to show the time tracker line. The default value is ON.

xyLineStyle: SymbolicConstant

A SymbolicConstant specifying the X–Y time tracker line style. Possible values are SOLID, DASHED, DOTTED, and DOT_DASH. The default value is SOLID.

xyLineThickness: SymbolicConstant

A SymbolicConstant specifying the X–Y time tracker line thickness. Possible values are VERY_THIN, THIN, MEDIUM, and THICK. The default value is MEDIUM.

xyShowSymbol: Boolean

A Boolean specifying whether to show the time tracker symbols. The default value is ON.

xySymbolMarker: SymbolicConstant

A SymbolicConstant specifying the marker type to be used for all animation capable X–Y curve or the SymbolicConstant DEFAULT specifying that the system will take the marker associated to each curve Possible values are:

  • FILLED_CIRCLE

  • FILLED_SQUARE

  • FILLED_DIAMOND

  • FILLED_TRI

  • HOLLOW_CIRCLE

  • HOLLOW_SQUARE

  • HOLLOW_DIAMOND

  • HOLLOW_TRI

  • CROSS

  • XMARKER

  • DEFAULT

The default value is DEFAULT.

xySymbolSize: SymbolicConstant

A SymbolicConstant specifying the size of the markers. Possible values are SMALL, MEDIUM, and LARGE. The default value is MEDIUM.

xyLineColor: str

A String specifying the color used to plot the X–Y time tracker line when xyUseHighlightMethod = False. The default value is “Yellow”.

xySymbolColor: str

A String specifying the color used to plot X–Y time tracker symbols when xyUseHighlightMethod = False. When setting the color to ‘Default’ the system will take the color associated to each curve. The default value is “Default”.

Methods

setValues([mode, frameRate, frameCounter, ...])

This method modifies the AnimationOptions object.

setValues(mode: SymbolicConstantType = 'LOOP', frameRate: int = 50, frameCounter: BooleanType = 1, relativeScaling: SymbolicConstantType = 'HALF_CYCLE', numScaleFactorFrames: int = 7, timeHistoryMode: SymbolicConstantType = 'FRAME_BASED', maxTime: float | None = None, maxTimeAutoCompute: BooleanType = 1, minTime: float | None = None, minTimeAutoCompute: BooleanType = 1, timeIncrement: float | None = None, xyUseHighlightMethod: BooleanType = 1, xyShowLine: BooleanType = 1, xyLineStyle: SymbolicConstantType = 'SOLID', xyLineThickness: SymbolicConstantType = 'MEDIUM', xyLineColor: str = '', xyShowSymbol: BooleanType = 1, xySymbolMarker: SymbolicConstantType = 'DEFAULT', xySymbolSize: SymbolicConstantType = 'MEDIUM', xySymbolColor: str = '')[source]#

This method modifies the AnimationOptions object.

Parameters:
mode

A SymbolicConstant specifying the animation mode. Possible values are PLAY_ONCE, LOOP, LOOP_BACKWARD, and SWING. The default value is LOOP.

frameRate

An Int specifying the animation rate in frames/second. Possible values are 1 ≤≤ frameRate ≤≤ 100. The default value is 50.

frameCounter

A Boolean specifying whether to show the frame counter. The default value is ON.

relativeScaling

A SymbolicConstant specifying the relative scaling when the AnimationController object’s *animationType*=SCALE_FACTOR or HARMONIC. Possible values are FULL_CYCLE and HALF_CYCLE. The default value is HALF_CYCLE.

numScaleFactorFrames

An Int specifying the number of frames to be used when the AnimationController object’s *animationType*=SCALE_FACTOR or HARMONIC. The default value is 7.

timeHistoryMode

A SymbolicConstant specifying whether the time history animation is time based or frame based. Possible values are FRAME_BASED and TIME_BASED. The default value is FRAME_BASED.

maxTime

A Float specifying the maximum time for time based time history animation when maxTimeAutoCompute = False.

maxTimeAutoCompute

A Boolean specifying whether the animation maximum time value should be computed from the active frames when timeHistoryMode is set to TIME_BASED. The default value is ON.

minTime

A Float specifying the minimum time for time based time history animation when minTimeAutoCompute = False.

minTimeAutoCompute

A Boolean specifying whether the animation minimum time value should be computed from the active frames when timeHistoryMode is set to TIME_BASED. The default value is ON.

timeIncrement

A Float specifying the time increment for frame selection when timeHistoryMode is set to TIME_BASED.

xyUseHighlightMethod

A Boolean specifying whether to use the highlight method to draw the time tracker line and symbols. The default value is ON.

xyShowLine

A Boolean specifying whether to show the time tracker line. The default value is ON.

xyLineStyle

A SymbolicConstant specifying the X–Y time tracker line style. Possible values are SOLID, DASHED, DOTTED, and DOT_DASH. The default value is SOLID.

xyLineThickness

A SymbolicConstant specifying the X–Y time tracker line thickness. Possible values are VERY_THIN, THIN, MEDIUM, and THICK. The default value is MEDIUM.

xyLineColor

A String specifying the color used to plot the X–Y time tracker line when xyUseHighlightMethod = False. The default value is “Yellow”.

xyShowSymbol

A Boolean specifying whether to show the time tracker symbols. The default value is ON.

xySymbolMarker

A SymbolicConstant specifying the marker type to be used for all animation capable X–Y curve or the SymbolicConstant DEFAULT specifying that the system will take the marker associated to each curve Possible values are:

  • FILLED_CIRCLE

  • FILLED_SQUARE

  • FILLED_DIAMOND

  • FILLED_TRI

  • HOLLOW_CIRCLE

  • HOLLOW_SQUARE

  • HOLLOW_DIAMOND

  • HOLLOW_TRI

  • CROSS

  • XMARKER

  • DEFAULT

The default value is DEFAULT.

xySymbolSize

A SymbolicConstant specifying the size of the markers. Possible values are SMALL, MEDIUM, and LARGE. The default value is MEDIUM.

xySymbolColor

A String specifying the color used to plot X–Y time tracker symbols when xyUseHighlightMethod = False. When setting the color to ‘Default’ the system will take the color associated to each curve. The default value is “Default”.

AnimationSession#

class AnimationSession[source]#

The following commands operate on Session objects. For more information about the Session object, see Session object.

Notes

This object can be accessed by:

import animation

Methods

Movie(name, fileName[, startFrame, ...])

This method creates a Movie object from the contents of the specified file.

writeImageAnimation(fileName, format[, ...])

This method writes the animations present in the list of canvas objects to a file.

Movie(name: str, fileName: str, startFrame: int = 0, endFrame: int | None = None, timelineStartFrame: int = 0, timelineEndFrame: int | None = None, timelineStartTime: float = 0, timelineEndTime: SymbolicConstantType | float = 'END_FRAME_TIME') Movie[source]#

This method creates a Movie object from the contents of the specified file.

Parameters:
name

A String specifying the repository name for the movie.

fileName

A String specifying the file from which the movie is to be read. The file extension must be specified and indicates the movie format (.avi, .mov, .mpeg, or .wmv).

startFrame

An Int specifying the first frame to be displayed from this movie. The default value is 0.

endFrame

An Int specifying the last frame to be displayed from this movie. A negative number will indicate reverse numbering: -1 is the last frame of the movie. The default value is −1.

timelineStartFrame

An Int specifying the global timeline frame number that corresponds to startFrame. A value of 0 will indicate the first frame to be displayed in the viewport. The default value is 0.

timelineEndFrame

An Int specifying the global timeline frame number that corresponds to endFrame. A negative number will indicate reverse numbering: -1 indicates the last frame to be displayed in the viewport. The default value is −1.

timelineStartTime

A Float specifying the global timeline time that corresponds to the time of startFrame. The default value is 0.0.

timelineEndTime

The SymbolicConstant END_FRAME_TIME or a Float specifying the global timeline time that corresponds to the time of endFrame. The SymbolicConstant END_FRAME_TIME indicates the time in this movie corresponding to endFrame. The default value is END_FRAME_TIME.

Returns:
A Movie object.
Raises:
ValueError.
  • If fileName does not exist or can not be read:

    ValueError: Unable to open movie file

  • If fileName references an unsupported movie file format:

    ValueError: Unsupported movie format

  • If the contents of fileName are corrupt or can not be decoded:

    ValueError: Unable to decode movie file

Notes

This function can be accessed by:

session.Movie
writeImageAnimation(fileName: str, format: SymbolicConstantType, canvasObjects: tuple = ())[source]#

This method writes the animations present in the list of canvas objects to a file. It generates an animation file using the given file name and file format and uses the values in the appropriate options object.

Parameters:
fileName

A String specifying the name of the animation file to generate.

format

A SymbolicConstant specifying the format of the generated file. Possible values are AVI, QUICKTIME, VRML, and COMPRESSED_VRML.

canvasObjects

A sequence specifying the canvas objects to capture. The default behavior is to capture all canvas objects.

AVIOptions#

class AVIOptions[source]#

The AVIOptions object is used to store values and attributes to be used in generating AVI animation. The AVIOptions object has no constructor. Abaqus creates the aviOptions member when the animation module is imported.

Notes

This object can be accessed by:

import animation
session.aviOptions

Methods

setValues([compressionMethod, ...])

This method modifies the AVIOptions object.

setValues(compressionMethod: SymbolicConstantType = 'RLE8', compressionQuality: int | None = None, codecOptions: str = '', sizeDefinition: SymbolicConstantType = 'SIZE_ON_SCREEN', imageSize: int | None = None)[source]#

This method modifies the AVIOptions object.

Parameters:
compressionMethod

A SymbolicConstant specifying the compression method for the AVI format. Possible values are: - RAW8, specifying an uncompressed format of 8 bits per pixel. - RAW32, specifying an uncompressed format of 32 bits per pixel. - RLE8, specifying a run length encoded format of 8 bits per pixel. - CODEC, specifying a format defined by CODEC (encoder/decoder). The availability of the CODEC is system dependent The default value is RLE8.

compressionQuality

An Int specifying the quality of the compression as a percentage when the compressionMethod is set to CODEC.

codecOptions

A String specifying the system specific options defining the CODEC when the compressionMethod is set to CODEC.

sizeDefinition

A SymbolicConstant specifying how the width and height of the image are specified. Possible values are SIZE_ON_SCREEN and USER_DEFINED. The default value is SIZE_ON_SCREEN.

imageSize

A pair of Ints specifying the width and height of the image in pixels when sizeDefinition*=USER_DEFINED. Possible values are Ints in the range (*minWidth, minHeight) ≤≤ (width, height) ≤≤ (maxWidth, maxHeight). The default value is the screen size. Note:The values of the minimum width (minWidth) and height (minHeight) depend on the following:viewport font size,whether decorations are printed,decoration size, andscreen resolution.The minimum width and height are normally < 50 pixels. The values of the maximum width (maxWidth) and height (maxHeight) depend on the graphics capabilities of the system. The maximum width and height will be at least as large as the screen dimensions.

ImageAnimation#

class ImageAnimation(fileName: str, format: SymbolicConstantType)[source]#

The ImageAnimation object is used to build frame by frame animation.

Notes

This object can be accessed by:

import animation
session.imageAnimation
Attributes:
fileName: str

A String specifying the file to which the animation frames is to be written.

Methods

close()

This method closes the ImageAnimation object.

closed()

This method indicates if the ImageAnimation is open or closed for writing animation frames.

writeFrame([canvasObjects])

This method adds a frame to the ImageAnimation object.

close()[source]#

This method closes the ImageAnimation object.

closed()[source]#

This method indicates if the ImageAnimation is open or closed for writing animation frames.

writeFrame(canvasObjects: tuple = ())[source]#

This method adds a frame to the ImageAnimation object.

Parameters:
canvasObjects

A sequence specifying the canvas objects to capture. The default is to capture all canvas objects.

ImageAnimationOptions#

class ImageAnimationOptions[source]#

The ImageAnimationOptions object is used to store values and attributes associated with saving viewport animations. The ImageAnimationOptions object has no constructor. Abaqus creates the imageAnimationOptions member when the animation module is imported.

Notes

This object can be accessed by:

import animation
session.imageAnimationOptions

Methods

setValues([frameRate, timeScale, ...])

This method modifies the ImageAnimationOptions object.

setValues(frameRate: int | None = None, timeScale: int | None = None, vpDecorations: BooleanType = 1, vpBackground: BooleanType = 0, compass: BooleanType = 0)[source]#

This method modifies the ImageAnimationOptions object.

Parameters:
frameRate

An Int specifying the frame rate to record on the saved animation file. The effective frame rate in frames per second will be obtained by dividing the given frame rate by the time scale.

timeScale

An Int specifying the time scale to apply to the frame rate.

vpDecorations

A Boolean specifying whether to capture the viewport border and title. The default value is ON.

vpBackground

A Boolean specifying whether to capture viewport backgrounds. The default value is OFF.

compass

A Boolean specifying whether to capture the view compass. The default value is OFF.

Movie#

class Movie(name: str, fileName: str, startFrame: int = 0, endFrame: int | None = None, timelineStartFrame: int = 0, timelineEndFrame: int | None = None, timelineStartTime: float = 0, timelineEndTime: SymbolicConstantType | float = 'END_FRAME_TIME')[source]#

The Movie object is used to store values and attributes associated with a movie file. Upon creation, the Movie object is added to the session.movies repository.

Notes

This object can be accessed by:

import animation
session.movies[name]
Attributes:
width: int

An Int specifying the width of the movie in pixels.

height: int

An Int specifying the height of the movie in pixels.

numFrames: int

An Int specifying the total number of frames on the movie file.

duration: float

A Float specifying the duration of the movie in seconds.

memory: int

An Int specifying the memory taken by the movie frames as selected.

Methods

setValues([startFrame, endFrame, ...])

This method modifies the Movie object.

setValues(startFrame: int = 0, endFrame: int | None = None, timelineStartFrame: int = 0, timelineEndFrame: int | None = None, timelineStartTime: float = 0, timelineEndTime: SymbolicConstantType | float = 'END_FRAME_TIME')[source]#

This method modifies the Movie object.

Parameters:
startFrame

An Int specifying the first frame to be displayed from this movie. The default value is 0.

endFrame

An Int specifying the last frame to be displayed from this movie. A negative number will indicate reverse numbering: -1 is the last frame of the movie. The default value is −1.

timelineStartFrame

An Int specifying the global timeline frame number that corresponds to startFrame. A value of 0 will indicate the first frame to be displayed in the viewport. The default value is 0.

timelineEndFrame

An Int specifying the global timeline frame number that corresponds to endFrame. A negative number will indicate reverse numbering: -1 indicates the last frame to be displayed in the viewport. The default value is −1.

timelineStartTime

A Float specifying the global timeline time that corresponds to the time of startFrame. The default value is 0.0.

timelineEndTime

The SymbolicConstant END_FRAME_TIME or a Float specifying the global timeline time that corresponds to the time of endFrame. The SymbolicConstant END_FRAME_TIME indicates the time in this movie corresponding to endFrame. The default value is END_FRAME_TIME.

Raises:
RangeError
  • If

startFrame,*endFrame*,*timelineStartFrame*,*timelineEndFrame*,*timelineStartTime*, or*timelineEndTime* are outside their respective valid range.

RangeError: startFrame must be an Integer in the range: 0 to numFrames-1

QuickTimeOptions#

class QuickTimeOptions[source]#

The QuickTimeOptions object is used to store values and attributes to be used in generating QuickTime animation. The QuickTimeOptions object has no constructor. Abaqus creates the quickTimeOptions member when the animation module is imported.

Notes

This object can be accessed by:

import animation
session.quickTimeOptions

Methods

setValues([compressionMethod, ...])

This method modifies the QuickTimeOptions object.

setValues(compressionMethod: SymbolicConstantType = 'RLE24', sizeDefinition: SymbolicConstantType = 'SIZE_ON_SCREEN', imageSize: int | None = None)[source]#

This method modifies the QuickTimeOptions object.

Parameters:
compressionMethod

A SymbolicConstant specifying the compression method for the QuickTime format. Possible values are: - RAW24, specifying an uncompressed format of 24 bits per pixel. - RLE24, specifying a run length encoded format of 24 bits per pixel. The default value is RLE24.

sizeDefinition

A SymbolicConstant specifying how the width and height of the image are specified. Possible values are SIZE_ON_SCREEN and USER_DEFINED. The default value is SIZE_ON_SCREEN.

imageSize

A pair of Ints specifying the width and height of the image in pixels when sizeDefinition*=USER_DEFINED. Possible values are Ints in the range (*minWidth, minHeight) ≤≤ (width, height) ≤≤ (maxWidth, maxHeight). The default value is the screen size. Note:The values of the minimum width (minWidth) and height (minHeight) depend on the following:viewport font size,whether decorations are printed,decoration size, andscreen resolution.The minimum width and height are normally < 50 pixels. The values of the maximum width (maxWidth) and height (maxHeight) depend on the graphics capabilities of the system. The maximum width and height will be at least as large as the screen dimensions.