refactor: re-layput project
- move assets (raw jsons, icons, meshes and i18n data) into the root of repo. - move script into the root of repo. - modify blender manifest according to this changes. - optimize gitignore.
13
bbp_ng/.gitignore
vendored
@ -1,20 +1,15 @@
|
||||
## ===== Personal =====
|
||||
# Do not include PyBMap in this repository.
|
||||
# Order build fetch it manually.
|
||||
# Order user build and fetch it manually.
|
||||
PyBMap/
|
||||
|
||||
# Disable generated icons and jsons but keep the directory hierarchy.
|
||||
# Disable generated assets but keep the directory hierarchy.
|
||||
icons/*
|
||||
!icons/.gitkeep
|
||||
jsons/*
|
||||
!jsons/.gitkeep
|
||||
|
||||
# Do not include intermidiate translation template (POT)
|
||||
# NOTE: it seems that Python default gitignore (written following) disable POT file in default.
|
||||
# so, as it wish, I also remove it from git.
|
||||
i18n/*
|
||||
!i18n/blender.pot
|
||||
!i18n/*.po
|
||||
meshes/*
|
||||
!meshes/.gitkeep
|
||||
|
||||
## ===== Python =====
|
||||
# Byte-compiled / optimized / DLL files
|
||||
|
@ -124,7 +124,7 @@ def _load_element(mesh: bpy.types.Mesh, element_type: BallanceElementType) -> No
|
||||
element_filename: str = os.path.join(
|
||||
os.path.dirname(__file__),
|
||||
"meshes",
|
||||
element_name + '.bin'
|
||||
element_name + '.ph'
|
||||
)
|
||||
|
||||
# open file and read
|
||||
|
@ -71,12 +71,8 @@ files = "Import/export Virtools file from/to disk"
|
||||
[build]
|
||||
paths_exclude_pattern = [
|
||||
"__pycache__/", # Python runtime cache
|
||||
".gitignore", # Git Ignore File
|
||||
".style.yapf", # Python code style
|
||||
"*.gitkeep", # Git directory keeper
|
||||
".gitignore", # Git Ignore File
|
||||
"*.md", # Useless document.
|
||||
"/raw_jsons", # Raw JSONs.
|
||||
"/raw_icons", # Raw Icons.
|
||||
"/tools", # Assistant tools.
|
||||
"/i18n", # GNU gettext Translation.
|
||||
]
|
0
bbp_ng/meshes/.gitkeep
Normal file
Before Width: | Height: | Size: 785 B |
@ -1,7 +0,0 @@
|
||||
# Raw Icons
|
||||
|
||||
This folder contain all images used by this Blender plugin.
|
||||
|
||||
This folder should not be distributed in production because all of these files are in original size. It is pretty need too much time to load them in blender.
|
||||
So we keep these high quality images here and provide a tools in `tools` folder. Builder should run script to generate thumbnails in `icons` folder.
|
||||
Then this Blender plugin can work normally.
|
Before Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 108 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 7.2 KiB |
Before Width: | Height: | Size: 108 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 663 B |
Before Width: | Height: | Size: 745 B |
Before Width: | Height: | Size: 945 B |
Before Width: | Height: | Size: 818 B |
Before Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 984 B |
Before Width: | Height: | Size: 611 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 471 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 494 B |
Before Width: | Height: | Size: 360 B |
Before Width: | Height: | Size: 992 B |
Before Width: | Height: | Size: 444 B |
Before Width: | Height: | Size: 691 B |
Before Width: | Height: | Size: 775 B |
Before Width: | Height: | Size: 807 B |
Before Width: | Height: | Size: 652 B |
Before Width: | Height: | Size: 695 B |
Before Width: | Height: | Size: 550 B |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 265 B |
@ -1,183 +0,0 @@
|
||||
[
|
||||
{
|
||||
"identifier": "raw_floor_1x1",
|
||||
"showcase": null,
|
||||
"params": [
|
||||
{
|
||||
"field": "height",
|
||||
"data": "5.0"
|
||||
},
|
||||
{
|
||||
"field": "face",
|
||||
"data": "(True, False, True, True, True, True)"
|
||||
},
|
||||
{
|
||||
"field": "is_sink",
|
||||
"data": "False"
|
||||
}
|
||||
],
|
||||
"skip": "False",
|
||||
"vars": [],
|
||||
"vertices": [],
|
||||
"faces": [],
|
||||
"instances": [
|
||||
{
|
||||
"identifier": "cv_triangle_side",
|
||||
"skip": "False",
|
||||
"params": {
|
||||
"edge_length": "5",
|
||||
"tip_offset": "2.5",
|
||||
"height": "height",
|
||||
"face": "(face[0], False, False, False, face[3], None)",
|
||||
"is_sink": "is_sink"
|
||||
},
|
||||
"transform": "move(5, 0, 0) @ rot(0, 0, 90)"
|
||||
},
|
||||
{
|
||||
"identifier": "cv_triangle_side",
|
||||
"skip": "False",
|
||||
"params": {
|
||||
"edge_length": "5",
|
||||
"tip_offset": "2.5",
|
||||
"height": "height",
|
||||
"face": "(face[0], False, False, False, face[5], None)",
|
||||
"is_sink": "is_sink"
|
||||
},
|
||||
"transform": "move(5, 5, 0) @ rot(0, 0, 180)"
|
||||
},
|
||||
{
|
||||
"identifier": "cv_triangle_side",
|
||||
"skip": "False",
|
||||
"params": {
|
||||
"edge_length": "5",
|
||||
"tip_offset": "2.5",
|
||||
"height": "height",
|
||||
"face": "(face[0], False, False, False, face[2], None)",
|
||||
"is_sink": "is_sink"
|
||||
},
|
||||
"transform": "move(0, 5, 0) @ rot(0, 0, 270)"
|
||||
},
|
||||
{
|
||||
"identifier": "cv_triangle_side",
|
||||
"skip": "False",
|
||||
"params": {
|
||||
"edge_length": "5",
|
||||
"tip_offset": "2.5",
|
||||
"height": "height",
|
||||
"face": "(face[0], False, False, False, face[4], None)",
|
||||
"is_sink": "is_sink"
|
||||
},
|
||||
"transform": "ident()"
|
||||
},
|
||||
{
|
||||
"identifier": "floor_rectangle_bottom",
|
||||
"skip": "not face[1]",
|
||||
"params": {
|
||||
"length": "5",
|
||||
"width": "5"
|
||||
},
|
||||
"transform": "move(0, 0, -height)"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"identifier": "floor_normal_1x1",
|
||||
"showcase": {
|
||||
"title": "Normal 1x1",
|
||||
"icon": "Normal1x1",
|
||||
"type": "floor",
|
||||
"cfgs": [
|
||||
{
|
||||
"field": "height_",
|
||||
"type": "float",
|
||||
"title": "Height",
|
||||
"desc": "The height of block.",
|
||||
"default": "5.0"
|
||||
},
|
||||
{
|
||||
"field": "face_",
|
||||
"type": "face",
|
||||
"title": "Face",
|
||||
"desc": "Whether has some faces.",
|
||||
"default": "(True, False, True, True, True, True)"
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": [
|
||||
{
|
||||
"field": "height",
|
||||
"data": "height_"
|
||||
},
|
||||
{
|
||||
"field": "face",
|
||||
"data": "face_"
|
||||
}
|
||||
],
|
||||
"skip": "False",
|
||||
"vars": [],
|
||||
"vertices": [],
|
||||
"faces": [],
|
||||
"instances": [
|
||||
{
|
||||
"identifier": "raw_floor_1x1",
|
||||
"skip": "False",
|
||||
"params": {
|
||||
"height": "height",
|
||||
"face": "face",
|
||||
"is_sink": "False"
|
||||
},
|
||||
"transform": "ident()"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"identifier": "floor_sink_1x1",
|
||||
"showcase": {
|
||||
"title": "Sink 1x1",
|
||||
"icon": "Sink1x1",
|
||||
"type": "floor",
|
||||
"cfgs": [
|
||||
{
|
||||
"field": "height_",
|
||||
"type": "float",
|
||||
"title": "Height",
|
||||
"desc": "The height of block.",
|
||||
"default": "5.0"
|
||||
},
|
||||
{
|
||||
"field": "face_",
|
||||
"type": "face",
|
||||
"title": "Face",
|
||||
"desc": "Whether has some faces.",
|
||||
"default": "(True, False, True, True, True, True)"
|
||||
}
|
||||
]
|
||||
},
|
||||
"params": [
|
||||
{
|
||||
"field": "height",
|
||||
"data": "height_"
|
||||
},
|
||||
{
|
||||
"field": "face",
|
||||
"data": "face_"
|
||||
}
|
||||
],
|
||||
"skip": "False",
|
||||
"vars": [],
|
||||
"vertices": [],
|
||||
"faces": [],
|
||||
"instances": [
|
||||
{
|
||||
"identifier": "raw_floor_1x1",
|
||||
"skip": "False",
|
||||
"params": {
|
||||
"height": "height",
|
||||
"face": "face",
|
||||
"is_sink": "True"
|
||||
},
|
||||
"transform": "ident()"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|