Skip to content

Commit

Permalink
Merge pull request #1634 from Hoikas/fix_overzealous_python_convert_e…
Browse files Browse the repository at this point in the history
…rrors

Silence overzealous Python File component errors.
  • Loading branch information
Hoikas authored Nov 17, 2024
2 parents 5cdc425 + 653cf04 commit b396c20
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/MaxPlugin/MaxComponent/plPythonFileComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit b396c20

Please sign in to comment.