Skip to content

Commit

Permalink
Merge pull request H-uru#1532 from jfmherokiller/max-2024-fixes
Browse files Browse the repository at this point in the history
max 2024 fixes
  • Loading branch information
Hoikas authored Dec 2, 2023
2 parents 6491a18 + 12997f4 commit 3285654
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ jobs:
- { sdk-version: 2017, generator: Visual Studio 16 2019, arch: x64, str: windows-x64 }
- { sdk-version: 2019, generator: Visual Studio 16 2019, arch: x64, str: windows-x64 }
- { sdk-version: 2020, generator: Visual Studio 16 2019, arch: x64, str: windows-x64 }
- { sdk-version: 2023, generator: Visual Studio 16 2019, arch: x64, str: windows-x64 }
- { sdk-version: 2024, generator: Visual Studio 16 2019, arch: x64, str: windows-x64 }

steps:
- name: Checkout Plasma
Expand Down
2 changes: 1 addition & 1 deletion Sources/Tools/MaxComponent/plBipedKiller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ bool HasBipController(INode* node)
if (!node)
return false;
Control* c = node->GetTMController();
if (c && ((c->ClassID()== BIPSLAVE_CONTROL_CLASS_ID) ||
if (c && ((c->ClassID()== BIPDRIVEN_CONTROL_CLASS_ID) ||
(c->ClassID()== BIPBODY_CONTROL_CLASS_ID) ||
(c->ClassID()== FOOTPRINT_CLASS_ID)) )
return true;
Expand Down
3 changes: 2 additions & 1 deletion Sources/Tools/MaxConvert/hsControlConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ void hsControlConverter::DeInit()
class KRStatus : public KeyReduceStatus
{
void Init(int total) override { }
int Progress(int p) override { return KEYREDUCE_CONTINUE; }

KeyReduceResult Progress(int p) override { return KEYREDUCE_CONTINUE; }
};

void hsControlConverter::ReduceKeys(Control *control, float threshold)
Expand Down
6 changes: 5 additions & 1 deletion Sources/Tools/MaxConvert/plMaxLightContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,11 @@ class plMaxLightContext : public ShadeContext
void DPdUVW(Point3 dP[3],int channel=0) override { dP[0] = dP[1] = dP[2] = Point3(0,0,0); } // Bump vectors for UVW (camera space)

void GetBGColor(Color &bgcol, Color& transp, BOOL fogBG=TRUE) override { bgcol.Black(); transp.Black(); } // returns Background color, bg transparency

// these became virtual in 2023
#if MAX_VERSION_MAJOR >= 26
Matrix3 MatrixTo(RefFrame ito) override { return Matrix3::Identity; }
Matrix3 MatrixFrom(RefFrame ifrom) override { return Matrix3::Identity; }
#endif
Point3 PointTo(const Point3& p, RefFrame ito) override { return p; }
Point3 PointFrom(const Point3& p, RefFrame ifrom) override { return p; }
Point3 VectorTo(const Point3& p, RefFrame ito) override { return p; }
Expand Down
6 changes: 6 additions & 0 deletions Sources/Tools/MaxMain/MaxCompat.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,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 <= 25
# 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
Expand Down
2 changes: 2 additions & 0 deletions cmake/Find3dsm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ if(WIN32)
# Of course, 32-bit 2013 is basically impossible to find. Oh well.
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(_3dsm_PATH_HINTS
ENV ADSK_3DSMAX_SDK_2024
ENV ADSK_3DSMAX_SDK_2023
ENV ADSK_3DSMAX_SDK_2022
ENV ADSK_3DSMAX_SDK_2021
ENV ADSK_3DSMAX_SDK_2020
Expand Down

0 comments on commit 3285654

Please sign in to comment.