283 Commits
v1.0 ... v4.3

Author SHA1 Message Date
f920cdcaf5 i18n: fix translation 2025-09-04 10:01:41 +08:00
40cad381af i18n: update translation 2025-09-03 09:50:56 +08:00
0d20a1fe44 doc: update english doc 2025-09-02 13:51:51 +08:00
599e9a6ef0 doc: sync zh-cn doc to en doc 2025-09-01 13:59:31 +08:00
e22b888bfc doc: fix bme adder doc 2025-09-01 13:16:02 +08:00
88ef1d3202 doc: fix legacy align doc 2025-09-01 13:05:51 +08:00
f2af90c876 doc: fix export target for virtools exporting in doc 2025-09-01 12:56:19 +08:00
4dba3c3a71 doc: add game camera doc 2025-09-01 11:00:34 +08:00
e31a677d83 doc: add version rules in doc 2025-09-01 10:12:44 +08:00
35fcbe54b5 fix: re-design the layout of game camera.
- use more friendly layout in game camera. reported by zzq.
2025-08-30 22:50:43 +08:00
9e83fe0a10 i18n: update i18n
- update i18n template and translation.
- fix lost translation context in code.
2025-08-26 21:54:32 +08:00
33fb1a65d3 chore: remove useless gitkeep 2025-08-26 20:47:06 +08:00
415cc98758 doc: update document
- add hint for gray virtools import export button
- add outcome of leaving blank ballance texture folder setting.
- update compile chapter according to the change of build scripts.
2025-08-26 20:42:11 +08:00
2d93ce1340 feat: allow export all object for virtools file. 2025-08-26 19:59:36 +08:00
1129872234 fix: fix UTIL_naming_convention rename in i18n files. 2025-08-25 14:22:42 +08:00
2b2b18cfa4 fix: add error report for invalid file path when importing or exporting virtools file.
- add error report for invalid file path when importing or exporting virtools to avoid BMapException was thrown. Reported by SongRui
2025-08-25 14:09:10 +08:00
b19800e37f fix: fix bug that there is no preset encoding names.
- fix the issue that there is no preset encoding names in list when enable plugin without any extra operations.
2025-08-25 13:53:57 +08:00
e14729500c fix: fix rail adders poll issue
- add Ballance Texture requirement for all rail adders because they need it.
2025-08-25 13:24:15 +08:00
48bfc54830 i18n: modify i18n file batchly.
- update translation context in i18n files batchly due to previous BME prototype changes.
2025-08-25 13:13:42 +08:00
7e74e42bd7 feat: add BME category display in blender.
- add BME category display in blender, including add menu and side menu.
2025-08-25 13:07:55 +08:00
96a81b165b feat: add category fields for BME.
- add category for BME prorotypes.
- update validator and extractor for this change.
2025-08-25 10:30:44 +08:00
0681f0d240 fix: optimize the ui layout for BME boolean property. 2025-08-20 14:40:14 +08:00
d700f1276a fix: fix the wrong showcase type of Is Sink field in BME prototype Flat. 2025-08-20 14:32:57 +08:00
3bea3d67b9 feat: add OP_OBJECT_game_view operator.
- add OP_OBJECT_game_view operator for changing blender render resolution to some game resolution presets.
2025-08-18 21:55:15 +08:00
ec41b7553a feat: add game camera feature.
- add game camera operator which allow user see camera view as Ballance game presented.
2025-08-18 16:02:50 +08:00
9e2539499e fix: fix wrong UI words in legacy align. 2025-08-04 13:50:56 +08:00
3a5cd1c937 feat: support macos arm64 arch
- specially thank doyaGu for compiling macos arm64 BMap binary.
2025-08-04 11:22:09 +08:00
1afa5f9893 fix: change the shape of BME floor terminal.
- change the shape of all BME floor terminal (normal, sink and wide) from 5x2.5 to 5x5 requested by Zzq and Lee623.
- change icons according to above changes.
- add some comment in prototype files.
2025-08-01 15:13:38 +08:00
1383e87104 feat: allow 3D Cursor as align source in legacy align operator.
- allow 3D Cursor as align source in legacy align operator. this feature is requested by Zzq.
- add icon for legacy align.
2025-08-01 15:13:21 +08:00
a2b8f41a21 fix: fix performance after adding sidebar panel.
- resolve a performance issue by removing useless feature.
- more details about this issue can be seen the content inside this commit.
2025-07-31 16:50:32 +08:00
93f23abeb9 feat: add Ballance menu in 3d view sidebar for convenient adding. 2025-07-31 12:02:40 +08:00
4ba3ff9e5a fix: fix the aftermath of changing EnumPropHelper.
- fix the generic error of EnumPropHelper.
- use EnumPropHelper in UTIL_ioport_shared.ExportParams field instead of raw Blender string.
- remove useless type hint in various modules.
2025-07-30 13:35:36 +08:00
a9a889a8fd refactor: use generic type in EnumPropHelper
- use typing.Generic in EnumPropHelper and its child classes.
- change Doxygen docstring into reStructedText docstring.
2025-07-30 10:56:24 +08:00
fc34b19a42 feat: allow exporting selected objects as Virtools file
- add Selected Objects option in exporting Virtools file window requested by ZZQ.
2025-07-29 21:43:59 +08:00
9e65d258d7 refactor: use JSON5 instead of JSON for BME prototype.
- use JSON5 for BME prototype description file instead of JSON to make us have ability that make comment in declaration files (TBD in future).
- upgrade corresponding scripts.
- confirm the finish of upgrading script into modern Python.
2025-07-29 21:14:02 +08:00
ab266a07fb fix: fix BME JSONs validator error 2025-07-24 22:03:42 +08:00
61c7709b97 chore: finish BME JSON validator 2025-07-24 21:51:01 +08:00
1044d4b450 chore: remove useless scripts 2025-07-24 14:55:59 +08:00
54edc4dab7 chore: finish BME JSONs extractor 2025-07-24 14:51:05 +08:00
f40efb0467 chore: finish icons builder
- finish icons builder in scripts.
2025-07-24 14:00:25 +08:00
10de948a79 feat: update scripts
- add meshes builder (copyer).
- fix json compressor.
2025-07-24 10:16:58 +08:00
0ae95e927f 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.
2025-07-24 09:44:38 +08:00
9f591113f8 refactor: refactor toolset (not finished) 2025-07-23 22:35:47 +08:00
685a0b8066 fix: rotate 4 flames when creating sector pair.
- according to Lee623 report, rotate 90 degree for 4 flames startpoint when creating sector pair to correspond with models in ballance asset library.
2025-07-18 14:42:33 +08:00
a1a215ec19 fix: fix span between checkpoint and resetpoint.
- change the span between checkpoint and resetpoint to prevent paper ball model respawn offset error.
- the span between 4 flames and resetpoint now is 3.65
- the span for 2 flames now is 3.3258
- these data were measured by Lee623 and picked by mode number in all original levels (because there is no uniform number in original levels).
2025-07-18 14:30:18 +08:00
3bed920f11 refactor: rename some operators and modules.
- rename module OP_MTL_fix_all_material to OP_MTL_fix_all_materials.
- rename operator BBP_OT_fix_all_material to BBP_OT_fix_all_materials.
- rename module UTIL_naming_convension to UTIL_naming_convention.
- change some translation contexts to correspond with this change.
2025-07-18 14:13:19 +08:00
6dc82aade6 doc: update fake-bpy-module.
- update fake-bpy-module for dev and write its version, which is suit for blender 4.5, in doc.
2025-07-18 09:43:27 +08:00
ac6692cd97 feat: bump version up to 4.3
- update blender version to 4.5 LTS.
- there is no compatibility issue when porting to blender 4.5.
- bump plugin version up to 4.3 in manifest and document (which has not been updated a while).
2025-07-17 20:08:07 +08:00
14de9f3f1b i18n: update translation 2025-01-23 13:09:11 +08:00
dd64c0ce04 feat: finish work of release
- bump up version to 4.2
- update document about translation.
2025-01-21 10:10:36 +08:00
84f6baae6a i18n: basically finish translation 2025-01-20 22:38:29 +08:00
5afbf679ed i18n: update translations 2025-01-20 20:32:08 +08:00
89f5b5990d i18n: update translation 2025-01-20 18:21:14 +08:00
b441063061 i18n: first commit about i18n translation.
- add i18n translation files.
- add document about how to translate this plugin.
- fix some field descriptions in source code.
2025-01-20 16:08:46 +08:00
b96550ca5c feat: finish BME prototype improvement 2025-01-20 10:07:45 +08:00
cc74a2ca8b feat: add i18n for forgetten entries.
- add i18n for progress hints when importing or exporting virtools file.
- add i18n for naming convention report.
2025-01-19 10:52:20 +08:00
f9fe4af1fe feat: update BME structure 2025-01-19 10:29:58 +08:00
4a96906002 feat: update BME prototypes
- update BMe prototypes. add chris suggested component for future changes.
- add new 2 custom function in BME environment.
2025-01-18 19:09:32 +08:00
c448216496 doc: update document 2025-01-17 22:22:51 +08:00
f10c273067 fix: improve BME extractor
- improve BMe extractor with new added classes.
- I have written a half of BME validator, but I gave up now.
	* it takes too much time and I don't want to pay more on it. postpone it to next update.
	* I annotate all of BMe validator code for future implementation.
	* the improvement of BME json files (upgrade them to YAML format) also is postponed.
- change some interface in common.py. synchronize it to other modules using it.
2025-01-17 17:53:03 +08:00
04aa879c22 feat: finish i18n extract work
- masically finish u18n extract work (most fields are extracted)
2025-01-12 15:15:29 +08:00
4ffe29654b feat: add translation context for operators and their properties.
- add translation context for operator, menu, panel and etc. and their associated properties.
- improve some name and description but not finished.
- move reset BME material function inside BMEMaterialsHelper.
- rename variable of collection visitor in BME adder operator for clear meaning.
- replace some message box to report in ballance elements reset operator, BME materials reset operator and rail UV operator
2025-01-11 21:36:11 +08:00
1d7ac76d0e chore: update the generator of json
- add PO file extractor for BME prototypes.
- add validator for BME prototypes but not finished.
- update json builder script.
2025-01-09 21:41:52 +08:00
77315ffbea fix: fix previous commit remained issues.
- vt encodings in list showcase now works.
- modify some usage of message_box to Operator.report to make it more like blender suggested.
2025-01-08 20:20:10 +08:00
0862ecd269 feat: use list to display virtools encodings settings, instead of raw string.
- use list to show bmap encoding settings, instead of user input raw string. it will give a more obvisous interface.
	* add bmap encoding setting properties in ptrprop_resolver.
	* update ptrprop_resolver for more clear usage.
- following features has not been implemented yet.
	* default value for bmap encoding list.
	* the bridge function in ioport_shared module (filter empty item in result)
	* validate encoding list result when importing and exporting virtools file.
2025-01-08 13:21:35 +08:00
f4d3e48be2 refactor: add 2 classes to refactor old code which raise too much erros by linter.
- add TinyMutex to resolve the issue that we can not operate the virtools group infos of 2 individual objects.
	* use this new class for all class need resource mutex, such as ballance element, bme materials and etc.
- add CollectionVisitor to resolve that blender have bad document and type hint for runtime bpy.types.CollectionProperty.
	* now all visit to CollectionProperty are delegated by this class.
2025-01-06 15:12:14 +08:00
6ae8899912 feat: add new operator about convert curve to mesh with group infos.
- add a new operator which can converte selected object to mesh, and if object is curve and has bevel object, it will copy the virtools group info of bevel object at the same time.
- add a hint in virtools group panel to tell user that the virtools group of non-mesh object will not be saved.
2025-01-05 20:06:40 +08:00
76f1cdc3c7 fix: fix various rail creation issue.
- move rail creation function into an individual file, UTIL_rail_creator.py
- add flip options for screw rails. this allow user to create any types of screw rail they needed.
2025-01-04 20:13:20 +08:00
8105b110f2 feat: add default rail material when creating rail.
- add default rail material when creating rail.
	* add Rail material in bme material.
- remove negative screw radius feature when creating curve rail.
	* originally negative screw radius will cause normal flip issue when creating.
	* however, negative screw radius feature can no fulfill each shapes of screw style. it is more convenient using blender mirror feature after creating screw rail.
	* thus I remove this feature, not fix it (I can fix it).
2025-01-04 12:28:59 +08:00
acb87b3844 fix: fix step count error when exporting virtools file 2025-01-04 10:19:31 +08:00
94d5c934c6 fix: fix light direction issue when importing and exporting virtools file. 2025-01-03 23:42:44 +08:00
3372c7a4b7 feat: add light support in exporting virtools file.
Some checks failed
Publish docs via GitHub Pages / Deploy docs (push) Has been cancelled
- support light type when exporting virtools.
- both import and export virtools file now support light type. however there is a slight bug about light direction need to be resolved.
- fix bug that exporter throw exception if exported collection contain non-mesh object or exported object is not mesh object.
- fix the usage of BMMeshTrans according to upstream changes.
2025-01-03 17:36:44 +08:00
4181096a9e fix: redirect some reference of bpy.context to context passed by operator argument 2025-01-03 10:37:26 +08:00
89a5e6367b feat: improve name conflict strategy UI layout 2025-01-03 09:55:02 +08:00
cb893b770a feat: add light object support in importing virtools file.
- fix all `def poll(self)` to `def poll(cls)` to let it fit class method name convention.
- fix wrong progress counter when importing virtools file.
- add light support when importing virtools file.
- add corresponding conflict strategy and resolver for light.
2025-01-03 09:36:32 +08:00
2f08455518 feat: add virtools light features.
- add virtools light feature for blender light type and add all essential operators, functions and structs.
- remove PyBMap from repository. order builder fetch it on their own.
- update gitignore.
2024-12-31 14:40:41 +08:00
729e12ed7b feat: update virtools file importer and exporter
- use panel to organise property group in virtools file importer and exporter.
- move all ballance params and virtools params into ioport_shared module and enable different showcase according to the argument passed to show function presenting whether current window is importer or exporter.
- add multiple type ignore to ignore the error of bpy operator member field type hints.
2024-12-30 17:53:42 +08:00
fe47861bd0 fix: fix issue of BME module prototype 2024-11-02 17:44:06 +08:00
c894d88c54 doc: modify document to mark changes
- add universal encoding infos in documentation.
- bump up version to 4.1 for release.
2024-09-21 23:30:56 +08:00
c8d59ef5f4 feat: update PyBMap dependency.
- update PyBMap dependency.
- use BMap 0.2 instead of old one.
- change default encoding name string according to the change of LibCmo changes.
2024-09-21 22:59:14 +08:00
f5c50ae079 fix: fix legacy align issue.
- fix issus that legacy align can not align object with non-1 scale factors.
- refactor some functions in legacy align to have better looking.
- fix issus that legacy fail to align objects since second executing by forcely updating view layer.
2024-09-07 20:34:22 +08:00
b1199f6a21 doc: translate documentation 2024-07-27 11:44:35 +08:00
47a8d81ecd doc: translate documentation 2024-07-26 09:46:16 +08:00
24ac07a3b3 doc: translate documentation 2024-07-25 10:37:16 +08:00
b647d7256f doc: translate documentation 2024-07-24 13:49:13 +08:00
421f01b3db doc: translate documentation 2024-07-23 11:01:41 +08:00
f215d3487f doc: translate documentation 2024-07-22 16:40:52 +08:00
1661f82a07 doc: update english documentation 2024-07-21 14:42:02 +08:00
512e7e868b doc: add english documentation.
- add english documentation for install-plugin and tech-info chapters.
- modify gitignore because we do not need redist folder any more.
2024-07-20 10:26:50 +08:00
427bad4f6b fix: fix various trivial issues
- update blender_manifest.toml to the latest version and fix the issues raised by blender when packaging.
- use blender do packaging work. remove redist.py because blender_manifest.toml has gitignore like filter feature when packaging.
- update document about installing, configurating, building plugin for blender 4.2.
- update a document image for blender 4.2.
2024-07-19 15:25:38 +08:00
209d212287 fix: fix blender mesh writer issue.
- fix blender mesh writer with the reference of FBX Importer.
- ballance map importer now may works as expected (still need more review).
2024-07-18 20:23:21 +08:00
2271b0a621 fix: remove bl_info.
- remove bl_info in __init__.py because blender_manifest.toml has replace it.
2024-07-17 21:20:40 +08:00
6940428b88 fix: fix blender 4.2 mesh issue.
- fix issue that blender 4.2 lost use_auto_smooth and calc_split_normals. (it almost works but not perfect. still need more debugging)
- remove depracted material blend_mode. use modern one instead. (the modern setting make me consufes but it works)
2024-07-17 19:45:35 +08:00
aa602a7bb8 fix: update to blender 4.2 LTS
- update to Blender 4.2 LTS
- fix issue that can not find specular property in priniciple BSDF when applying virtools material.
- update blender manifest toml to let plugin works.
- there are various mesh works need to be fixed in later commits. this commit can not works normally on blender 4.2
2024-07-17 09:23:16 +08:00
8588f097a2 fix: change default screw steps to 28.
- change default screw steps to 28 (7 steps for 90 degree)
- update blender mesh annotation.
2024-05-25 20:32:30 +08:00
5d8ffb7e48 feat: add redist script
- add redist script for the convenience of building plugin package, especially for Blender 4.2
2024-05-21 16:19:13 +08:00
270fddff52 feat: do some trivial adaptions for blender 4.2 LTS
- add blender_manifest.toml
- add a removal note for bl_info in __init__.py.
- it doesn't mean that this plugin now can be used in blender 4.2. I just add some trivial changes which do not break current compatibility to reduce migration work in future.
2024-05-17 09:15:12 +08:00
084e7fbe61 feat: add extra transform for rail creation
- add extra transform for rail creation.
- remove scale from extra transform because it is rarely used. because Ballance can not handle the physicalization of scaled object.
2024-05-13 13:39:42 +08:00
190be6ec61 fix: restore extra transform to identy when entering bme operator. 2024-05-10 15:33:28 +08:00
36e925101e feat: extra transform properties for bme creation.
- add extra transform properties (translation, rotation and scale) for bme creation operator. this is good for "what you seen is what you gotten" and can increase user experience when add bme protorypes. please note these extra transform is applied to object after moving to cursor, not the mesh self.
- fix a weired bug that bme creation execute() may get outdated configurations when switch bme type in pop up window. the solution is simply adding an extra outdated flag checker at the head of execute(). but i have no spare time to research whether this patch is correct for this bug.
2024-05-10 14:44:37 +08:00
84e7e8380f feat: hide some operators in edit mode and add some notify for grouping oper.
- now grouping, ungrouping clear groups operators will show a report at the bottom of blender to indicate their work have done.
- disable fix material, 3ds max align, select by virtools group operators in edit mode to prevent any possible undefined behavior.
2024-04-22 21:06:41 +08:00
c58af8ce48 fix: fix face generation error of BME streets prototype. 2024-04-22 21:06:35 +08:00
07298fd21c feat: add blc params in exporter. fix bme.
- add ballance params section and successive switch in virtools file exporter to allow user manually cancel sector group ensurance which give user a way to export component, not the whole level.
- add mirror matrix detection in bme creation. a mirror matrix will reverse triangle indice order. we need reverse it again when facing mirror matrix. this resolves the issue when applying term 3.
- use mirror, not rotation to create straight floor in bme which give a better looks in game.
2024-04-07 10:35:06 +08:00
3a1a0fb0f6 doc: update document
- add section about ballance related props
2024-04-06 15:43:42 +08:00
3396947115 feat: add ballance map sector field in scene
- add ballance map sector info in scene to indicate the maximum sector count of this map.
- this adding will prevent the bug that the exported ballance map do not have successive sector groups. because original implement will not create sector group if no component in corresponding sector and previous remedy still have bug. and if this happended, ballance will show spaceship in wrong sector. this adding is the final solution of this bug.
- exlarge ballance map sector info when user adding component. the enlarged value will be calculated by user input sector.
- auto enlarge ballance map sector info when importing. this will give user a fluent experience when modifying existing map.
- exporting map will also use ballance map sector info to pre-create successive sector group as term 2 stated.
- move sector name extractor from virtools file exporting module to naming convention module.
2024-04-01 14:39:11 +08:00
6cf2ab895d fix: fix unregister error in virtools group
- fix del attribute error when unregister virtools group.
2024-03-30 16:12:34 +08:00
b039dd8b43 fix: fix grouping and naming error
- fix wood and rail soundeffect grouping error.
- fix checkpoint and resetpoint naming error again (forget to change PC/PR).
2024-02-20 21:52:50 +08:00
8bad1a487c add swing series adder 2024-02-18 22:11:06 +08:00
0f18559d3f chore: switch doc gen from ng to master 2024-02-13 12:19:20 +08:00
5a5053440c update doc english part 2024-02-13 12:06:16 +08:00
02a1222210 feat: flatten uv backward search mode
- support backward successive face searching to resolve some failed flatten uv in floor mode.
2024-02-13 10:58:44 +08:00
f8c344f65e doc: add doc.
- finish uv section of doc.
- fix issue about the wrong calc of coordinate system axis vector in flatten uv (change it from left hand to right hand).
- fix rail uv display text.
2024-02-12 22:39:44 +08:00
0bec108dcb feat: add fix material feature.
bring ballance virtools helper used fix_texture (renamed as fix material to correspond with the real object operated by this function) into blender plugin.
2024-02-12 11:42:09 +08:00
997839a187 feat: select object after creation of floor, rail and component 2024-02-11 17:11:05 +08:00
da71d5560c doc: update manual 2024-02-11 16:38:06 +08:00
02082bf99e fix issue. add doc.
- fix TwoFlames Resetpoint naming error.
- add doc parts.
2024-02-08 23:21:53 +08:00
c82c094519 add shadow group as the essential group for floor type. 2024-02-08 13:50:56 +08:00
8ec101e1f1 update flatten uv
- add `failed` counter for special flatten uv.
- ignore invalid face when checking them to prevent potential recursive checking.
2024-01-22 22:25:04 +08:00
8499c25b67 add redist folder. fix doc and readme 2024-01-14 21:25:12 +08:00
200ac40648 update doc 2024-01-14 17:08:53 +08:00
25091a48a7 finish specific flatten uv 2024-01-14 12:07:47 +08:00
259f99ddf8 refactor flatten for future dev 2024-01-12 23:55:28 +08:00
f123bdacc0 finish bme struct 2024-01-12 17:18:41 +08:00
8f27fec3c8 update bme struct 2024-01-10 22:37:41 +08:00
0d0d4db2db try nomaterial 2024-01-09 21:02:56 +08:00
bfbdf5c99b fix rail cret issues
- add transition rail oper
- set sharp edge only when cap is available.
- fix normal flip issue in straight rail.
2024-01-09 17:52:30 +08:00
50b2cf2cf1 add docs. add mkdocs deploy 2024-01-08 23:36:59 +08:00
013096459a finish rail adder 2024-01-08 15:08:20 +08:00
31aa5c3127 add null normal support in bme. fix rail cret draw() 2024-01-08 10:28:56 +08:00
f9502fe2d4 basically finish rail adder 2024-01-07 17:33:21 +08:00
b5565d796a add a part of rail adder 2024-01-06 23:51:11 +08:00
6b31401240 add bme struct. fix bmap type hint 2024-01-04 17:29:01 +08:00
2c006b4528 add conflict resolver 2024-01-04 10:35:52 +08:00
680f367a42 fix issues
- disable bmx import/export temporaryly
- optimize the ui display of importing/exporting. (use box to organize props)
- place button horizontally, not vertically in virtools material.
- disallow apply in legacy align if no axis selected.
- add applied step counter in legacy alignment.
- add feedback for reseting bme material/component. (add a message box to show success)
2024-01-01 13:07:10 +08:00
318d661ac1 separate gitignore and add document 2023-12-31 19:31:41 +08:00
321e1b6fe9 finish rename opers 2023-12-31 17:35:15 +08:00
20aba6c273 fix issue. add feat.
- add ignored bmesh update function in flatten uv
- finish select by group, add, rm, clear group functions.
2023-12-30 22:17:42 +08:00
c5ce6e8a2c add border in bme 2023-12-27 16:05:35 +08:00
9315ff723d fix issues
- apply transform when creating BME struct's vertices and faces.
- add 3ds max align operator. support Apply button in a nasty way.
2023-12-26 22:23:56 +08:00
50b7eb0bce fix issues
- fix Sector group no-successive issue when saving as nmo
- add nong ventilator adder.
- use copy.copy to write some code to reduce the calling of get/set_raw_vt_mtl()
- keep texture when apply virtools mtl preset.
2023-12-25 15:04:22 +08:00
03e8feac67 add support to compress bme json 2023-12-25 10:49:25 +08:00
35f2c4a389 finish bme 2023-12-18 10:30:32 +08:00
6bc3933291 update bme 2023-12-17 23:01:45 +08:00
03441c642b update bme prop display 2023-12-17 12:01:57 +08:00
77b15a8797 refactor EnumPropHelper to improve BME again. 2023-12-16 22:27:31 +08:00
94872957fd init bme creator work 2023-12-16 18:12:00 +08:00
a6de69c882 refactor BlenderEnumPropHelper 2023-12-15 21:57:50 +08:00
52f3936e42 try bme adder 2023-12-14 21:33:22 +08:00
2f123e6a3c add bme material preset 2023-12-14 18:03:03 +08:00
f6569313bf update component creation 2023-12-09 17:42:03 +08:00
ebb22c9ec1 refactor. and finish basic of adding component 2023-12-07 21:28:23 +08:00
ae9a848864 write shit 2023-12-06 17:16:31 +08:00
ca7e047c09 add something
- move all annotation to vt types
- add 2 options when saving virtools file accoridng to the change of BMap interface changes.
2023-12-03 22:49:29 +08:00
5c34bbad38 fix virtools export fatal errors 2023-12-03 18:14:20 +08:00
70dd525315 almost finish virtools exporing 2023-12-03 17:07:52 +08:00
3025fcf305 update vt file exporting 2023-12-02 20:25:36 +08:00
52452a96d5 update virtools export 2023-12-01 23:27:53 +08:00
84b3ace13d start exporing virtools file 2023-11-30 22:38:53 +08:00
7116d7198a update naming 2023-11-29 22:12:04 +08:00
6944415912 finish naming convention converter 2023-11-29 21:35:15 +08:00
88fe1519e3 add name convention 2023-11-26 20:37:19 +08:00
5bb3abed20 shhit 2023-11-26 12:57:49 +08:00
e79982c43f init naming convention plugin system 2023-11-24 17:49:18 +08:00
8e2d7a4133 update plugin
- revert merge of ballance textures
- prepare for naming convension dev
- show icons for virtools group list
2023-11-23 22:34:06 +08:00
cb80fa8b03 add icons manager. show icons in group 2023-11-22 19:57:29 +08:00
e84c1148f3 add thumbnail for blender icons 2023-11-22 17:41:43 +08:00
1432c2990a fix issues.
- fix issue according to python linter
- do not write vt group if no changes. reduce the cost of virtools group class.
2023-11-17 22:00:22 +08:00
1a2dd08092 update plugin.
- sync PyBMap work. use different library name in different OS.
- add BMap encoding default value according to different OS (Windows and non-Windows) because non-Windows OS, we use libiconv as encoding converter.
- move all pointer properties to a single module and give corresponding visitor.
- add shared importer exporter parameters module thus bmfile import/export also can ref it.
2023-11-16 22:41:03 +08:00
59a1275f68 add support of virtools mesh lit mode 2023-11-15 23:05:00 +08:00
d128ffcde5 update custom normals importing 2023-11-14 22:16:12 +08:00
fd17d3b5c9 revert some changes about prev commit 2023-11-14 21:37:29 +08:00
1f0444009f fix 2 issues
- update apply_virtools_material. use keywords, not index to visit input and output sockets.
- update blender mesh operator. send a message when mesh::validate() proceed mesh and stop custom normals assignment.
2023-11-14 21:24:09 +08:00
bd40e0fdf2 update video format display name 2023-11-12 20:55:21 +08:00
6991307b8b merge util_blc_tex to prop_vt_tex. support virtools texture props when importing virtools file. 2023-11-12 20:35:54 +08:00
b7ad5c67d4 add virtools texture support 2023-11-11 13:32:58 +08:00
5bbaa895eb fix raw data texture reading error 2023-11-10 14:59:06 +08:00
1299a14f3b finish virtools file importer 2023-11-10 12:26:04 +08:00
8fad643dd9 finish half of virtools importer 2023-11-09 21:41:26 +08:00
ec0749f3e5 adapt to PyBMap binding 2023-11-09 17:20:57 +08:00
6e4b1b37da finish virtools groups 2023-10-27 11:51:12 +08:00
1eaaedfcbd finish ballance element 2023-10-26 12:32:08 +08:00
c1f92c7244 basically finish framework of ballance_element 2023-10-25 21:35:26 +08:00
2896602e6a add basic support of Ballance elements 2023-10-25 12:07:14 +08:00
9079bf1bb3 remove uv modifier from bld_mesh.py and finish flatten uv and rail uv 2023-10-23 10:57:29 +08:00
f7dd5f32ba update MeshUVModifier 2023-10-21 10:48:46 +08:00
b4bb85cc71 update MeshUVModifier 2023-10-20 20:50:30 +08:00
bcbe9c987e add MeshUVModifier 2023-10-20 10:40:20 +08:00
16d4fc2bca finish mesh reader 2023-10-19 10:56:33 +08:00
4f10b1a9e9 add placeholder for importer and exporter 2023-10-18 21:23:04 +08:00
484a4101ad finish blender mesh writer 2023-10-18 12:09:40 +08:00
ea6cb430fe add blender mesh helper 2023-10-17 11:50:31 +08:00
354b3cd180 fix and add some functions 2023-10-16 10:12:05 +08:00
1d1de08bd7 update texture manager 2023-10-15 21:13:56 +08:00
21345b8251 add some functions 2023-10-15 13:48:50 +08:00
b94e7e2b22 add addon pref and file browser wrapper 2023-10-14 11:48:41 +08:00
5584bc66a0 basically finish virtools material 2023-10-12 22:15:21 +08:00
4f693b555d add virtools material basically 2023-10-11 22:24:22 +08:00
4733295a39 add some basic of virtools material 2023-10-11 10:55:45 +08:00
d9b9531828 try migrate first operator 2023-10-10 16:01:52 +08:00
1db6cab8ca add some code 2023-10-09 22:20:21 +08:00
8de1adda04 add some development help 2023-10-09 14:10:25 +08:00
f07cfc91d5 [doc] prepare next generation development 2023-10-09 10:39:35 +08:00
0a3b3c5862 [feat] allow nested collection when exporting bm file.
provided by propylamine
2023-09-05 14:40:10 +08:00
0d1e382b37 [fix] fix typo
- unknow -> unknown
2023-08-17 10:21:42 +08:00
12d5f8c236 [doc] bump up version. fix document.
- bump up version to 3.3
- fix documents
  * rewrite the supported version.
  * update suggested plugin link.
  * notify user some installation changes. order user change installation folder.
2023-07-21 10:02:36 +08:00
6fe856fa8e [fix] migrate to blender 3.6 LTS
- change bl_info["support"] to COMMUNITY. because Blender do not support TESTINg anymore.
- now plugin should be installed in addons folder, not addons_contrib, due to blender changes.
- remove the reference about mesh.polypons.loop_total. because it is readonly now. (blender 3.6 changed)
- change uv assign method. use new properties instead. (MeshUVLoop is deprecated in blender 3.5 and removed in blender 4.0)
2023-07-01 12:56:07 +08:00
c2a85a2d86 [fix] fix empty material slot export error.
- fix the issue that the object with empty material slot will cause a None crash when exporting BM file.
2023-05-25 20:54:50 +08:00
dafb679780 [doc] add document for flatten uv and bump up version.
- add document for flatten uv
- bump up version to 3.2
2023-03-11 16:57:17 +08:00
f3663a4280 [fix] fix fatal div zero issue
- fix div error exception when flatten uv - scale size == 0
2023-03-09 21:24:05 +08:00
9c8d365ab6 [feat] add ref. point feature for flatten uv
- add reference point & uv feature for flatten.
- due to first feature, flatten uv now can process more structure of ballance floor, such as looping floor with low edge count.
- give flatten uv 2 different modes.
- original flatten uv method still existed as a scale size mode.
2023-03-09 21:18:13 +08:00
0be036fcea [fix] fix various bugs
- update README to keep update with plugin design
    * refactor Select by Virtools Group section
    * add material preset function description
- fix issue about flatten uv may get zero base vector.
- update elements adder menu.
- bump up version to 3.1
2023-01-31 10:50:07 +08:00
e153e51abd [feat] improve element adder
- fix ambiguous default side setter for floor adder. use "update" field of EnumProperty instead. also applied for dup element with span adder.
- divide component adder into 3 different adder, to process different add strategies.
- update elements placeholder adder. this change will force all element placeholder share a single mesh in the whole map.
- add series element adder.
2023-01-30 22:49:49 +08:00
d292ce389a [fix] add icons for sound hit/roll id group
- add 3 extra icons for groups Sound_(Roll/Hit)ID_(01|02|03).
- add a empty placeholder icon to make some UI more clear
- finish add group icons.
2023-01-30 15:00:29 +08:00
807e006245 [feat] add full element icons
- add more element icons. now element icons is not problem.
- change icon load strategy. now icon is loaded outside plugin. this operations might slow down blender but now I can apply my custom map to some operators to get better using experience.
- use new element icons to decorate some group name to let user know what this group stands for.
2023-01-30 11:12:15 +08:00
8d7a982e50 [fix] fix add floor alignment and add some new icons.
- try setting center alignment for add floor popup operator. it is not center alignment now because blender's impl but it is better than previous layout.
- add some components icon for more directly visual.
2023-01-29 21:39:24 +08:00
ddf6b7befe [fix] fix misc not important issues
- correct all icon usage. use 'CANCEL' instead of 'ERROR' to indicate error correctly. and move these icon const into UTILS_icons_manager.py
- auto rename generated rail section to match the default name standard.
- give more clear signal about import and export bm file by using Operator.report() function.
2023-01-29 10:32:43 +08:00
a300ddbb49 [fix] fix fatal error when use flatten uv for sink floor top.
- default behavior of flatten uv only suit for normal floor
- add extra property called scale correction to allow use specific custom uv scale.
2023-01-28 20:44:39 +08:00
c9e51c9b6a [feat] change function "selected by Virtools groups"
- remove ignore hidden property. because it is rarely used.
- support more select mode. like blender selection.
- merge function filter by group and select by group as a united function.
2023-01-28 20:05:18 +08:00
b58f837a94 [feat] add confirm window for some dangerous opers
- add clear oper in Virtools group panel.
- add confirm window for clear Virtools groups opers. both panel and context menu.
2023-01-28 11:15:41 +08:00
5fe865c621 [feat] improve rename system
- rename system now support display renamed name and old name at the same time to solve the problem that user can not find renamed objects.
- correct some typo of rename system report.
2023-01-28 10:39:31 +08:00
9b9fc9cde8 [feat] promote experience about floor creation.
- change bl_options and rewrite invoke and draw functions to let floor creating window become more visual. credit: BLumia.
- also change 3ds max align and flatten uv presentation after changing creating floor window.
- seperate icon loader/unload module.
2023-01-27 16:28:32 +08:00
ef459a210d [feat] promote virtools material
- set the default value of virtools material like virtools creation.
- add preset in virtools panel for convenient using.
2023-01-25 14:57:30 +08:00
7680d11c0e [fix] fix various issues
- add edit mode switch before bm export to prevent potential error
- let the default value of ZBuffer in Virtools Material become True
- fix the issue that duplicated elements adder do not understand enable option.
2023-01-18 00:03:11 +08:00
e7376a3e9c [feat] add 2 new features
- add tunnel section creation and re-organise rail creation menu.
- allow duplicated elements (Nong xxx) creation for some special, such as Fan and Extra Point.
2023-01-09 11:10:13 +08:00
2a87e98904 add lost group Shadow. fix README typo 2023-01-05 10:32:46 +08:00
9211b0bcca translate engrish document and promote zh document 2023-01-03 14:43:12 +08:00
43a93d7c19 update ZH document 2023-01-02 17:20:36 +08:00
803bcaad05 [feat] promote visual representation
- update enum prop into radio button display mode in bmx export and group name selections
- move rename system into outline window right click menu.
- add grouping operator to object menu in outline window.
2022-12-30 10:06:02 +08:00
314284ed94 [feat] finish wide floor and sink platform auto gen.
- add height re-calc in derived block generation for fixing height issue when re-use Flat in sink platform.
- finish all wide floor prototype.
- finish all platform prototype.
2022-12-29 11:28:50 +08:00
0a815f04d6 [feat] change BMERevenge model read method
- divided json into small pieces for easy management.
- change json reading method for change (1)
2022-12-28 21:40:51 +08:00
2bd031784a [feat] update BMERevenge generation method
- use some laggy AST code to update BMERevenge generation method.
- after this change, BMERevenge become more programable and easy to create more complex models
- ready for wide floor generation development
2022-12-27 22:08:35 +08:00
d5cb8eb1ec make Virtools material can be optional 2022-11-20 12:02:15 +08:00
02c11ffe5a [feat] add more virtools group related operators
- support select/filter by virtools group.
- support group/ungroup/clear in object context menu.
- improve virtools group visit functions
2022-11-19 14:30:31 +08:00
240d5612df add new type rail uv: TT_ReflectionMapping 2022-08-29 10:52:34 +08:00
84dd5b76f1 add feature, optimize function argv passing.
- add support of 4 alpha fields intorduced in BM spec recently.
- optimize material creation functions argv passing strategy.
- change related func calls of (2).
- optimize material parameter pick code to reduce useless check.
2022-07-23 17:22:44 +08:00
2950857e3d do some improvement work
- split blender material creation function.
- allow user to apply virtools material to blender nodes in operator.
- add quick group picker in add virtools group operator.
2022-04-12 15:40:06 +08:00
dde95c3e4f finish vt_mtl and vt_group Panel system 2022-04-09 14:41:32 +08:00
4701164a6c add panel code basically. preparing for future dev 2022-04-08 21:50:31 +08:00
6c875d23ae add console output for rename system 2022-04-06 14:18:45 +08:00
3c36b8b9db finish rename system debug 2022-04-05 21:16:53 +08:00
c943264d05 finish rename system, without debug. 2022-04-05 20:45:00 +08:00
ca459c6185 add half code of rename system 2022-04-05 15:55:42 +08:00
1bfae63fe3 preparing rename system development 2022-04-04 22:04:11 +08:00
cb9609ac2c fix various bugs after refactor 2022-04-04 12:45:41 +08:00
c40f956771 fix loading and bm import/export error 2022-04-04 11:30:04 +08:00
e264c85a04 refactor project. preparing v3.0 development. no debug current 2022-04-03 22:48:12 +08:00
9c24569a06 fix add_floor texture problem again 2020-11-08 10:31:29 +08:00
031458bfc8 fix add_floor material error 2020-11-07 19:32:07 +08:00
3d1cf14334 update to bm spec 1.3 2020-11-06 21:34:47 +08:00
df44426195 fix suffix error when using add_element 2020-11-06 16:23:36 +08:00
670cc830fd finish version 2.0 2020-10-21 13:48:36 +08:00
582e96615a add rail_uv projection param. Update export bm UI (use PointerProperty) 2020-10-19 22:12:27 +08:00
ac9d196e3e update zh-cn document 2020-10-10 20:17:37 +08:00
f332e15791 finish flatten uv 2020-10-10 19:56:15 +08:00
0fb53f6827 add flatten uv. still have bug 2020-10-10 17:00:31 +08:00
c74141a346 fix move 2 cursor error 2020-10-10 11:11:08 +08:00
b3ee636848 finish all floor prototype 2020-10-10 10:27:15 +08:00
83ba270184 finish all basic floor protorype 2020-10-10 09:53:07 +08:00
027e267cc7 WIP adding floor prototype (2/3) 2020-10-09 21:59:06 +08:00
f5275b2abd WIP adding block prototype 2020-10-09 21:26:17 +08:00
93d077f18d add prototype 2020-10-09 17:16:36 +08:00
078dc952e7 add triangle face support 2020-10-09 16:39:20 +08:00
112b63319f WIP floor prototype 2020-10-09 12:53:00 +08:00
e2949708e6 finish add_derived_floor and debug 2020-10-08 21:19:06 +08:00
512cbce7fe WIP. write derived block creator 2020-10-08 17:12:38 +08:00
f0e3c3a597 finish add_basic_floor debug 2020-10-08 13:07:43 +08:00
75bfcbea02 add add_floor core function. WIP. no debug 2020-10-07 22:25:02 +08:00
4259d057fd fix rail_uv bbox calc bug 2020-10-07 20:38:01 +08:00
6ae4cbeddc finish add_floor ui display 2020-10-07 15:49:12 +08:00
35655a671d update message box and rail_uv 2020-10-07 15:20:51 +08:00
a8203dcb9c try use pointer property for rail_uv 2020-10-06 23:57:21 +08:00
612c641391 WIP, update some code 2020-10-06 12:57:25 +08:00
da722fe4bb adding add_floor function WIP 2020-10-05 22:30:06 +08:00
c5fc214384 increase bm version 2020-09-06 10:27:49 +08:00
ff24707186 update to bm 1.2 2020-09-06 10:11:48 +08:00
1fe77d843e add import opt, for BMERevenge import 2020-09-04 17:01:01 +08:00
d236925612 delete debug print 2020-09-04 11:10:46 +08:00
0af7f204dc finish rail section operator 2020-09-03 23:44:47 +08:00
79a04f1496 finish add elements 2020-09-03 13:57:06 +08:00
08eb6dcff9 [add] add ui and fix naming problem
- renaming all classes
- add conflict option for importing bm. no real code
- add shift + a menu, still no real code
2020-09-02 23:04:21 +08:00
751ff15b95 fix some name error and add no uv checker 2020-08-31 21:56:08 +08:00
97659f74cc remove debug print 2020-08-30 21:28:22 +08:00
41d3c5f3b7 use with syntax to save file and fix no uv bug 2020-08-30 21:22:25 +08:00
235 changed files with 30739 additions and 1497 deletions

8
.gitattributes vendored
View File

@ -1,2 +1,6 @@
# our generated mesh should be save as binary
*.bin binary
# All PNG image are binary
*.png binary
# Element placeholder mesh should be save as binary
*.ph binary
# Raw json data should be binary, although i edit it manually
assets/jsons/*.json5 binary

27
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,27 @@
name: Publish docs via GitHub Pages
on:
push:
branches:
- master
jobs:
build:
name: Deploy docs
runs-on: ubuntu-latest
steps:
- name: Checkout master
uses: actions/checkout@v4
with:
ref: master
- name: Install MkDocs
run: |
echo 'mkdocs' > requirements.txt
echo 'pymdown-extensions' >> requirements.txt
- name: Deploy docs
uses: mhausenblas/mkdocs-deploy-gh-pages@nomaterial
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CONFIG_FILE: docs/mkdocs.yml
# GITHUB_DOMAIN: github.myenterprise.com

141
.gitignore vendored
View File

@ -1,138 +1,3 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
## ===== Personal =====
# Disable VSCode
.vscode/

View File

@ -1,54 +1,7 @@
# Ballance Blender Helper
# BBP NG
[中文版本](README_ZH.md)
## Brief introduction
BBP NG, abbr **B**allance **B**lender **P**lugin **N**ext **G**eneration.
This is a Blender plugin which is served for Ballance mapping in Blender.
Currently, it only contain fundamental functions. More useful features will be added in future.
## Technical infomation
Used BM file spec can be found in [there](https://github.com/yyc12345/gist/blob/master/BMFileSpec/BMSpec_ZH.md)(Chinese only).
Used tools chain principle and the file format located in `meshes` can be found in [there](https://github.com/yyc12345/gist/blob/master/BMFileSpec/YYCToolsChainSpec_ZH.md)(Chinese only).
This plugin will continuously support Blender lastest **LTS** version. This plugin will migrate to new version when the new LTS version released. Currently, it based on Blender 2.83.x.
## Function introduction
### Plugin settings
* External texture folder: Please fill in the Texture directory of Ballance, the plugin will call the external texture file from this directory (the texture file originally with Ballance)
* No component collection: Objects in this collection will be forced to be set as non-Component. If left blank, this function will be shutdown.
* Temp texture folder: used to cache texture files extracted from BM files. Please arrange a directory that will not be automatically cleaned up. Since Blender will continue to read texture files from this directory, it cannot be emptied at will. And it also does not allow files with the same name to exist, that is, if I import two BMs for two maps, and there are two files with the same name but different images in the two BMs, the later files will overwrite the previous files , And in turn caused a texture error when the first blender document was opened again. For solving this problem, please refer to the subsequent BM import / export
### BM import / export
For import, in order to prevent texture errors, the best way is to force packaging once. After successfully importing the BM, choose to pack all into the blend file, and then clear the directory where the Temp texture folder is located, and then click Unpack to file if necessary, this operation will re-depend the textures in the texture library under the project folder.
For export, you can choose to export a collection or an object (Export mode), and specify the target (Export target).
It should be noted that once the BM is exported, all the faces in the file will be converted to triangular faces, please make a backup in advance. And it is recommended to use a flat collection structure, do not put a collections within another collection, which may cause some unnecessary problems.
### Ballance 3D
Ballance 3D is a set of light tools related to 3D operations, which can be found in the upper right corner of the 3D view.
#### Super Align
Provide 3ds Max like align tools. Current active will be seen as reference object. All selected objects(except active object) will be seen as operating object (So you can select multiple objects to align to the reference object).
#### Create Rail UV
Create UV for rails. You should select the object which you want add rail like UV to. Then, click this menu. Before doing this, you need make sure all selected object have at least 1 UV map (If it have more than 1 UV map, only the first UV map will be changed).
## Install
Put `ballance_blender_plugin` into Blender's plugin folder, `scripts/addons_contrib`. Then enable this plugin in Blender's preferences (Don't forget to configure this plugin's settings).
## Dev plan
* Add elements in Add menu.
* The assisted tools for creating custom floor in Blender (for example: add UV for floor).
For an introduction to this plugin, installing it, compiling it, reporting bugs, etc., see the GitHub Page of this project: https://yyc12345.github.io/BallanceBlenderHelper

View File

@ -1,54 +1,7 @@
# Ballance Blender Helper
# BBP NG
[English version](README.md)
## 简介
BBP NG又名**B**allance **B**lender **P**lugin **N**ext **G**eneration下一代Ballance Blender插件
这是一个用于Blender的插件其主要是服务于Ballance制图。
目前仅仅包含比较基本的功能,其余的更多有用的功能将在未来版本中进行开发
## 技术信息
使用的BM文件标准可以在[这里](https://github.com/yyc12345/gist/blob/master/BMFileSpec/BMSpec_ZH.md)查找
使用的制图链标准以及`meshes`文件夹下的文件的格式可以在[这里](https://github.com/yyc12345/gist/blob/master/BMFileSpec/YYCToolsChainSpec_ZH.md)查找
支持Blender的原则是支持当前最新的 **LTS** 版本在最新的LTS版本释出之后会花一些时间迁移插件。当前插件基于2.83.x版本
## 功能介绍
### 插件设置
* External texture folder请填写为Ballance的Texture目录插件将从此目录下调用外置贴图文件即Ballance原本带有的贴图文件
* No component collection处于此集合中的物体将被强制指定为非Component。如果留空则表示不需要这个功能。
* Temp texture folder用于缓存从BM文件中提取的贴图文件请安排一个平时不会被自动清理的目录。由于Blender会持续从这个目录读取贴图文件因此不能随意清空。并且其也不允许同名文件存在即如果我为2个地图分别导入两个BM这两个BM中存在贴图文件名相同但图像不同的两个文件那么后来的文件将会覆盖前面的文件并进而导致前者导入后的文档再次打开时出现贴图错误。关于解决这个问题的方法请参考后续的BM导入导出
### BM导入导出
对于导入而言为了防止贴图出错最好的方法是强制打包一次。在导入BM成功之后选择全部打包到blend文件然后清空Temp texture folder所在目录然后如果有需要可以再点击解包到文件将贴图重新依赖到工程文件夹下的贴图库内。
对于导出可以选择导出一个集合或者是一个物体Export mode并给定对象Export target即可。
需要注意的是一旦导出BM文件中所有的面将全部转换为三角形面请做好备份。并且建议使用平铺的集合结构不要在集合内嵌套集合可能会导致一些不必要的问题。
### Ballance 3D
Ballance 3D是一套简单的用于制图3D相关的轻型工具集合可以在3D视图右上角找到。
#### Super Align
提供一种类似于3ds Max的对齐方式。当前活动物体将被设为参照对象当前选中的所有物体如果参照也被选中则去掉参照对象将被视为操作对象因此可以选择多个物体一起对齐到参照对象
#### Create Rail UV
为地图中的钢轨创建UV你需要先选中需要添加类似钢轨UV的物体然后点击这个按钮以创建。在创建之前需要保证选中物体在右侧属性列表中至少有一个UV若有多个UV则会只操作第一个
## 安装
`ballance_blender_plugin`直接复制到Blender插件目录`scripts/addons_contrib`内即可。然后在Blender偏好设置中启用即可记得配置插件设置
## 后续开发计划
* 直接从添加菜单中添加机关
* 在Blender中创建自定义路面的辅助工具例如辅助添加路面UV等
有关此插件的介绍安装编译汇报错误等请参阅本项目的GitHub Page页面https://yyc12345.github.io/BallanceBlenderHelper

BIN
assets/icons/Empty.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 785 B

BIN
assets/icons/bme/Flat.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 663 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 745 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 945 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 818 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 984 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 471 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 494 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 992 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 444 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 691 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 775 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 807 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 695 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 265 B

185
assets/jsons/1x1.json5 Normal file
View File

@ -0,0 +1,185 @@
[
{
"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",
"category": "1x1 Blocks",
"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",
"category": "1x1 Blocks",
"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()"
}
]
}
]

240
assets/jsons/borders.json5 Normal file
View File

@ -0,0 +1,240 @@
[
{
"identifier": "raw_floor_border",
"showcase": null,
"params": [
{
"field": "length",
"data": "5.0"
},
{
"field": "height",
"data": "5.0"
},
{
"field": "face",
"data": "(True, False, False, False, True, False)"
},
{
"field": "is_sink",
"data": "False"
},
{
"field": "is_ribbon",
"data": "False"
}
],
"skip": "length == 0.0",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "cv_trapezoid_side",
"skip": "False",
"params": {
"long_edge_length": "length",
"short_edge_offset": "0",
"short_edge_length": "length",
"height": "height",
"face": "face",
"is_sink": "is_sink",
"is_ribbon": "is_ribbon"
},
"transform": "ident()"
}
]
},
{
"identifier": "floor_normal_border",
"showcase": {
"title": "Normal Border",
"category": "Borders",
"icon": "NormalBorder",
"type": "floor",
"cfgs": [
{
"field": "length_",
"type": "float",
"title": "Length",
"desc": "The length of block.",
"default": "2.5"
},
{
"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, False, False, True, False)"
}
]
},
"params": [
{
"field": "length",
"data": "length_"
},
{
"field": "height",
"data": "height_"
},
{
"field": "face",
"data": "face_"
}
],
"skip": "False",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "raw_floor_border",
"skip": "False",
"params": {
"length": "length",
"height": "height",
"face": "face",
"is_sink": "False",
"is_ribbon": "False"
},
"transform": "ident()"
}
]
},
{
"identifier": "floor_sink_border",
"showcase": {
"title": "Sink Border",
"category": "Borders",
"icon": "SinkBorder",
"type": "floor",
"cfgs": [
{
"field": "length_",
"type": "float",
"title": "Length",
"desc": "The length of block.",
"default": "2.5"
},
{
"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, False, False, True, False)"
}
]
},
"params": [
{
"field": "length",
"data": "length_"
},
{
"field": "height",
"data": "height_"
},
{
"field": "face",
"data": "face_"
}
],
"skip": "False",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "raw_floor_border",
"skip": "False",
"params": {
"length": "length",
"height": "height",
"face": "face",
"is_sink": "True",
"is_ribbon": "False"
},
"transform": "ident()"
}
]
},
{
"identifier": "floor_ribbon_border",
"showcase": {
"title": "Ribbon Border",
"category": "Borders",
"icon": "RibbonBorder",
"type": "floor",
"cfgs": [
{
"field": "length_",
"type": "float",
"title": "Length",
"desc": "The length of block.",
"default": "2.5"
},
{
"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, False, False, True, False)"
}
]
},
"params": [
{
"field": "length",
"data": "length_"
},
{
"field": "height",
"data": "height_"
},
{
"field": "face",
"data": "face_"
}
],
"skip": "False",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "raw_floor_border",
"skip": "False",
"params": {
"length": "length",
"height": "height",
"face": "face",
"is_sink": "True",
"is_ribbon": "True"
},
"transform": "ident()"
}
]
}
]

View File

@ -0,0 +1,427 @@
[
// One of Chris suggested more vanilla prototypes.
// This prototype represent a half of a normal, sink or double ribbon border,
// which looks like trapezoid from top to bottom.
//
// The bottom edge of trapezoid is from origin to +X with `long_edge_length` length.
// The length of top edge is `short_edge_length` and it just like moving bottom edge to +Y direction.
// The offset between top edge and bottom edge is always 2.5.
// The distance from the closest point of top edge, to Y axis is `short_edge_offset`.
{
"identifier": "cv_trapezoid_side",
"showcase": null,
"params": [
{
"field": "long_edge_length",
"data": "5.0"
},
{
"field": "short_edge_offset",
"data": "0.0"
},
{
"field": "short_edge_length",
"data": "5.0"
},
{
"field": "height",
"data": "5.0"
},
{
"field": "face",
"data": "(True, False, False, False, True, False)"
},
{
"field": "is_sink",
"data": "False"
},
{
"field": "is_ribbon",
"data": "False"
}
],
"skip": "long_edge_length == 0.0 or short_edge_length == 0.0",
"vars": [
{
"field": "long_edge_uv_length",
"data": "long_edge_length / 5.0"
},
{
"field": "short_edge_uv_offset",
"data": "short_edge_offset / 5.0"
},
{
"field": "short_edge_uv_length",
"data": "short_edge_length / 5.0"
},
{
"field": "short_edge_total",
"data": "short_edge_offset + short_edge_length"
},
{
"field": "short_edge_uv_total",
"data": "short_edge_uv_offset + short_edge_uv_length"
},
{
"field": "uv_border_texture",
"data": "1.0 if is_ribbon else 0.5"
},
{
"field": "sink",
"data": "0.7 if is_sink else 0.0"
}
],
"vertices": [
{
"skip": "not face[0]",
"data": "(0, 0, 0)"
},
{
"skip": "not face[0]",
"data": "(short_edge_offset, 2.5, -sink)"
},
{
"skip": "not face[0]",
"data": "(long_edge_length, 0, 0)"
},
{
"skip": "not face[0]",
"data": "(short_edge_total, 2.5, -sink)"
}
],
"faces": [
{
"skip": "not face[0]",
"texture": "(\"FloorTopFlat\" if is_ribbon else \"FloorTopProfil\") if is_sink else \"FloorTopBorder\"",
"indices": [0, 2, 3, 1],
"uvs": [
"(0, 0)",
"(0, long_edge_uv_length)",
"(uv_border_texture, short_edge_uv_total)",
"(uv_border_texture, short_edge_uv_offset)"
],
"normals": null
}
],
"instances": [
{
"identifier": "raw_floor_side",
"skip": "not face[4]",
"params": {
"height": "height",
"length": "long_edge_length",
"is_left_sink": "False",
"is_right_sink": "False"
},
"transform": "ident()"
},
{
"identifier": "raw_floor_side",
"skip": "not face[2]",
"params": {
"height": "height",
"length": "distance(0, 0, short_edge_offset, 2.5)",
"is_left_sink": "False",
"is_right_sink": "is_sink"
},
"transform": "rot(0, 0, angle(0, 0, short_edge_offset, 2.5)) @ scale(1, -1, 1)"
},
{
"identifier": "raw_floor_side",
"skip": "not face[3]",
"params": {
"height": "height",
"length": "distance(long_edge_length, 0, short_edge_total, 2.5)",
"is_left_sink": "False",
"is_right_sink": "is_sink"
},
"transform": "move(long_edge_length, 0, 0) @ rot(0, 0, angle(long_edge_length, 0, short_edge_total, 2.5))"
},
{
"identifier": "raw_floor_side",
"skip": "not face[5]",
"params": {
"height": "height",
"length": "short_edge_length",
"is_left_sink": "is_sink",
"is_right_sink": "is_sink"
},
"transform": "move(short_edge_offset, 2.5, 0) @ scale(1, -1, 1)"
},
{
"identifier": "floor_4edges_bottom",
"skip": "not face[1]",
"params": {
"top_left_pos": "(0, 0)",
"top_right_pos": "(short_edge_offset, 2.5)",
"bottom_left_pos": "(long_edge_length, 0)",
"bottom_right_pos": "(short_edge_total, 2.5)"
},
"transform": "move(0, 0, -height)"
}
]
},
// Same as previous one, but looks like triangle from top to bottom.
//
// The bottom edge is from origin to +X with `edge_length` length.
// The tip is going to +Y.
// The height of this triangle is always 2.5 and the offset between tip and Y axis is `tip_offset`.
{
"identifier": "cv_triangle_side",
"showcase": null,
"params": [
{
"field": "edge_length",
"data": "5.0"
},
{
"field": "tip_offset",
"data": "2.5"
},
{
"field": "height",
"data": "5.0"
},
{
"field": "face",
"data": "(True, False, False, False, True, None)"
},
{
"field": "is_sink",
"data": "False"
}
],
"skip": "edge_length == 0.0",
"vars": [
{
"field": "edge_uv_length",
"data": "edge_length / 5.0"
},
{
"field": "tip_uv_offset",
"data": "tip_offset / 5.0"
},
{
"field": "sink",
"data": "0.7 if is_sink else 0.0"
}
],
"vertices": [
{
"skip": "not face[0]",
"data": "(0, 0, 0)"
},
{
"skip": "not face[0]",
"data": "(tip_offset, 2.5, -sink)"
},
{
"skip": "not face[0]",
"data": "(edge_length, 0, 0)"
}
],
"faces": [
{
"skip": "not face[0]",
"texture": "\"FloorTopProfil\" if is_sink else \"FloorTopBorder\"",
"indices": [0, 2, 1],
"uvs": [
"(0, 0)",
"(0, edge_uv_length)",
"(0.5, tip_uv_offset)"
],
"normals": null
}
],
"instances": [
{
"identifier": "raw_floor_side",
"skip": "not face[4]",
"params": {
"height": "height",
"length": "edge_length",
"is_left_sink": "False",
"is_right_sink": "False"
},
"transform": "ident()"
},
{
"identifier": "raw_floor_side",
"skip": "not face[2]",
"params": {
"height": "height",
"length": "distance(0, 0, tip_offset, 2.5)",
"is_left_sink": "False",
"is_right_sink": "is_sink"
},
"transform": "rot(0, 0, angle(0, 0, tip_offset, 2.5)) @ scale(1, -1, 1)"
},
{
"identifier": "raw_floor_side",
"skip": "not face[3]",
"params": {
"height": "height",
"length": "distance(edge_length, 0, tip_offset, 2.5)",
"is_left_sink": "False",
"is_right_sink": "is_sink"
},
"transform": "move(edge_length, 0, 0) @ rot(0, 0, angle(edge_length, 0, tip_offset, 2.5))"
},
{
"identifier": "floor_triangle_bottom",
"skip": "not face[1]",
"params": {
"length": "edge_length",
"width": "2.5",
"tip_offset": "tip_offset"
},
"transform": "move(0, 0, -height)"
}
]
},
{
"identifier": "cv_triangle_center",
"showcase": null,
"params": [
{
"field": "height",
"data": "5.0"
},
{
"field": "face",
"data": "(True, False, False, False, True, None)"
},
{
"field": "is_sink",
"data": "False"
}
],
"skip": "False",
"vars": [
{
"field": "sink",
"data": "0.7 if is_sink else 0.0"
}
],
"vertices": [
{
"skip": "not face[0]",
"data": "(0, 0, 0)"
},
{
"skip": "not face[0]",
"data": "(5, 0, 0)"
},
{
"skip": "not face[0]",
"data": "(2.5, 2.5, -sink)"
},
{
"skip": "(not face[0]) or (not is_sink)",
"data": "(2.5, 0, -sink)"
}
],
"faces": [
{
"skip": "(not face[0]) or is_sink",
"texture": "\"FloorTopFlat\"",
"indices": [0, 1, 2],
"uvs": [
"(0, 0)",
"(1, 0)",
"(0.5, 0.5)"
],
"normals": null
},
{
"skip": "(not face[0]) or (not is_sink)",
"texture": "\"FloorTopProfil\"",
"indices": [0, 3, 2],
"uvs": [
"(0, 0)",
"(0.5, 0)",
"(0.5, 0.5)"
],
"normals": null
},
{
"skip": "(not face[0]) or (not is_sink)",
"texture": "\"FloorTopProfil\"",
"indices": [3, 1, 2],
"uvs": [
"(0.5, 0)",
"(1, 0)",
"(0.5, 0.5)"
],
"normals": null
}
],
"instances": [
{
"identifier": "raw_floor_side",
"skip": "not face[2]",
"params": {
"height": "height",
"length": "distance(0, 0, 2.5, 2.5)",
"is_left_sink": "False",
"is_right_sink": "is_sink"
},
"transform": "rot(0, 0, 45)"
},
{
"identifier": "raw_floor_side",
"skip": "not face[3]",
"params": {
"height": "height",
"length": "distance(5, 0, 2.5, 2.5)",
"is_left_sink": "False",
"is_right_sink": "is_sink"
},
"transform": "move(5, 0, 0) @ rot(0, 0, 135)"
},
{
"identifier": "raw_floor_side",
"skip": "(not face[4]) or (not is_sink)",
"params": {
"height": "height",
"length": "2.5",
"is_left_sink": "False",
"is_right_sink": "True"
},
"transform": "ident()"
},
{
"identifier": "raw_floor_side",
"skip": "(not face[4]) or (not is_sink)",
"params": {
"height": "height",
"length": "2.5",
"is_left_sink": "True",
"is_right_sink": "False"
},
"transform": "move(2.5, 0, 0)"
},
{
"identifier": "raw_floor_side",
"skip": "(not face[4]) or is_sink",
"params": {
"height": "height",
"length": "5",
"is_left_sink": "False",
"is_right_sink": "False"
},
"transform": "ident()"
},
{
"identifier": "floor_triangle_bottom",
"skip": "not face[1]",
"params": {
"length": "5",
"width": "2.5",
"tip_offset": "2.5"
},
"transform": "move(0, 0, -height)"
}
]
}
]

466
assets/jsons/corners.json5 Normal file
View File

@ -0,0 +1,466 @@
[
{
"identifier": "raw_floor_corner",
"showcase": null,
"params": [
{
"field": "height",
"data": "5.0"
},
{
"field": "face",
"data": "(True, False, False, False, False, False)"
},
{
"field": "is_sink",
"data": "False"
},
{
"field": "is_inner",
"data": "False"
},
{
"field": "is_ribbon",
"data": "False"
}
],
"skip": "False",
"vars": [
{
"field": "PXPY_sink",
"data": "0.7 if (is_sink and (not is_inner)) else 0"
},
{
"field": "NXNY_sink",
"data": "0.7 if (is_sink and is_inner) else 0"
},
{
"field": "PXPY_uv",
"data": "(0 if is_inner else 0.5) * (2 if is_ribbon else 1)"
},
{
"field": "NXNY_uv",
"data": "(0.5 if is_inner else 0) * (2 if is_ribbon else 1)"
},
{
"field": "corner_texture",
"data": "(\"FloorTopFlat\" if is_ribbon else \"FloorTopProfil\") if is_sink else \"FloorTopBorder\""
}
],
"vertices": [
{
"skip": "not face[0]",
"data": "(0, 0, -NXNY_sink)"
},
{
"skip": "not face[0]",
"data": "(2.5, 0, -NXNY_sink)"
},
{
"skip": "not face[0]",
"data": "(2.5, 2.5, -PXPY_sink)"
},
{
"skip": "not face[0]",
"data": "(0, 2.5, -NXNY_sink)"
}
],
"faces": [
{
"skip": "not face[0]",
"texture": "corner_texture",
"indices": [0, 1, 2],
"uvs": [
"(NXNY_uv, 0.5)",
"(NXNY_uv, 0)",
"(PXPY_uv, 0)"
],
"normals": null
},
{
"skip": "not face[0]",
"texture": "corner_texture",
"indices": [0, 2, 3],
"uvs": [
"(NXNY_uv, 0.5)",
"(PXPY_uv, 0)",
"(NXNY_uv, 0)"
],
"normals": null
}
],
"instances": [
{
"identifier": "raw_floor_side",
"skip": "not face[4]",
"params": {
"height": "height",
"length": "2.5",
"is_left_sink": "NXNY_sink != 0",
"is_right_sink": "NXNY_sink != 0"
},
"transform": "ident()"
},
{
"identifier": "raw_floor_side",
"skip": "not face[2]",
"params": {
"height": "height",
"length": "2.5",
"is_left_sink": "NXNY_sink != 0",
"is_right_sink": "NXNY_sink != 0"
},
"transform": "move(0, 2.5, 0) @ rot(0, 0, -90)"
},
{
"identifier": "raw_floor_side",
"skip": "not face[3]",
"params": {
"height": "height",
"length": "2.5",
"is_left_sink": "NXNY_sink != 0",
"is_right_sink": "PXPY_sink != 0"
},
"transform": "move(2.5, 0, 0) @ rot(0, 0, 90)"
},
{
"identifier": "raw_floor_side",
"skip": "not face[5]",
"params": {
"height": "height",
"length": "2.5",
"is_left_sink": "PXPY_sink != 0",
"is_right_sink": "NXNY_sink != 0"
},
"transform": "move(2.5, 2.5, 0) @ rot(0, 0, 180)"
},
{
"identifier": "floor_rectangle_bottom",
"skip": "not face[1]",
"params": {
"length": "2.5",
"width": "2.5"
},
"transform": "move(0, 0, -height)"
}
]
},
{
"identifier": "floor_normal_inner_corner",
"showcase": {
"title": "Normal Inner Corner",
"category": "Half Block Corners",
"icon": "NormalInnerCorner",
"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, False, False, False, False)"
}
]
},
"params": [
{
"field": "height",
"data": "height_"
},
{
"field": "face",
"data": "face_"
}
],
"skip": "False",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "raw_floor_corner",
"skip": "False",
"params": {
"height": "height",
"face": "face",
"is_sink": "False",
"is_inner": "True",
"is_ribbon": "False"
},
"transform": "ident()"
}
]
},
{
"identifier": "floor_sink_inner_corner",
"showcase": {
"title": "Sink Inner Corner",
"category": "Half Block Corners",
"icon": "SinkInnerCorner",
"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, False, False, False, False)"
}
]
},
"params": [
{
"field": "height",
"data": "height_"
},
{
"field": "face",
"data": "face_"
}
],
"skip": "False",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "raw_floor_corner",
"skip": "False",
"params": {
"height": "height",
"face": "face",
"is_sink": "True",
"is_inner": "True",
"is_ribbon": "False"
},
"transform": "ident()"
}
]
},
{
"identifier": "floor_ribbon_inner_corner",
"showcase": {
"title": "Ribbon Inner Corner",
"category": "Half Block Corners",
"icon": "RibbonInnerCorner",
"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, False, False, False, False)"
}
]
},
"params": [
{
"field": "height",
"data": "height_"
},
{
"field": "face",
"data": "face_"
}
],
"skip": "False",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "raw_floor_corner",
"skip": "False",
"params": {
"height": "height",
"face": "face",
"is_sink": "True",
"is_inner": "True",
"is_ribbon": "True"
},
"transform": "ident()"
}
]
},
{
"identifier": "floor_normal_outter_corner",
"showcase": {
"title": "Normal Outter Corner",
"category": "Half Block Corners",
"icon": "NormalOutterCorner",
"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, False, True, False)"
}
]
},
"params": [
{
"field": "height",
"data": "height_"
},
{
"field": "face",
"data": "face_"
}
],
"skip": "False",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "raw_floor_corner",
"skip": "False",
"params": {
"height": "height",
"face": "face",
"is_sink": "False",
"is_inner": "False",
"is_ribbon": "False"
},
"transform": "ident()"
}
]
},
{
"identifier": "floor_sink_outter_corner",
"showcase": {
"title": "Sink Outter Corner",
"category": "Half Block Corners",
"icon": "SinkOutterCorner",
"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, False, True, False)"
}
]
},
"params": [
{
"field": "height",
"data": "height_"
},
{
"field": "face",
"data": "face_"
}
],
"skip": "False",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "raw_floor_corner",
"skip": "False",
"params": {
"height": "height",
"face": "face",
"is_sink": "True",
"is_inner": "False",
"is_ribbon": "False"
},
"transform": "ident()"
}
]
},
{
"identifier": "floor_ribbon_outter_corner",
"showcase": {
"title": "Ribbon Outter Corner",
"category": "Half Block Corners",
"icon": "RibbonOutterCorner",
"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, False, True, False)"
}
]
},
"params": [
{
"field": "height",
"data": "height_"
},
{
"field": "face",
"data": "face_"
}
],
"skip": "False",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "raw_floor_corner",
"skip": "False",
"params": {
"height": "height",
"face": "face",
"is_sink": "True",
"is_inner": "False",
"is_ribbon": "True"
},
"transform": "ident()"
}
]
}
]

View File

@ -0,0 +1,533 @@
[
{
"identifier": "raw_floor_l_crossing",
"showcase": null,
"params": [
{
"field": "height",
"data": "5.0"
},
{
"field": "face",
"data": "(True, False, True, False, True, False)"
},
{
"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[4], None)",
"is_sink": "is_sink"
},
"transform": "ident()"
},
{
"identifier": "cv_triangle_center",
"skip": "False",
"params": {
"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_center",
"skip": "False",
"params": {
"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, -90)"
},
{
"identifier": "floor_rectangle_bottom",
"skip": "not face[1]",
"params": {
"length": "5",
"width": "5"
},
"transform": "move(0, 0, -height)"
}
]
},
{
"identifier": "raw_floor_t_crossing",
"showcase": null,
"params": [
{
"field": "height",
"data": "5.0"
},
{
"field": "face",
"data": "(True, False, True, False, False, False)"
},
{
"field": "is_sink",
"data": "False"
}
],
"skip": "False",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "cv_triangle_center",
"skip": "False",
"params": {
"height": "height",
"face": "(face[0], False, False, False, face[4], None)",
"is_sink": "is_sink"
},
"transform": "ident()"
},
{
"identifier": "cv_triangle_center",
"skip": "False",
"params": {
"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_center",
"skip": "False",
"params": {
"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, -90)"
},
{
"identifier": "floor_rectangle_bottom",
"skip": "not face[1]",
"params": {
"length": "5",
"width": "5"
},
"transform": "move(0, 0, -height)"
}
]
},
{
"identifier": "raw_floor_x_crossing",
"showcase": null,
"params": [
{
"field": "height",
"data": "5.0"
},
{
"field": "face",
"data": "(True, False, False, False, False, False)"
},
{
"field": "is_sink",
"data": "False"
}
],
"skip": "False",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "cv_triangle_center",
"skip": "False",
"params": {
"height": "height",
"face": "(face[0], False, False, False, face[4], None)",
"is_sink": "is_sink"
},
"transform": "ident()"
},
{
"identifier": "cv_triangle_center",
"skip": "False",
"params": {
"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_center",
"skip": "False",
"params": {
"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_center",
"skip": "False",
"params": {
"height": "height",
"face": "(face[0], False, False, False, face[2], None)",
"is_sink": "is_sink"
},
"transform": "move(0, 5, 0) @ rot(0, 0, -90)"
},
{
"identifier": "floor_rectangle_bottom",
"skip": "not face[1]",
"params": {
"length": "5",
"width": "5"
},
"transform": "move(0, 0, -height)"
}
]
},
{
"identifier": "floor_normal_l_crossing",
"showcase": {
"title": "Normal L Crossing",
"category": "Floor Crossings",
"icon": "NormalLCrossing",
"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, False, True, False)"
}
]
},
"params": [
{
"field": "height",
"data": "height_"
},
{
"field": "face",
"data": "face_"
}
],
"skip": "False",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "raw_floor_l_crossing",
"skip": "False",
"params": {
"height": "height",
"face": "face",
"is_sink": "False"
},
"transform": "ident()"
}
]
},
{
"identifier": "floor_sink_l_crossing",
"showcase": {
"title": "Sink L Crossing",
"category": "Floor Crossings",
"icon": "SinkLCrossing",
"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, False, True, False)"
}
]
},
"params": [
{
"field": "height",
"data": "height_"
},
{
"field": "face",
"data": "face_"
}
],
"skip": "False",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "raw_floor_l_crossing",
"skip": "False",
"params": {
"height": "height",
"face": "face",
"is_sink": "True"
},
"transform": "ident()"
}
]
},
{
"identifier": "floor_normal_t_crossing",
"showcase": {
"title": "Normal T Crossing",
"category": "Floor Crossings",
"icon": "NormalTCrossing",
"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, False, False, False)"
}
]
},
"params": [
{
"field": "height",
"data": "height_"
},
{
"field": "face",
"data": "face_"
}
],
"skip": "False",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "raw_floor_t_crossing",
"skip": "False",
"params": {
"height": "height",
"face": "face",
"is_sink": "False"
},
"transform": "ident()"
}
]
},
{
"identifier": "floor_sink_t_crossing",
"showcase": {
"title": "Sink T Crossing",
"category": "Floor Crossings",
"icon": "SinkTCrossing",
"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, False, False, False)"
}
]
},
"params": [
{
"field": "height",
"data": "height_"
},
{
"field": "face",
"data": "face_"
}
],
"skip": "False",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "raw_floor_t_crossing",
"skip": "False",
"params": {
"height": "height",
"face": "face",
"is_sink": "True"
},
"transform": "ident()"
}
]
},
{
"identifier": "floor_normal_x_crossing",
"showcase": {
"title": "Normal X Crossing",
"category": "Floor Crossings",
"icon": "NormalXCrossing",
"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, False, False, False, False)"
}
]
},
"params": [
{
"field": "height",
"data": "height_"
},
{
"field": "face",
"data": "face_"
}
],
"skip": "False",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "raw_floor_x_crossing",
"skip": "False",
"params": {
"height": "height",
"face": "face",
"is_sink": "False"
},
"transform": "ident()"
}
]
},
{
"identifier": "floor_sink_x_crossing",
"showcase": {
"title": "Sink X Crossing",
"category": "Floor Crossings",
"icon": "SinkXCrossing",
"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, False, False, False, False)"
}
]
},
"params": [
{
"field": "height",
"data": "height_"
},
{
"field": "face",
"data": "face_"
}
],
"skip": "False",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "raw_floor_x_crossing",
"skip": "False",
"params": {
"height": "height",
"face": "face",
"is_sink": "True"
},
"transform": "ident()"
}
]
}
]

172
assets/jsons/flat.json5 Normal file
View File

@ -0,0 +1,172 @@
[
{
"identifier": "floor_flat",
"showcase": {
"title": "Flat",
"category": "Miscellaneous",
"icon": "Flat",
"type": "floor",
"cfgs": [
{
"field": "height_",
"type": "float",
"title": "Height",
"desc": "The height of block.",
"default": "5.0"
},
{
"field": "length_",
"type": "float",
"title": "Length",
"desc": "The length of block.",
"default": "2.5"
},
{
"field": "width_",
"type": "float",
"title": "Width",
"desc": "The width of block.",
"default": "2.5"
},
{
"field": "face_",
"type": "face",
"title": "Face",
"desc": "Whether has some faces.",
"default": "(True, False, False, False, False, False)"
},
{
"field": "is_sink_",
"type": "bool",
"title": "Is Sink",
"desc": "Whether this flat floor is used for sink floor.",
"default": "False"
}
]
},
"params": [
{
"field": "height",
"data": "height_"
},
{
"field": "length",
"data": "length_"
},
{
"field": "width",
"data": "width_"
},
{
"field": "face",
"data": "face_"
},
{
"field": "is_sink",
"data": "is_sink_"
}
],
"skip": "length == 0.0 or width == 0.0",
"vars": [
{
"field": "sink",
"data": "0.7 if is_sink else 0"
},
{
"field": "uv_length",
"data": "length / 5.0"
},
{
"field": "uv_width",
"data": "width / 5.0"
}
],
"vertices": [
{
"skip": "False",
"data": "(0, 0, -sink)"
},
{
"skip": "False",
"data": "(length, 0, -sink)"
},
{
"skip": "False",
"data": "(length, width, -sink)"
},
{
"skip": "False",
"data": "(0, width, -sink)"
}
],
"faces": [
{
"skip": "not face[0]",
"texture": "\"FloorTopBorderless\"",
"indices": [0, 1, 2, 3],
"uvs": [
"(0, 0)",
"(uv_length, 0)",
"(uv_length, uv_width)",
"(0, uv_width)"
],
"normals": null
}
],
"instances": [
{
"identifier": "raw_floor_side",
"skip": "not face[4]",
"params": {
"height": "height",
"length": "length",
"is_left_sink": "is_sink",
"is_right_sink": "is_sink"
},
"transform": "ident()"
},
{
"identifier": "raw_floor_side",
"skip": "not face[2]",
"params": {
"height": "height",
"length": "width",
"is_left_sink": "is_sink",
"is_right_sink": "is_sink"
},
"transform": "move(0, width, 0) @ rot(0, 0, -90)"
},
{
"identifier": "raw_floor_side",
"skip": "not face[3]",
"params": {
"height": "height",
"length": "width",
"is_left_sink": "is_sink",
"is_right_sink": "is_sink"
},
"transform": "move(length, 0, 0) @ rot(0, 0, 90)"
},
{
"identifier": "raw_floor_side",
"skip": "not face[5]",
"params": {
"height": "height",
"length": "length",
"is_left_sink": "is_sink",
"is_right_sink": "is_sink"
},
"transform": "move(length, width, 0) @ rot(0, 0, 180)"
},
{
"identifier": "floor_rectangle_bottom",
"skip": "not face[1]",
"params": {
"length": "length",
"width": "width"
},
"transform": "move(0, 0, -height)"
}
]
}
]

View File

@ -0,0 +1,343 @@
[
{
"identifier": "raw_floor_platform",
"showcase": null,
"params": [
{
"field": "height",
"data": "5.0"
},
{
"field": "length",
"data": "5.0"
},
{
"field": "width",
"data": "5.0"
},
{
"field": "face",
"data": "(True, False, True, True, True, True)"
},
{
"field": "is_sink",
"data": "False"
},
{
"field": "is_ribbon",
"data": "False"
}
],
"skip": "False",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "cv_trapezoid_side",
"skip": "False",
"params": {
"long_edge_length": "length + 5",
"short_edge_offset": "2.5",
"short_edge_length": "length",
"height": "height",
"face": "(face[0], False, False, False, face[4], False)",
"is_sink": "is_sink",
"is_ribbon": "is_ribbon"
},
"transform": "ident()"
},
{
"identifier": "cv_trapezoid_side",
"skip": "False",
"params": {
"long_edge_length": "length + 5",
"short_edge_offset": "2.5",
"short_edge_length": "length",
"height": "height",
"face": "(face[0], False, False, False, face[5], False)",
"is_sink": "is_sink",
"is_ribbon": "is_ribbon"
},
"transform": "move(0, 5 + width, 0) @ scale(1, -1, 1)"
},
{
"identifier": "cv_trapezoid_side",
"skip": "False",
"params": {
"long_edge_length": "width + 5",
"short_edge_offset": "2.5",
"short_edge_length": "width",
"height": "height",
"face": "(face[0], False, False, False, face[3], False)",
"is_sink": "is_sink",
"is_ribbon": "is_ribbon"
},
"transform": "move(5 + length, 0, 0) @ rot(0, 0, 90)"
},
{
"identifier": "cv_trapezoid_side",
"skip": "False",
"params": {
"long_edge_length": "width + 5",
"short_edge_offset": "2.5",
"short_edge_length": "width",
"height": "height",
"face": "(face[0], False, False, False, face[2], False)",
"is_sink": "is_sink",
"is_ribbon": "is_ribbon"
},
"transform": "rot(0, 0, 90) @ scale(1, -1, 1)"
},
{
"identifier": "floor_flat",
"skip": "False",
"params": {
"height": "height",
"length": "length",
"width": "width",
"face": "(face[0], False, False, False, False, False)",
"is_sink": "is_sink"
},
"transform": "move(2.5, 2.5, 0)"
},
{
"identifier": "floor_rectangle_bottom",
"skip": "not face[1]",
"params": {
"length": "5 + length",
"width": "5 + width"
},
"transform": "move(0, 0, -height)"
}
]
},
{
"identifier": "floor_normal_platform",
"showcase": {
"title": "Normal Platform",
"category": "Platforms",
"icon": "NormalPlatform",
"type": "floor",
"cfgs": [
{
"field": "length_",
"type": "float",
"title": "Length",
"desc": "The length of block.",
"default": "2.5"
},
{
"field": "width_",
"type": "float",
"title": "Width",
"desc": "The width of block.",
"default": "2.5"
},
{
"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": "length",
"data": "length_"
},
{
"field": "width",
"data": "width_"
},
{
"field": "face",
"data": "face_"
}
],
"skip": "False",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "raw_floor_platform",
"skip": "False",
"params": {
"length": "length",
"width": "width",
"height": "height",
"face": "face",
"is_sink": "False",
"is_ribbon": "False"
},
"transform": "ident()"
}
]
},
{
"identifier": "floor_sink_platform",
"showcase": {
"title": "Sink Platform",
"category": "Platforms",
"icon": "SinkPlatform",
"type": "floor",
"cfgs": [
{
"field": "length_",
"type": "float",
"title": "Length",
"desc": "The length of block.",
"default": "2.5"
},
{
"field": "width_",
"type": "float",
"title": "Width",
"desc": "The width of block.",
"default": "2.5"
},
{
"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": "length",
"data": "length_"
},
{
"field": "width",
"data": "width_"
},
{
"field": "face",
"data": "face_"
}
],
"skip": "False",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "raw_floor_platform",
"skip": "False",
"params": {
"length": "length",
"width": "width",
"height": "height",
"face": "face",
"is_sink": "True",
"is_ribbon": "False"
},
"transform": "ident()"
}
]
},
{
"identifier": "floor_ribbon_platform",
"showcase": {
"title": "Ribbon Platform",
"category": "Platforms",
"icon": "RibbonPlatform",
"type": "floor",
"cfgs": [
{
"field": "length_",
"type": "float",
"title": "Length",
"desc": "The length of block.",
"default": "2.5"
},
{
"field": "width_",
"type": "float",
"title": "Width",
"desc": "The width of block.",
"default": "2.5"
},
{
"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": "length",
"data": "length_"
},
{
"field": "width",
"data": "width_"
},
{
"field": "face",
"data": "face_"
}
],
"skip": "False",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "raw_floor_platform",
"skip": "False",
"params": {
"length": "length",
"width": "width",
"height": "height",
"face": "face",
"is_sink": "True",
"is_ribbon": "True"
},
"transform": "ident()"
}
]
}
]

324
assets/jsons/sides.json5 Normal file
View File

@ -0,0 +1,324 @@
[
{
"identifier": "raw_floor_side",
"showcase": null,
"params": [
{
"field": "height",
"data": "5.0"
},
{
"field": "length",
"data": "5.0"
},
{
"field": "is_left_sink",
"data": "False"
},
{
"field": "is_right_sink",
"data": "False"
}
],
"skip": "height <= (0.7 if (is_left_sink or is_right_sink) else 0.0) or length == 0.0",
"vars": [
{
"field": "skip_long_side",
"data": "height <= 5.0"
},
{
"field": "skip_short_side",
"data": "height > 5.0"
},
{
"field": "uv_height",
"data": "height / 5.0"
},
{
"field": "uv_length",
"data": "length / 5.0"
},
{
"field": "left_sink",
"data": "0.7 if is_left_sink else 0.0"
},
{
"field": "right_sink",
"data": "0.7 if is_right_sink else 0.0"
},
{
"field": "uv_left_sink",
"data": "left_sink / 5.0"
},
{
"field": "uv_right_sink",
"data": "right_sink / 5.0"
}
],
"vertices": [
{
"skip": "False",
"data": "(0, 0, -left_sink)"
},
{
"skip": "False",
"data": "(length, 0, -right_sink)"
},
{
"skip": "skip_long_side",
"data": "(0, 0, -5.0)"
},
{
"skip": "skip_long_side",
"data": "(length, 0, -5.0)"
},
{
"skip": "False",
"data": "(0, 0, -height)"
},
{
"skip": "False",
"data": "(length, 0, -height)"
}
],
"faces": [
{
"skip": "skip_short_side",
"texture": "\"FloorSide\"",
"indices": [0, 2, 3, 1],
"uvs": [
"(0, 0)",
"(uv_height - uv_left_sink, 0)",
"(uv_height - uv_right_sink, uv_length)",
"(0, uv_length)"
],
"normals": null
},
{
"skip": "skip_long_side",
"texture": "\"LightingFloorTopBorder\"",
"indices": [0, 2, 3, 1],
"uvs": [
"(0, 0)",
"(1 - uv_left_sink, 0)",
"(1 - uv_right_sink, uv_length)",
"(0, uv_length)"
],
"normals": null
},
{
"skip": "skip_long_side",
"texture": "\"LightingFloorTopBorderless\"",
"indices": [2, 4, 5, 3],
"uvs": [
"(0, 0)",
"(uv_height - 1.0, 0)",
"(uv_height - 1.0, uv_length)",
"(0, uv_length)"
],
"normals": null
}
],
"instances": []
},
{
"identifier": "floor_4edges_bottom",
"showcase": null,
"params": [
{
"field": "top_left_pos",
"data": "(0.0, 0.0)"
},
{
"field": "top_right_pos",
"data": "(0.0, 5.0)"
},
{
"field": "bottom_left_pos",
"data": "(5.0, 0.0)"
},
{
"field": "bottom_right_pos",
"data": "(5.0, 5.0)"
}
],
"skip": "False",
"vars": [
{
"field": "top_left_uv",
"data": "tuple(map(lambda x: x / 5.0, top_left_pos))"
},
{
"field": "top_right_uv",
"data": "tuple(map(lambda x: x / 5.0, top_right_pos))"
},
{
"field": "bottom_left_uv",
"data": "tuple(map(lambda x: x / 5.0, bottom_left_pos))"
},
{
"field": "bottom_right_uv",
"data": "tuple(map(lambda x: x / 5.0, bottom_right_pos))"
}
],
"vertices": [
{
"skip": "False",
"data": "top_left_pos + (0, )"
},
{
"skip": "False",
"data": "top_right_pos + (0, )"
},
{
"skip": "False",
"data": "bottom_left_pos + (0, )"
},
{
"skip": "False",
"data": "bottom_right_pos + (0, )"
}
],
"faces": [
{
"skip": "False",
"texture": "\"FloorTopBorderless\"",
"indices": [0, 1, 3, 2],
"uvs": [
"top_left_uv",
"top_right_uv",
"bottom_right_uv",
"bottom_left_uv"
],
"normals": null
}
],
"instances": []
},
{
"identifier": "floor_3edges_bottom",
"showcase": null,
"params": [
{
"field": "top_pos",
"data": "(0.0, 0.0)"
},
{
"field": "bottom_pos",
"data": "(5.0, 0.0)"
},
{
"field": "tip_pos",
"data": "(2.5, 2.5)"
}
],
"skip": "False",
"vars": [
{
"field": "top_uv",
"data": "tuple(map(lambda x: x / 5.0, top_pos))"
},
{
"field": "bottom_uv",
"data": "tuple(map(lambda x: x / 5.0, bottom_pos))"
},
{
"field": "tip_uv",
"data": "tuple(map(lambda x: x / 5.0, tip_pos))"
}
],
"vertices": [
{
"skip": "False",
"data": "top_pos + (0, )"
},
{
"skip": "False",
"data": "bottom_pos + (0, )"
},
{
"skip": "False",
"data": "tip_pos + (0, )"
}
],
"faces": [
{
"skip": "False",
"texture": "\"FloorTopBorderless\"",
"indices": [0, 2, 1],
"uvs": [
"top_uv",
"tip_uv",
"bottom_uv"
],
"normals": null
}
],
"instances": []
},
{
"identifier": "floor_rectangle_bottom",
"showcase": null,
"params": [
{
"field": "length",
"data": "5.0"
},
{
"field": "width",
"data": "5.0"
}
],
"skip": "length == 0.0 or width == 0.0",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "floor_4edges_bottom",
"skip": "False",
"params": {
"top_left_pos": "(0, 0)",
"top_right_pos": "(0, width)",
"bottom_left_pos": "(length, 0)",
"bottom_right_pos": "(length, width)"
},
"transform": "ident()"
}
]
},
{
"identifier": "floor_triangle_bottom",
"showcase": null,
"params": [
{
"field": "length",
"data": "5.0"
},
{
"field": "width",
"data": "2.5"
},
{
"field": "tip_offset",
"data": "2.5"
}
],
"skip": "length == 0.0",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "floor_3edges_bottom",
"skip": "False",
"params": {
"top_pos": "(0, 0)",
"bottom_pos": "(length, 0)",
"tip_pos": "(tip_offset, width)"
},
"transform": "ident()"
}
]
}
]

324
assets/jsons/streets.json5 Normal file
View File

@ -0,0 +1,324 @@
[
{
"identifier": "floor_normal_straight",
"showcase": {
"title": "Normal Floor",
"category": "Floors",
"icon": "NormalFloor",
"type": "floor",
"cfgs": [
{
"field": "height_",
"type": "float",
"title": "Height",
"desc": "The height of block.",
"default": "5.0"
},
{
"field": "length_",
"type": "float",
"title": "Length",
"desc": "The length of block.",
"default": "2.5"
},
{
"field": "face_",
"type": "face",
"title": "Face",
"desc": "Whether has some faces.",
"default": "(True, False, False, False, True, True)"
}
]
},
"params": [
{
"field": "height",
"data": "height_"
},
{
"field": "length",
"data": "length_"
},
{
"field": "face",
"data": "face_"
}
],
"skip": "length == 0",
"vars": [
{
"field": "length_uv",
"data": "length / 5.0"
}
],
"vertices": [
{
"skip": "not face[0]",
"data": "(0, 0, 0)"
},
{
"skip": "not face[0]",
"data": "(length, 0, 0)"
},
{
"skip": "not face[0]",
"data": "(length, 5, 0)"
},
{
"skip": "not face[0]",
"data": "(0, 5, 0)"
}
],
"faces": [
{
"skip": "not face[0]",
"texture": "\"FloorTopFlat\"",
"indices": [0, 1, 2, 3],
"uvs": [
"(0, 0)",
"(0, length_uv)",
"(1, length_uv)",
"(1, 0)"
],
"normals": null
}
],
"instances": [
{
"identifier": "raw_floor_side",
"skip": "not face[2]",
"params": {
"height": "height",
"length": "5",
"is_left_sink": "False",
"is_right_sink": "False"
},
"transform": "rot(0, 0, 90) @ scale(1, -1, 1)"
},
{
"identifier": "raw_floor_side",
"skip": "not face[3]",
"params": {
"height": "height",
"length": "5",
"is_left_sink": "False",
"is_right_sink": "False"
},
"transform": "move(length, 0, 0) @ rot(0, 0, 90)"
},
{
"identifier": "raw_floor_side",
"skip": "not face[4]",
"params": {
"height": "height",
"length": "length",
"is_left_sink": "False",
"is_right_sink": "False"
},
"transform": "ident()"
},
{
"identifier": "raw_floor_side",
"skip": "not face[5]",
"params": {
"height": "height",
"length": "length",
"is_left_sink": "False",
"is_right_sink": "False"
},
"transform": "move(0, 5, 0) @ scale(1, -1, 1)"
},
{
"identifier": "floor_rectangle_bottom",
"skip": "not face[1]",
"params": {
"length": "length",
"width": "5"
},
"transform": "move(0, 0, -height)"
}
]
},
{
"identifier": "floor_sink_straight",
"showcase": {
"title": "Sink Floor",
"category": "Floors",
"icon": "SinkFloor",
"type": "floor",
"cfgs": [
{
"field": "height_",
"type": "float",
"title": "Height",
"desc": "The height of block.",
"default": "5.0"
},
{
"field": "length_",
"type": "float",
"title": "Length",
"desc": "The length of block.",
"default": "2.5"
},
{
"field": "face_",
"type": "face",
"title": "Face",
"desc": "Whether has some faces.",
"default": "(True, False, False, False, True, True)"
}
]
},
"params": [
{
"field": "height",
"data": "height_"
},
{
"field": "length",
"data": "length_"
},
{
"field": "face",
"data": "face_"
}
],
"skip": "length == 0",
"vars": [
{
"field": "length_uv",
"data": "length / 5.0"
}
],
"vertices": [
{
"skip": "not face[0]",
"data": "(0, 0, 0)"
},
{
"skip": "not face[0]",
"data": "(length, 0, 0)"
},
{
"skip": "not face[0]",
"data": "(length, 2.5, -0.7)"
},
{
"skip": "not face[0]",
"data": "(0, 2.5, -0.7)"
},
{
"skip": "not face[0]",
"data": "(length, 5, 0)"
},
{
"skip": "not face[0]",
"data": "(0, 5, 0)"
}
],
"faces": [
{
"skip": "not face[0]",
"texture": "\"FloorTopProfil\"",
"indices": [0, 1, 2, 3],
"uvs": [
"(0, 0)",
"(0, length_uv)",
"(0.5, length_uv)",
"(0.5, 0)"
],
"normals": null
},
{
"skip": "not face[0]",
"texture": "\"FloorTopProfil\"",
"indices": [3, 2, 4, 5],
"uvs": [
"(0.5, 0)",
"(0.5, length_uv)",
"(1, length_uv)",
"(1, 0)"
],
"normals": null
}
],
"instances": [
{
"identifier": "raw_floor_side",
"skip": "not face[2]",
"params": {
"height": "height",
"length": "2.5",
"is_left_sink": "False",
"is_right_sink": "True"
},
"transform": "rot(0, 0, 90) @ scale(1, -1, 1)"
},
{
"identifier": "raw_floor_side",
"skip": "not face[2]",
"params": {
"height": "height",
"length": "2.5",
"is_left_sink": "True",
"is_right_sink": "False"
},
"transform": "move(0, 2.5, 0) @ rot(0, 0, 90) @ scale(1, -1, 1)"
},
{
"identifier": "raw_floor_side",
"skip": "not face[3]",
"params": {
"height": "height",
"length": "2.5",
"is_left_sink": "False",
"is_right_sink": "True"
},
"transform": "move(length, 0, 0) @ rot(0, 0, 90)"
},
{
"identifier": "raw_floor_side",
"skip": "not face[3]",
"params": {
"height": "height",
"length": "2.5",
"is_left_sink": "True",
"is_right_sink": "False"
},
"transform": "move(length, 2.5, 0) @ rot(0, 0, 90)"
},
{
"identifier": "raw_floor_side",
"skip": "not face[4]",
"params": {
"height": "height",
"length": "length",
"is_left_sink": "False",
"is_right_sink": "False"
},
"transform": "ident()"
},
{
"identifier": "raw_floor_side",
"skip": "not face[5]",
"params": {
"height": "height",
"length": "length",
"is_left_sink": "False",
"is_right_sink": "False"
},
"transform": "move(0, 5, 0) @ scale(1, -1, 1)"
},
{
"identifier": "floor_rectangle_bottom",
"skip": "not face[1]",
"params": {
"length": "length",
"width": "5"
},
"transform": "move(0, 0, -height)"
}
]
}
]

View File

@ -0,0 +1,178 @@
[
// The shared template prototype used by all floor terminals.
{
"identifier": "raw_floor_terminal",
"showcase": null,
"params": [
{
"field": "height",
"data": "5.0"
},
{
"field": "face",
"data": "(True, False, True, False, True, True)"
},
{
"field": "is_sink",
"data": "False"
}
],
"skip": "False",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "cv_trapezoid_side",
"skip": "False",
"params": {
"long_edge_length": "5.0",
"short_edge_offset": "2.5",
"short_edge_length": "2.5",
"height": "height",
"face": "(face[0], False, False, face[3], face[4], False)",
"is_sink": "is_sink",
"is_ribbon": "False"
},
"transform": "ident()"
},
{
"identifier": "cv_trapezoid_side",
"skip": "False",
"params": {
"long_edge_length": "5.0",
"short_edge_offset": "2.5",
"short_edge_length": "2.5",
"height": "height",
"face": "(face[0], False, False, face[3], face[5], False)",
"is_sink": "is_sink",
"is_ribbon": "False"
},
"transform": "move(0, 5, 0) @ scale(1, -1, 1)"
},
{
"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, -90)"
},
{
"identifier": "floor_rectangle_bottom",
"skip": "not face[1]",
"params": {
"length": "5",
"width": "5"
},
"transform": "move(0, 0, -height)"
}
]
},
{
"identifier": "floor_normal_terminal",
"showcase": {
"title": "Normal Floor Terminal",
"category": "Floors",
"icon": "NormalFloorTerminal",
"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, False, True, True)"
}
]
},
"params": [
{
"field": "height",
"data": "height_"
},
{
"field": "face",
"data": "face_"
}
],
"skip": "False",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "raw_floor_terminal",
"skip": "False",
"params": {
"height": "height",
"face": "face",
"is_sink": "False"
},
"transform": "ident()"
}
]
},
{
"identifier": "floor_sink_terminal",
"showcase": {
"title": "Sink Floor Terminal",
"category": "Floors",
"icon": "SinkFloorTerminal",
"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, False, True, True)"
}
]
},
"params": [
{
"field": "height",
"data": "height_"
},
{
"field": "face",
"data": "face_"
}
],
"skip": "False",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "raw_floor_terminal",
"skip": "False",
"params": {
"height": "height",
"face": "face",
"is_sink": "True"
},
"transform": "ident()"
}
]
}
]

289
assets/jsons/trafos.json5 Normal file
View File

@ -0,0 +1,289 @@
[
{
"identifier": "raw_trafo",
"showcase": null,
"params": [
{
"field": "trafo_texture",
"data": "\"BallWood\""
},
{
"field": "height",
"data": "5.0"
},
{
"field": "face",
"data": "(True, False, True, True, True, True)"
}
],
"skip": "False",
"vars": [
{
"field": "uv_height",
"data": "height / 5.0"
}
],
"vertices": [
{
"skip": "False",
"data": "(0, 0, 0)"
},
{
"skip": "False",
"data": "(5, 0, 0)"
},
{
"skip": "False",
"data": "(5, 5, 0)"
},
{
"skip": "False",
"data": "(0, 5, 0)"
},
{
"skip": "False",
"data": "(0, 0, -height)"
},
{
"skip": "False",
"data": "(5, 0, -height)"
},
{
"skip": "False",
"data": "(5, 5, -height)"
},
{
"skip": "False",
"data": "(0, 5, -height)"
}
],
"faces": [
{
"skip": "not face[0]",
"texture": "trafo_texture",
"indices": [0, 1, 2, 3],
"uvs": [
"(0, 0)",
"(1, 0)",
"(1, 1)",
"(0, 1)"
],
"normals": null
},
{
"skip": "(not face[1]) or height == 0.0",
"texture": "trafo_texture",
"indices": [5, 4, 7, 6],
"uvs": [
"(0, 0)",
"(1, 0)",
"(1, 1)",
"(0, 1)"
],
"normals": null
},
{
"skip": "(not face[2]) or height == 0.0",
"texture": "trafo_texture",
"indices": [3, 7, 4, 0],
"uvs": [
"(0, 0)",
"(uv_height, 0)",
"(uv_height, 1)",
"(0, 1)"
],
"normals": null
},
{
"skip": "(not face[3]) or height == 0.0",
"texture": "trafo_texture",
"indices": [1, 5, 6, 2],
"uvs": [
"(0, 0)",
"(uv_height, 0)",
"(uv_height, 1)",
"(0, 1)"
],
"normals": null
},
{
"skip": "(not face[4]) or height == 0.0",
"texture": "trafo_texture",
"indices": [0, 4, 5, 1],
"uvs": [
"(0, 0)",
"(uv_height, 0)",
"(uv_height, 1)",
"(0, 1)"
],
"normals": null
},
{
"skip": "(not face[5]) or height == 0.0",
"texture": "trafo_texture",
"indices": [2, 6, 7, 3],
"uvs": [
"(0, 0)",
"(uv_height, 0)",
"(uv_height, 1)",
"(0, 1)"
],
"normals": null
}
],
"instances": []
},
{
"identifier": "wood_trafo",
"showcase": {
"title": "Wood Trafo",
"category": "Trafo",
"icon": "WoodTrafo",
"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_trafo",
"skip": "False",
"params": {
"trafo_texture": "\"BallWood\"",
"height": "height",
"face": "face"
},
"transform": "ident()"
}
]
},
{
"identifier": "stone_trafo",
"showcase": {
"title": "Stone Trafo",
"category": "Trafo",
"icon": "StoneTrafo",
"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_trafo",
"skip": "False",
"params": {
"trafo_texture": "\"BallStone\"",
"height": "height",
"face": "face"
},
"transform": "ident()"
}
]
},
{
"identifier": "paper_trafo",
"showcase": {
"title": "Paper Trafo",
"category": "Trafo",
"icon": "PaperTrafo",
"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_trafo",
"skip": "False",
"params": {
"trafo_texture": "\"BallPaper\"",
"height": "height",
"face": "face"
},
"transform": "ident()"
}
]
}
]

View File

@ -0,0 +1,272 @@
[
{
"identifier": "raw_floor_transition_part",
"showcase": null,
"params": [
{
"field": "height",
"data": "5.0"
},
{
"field": "face_part",
"data": "(True, False, False)"
}
],
"skip": "False",
"vars": [],
"vertices": [
{
"skip": "not face_part[0]",
"data": "(0, 0, 0)"
},
{
"skip": "not face_part[0]",
"data": "(5, 0, 0)"
},
{
"skip": "not face_part[0]",
"data": "(0, 2.5, -0.7)"
},
{
"skip": "not face_part[0]",
"data": "(5, 5, 0)"
},
{
"skip": "not face_part[0]",
"data": "(0, 5, 0)"
}
],
"faces": [
{
"skip": "not face_part[0]",
"texture": "\"FloorTopProfilFlat\"",
"indices": [0, 1, 2],
"uvs": [
"(0, 1)",
"(0, 0)",
"(0.5, 1)"
],
"normals": null
},
{
"skip": "not face_part[0]",
"texture": "\"FloorTopProfilFlat\"",
"indices": [3, 2, 1],
"uvs": [
"(1, 0)",
"(0.5, 1)",
"(0, 0)"
],
"normals": null
},
{
"skip": "not face_part[0]",
"texture": "\"FloorTopProfilFlat\"",
"indices": [2, 3, 4],
"uvs": [
"(0.5, 1)",
"(1, 0)",
"(1, 1)"
],
"normals": null
}
],
"instances": [
{
"identifier": "raw_floor_side",
"skip": "not face_part[1]",
"params": {
"height": "height",
"length": "2.5",
"is_left_sink": "False",
"is_right_sink": "True"
},
"transform": "move(0, 5, 0) @ rot(0, 0, -90)"
},
{
"identifier": "raw_floor_side",
"skip": "not face_part[1]",
"params": {
"height": "height",
"length": "2.5",
"is_left_sink": "True",
"is_right_sink": "False"
},
"transform": "move(0, 2.5, 0) @ rot(0, 0, -90)"
},
{
"identifier": "raw_floor_side",
"skip": "not face_part[2]",
"params": {
"height": "height",
"length": "5",
"is_left_sink": "False",
"is_right_sink": "False"
},
"transform": "move(5, 0, 0) @ rot(0, 0, 90)"
}
]
},
{
"identifier": "floor_transition",
"showcase": {
"title": "Transition",
"category": "Miscellaneous",
"icon": "Transition",
"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, False, False, True, True)"
}
]
},
"params": [
{
"field": "height",
"data": "height_"
},
{
"field": "face",
"data": "face_"
}
],
"skip": "False",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "raw_floor_transition_part",
"skip": "False",
"params": {
"height": "height",
"face_part": "(face[0], face[2], face[3])"
},
"transform": "ident()"
},
{
"identifier": "raw_floor_side",
"skip": "not face[4]",
"params": {
"height": "height",
"length": "5",
"is_left_sink": "False",
"is_right_sink": "False"
},
"transform": "ident()"
},
{
"identifier": "raw_floor_side",
"skip": "not face[5]",
"params": {
"height": "height",
"length": "5",
"is_left_sink": "False",
"is_right_sink": "False"
},
"transform": "move(5, 5, 0) @ rot(0, 0, 180)"
},
{
"identifier": "floor_rectangle_bottom",
"skip": "not face[1]",
"params": {
"length": "5",
"width": "5"
},
"transform": "move(0, 0, -height)"
}
]
},
{
"identifier": "floor_narrow_transition",
"showcase": {
"title": "Narrow Transition",
"category": "Miscellaneous",
"icon": "NarrowTransition",
"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, False, False, False, False)"
}
]
},
"params": [
{
"field": "height",
"data": "height_"
},
{
"field": "face",
"data": "face_"
}
],
"skip": "False",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "raw_floor_transition_part",
"skip": "False",
"params": {
"height": "height",
"face_part": "(face[0], face[2], face[3])"
},
"transform": "scale(0.5, 1, 1)"
},
{
"identifier": "raw_floor_side",
"skip": "not face[4]",
"params": {
"height": "height",
"length": "2.5",
"is_left_sink": "False",
"is_right_sink": "False"
},
"transform": "ident()"
},
{
"identifier": "raw_floor_side",
"skip": "not face[5]",
"params": {
"height": "height",
"length": "2.5",
"is_left_sink": "False",
"is_right_sink": "False"
},
"transform": "move(2.5, 5, 0) @ rot(0, 0, 180)"
},
{
"identifier": "floor_rectangle_bottom",
"skip": "not face[1]",
"params": {
"length": "2.5",
"width": "5"
},
"transform": "move(0, 0, -height)"
}
]
}
]

View File

@ -0,0 +1,622 @@
[
{
"identifier": "floor_wide_straight",
"showcase": {
"title": "Wide Floor",
"category": "Wide Floors",
"icon": "WideFloor",
"type": "floor",
"cfgs": [
{
"field": "length_",
"type": "float",
"title": "Length",
"desc": "The length of wide floor.",
"default": "2.5"
},
{
"field": "width_",
"type": "float",
"title": "Width",
"desc": "The width of wide floor.",
"default": "5.0"
},
{
"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, False, False, True, True)"
}
]
},
"params": [
{
"field": "height",
"data": "height_"
},
{
"field": "length",
"data": "length_"
},
{
"field": "width",
"data": "width_"
},
{
"field": "face",
"data": "face_"
}
],
"skip": "length == 0.0 or width == 0.0",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "floor_sink_border",
"skip": "False",
"params": {
"length": "length",
"height": "height",
"face": "(face[0], False, face[2], face[3], face[4], False)"
},
"transform": "ident()"
},
{
"identifier": "floor_sink_border",
"skip": "False",
"params": {
"length": "length",
"height": "height",
"face": "(face[0], False, face[2], face[3], face[5], False)"
},
"transform": "move(0, 5 + width, 0) @ scale(1, -1, 1)"
},
{
"identifier": "floor_flat",
"skip": "False",
"params": {
"height": "height",
"length": "length",
"width": "width",
"face": "(face[0], False, face[2], face[3], False, False)",
"is_sink": "True"
},
"transform": "move(0, 2.5, 0)"
},
{
"identifier": "floor_rectangle_bottom",
"skip": "not face[1]",
"params": {
"length": "length",
"width": "5 + width"
},
"transform": "move(0, 0, -height)"
}
]
},
{
"identifier": "floor_wide_terminal",
"showcase": {
"title": "Wide Floor Terminal",
"category": "Wide Floors",
"icon": "WideFloorTerminal",
"type": "floor",
"cfgs": [
{
"field": "width_",
"type": "float",
"title": "Width",
"desc": "The width of wide floor.",
"default": "5.0"
},
{
"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, False, True, True)"
}
]
},
"params": [
{
"field": "height",
"data": "height_"
},
{
"field": "width",
"data": "width_"
},
{
"field": "face",
"data": "face_"
}
],
"skip": "width == 0.0",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "cv_trapezoid_side",
"skip": "False",
"params": {
"long_edge_length": "width + 5",
"short_edge_offset": "2.5",
"short_edge_length": "width",
"height": "height",
"face": "(face[0], False, False, False, face[2], face[3])",
"is_sink": "True",
"is_ribbon": "False"
},
"transform": "rot(0, 0, 90) @ scale(1, -1, 1)"
},
{
"identifier": "cv_trapezoid_side",
"skip": "False",
"params": {
"long_edge_length": "5.0",
"short_edge_offset": "2.5",
"short_edge_length": "2.5",
"height": "height",
"face": "(face[0], False, False, face[3], face[4], False)",
"is_sink": "True",
"is_ribbon": "False"
},
"transform": "ident()"
},
{
"identifier": "cv_trapezoid_side",
"skip": "False",
"params": {
"long_edge_length": "5.0",
"short_edge_offset": "2.5",
"short_edge_length": "2.5",
"height": "height",
"face": "(face[0], False, False, face[3], face[5], False)",
"is_sink": "True",
"is_ribbon": "False"
},
"transform": "move(0, width + 5, 0) @ scale(1, -1, 1)"
},
{
"identifier": "floor_flat",
"skip": "False",
"params": {
"height": "height",
"length": "2.5",
"width": "width",
"face": "(face[0], False, False, face[3], False, False)",
"is_sink": "True"
},
"transform": "move(2.5, 2.5, 0)"
},
{
"identifier": "floor_rectangle_bottom",
"skip": "not face[1]",
"params": {
"length": "5",
"width": "5 + width"
},
"transform": "move(0, 0, -height)"
}
]
},
{
"identifier": "floor_wide_l_crossing",
"showcase": {
"title": "Wide Floor L Crossing",
"category": "Wide Floors",
"icon": "WideLCrossing",
"type": "floor",
"cfgs": [
{
"field": "width_h_",
"type": "float",
"title": "Horizontal Width",
"desc": "The horizontal floor width of wide floor.",
"default": "5.0"
},
{
"field": "width_v_",
"type": "float",
"title": "Vertical Width",
"desc": "The vertical floor width of wide floor.",
"default": "5.0"
},
{
"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, False, True, False)"
}
]
},
"params": [
{
"field": "height",
"data": "height_"
},
{
"field": "width_h",
"data": "width_h_"
},
{
"field": "width_v",
"data": "width_v_"
},
{
"field": "face",
"data": "face_"
}
],
"skip": "width_h == 0.0 or width_v == 0.0",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "cv_trapezoid_side",
"skip": "False",
"params": {
"long_edge_length": "width_h + 5",
"short_edge_offset": "2.5",
"short_edge_length": "width_h + 2.5",
"height": "height",
"face": "(face[0], False, False, face[3], face[4], False)",
"is_sink": "True",
"is_ribbon": "False"
},
"transform": "ident()"
},
{
"identifier": "cv_trapezoid_side",
"skip": "False",
"params": {
"long_edge_length": "width_v + 5",
"short_edge_offset": "2.5",
"short_edge_length": "width_v + 2.5",
"height": "height",
"face": "(face[0], False, False, face[5], face[2], False)",
"is_sink": "True",
"is_ribbon": "False"
},
"transform": "rot(0, 0, 90) @ scale(1, -1, 1)"
},
{
"identifier": "floor_sink_inner_corner",
"skip": "False",
"params": {
"height": "height",
"face": "(face[0], False, False, face[3], False, face[5])"
},
"transform": "move(2.5 + width_h, 2.5 + width_v, 0)"
},
{
"identifier": "floor_flat",
"skip": "False",
"params": {
"height": "height",
"length": "width_h + 2.5",
"width": "width_v",
"face": "(face[0], False, False, face[3], False, False)",
"is_sink": "True"
},
"transform": "move(2.5, 2.5, 0)"
},
{
"identifier": "floor_flat",
"skip": "False",
"params": {
"height": "height",
"length": "width_h",
"width": "2.5",
"face": "(face[0], False, False, False, False, face[5])",
"is_sink": "True"
},
"transform": "move(2.5, 2.5 + width_v, 0)"
},
{
"identifier": "floor_rectangle_bottom",
"skip": "not face[1]",
"params": {
"length": "width_h + 5",
"width": "width_v + 5"
},
"transform": "move(0, 0, -height)"
}
]
},
{
"identifier": "floor_wide_t_crossing",
"showcase": {
"title": "Wide Floor T Crossing",
"category": "Wide Floors",
"icon": "WideTCrossing",
"type": "floor",
"cfgs": [
{
"field": "width_h_",
"type": "float",
"title": "Horizontal Width",
"desc": "The horizontal floor width of wide floor.",
"default": "5.0"
},
{
"field": "width_v_",
"type": "float",
"title": "Vertical Width",
"desc": "The vertical floor width of wide floor.",
"default": "5.0"
},
{
"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, False, False, False)"
}
]
},
"params": [
{
"field": "height",
"data": "height_"
},
{
"field": "width_h",
"data": "width_h_"
},
{
"field": "width_v",
"data": "width_v_"
},
{
"field": "face",
"data": "face_"
}
],
"skip": "width_h == 0.0 or width_v == 0.0",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "floor_sink_border",
"skip": "False",
"params": {
"length": "5 + width_v",
"height": "height",
"face": "(face[0], False, face[5], face[4], face[2], False)"
},
"transform": "move(0, 5 + width_v, 0) @ rot(0, 0, -90)"
},
{
"identifier": "floor_sink_inner_corner",
"skip": "False",
"params": {
"height": "height",
"face": "(face[0], False, False, face[4], False, face[3])"
},
"transform": "move(2.5 + width_h, 2.5, 0) @ rot(0, 0, -90)"
},
{
"identifier": "floor_sink_inner_corner",
"skip": "False",
"params": {
"height": "height",
"face": "(face[0], False, False, face[3], False, face[5])"
},
"transform": "move(2.5 + width_h, 2.5 + width_v, 0)"
},
{
"identifier": "floor_flat",
"skip": "False",
"params": {
"height": "height",
"length": "width_h",
"width": "5 + width_v",
"face": "(face[0], False, False, False, face[4], face[5])",
"is_sink": "True"
},
"transform": "move(2.5, 0, 0)"
},
{
"identifier": "floor_flat",
"skip": "False",
"params": {
"height": "height",
"length": "2.5",
"width": "width_v",
"face": "(face[0], False, False, face[3], False, False)",
"is_sink": "True"
},
"transform": "move(2.5 + width_h, 2.5, 0)"
},
{
"identifier": "floor_rectangle_bottom",
"skip": "not face[1]",
"params": {
"length": "width_h + 5",
"width": "width_v + 5"
},
"transform": "move(0, 0, -height)"
}
]
},
{
"identifier": "floor_wide_x_crossing",
"showcase": {
"title": "Wide Floor X Crossing",
"category": "Wide Floors",
"icon": "WideXCrossing",
"type": "floor",
"cfgs": [
{
"field": "width_h_",
"type": "float",
"title": "Horizontal Width",
"desc": "The horizontal floor width of wide floor.",
"default": "5.0"
},
{
"field": "width_v_",
"type": "float",
"title": "Vertical Width",
"desc": "The vertical floor width of wide floor.",
"default": "5.0"
},
{
"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, False, False, False, False)"
}
]
},
"params": [
{
"field": "height",
"data": "height_"
},
{
"field": "width_h",
"data": "width_h_"
},
{
"field": "width_v",
"data": "width_v_"
},
{
"field": "face",
"data": "face_"
}
],
"skip": "width_h == 0.0 or width_v == 0.0",
"vars": [],
"vertices": [],
"faces": [],
"instances": [
{
"identifier": "floor_sink_inner_corner",
"skip": "False",
"params": {
"height": "height",
"face": "(face[0], False, False, face[5], False, face[2])"
},
"transform": "move(2.5, 2.5 + width_v, 0) @ rot(0, 0, -270)"
},
{
"identifier": "floor_sink_inner_corner",
"skip": "False",
"params": {
"height": "height",
"face": "(face[0], False, False, face[2], False, face[4])"
},
"transform": "move(2.5, 2.5, 0) @ rot(0, 0, -180)"
},
{
"identifier": "floor_sink_inner_corner",
"skip": "False",
"params": {
"height": "height",
"face": "(face[0], False, False, face[4], False, face[3])"
},
"transform": "move(2.5 + width_h, 2.5, 0) @ rot(0, 0, -90)"
},
{
"identifier": "floor_sink_inner_corner",
"skip": "False",
"params": {
"height": "height",
"face": "(face[0], False, False, face[3], False, face[5])"
},
"transform": "move(2.5 + width_h, 2.5 + width_v, 0)"
},
{
"identifier": "floor_flat",
"skip": "False",
"params": {
"height": "height",
"length": "width_h",
"width": "5 + width_v",
"face": "(face[0], False, False, False, face[4], face[5])",
"is_sink": "True"
},
"transform": "move(2.5, 0, 0)"
},
{
"identifier": "floor_flat",
"skip": "False",
"params": {
"height": "height",
"length": "2.5",
"width": "width_v",
"face": "(face[0], False, False, face[3], False, False)",
"is_sink": "True"
},
"transform": "move(2.5 + width_h, 2.5, 0)"
},
{
"identifier": "floor_flat",
"skip": "False",
"params": {
"height": "height",
"length": "2.5",
"width": "width_v",
"face": "(face[0], False, face[2], False, False, False)",
"is_sink": "True"
},
"transform": "move(0, 2.5, 0)"
},
{
"identifier": "floor_rectangle_bottom",
"skip": "not face[1]",
"params": {
"length": "width_h + 5",
"width": "width_v + 5"
},
"transform": "move(0, 0, -height)"
}
]
}
]

Some files were not shown because too many files have changed in this diff Show More