Skip to content

Commit

Permalink
Add more knob load filter
Browse files Browse the repository at this point in the history
  • Loading branch information
MrKepzie committed Jul 12, 2017
1 parent f526b42 commit 448f477
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Engine/KnobSerialization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,13 @@ endsWith(const std::string &str,
return ( ( str.size() >= suffix.size() ) &&
(str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0) );
}

#if 0
static bool
containsString(const std::string& str, const std::string& substring)
{
return str.find(substring) != std::string::npos;
}
#endif

static bool
equalsStringCaseSensitive(const std::string& str1, const std::string& str2)
Expand Down Expand Up @@ -637,6 +638,9 @@ class KnobChoiceOptionFilters
addKnobFilter(f, "outputChannels", equalsStringCaseSensitive);
addKnobFilter(f, "channels", endsWith);
setNatronVersionMax(f, 2, 2, 99);
addOptionFilter(f, "RGBA", equalsStringCaseInsensitive);
addOptionFilter(f, "RGB", equalsStringCaseInsensitive);
addOptionFilter(f, "Alpha", equalsStringCaseInsensitive);
addOptionFilter(f, "Color.RGBA", equalsStringCaseInsensitive);
addOptionFilter(f, "Color.RGB", equalsStringCaseInsensitive);
addOptionFilter(f, "Color.Alpha", equalsStringCaseInsensitive);
Expand Down

0 comments on commit 448f477

Please sign in to comment.