|
1 | | -# Blender plugin for Import|Export OpenBVE *.csv objects |
| 1 | +[Japanese](README-ja.md) |
2 | 2 |
|
3 | | -## 1. Installation guide |
4 | | - |
5 | | -* Donwload last release of plugin from [Releases section](https://github.com/maisvendoo/blenderCSV/releases) |
6 | | -* Open Blender, go from main menu by path File -> User Preferences -> Add-ons |
7 | | -* Select "Install add-on from file" |
8 | | - |
9 | | - |
10 | | - |
11 | | -* Choose plugin zip-archive in your filesystem |
| 3 | +# Blender plugin for Import|Export OpenBVE \*.csv objects |
12 | 4 |
|
13 | | - |
| 5 | +This plugin only works on Blender 2.79. **Please note that it will NOT work on 2.80.** |
14 | 6 |
|
15 | | -* Select checkbox for addon activation |
16 | | - |
17 | | - |
18 | | - |
19 | | -* Press "Save user setting" for apply changes to next start of Blender |
| 7 | +## 1. Installation guide |
20 | 8 |
|
| 9 | +1. Please download from [Releases section](https://github.com/maisvendoo/blenderCSV/releases) the newest release. |
| 10 | +2. Open Blender, and choose File -> User Preferences... -> Add-ons from main menu. |
| 11 | +3. Choose "Install Add-on from File...". |
| 12 | + |
| 13 | +4. Choose plugins zip file. |
| 14 | + |
| 15 | +5. To enable the plugin, turn on the checkbox. |
| 16 | + |
| 17 | +6. To enabled the setting, press "Save User Settings", and restart Blender. |
21 | 18 | ## 2. Using plugin |
| 19 | +### 2.1 Import \*.csv model file to Blender |
22 | 20 |
|
23 | | -### 2.1. Import *.csv to blender |
24 | | - |
25 | | -Now, you can import any csv model into Blender workspace. Go to menu File -> Import -> OpenBVE *.csv model |
26 | | - |
27 | | - |
28 | | - |
29 | | -and open your model from filesystem. |
30 | | - |
31 | | - |
32 | | - |
33 | | -In import settings, you can choose option for model transformation from OpenBVE left hand coordinate system to Blender right hand coordinate system |
34 | | - |
35 | | - |
36 | | - |
37 | | -This setting enable by default, but you can disabled it |
| 21 | +1. Choose File -> Import -> OpenBVE CSV model (\*.csv) from main menu. |
| 22 | +  |
38 | 23 |
|
39 | | - |
| 24 | +2. Select import options. |
40 | 25 |
|
41 | | -### 2.2. Export from Blender to *.csv |
| 26 | +  |
42 | 27 |
|
43 | | -1. Select your model in Blender and switch to **Object Mode** |
| 28 | + - *Set logging Level*: select threshold level for the log file. The default setting is "INFO". |
| 29 | + - *Transform coordinates*: If you want to change OpenBVE 's Left-handed coordinate system to Blender's Right-handed coordinate system, check this option. The default is enable. |
| 30 | + - *Split AddFace2:* If this option is enabled, AddFace2's double-sided is split to an each face. After split, each faces Material's AddFace2 option is turn off automatically. |
44 | 31 |
|
45 | | - |
| 32 | +3. After choose the \*.csv model from filesystem, press the "OpenBVE model (\*.csv)" button, then import the model. |
| 33 | +  |
46 | 34 |
|
47 | | -2. Select menu item File -> Export -> OpenBVE *.csv model |
48 | | -3. Choose export options |
| 35 | + If you are turn off the *Transform coordinates* option, the imported model is as shown below. |
| 36 | +  |
49 | 37 |
|
50 | | - |
| 38 | +### 2.2 Exporting from Blender to \*.csv model file |
51 | 39 |
|
52 | | -* Transform coordinate system - conversion to OpenBVE left hand coordinates. It option enabled by default |
53 | | -* Use Face2 command - all face generation commands will be present in CSV as AddFace2 |
54 | | -* Use decale transparent color - set components for decale color |
| 40 | +1. Before the choose export object, **you must change mode to "Object Mode"**. After changed, you can choose export object(s). |
| 41 | +  |
| 42 | +2. Choose File -> Export -> OpenBVE CSV model (\*.csv) from main menu. |
| 43 | +3. Choose export options. |
55 | 44 |
|
56 | | -**Attantion!** In current version decale color applied to all meshes in model |
| 45 | +  |
57 | 46 |
|
58 | | -* Copy textures in separated folder - all textures will copired to separated folder, which will created near CSV file and will has name *model file name-textures* |
| 47 | + - *Set logging Level*: select threshold level for the log file. The default setting is "INFO". |
| 48 | + - *Transform coordinates*: If you want to change Blender's Right-handed coordinate system to OpenBVE 's Left-handed coordinate system, check this option. The default is enable. |
| 49 | + - *Set global scale*: Set the scale factor. The default value is 1.0. |
| 50 | + - *Output Normals*: If you want to export add normals, check this option. The default is enable. |
| 51 | + - *Copy textures in separated folder*: All texture files are copy to the new folder. the new folder is the same folder level, and folder name is 'model name'-textures. This option is enable by default. |
| 52 | +4. |
| 53 | + After choose the \*.csv model from filesystem, press the "OpenBVE model (\*.csv)" button, then export the model. |
| 54 | + |
| 55 | +5. Check the export result by the ObjectViewer of OpenBVE. |
| 56 | +  |
| 57 | +## 3. The specific attributes for OpenBVE |
| 58 | +At the Additional properties for CSV mesh, you can be assigns the specific attributes for OpenBVE. |
59 | 59 |
|
60 | | -* Press button "OpenBVE model (*.csv)" to export |
61 | | -* Check result in OpenBVE ObjectViewer |
| 60 | +**NOTE: These specific attributes are not reflected to the Blender's 3D view.** |
62 | 61 |
|
63 | | - |
| 62 | +### 3.1 Object Property |
| 63 | + |
64 | 64 |
|
65 | | -Enjoy! |
| 65 | +- *SetEmissiveColor*: Enable/Disable ,and set color of SetEmissiveColor. |
| 66 | +- *SetBlendMode*: You can set the SetBlendMode's BlendMode(Normal/Additive), GlowHalfDistance's distance, and GlowAttenuationMode(DivideExponent2 or 4). |
| 67 | +- *SetDecalTransparentColor*: For example of the BMP, If you want to use the case of require SetDecalTransparentColor, you can set Enable/Disable ,and set color of SetDecalTransparentColor. |
66 | 68 |
|
| 69 | +### 3.2 Material Property |
67 | 70 |
|
| 71 | + |
68 | 72 |
|
| 73 | +- *Use AddFace2*: If this option is enabled, when you are the exporting, you can enable the material to the double-sided by Addface2. |
| 74 | +- *LoadTexture*: If this file is selected, you can set the NighttimeTexture for LoadTexture. |
69 | 75 |
|
| 76 | +## 4. Debugging |
70 | 77 |
|
| 78 | +This plugin is output a log file of `io_scene_csv_log.txt` at the under the home directory. |
71 | 79 |
|
| 80 | +Specifically, the folder placing is showing below. |
72 | 81 |
|
| 82 | +- Windows |
| 83 | + `C:\Users\<UserName>\io_scene_csv_log.txt` |
| 84 | +- Linux/macOS |
| 85 | + `~/io_scene_csv_log.txt` |
73 | 86 |
|
| 87 | +## 5. License |
74 | 88 |
|
| 89 | +This plugin is licensed under *GPL-2.0*. |
75 | 90 |
|
| 91 | +### Third party license |
| 92 | +- This plugin uses **Chardet** to determine the character encoding. This is licensed under the *LGPL-2.1* as per `io_scene_csv/chardet/LICENSE`. |
0 commit comments