Skip to content

Commit

Permalink
Silence overzealous Python File component errors.
Browse files Browse the repository at this point in the history
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!
  • Loading branch information
Hoikas committed Nov 17, 2024
1 parent 5cdc425 commit 653cf04
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 653cf04

Please sign in to comment.