-
Notifications
You must be signed in to change notification settings - Fork 0
Collisions Exporter Addon
NOTE: Please note that this will not work on any version below 2.8!
-
Run Blender in Administrator Mode (Only for installation)
-
Edit -> Preferences -> Add-ons
-
On the top of the window, click on
Install...
-
Select the "mts_collision_group_exporter.py" file and click install
-
Once installed, when it shows you the installed addon, click the checkmark and expand the panel.
-
At the bottom of the panel click on
Install Dependencies
. This will install a python modulejson5
to export.json
files that have comments in them.
Create a cube
Go to Properties Panel -> Scene Properties -> MTS/IV Collision Groups
Inside the panel click on the +
button to add a collision group.
You can rename the collision group and adjust it's properties with the new options that have appeared below. You can also view and remove the collision boxes that are assigned to this collision group.
With the cube selected, created in the set up step, go to Properties Panel -> Object Properties -> MTS/IV Collision Properties
Use the various input boxes to adjust the collision box properties.
After this there are two ways to set the sizing of the collision box(s).
Scale the cube to your liking.
Automatic Subdivision | Manual Subdivision |
---|---|
If the X and Y dimensions are not the same, the box will automatically be divided into boxes the size of whichever side is shorter. | Scale the cube to cover the area you want. Set the subdivision width and height to divide the cube into multiple collision boxes, of the provided height and/or width, that span the covered area. |
If you want the boxes to be on a diagonal, rotate the cube in the desired direction IN OBJECT MODE (NOT EDIT MODE)
There are three locations where the import and export buttons can be found:
-
File -> Import/Export ->
MTS/IV Instruments (.json)
-
Numbers Panel (Open with N key) ->
MTS/IV Tab
->MTS/IV Instrument Tools
->Import/Export Instruments
-
Properties Panel -> Object Properties ->
MTS/IV Instrument Properties
->Import/Export Instruments
-
This opens up the file browser. Navigate to the the json you want to import. This json must include the
collisionGroups
section. -
Click on "Import Collisions" or hit enter.
-
This will create collision groups and collision boxes with the provided transforms and HUD positions.
-
Clicking on the export button will open the file browser. Navigate to the save location and enter the file name.
-
Click on "Export Collisions" or hit enter.