Commit f226be14 authored by Harmonikater's avatar Harmonikater
Browse files
parents 73cb21ad f624677f
Pipeline #4347 failed with stage
in 41 seconds
pack:
script:
- echo
artifacts:
name: "BF2-3dsMax-Tools"
expire_in: 1 week
paths:
- "scripts/"
- "plugins/"
- "materiallibraries/"
- "maps/"
- "docs/"
- "readme.md"
- "changelog.txt"
......@@ -13,9 +13,8 @@ If 3ds Max 2013 or older is used during lightmapping, [python2](https://www.pyth
### Option 1: Manual extraction
~~Download [this Archive]() and extract it to the main 3ds Max folder (e.g. "C:\Program Files\3ds Max 2019\")~~
GitLab doesn't honor the LFS pointers yet, so don't use the "download zip" button on this page yet.
A properly packed .zip link will be provided here asap.
Download [this Archive](https://git.cmp-gaming.com/Harmonikater/BF2-3dsMax-Tools/-/jobs/artifacts/master/download?job=pack) and extract it to the main 3ds Max folder (e.g. "C:\Program Files\3ds Max 2019\")
Note: GitLab doesn't honor LFS pointers, so don't use the _Download source code_ button (next to the _Clone_ button).
### Option 2: Using git clone
......
......@@ -2,7 +2,7 @@
-- Version 1.0.0
-- Copyright Martijn Buijs, 2008
-- http://www.bytehazard.com
g_bf2doInclude "general/misc.ms"
-- clean up
clearlistener()
......@@ -173,7 +173,7 @@ rollout rImport "ColMesh Importer"
(
group "Import"
(
spinner spnImpScale "Scale " range:[0.001,1000.0,10.0]
--spinner spnImpScale "Scale " range:[0.001,1000.0,10.0]
button cmdImport "Import..." width: 140
)
on cmdImport pressed do
......@@ -187,7 +187,7 @@ rollout rImport "ColMesh Importer"
)
-- copy values
impscale = spnImpScale.value
impscale = 1.0/BF2_GetUnitMultiplier()
-- import
try (
......
This diff is collapsed.
-- ColMesh Importer
-- Copyright Martijn Buijs, 2008
-- http://www.bytehazard.com
-- clean up
clearlistener()
global cmImp
if cmImp != undefined do
(
closeRolloutFloater cmImp
)
g_bf2doInclude "general/misc.ms"
-- globals
global impscale
......@@ -110,7 +101,7 @@ fn ReadGeomCol fp fileversion =
-- reads geom subs
fn ReadGeomSub fp fileversion geomnode =
fn ReadGeomSub fp fileversion geompart =
(
-- number of geom cols (4 bytes)
local colnum = ReadLong fp
......@@ -121,7 +112,7 @@ fn ReadGeomSub fp fileversion geomnode =
-- create dummy
local nonvisroot = Dummy()
nonvisroot.name = "nonvis_"
nonvisroot.parent = geomnode
nonvisroot.parent = geompart
-- col data
for j=1 to colnum do
......@@ -160,8 +151,7 @@ fn ImportColMesh filename =
local meshname = getFilenameFile filename
-- create root node
local rootnode = Dummy()
rootnode.name = "root_" + meshname
local rootnode = bf2Utils.makeL -1 ("root_bundledmesh_" + meshname)
-- file info (8 bytes)
local head = ReadLong fp
......@@ -169,13 +159,38 @@ fn ImportColMesh filename =
-- chunknum (4 bytes)
local geomnum = ReadLong fp
-- create the geoms
local geom0 = bf2Utils.makeT rootnode "geom0"
local geom0lod0 = bf2Utils.makeT geom0 "lod0"
local geom1 = bf2Utils.makeT rootnode "geom1"
local geom1lod0 = bf2Utils.makeT geom1 "lod0"
local geom2 = bf2Utils.makeT rootnode "geom2"
local geom2lod0 = bf2Utils.makeT geom2 "lod0"
-- geoms (? bytest)
for i=1 to geomnum do
for i=0 to geomnum - 1 do
(
local geomnode = Dummy()
geomnode.name = "geom" + ((i-1) as string)
geomnode.parent = rootnode
local partNumber
if i < 10 then
partNumber = "0" + (i as string)
else
partNumber = i as string
local geom0Part = bf2Utils.makeB geom0lod0 ("part_" + partNumber)
--geom0Part.Scale = [0.1,0.1,0.1]
local geom1Part = bf2Utils.makeB geom1lod0 ("part_" + partNumber)
--geom1Part.Scale = [0.1,0.1,0.1]
local geom2Part = bf2Utils.makeB geom2lod0 ("part_" + partNumber)
--geom2Part.Scale = [0.1,0.1,0.1]
-- subgeomnum (4 bytes)
local subgeomnum = ReadLong fp
......@@ -183,7 +198,18 @@ fn ImportColMesh filename =
-- subgeoms (? bytes)
for j=1 to subgeomnum do
(
ReadGeomSub fp fileversion geomnode
if j == 1 do
(
ReadGeomSub fp fileversion geom0part
)
if j == 2 do
(
ReadGeomSub fp fileversion geom1part
)
if j == 3 do
(
ReadGeomSub fp fileversion geom2part
)
)
)
......@@ -193,48 +219,15 @@ fn ImportColMesh filename =
return true
)
-- GUI
rollout rImport "ColMesh Importer"
fn bf2ColImport=
(
group "Import"
(
spinner spnImpScale "Scale " range:[0.001,1000.0,10.0]
button cmdImport "Import..." width: 140
)
on cmdImport pressed do
(
-- open file dialog
filename = getOpenFileName caption:"Import File" types:"Collision Mesh (*.collisionmesh)|*.collisionmesh|All Files (*.*)|*.*"
if filename == undefined then
(
return false
)
-- copy values
impscale = spnImpScale.value
-- import
try (
ImportColMesh filename
) catch (
messagebox "Failed, please let [FH]Remdul know!\nMail to: martijn@bytehazard.com"
)
)
)
filename = getOpenFileName caption:"Import File" types:"Collision Mesh (*.collisionmesh)|*.collisionmesh|All Files (*.*)|*.*"
if filename == undefined then
(
return false
)
rollout rAbout "About"
(
label lab1 "BF2 ColMesh Importer"
label lab2 "Version 1.2.0"
label lab3 "Copyright Martijn Buijs, 2008"
impscale = 1.0/BF2_GetUnitMultiplier()
ImportColMesh filename
)
-- floater
cmImp = newRolloutFloater "ColMesh Importer" 180 130
addRollout rImport cmImp
addRollout rAbout cmImp rolledup:true
-- END OF FILE
\ No newline at end of file
......@@ -18,6 +18,7 @@
g_bf2doInclude "util/makeLods.ms"
g_bf2doInclude "meshcheck.ms"
g_bf2doInclude "objexp.ms"
g_bf2doInclude "colmeshimp.ms"
fn bf2FixImagePaths_1 =
(
......@@ -154,7 +155,7 @@ rollout rollpoe2Utils "PoE2 - Utilities" width:470 height:570
)
on btnColMesImp pressed do
(
g_bf2doInclude "colmeshimp.ms"
bf2ColImport()
)
on btnSknImp pressed do
(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment