Skip to content

Commit

Permalink
add better help for changing settings on the command-line
Browse files Browse the repository at this point in the history
see #779
  • Loading branch information
devernay committed Jun 18, 2022
1 parent fc8aa0f commit 26c4760
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Engine/CLArgs.cpp
Expand Up @@ -319,9 +319,11 @@ CLArgs::printUsage(const std::string& programName)
" --no-settings\n"
" When passed on the command-line, the %1 settings will not be restored\n"
" from the preferences file on disk so that %1 uses the default ones.\n"
" --settings name=value\n"
" --setting name=value\n"
" Sets the named %1 setting to the given value. This is done after loading\n"
" the settings and prior to executing Python commands or loading the project.\n"
" For choice settings, the value may be an integer index for the option, or\n"
" a quoted string, as in: --setting enableOpenGLRendering=\\\"enabled\\\"\n"
" -c [ --cmd ] \"PythonCommand\"\n"
" Execute custom Python code passed as a script prior to executing the Python\n"
" script or loading the project passed as parameter. This option may be used\n"
Expand Down
3 changes: 2 additions & 1 deletion Engine/PyParameter.cpp
Expand Up @@ -1665,7 +1665,8 @@ ChoiceParam::set(const QString& label)
return;
}
std::string choiceID = label.toStdString();
if (knob->getHolder()->getApp()->isCreatingPythonGroup()) {
AppInstancePtr app = knob->getHolder()->getApp();
if (app && app->isCreatingPythonGroup()) {
// Before Natron 2.2.3, all dynamic choice parameters for multiplane had a string parameter.
// The string parameter had the same name as the choice parameter plus "Choice" appended.
// If we found such a parameter, retrieve the string from it.
Expand Down

0 comments on commit 26c4760

Please sign in to comment.