Merge branch 'dev' into spot-removal-tool
This commit is contained in:
@@ -93,6 +93,7 @@ ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), favorit
|
||||
bayerrawexposure = Gtk::manage (new BayerRAWExposure ());
|
||||
xtransrawexposure = Gtk::manage (new XTransRAWExposure ());
|
||||
fattal = Gtk::manage (new FattalToneMapping ());
|
||||
filmNegative = Gtk::manage (new FilmNegative ());
|
||||
|
||||
// So Demosaic, Line noise filter, Green Equilibration, Ca-Correction (garder le nom de section identique!) and Black-Level will be moved in a "Bayer sensor" tool,
|
||||
// and a separate Demosaic and Black Level tool will be created in an "X-Trans sensor" tool
|
||||
@@ -156,6 +157,7 @@ ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), favorit
|
||||
addfavoritePanel (rawPanel, preprocess);
|
||||
addfavoritePanel (rawPanel, darkframe);
|
||||
addfavoritePanel (rawPanel, flatfield);
|
||||
addfavoritePanel (rawPanel, filmNegative);
|
||||
|
||||
int favoriteCount = 0;
|
||||
for(auto it = favorites.begin(); it != favorites.end(); ++it) {
|
||||
@@ -257,6 +259,7 @@ ToolPanelCoordinator::ToolPanelCoordinator (bool batch) : ipc (nullptr), favorit
|
||||
distortion->setLensGeomListener (this);
|
||||
crop->setCropPanelListener (this);
|
||||
icm->setICMPanelListener (this);
|
||||
filmNegative->setFilmNegProvider (this);
|
||||
|
||||
toolBar = new ToolBar ();
|
||||
toolBar->setToolBarListener (this);
|
||||
@@ -307,6 +310,7 @@ void ToolPanelCoordinator::imageTypeChanged (bool isRaw, bool isBayer, bool isXt
|
||||
sensorbayer->FoldableToolPanel::show();
|
||||
preprocess->FoldableToolPanel::show();
|
||||
flatfield->FoldableToolPanel::show();
|
||||
filmNegative->FoldableToolPanel::show();
|
||||
retinex->FoldableToolPanel::setGrayedOut(false);
|
||||
|
||||
return false;
|
||||
@@ -322,6 +326,7 @@ void ToolPanelCoordinator::imageTypeChanged (bool isRaw, bool isBayer, bool isXt
|
||||
sensorbayer->FoldableToolPanel::hide();
|
||||
preprocess->FoldableToolPanel::show();
|
||||
flatfield->FoldableToolPanel::show();
|
||||
filmNegative->FoldableToolPanel::show();
|
||||
retinex->FoldableToolPanel::setGrayedOut(false);
|
||||
|
||||
return false;
|
||||
@@ -337,6 +342,7 @@ void ToolPanelCoordinator::imageTypeChanged (bool isRaw, bool isBayer, bool isXt
|
||||
sensorxtrans->FoldableToolPanel::hide();
|
||||
preprocess->FoldableToolPanel::hide();
|
||||
flatfield->FoldableToolPanel::show();
|
||||
filmNegative->FoldableToolPanel::hide();
|
||||
retinex->FoldableToolPanel::setGrayedOut(false);
|
||||
|
||||
return false;
|
||||
@@ -351,6 +357,7 @@ void ToolPanelCoordinator::imageTypeChanged (bool isRaw, bool isBayer, bool isXt
|
||||
sensorxtrans->FoldableToolPanel::hide();
|
||||
preprocess->FoldableToolPanel::hide();
|
||||
flatfield->FoldableToolPanel::hide();
|
||||
filmNegative->FoldableToolPanel::hide();
|
||||
retinex->FoldableToolPanel::setGrayedOut(false);
|
||||
|
||||
return false;
|
||||
@@ -362,6 +369,7 @@ void ToolPanelCoordinator::imageTypeChanged (bool isRaw, bool isBayer, bool isXt
|
||||
[this]() -> bool
|
||||
{
|
||||
rawPanelSW->set_sensitive(false);
|
||||
filmNegative->FoldableToolPanel::hide();
|
||||
retinex->FoldableToolPanel::setGrayedOut(true);
|
||||
|
||||
return false;
|
||||
@@ -478,7 +486,7 @@ void ToolPanelCoordinator::profileChange(
|
||||
lParams[1] = *mergedParams;
|
||||
pe.initFrom (lParams);
|
||||
|
||||
filterRawRefresh = pe.raw.isUnchanged() && pe.lensProf.isUnchanged() && pe.retinex.isUnchanged();
|
||||
filterRawRefresh = pe.raw.isUnchanged() && pe.lensProf.isUnchanged() && pe.retinex.isUnchanged() && pe.filmNegative.isUnchanged();
|
||||
}
|
||||
|
||||
*params = *mergedParams;
|
||||
@@ -770,8 +778,8 @@ rtengine::RawImage* ToolPanelCoordinator::getFF()
|
||||
const rtengine::FramesMetaData *imd = ipc->getInitialImage()->getMetaData();
|
||||
|
||||
if (imd) {
|
||||
// int iso = imd->getISOSpeed(); temporarilly removed because unused
|
||||
// double shutter = imd->getShutterSpeed(); temporarilly removed because unused
|
||||
// int iso = imd->getISOSpeed(); temporarily removed because unused
|
||||
// double shutter = imd->getShutterSpeed(); temporarily removed because unused
|
||||
double aperture = imd->getFNumber();
|
||||
double focallength = imd->getFocalLen();
|
||||
std::string maker ( imd->getMake() );
|
||||
@@ -957,22 +965,38 @@ void ToolPanelCoordinator::toolSelected (ToolMode tool)
|
||||
{
|
||||
GThreadLock lock; // All GUI access from idle_add callbacks or separate thread HAVE to be protected
|
||||
|
||||
auto checkFavorite = [this](FoldableToolPanel* tool) {
|
||||
for (auto fav : favorites) {
|
||||
if (fav == tool) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
switch (tool) {
|
||||
case TMCropSelect:
|
||||
crop->setExpanded (true);
|
||||
toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*transformPanelSW));
|
||||
case TMCropSelect: {
|
||||
crop->setExpanded(true);
|
||||
toolPanelNotebook->set_current_page(toolPanelNotebook->page_num(checkFavorite(crop) ? *favoritePanelSW : *transformPanelSW));
|
||||
break;
|
||||
}
|
||||
|
||||
case TMSpotWB:
|
||||
whitebalance->setExpanded (true);
|
||||
toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*colorPanelSW));
|
||||
case TMSpotWB: {
|
||||
whitebalance->setExpanded(true);
|
||||
toolPanelNotebook->set_current_page(toolPanelNotebook->page_num(checkFavorite(whitebalance) ? *favoritePanelSW : *colorPanelSW));
|
||||
break;
|
||||
}
|
||||
|
||||
case TMStraighten:
|
||||
lensgeom->setExpanded (true);
|
||||
rotate->setExpanded (true);
|
||||
toolPanelNotebook->set_current_page (toolPanelNotebook->page_num (*transformPanelSW));
|
||||
case TMStraighten: {
|
||||
rotate->setExpanded(true);
|
||||
bool isFavorite = checkFavorite(rotate);
|
||||
if (!isFavorite) {
|
||||
isFavorite = checkFavorite(lensgeom);
|
||||
lensgeom->setExpanded(true);
|
||||
}
|
||||
toolPanelNotebook->set_current_page(toolPanelNotebook->page_num(isFavorite ? *favoritePanelSW : *transformPanelSW));
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
@@ -1000,3 +1024,8 @@ void ToolPanelCoordinator::setEditProvider (EditDataProvider *provider)
|
||||
toolPanels.at (i)->setEditProvider (provider);
|
||||
}
|
||||
}
|
||||
|
||||
bool ToolPanelCoordinator::getFilmNegativeExponents(rtengine::Coord spotA, rtengine::Coord spotB, std::array<float, 3>& newExps)
|
||||
{
|
||||
return ipc && ipc->getFilmNegativeExponents(spotA.x, spotA.y, spotB.x, spotB.y, newExps);
|
||||
}
|
||||
|
Reference in New Issue
Block a user