ACME-1277 : Final set of filters, added a SnapshotFiltersEnabled debug setting
parent
f95529b3f3
commit
a5366f06ed
|
|
@ -7,43 +7,36 @@
|
|||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>brighten</string>
|
||||
<real>0.1</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>stencil</string>
|
||||
<string>vignette</string>
|
||||
<string>gradient</string>
|
||||
<string>add</string>
|
||||
<real>1.0</real>
|
||||
<real>0.0</real>
|
||||
<real>0.4</real>
|
||||
<real>-0.5</real>
|
||||
<real>0.5</real>
|
||||
<real>0.15</real>
|
||||
<real>20.0</real>
|
||||
<real>-1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>-1.0</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>colorize</string>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>0.15</real>
|
||||
<real>0.15</real>
|
||||
<real>0.15</real>
|
||||
<real>0.1</real>
|
||||
<real>0.1</real>
|
||||
<real>0.0</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>stencil</string>
|
||||
<string>vignette</string>
|
||||
<string>add</string>
|
||||
<real>0.0</real>
|
||||
<real>0.4</real>
|
||||
<real>-0.5</real>
|
||||
<real>0.5</real>
|
||||
<real>0.20</real>
|
||||
<real>20.0</real>
|
||||
<real>1.0</real>
|
||||
<real>-1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>1.5</real>
|
||||
<real>5.0</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>colorize</string>
|
||||
|
|
@ -59,11 +52,11 @@
|
|||
<string>vignette</string>
|
||||
<string>add</string>
|
||||
<real>0.0</real>
|
||||
<real>0.5</real>
|
||||
<real>-0.7</real>
|
||||
<real>0.7</real>
|
||||
<real>0.10</real>
|
||||
<real>20.0</real>
|
||||
<real>1.0</real>
|
||||
<real>-1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>5.0</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>colorize</string>
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ LLImageFilter::LLImageFilter(const std::string& file_path) :
|
|||
{
|
||||
// Load filter description from file
|
||||
llifstream filter_xml(file_path);
|
||||
llinfos << "Merov : load filter : " << file_path << llendl;
|
||||
if (filter_xml.is_open())
|
||||
{
|
||||
// Load and parse the file
|
||||
|
|
@ -88,6 +89,7 @@ void LLImageFilter::executeFilter(LLPointer<LLImageRaw> raw_image)
|
|||
{
|
||||
mImage = raw_image;
|
||||
|
||||
llinfos << "Merov : execute filter on image size " << mImage->getWidth() << "x" << mImage->getHeight() << llendl;
|
||||
//std::cout << "Filter : size = " << mFilterData.size() << std::endl;
|
||||
for (S32 i = 0; i < mFilterData.size(); ++i)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
<llsd>
|
||||
<array>
|
||||
<array>
|
||||
<string>linearize</string>
|
||||
<real>0.01</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
</array>
|
||||
</array>
|
||||
</llsd>
|
||||
|
|
@ -0,0 +1,131 @@
|
|||
<llsd>
|
||||
<array>
|
||||
<array>
|
||||
<string>linearize</string>
|
||||
<real>0.01</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>stencil</string>
|
||||
<string>gradient</string>
|
||||
<string>add</string>
|
||||
<real>1.0</real>
|
||||
<real>0.0</real>
|
||||
<real>-1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>-1.0</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>colorize</string>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>0.1</real>
|
||||
<real>0.1</real>
|
||||
<real>0.0</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>stencil</string>
|
||||
<string>vignette</string>
|
||||
<string>add</string>
|
||||
<real>0.0</real>
|
||||
<real>1.0</real>
|
||||
<real>-1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>1.5</real>
|
||||
<real>5.0</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>colorize</string>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>0.6</real>
|
||||
<real>0.0</real>
|
||||
<real>0.0</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>stencil</string>
|
||||
<string>vignette</string>
|
||||
<string>add</string>
|
||||
<real>0.0</real>
|
||||
<real>1.0</real>
|
||||
<real>-1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>5.0</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>colorize</string>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>0.6</real>
|
||||
<real>0.6</real>
|
||||
<real>0.0</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>stencil</string>
|
||||
<string>vignette</string>
|
||||
<string>add</string>
|
||||
<real>0.0</real>
|
||||
<real>0.5</real>
|
||||
<real>0.5</real>
|
||||
<real>-0.5</real>
|
||||
<real>0.10</real>
|
||||
<real>20.0</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>colorize</string>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>0.7</real>
|
||||
<real>0.0</real>
|
||||
<real>0.0</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>stencil</string>
|
||||
<string>vignette</string>
|
||||
<string>add</string>
|
||||
<real>0.0</real>
|
||||
<real>0.5</real>
|
||||
<real>0.6</real>
|
||||
<real>-0.6</real>
|
||||
<real>0.05</real>
|
||||
<real>20.0</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>colorize</string>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>0.7</real>
|
||||
<real>0.0</real>
|
||||
<real>0.0</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>stencil</string>
|
||||
<string>vignette</string>
|
||||
<string>add</string>
|
||||
<real>0.0</real>
|
||||
<real>0.5</real>
|
||||
<real>0.4</real>
|
||||
<real>-0.4</real>
|
||||
<real>0.025</real>
|
||||
<real>20.0</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>colorize</string>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>0.7</real>
|
||||
<real>0.0</real>
|
||||
<real>0.0</real>
|
||||
</array>
|
||||
</array>
|
||||
</llsd>
|
||||
|
|
@ -0,0 +1,118 @@
|
|||
<llsd>
|
||||
<array>
|
||||
<array>
|
||||
<string>linearize</string>
|
||||
<real>0.02</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>contrast</string>
|
||||
<real>1.02</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>saturate</string>
|
||||
<real>1.2</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>stencil</string>
|
||||
<string>vignette</string>
|
||||
<string>blend</string>
|
||||
<real>0.0</real>
|
||||
<real>0.25</real>
|
||||
<real>0.0</real>
|
||||
<real>0.0</real>
|
||||
<real>0.25</real>
|
||||
<real>2.0</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>sharpen</string>
|
||||
</array>
|
||||
<array>
|
||||
<string>stencil</string>
|
||||
<string>gradient</string>
|
||||
<string>blend</string>
|
||||
<real>1.0</real>
|
||||
<real>0.0</real>
|
||||
<real>0.0</real>
|
||||
<real>-1.0</real>
|
||||
<real>0.0</real>
|
||||
<real>-0.25</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>blur</string>
|
||||
</array>
|
||||
<array>
|
||||
<string>blur</string>
|
||||
</array>
|
||||
<array>
|
||||
<string>blur</string>
|
||||
</array>
|
||||
<array>
|
||||
<string>blur</string>
|
||||
</array>
|
||||
<array>
|
||||
<string>blur</string>
|
||||
</array>
|
||||
<array>
|
||||
<string>blur</string>
|
||||
</array>
|
||||
<array>
|
||||
<string>blur</string>
|
||||
</array>
|
||||
<array>
|
||||
<string>blur</string>
|
||||
</array>
|
||||
<array>
|
||||
<string>blur</string>
|
||||
</array>
|
||||
<array>
|
||||
<string>blur</string>
|
||||
</array>
|
||||
<array>
|
||||
<string>stencil</string>
|
||||
<string>gradient</string>
|
||||
<string>blend</string>
|
||||
<real>1.0</real>
|
||||
<real>0.0</real>
|
||||
<real>0.0</real>
|
||||
<real>1.0</real>
|
||||
<real>0.0</real>
|
||||
<real>0.25</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>blur</string>
|
||||
</array>
|
||||
<array>
|
||||
<string>blur</string>
|
||||
</array>
|
||||
<array>
|
||||
<string>blur</string>
|
||||
</array>
|
||||
<array>
|
||||
<string>blur</string>
|
||||
</array>
|
||||
<array>
|
||||
<string>blur</string>
|
||||
</array>
|
||||
<array>
|
||||
<string>blur</string>
|
||||
</array>
|
||||
<array>
|
||||
<string>blur</string>
|
||||
</array>
|
||||
<array>
|
||||
<string>blur</string>
|
||||
</array>
|
||||
<array>
|
||||
<string>blur</string>
|
||||
</array>
|
||||
<array>
|
||||
<string>blur</string>
|
||||
</array>
|
||||
</array>
|
||||
</llsd>
|
||||
|
|
@ -2,47 +2,43 @@
|
|||
<array>
|
||||
<array>
|
||||
<string>linearize</string>
|
||||
<real>0.1</real>
|
||||
<real>0.0</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>contrast</string>
|
||||
<real>0.8</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>saturate</string>
|
||||
<real>1.5</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>stencil</string>
|
||||
<string>vignette</string>
|
||||
<string>fade</string>
|
||||
<real>0.75</real>
|
||||
<real>1.0</real>
|
||||
<string>add</string>
|
||||
<real>0.0</real>
|
||||
<real>0.4</real>
|
||||
<real>0.0</real>
|
||||
<real>0.0</real>
|
||||
<real>1.0</real>
|
||||
<real>5.0</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>saturate</string>
|
||||
<real>0.8</real>
|
||||
<real>2.0</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>contrast</string>
|
||||
<real>1.1</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>brighten</string>
|
||||
<real>0.1</real>
|
||||
<string>stencil</string>
|
||||
<string>vignette</string>
|
||||
<string>add</string>
|
||||
<real>-0.8</real>
|
||||
<real>0.0</real>
|
||||
<real>0.0</real>
|
||||
<real>0.0</real>
|
||||
<real>1.0</real>
|
||||
<real>2.0</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>contrast</string>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,46 @@
|
|||
<llsd>
|
||||
<array>
|
||||
<array>
|
||||
<string>stencil</string>
|
||||
<string>vignette</string>
|
||||
<string>fade</string>
|
||||
<real>0.0</real>
|
||||
<real>1.0</real>
|
||||
<real>0.0</real>
|
||||
<real>0.0</real>
|
||||
<real>1.2</real>
|
||||
<real>3.0</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>linearize</string>
|
||||
<real>0.05</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>grayscale</string>
|
||||
</array>
|
||||
<array>
|
||||
<string>contrast</string>
|
||||
<real>1.1</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>stencil</string>
|
||||
<string>vignette</string>
|
||||
<string>blend</string>
|
||||
<real>1.0</real>
|
||||
<real>0.0</real>
|
||||
<real>0.0</real>
|
||||
<real>0.0</real>
|
||||
<real>0.5</real>
|
||||
<real>2.0</real>
|
||||
</array>
|
||||
<array>
|
||||
<string>blur</string>
|
||||
</array>
|
||||
</array>
|
||||
</llsd>
|
||||
|
|
@ -11268,6 +11268,17 @@
|
|||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>SnapshotFiltersEnabled</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Enable filters in the Snapshot Advanced panel (experimental).</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>SnapshotFormat</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -478,9 +478,6 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshot* floater)
|
|||
previewp->setSnapshotType(shot_type);
|
||||
previewp->setSnapshotFormat(shot_format);
|
||||
previewp->setSnapshotBufferType(layer_type);
|
||||
// Filters
|
||||
//const std::string& filter_name = floater->getChild<LLComboBox>("filters_combobox")->getSimple();
|
||||
//previewp->setFilter(filter_name);
|
||||
}
|
||||
|
||||
LLPanelSnapshot* current_panel = Impl::getActivePanel(floater);
|
||||
|
|
@ -575,8 +572,17 @@ void LLFloaterSnapshot::Impl::onClickFilter(LLUICtrl *ctrl, void* data)
|
|||
LLFloaterSnapshot *view = (LLFloaterSnapshot *)data;
|
||||
if (view)
|
||||
{
|
||||
checkAutoSnapshot(getPreviewView(view));
|
||||
updateControls(view);
|
||||
LLSnapshotLivePreview* previewp = getPreviewView(view);
|
||||
if (previewp)
|
||||
{
|
||||
checkAutoSnapshot(previewp);
|
||||
// Note : index 0 of the filter drop down is assumed to be "No filter" in whichever locale
|
||||
LLComboBox* filterbox = static_cast<LLComboBox *>(view->getChild<LLComboBox>("filters_combobox"));
|
||||
std::string filter_name = (filterbox->getCurrentIndex() ? filterbox->getSimple() : "");
|
||||
previewp->setFilter(filter_name);
|
||||
previewp->updateSnapshot(FALSE, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1078,16 +1084,25 @@ BOOL LLFloaterSnapshot::postBuild()
|
|||
getChild<LLUICtrl>("auto_snapshot_check")->setValue(gSavedSettings.getBOOL("AutoSnapshot"));
|
||||
childSetCommitCallback("auto_snapshot_check", Impl::onClickAutoSnap, this);
|
||||
|
||||
// Update filter list
|
||||
//std::vector<std::string> filter_list = LLImageFiltersManager::getInstance()->getFiltersList();
|
||||
//LLComboBox* filterbox = getChild<LLComboBox>("filters_combobox");
|
||||
//for (U32 i = 0; i < filter_list.size(); i++)
|
||||
//{
|
||||
// filterbox->add(filter_list[i]);
|
||||
//}
|
||||
//childSetCommitCallback("filters_combobox", Impl::onClickFilter, this);
|
||||
// Filters
|
||||
LLComboBox* filterbox = getChild<LLComboBox>("filters_combobox");
|
||||
if (gSavedSettings.getBOOL("SnapshotFiltersEnabled"))
|
||||
{
|
||||
// Update filter list if setting is on (experimental)
|
||||
std::vector<std::string> filter_list = LLImageFiltersManager::getInstance()->getFiltersList();
|
||||
for (U32 i = 0; i < filter_list.size(); i++)
|
||||
{
|
||||
filterbox->add(filter_list[i]);
|
||||
}
|
||||
childSetCommitCallback("filters_combobox", Impl::onClickFilter, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Hide Filter UI if setting is off (default)
|
||||
getChild<LLUICtrl>("filter_list_label")->setVisible(FALSE);
|
||||
filterbox->setVisible(FALSE);
|
||||
}
|
||||
|
||||
|
||||
LLWebProfile::setImageUploadResultCallback(boost::bind(&LLFloaterSnapshot::Impl::onSnapshotUploadFinished, _1));
|
||||
LLPostCard::setPostResultCallback(boost::bind(&LLFloaterSnapshot::Impl::onSendingPostcardFinished, _1));
|
||||
|
||||
|
|
|
|||
|
|
@ -381,7 +381,6 @@
|
|||
top_pad="8"
|
||||
width="180"
|
||||
name="auto_snapshot_check" />
|
||||
<!-- If we ever want to add filters to the snapshot panel...
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
|
|
@ -389,7 +388,7 @@
|
|||
height="13"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="layer_type_label"
|
||||
name="filter_list_label"
|
||||
top_pad="10"
|
||||
width="50">
|
||||
Filter:
|
||||
|
|
@ -408,6 +407,5 @@
|
|||
name="NoFilter"
|
||||
value="NoFilter" />
|
||||
</combo_box>
|
||||
-->
|
||||
</panel>
|
||||
</floater>
|
||||
|
|
|
|||
|
|
@ -171,16 +171,17 @@ Please try logging in again in a minute.</string>
|
|||
<!-- SLShare: User Friendly Filter Names Translation -->
|
||||
<string name="BlackAndWhite">Black & White</string>
|
||||
<string name="Colors1970">1970's Colors</string>
|
||||
<string name="Heatwave">Heat Wave</string>
|
||||
<string name="Intense">Intense</string>
|
||||
<string name="JulesVerne">Jules Verne</string>
|
||||
<string name="Newspaper">Newspaper</string>
|
||||
<string name="Overcast">Overcast</string>
|
||||
<string name="Newspaper">Newsprint</string>
|
||||
<string name="Sepia">Sepia</string>
|
||||
<string name="Spotlight">Spotlight</string>
|
||||
<string name="Video">Video</string>
|
||||
|
||||
<!-- Tooltip -->
|
||||
<string name="Autocontrast">Autocontrast</string>
|
||||
<string name="LensFlare">Lens Flare</string>
|
||||
<string name="Miniature">Miniature</string>
|
||||
<string name="Toycamera">Toy Camera</string>
|
||||
|
||||
<!-- Tooltip -->
|
||||
<string name="TooltipPerson">Person</string><!-- Object under mouse pointer is an avatar -->
|
||||
<string name="TooltipNoName">(no name)</string> <!-- No name on an object -->
|
||||
<string name="TooltipOwner">Owner:</string> <!-- Owner name follows -->
|
||||
|
|
|
|||
Loading…
Reference in New Issue