Further flam3 exporting functions fixes and additions.
This commit is contained in:
parent
440f63f090
commit
5b7a3b1118
@ -124,7 +124,9 @@ type
|
|||||||
pulse: array[0..1, 0..1] of double; // [i][0]=magnitute [i][1]=frequency */
|
pulse: array[0..1, 0..1] of double; // [i][0]=magnitute [i][1]=frequency */
|
||||||
wiggle: array[0..1, 0..1] of double; // frequency is /minute, assuming 30 frames/s */
|
wiggle: array[0..1, 0..1] of double; // frequency is /minute, assuming 30 frames/s */
|
||||||
|
|
||||||
estimator, estimator_min, estimator_curve, jitters: double; // density estimator.
|
estimator, estimator_min, estimator_curve: double; // density estimator.
|
||||||
|
jitters: integer;
|
||||||
|
gamma_tresholds: double;
|
||||||
|
|
||||||
PropTable: array of TXForm;//Integer;
|
PropTable: array of TXForm;//Integer;
|
||||||
FAngle: Double;
|
FAngle: Double;
|
||||||
|
@ -267,35 +267,44 @@ object ExportDialog: TExportDialog
|
|||||||
end
|
end
|
||||||
object Label9: TLabel
|
object Label9: TLabel
|
||||||
Left = 8
|
Left = 8
|
||||||
Top = 88
|
Top = 80
|
||||||
Width = 43
|
Width = 49
|
||||||
Height = 13
|
Height = 25
|
||||||
Caption = 'Estimator'
|
Caption = 'Estimator radius'
|
||||||
|
WordWrap = True
|
||||||
end
|
end
|
||||||
object Label11: TLabel
|
object Label11: TLabel
|
||||||
Left = 8
|
Left = 8
|
||||||
Top = 112
|
Top = 112
|
||||||
Width = 49
|
Width = 46
|
||||||
Height = 25
|
Height = 26
|
||||||
Caption = 'Estimator min.'
|
Caption = 'Estimator min.'
|
||||||
WordWrap = True
|
WordWrap = True
|
||||||
end
|
end
|
||||||
object Label12: TLabel
|
object Label12: TLabel
|
||||||
Left = 160
|
Left = 160
|
||||||
Top = 80
|
Top = 80
|
||||||
Width = 57
|
Width = 46
|
||||||
Height = 25
|
Height = 26
|
||||||
Caption = 'Estimator curve'
|
Caption = 'Estimator curve'
|
||||||
WordWrap = True
|
WordWrap = True
|
||||||
end
|
end
|
||||||
object Label13: TLabel
|
object Label13: TLabel
|
||||||
Left = 160
|
Left = 160
|
||||||
Top = 112
|
Top = 112
|
||||||
Width = 57
|
Width = 47
|
||||||
Height = 25
|
Height = 26
|
||||||
Caption = 'Temporal samples'
|
Caption = 'Temporal samples'
|
||||||
WordWrap = True
|
WordWrap = True
|
||||||
end
|
end
|
||||||
|
object Label14: TLabel
|
||||||
|
Left = 160
|
||||||
|
Top = 48
|
||||||
|
Width = 57
|
||||||
|
Height = 26
|
||||||
|
Caption = 'Gamma tresholds'
|
||||||
|
WordWrap = True
|
||||||
|
end
|
||||||
object txtBatches: TEdit
|
object txtBatches: TEdit
|
||||||
Left = 64
|
Left = 64
|
||||||
Top = 20
|
Top = 20
|
||||||
@ -330,22 +339,12 @@ object ExportDialog: TExportDialog
|
|||||||
'32 bits'
|
'32 bits'
|
||||||
'64 bits')
|
'64 bits')
|
||||||
end
|
end
|
||||||
object chkRender: TCheckBox
|
|
||||||
Left = 224
|
|
||||||
Top = 54
|
|
||||||
Width = 65
|
|
||||||
Height = 17
|
|
||||||
Caption = 'Render'
|
|
||||||
Checked = True
|
|
||||||
State = cbChecked
|
|
||||||
TabOrder = 3
|
|
||||||
end
|
|
||||||
object txtStrips: TEdit
|
object txtStrips: TEdit
|
||||||
Left = 64
|
Left = 64
|
||||||
Top = 52
|
Top = 52
|
||||||
Width = 57
|
Width = 57
|
||||||
Height = 21
|
Height = 21
|
||||||
TabOrder = 4
|
TabOrder = 3
|
||||||
Text = '1'
|
Text = '1'
|
||||||
OnChange = txtBatchesChange
|
OnChange = txtBatchesChange
|
||||||
end
|
end
|
||||||
@ -358,14 +357,14 @@ object ExportDialog: TExportDialog
|
|||||||
Min = 1
|
Min = 1
|
||||||
Max = 512
|
Max = 512
|
||||||
Position = 1
|
Position = 1
|
||||||
TabOrder = 5
|
TabOrder = 4
|
||||||
end
|
end
|
||||||
object txtJitters: TEdit
|
object txtJitters: TEdit
|
||||||
Left = 224
|
Left = 224
|
||||||
Top = 116
|
Top = 116
|
||||||
Width = 57
|
Width = 57
|
||||||
Height = 21
|
Height = 21
|
||||||
TabOrder = 6
|
TabOrder = 5
|
||||||
Text = '1'
|
Text = '1'
|
||||||
OnChange = txtJittersChange
|
OnChange = txtJittersChange
|
||||||
end
|
end
|
||||||
@ -374,7 +373,7 @@ object ExportDialog: TExportDialog
|
|||||||
Top = 84
|
Top = 84
|
||||||
Width = 57
|
Width = 57
|
||||||
Height = 21
|
Height = 21
|
||||||
TabOrder = 7
|
TabOrder = 6
|
||||||
Text = '5'
|
Text = '5'
|
||||||
OnChange = txtEstimatorChange
|
OnChange = txtEstimatorChange
|
||||||
end
|
end
|
||||||
@ -383,7 +382,7 @@ object ExportDialog: TExportDialog
|
|||||||
Top = 116
|
Top = 116
|
||||||
Width = 57
|
Width = 57
|
||||||
Height = 21
|
Height = 21
|
||||||
TabOrder = 8
|
TabOrder = 7
|
||||||
Text = '0'
|
Text = '0'
|
||||||
OnChange = txtEstimatorMinChange
|
OnChange = txtEstimatorMinChange
|
||||||
end
|
end
|
||||||
@ -392,10 +391,29 @@ object ExportDialog: TExportDialog
|
|||||||
Top = 84
|
Top = 84
|
||||||
Width = 57
|
Width = 57
|
||||||
Height = 21
|
Height = 21
|
||||||
TabOrder = 9
|
TabOrder = 8
|
||||||
Text = '0.6'
|
Text = '0.6'
|
||||||
OnChange = txtEstimatorCurveChange
|
OnChange = txtEstimatorCurveChange
|
||||||
end
|
end
|
||||||
|
object txtGammaTresholds: TEdit
|
||||||
|
Left = 224
|
||||||
|
Top = 52
|
||||||
|
Width = 57
|
||||||
|
Height = 21
|
||||||
|
TabOrder = 9
|
||||||
|
Text = '0.01'
|
||||||
|
OnChange = txtGammaTresholdsChange
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object chkRender: TCheckBox
|
||||||
|
Left = 328
|
||||||
|
Top = 302
|
||||||
|
Width = 65
|
||||||
|
Height = 17
|
||||||
|
Caption = 'Render'
|
||||||
|
Checked = True
|
||||||
|
State = cbChecked
|
||||||
|
TabOrder = 6
|
||||||
end
|
end
|
||||||
object SaveDialog: TSaveDialog
|
object SaveDialog: TSaveDialog
|
||||||
DefaultExt = 'jpg'
|
DefaultExt = 'jpg'
|
||||||
|
@ -64,6 +64,8 @@ type
|
|||||||
txtEstimator: TEdit;
|
txtEstimator: TEdit;
|
||||||
txtEstimatorMin: TEdit;
|
txtEstimatorMin: TEdit;
|
||||||
txtEstimatorCurve: TEdit;
|
txtEstimatorCurve: TEdit;
|
||||||
|
Label14: TLabel;
|
||||||
|
txtGammaTresholds: TEdit;
|
||||||
procedure btnBrowseClick(Sender: TObject);
|
procedure btnBrowseClick(Sender: TObject);
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
procedure btnOKClick(Sender: TObject);
|
procedure btnOKClick(Sender: TObject);
|
||||||
@ -79,13 +81,16 @@ type
|
|||||||
procedure txtEstimatorMinChange(Sender: TObject);
|
procedure txtEstimatorMinChange(Sender: TObject);
|
||||||
procedure txtEstimatorCurveChange(Sender: TObject);
|
procedure txtEstimatorCurveChange(Sender: TObject);
|
||||||
procedure txtJittersChange(Sender: TObject);
|
procedure txtJittersChange(Sender: TObject);
|
||||||
|
procedure txtGammaTresholdsChange(Sender: TObject);
|
||||||
private
|
private
|
||||||
FloatFormatSettings: TFormatSettings;
|
FloatFormatSettings: TFormatSettings;
|
||||||
public
|
public
|
||||||
Filename: string;
|
Filename: string;
|
||||||
ImageWidth, ImageHeight, Oversample, Batches, Strips: Integer;
|
ImageWidth, ImageHeight, Oversample, Batches, Strips: Integer;
|
||||||
Sample_Density, Filter_Radius: double;
|
Sample_Density, Filter_Radius: double;
|
||||||
Estimator, EstimatorMin, EstimatorCurve, Jitters: double;
|
Estimator, EstimatorMin, EstimatorCurve: double;
|
||||||
|
GammaTresholds: double;
|
||||||
|
Jitters: integer;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -138,12 +143,13 @@ begin
|
|||||||
EstimatorMin := 0.0;
|
EstimatorMin := 0.0;
|
||||||
EstimatorCurve := 0.6;
|
EstimatorCurve := 0.6;
|
||||||
Jitters := 1;
|
Jitters := 1;
|
||||||
txtEstimator.Text := '5.0';
|
GammaTresholds := 0.01;
|
||||||
txtEstimatorMin.Text := '0.0';
|
|
||||||
txtEstimatorCurve.Text := '0.6';
|
|
||||||
txtJitters.Text := '1';
|
|
||||||
|
|
||||||
GetLocaleFormatSettings(LOCALE_SYSTEM_DEFAULT, FloatFormatSettings);
|
GetLocaleFormatSettings(LOCALE_SYSTEM_DEFAULT, FloatFormatSettings);
|
||||||
|
txtEstimator.Text := FloatToStr(Estimator, FloatFormatSettings);
|
||||||
|
txtEstimatorMin.Text := FloatToStr(EstimatorMin, FloatFormatSettings);
|
||||||
|
txtEstimatorCurve.Text := FloatToStr(EstimatorCurve, FloatFormatSettings);
|
||||||
|
txtJitters.Text := IntToStr(Jitters);
|
||||||
|
txtGammaTresholds.Text := FloatToStr(GammaTresholds, FloatFormatSettings);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TExportDialog.btnOKClick(Sender: TObject);
|
procedure TExportDialog.btnOKClick(Sender: TObject);
|
||||||
@ -265,7 +271,16 @@ procedure TExportDialog.txtJittersChange(Sender: TObject);
|
|||||||
begin
|
begin
|
||||||
Jitters := 0;
|
Jitters := 0;
|
||||||
try
|
try
|
||||||
Jitters := StrToFloat(txtJitters.Text, FloatFormatSettings);
|
Jitters := StrToInt(txtJitters.Text);
|
||||||
|
except
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TExportDialog.txtGammaTresholdsChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
GammaTresholds := 0.01;
|
||||||
|
try
|
||||||
|
GammaTresholds := StrToFloat(txtGammaTresholds.Text, FloatFormatSettings);
|
||||||
except
|
except
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -127,7 +127,9 @@ var
|
|||||||
SheepServer, SheepNick, SheepURL, SheepPW, HqiPath: string;
|
SheepServer, SheepNick, SheepURL, SheepPW, HqiPath: string;
|
||||||
ExportBatches, ExportOversample, ExportWidth, ExportHeight, ExportFileFormat: Integer;
|
ExportBatches, ExportOversample, ExportWidth, ExportHeight, ExportFileFormat: Integer;
|
||||||
ExportFilter, ExportDensity: Double;
|
ExportFilter, ExportDensity: Double;
|
||||||
ExportEstimator, ExportEstimatorMin, ExportEstimatorCurve, ExportJitters: double;
|
ExportEstimator, ExportEstimatorMin, ExportEstimatorCurve: double;
|
||||||
|
ExportJitters: integer;
|
||||||
|
ExportGammaTresholds: double;
|
||||||
OpenFileType: TFileType;
|
OpenFileType: TFileType;
|
||||||
ResizeOnLoad: Boolean;
|
ResizeOnLoad: Boolean;
|
||||||
ShowProgress: Boolean;
|
ShowProgress: Boolean;
|
||||||
|
@ -1330,10 +1330,11 @@ begin
|
|||||||
format('brightness="%g" ', [cp1.brightness]) +
|
format('brightness="%g" ', [cp1.brightness]) +
|
||||||
format('gamma="%g" ', [cp1.gamma]) +
|
format('gamma="%g" ', [cp1.gamma]) +
|
||||||
format('vibrancy="%g" ', [cp1.vibrancy]) +
|
format('vibrancy="%g" ', [cp1.vibrancy]) +
|
||||||
format('estimator="%g" ', [cp1.estimator]) +
|
format('estimator_radius="%g" ', [cp1.estimator]) +
|
||||||
format('estimator_minimum="%g" ', [cp1.estimator_min]) +
|
format('estimator_minimum="%g" ', [cp1.estimator_min]) +
|
||||||
format('estimator_curve="%g" ', [cp1.estimator_curve]) +
|
format('estimator_curve="%g" ', [cp1.estimator_curve]) +
|
||||||
format('temporal_samples="%g" ', [cp1.jitters]) +
|
format('temporal_samples="%d" ', [cp1.jitters]) +
|
||||||
|
format('gamma_thresholds="%g" ', [cp1.gamma_tresholds]) +
|
||||||
hue + url + nick + '>');
|
hue + url + nick + '>');
|
||||||
|
|
||||||
{ Write transform parameters }
|
{ Write transform parameters }
|
||||||
@ -3673,6 +3674,7 @@ begin
|
|||||||
ExportEstimatorMin := ExportDialog.EstimatorMin;
|
ExportEstimatorMin := ExportDialog.EstimatorMin;
|
||||||
ExportEstimatorCurve := ExportDialog.EstimatorCurve;
|
ExportEstimatorCurve := ExportDialog.EstimatorCurve;
|
||||||
ExportJitters := ExportDialog.Jitters;
|
ExportJitters := ExportDialog.Jitters;
|
||||||
|
ExportGammaTresholds := ExportDialog.GammaTresholds;
|
||||||
cp1.sample_density := ExportDensity;
|
cp1.sample_density := ExportDensity;
|
||||||
cp1.spatial_oversample := ExportOversample;
|
cp1.spatial_oversample := ExportOversample;
|
||||||
cp1.spatial_filter_radius := ExportFilter;
|
cp1.spatial_filter_radius := ExportFilter;
|
||||||
@ -3683,6 +3685,7 @@ begin
|
|||||||
cp1.estimator_min := ExportEstimatorMin;
|
cp1.estimator_min := ExportEstimatorMin;
|
||||||
cp1.estimator_curve := ExportEstimatorCurve;
|
cp1.estimator_curve := ExportEstimatorCurve;
|
||||||
cp1.jitters := ExportJitters;
|
cp1.jitters := ExportJitters;
|
||||||
|
cp1.gamma_tresholds := ExportGammaTresholds;
|
||||||
FileList.Text := FlameToXML(cp1, false);
|
FileList.Text := FlameToXML(cp1, false);
|
||||||
FileList.SaveToFile(ChangeFileExt(ExportDialog.Filename, '.flame'));
|
FileList.SaveToFile(ChangeFileExt(ExportDialog.Filename, '.flame'));
|
||||||
FileList.Clear;
|
FileList.Clear;
|
||||||
|
Loading…
Reference in New Issue
Block a user