pFlame.setSampleDensity(prefs.getTinaRenderRealtimeQuality());
}
private Flame getCurrFlame() {
int frame = swfAnimatorFrameSlider.getValue();
Flame flame = currMovie.getFlame(frame);
if (flame != null) {
prepareFlame(flame);
boolean oldNoRefresh = noRefresh;
noRefresh = true;
try {
swfAnimatorFrameREd.setValue(frame);
}
finally {
noRefresh = oldNoRefresh;
}
int frameCount = swfAnimatorFramesREd.getIntValue();
double fps = swfAnimatorFramesPerSecondREd.getDoubleValue();
int motionBlurLength = swfAnimatorMotionBlurLengthREd.getIntValue();
double motionBlurTimeStep = swfAnimatorMotionBlurTimeStepREd.getDoubleValue();
List<GlobalScript> editedGlobalScripts = new ArrayList<GlobalScript>();
for (ScriptContainer container : globalScripts) {
editedGlobalScripts.add(getGlobalScriptFromUI(container.getScriptCmb(), container.getScriptREd()));
}
List<XFormScript> editedXFormScripts = new ArrayList<XFormScript>();
for (ScriptContainer container : xFormScripts) {
editedXFormScripts.add(getXFormScriptFromUI(container.getScriptCmb(), container.getScriptREd()));
}
try {
Flame res = flame.makeCopy();
for (GlobalScript script : editedGlobalScripts) {
AnimationService.addMotionCurve(res, script, frame, frameCount, fps);
}
for (XFormScript script : editedXFormScripts) {
AnimationService.addMotionCurve(res, script, frame, frameCount, fps);
}
res.setFrame(frame);
res.setMotionBlurLength(motionBlurLength);
res.setMotionBlurTimeStep(motionBlurTimeStep);
return res;
}
catch (Throwable ex) {
ex.printStackTrace();
return null;