started working on support for dynamic processing profiles
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
#include "rtimage.h"
|
||||
#include "version.h"
|
||||
#include "extprog.h"
|
||||
#include "dynamicprofile.h"
|
||||
|
||||
#ifndef WIN32
|
||||
#include <glibmm/fileutils.h>
|
||||
@@ -710,7 +711,7 @@ int processLineParams( int argc, char **argv )
|
||||
rawParams = new rtengine::procparams::PartialProfile(true, true);
|
||||
Glib::ustring profPath = options.findProfilePath(options.defProfRaw);
|
||||
|
||||
if (options.is_defProfRawMissing() || profPath.empty() || rawParams->load(profPath == DEFPROFILE_INTERNAL ? DEFPROFILE_INTERNAL : Glib::build_filename(profPath, options.defProfRaw.substr(5) + paramFileExtension))) {
|
||||
if (options.is_defProfRawMissing() || profPath.empty() || (profPath != DEFPROFILE_DYNAMIC && rawParams->load(profPath == DEFPROFILE_INTERNAL ? DEFPROFILE_INTERNAL : Glib::build_filename(profPath, options.defProfRaw.substr(5) + paramFileExtension)))) {
|
||||
std::cerr << "Error: default raw processing profile not found" << std::endl;
|
||||
rawParams->deleteInstance();
|
||||
delete rawParams;
|
||||
@@ -721,7 +722,7 @@ int processLineParams( int argc, char **argv )
|
||||
imgParams = new rtengine::procparams::PartialProfile(true);
|
||||
profPath = options.findProfilePath(options.defProfImg);
|
||||
|
||||
if (options.is_defProfImgMissing() || profPath.empty() || imgParams->load(profPath == DEFPROFILE_INTERNAL ? DEFPROFILE_INTERNAL : Glib::build_filename(profPath, options.defProfImg.substr(5) + paramFileExtension))) {
|
||||
if (options.is_defProfImgMissing() || profPath.empty() || (profPath != DEFPROFILE_DYNAMIC && imgParams->load(profPath == DEFPROFILE_INTERNAL ? DEFPROFILE_INTERNAL : Glib::build_filename(profPath, options.defProfImg.substr(5) + paramFileExtension)))) {
|
||||
std::cerr << "Error: default non-raw processing profile not found" << std::endl;
|
||||
imgParams->deleteInstance();
|
||||
delete imgParams;
|
||||
@@ -793,9 +794,19 @@ int processLineParams( int argc, char **argv )
|
||||
|
||||
if (useDefault) {
|
||||
if (isRaw) {
|
||||
if (options.defProfRaw == DEFPROFILE_DYNAMIC) {
|
||||
rawParams->deleteInstance();
|
||||
delete rawParams;
|
||||
rawParams = loadDynamicProfile(ii->getMetaData());
|
||||
}
|
||||
std::cout << " Merging default raw processing profile" << std::endl;
|
||||
rawParams->applyTo(¤tParams);
|
||||
} else {
|
||||
if (options.defProfImg == DEFPROFILE_DYNAMIC) {
|
||||
imgParams->deleteInstance();
|
||||
delete imgParams;
|
||||
imgParams = loadDynamicProfile(ii->getMetaData());
|
||||
}
|
||||
std::cout << " Merging default non-raw processing profile" << std::endl;
|
||||
imgParams->applyTo(¤tParams);
|
||||
}
|
||||
|
Reference in New Issue
Block a user