mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-01-21 13:10:04 -05:00
--Bug fixes
-Remove illegal characters from filenames.
This commit is contained in:
parent
73efd76bdd
commit
2b60d2b87e
@ -276,7 +276,7 @@
|
|||||||
6E19308C2842863556994868B94C5FB1687C5E9EB7A29A98
|
6E19308C2842863556994868B94C5FB1687C5E9EB7A29A98
|
||||||
</palette>
|
</palette>
|
||||||
</flame>
|
</flame>
|
||||||
<flame version="EMBER-WIN-1.0.0.19" time="7" name="Rings2/Julian" size="1500 1000" center="0 0" scale="1500" rotate="0" supersample="2" filter="0.5" filter_shape="gaussian" temporal_filter_type="box" temporal_filter_width="1" quality="1000" temporal_samples="100" sub_batch_size="10240" fuse="15" rand_range="1" background="0 0 0" brightness="30" gamma="3" highlight_power="1" logscale_k2="0" vibrancy="1" estimator_radius="9" estimator_minimum="0" estimator_curve="0.4" gamma_threshold="0.01" cam_zpos="0" cam_persp="0" cam_yaw="0" cam_pitch="0" cam_dof="0" blur_curve="0" palette_mode="linear" interpolation="smooth" interpolation_type="log" plugins="julian flatten rings2" new_linear="1" curves="0 0 1 0.25 0.25 1 0.5 0.5 1 0.75 0.75 1 0 0 1 0.25 0.25 1 0.5 0.5 1 0.75 0.75 1 0 0 1 0.25 0.25 1 0.5 0.5 1 0.75 0.75 1 0 0 1 0.25 0.25 1 0.5 0.5 1 0.75 0.75 1 " overall_curve="0 0 0.25 0.25 0.5 0.5 0.75 0.75 1 1 " red_curve="0 0 0.25 0.25 0.5 0.5 0.75 0.75 1 1 " green_curve="0 0 0.25 0.25 0.5 0.5 0.75 0.75 1 1 " blue_curve="0 0 0.25 0.25 0.5 0.5 0.75 0.75 1 1 ">
|
<flame version="EMBER-WIN-1.0.0.19" time="7" name="Rings2_Julian" size="1500 1000" center="0 0" scale="1500" rotate="0" supersample="2" filter="0.5" filter_shape="gaussian" temporal_filter_type="box" temporal_filter_width="1" quality="1000" temporal_samples="100" sub_batch_size="10240" fuse="15" rand_range="1" background="0 0 0" brightness="30" gamma="3" highlight_power="1" logscale_k2="0" vibrancy="1" estimator_radius="9" estimator_minimum="0" estimator_curve="0.4" gamma_threshold="0.01" cam_zpos="0" cam_persp="0" cam_yaw="0" cam_pitch="0" cam_dof="0" blur_curve="0" palette_mode="linear" interpolation="smooth" interpolation_type="log" plugins="julian flatten rings2" new_linear="1" curves="0 0 1 0.25 0.25 1 0.5 0.5 1 0.75 0.75 1 0 0 1 0.25 0.25 1 0.5 0.5 1 0.75 0.75 1 0 0 1 0.25 0.25 1 0.5 0.5 1 0.75 0.75 1 0 0 1 0.25 0.25 1 0.5 0.5 1 0.75 0.75 1 " overall_curve="0 0 0.25 0.25 0.5 0.5 0.75 0.75 1 1 " red_curve="0 0 0.25 0.25 0.5 0.5 0.75 0.75 1 1 " green_curve="0 0 0.25 0.25 0.5 0.5 0.75 0.75 1 1 " blue_curve="0 0 0.25 0.25 0.5 0.5 0.75 0.75 1 1 ">
|
||||||
<xform weight="0.5" color="1" var_color="1" color_speed="0.5" symmetry="0" name="" animate="1" julian="1" julian_dist="-2" julian_power="8000" flatten="1" coefs="1 0 0 1 0 0" opacity="1"/>
|
<xform weight="0.5" color="1" var_color="1" color_speed="0.5" symmetry="0" name="" animate="1" julian="1" julian_dist="-2" julian_power="8000" flatten="1" coefs="1 0 0 1 0 0" opacity="1"/>
|
||||||
<xform weight="30" color="0" var_color="1" color_speed="0.05" symmetry="0.9" name="" animate="0" rings2="1" rings2_val="1" flatten="1" coefs="1 0 0 1 -0.1 0" opacity="1"/>
|
<xform weight="30" color="0" var_color="1" color_speed="0.05" symmetry="0.9" name="" animate="0" rings2="1" rings2_val="1" flatten="1" coefs="1 0 0 1 -0.1 0" opacity="1"/>
|
||||||
<palette count="256" format="RGB">
|
<palette count="256" format="RGB">
|
||||||
@ -392,7 +392,7 @@
|
|||||||
6E19308C2842863556994868B94C5FB1687C5E9EB7A29A98
|
6E19308C2842863556994868B94C5FB1687C5E9EB7A29A98
|
||||||
</palette>
|
</palette>
|
||||||
</flame>
|
</flame>
|
||||||
<flame version="EMBER-WIN-1.0.0.19" time="10" name="LazySuzan/Julian" size="1500 1000" center="0 0" scale="364.56" rotate="0" supersample="2" filter="0.5" filter_shape="gaussian" temporal_filter_type="box" temporal_filter_width="1" quality="1000" temporal_samples="100" sub_batch_size="10240" fuse="15" rand_range="1" background="0 0 0" brightness="1.5" gamma="1" highlight_power="1" logscale_k2="0" vibrancy="1" estimator_radius="9" estimator_minimum="0" estimator_curve="0.4" gamma_threshold="0.01" cam_zpos="0" cam_persp="0" cam_yaw="0" cam_pitch="0" cam_dof="0" blur_curve="0" palette_mode="linear" interpolation="smooth" interpolation_type="log" plugins="julian flatten lazysusan disc linear blur gaussian_blur" new_linear="1" curves="0 0 1 0.25 0.25 1 0.5 0.5 1 0.75 0.75 1 0 0 1 0.25 0.25 1 0.5 0.5 1 0.75 0.75 1 0 0 1 0.25 0.25 1 0.5 0.5 1 0.75 0.75 1 0 0 1 0.25 0.25 1 0.5 0.5 1 0.75 0.75 1 " overall_curve="0 0 0.25 0.25 0.5 0.5 0.75 0.75 1 1 " red_curve="0 0 0.25 0.25 0.5 0.5 0.75 0.75 1 1 " green_curve="0 0 0.25 0.25 0.5 0.5 0.75 0.75 1 1 " blue_curve="0 0 0.25 0.25 0.5 0.5 0.75 0.75 1 1 ">
|
<flame version="EMBER-WIN-1.0.0.19" time="10" name="LazySuzan_Julian" size="1500 1000" center="0 0" scale="364.56" rotate="0" supersample="2" filter="0.5" filter_shape="gaussian" temporal_filter_type="box" temporal_filter_width="1" quality="1000" temporal_samples="100" sub_batch_size="10240" fuse="15" rand_range="1" background="0 0 0" brightness="1.5" gamma="1" highlight_power="1" logscale_k2="0" vibrancy="1" estimator_radius="9" estimator_minimum="0" estimator_curve="0.4" gamma_threshold="0.01" cam_zpos="0" cam_persp="0" cam_yaw="0" cam_pitch="0" cam_dof="0" blur_curve="0" palette_mode="linear" interpolation="smooth" interpolation_type="log" plugins="julian flatten lazysusan disc linear blur gaussian_blur" new_linear="1" curves="0 0 1 0.25 0.25 1 0.5 0.5 1 0.75 0.75 1 0 0 1 0.25 0.25 1 0.5 0.5 1 0.75 0.75 1 0 0 1 0.25 0.25 1 0.5 0.5 1 0.75 0.75 1 0 0 1 0.25 0.25 1 0.5 0.5 1 0.75 0.75 1 " overall_curve="0 0 0.25 0.25 0.5 0.5 0.75 0.75 1 1 " red_curve="0 0 0.25 0.25 0.5 0.5 0.75 0.75 1 1 " green_curve="0 0 0.25 0.25 0.5 0.5 0.75 0.75 1 1 " blue_curve="0 0 0.25 0.25 0.5 0.5 0.75 0.75 1 1 ">
|
||||||
<xform weight="2" color="0" var_color="1" color_speed="0.5" symmetry="0" name="" animate="1" julian="1" julian_dist="1" julian_power="5000" flatten="1" coefs="1 0 0 1 0 0" post="1 0 0 1 -1 0" chaos="1 2 1 1 1 1 1 1 " opacity="1"/>
|
<xform weight="2" color="0" var_color="1" color_speed="0.5" symmetry="0" name="" animate="1" julian="1" julian_dist="1" julian_power="5000" flatten="1" coefs="1 0 0 1 0 0" post="1 0 0 1 -1 0" chaos="1 2 1 1 1 1 1 1 " opacity="1"/>
|
||||||
<xform weight="1000" color="0" var_color="1" color_speed="0.5" symmetry="0" name="" animate="1" lazysusan="1" lazysusan_spin="3.14159" lazysusan_space="0" lazysusan_twist="0" lazysusan_x="0" lazysusan_y="0" flatten="1" coefs="0.698957 0.698957 -0.698957 0.698957 0.5 -0.5" post="1 0 0 1 -1 0" opacity="1"/>
|
<xform weight="1000" color="0" var_color="1" color_speed="0.5" symmetry="0" name="" animate="1" lazysusan="1" lazysusan_spin="3.14159" lazysusan_space="0" lazysusan_twist="0" lazysusan_x="0" lazysusan_y="0" flatten="1" coefs="0.698957 0.698957 -0.698957 0.698957 0.5 -0.5" post="1 0 0 1 -1 0" opacity="1"/>
|
||||||
<xform weight="0.5" color="0" var_color="1" color_speed="0.5" symmetry="0" name="" animate="1" julian="1" julian_dist="-1" julian_power="5000" flatten="1" coefs="1 0 0 1 0 0" post="1 0 0 1 -1 0" chaos="1 2 1 1 1 1 1 1 " opacity="1"/>
|
<xform weight="0.5" color="0" var_color="1" color_speed="0.5" symmetry="0" name="" animate="1" julian="1" julian_dist="-1" julian_power="5000" flatten="1" coefs="1 0 0 1 0 0" post="1 0 0 1 -1 0" chaos="1 2 1 1 1 1 1 1 " opacity="1"/>
|
||||||
@ -436,7 +436,7 @@
|
|||||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
|
||||||
</palette>
|
</palette>
|
||||||
</flame>
|
</flame>
|
||||||
<flame version="EMBER-WIN-1.0.0.19" time="11" name="Splits/Elliptic" size="1500 1000" center="0 0" scale="320" rotate="0" supersample="2" filter="0.5" filter_shape="gaussian" temporal_filter_type="box" temporal_filter_width="1" quality="1000" temporal_samples="100" sub_batch_size="10240" fuse="15" rand_range="1" background="0 0 0" brightness="4" gamma="4" highlight_power="1" logscale_k2="0" vibrancy="1" estimator_radius="0" estimator_minimum="0" estimator_curve="0.4" gamma_threshold="0.01" cam_zpos="0" cam_persp="0" cam_yaw="0" cam_pitch="0" cam_dof="0" blur_curve="0" palette_mode="linear" interpolation="smooth" interpolation_type="log" plugins="elliptic flatten splits" new_linear="1" curves="0 0 1 0.25 0.25 1 0.5 0.5 1 0.75 0.75 1 0 0 1 0.25 0.25 1 0.5 0.5 1 0.75 0.75 1 0 0 1 0.25 0.25 1 0.5 0.5 1 0.75 0.75 1 0 0 1 0.25 0.25 1 0.5 0.5 1 0.75 0.75 1 " overall_curve="0 0 0.25 0.25 0.5 0.5 0.75 0.75 1 1 " red_curve="0 0 0.25 0.25 0.5 0.5 0.75 0.75 1 1 " green_curve="0 0 0.25 0.25 0.5 0.5 0.75 0.75 1 1 " blue_curve="0 0 0.25 0.25 0.5 0.5 0.75 0.75 1 1 ">
|
<flame version="EMBER-WIN-1.0.0.19" time="11" name="Splits_Elliptic" size="1500 1000" center="0 0" scale="320" rotate="0" supersample="2" filter="0.5" filter_shape="gaussian" temporal_filter_type="box" temporal_filter_width="1" quality="1000" temporal_samples="100" sub_batch_size="10240" fuse="15" rand_range="1" background="0 0 0" brightness="4" gamma="4" highlight_power="1" logscale_k2="0" vibrancy="1" estimator_radius="0" estimator_minimum="0" estimator_curve="0.4" gamma_threshold="0.01" cam_zpos="0" cam_persp="0" cam_yaw="0" cam_pitch="0" cam_dof="0" blur_curve="0" palette_mode="linear" interpolation="smooth" interpolation_type="log" plugins="elliptic flatten splits" new_linear="1" curves="0 0 1 0.25 0.25 1 0.5 0.5 1 0.75 0.75 1 0 0 1 0.25 0.25 1 0.5 0.5 1 0.75 0.75 1 0 0 1 0.25 0.25 1 0.5 0.5 1 0.75 0.75 1 0 0 1 0.25 0.25 1 0.5 0.5 1 0.75 0.75 1 " overall_curve="0 0 0.25 0.25 0.5 0.5 0.75 0.75 1 1 " red_curve="0 0 0.25 0.25 0.5 0.5 0.75 0.75 1 1 " green_curve="0 0 0.25 0.25 0.5 0.5 0.75 0.75 1 1 " blue_curve="0 0 0.25 0.25 0.5 0.5 0.75 0.75 1 1 ">
|
||||||
<xform weight="0.5" color="0.336036" var_color="1" color_speed="0.05" symmetry="0.9" name="" animate="0" elliptic="1" flatten="1" coefs="0 -1.25 1.25 0 0 0" opacity="1"/>
|
<xform weight="0.5" color="0.336036" var_color="1" color_speed="0.05" symmetry="0.9" name="" animate="0" elliptic="1" flatten="1" coefs="0 -1.25 1.25 0 0 0" opacity="1"/>
|
||||||
<xform weight="0.5" color="0.789083" var_color="1" color_speed="0.05" symmetry="0.9" name="" animate="0" splits="1" splits_x="0" splits_y="1" flatten="1" coefs="1.95313 0 0 1.95313 0 0" post="0 1 -1 0 0 0" opacity="1"/>
|
<xform weight="0.5" color="0.789083" var_color="1" color_speed="0.05" symmetry="0.9" name="" animate="0" splits="1" splits_x="0" splits_y="1" flatten="1" coefs="1.95313 0 0 1.95313 0 0" post="0 1 -1 0 0 0" opacity="1"/>
|
||||||
<palette count="256" format="RGB">
|
<palette count="256" format="RGB">
|
||||||
|
@ -309,6 +309,22 @@ static void Rgba32ToRgba32Exr(v4F* rgba, float* r, float* g, float* b, float* a,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a string with all illegal file path characters removed.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="filename">The path to remove illegal characters from</param>
|
||||||
|
/// <returns>The cleaned full file path and name.</returns>
|
||||||
|
static string CleanPath(const string& filename)
|
||||||
|
{
|
||||||
|
static string illegalChars = "\\/:*?\"<>|";
|
||||||
|
auto tempfilename = filename;
|
||||||
|
|
||||||
|
for (auto& ch : illegalChars)
|
||||||
|
tempfilename.erase(remove(tempfilename.begin(), tempfilename.end(), ch), tempfilename.end());
|
||||||
|
|
||||||
|
return tempfilename;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Make a filename for a single render. This is used in EmberRender.
|
/// Make a filename for a single render. This is used in EmberRender.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -340,7 +356,7 @@ static string MakeSingleFilename(const string& path, const string& out, const st
|
|||||||
filename = fnstream.str();
|
filename = fnstream.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
return filename;
|
return CleanPath(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -356,7 +372,7 @@ static string MakeAnimFilename(const string& path, const string& prefix, const s
|
|||||||
{
|
{
|
||||||
ostringstream fnstream;
|
ostringstream fnstream;
|
||||||
fnstream << path << prefix << setfill('0') << setprecision(0) << fixed << setw(padding) << ftime << suffix << format;
|
fnstream << path << prefix << setfill('0') << setprecision(0) << fixed << setw(padding) << ftime << suffix << format;
|
||||||
return fnstream.str();
|
return CleanPath(fnstream.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -85,7 +85,7 @@ void FractoriumEmberController<T>::NewFlock(size_t count)
|
|||||||
m_SheepTools->Random(ember, *filteredVariationsRef, static_cast<intmax_t>(QTIsaac<ISAAC_SIZE, ISAAC_INT>::LockedFrand<T>(-2, 2)), 0, 8);
|
m_SheepTools->Random(ember, *filteredVariationsRef, static_cast<intmax_t>(QTIsaac<ISAAC_SIZE, ISAAC_INT>::LockedFrand<T>(-2, 2)), 0, 8);
|
||||||
ParamsToEmber(ember);
|
ParamsToEmber(ember);
|
||||||
ember.m_Index = i;
|
ember.m_Index = i;
|
||||||
ember.m_Name = m_EmberFile.m_Filename.toStdString() + "_" + ToString(i + 1ULL).toStdString();
|
ember.m_Name = CleanPath(m_EmberFile.m_Filename.toStdString() + "_" + ToString(i + 1ULL).toStdString());
|
||||||
m_EmberFile.m_Embers.push_back(ember);
|
m_EmberFile.m_Embers.push_back(ember);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -311,6 +311,8 @@ void FractoriumEmberController<T>::OpenAndPrepFiles(const QStringList& filenames
|
|||||||
//Also ensure it has a name.
|
//Also ensure it has a name.
|
||||||
if (embers[i].m_Name == "" || embers[i].m_Name == "No name")
|
if (embers[i].m_Name == "" || embers[i].m_Name == "No name")
|
||||||
embers[i].m_Name = ToString<qulonglong>(i).toStdString();
|
embers[i].m_Name = ToString<qulonglong>(i).toStdString();
|
||||||
|
else
|
||||||
|
embers[i].m_Name = CleanPath(embers[i].m_Name);
|
||||||
|
|
||||||
embers[i].m_Quality = m_Fractorium->m_QualitySpin->value();
|
embers[i].m_Quality = m_Fractorium->m_QualitySpin->value();
|
||||||
embers[i].m_Supersample = m_Fractorium->m_SupersampleSpin->value();
|
embers[i].m_Supersample = m_Fractorium->m_SupersampleSpin->value();
|
||||||
@ -710,6 +712,8 @@ void FractoriumEmberController<T>::PasteXmlAppend()
|
|||||||
//Also ensure it has a name.
|
//Also ensure it has a name.
|
||||||
if (embers[i].m_Name == "" || embers[i].m_Name == "No name")
|
if (embers[i].m_Name == "" || embers[i].m_Name == "No name")
|
||||||
embers[i].m_Name = ToString<qulonglong>(embers[i].m_Index).toStdString();
|
embers[i].m_Name = ToString<qulonglong>(embers[i].m_Index).toStdString();
|
||||||
|
else
|
||||||
|
embers[i].m_Name = CleanPath(embers[i].m_Name);
|
||||||
|
|
||||||
m_EmberFile.m_Embers.push_back(embers[i]);//Will invalidate the pointers contained in the EmberTreeWidgetItems, UpdateLibraryTree() will resync.
|
m_EmberFile.m_Embers.push_back(embers[i]);//Will invalidate the pointers contained in the EmberTreeWidgetItems, UpdateLibraryTree() will resync.
|
||||||
}
|
}
|
||||||
@ -767,6 +771,8 @@ void FractoriumEmberController<T>::PasteXmlOver()
|
|||||||
//Also ensure it has a name.
|
//Also ensure it has a name.
|
||||||
if (it.m_Name == "" || it.m_Name == "No name")
|
if (it.m_Name == "" || it.m_Name == "No name")
|
||||||
it.m_Name = ToString<qulonglong>(it.m_Index).toStdString();
|
it.m_Name = ToString<qulonglong>(it.m_Index).toStdString();
|
||||||
|
else
|
||||||
|
it.m_Name = CleanPath(it.m_Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_EmberFile.MakeNamesUnique();
|
m_EmberFile.MakeNamesUnique();
|
||||||
|
Loading…
Reference in New Issue
Block a user