Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Harmonikater
BF2-3dsMax-Tools
Commits
44d6fbcf
Commit
44d6fbcf
authored
Aug 25, 2020
by
Harmonikater
Browse files
Update scripts/bf2/_settings/StaticObjects_Import.ms, scripts/bf2/alternate_Mesh_Import.ms files
parent
d6c5d17d
Pipeline
#5120
passed with stage
in 31 seconds
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
scripts/bf2/_settings/StaticObjects_Import.ms
View file @
44d6fbcf
...
...
@@ -30,7 +30,11 @@ global g_bf2Level_IncludeDummies = #( \
"e_sAmb_wreckfire",
"glow"
)
-- Meshes that are always to be loaded two-sided, e.g. underground bunkers without fake terrain
global g_bf2Level_ForceTwoSided = #( \
"command_underground"
)
-- Textures to be replaced during import for lightmapping, 1st value original, 2nd value replacement, 3rd value to force alpha on mesh
global g_bf2Level_ReplaceTextures = #( \
...
...
scripts/bf2/alternate_Mesh_Import.ms
View file @
44d6fbcf
...
...
@@ -1199,6 +1199,15 @@ fn alternate_meshImport fname lightmapInt s =
local combinedMats = Multimaterial numsubs:(allBF2Mats.count) name:"BF2Material"
local hasRealMat = false
local hasForcedAlpha = false
local forceTwoSided = false
if (lightmapInt == 1) and (g_bf2Level_ForceTwoSided != undefined) do
(
for testName in g_bf2Level_ForceTwoSided do
(
pattern = "*" + testName + ".*mesh"
if matchPattern fname pattern:pattern do forceTwoSided = True
)
)
for m=1 to allBF2Mats.count do
(
if allBF2Mats[m] != undefined do
...
...
@@ -1268,7 +1277,7 @@ fn alternate_meshImport fname lightmapInt s =
(
mat.diffuse = (color 230 230 230)
mat.ambient = (color 230 230 230)
if hasForcedAlpha do mat.twoSided = on
if hasForcedAlpha
or forceTwoSided
do mat.twoSided = on
)
else
(
...
...
@@ -1277,7 +1286,17 @@ fn alternate_meshImport fname lightmapInt s =
)
)
if hasRealMat do for obj in allMeshes do obj.material = combinedMats
if hasRealMat then
(
for obj in allMeshes do obj.material = combinedMats
)
else
(
if forceTwoSided then
(
for obj in allMeshes do obj.material = StandardMaterial diffuse:(color 230 230 230) ambient:(color 230 230 230) twoSided:on
)
)
return rootHelper
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment