Skip to content

Commit

Permalink
Fix mirror transformation
Browse files Browse the repository at this point in the history
  • Loading branch information
pudingus committed Oct 30, 2020
1 parent 587e462 commit 4e618f7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions scripts/max4ds/4ds_export.ms
Original file line number Diff line number Diff line change
Expand Up @@ -1037,9 +1037,10 @@ rollout MafiaTools_4dsExport "" ( --module
local dmin = in coordsys local volume.min
local dmax = in coordsys local volume.max
local boxsize = util.ToBoxsize dmin dmax
boxsize = (boxsize * unitscl) / 2
local mtr = volume.transform
local s = scaleMatrix (mtr.scalepart * boxsize)
local mult = (boxsize * unitscl) / 2

local mtr = volume.transform * inverse basenode.transform
local s = scaleMatrix (mtr.scalepart * mult)
local r = mtr.rotationpart as matrix3
local t = transMatrix (mtr.translationpart * unitscl)
mirr.matrix = s * r * t
Expand Down Expand Up @@ -1493,7 +1494,7 @@ rollout MafiaTools_4dsExport "" ( --module
else if isKindOf obj Glow4ds then (
#glow
)
else if matchPattern obj.name pattern:"$volume*" then (
else if matchPattern obj.name pattern:"$volume*" or matchPattern obj.name pattern:"$viewbox*" then (
#volume
)
else if isKindOf obj Dummy then (
Expand Down

0 comments on commit 4e618f7

Please sign in to comment.