Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions source/mrviewerpy/MRPythonUiInteraction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ namespace
return ret;
}

static std::string pathToString( const std::vector<std::string>& path )
static std::string stringVectorToString( const std::vector<std::string>& path )
{
std::string pathString;
for ( const auto & s : path )
Expand All @@ -109,7 +109,7 @@ namespace
{
if ( path.empty() )
throw std::runtime_error( "pressButton: empty path not allowed here." );
const std::string pathString = pathToString( path );
const std::string pathString = stringVectorToString( path );
MR::CommandLoop::runCommandFromGUIThread( [&]
{
spdlog::info( "pressButton {}: frame {}", pathString, MR::getViewerInstance().getTotalFrames() );
Expand Down Expand Up @@ -229,7 +229,7 @@ namespace
if ( path.empty() )
throw std::runtime_error( "writeValue: empty path not allowed here." );

const std::string pathString = pathToString( path );
const std::string pathString = stringVectorToString( path );
spdlog::info( "writeValue {} = {}, frame {}", pathString, value, MR::getViewerInstance().getTotalFrames() );

MR::pythonAppendOrRun( [&]
Expand All @@ -249,7 +249,7 @@ namespace
if constexpr ( std::is_same_v<U, std::string> )
{
if ( target.allowedValues && std::find( target.allowedValues->begin(), target.allowedValues->end(), fixedValue ) == target.allowedValues->end() )
throw std::runtime_error( fmt::format( "writeValue {}: this string is not in the allowed list.", pathString ) );
throw std::runtime_error( fmt::format( "writeValue {}: string `{}` is not allowed here. Allowew values: {}.", pathString, fixedValue, stringVectorToString( *target.allowedValues ) ) );
}
else
{
Expand Down
Loading