From 653cf048dc8abc0d7c2e34024caca43b93a0fea8 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sat, 16 Nov 2024 19:07:53 -0500 Subject: [PATCH] Silence overzealous Python File component errors. These errors really only make sense if the artist has actually set something. If the field is blank, don't warn about what they specified not being found. That doesn't even make sense! --- Sources/MaxPlugin/MaxComponent/plPythonFileComponent.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/MaxPlugin/MaxComponent/plPythonFileComponent.cpp b/Sources/MaxPlugin/MaxComponent/plPythonFileComponent.cpp index aa37845a20..5fb9cb7a3c 100644 --- a/Sources/MaxPlugin/MaxComponent/plPythonFileComponent.cpp +++ b/Sources/MaxPlugin/MaxComponent/plPythonFileComponent.cpp @@ -483,7 +483,7 @@ bool plPythonFileComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) found_atleast_one_good_one = true; } } - if ( !found_atleast_one_good_one ) + if ( !found_atleast_one_good_one && numKeys > 0 ) { pErrMsg->Set( true, @@ -517,7 +517,7 @@ bool plPythonFileComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) found_atleast_one_good_one = true; } } - if ( !found_atleast_one_good_one ) + if ( !found_atleast_one_good_one && comp->NumTargets() > 0 ) { pErrMsg->Set( true, @@ -904,7 +904,7 @@ bool plPythonFileComponent::Convert(plMaxNode *node, plErrorMsg *pErrMsg) } } } - if ( number_of_real_targets_found != 1 ) + if ( number_of_real_targets_found != 1 && count > 0 ) { // there is zero or more than one node attached to this exclude region ST::string msg;