Skip to content

Commit

Permalink
handle the type change in MaxCompat instead
Browse files Browse the repository at this point in the history
  • Loading branch information
jfmherokiller committed Nov 30, 2023
1 parent f0977ad commit 04b00a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 0 additions & 4 deletions Sources/Tools/MaxConvert/hsControlConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,7 @@ class KRStatus : public KeyReduceStatus
{
void Init(int total) override { }

#if MAX_VERSION_MAJOR >= 23
KeyReduceResult Progress(int p) override { return KEYREDUCE_CONTINUE; }
#else
int Progress(int p) override { return KEYREDUCE_CONTINUE; }
#endif
};

void hsControlConverter::ReduceKeys(Control *control, float threshold)
Expand Down
3 changes: 3 additions & 0 deletions Sources/Tools/MaxMain/MaxCompat.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,12 @@ class plMaxObject : public plMaxAnimatable<T>
// Old versions of Max define this as an integer, not a Class_ID
#define XREFOBJ_COMPAT_CLASS_ID Class_ID(0x92aab38c, 0)
// This definition is removed in later versions of the sdk
// In newer versions of the sdk Progress returns an enum value of KeyReduceResult
#if MAX_VERSION_MAJOR < 24
# define BIPDRIVEN_CONTROL_CLASS_ID BIPSLAVE_CONTROL_CLASS_ID
using KeyReduceResult = int;
#endif

// Special 3ds Max message box support added in 2021 for HiDPI
#if MAX_VERSION_MAJOR >= 23
# define plMaxMessageBox MaxSDK::MaxMessageBox
Expand Down

0 comments on commit 04b00a6

Please sign in to comment.