Skip to content

Commit

Permalink
Fix error when opening material
Browse files Browse the repository at this point in the history
  • Loading branch information
pudingus committed Aug 5, 2021
1 parent 73301f5 commit 4f834e6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion scripts/max4ds/init.ms
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
local set_heapsize = 64 * 1024 * 1024 --64 MiB
if heapsize < set_heapsize then heapsize = set_heapsize

global Max4ds_version = "v0.8.0"
global Max4ds_version = "v0.8.1"
--global Max4ds_scriptsPath = getFilenamePath (getThisScriptFilename())

fn DisableScript file = (
Expand Down
14 changes: 9 additions & 5 deletions scripts/max4ds/material.ms
Original file line number Diff line number Diff line change
Expand Up @@ -417,11 +417,15 @@ remap:#(
grpDiffuse.width = rltParams.width - 16
grpEnv.width = rltParams.width - 16
grpAlpha.width = rltParams.width - 16
grpAnim.width = rltParams.width - 16
btnDiffuseMap.width = rltParams.width - btnDiffuseMap.pos.x - 16
btnEnvMap.width = rltParams.width - btnEnvMap.pos.x - 16
btnAlphaMap.width = rltParams.width - btnAlphaMap.pos.x - 16
ddlEnvType.width = rltParams.width - ddlEnvType.pos.x - 16
grpAnim.width = rltParams.width - 16

local maxver = (maxVersion())[1]
if maxVer >= 21000 do (
btnDiffuseMap.width = rltParams.width - btnDiffuseMap.pos.x - 16
btnEnvMap.width = rltParams.width - btnEnvMap.pos.x - 16
btnAlphaMap.width = rltParams.width - btnAlphaMap.pos.x - 16
ddlEnvType.width = rltParams.width - ddlEnvType.pos.x - 16
)

::mat4ds_disable_set = undefined
--format "on open\n"
Expand Down

0 comments on commit 4f834e6

Please sign in to comment.