adapt to PyBMap binding

This commit is contained in:
yyc12345 2023-11-09 17:20:57 +08:00
parent 6e4b1b37da
commit ec0749f3e5
19 changed files with 6144 additions and 261 deletions

4
.gitignore vendored
View File

@ -1,3 +1,7 @@
# My Ban
bbp_ng/PyBMap/*.dll
bbp_ng/PyBMap/*.pdb
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

View File

@ -1,5 +1,6 @@
import bpy
from . import PROP_preferences, UTIL_functions, UTIL_file_browser, UTIL_blender_mesh
from .PyBMap import bmap_wrapper as bmap
class BBP_OT_export_virtools(bpy.types.Operator, UTIL_file_browser.ExportVirtoolsFile):
"""Export Virtools File"""
@ -9,7 +10,9 @@ class BBP_OT_export_virtools(bpy.types.Operator, UTIL_file_browser.ExportVirtool
@classmethod
def poll(self, context):
return PROP_preferences.get_raw_preferences().has_valid_blc_tex_folder()
return (
PROP_preferences.get_raw_preferences().has_valid_blc_tex_folder()
and bmap.is_bmap_available())
def execute(self, context):
UTIL_functions.message_box((self.general_get_filename(), ), 'Export Virtools File Path', 'INFO')
@ -17,7 +20,7 @@ class BBP_OT_export_virtools(bpy.types.Operator, UTIL_file_browser.ExportVirtool
return {'FINISHED'}
def draw(self, context):
layout = self.layout
pass
def register() -> None:
bpy.utils.register_class(BBP_OT_export_virtools)

View File

@ -6,7 +6,7 @@ class BBP_OT_import_bmfile(bpy.types.Operator, UTIL_file_browser.ImportBmxFile):
bl_idname = "bbp.import_bmfile"
bl_label = "Import BM (Ballance Map) File"
bl_options = {'PRESET', 'UNDO'}
@classmethod
def poll(self, context):
return PROP_preferences.get_raw_preferences().has_valid_blc_tex_folder()

View File

@ -1,5 +1,7 @@
import bpy
import tempfile
from . import PROP_preferences, UTIL_functions, UTIL_file_browser, UTIL_blender_mesh
from .PyBMap import bmap_wrapper as bmap
class BBP_OT_import_virtools(bpy.types.Operator, UTIL_file_browser.ImportVirtoolsFile):
"""Import Virtools File"""
@ -7,17 +9,37 @@ class BBP_OT_import_virtools(bpy.types.Operator, UTIL_file_browser.ImportVirtool
bl_label = "Import Virtools File"
bl_options = {'PRESET', 'UNDO'}
vt_encodings: bpy.props.StringProperty(
name = "Encodings",
description = "The encoding list used by Virtools engine to resolve object name. Use `;` to split multiple encodings",
default = "1252"
)
@classmethod
def poll(self, context):
return PROP_preferences.get_raw_preferences().has_valid_blc_tex_folder()
return (
PROP_preferences.get_raw_preferences().has_valid_blc_tex_folder()
and bmap.is_bmap_available())
def execute(self, context):
UTIL_functions.message_box((self.general_get_filename(), ), 'Import Virtools File Path', 'INFO')
# get encoding, split it by `;` and strip blank chars.
encodings: str = self.vt_encodings
_import_virtools(
self.general_get_filename(),
tuple(map(lambda x: x.strip(), encodings.split(';')))
)
self.report({'INFO'}, "Virtools File Importing Finished.")
return {'FINISHED'}
def draw(self, context):
layout = self.layout
def _import_virtools(file_name_: str, encodings_: tuple[str]) -> None:
# create temp folder
with tempfile.TemporaryDirectory() as vt_temp_folder:
# create virtools reader context
with bmap.BMFileReader(
file_name_, vt_temp_folder,
PROP_preferences.get_raw_preferences().mBallanceTextureFolder,
encodings_) as reader:
pass
def register() -> None:
bpy.utils.register_class(BBP_OT_import_virtools)

View File

@ -213,7 +213,7 @@ class BBP_PG_virtools_material(bpy.types.PropertyGroup):
min = 0.0,
max = 1.0,
size = 3,
default = RawVirtoolsMaterial.cDefaultAmbient.to_tuple_rgb()
default = RawVirtoolsMaterial.cDefaultAmbient.to_const_rgb()
)
diffuse: bpy.props.FloatVectorProperty(
@ -223,7 +223,7 @@ class BBP_PG_virtools_material(bpy.types.PropertyGroup):
min = 0.0,
max = 1.0,
size = 4,
default = RawVirtoolsMaterial.cDefaultDiffuse.to_tuple_rgba()
default = RawVirtoolsMaterial.cDefaultDiffuse.to_const_rgba()
)
specular: bpy.props.FloatVectorProperty(
@ -233,7 +233,7 @@ class BBP_PG_virtools_material(bpy.types.PropertyGroup):
min = 0.0,
max = 1.0,
size = 3,
default = RawVirtoolsMaterial.cDefaultSpecular.to_tuple_rgb()
default = RawVirtoolsMaterial.cDefaultSpecular.to_const_rgb()
)
emissive: bpy.props.FloatVectorProperty(
@ -243,7 +243,7 @@ class BBP_PG_virtools_material(bpy.types.PropertyGroup):
min = 0.0,
max = 1.0,
size = 3,
default = RawVirtoolsMaterial.cDefaultEmissive.to_tuple_rgb()
default = RawVirtoolsMaterial.cDefaultEmissive.to_const_rgb()
)
specular_power: bpy.props.FloatProperty(
@ -267,7 +267,7 @@ class BBP_PG_virtools_material(bpy.types.PropertyGroup):
min = 0.0,
max = 1.0,
size = 4,
default = RawVirtoolsMaterial.cDefaultTextureBorderColor.to_tuple_rgba()
default = RawVirtoolsMaterial.cDefaultTextureBorderColor.to_const_rgba()
)
texture_blend_mode: bpy.props.EnumProperty(
@ -448,14 +448,14 @@ def get_raw_virtools_material(mtl: bpy.types.Material) -> RawVirtoolsMaterial:
def set_raw_virtools_material(mtl: bpy.types.Material, rawdata: RawVirtoolsMaterial) -> None:
props: BBP_PG_virtools_material = get_virtools_material(mtl)
props.diffuse = rawdata.mDiffuse.to_tuple_rgba()
props.ambient = rawdata.mAmbient.to_tuple_rgb()
props.specular = rawdata.mSpecular.to_tuple_rgb()
props.emissive = rawdata.mEmissive.to_tuple_rgb()
props.diffuse = rawdata.mDiffuse.to_const_rgba()
props.ambient = rawdata.mAmbient.to_const_rgb()
props.specular = rawdata.mSpecular.to_const_rgb()
props.emissive = rawdata.mEmissive.to_const_rgb()
props.specular_power = rawdata.mSpecularPower
props.texture = rawdata.mTexture
props.texture_border_color = rawdata.mTextureBorderColor.to_tuple_rgba()
props.texture_border_color = rawdata.mTextureBorderColor.to_const_rgba()
props.texture_blend_mode = str(rawdata.mTextureBlendMode.value)
props.texture_min_mode = str(rawdata.mTextureMinMode.value)
@ -493,9 +493,9 @@ def apply_to_blender_material(mtl: bpy.types.Material):
mtl.node_tree.links.new(bnode.outputs[0], mnode.inputs[0])
# set basic colors
mtl.metallic = sum(rawdata.mAmbient.to_tuple_rgb()) / 3
mtl.diffuse_color = rawdata.mDiffuse.to_tuple_rgba()
mtl.specular_color = rawdata.mSpecular.to_tuple_rgb()
mtl.metallic = sum(rawdata.mAmbient.to_const_rgb()) / 3
mtl.diffuse_color = rawdata.mDiffuse.to_const_rgba()
mtl.specular_color = rawdata.mSpecular.to_const_rgb()
mtl.specular_intensity = rawdata.mSpecularPower
# set some alpha data

3
bbp_ng/PyBMap/README.md Normal file
View File

@ -0,0 +1,3 @@
# PyBMap Binding
Please note that this folder is a part of [libcmo21](https://github.com/yyc12345/libcmo21). And all Python scripts is copied from source project. If any issues raised in this sub module, please correct it in parent project and this project will sync to parent project's work.

View File

755
bbp_ng/PyBMap/bmap.py Normal file
View File

@ -0,0 +1,755 @@
import ctypes, os
#region Type Defines
class BMapException(Exception):
"""
The exception thrown by BMap bindings.
"""
pass
bm_CKSTRING = ctypes.c_char_p
bm_CKSTRING_p = ctypes.POINTER(bm_CKSTRING)
bm_CKDWORD = ctypes.c_uint32
bm_CKDWORD_p = ctypes.POINTER(bm_CKDWORD)
bm_CKDWORD_pp = ctypes.POINTER(bm_CKDWORD_p)
bm_CKWORD = ctypes.c_uint16
bm_CKWORD_p = ctypes.POINTER(bm_CKWORD)
bm_CKWORD_pp = ctypes.POINTER(bm_CKWORD_p)
bm_CKID = ctypes.c_uint32
bm_CKID_p = ctypes.POINTER(bm_CKID)
bm_CKID_pp = ctypes.POINTER(bm_CKID_p)
bm_CKFLOAT = ctypes.c_float
bm_CKFLOAT_p = ctypes.POINTER(bm_CKFLOAT)
bm_CKINT = ctypes.c_int32
bm_CKBYTE = ctypes.c_uint8
bm_CKBYTE_p = ctypes.POINTER(bm_CKBYTE)
bm_enum = bm_CKDWORD
bm_enum_p = ctypes.POINTER(bm_enum)
bm_bool = ctypes.c_bool
bm_bool_p = ctypes.POINTER(bm_bool)
bm_void_p = ctypes.c_void_p
bm_void_pp = ctypes.POINTER(ctypes.c_void_p)
class bm_VxVector2(ctypes.Structure):
_fields_ = [
('x', bm_CKFLOAT),
('y', bm_CKFLOAT),
]
bm_VxVector2_p = ctypes.POINTER(bm_VxVector2)
bm_VxVector2_pp = ctypes.POINTER(bm_VxVector2_p)
class bm_VxVector3(ctypes.Structure):
_fields_ = [
('x', bm_CKFLOAT),
('y', bm_CKFLOAT),
('z', bm_CKFLOAT),
]
bm_VxVector3_p = ctypes.POINTER(bm_VxVector3)
class bm_VxColor(ctypes.Structure):
_fields_ = [
('r', bm_CKFLOAT),
('g', bm_CKFLOAT),
('b', bm_CKFLOAT),
('a', bm_CKFLOAT),
]
bm_VxColor_p = ctypes.POINTER(bm_VxColor)
class bm_VxMatrix(ctypes.Structure):
_fields_ = list(
(f'i{idx}', bm_CKFLOAT) for idx in range(16)
)
bm_VxMatrix_p = ctypes.POINTER(bm_VxMatrix)
#endregion
#region BMap Loader
_g_BMapModule: ctypes.CDLL = None
try:
_g_BMapModule = ctypes.cdll.LoadLibrary(
os.path.join(os.path.dirname(__file__), "BMap.dll")
)
except:
_g_BMapModule = None
def is_bmap_available() -> bool:
return _g_BMapModule is not None
def _bmap_error_check(result: bm_bool, func, args):
if not result:
raise BMapException("BMap operation failed.")
return result
def _create_bmap_func(fct_name: str, fct_params: list[ctypes._SimpleCData]) -> ctypes._CFuncPtr:
if _g_BMapModule is None: return None
cache: ctypes._CFuncPtr = getattr(_g_BMapModule, fct_name)
cache.argtypes = fct_params
cache.restype = bm_bool
cache.errcheck = _bmap_error_check
return cache
#endregion
#region Function Defines
## BMInit
# @return True if no error, otherwise False.
BMInit = _create_bmap_func('BMInit', [])
## BMDispose
# @return True if no error, otherwise False.
BMDispose = _create_bmap_func('BMDispose', [])
## BMFile_Load
# @param file_name[in] Type: LibCmo::CKSTRING.
# @param temp_folder[in] Type: LibCmo::CKSTRING.
# @param texture_folder[in] Type: LibCmo::CKSTRING.
# @param encoding_count[in] Type: LibCmo::CKDWORD.
# @param encodings[in] Type: LibCmo::CKSTRING*.
# @param out_file[out] Type: BMap::BMFile*. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMFile_Load = _create_bmap_func('BMFile_Load', [bm_CKSTRING, bm_CKSTRING, bm_CKSTRING, bm_CKDWORD, bm_CKSTRING_p, bm_void_pp])
## BMFile_Create
# @param temp_folder[in] Type: LibCmo::CKSTRING.
# @param texture_folder[in] Type: LibCmo::CKSTRING.
# @param encoding_count[in] Type: LibCmo::CKDWORD.
# @param encodings[in] Type: LibCmo::CKSTRING*.
# @param out_file[out] Type: BMap::BMFile*. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMFile_Create = _create_bmap_func('BMFile_Create', [bm_CKSTRING, bm_CKSTRING, bm_CKDWORD, bm_CKSTRING_p, bm_void_pp])
## BMFile_Save
# @param map_file[in] Type: BMap::BMFile*.
# @param file_name[in] Type: LibCmo::CKSTRING.
# @param compreess_level[in] Type: LibCmo::CKINT.
# @return True if no error, otherwise False.
BMFile_Save = _create_bmap_func('BMFile_Save', [bm_void_p, bm_CKSTRING, bm_CKINT])
## BMFile_Free
# @param map_file[in] Type: BMap::BMFile*.
# @return True if no error, otherwise False.
BMFile_Free = _create_bmap_func('BMFile_Free', [bm_void_p])
## BMFile_GetGroupCount
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param out_count[out] Type: LibCmo::CKDWORD. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMFile_GetGroupCount = _create_bmap_func('BMFile_GetGroupCount', [bm_void_p, bm_CKDWORD_p])
## BMFile_GetGroup
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param idx[in] Type: LibCmo::CKDWORD.
# @param out_id[out] Type: LibCmo::CK2::CK_ID. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMFile_GetGroup = _create_bmap_func('BMFile_GetGroup', [bm_void_p, bm_CKDWORD, bm_CKID_p])
## BMFile_CreateGroup
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param out_id[out] Type: LibCmo::CK2::CK_ID. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMFile_CreateGroup = _create_bmap_func('BMFile_CreateGroup', [bm_void_p, bm_CKID_p])
## BMFile_Get3dObjectCount
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param out_count[out] Type: LibCmo::CKDWORD. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMFile_Get3dObjectCount = _create_bmap_func('BMFile_Get3dObjectCount', [bm_void_p, bm_CKDWORD_p])
## BMFile_Get3dObject
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param idx[in] Type: LibCmo::CKDWORD.
# @param out_id[out] Type: LibCmo::CK2::CK_ID. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMFile_Get3dObject = _create_bmap_func('BMFile_Get3dObject', [bm_void_p, bm_CKDWORD, bm_CKID_p])
## BMFile_Create3dObject
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param out_id[out] Type: LibCmo::CK2::CK_ID. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMFile_Create3dObject = _create_bmap_func('BMFile_Create3dObject', [bm_void_p, bm_CKID_p])
## BMFile_GetMeshCount
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param out_count[out] Type: LibCmo::CKDWORD. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMFile_GetMeshCount = _create_bmap_func('BMFile_GetMeshCount', [bm_void_p, bm_CKDWORD_p])
## BMFile_GetMesh
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param idx[in] Type: LibCmo::CKDWORD.
# @param out_id[out] Type: LibCmo::CK2::CK_ID. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMFile_GetMesh = _create_bmap_func('BMFile_GetMesh', [bm_void_p, bm_CKDWORD, bm_CKID_p])
## BMFile_CreateMesh
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param out_id[out] Type: LibCmo::CK2::CK_ID. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMFile_CreateMesh = _create_bmap_func('BMFile_CreateMesh', [bm_void_p, bm_CKID_p])
## BMFile_GetMaterialCount
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param out_count[out] Type: LibCmo::CKDWORD. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMFile_GetMaterialCount = _create_bmap_func('BMFile_GetMaterialCount', [bm_void_p, bm_CKDWORD_p])
## BMFile_GetMaterial
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param idx[in] Type: LibCmo::CKDWORD.
# @param out_id[out] Type: LibCmo::CK2::CK_ID. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMFile_GetMaterial = _create_bmap_func('BMFile_GetMaterial', [bm_void_p, bm_CKDWORD, bm_CKID_p])
## BMFile_CreateMaterial
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param out_id[out] Type: LibCmo::CK2::CK_ID. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMFile_CreateMaterial = _create_bmap_func('BMFile_CreateMaterial', [bm_void_p, bm_CKID_p])
## BMFile_GetTextureCount
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param out_count[out] Type: LibCmo::CKDWORD. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMFile_GetTextureCount = _create_bmap_func('BMFile_GetTextureCount', [bm_void_p, bm_CKDWORD_p])
## BMFile_GetTexture
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param idx[in] Type: LibCmo::CKDWORD.
# @param out_id[out] Type: LibCmo::CK2::CK_ID. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMFile_GetTexture = _create_bmap_func('BMFile_GetTexture', [bm_void_p, bm_CKDWORD, bm_CKID_p])
## BMFile_CreateTexture
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param out_id[out] Type: LibCmo::CK2::CK_ID. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMFile_CreateTexture = _create_bmap_func('BMFile_CreateTexture', [bm_void_p, bm_CKID_p])
## BMMeshTrans_New
# @param out_trans[out] Type: BMap::BMMeshTransition*. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMeshTrans_New = _create_bmap_func('BMMeshTrans_New', [bm_void_pp])
## BMMeshTrans_Delete
# @param trans[in] Type: BMap::BMMeshTransition*.
# @return True if no error, otherwise False.
BMMeshTrans_Delete = _create_bmap_func('BMMeshTrans_Delete', [bm_void_p])
## BMMeshTrans_PrepareVertexCount
# @param trans[in] Type: BMap::BMMeshTransition*. The pointer to corresponding BMMeshTransition.
# @param count[in] Type: LibCmo::CKDWORD.
# @return True if no error, otherwise False.
BMMeshTrans_PrepareVertexCount = _create_bmap_func('BMMeshTrans_PrepareVertexCount', [bm_void_p, bm_CKDWORD])
## BMMeshTrans_PrepareVertex
# @param trans[in] Type: BMap::BMMeshTransition*. The pointer to corresponding BMMeshTransition.
# @param out_mem[out] Type: LibCmo::VxMath::VxVector3*. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMeshTrans_PrepareVertex = _create_bmap_func('BMMeshTrans_PrepareVertex', [bm_void_p, bm_VxVector2_pp])
## BMMeshTrans_PrepareNormalCount
# @param trans[in] Type: BMap::BMMeshTransition*. The pointer to corresponding BMMeshTransition.
# @param count[in] Type: LibCmo::CKDWORD.
# @return True if no error, otherwise False.
BMMeshTrans_PrepareNormalCount = _create_bmap_func('BMMeshTrans_PrepareNormalCount', [bm_void_p, bm_CKDWORD])
## BMMeshTrans_PrepareNormal
# @param trans[in] Type: BMap::BMMeshTransition*. The pointer to corresponding BMMeshTransition.
# @param out_mem[out] Type: LibCmo::VxMath::VxVector3*. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMeshTrans_PrepareNormal = _create_bmap_func('BMMeshTrans_PrepareNormal', [bm_void_p, bm_VxVector2_pp])
## BMMeshTrans_PrepareUVCount
# @param trans[in] Type: BMap::BMMeshTransition*. The pointer to corresponding BMMeshTransition.
# @param count[in] Type: LibCmo::CKDWORD.
# @return True if no error, otherwise False.
BMMeshTrans_PrepareUVCount = _create_bmap_func('BMMeshTrans_PrepareUVCount', [bm_void_p, bm_CKDWORD])
## BMMeshTrans_PrepareUV
# @param trans[in] Type: BMap::BMMeshTransition*. The pointer to corresponding BMMeshTransition.
# @param out_mem[out] Type: LibCmo::VxMath::VxVector2*. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMeshTrans_PrepareUV = _create_bmap_func('BMMeshTrans_PrepareUV', [bm_void_p, bm_VxVector2_pp])
## BMMeshTrans_PrepareMtlSlotCount
# @param trans[in] Type: BMap::BMMeshTransition*. The pointer to corresponding BMMeshTransition.
# @param count[in] Type: LibCmo::CKDWORD.
# @return True if no error, otherwise False.
BMMeshTrans_PrepareMtlSlotCount = _create_bmap_func('BMMeshTrans_PrepareMtlSlotCount', [bm_void_p, bm_CKDWORD])
## BMMeshTrans_PrepareMtlSlot
# @param trans[in] Type: BMap::BMMeshTransition*. The pointer to corresponding BMMeshTransition.
# @param out_mem[out] Type: LibCmo::CK2::CK_ID*. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMeshTrans_PrepareMtlSlot = _create_bmap_func('BMMeshTrans_PrepareMtlSlot', [bm_void_p, bm_CKID_pp])
## BMMeshTrans_PrepareFaceCount
# @param trans[in] Type: BMap::BMMeshTransition*. The pointer to corresponding BMMeshTransition.
# @param count[in] Type: LibCmo::CKDWORD.
# @return True if no error, otherwise False.
BMMeshTrans_PrepareFaceCount = _create_bmap_func('BMMeshTrans_PrepareFaceCount', [bm_void_p, bm_CKDWORD])
## BMMeshTrans_PrepareFaceVertexIndices
# @param trans[in] Type: BMap::BMMeshTransition*. The pointer to corresponding BMMeshTransition.
# @param out_mem[out] Type: LibCmo::CKDWORD*. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMeshTrans_PrepareFaceVertexIndices = _create_bmap_func('BMMeshTrans_PrepareFaceVertexIndices', [bm_void_p, bm_CKDWORD_pp])
## BMMeshTrans_PrepareFaceNormalIndices
# @param trans[in] Type: BMap::BMMeshTransition*. The pointer to corresponding BMMeshTransition.
# @param out_mem[out] Type: LibCmo::CKDWORD*. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMeshTrans_PrepareFaceNormalIndices = _create_bmap_func('BMMeshTrans_PrepareFaceNormalIndices', [bm_void_p, bm_CKDWORD_pp])
## BMMeshTrans_PrepareFaceUVIndices
# @param trans[in] Type: BMap::BMMeshTransition*. The pointer to corresponding BMMeshTransition.
# @param out_mem[out] Type: LibCmo::CKDWORD*. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMeshTrans_PrepareFaceUVIndices = _create_bmap_func('BMMeshTrans_PrepareFaceUVIndices', [bm_void_p, bm_CKDWORD_pp])
## BMMeshTrans_PrepareFaceMtlSlot
# @param trans[in] Type: BMap::BMMeshTransition*. The pointer to corresponding BMMeshTransition.
# @param out_mem[out] Type: LibCmo::CKDWORD*. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMeshTrans_PrepareFaceMtlSlot = _create_bmap_func('BMMeshTrans_PrepareFaceMtlSlot', [bm_void_p, bm_CKDWORD_pp])
## BMMeshTrans_Parse
# @param trans[in] Type: BMap::BMMeshTransition*. The pointer to corresponding BMMeshTransition.
# @param bmfile[in] Type: BMap::BMFile*.
# @param objid[in] Type: LibCmo::CK2::CK_ID.
# @return True if no error, otherwise False.
BMMeshTrans_Parse = _create_bmap_func('BMMeshTrans_Parse', [bm_void_p, bm_void_p, bm_CKID])
## BMObject_GetName
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_name[out] Type: LibCmo::CKSTRING. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMObject_GetName = _create_bmap_func('BMObject_GetName', [bm_void_p, bm_CKID, bm_CKSTRING_p])
## BMObject_SetName
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param name[in] Type: LibCmo::CKSTRING.
# @return True if no error, otherwise False.
BMObject_SetName = _create_bmap_func('BMObject_SetName', [bm_void_p, bm_CKID, bm_CKSTRING])
## BMGroup_AddObject
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param memberid[in] Type: LibCmo::CK2::CK_ID.
# @return True if no error, otherwise False.
BMGroup_AddObject = _create_bmap_func('BMGroup_AddObject', [bm_void_p, bm_CKID, bm_CKID])
## BMGroup_GetObjectCount
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_count[out] Type: LibCmo::CKDWORD. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMGroup_GetObjectCount = _create_bmap_func('BMGroup_GetObjectCount', [bm_void_p, bm_CKID, bm_CKDWORD_p])
## BMGroup_GetObject
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param pos[in] Type: LibCmo::CKDWORD.
# @param out_objid[out] Type: LibCmo::CK2::CK_ID. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMGroup_GetObject = _create_bmap_func('BMGroup_GetObject', [bm_void_p, bm_CKID, bm_CKDWORD, bm_CKID_p])
## BMTexture_GetFileName
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_filename[out] Type: LibCmo::CKSTRING. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMTexture_GetFileName = _create_bmap_func('BMTexture_GetFileName', [bm_void_p, bm_CKID, bm_CKSTRING_p])
## BMTexture_LoadImage
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param filename[in] Type: LibCmo::CKSTRING.
# @return True if no error, otherwise False.
BMTexture_LoadImage = _create_bmap_func('BMTexture_LoadImage', [bm_void_p, bm_CKID, bm_CKSTRING])
## BMTexture_SaveImage
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param filename[in] Type: LibCmo::CKSTRING.
# @return True if no error, otherwise False.
BMTexture_SaveImage = _create_bmap_func('BMTexture_SaveImage', [bm_void_p, bm_CKID, bm_CKSTRING])
## BMTexture_GetSaveOptions
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_saveopt[out] Type: LibCmo::CK2::CK_TEXTURE_SAVEOPTIONS. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMTexture_GetSaveOptions = _create_bmap_func('BMTexture_GetSaveOptions', [bm_void_p, bm_CKID, bm_enum_p])
## BMTexture_SetSaveOptions
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param saveopt[in] Type: LibCmo::CK2::CK_TEXTURE_SAVEOPTIONS.
# @return True if no error, otherwise False.
BMTexture_SetSaveOptions = _create_bmap_func('BMTexture_SetSaveOptions', [bm_void_p, bm_CKID, bm_enum])
## BMTexture_GetVideoFormat
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_vfmt[out] Type: LibCmo::VxMath::VX_PIXELFORMAT. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMTexture_GetVideoFormat = _create_bmap_func('BMTexture_GetVideoFormat', [bm_void_p, bm_CKID, bm_enum_p])
## BMTexture_SetVideoFormat
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param vfmt[in] Type: LibCmo::VxMath::VX_PIXELFORMAT.
# @return True if no error, otherwise False.
BMTexture_SetVideoFormat = _create_bmap_func('BMTexture_SetVideoFormat', [bm_void_p, bm_CKID, bm_enum])
## BMMaterial_GetDiffuse
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_val[out] Type: LibCmo::VxMath::VxColor. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMaterial_GetDiffuse = _create_bmap_func('BMMaterial_GetDiffuse', [bm_void_p, bm_CKID, bm_VxColor_p])
## BMMaterial_SetDiffuse
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param col[in] Type: LibCmo::VxMath::VxColor.
# @return True if no error, otherwise False.
BMMaterial_SetDiffuse = _create_bmap_func('BMMaterial_SetDiffuse', [bm_void_p, bm_CKID, bm_VxColor])
## BMMaterial_GetAmbient
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_val[out] Type: LibCmo::VxMath::VxColor. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMaterial_GetAmbient = _create_bmap_func('BMMaterial_GetAmbient', [bm_void_p, bm_CKID, bm_VxColor_p])
## BMMaterial_SetAmbient
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param col[in] Type: LibCmo::VxMath::VxColor.
# @return True if no error, otherwise False.
BMMaterial_SetAmbient = _create_bmap_func('BMMaterial_SetAmbient', [bm_void_p, bm_CKID, bm_VxColor])
## BMMaterial_GetSpecular
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_val[out] Type: LibCmo::VxMath::VxColor. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMaterial_GetSpecular = _create_bmap_func('BMMaterial_GetSpecular', [bm_void_p, bm_CKID, bm_VxColor_p])
## BMMaterial_SetSpecular
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param col[in] Type: LibCmo::VxMath::VxColor.
# @return True if no error, otherwise False.
BMMaterial_SetSpecular = _create_bmap_func('BMMaterial_SetSpecular', [bm_void_p, bm_CKID, bm_VxColor])
## BMMaterial_GetEmissive
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_val[out] Type: LibCmo::VxMath::VxColor. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMaterial_GetEmissive = _create_bmap_func('BMMaterial_GetEmissive', [bm_void_p, bm_CKID, bm_VxColor_p])
## BMMaterial_SetEmissive
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param col[in] Type: LibCmo::VxMath::VxColor.
# @return True if no error, otherwise False.
BMMaterial_SetEmissive = _create_bmap_func('BMMaterial_SetEmissive', [bm_void_p, bm_CKID, bm_VxColor])
## BMMaterial_GetSpecularPower
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_val[out] Type: LibCmo::CKFLOAT. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMaterial_GetSpecularPower = _create_bmap_func('BMMaterial_GetSpecularPower', [bm_void_p, bm_CKID, bm_CKFLOAT_p])
## BMMaterial_SetSpecularPower
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param val[in] Type: LibCmo::CKFLOAT.
# @return True if no error, otherwise False.
BMMaterial_SetSpecularPower = _create_bmap_func('BMMaterial_SetSpecularPower', [bm_void_p, bm_CKID, bm_CKFLOAT])
## BMMaterial_GetTexture
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_texid[out] Type: LibCmo::CK2::CK_ID. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMaterial_GetTexture = _create_bmap_func('BMMaterial_GetTexture', [bm_void_p, bm_CKID, bm_CKID_p])
## BMMaterial_SetTexture
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param texid[in] Type: LibCmo::CK2::CK_ID.
# @return True if no error, otherwise False.
BMMaterial_SetTexture = _create_bmap_func('BMMaterial_SetTexture', [bm_void_p, bm_CKID, bm_CKID])
## BMMaterial_GetTextureBorderColor
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_val[out] Type: LibCmo::CKDWORD. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMaterial_GetTextureBorderColor = _create_bmap_func('BMMaterial_GetTextureBorderColor', [bm_void_p, bm_CKID, bm_CKDWORD_p])
## BMMaterial_SetTextureBorderColor
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param val[in] Type: LibCmo::CKDWORD.
# @return True if no error, otherwise False.
BMMaterial_SetTextureBorderColor = _create_bmap_func('BMMaterial_SetTextureBorderColor', [bm_void_p, bm_CKID, bm_CKDWORD])
## BMMaterial_GetTextureBlendMode
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_val[out] Type: LibCmo::VxMath::VXTEXTURE_BLENDMODE. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMaterial_GetTextureBlendMode = _create_bmap_func('BMMaterial_GetTextureBlendMode', [bm_void_p, bm_CKID, bm_enum_p])
## BMMaterial_SetTextureBlendMode
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param val[in] Type: LibCmo::VxMath::VXTEXTURE_BLENDMODE.
# @return True if no error, otherwise False.
BMMaterial_SetTextureBlendMode = _create_bmap_func('BMMaterial_SetTextureBlendMode', [bm_void_p, bm_CKID, bm_enum])
## BMMaterial_GetTextureMinMode
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_val[out] Type: LibCmo::VxMath::VXTEXTURE_FILTERMODE. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMaterial_GetTextureMinMode = _create_bmap_func('BMMaterial_GetTextureMinMode', [bm_void_p, bm_CKID, bm_enum_p])
## BMMaterial_SetTextureMinMode
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param val[in] Type: LibCmo::VxMath::VXTEXTURE_FILTERMODE.
# @return True if no error, otherwise False.
BMMaterial_SetTextureMinMode = _create_bmap_func('BMMaterial_SetTextureMinMode', [bm_void_p, bm_CKID, bm_enum])
## BMMaterial_GetTextureMagMode
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_val[out] Type: LibCmo::VxMath::VXTEXTURE_FILTERMODE. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMaterial_GetTextureMagMode = _create_bmap_func('BMMaterial_GetTextureMagMode', [bm_void_p, bm_CKID, bm_enum_p])
## BMMaterial_SetTextureMagMode
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param val[in] Type: LibCmo::VxMath::VXTEXTURE_FILTERMODE.
# @return True if no error, otherwise False.
BMMaterial_SetTextureMagMode = _create_bmap_func('BMMaterial_SetTextureMagMode', [bm_void_p, bm_CKID, bm_enum])
## BMMaterial_GetTextureAddressMode
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_val[out] Type: LibCmo::VxMath::VXTEXTURE_ADDRESSMODE. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMaterial_GetTextureAddressMode = _create_bmap_func('BMMaterial_GetTextureAddressMode', [bm_void_p, bm_CKID, bm_enum_p])
## BMMaterial_SetTextureAddressMode
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param val[in] Type: LibCmo::VxMath::VXTEXTURE_ADDRESSMODE.
# @return True if no error, otherwise False.
BMMaterial_SetTextureAddressMode = _create_bmap_func('BMMaterial_SetTextureAddressMode', [bm_void_p, bm_CKID, bm_enum])
## BMMaterial_GetSourceBlend
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_val[out] Type: LibCmo::VxMath::VXBLEND_MODE. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMaterial_GetSourceBlend = _create_bmap_func('BMMaterial_GetSourceBlend', [bm_void_p, bm_CKID, bm_enum_p])
## BMMaterial_SetSourceBlend
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param val[in] Type: LibCmo::VxMath::VXBLEND_MODE.
# @return True if no error, otherwise False.
BMMaterial_SetSourceBlend = _create_bmap_func('BMMaterial_SetSourceBlend', [bm_void_p, bm_CKID, bm_enum])
## BMMaterial_GetDestBlend
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_val[out] Type: LibCmo::VxMath::VXBLEND_MODE. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMaterial_GetDestBlend = _create_bmap_func('BMMaterial_GetDestBlend', [bm_void_p, bm_CKID, bm_enum_p])
## BMMaterial_SetDestBlend
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param val[in] Type: LibCmo::VxMath::VXBLEND_MODE.
# @return True if no error, otherwise False.
BMMaterial_SetDestBlend = _create_bmap_func('BMMaterial_SetDestBlend', [bm_void_p, bm_CKID, bm_enum])
## BMMaterial_GetFillMode
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_val[out] Type: LibCmo::VxMath::VXFILL_MODE. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMaterial_GetFillMode = _create_bmap_func('BMMaterial_GetFillMode', [bm_void_p, bm_CKID, bm_enum_p])
## BMMaterial_SetFillMode
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param val[in] Type: LibCmo::VxMath::VXFILL_MODE.
# @return True if no error, otherwise False.
BMMaterial_SetFillMode = _create_bmap_func('BMMaterial_SetFillMode', [bm_void_p, bm_CKID, bm_enum])
## BMMaterial_GetShadeMode
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_val[out] Type: LibCmo::VxMath::VXSHADE_MODE. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMaterial_GetShadeMode = _create_bmap_func('BMMaterial_GetShadeMode', [bm_void_p, bm_CKID, bm_enum_p])
## BMMaterial_SetShadeMode
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param val[in] Type: LibCmo::VxMath::VXSHADE_MODE.
# @return True if no error, otherwise False.
BMMaterial_SetShadeMode = _create_bmap_func('BMMaterial_SetShadeMode', [bm_void_p, bm_CKID, bm_enum])
## BMMaterial_GetAlphaTestEnabled
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_val[out] Type: bool. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMaterial_GetAlphaTestEnabled = _create_bmap_func('BMMaterial_GetAlphaTestEnabled', [bm_void_p, bm_CKID, bm_bool_p])
## BMMaterial_SetAlphaTestEnabled
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param enabled[in] Type: bool.
# @return True if no error, otherwise False.
BMMaterial_SetAlphaTestEnabled = _create_bmap_func('BMMaterial_SetAlphaTestEnabled', [bm_void_p, bm_CKID, bm_bool])
## BMMaterial_GetAlphaBlendEnabled
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_val[out] Type: bool. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMaterial_GetAlphaBlendEnabled = _create_bmap_func('BMMaterial_GetAlphaBlendEnabled', [bm_void_p, bm_CKID, bm_bool_p])
## BMMaterial_SetAlphaBlendEnabled
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param enabled[in] Type: bool.
# @return True if no error, otherwise False.
BMMaterial_SetAlphaBlendEnabled = _create_bmap_func('BMMaterial_SetAlphaBlendEnabled', [bm_void_p, bm_CKID, bm_bool])
## BMMaterial_GetPerspectiveCorrectionEnabled
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_val[out] Type: bool. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMaterial_GetPerspectiveCorrectionEnabled = _create_bmap_func('BMMaterial_GetPerspectiveCorrectionEnabled', [bm_void_p, bm_CKID, bm_bool_p])
## BMMaterial_SetPerspectiveCorrectionEnabled
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param enabled[in] Type: bool.
# @return True if no error, otherwise False.
BMMaterial_SetPerspectiveCorrectionEnabled = _create_bmap_func('BMMaterial_SetPerspectiveCorrectionEnabled', [bm_void_p, bm_CKID, bm_bool])
## BMMaterial_GetZWriteEnabled
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_val[out] Type: bool. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMaterial_GetZWriteEnabled = _create_bmap_func('BMMaterial_GetZWriteEnabled', [bm_void_p, bm_CKID, bm_bool_p])
## BMMaterial_SetZWriteEnabled
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param enabled[in] Type: bool.
# @return True if no error, otherwise False.
BMMaterial_SetZWriteEnabled = _create_bmap_func('BMMaterial_SetZWriteEnabled', [bm_void_p, bm_CKID, bm_bool])
## BMMaterial_GetTwoSidedEnabled
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_val[out] Type: bool. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMaterial_GetTwoSidedEnabled = _create_bmap_func('BMMaterial_GetTwoSidedEnabled', [bm_void_p, bm_CKID, bm_bool_p])
## BMMaterial_SetTwoSidedEnabled
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param enabled[in] Type: bool.
# @return True if no error, otherwise False.
BMMaterial_SetTwoSidedEnabled = _create_bmap_func('BMMaterial_SetTwoSidedEnabled', [bm_void_p, bm_CKID, bm_bool])
## BMMaterial_GetAlphaRef
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_val[out] Type: LibCmo::CKBYTE. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMaterial_GetAlphaRef = _create_bmap_func('BMMaterial_GetAlphaRef', [bm_void_p, bm_CKID, bm_CKBYTE_p])
## BMMaterial_SetAlphaRef
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param val[in] Type: LibCmo::CKBYTE.
# @return True if no error, otherwise False.
BMMaterial_SetAlphaRef = _create_bmap_func('BMMaterial_SetAlphaRef', [bm_void_p, bm_CKID, bm_CKBYTE])
## BMMaterial_GetAlphaFunc
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_val[out] Type: LibCmo::VxMath::VXCMPFUNC. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMaterial_GetAlphaFunc = _create_bmap_func('BMMaterial_GetAlphaFunc', [bm_void_p, bm_CKID, bm_enum_p])
## BMMaterial_SetAlphaFunc
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param val[in] Type: LibCmo::VxMath::VXCMPFUNC.
# @return True if no error, otherwise False.
BMMaterial_SetAlphaFunc = _create_bmap_func('BMMaterial_SetAlphaFunc', [bm_void_p, bm_CKID, bm_enum])
## BMMaterial_GetZFunc
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_val[out] Type: LibCmo::VxMath::VXCMPFUNC. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMaterial_GetZFunc = _create_bmap_func('BMMaterial_GetZFunc', [bm_void_p, bm_CKID, bm_enum_p])
## BMMaterial_SetZFunc
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param val[in] Type: LibCmo::VxMath::VXCMPFUNC.
# @return True if no error, otherwise False.
BMMaterial_SetZFunc = _create_bmap_func('BMMaterial_SetZFunc', [bm_void_p, bm_CKID, bm_enum])
## BMMesh_GetVertexCount
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_count[out] Type: LibCmo::CKDWORD. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMesh_GetVertexCount = _create_bmap_func('BMMesh_GetVertexCount', [bm_void_p, bm_CKID, bm_CKDWORD_p])
## BMMesh_SetVertexCount
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param count[in] Type: LibCmo::CKDWORD.
# @return True if no error, otherwise False.
BMMesh_SetVertexCount = _create_bmap_func('BMMesh_SetVertexCount', [bm_void_p, bm_CKID, bm_CKDWORD])
## BMMesh_GetVertexPositions
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_mem[out] Type: LibCmo::VxMath::VxVector3*. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMesh_GetVertexPositions = _create_bmap_func('BMMesh_GetVertexPositions', [bm_void_p, bm_CKID, bm_VxVector2_pp])
## BMMesh_GetVertexNormals
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_mem[out] Type: LibCmo::VxMath::VxVector3*. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMesh_GetVertexNormals = _create_bmap_func('BMMesh_GetVertexNormals', [bm_void_p, bm_CKID, bm_VxVector2_pp])
## BMMesh_GetVertexUVs
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_mem[out] Type: LibCmo::VxMath::VxVector2*. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMesh_GetVertexUVs = _create_bmap_func('BMMesh_GetVertexUVs', [bm_void_p, bm_CKID, bm_VxVector2_pp])
## BMMesh_GetFaceCount
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_count[out] Type: LibCmo::CKDWORD. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMesh_GetFaceCount = _create_bmap_func('BMMesh_GetFaceCount', [bm_void_p, bm_CKID, bm_CKDWORD_p])
## BMMesh_SetFaceCount
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param count[in] Type: LibCmo::CKDWORD.
# @return True if no error, otherwise False.
BMMesh_SetFaceCount = _create_bmap_func('BMMesh_SetFaceCount', [bm_void_p, bm_CKID, bm_CKDWORD])
## BMMesh_GetFaceIndices
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_mem[out] Type: LibCmo::CKWORD*. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMesh_GetFaceIndices = _create_bmap_func('BMMesh_GetFaceIndices', [bm_void_p, bm_CKID, bm_CKWORD_pp])
## BMMesh_GetFaceMaterialSlotIndexs
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_mem[out] Type: LibCmo::CKWORD*. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMesh_GetFaceMaterialSlotIndexs = _create_bmap_func('BMMesh_GetFaceMaterialSlotIndexs', [bm_void_p, bm_CKID, bm_CKWORD_pp])
## BMMesh_GetMaterialSlotCount
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_count[out] Type: LibCmo::CKDWORD. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMesh_GetMaterialSlotCount = _create_bmap_func('BMMesh_GetMaterialSlotCount', [bm_void_p, bm_CKID, bm_CKDWORD_p])
## BMMesh_SetMaterialSlotCount
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param count[in] Type: LibCmo::CKDWORD.
# @return True if no error, otherwise False.
BMMesh_SetMaterialSlotCount = _create_bmap_func('BMMesh_SetMaterialSlotCount', [bm_void_p, bm_CKID, bm_CKDWORD])
## BMMesh_GetMaterialSlot
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param index[in] Type: LibCmo::CKDWORD.
# @param out_mtlid[out] Type: LibCmo::CK2::CK_ID. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BMMesh_GetMaterialSlot = _create_bmap_func('BMMesh_GetMaterialSlot', [bm_void_p, bm_CKID, bm_CKDWORD, bm_CKID_p])
## BMMesh_SetMaterialSlot
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param index[in] Type: LibCmo::CKDWORD.
# @param mtlid[in] Type: LibCmo::CK2::CK_ID.
# @return True if no error, otherwise False.
BMMesh_SetMaterialSlot = _create_bmap_func('BMMesh_SetMaterialSlot', [bm_void_p, bm_CKID, bm_CKDWORD, bm_CKID])
## BM3dObject_GetWorldMatrix
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_mat[out] Type: LibCmo::VxMath::VxMatrix. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BM3dObject_GetWorldMatrix = _create_bmap_func('BM3dObject_GetWorldMatrix', [bm_void_p, bm_CKID, bm_VxMatrix_p])
## BM3dObject_SetWorldMatrix
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param mat[in] Type: LibCmo::VxMath::VxMatrix.
# @return True if no error, otherwise False.
BM3dObject_SetWorldMatrix = _create_bmap_func('BM3dObject_SetWorldMatrix', [bm_void_p, bm_CKID, bm_VxMatrix])
## BM3dObject_GetCurrentMesh
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_meshid[out] Type: LibCmo::CK2::CK_ID. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BM3dObject_GetCurrentMesh = _create_bmap_func('BM3dObject_GetCurrentMesh', [bm_void_p, bm_CKID, bm_CKID_p])
## BM3dObject_SetCurrentMesh
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param meshid[in] Type: LibCmo::CK2::CK_ID.
# @return True if no error, otherwise False.
BM3dObject_SetCurrentMesh = _create_bmap_func('BM3dObject_SetCurrentMesh', [bm_void_p, bm_CKID, bm_CKID])
## BM3dObject_GetVisibility
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param out_isVisible[out] Type: bool. Use ctypes.byref(data) pass it.
# @return True if no error, otherwise False.
BM3dObject_GetVisibility = _create_bmap_func('BM3dObject_GetVisibility', [bm_void_p, bm_CKID, bm_bool_p])
## BM3dObject_SetVisibility
# @param bmfile[in] Type: BMap::BMFile*. The pointer to corresponding BMFile.
# @param objid[in] Type: LibCmo::CK2::CK_ID. The CKID of object you accessing.
# @param is_visible[in] Type: bool.
# @return True if no error, otherwise False.
BM3dObject_SetVisibility = _create_bmap_func('BM3dObject_SetVisibility', [bm_void_p, bm_CKID, bm_bool])
#endregion

View File

@ -0,0 +1,832 @@
import ctypes, typing, atexit
from . import bmap, virtools_types
#region Basic Class & Constant Defines
g_InvalidPtr: bmap.bm_void_p = bmap.bm_void_p(0)
g_InvalidCKID: int = 0
g_BMapEncoding: str = "utf-8"
class _AbstractPointer():
__mRawPointer: int
def __init__(self, raw_pointer: bmap.bm_void_p):
self._set_pointer(raw_pointer)
def _is_valid(self) -> bool:
return self.__mRawPointer != 0
def _get_pointer(self) -> bmap.bm_void_p:
return bmap.bm_void_p(self.__mRawPointer)
def _set_pointer(self, raw_pointer: bmap.bm_void_p):
if raw_pointer.value is None:
self.__mRawPointer = 0
else:
self.__mRawPointer = raw_pointer.value
def __eq__(self, obj: object) -> bool:
if isinstance(obj, self.__class__):
return obj.__mRawPointer == self.__mRawPointer
else:
return False
def __hash__(self) -> int:
return hash(self.__mRawPointer)
class _AbstractCKObject(_AbstractPointer):
__mCKID: int
def __init__(self, raw_pointer: bmap.bm_void_p, ckid: bmap.bm_CKID):
_AbstractPointer.__init__(self, raw_pointer)
self.__mCKID = ckid.value
def _is_valid(self) -> bool:
return _AbstractPointer._is_valid(self) and self.__mCKID != 0
def _get_ckid(self) -> bmap.bm_CKID:
return bmap.bm_CKID(self.__mCKID)
def __eq__(self, obj: object) -> bool:
if isinstance(obj, self.__class__):
return obj.__mRawPointer == self.__mRawPointer and obj.__mCKID == self.__mCKID
else:
return False
def __hash__(self) -> int:
return hash((self.__mRawPointer, self.__mCKID))
#endregion
#region Help Function & Type Define
TCKObj = typing.TypeVar('TCKObj', bound = _AbstractCKObject)
def _vxvector3_assigner(pvector: bmap.bm_VxVector3_p, count: int, itor: typing.Iterator[virtools_types.VxVector3]) -> None:
pfloat: bmap.bm_CKFLOAT_p = ctypes.cast(pvector, bmap.bm_CKFLOAT_p)
idx: int = 0
for _ in range(count):
uservector: virtools_types.VxVector3 = next(itor)
pfloat[idx] = uservector.x
pfloat[idx + 1] = uservector.y
pfloat[idx + 2] = uservector.z
idx += 3
def _vxvector3_iterator(pvector: bmap.bm_VxVector3_p, count: int) -> typing.Iterator[virtools_types.VxVector3]:
ret: virtools_types.VxVector3 = virtools_types.VxVector3()
pfloat: bmap.bm_CKFLOAT_p = ctypes.cast(pvector, bmap.bm_CKFLOAT_p)
idx: int = 0
for _ in range(count):
ret.x = pfloat[idx]
ret.y = pfloat[idx + 1]
ret.z = pfloat[idx + 2]
idx += 3
yield ret
def _vxvector2_assigner(pvector: bmap.bm_VxVector2_p, count: int, itor: typing.Iterator[virtools_types.VxVector2]) -> None:
pfloat: bmap.bm_CKFLOAT_p = ctypes.cast(pvector, bmap.bm_CKFLOAT_p)
idx: int = 0
for _ in range(count):
uservector: virtools_types.VxVector2 = next(itor)
pfloat[idx] = uservector.x
pfloat[idx + 1] = uservector.y
idx += 2
def _vxvector2_iterator(pvector: bmap.bm_VxVector2_p, count: int) -> typing.Iterator[virtools_types.VxVector2]:
ret: virtools_types.VxVector2 = virtools_types.VxVector2()
pfloat: bmap.bm_CKFLOAT_p = ctypes.cast(pvector, bmap.bm_CKFLOAT_p)
idx: int = 0
for _ in range(count):
ret.x = pfloat[idx]
ret.y = pfloat[idx + 1]
idx += 2
yield ret
def _ckfaceindices_assigner(pindices: bmap.bm_CKDWORD_p, count: int, itor: typing.Iterator[virtools_types.CKFaceIndices]) -> None:
idx: int = 0
for _ in range(count):
userindices: virtools_types.CKFaceIndices = next(itor)
pindices[idx] = userindices.i1
pindices[idx + 1] = userindices.i2
pindices[idx + 2] = userindices.i3
idx += 3
def _ckfaceindices_iterator(pindices: bmap.bm_CKDWORD_p, count: int) -> typing.Iterator[virtools_types.CKFaceIndices]:
ret: virtools_types.CKFaceIndices = virtools_types.CKFaceIndices()
idx: int = 0
for _ in range(count):
ret.i1 = pindices[idx]
ret.i2 = pindices[idx + 1]
ret.i3 = pindices[idx + 2]
idx += 3
#endregion
#region Valid Check, Init and Dispose
def is_bmap_available() -> bool:
return bmap.is_bmap_available()
# init module self and register exit function
if is_bmap_available():
bmap.BMInit()
def _auto_exit():
bmap.BMDispose()
atexit.register(_auto_exit)
#endregion
#region Real Type Defines
"""!
@remark
BMFileReader, BMFileWriter, and BMMeshTrans can be create by given constructor.
But they must be destroyed by calling dispose(). Otherwise it may cause memory leak.
You also can use python `with` statement to achieve this automatically.
BMObject, BMTexture, BMMaterial, BMMesh, and BM3dObject should NOT be constructed from given constructor.
They must be obtained from BMFileReader, BMFileWriter, and BMMeshTrans.
Thus BMObject, BMTexture, BMMaterial, BMMesh, and BM3dObject also do not need to free
because these resources are sotred in BMFileReader, BMFileWriter, and BMMeshTrans.
We just provide them as a visitor.
"""
class BMObject(_AbstractCKObject):
def get_name(self) -> str | None:
name: bmap.bm_CKSTRING = bmap.bm_CKSTRING()
bmap.BMObject_GetName(self._get_pointer(), self._get_ckid(), ctypes.byref(name))
if name.value is None:
return None
else:
return name.value.decode(g_BMapEncoding)
def set_name(self, name: str | None) -> None:
name: bmap.bm_CKSTRING
if name is None:
name = bmap.bm_CKSTRING(0)
else:
name = bmap.bm_CKSTRING(name.encode(g_BMapEncoding))
bmap.BMObject_SetName(self._get_pointer(), self._get_ckid(), name)
class BMTexture(BMObject):
def get_file_name(self) -> str | None:
filename: bmap.bm_CKSTRING = bmap.bm_CKSTRING()
bmap.BMTexture_GetFileName(self._get_pointer(), self._get_ckid(), ctypes.byref(filename))
if filename.value is None:
return None
else:
return filename.value.decode(g_BMapEncoding)
def load_image(self, filepath: str) -> None:
filename: bmap.bm_CKSTRING = bmap.bm_CKSTRING(filepath.encode(g_BMapEncoding))
bmap.BMTexture_LoadImage(self._get_pointer(), self._get_ckid(), filename)
def save_image(self, filepath: str) -> None:
filename: bmap.bm_CKSTRING = bmap.bm_CKSTRING(filepath.encode(g_BMapEncoding))
bmap.BMTexture_SaveImage(self._get_pointer(), self._get_ckid(), filename)
def get_save_options(self) -> virtools_types.CK_TEXTURE_SAVEOPTIONS:
opt: bmap.bm_enum = bmap.bm_enum()
bmap.BMTexture_GetSaveOptions(self._get_pointer(), self._get_ckid(), ctypes.byref(opt))
return virtools_types.CK_TEXTURE_SAVEOPTIONS(opt.value)
def set_save_options(self, opt_: virtools_types.CK_TEXTURE_SAVEOPTIONS) -> None:
opt: bmap.bm_enum = bmap.bm_enum(opt_.value)
bmap.BMTexture_SetSaveOptions(self._get_pointer(), self._get_ckid(), opt)
def get_video_format(self) -> virtools_types.VX_PIXELFORMAT:
fmt: bmap.bm_enum = bmap.bm_enum()
bmap.BMTexture_GetVideoFormat(self._get_pointer(), self._get_ckid(), ctypes.byref(fmt))
return virtools_types.VX_PIXELFORMAT(fmt.value)
def set_video_format(self, fmt_: virtools_types.VX_PIXELFORMAT) -> None:
fmt: bmap.bm_enum = bmap.bm_enum(fmt_.value)
bmap.BMTexture_SetVideoFormat(self._get_pointer(), self._get_ckid(), fmt)
class BMMaterial(BMObject):
def _set_vxcolor(self,
setter_: typing.Callable[[bmap.bm_void_p, bmap.bm_CKID, bmap.bm_VxColor], bool],
col_: virtools_types.VxColor) -> None:
# set to raw color
col: bmap.bm_VxColor = bmap.bm_VxColor()
col.r = col_.r
col.g = col_.g
col.b = col_.b
col.a = col_.a
# assign
setter_(self._get_pointer(), self._get_ckid(), col)
def _get_vxcolor(self,
getter_: typing.Callable[[bmap.bm_void_p, bmap.bm_CKID, bmap.bm_VxColor_p], bool]) -> virtools_types.VxColor:
# get raw color
col: bmap.bm_VxColor = bmap.bm_VxColor()
getter_(self._get_pointer(), self._get_ckid(), ctypes.byref(col))
# get from raw color
ret: virtools_types.VxColor = virtools_types.VxColor()
ret.r = col.r
ret.g = col.g
ret.b = col.b
ret.a = col.a
return ret
def get_diffuse(self) -> virtools_types.VxColor:
return self._get_vxcolor(bmap.BMMaterial_GetDiffuse)
def set_diffuse(self, col: virtools_types.VxColor) -> None:
self._set_vxcolor(bmap.BMMaterial_SetDiffuse, col)
def get_ambient(self) -> virtools_types.VxColor:
return self._get_vxcolor(bmap.BMMaterial_GetAmbient)
def set_ambient(self, col: virtools_types.VxColor) -> None:
self._set_vxcolor(bmap.BMMaterial_SetAmbient, col)
def get_specular(self) -> virtools_types.VxColor:
return self._get_vxcolor(bmap.BMMaterial_GetSpecular)
def set_specular(self, col: virtools_types.VxColor) -> None:
self._set_vxcolor(bmap.BMMaterial_SetSpecular, col)
def get_emissive(self) -> virtools_types.VxColor:
return self._get_vxcolor(bmap.BMMaterial_GetEmissive)
def set_emissive(self, col: virtools_types.VxColor) -> None:
self._set_vxcolor(bmap.BMMaterial_SetEmissive, col)
def get_specular_power(self) -> float:
power: bmap.bm_CKFLOAT = bmap.bm_CKFLOAT()
bmap.BMMaterial_GetSpecularPower(self._get_pointer(), self._get_ckid(), ctypes.byref(power))
return power.value
def set_specular_power(self, power_: float) -> None:
power: bmap.bm_CKFLOAT = bmap.bm_CKFLOAT(power_)
bmap.BMMaterial_SetSpecularPower(self._get_pointer(), self._get_ckid(), power)
def get_texture(self) -> BMTexture | None:
objid: bmap.bm_CKID = bmap.bm_CKID()
bmap.BMMaterial_GetTexture(self._get_pointer(), self._get_ckid(), ctypes.byref(objid))
if objid.value == g_InvalidCKID:
return None
else:
return BMTexture(self._get_pointer(), objid)
def set_texture(self, tex_: BMTexture | None) -> None:
objid: bmap.bm_CKID = bmap.bm_CKID(g_InvalidCKID)
if tex_ is not None:
objid.value = tex_._get_ckid()
bmap.BMMaterial_SetTexture(self._get_pointer(), self._get_ckid(), objid)
def get_texture_border_color(self) -> virtools_types.VxColor:
col: bmap.bm_CKDWORD = bmap.bm_CKDWORD()
bmap.BMMaterial_GetTextureBorderColor(self._get_pointer(), self._get_ckid(), ctypes.byref(col))
ret: virtools_types.VxColor = virtools_types.VxColor()
ret.from_dword(col.value)
return ret
def set_texture_border_color(self, col_: virtools_types.VxColor) -> None:
col: bmap.bm_CKDWORD = bmap.bm_CKDWORD(col_.to_dword())
bmap.BMMaterial_SetTextureBorderColor(self._get_pointer(), self._get_ckid(), col)
def get_texture_blend_mode(self) -> virtools_types.VXTEXTURE_BLENDMODE:
data: bmap.bm_enum = bmap.bm_enum()
bmap.BMMaterial_GetTextureBlendMode(self._get_pointer(), self._get_ckid(), ctypes.byref(data))
return virtools_types.VXTEXTURE_BLENDMODE(data.value)
def set_texture_blend_mode(self, data_: virtools_types.VXTEXTURE_BLENDMODE) -> None:
data: bmap.bm_enum = bmap.bm_enum(data_.value)
bmap.BMMaterial_SetTextureBlendMode(self._get_pointer(), self._get_ckid(), data)
def get_texture_min_mode(self) -> virtools_types.VXTEXTURE_FILTERMODE:
data: bmap.bm_enum = bmap.bm_enum()
bmap.BMMaterial_GetTextureMinMode(self._get_pointer(), self._get_ckid(), ctypes.byref(data))
return virtools_types.VXTEXTURE_FILTERMODE(data.value)
def set_texture_min_mode(self, data_: virtools_types.VXTEXTURE_FILTERMODE) -> None:
data: bmap.bm_enum = bmap.bm_enum(data_.value)
bmap.BMMaterial_SetTextureMinMode(self._get_pointer(), self._get_ckid(), data)
def get_texture_mag_mode(self) -> virtools_types.VXTEXTURE_FILTERMODE:
data: bmap.bm_enum = bmap.bm_enum()
bmap.BMMaterial_GetTextureMagMode(self._get_pointer(), self._get_ckid(), ctypes.byref(data))
return virtools_types.VXTEXTURE_FILTERMODE(data.value)
def set_texture_mag_mode(self, data_: virtools_types.VXTEXTURE_FILTERMODE) -> None:
data: bmap.bm_enum = bmap.bm_enum(data_.value)
bmap.BMMaterial_SetTextureMagMode(self._get_pointer(), self._get_ckid(), data)
def get_texture_address_mode(self) -> virtools_types.VXTEXTURE_ADDRESSMODE:
data: bmap.bm_enum = bmap.bm_enum()
bmap.BMMaterial_GetTextureAddressMode(self._get_pointer(), self._get_ckid(), ctypes.byref(data))
return virtools_types.VXTEXTURE_ADDRESSMODE(data.value)
def set_texture_address_mode(self, data_: virtools_types.VXTEXTURE_ADDRESSMODE) -> None:
data: bmap.bm_enum = bmap.bm_enum(data_.value)
bmap.BMMaterial_SetTextureAddressMode(self._get_pointer(), self._get_ckid(), data)
def get_source_blend(self) -> virtools_types.VXBLEND_MODE:
data: bmap.bm_enum = bmap.bm_enum()
bmap.BMMaterial_GetSourceBlend(self._get_pointer(), self._get_ckid(), ctypes.byref(data))
return virtools_types.VXBLEND_MODE(data.value)
def set_source_blend(self, data_: virtools_types.VXBLEND_MODE) -> None:
data: bmap.bm_enum = bmap.bm_enum(data_.value)
bmap.BMMaterial_SetSourceBlend(self._get_pointer(), self._get_ckid(), data)
def get_dest_blend(self) -> virtools_types.VXBLEND_MODE:
data: bmap.bm_enum = bmap.bm_enum()
bmap.BMMaterial_GetDestBlend(self._get_pointer(), self._get_ckid(), ctypes.byref(data))
return virtools_types.VXBLEND_MODE(data.value)
def set_dest_blend(self, data_: virtools_types.VXBLEND_MODE) -> None:
data: bmap.bm_enum = bmap.bm_enum(data_.value)
bmap.BMMaterial_SetDestBlend(self._get_pointer(), self._get_ckid(), data)
def get_fill_mode(self) -> virtools_types.VXFILL_MODE:
data: bmap.bm_enum = bmap.bm_enum()
bmap.BMMaterial_GetFillMode(self._get_pointer(), self._get_ckid(), ctypes.byref(data))
return virtools_types.VXFILL_MODE(data.value)
def set_fill_mode(self, data_: virtools_types.VXFILL_MODE) -> None:
data: bmap.bm_enum = bmap.bm_enum(data_.value)
bmap.BMMaterial_SetFillMode(self._get_pointer(), self._get_ckid(), data)
def get_shade_mode(self) -> virtools_types.VXSHADE_MODE:
data: bmap.bm_enum = bmap.bm_enum()
bmap.BMMaterial_GetShadeMode(self._get_pointer(), self._get_ckid(), ctypes.byref(data))
return virtools_types.VXSHADE_MODE(data.value)
def set_shade_mode(self, data_: virtools_types.VXSHADE_MODE) -> None:
data: bmap.bm_enum = bmap.bm_enum(data_.value)
bmap.BMMaterial_SetShadeMode(self._get_pointer(), self._get_ckid(), data)
def get_alpha_test_enabled(self) -> bool:
data: bmap.bm_bool = bmap.bm_bool()
bmap.BMMaterial_GetAlphaTestEnabled(self._get_pointer(), self._get_ckid(), ctypes.byref(data))
return data.value
def set_alpha_test_enabled(self, data_: bool) -> None:
data: bmap.bm_bool = bmap.bm_bool(data_)
bmap.BMMaterial_SetAlphaTestEnabled(self._get_pointer(), self._get_ckid(), data)
def get_alpha_blend_enabled(self) -> bool:
data: bmap.bm_bool = bmap.bm_bool()
bmap.BMMaterial_GetAlphaBlendEnabled(self._get_pointer(), self._get_ckid(), ctypes.byref(data))
return data.value
def set_alpha_blend_enabled(self, data_: bool) -> None:
data: bmap.bm_bool = bmap.bm_bool(data_)
bmap.BMMaterial_SetAlphaBlendEnabled(self._get_pointer(), self._get_ckid(), data)
def get_perspective_correction_enabled(self) -> bool:
data: bmap.bm_bool = bmap.bm_bool()
bmap.BMMaterial_GetPerspectiveCorrectionEnabled(self._get_pointer(), self._get_ckid(), ctypes.byref(data))
return data.value
def set_perspective_correction_enabled(self, data_: bool) -> None:
data: bmap.bm_bool = bmap.bm_bool(data_)
bmap.BMMaterial_SetPerspectiveCorrectionEnabled(self._get_pointer(), self._get_ckid(), data)
def get_z_write_enabled(self) -> bool:
data: bmap.bm_bool = bmap.bm_bool()
bmap.BMMaterial_GetZWriteEnabled(self._get_pointer(), self._get_ckid(), ctypes.byref(data))
return data.value
def set_z_write_enabled(self, data_: bool) -> None:
data: bmap.bm_bool = bmap.bm_bool(data_)
bmap.BMMaterial_SetZWriteEnabled(self._get_pointer(), self._get_ckid(), data)
def get_two_sided_enabled(self) -> bool:
data: bmap.bm_bool = bmap.bm_bool()
bmap.BMMaterial_GetTwoSidedEnabled(self._get_pointer(), self._get_ckid(), ctypes.byref(data))
return data.value
def set_two_sided_enabled(self, data_: bool) -> None:
data: bmap.bm_bool = bmap.bm_bool(data_)
bmap.BMMaterial_SetTwoSidedEnabled(self._get_pointer(), self._get_ckid(), data)
def get_alpha_ref(self) -> int:
data: bmap.bm_CKBYTE = bmap.bm_CKBYTE()
bmap.BMMaterial_GetAlphaRef(self._get_pointer(), self._get_ckid(), ctypes.byref(data))
return data.value
def set_alpha_ref(self, data_: int):
data: bmap.bm_CKBYTE = bmap.bm_CKBYTE(data_)
bmap.BMMaterial_SetAlphaRef(self._get_pointer(), self._get_ckid(), data)
def get_alpha_func(self) -> virtools_types.VXCMPFUNC:
data: bmap.bm_enum = bmap.bm_enum()
bmap.BMMaterial_GetAlphaFunc(self._get_pointer(), self._get_ckid(), ctypes.byref(data))
return virtools_types.VXCMPFUNC(data.value)
def set_alpha_func(self, data_: virtools_types.VXCMPFUNC) -> None:
data: bmap.bm_enum = bmap.bm_enum(data_.value)
bmap.BMMaterial_SetAlphaFunc(self._get_pointer(), self._get_ckid(), data)
def get_z_func(self) -> virtools_types.VXCMPFUNC:
data: bmap.bm_enum = bmap.bm_enum()
bmap.BMMaterial_GetZFunc(self._get_pointer(), self._get_ckid(), ctypes.byref(data))
return virtools_types.VXCMPFUNC(data.value)
def set_z_func(self, data_: virtools_types.VXCMPFUNC) -> None:
data: bmap.bm_enum = bmap.bm_enum(data_.value)
bmap.BMMaterial_SetZFunc(self._get_pointer(), self._get_ckid(), data)
class BMMesh(BMObject):
def get_vertex_count(self) -> int:
count: bmap.bm_CKDWORD = bmap.bm_CKDWORD()
bmap.BMMesh_GetVertexCount(self._get_pointer(), self._get_ckid(), ctypes.byref(count))
return count.value
def set_vertex_count(self, count_: int) -> None:
count: bmap.bm_CKDWORD = bmap.bm_CKDWORD(count_)
bmap.BMMesh_SetVertexCount(self._get_pointer(), self._get_ckid(), count)
def get_vertex_positions(self) -> typing.Iterator[virtools_types.VxVector3]:
# get raw pointer and return
raw_vector: bmap.bm_VxVector3_p = bmap.bm_VxVector3_p()
bmap.BMMesh_GetVertexPositions(self._get_pointer(), self._get_ckid(), ctypes.byref(raw_vector))
return _vxvector3_iterator(raw_vector, self.get_vertex_count())
def set_vertex_positions(self, itor: typing.Iterator[virtools_types.VxVector3]) -> None:
# get raw float pointer and assign
raw_vector: bmap.bm_VxVector3_p = bmap.bm_VxVector3_p()
bmap.BMMesh_GetVertexPositions(self._get_pointer(), self._get_ckid(), ctypes.byref(raw_vector))
_vxvector3_assigner(raw_vector, self.get_vertex_count(), itor)
def get_vertex_normals(self) -> typing.Iterator[virtools_types.VxVector3]:
raw_vector: bmap.bm_VxVector3_p = bmap.bm_VxVector3_p()
bmap.BMMesh_GetVertexNormals(self._get_pointer(), self._get_ckid(), ctypes.byref(raw_vector))
return _vxvector3_iterator(raw_vector, self.get_vertex_count())
def set_vertex_normals(self, itor: typing.Iterator[virtools_types.VxVector3]) -> None:
raw_vector: bmap.bm_VxVector3_p = bmap.bm_VxVector3_p()
bmap.BMMesh_GetVertexNormals(self._get_pointer(), self._get_ckid(), ctypes.byref(raw_vector))
_vxvector3_assigner(raw_vector, self.get_vertex_count(), itor)
def get_vertex_uvs(self) -> typing.Iterator[virtools_types.VxVector2]:
raw_vector: bmap.bm_VxVector2_p = bmap.bm_VxVector2_p()
bmap.BMMesh_GetVertexUVs(self._get_pointer(), self._get_ckid(), ctypes.byref(raw_vector))
_vxvector2_iterator(raw_vector, self.get_vertex_count())
def set_vertex_uvs(self, itor: typing.Iterator[virtools_types.VxVector2]) -> None:
raw_vector: bmap.bm_VxVector2_p = bmap.bm_VxVector2_p()
bmap.BMMesh_GetVertexUVs(self._get_pointer(), self._get_ckid(), ctypes.byref(raw_vector))
_vxvector2_assigner(raw_vector, self.get_vertex_count(), itor)
def get_face_count(self) -> int:
count: bmap.bm_CKDWORD = bmap.bm_CKDWORD()
bmap.BMMesh_GetFaceCount(self._get_pointer(), self._get_ckid(), ctypes.byref(count))
return count.value
def set_face_count(self, count_: int) -> None:
count: bmap.bm_CKDWORD = bmap.bm_CKDWORD(count_)
bmap.BMMesh_SetFaceCount(self._get_pointer(), self._get_ckid(), count)
def get_face_indices(self) -> typing.Iterator[virtools_types.CKFaceIndices]:
raw_idx: bmap.bm_CKWORD_p = bmap.bm_CKWORD_p()
bmap.BMMesh_GetFaceIndices(self._get_pointer(), self._get_ckid(), ctypes.byref(raw_idx))
return _ckfaceindices_iterator(raw_idx, self.get_face_count())
def set_face_indices(self, itor: typing.Iterator[virtools_types.CKFaceIndices]) -> None:
raw_idx: bmap.bm_CKWORD_p = bmap.bm_CKWORD_p()
bmap.BMMesh_GetFaceIndices(self._get_pointer(), self._get_ckid(), ctypes.byref(raw_idx))
_ckfaceindices_assigner(raw_idx, self.get_face_count(), itor)
def get_face_material_slot_indexs(self) -> typing.Iterator[int]:
raw_idx: bmap.bm_CKWORD_p = bmap.bm_CKWORD_p()
bmap.BMMesh_GetFaceIndices(self._get_pointer(), self._get_ckid(), ctypes.byref(raw_idx))
for i in range(self.get_face_count()):
yield raw_idx[i]
def set_face_material_slot_indexs(self, itor: typing.Iterator[int]) -> None:
raw_idx: bmap.bm_CKWORD_p = bmap.bm_CKWORD_p()
bmap.BMMesh_GetFaceIndices(self._get_pointer(), self._get_ckid(), ctypes.byref(raw_idx))
for i in range(self.get_face_count()):
raw_idx[i] = next(itor)
def get_material_slot_count(self) -> int:
count: bmap.bm_CKDWORD = bmap.bm_CKDWORD()
bmap.BMMesh_GetMaterialSlotCount(self._get_pointer(), self._get_ckid(), ctypes.byref(count))
return count.value
def set_material_slot_count(self, count_: int) -> None:
count: bmap.bm_CKDWORD = bmap.bm_CKDWORD(count_)
bmap.BMMesh_SetMaterialSlotCount(self._get_pointer(), self._get_ckid(), count)
def get_material_slots(self) -> typing.Iterator[BMMaterial | None]:
idx: bmap.bm_CKDWORD = bmap.bm_CKDWORD()
mtlid: bmap.bm_CKID = bmap.bm_CKID()
for i in range(self.get_material_slot_count()):
idx.value = i
bmap.BMMesh_GetMaterialSlot(self._get_pointer(), self._get_ckid(), idx, ctypes.byref(mtlid))
if mtlid.value == g_InvalidCKID:
yield None
else:
yield BMMaterial(self._get_pointer(), mtlid)
def set_material_slots(self, itor: typing.Iterator[BMMaterial | None]) -> None:
idx: bmap.bm_CKDWORD = bmap.bm_CKDWORD()
mtlid: bmap.bm_CKID = bmap.bm_CKID()
for i in range(self.get_material_slot_count()):
idx.value = i
# analyze mtl item
mtlobj: BMMaterial | None = next(itor)
if mtlobj is None:
mtlid.value = g_InvalidCKID
else:
mtlid.value = mtlobj._get_ckid()
# set
bmap.BMMesh_SetMaterialSlot(self._get_pointer(), self._get_ckid(), idx, mtlid)
class BM3dObject(BMObject):
def get_world_matrix(self) -> virtools_types.VxMatrix:
mat: bmap.bm_VxMatrix = bmap.bm_VxMatrix()
bmap.BM3dObject_GetWorldMatrix(self._get_pointer(), self._get_ckid(), ctypes.byref(mat))
# use cast & pointer to get matrix data conveniently
flat: bmap.bm_CKFLOAT_p = ctypes.cast(ctypes.byref(mat), bmap.bm_CKFLOAT_p)
ret: virtools_types.VxMatrix = virtools_types.VxMatrix()
ret.from_const(tuple(flat[i] for i in range(16)))
return ret
def set_world_matrix(self, mat: virtools_types.VxMatrix) -> None:
# star syntax expand the tuple as the argument.
mat: bmap.bm_VxMatrix = bmap.bm_VxMatrix(*(mat.to_const()))
bmap.BM3dObject_SetWorldMatrix(self._get_pointer(), self._get_ckid(), mat)
def get_current_mesh(self) -> BMMesh | None:
ckid: bmap.bm_CKID = bmap.bm_CKID()
bmap.BM3dObject_GetCurrentMesh(self._get_pointer(), self._get_ckid(), ctypes.byref(ckid))
if ckid.value == g_InvalidCKID:
return None
else:
return BMMesh(self._get_pointer(), ckid)
def set_current_mesh(self, mesh: BMMesh | None) -> None:
ckid: bmap.bm_CKID = bmap.bm_CKID(g_InvalidCKID)
if mesh is not None:
ckid.value = mesh._get_ckid()
bmap.BM3dObject_SetCurrentMesh(self._get_pointer(), self._get_ckid(), ckid)
def get_visibility(self) -> bool:
visb: bmap.bm_bool = bmap.bm_bool()
bmap.BM3dObject_GetVisibility(self._get_pointer(), self._get_ckid(), ctypes.byref(visb))
return visb.value
def set_visibility(self, visb_: bool) -> None:
visb: bmap.bm_bool = bmap.bm_bool(visb_)
bmap.BM3dObject_SetVisibility(self._get_pointer(), self._get_ckid(), visb)
class BMGroup(BMObject):
def add_object(self, member: BM3dObject) -> None:
bmap.BMGroup_AddObject(self._get_pointer(), self._get_ckid(), member._get_ckid())
def get_object_count(self) -> int:
csize: bmap.bm_CKDWORD = bmap.bm_CKDWORD()
bmap.BMGroup_GetObjectCount(self._get_pointer(), self._get_ckid(), ctypes.byref(csize))
return csize.value
def get_objects(self) -> typing.Iterator[BM3dObject]:
csize: int = self.get_object_count()
# iterate list
cidx: bmap.bm_CKDWORD = bmap.bm_CKDWORD()
retid: bmap.bm_CKID = bmap.bm_CKID()
for i in range(csize):
cidx.value = i
bmap.BMGroup_GetObject(self._get_pointer(), self._get_ckid(), cidx, ctypes.byref(retid))
# return visitor
yield BM3dObject(self._get_pointer(), retid)
class BMFileReader(_AbstractPointer):
def __init__(self, file_name_: str, temp_folder_: str, texture_folder_: str, encodings_: tuple[str]):
# create param
file_name: bmap.bm_CKSTRING = bmap.bm_CKSTRING(file_name_.encode(g_BMapEncoding))
temp_folder: bmap.bm_CKSTRING = bmap.bm_CKSTRING(temp_folder_.encode(g_BMapEncoding))
texture_folder: bmap.bm_CKSTRING = bmap.bm_CKSTRING(texture_folder_.encode(g_BMapEncoding))
encoding_count: bmap.bm_CKDWORD = bmap.bm_CKDWORD(len(encodings_))
encodings: ctypes.Array = (bmap.bm_CKSTRING * len(encodings_))(
*(strl.encode(g_BMapEncoding) for strl in encodings_)
)
out_file: bmap.bm_void_p = bmap.bm_void_p()
# exec
bmap.BMFile_Load(
file_name, temp_folder, texture_folder, encoding_count, encodings,
ctypes.byref(out_file)
)
# init self
_AbstractPointer.__init__(self, out_file)
def __enter__(self):
return self
def __exit__(self, exc_type, exc_value, traceback):
self.dispose()
def dispose(self) -> None:
if self._is_valid():
bmap.BMFile_Free(self._get_pointer())
self._set_pointer(g_InvalidPtr)
def __get_ckobject_count(self,
count_getter: typing.Callable[[bmap.bm_void_p, bmap.bm_CKDWORD_p], bool]) -> int:
# get size
csize: bmap.bm_CKDWORD = bmap.bm_CKDWORD()
count_getter(self._get_pointer(), ctypes.byref(csize))
return csize.value
def __get_ckobjects(self,
class_type: type[TCKObj],
count_getter: typing.Callable[[bmap.bm_void_p, bmap.bm_CKDWORD_p], bool],
obj_getter: typing.Callable[[bmap.bm_void_p, bmap.bm_CKDWORD, bmap.bm_CKID_p], bool]) -> typing.Iterator[TCKObj]:
# get size first
csize: int = self.__get_ckobject_count(count_getter)
# iterate list
cidx: bmap.bm_CKDWORD = bmap.bm_CKDWORD()
retid: bmap.bm_CKID = bmap.bm_CKID()
for i in range(csize):
cidx.value = i
obj_getter(self._get_pointer(), cidx, ctypes.byref(retid))
# yield return constructed obj visitor
yield class_type(self._get_pointer(), retid)
def get_texture_count(self) -> int:
return self.__get_ckobject_count(bmap.BMFile_GetTextureCount)
def get_textures(self) -> typing.Iterator[BMTexture]:
return self.__get_ckobjects(
BMTexture,
bmap.BMFile_GetTextureCount,
bmap.BMFile_GetTexture
)
def get_material_count(self) -> int:
return self.__get_ckobject_count(bmap.BMFile_GetMaterialCount)
def get_materials(self) -> typing.Iterator[BMMaterial]:
return self.__get_ckobjects(
BMMaterial,
bmap.BMFile_GetMaterialCount,
bmap.BMFile_GetMaterial
)
def get_mesh_count(self) -> int:
return self.__get_ckobject_count(bmap.BMFile_GetMeshCount)
def get_meshs(self) -> typing.Iterator[BMMesh]:
return self.__get_ckobjects(
BMMesh,
bmap.BMFile_GetMeshCount,
bmap.BMFile_GetMesh
)
def get_3dobject_count(self) -> int:
return self.__get_ckobject_count(bmap.BMFile_Get3dObjectCount)
def get_3dobjects(self) -> typing.Iterator[BM3dObject]:
return self.__get_ckobjects(
BM3dObject,
bmap.BMFile_Get3dObjectCount,
bmap.BMFile_Get3dObject
)
def get_group_count(self) -> int:
return self.__get_ckobject_count(bmap.BMFile_GetGroupCount)
def get_groups(self) -> typing.Iterator[BMGroup]:
return self.__get_ckobjects(
BMGroup,
bmap.BMFile_GetGroupCount,
bmap.BMFile_GetGroup
)
class BMFileWriter(_AbstractPointer):
def __init__(self, temp_folder_: str, texture_folder_: str, encodings_: tuple[str]):
# create param
temp_folder: bmap.bm_CKSTRING = bmap.bm_CKSTRING(temp_folder_.encode(g_BMapEncoding))
texture_folder: bmap.bm_CKSTRING = bmap.bm_CKSTRING(texture_folder_.encode(g_BMapEncoding))
encoding_count: bmap.bm_CKDWORD = bmap.bm_CKDWORD(len(encodings_))
encodings: ctypes.Array = (bmap.bm_CKSTRING * len(encodings_))(
*(strl.encode(g_BMapEncoding) for strl in encodings_)
)
out_file: bmap.bm_void_p = bmap.bm_void_p()
# exec
bmap.BMFile_Create(
temp_folder, texture_folder, encoding_count, encodings,
ctypes.byref(out_file)
)
# init self
_AbstractPointer.__init__(self, out_file)
def __enter__(self):
return self
def __exit__(self, exc_type, exc_value, traceback):
self.dispose()
def save(self, file_name_: str, compress_level_: int) -> None:
# create param
file_name: bmap.bm_CKSTRING = bmap.bm_CKSTRING(file_name_.encode(g_BMapEncoding))
compress_level: bmap.bm_CKINT = bmap.bm_CKINT(compress_level_)
# exec
bmap.BMFile_Save(self._get_pointer(), file_name, compress_level)
def dispose(self) -> None:
if self._is_valid():
bmap.BMFile_Free(self._get_pointer())
self._set_pointer(g_InvalidPtr)
def __create_ckobject(self,
class_type: type[TCKObj],
creator: typing.Callable[[bmap.bm_void_p, bmap.bm_CKID_p], bool]) -> TCKObj:
# prepare id container
retid: bmap.bm_CKID = bmap.bm_CKID()
# create new one
creator(self._get_pointer(), ctypes.byref(retid))
# return visitor
return class_type(self._get_pointer(), retid)
def create_texture(self) -> BMTexture:
self.__create_ckobject(
BMTexture,
bmap.BMFile_CreateTexture
)
def create_material(self) -> BMMaterial:
self.__create_ckobject(
BMMaterial,
bmap.BMFile_CreateMaterial
)
def create_mesh(self) -> BMMesh:
self.__create_ckobject(
BMMesh,
bmap.BMFile_CreateMesh
)
def create_3dobject(self) -> BM3dObject:
self.__create_ckobject(
BM3dObject,
bmap.BMFile_Create3dObject
)
def create_group(self) -> BMGroup:
self.__create_ckobject(
BMGroup,
bmap.BMFile_CreateGroup
)
class BMMeshTrans(_AbstractPointer):
def __init__(self):
ptr: bmap.bm_void_p = bmap.bm_void_p()
bmap.BMMeshTrans_New(ctypes.byref(ptr))
_AbstractPointer.__init__(self, ptr)
def __enter__(self):
return self
def __exit__(self, exc_type, exc_value, traceback):
self.dispose()
def dispose(self) -> None:
if self._is_valid():
bmap.BMMeshTrans_Delete(self._get_pointer())
self._set_pointer(g_InvalidPtr)
def parse(self, bmfile: BMFileWriter, objmesh: BMMesh) -> None:
bmap.BMMeshTrans_Parse(self._get_pointer(), bmfile._get_pointer(), objmesh._get_ckid())
def prepare_vertex(self, count: int, itor: typing.Iterator[virtools_types.VxVector3]) -> None:
# prepare count first
csize: bmap.bm_CKDWORD = bmap.bm_CKDWORD(count)
bmap.BMMeshTrans_PrepareVertexCount(self._get_pointer(), csize)
# get raw pointer and conv to float ptr for convenient visit
raw_vector: bmap.bm_VxVector3_p = bmap.bm_VxVector3_p()
bmap.BMMeshTrans_PrepareVertex(self._get_pointer(), ctypes.byref(raw_vector))
# set by pointer
_vxvector3_assigner(raw_vector, count, itor)
def prepare_normal(self, count: int, itor: typing.Iterator[virtools_types.VxVector3]) -> None:
csize: bmap.bm_CKDWORD = bmap.bm_CKDWORD(count)
bmap.BMMeshTrans_PrepareNormalCount(self._get_pointer(), csize)
raw_vector: bmap.bm_VxVector3_p = bmap.bm_VxVector3_p()
bmap.BMMeshTrans_PrepareNormal(self._get_pointer(), ctypes.byref(raw_vector))
_vxvector3_assigner(raw_vector, count, itor)
def prepare_uv(self, count: int, itor: typing.Iterator[virtools_types.VxVector2]) -> None:
csize: bmap.bm_CKDWORD = bmap.bm_CKDWORD(count)
bmap.BMMeshTrans_PrepareUVCount(self._get_pointer(), csize)
raw_vector: bmap.bm_VxVector2_p = bmap.bm_VxVector2_p()
bmap.BMMeshTrans_PrepareUV(self._get_pointer(), ctypes.byref(raw_vector))
_vxvector2_assigner(raw_vector, count, itor)
def prepare_mtl_slot(self, count: int, itor: typing.Iterator[BMMaterial | None]) -> None:
csize: bmap.bm_CKDWORD = bmap.bm_CKDWORD(count)
bmap.BMMeshTrans_PrepareMtlSlotCount(self._get_pointer(), csize)
raw_ckid: bmap.bm_CKID_p = bmap.bm_CKID_p()
bmap.BMMeshTrans_PrepareMtlSlot(self._get_pointer(), ctypes.byref(raw_ckid))
idx: int = 0
for _ in range(count):
usermtl: BMMaterial = next(itor)
if usermtl is None:
raw_ckid[idx] = g_InvalidCKID
else:
raw_ckid[idx] = usermtl._get_ckid().value
idx += 1
def prepare_face(self,
count: int,
vec_idx: typing.Iterator[virtools_types.CKFaceIndices],
nml_idx: typing.Iterator[virtools_types.CKFaceIndices],
uv_idx: typing.Iterator[virtools_types.CKFaceIndices],
mtl_idx: typing.Iterator[int]) -> None:
# prepare face size
csize: bmap.bm_CKDWORD = bmap.bm_CKDWORD(count)
bmap.BMMeshTrans_PrepareFaceCount(self._get_pointer(), csize)
# get 4 raw pointer for following assign
raw_vec_idx: bmap.bm_CKDWORD_p = bmap.bm_CKDWORD_p()
raw_nml_idx: bmap.bm_CKDWORD_p = bmap.bm_CKDWORD_p()
raw_uv_idx: bmap.bm_CKDWORD_p = bmap.bm_CKDWORD_p()
raw_mtl_idx: bmap.bm_CKDWORD_p = bmap.bm_CKDWORD_p()
bmap.BMMeshTrans_PrepareFaceVertexIndices(self._get_pointer(), ctypes.byref(raw_vec_idx))
bmap.BMMeshTrans_PrepareFaceNormalIndices(self._get_pointer(), ctypes.byref(raw_nml_idx))
bmap.BMMeshTrans_PrepareFaceUVIndices(self._get_pointer(), ctypes.byref(raw_uv_idx))
bmap.BMMeshTrans_PrepareFaceMtlSlot(self._get_pointer(), ctypes.byref(raw_mtl_idx))
# iterate and assign
# assigne triple indices
_ckfaceindices_assigner(raw_vec_idx, count, vec_idx)
_ckfaceindices_assigner(raw_nml_idx, count, nml_idx)
_ckfaceindices_assigner(raw_uv_idx, count, uv_idx)
# assign mtl index
idx: int = 0
for _ in range(count):
raw_mtl_idx[idx] = next(mtl_idx)
idx += 1
#endregion

View File

@ -0,0 +1,306 @@
import typing, enum
ConstVxVector2 = tuple[float, float]
ConstVxVector3 = tuple[float, float, float]
ConstVxVector4 = tuple[float, float, float, float]
class VxVector2():
x: float
y: float
def __init__(self, _x: float = 0.0, _y: float = 0.0):
self.x = _x
self.y = _y
def from_const(self, cv: ConstVxVector2) -> None:
(self.x, self.y, ) = cv
def to_const(self) -> ConstVxVector2:
return (self.x, self.y, )
class VxVector3():
x: float
y: float
z: float
def __init__(self, _x: float = 0.0, _y: float = 0.0, _z: float = 0.0):
self.x = _x
self.y = _y
self.z = _z
def from_const(self, cv: ConstVxVector3) -> None:
(self.x, self.y, self.z) = cv
def to_const(self) -> ConstVxVector3:
return (self.x, self.y, self.z)
ConstCKFaceIndices = tuple[int, int, int]
class CKFaceIndices():
i1: int
i2: int
i3: int
def __init__(self, i1_: int = 0, i2_: int = 0, i3_: int = 0):
self.i1 = i1_
self.i2 = i2_
self.i3 = i3_
def from_const(self, cv: ConstCKFaceIndices) -> None:
(self.i1, self.i2, self.i3) = cv
def to_const(self) -> ConstCKFaceIndices:
return (self.i1, self.i2, self.i3)
ConstVxColorRGBA = tuple[float, float, float, float]
ConstVxColorRGB = tuple[float, float, float]
class VxColor():
"""
The Color struct support RGBA.
"""
a: float
r: float
g: float
b: float
def __init__(self, _r: float = 0.0, _g: float = 0.0, _b: float = 0.0, _a: float = 1.0):
self.r = _r
self.g = _g
self.b = _b
self.a = _a
self.regulate()
def to_const_rgba(self) -> ConstVxColorRGBA:
return (self.r, self.g, self.b, self.a)
def to_const_rgb(self) -> ConstVxColorRGB:
return (self.r, self.g, self.b)
def from_const_rgba(self, val: ConstVxColorRGBA) -> None:
(self.r, self.g, self.b, self.a) = val
self.regulate()
def from_const_rgb(self, val: ConstVxColorRGB) -> None:
(self.r, self.g, self.b) = val
self.a = 1.0
self.regulate()
def from_dword(self, val: int) -> None:
self.b = float(val & 0xFF) / 255.0
val >>= 8
self.g = float(val & 0xFF) / 255.0
val >>= 8
self.r = float(val & 0xFF) / 255.0
val >>= 8
self.a = float(val & 0xFF) / 255.0
val >>= 8
def to_dword(self) -> int:
# regulate self
self.regulate()
# construct value
val: int = 0
val |= int(self.a * 255)
val <<= 8
val |= int(self.r * 255)
val <<= 8
val |= int(self.g * 255)
val <<= 8
val |= int(self.b * 255)
return val
def clone(self):
return VxColor(self.r, self.g, self.b, self.a)
@staticmethod
def _clamp_factor(val: float) -> float:
if val > 1.0: return 1.0
elif val < 0.0: return 0.0
else: return val
def regulate(self):
self.a = VxColor._clamp_factor(self.a)
self.r = VxColor._clamp_factor(self.r)
self.g = VxColor._clamp_factor(self.g)
self.b = VxColor._clamp_factor(self.b)
ConstVxMatrix = tuple[
float, float, float, float,
float, float, float, float,
float, float, float, float,
float, float, float, float
]
class VxMatrix():
"""
The Matrix representation.
The bracket statement exactly equal with Virtools.
"""
__mData: list[list[float]]
def __init__(self):
# init array
self.__mData = [[0] * 4 for i in range(4)]
# set to identy
self.reset()
def _get_raw(self) -> list[list[float]]:
return self.__mData
def reset(self) -> None:
# reset to identy
for i in range(4):
for j in range(4):
self.__mData[i][j] = 0.0
self.__mData[0][0] = 1.0
self.__mData[1][1] = 1.0
self.__mData[2][2] = 1.0
self.__mData[3][3] = 1.0
def from_const(self, cm: ConstVxMatrix) -> None:
(
self.__mData[0][0], self.__mData[0][1], self.__mData[0][2], self.__mData[0][3],
self.__mData[1][0], self.__mData[1][1], self.__mData[1][2], self.__mData[1][3],
self.__mData[2][0], self.__mData[2][1], self.__mData[2][2], self.__mData[2][3],
self.__mData[3][0], self.__mData[3][1], self.__mData[3][2], self.__mData[3][3]
) = cm
def to_const(self) -> ConstVxMatrix:
return (
self.__mData[0][0], self.__mData[0][1], self.__mData[0][2], self.__mData[0][3],
self.__mData[1][0], self.__mData[1][1], self.__mData[1][2], self.__mData[1][3],
self.__mData[2][0], self.__mData[2][1], self.__mData[2][2], self.__mData[2][3],
self.__mData[3][0], self.__mData[3][1], self.__mData[3][2], self.__mData[3][3]
)
class CK_TEXTURE_SAVEOPTIONS(enum.IntEnum):
"""!
Specify the way textures or sprites will be saved
"""
CKTEXTURE_RAWDATA = 0 ##< Save raw data inside file. The bitmap is saved in a raw 32 bit per pixel format.
CKTEXTURE_EXTERNAL = 1 ##< Store only the file name for the texture. The bitmap file must be present in the bitmap paths when loading the composition.
CKTEXTURE_IMAGEFORMAT = 2 ##< Save using format specified. The bitmap data will be converted to the specified format by the correspondant bitmap plugin and saved inside file.
CKTEXTURE_USEGLOBAL = 3 ##< Use Global settings, that is the settings given with CKContext::SetGlobalImagesSaveOptions. (Not valid when using CKContext::SetImagesSaveOptions).
CKTEXTURE_INCLUDEORIGINALFILE = 4 ##< Insert original image file inside CMO file. The bitmap file that was used originally for the texture or sprite will be append to the composition file and extracted when the file is loaded.
class VX_PIXELFORMAT(enum.IntEnum):
"""!
Pixel format types.
"""
UNKNOWN_PF = 0 ##< Unknown pixel format
_32_ARGB8888 = 1 ##< 32-bit ARGB pixel format with alpha
_32_RGB888 = 2 ##< 32-bit RGB pixel format without alpha
_24_RGB888 = 3 ##< 24-bit RGB pixel format
_16_RGB565 = 4 ##< 16-bit RGB pixel format
_16_RGB555 = 5 ##< 16-bit RGB pixel format (5 bits per color)
_16_ARGB1555 = 6 ##< 16-bit ARGB pixel format (5 bits per color + 1 bit for alpha)
_16_ARGB4444 = 7 ##< 16-bit ARGB pixel format (4 bits per color)
_8_RGB332 = 8 ##< 8-bit RGB pixel format
_8_ARGB2222 = 9 ##< 8-bit ARGB pixel format
_32_ABGR8888 = 10 ##< 32-bit ABGR pixel format
_32_RGBA8888 = 11 ##< 32-bit RGBA pixel format
_32_BGRA8888 = 12 ##< 32-bit BGRA pixel format
_32_BGR888 = 13 ##< 32-bit BGR pixel format
_24_BGR888 = 14 ##< 24-bit BGR pixel format
_16_BGR565 = 15 ##< 16-bit BGR pixel format
_16_BGR555 = 16 ##< 16-bit BGR pixel format (5 bits per color)
_16_ABGR1555 = 17 ##< 16-bit ABGR pixel format (5 bits per color + 1 bit for alpha)
_16_ABGR4444 = 18 ##< 16-bit ABGR pixel format (4 bits per color)
_DXT1 = 19 ##< S3/DirectX Texture Compression 1
_DXT2 = 20 ##< S3/DirectX Texture Compression 2
_DXT3 = 21 ##< S3/DirectX Texture Compression 3
_DXT4 = 22 ##< S3/DirectX Texture Compression 4
_DXT5 = 23 ##< S3/DirectX Texture Compression 5
_16_V8U8 = 24 ##< 16-bit Bump Map format format (8 bits per color)
_32_V16U16 = 25 ##< 32-bit Bump Map format format (16 bits per color)
_16_L6V5U5 = 26 ##< 16-bit Bump Map format format with luminance
_32_X8L8V8U8 = 27 ##< 32-bit Bump Map format format with luminance
_8_ABGR8888_CLUT = 28 ##< 8 bits indexed CLUT (ABGR)
_8_ARGB8888_CLUT = 29 ##< 8 bits indexed CLUT (ARGB)
_4_ABGR8888_CLUT = 30 ##< 4 bits indexed CLUT (ABGR)
_4_ARGB8888_CLUT = 31 ##< 4 bits indexed CLUT (ARGB)
class VXTEXTURE_BLENDMODE(enum.IntEnum):
"""!
Blend Mode Flags
"""
VXTEXTUREBLEND_DECAL = 1 ##< Texture replace any material information
VXTEXTUREBLEND_MODULATE = 2 ##< Texture and material are combine. Alpha information of the texture replace material alpha component.
VXTEXTUREBLEND_DECALALPHA = 3 ##< Alpha information in the texture specify how material and texture are combined. Alpha information of the texture replace material alpha component.
VXTEXTUREBLEND_MODULATEALPHA = 4 ##< Alpha information in the texture specify how material and texture are combined
VXTEXTUREBLEND_DECALMASK = 5
VXTEXTUREBLEND_MODULATEMASK = 6
VXTEXTUREBLEND_COPY = 7 ##< Equivalent to DECAL
VXTEXTUREBLEND_ADD = 8
VXTEXTUREBLEND_DOTPRODUCT3 = 9 ##< Perform a Dot Product 3 between texture (normal map) and a referential vector given in VXRENDERSTATE_TEXTUREFACTOR.
VXTEXTUREBLEND_MAX = 10
class VXTEXTURE_FILTERMODE(enum.IntEnum):
"""!
Filter Mode Options
"""
VXTEXTUREFILTER_NEAREST = 1 ##< No Filter
VXTEXTUREFILTER_LINEAR = 2 ##< Bilinear Interpolation
VXTEXTUREFILTER_MIPNEAREST = 3 ##< Mip mapping
VXTEXTUREFILTER_MIPLINEAR = 4 ##< Mip Mapping with Bilinear interpolation
VXTEXTUREFILTER_LINEARMIPNEAREST = 5 ##< Mip Mapping with Bilinear interpolation between mipmap levels.
VXTEXTUREFILTER_LINEARMIPLINEAR = 6 ##< Trilinear Filtering
VXTEXTUREFILTER_ANISOTROPIC = 7 ##< Anisotropic filtering
class VXTEXTURE_ADDRESSMODE(enum.IntEnum):
"""!
Texture addressing modes.
"""
VXTEXTURE_ADDRESSWRAP = 1 ##< Default mesh wrap mode is used (see CKMesh::SetWrapMode)
VXTEXTURE_ADDRESSMIRROR = 2 ##< Texture coordinates outside the range [0..1] are flipped evenly.
VXTEXTURE_ADDRESSCLAMP = 3 ##< Texture coordinates greater than 1.0 are set to 1.0, and values less than 0.0 are set to 0.0.
VXTEXTURE_ADDRESSBORDER = 4 ##< When texture coordinates are greater than 1.0 or less than 0.0 texture is set to a color defined in CKMaterial::SetTextureBorderColor.
VXTEXTURE_ADDRESSMIRRORONCE = 5 ##<
class VXBLEND_MODE(enum.IntEnum):
"""!
Blending Mode options
"""
VXBLEND_ZERO = 1 ##< Blend factor is (0, 0, 0, 0).
VXBLEND_ONE = 2 ##< Blend factor is (1, 1, 1, 1).
VXBLEND_SRCCOLOR = 3 ##< Blend factor is (Rs, Gs, Bs, As).
VXBLEND_INVSRCCOLOR = 4 ##< Blend factor is (1-Rs, 1-Gs, 1-Bs, 1-As).
VXBLEND_SRCALPHA = 5 ##< Blend factor is (As, As, As, As).
VXBLEND_INVSRCALPHA = 6 ##< Blend factor is (1-As, 1-As, 1-As, 1-As).
VXBLEND_DESTALPHA = 7 ##< Blend factor is (Ad, Ad, Ad, Ad).
VXBLEND_INVDESTALPHA = 8 ##< Blend factor is (1-Ad, 1-Ad, 1-Ad, 1-Ad).
VXBLEND_DESTCOLOR = 9 ##< Blend factor is (Rd, Gd, Bd, Ad).
VXBLEND_INVDESTCOLOR = 10 ##< Blend factor is (1-Rd, 1-Gd, 1-Bd, 1-Ad).
VXBLEND_SRCALPHASAT = 11 ##< Blend factor is (f, f, f, 1); f = min(As, 1-Ad).
#VXBLEND_BOTHSRCALPHA = 12 ##< Source blend factor is (As, As, As, As) and destination blend factor is (1-As, 1-As, 1-As, 1-As)
#VXBLEND_BOTHINVSRCALPHA = 13 ##< Source blend factor is (1-As, 1-As, 1-As, 1-As) and destination blend factor is (As, As, As, As)
class VXFILL_MODE(enum.IntEnum):
"""!
Fill Mode Options
"""
VXFILL_POINT = 1 ##< Vertices rendering
VXFILL_WIREFRAME = 2 ##< Edges rendering
VXFILL_SOLID = 3 ##< Face rendering
class VXSHADE_MODE(enum.IntEnum):
"""!
Shade Mode Options
"""
VXSHADE_FLAT = 1 ##< Flat Shading
VXSHADE_GOURAUD = 2 ##< Gouraud Shading
VXSHADE_PHONG = 3 ##< Phong Shading (Not yet supported by most implementation)
class VXCMPFUNC(enum.IntEnum):
"""!
Comparison Function
"""
VXCMP_NEVER = 1 ##< Always fail the test.
VXCMP_LESS = 2 ##< Accept if value if less than current value.
VXCMP_EQUAL = 3 ##< Accept if value if equal than current value.
VXCMP_LESSEQUAL = 4 ##< Accept if value if less or equal than current value.
VXCMP_GREATER = 5 ##< Accept if value if greater than current value.
VXCMP_NOTEQUAL = 6 ##< Accept if value if different than current value.
VXCMP_GREATEREQUAL = 7 ##< Accept if value if greater or equal current value.
VXCMP_ALWAYS = 8 ##< Always accept the test.

View File

@ -1,266 +1,85 @@
import mathutils
import typing, enum
from . import UTIL_functions
import typing
ConstVxVector2 = tuple[float, float]
ConstVxVector3 = tuple[float, float, float]
ConstVxVector4 = tuple[float, float, float, float]
# extract all declarations in PyBMap
from .PyBMap.virtools_types import *
# and add some patches for them
# mainly patch them with functions exchanging data with blender
# and the convertion between differnet coordinate system.
# hint: `co` mean coordinate system in blender.
class VxVector2():
x: float
y: float
#region VxVector2 Patch
def __init__(self, _x: float = 0.0, _y: float = 0.0):
self.x = _x
self.y = _y
def from_const(self, cv: ConstVxVector2) -> None:
(self.x, self.y, ) = cv
def to_const(self) -> ConstVxVector2:
return (self.x, self.y, )
# uv just need inverse y (aka. v) factor.
def to_blender_uv(self) -> None:
self.y = -self.y
def to_virtools_uv(self) -> None:
self.y = -self.y
class VxVector3():
x: float
y: float
z: float
def __init__(self, _x: float = 0.0, _y: float = 0.0, _z: float = 0.0):
self.x = _x
self.y = _y
self.z = _z
def from_const(self, cv: ConstVxVector3) -> None:
(self.x, self.y, self.z) = cv
def to_const(self) -> ConstVxVector3:
return (self.x, self.y, self.z)
# both position and normal convertion just swap y and z factor.
def to_blender_pos(self) -> None:
self.y, self.z = self.z, self.y
def to_virtools_pos(self) -> None:
self.y, self.z = self.z, self.y
def to_blender_nml(self) -> None:
self.y, self.z = self.z, self.y
def to_virtools_nml(self) -> None:
self.y, self.z = self.z, self.y
ConstVxColorRGBA = tuple[float, float, float, float]
ConstVxColorRGB = tuple[float, float, float]
class VxColor():
def _vxvector2_conv_co(self: VxVector2) -> None:
"""
The Color struct support RGBA.
Convert UV coordinate system between Virtools and Blender.
"""
a: float
r: float
g: float
b: float
def __init__(self, _r: float, _g: float, _b: float, _a: float = 1.0):
self.r = _r
self.g = _g
self.b = _b
self.a = _a
self.regulate()
self.y = -self.y
def to_tuple_rgba(self) -> ConstVxColorRGBA:
return (self.r, self.g, self.b, self.a)
def to_tuple_rgb(self) -> ConstVxColorRGB:
return (self.r, self.g, self.b)
VxVector2.conv_co = _vxvector2_conv_co
def from_tuple_rgba(self, val: ConstVxColorRGBA) -> None:
(self.r, self.g, self.b, self.a) = val
self.regulate()
#endregion
def from_tuple_rgb(self, val: ConstVxColorRGB) -> None:
(self.r, self.g, self.b) = val
self.a = 1.0
self.regulate()
#region VxVector3 Patch
def clone(self):
return VxColor(self.r, self.g, self.b, self.a)
def regulate(self):
self.a = UTIL_functions.clamp_float(self.a, 0.0, 1.0)
self.r = UTIL_functions.clamp_float(self.r, 0.0, 1.0)
self.g = UTIL_functions.clamp_float(self.g, 0.0, 1.0)
self.b = UTIL_functions.clamp_float(self.b, 0.0, 1.0)
class VxMatrix():
def _vxvector3_conv_co(self: VxVector3) -> None:
"""
The Matrix representation.
The bracket statement exactly equal with Virtools.
Convert Position or Normal coordinate system between Virtools and Blender.
"""
__mData: list[list[float]]
self.y, self.z = self.z, self.y
def __init__(self):
# init array
self.__mData = [[0] * 4 for i in range(4)]
# set to identy
self.reset()
VxVector3.conv_co = _vxvector3_conv_co
def from_tuple(self, data: tuple[float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float]) -> None:
(
self.__mData[0][0], self.__mData[0][1], self.__mData[0][2], self.__mData[0][3],
self.__mData[1][0], self.__mData[1][1], self.__mData[1][2], self.__mData[1][3],
self.__mData[2][0], self.__mData[2][1], self.__mData[2][2], self.__mData[2][3],
self.__mData[3][0], self.__mData[3][1], self.__mData[3][2], self.__mData[3][3]
) = data
#endregion
def from_blender(self, data_: mathutils.Matrix) -> None:
# transposed first
data: mathutils.Matrix = data_.transposed()
(
self.__mData[0][0], self.__mData[0][1], self.__mData[0][2], self.__mData[0][3],
self.__mData[1][0], self.__mData[1][1], self.__mData[1][2], self.__mData[1][3],
self.__mData[2][0], self.__mData[2][1], self.__mData[2][2], self.__mData[2][3],
self.__mData[3][0], self.__mData[3][1], self.__mData[3][2], self.__mData[3][3]
) = (
data[0][0], data[0][1], data[0][2], data[0][3],
data[1][0], data[1][1], data[1][2], data[1][3],
data[2][0], data[2][1], data[2][2], data[2][3],
data[3][0], data[3][1], data[3][2], data[3][3]
)
#region VxMatrix Patch
def to_tuple(self) -> tuple[float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float]:
return (
self.__mData[0][0], self.__mData[0][1], self.__mData[0][2], self.__mData[0][3],
self.__mData[1][0], self.__mData[1][1], self.__mData[1][2], self.__mData[1][3],
self.__mData[2][0], self.__mData[2][1], self.__mData[2][2], self.__mData[2][3],
self.__mData[3][0], self.__mData[3][1], self.__mData[3][2], self.__mData[3][3]
)
def to_tuple(self) -> mathutils.Matrix:
data: mathutils.Matrix = mathutils.Matrix(
(self.__mData[0][0], self.__mData[0][1], self.__mData[0][2], self.__mData[0][3]),
(self.__mData[1][0], self.__mData[1][1], self.__mData[1][2], self.__mData[1][3]),
(self.__mData[2][0], self.__mData[2][1], self.__mData[2][2], self.__mData[2][3]),
(self.__mData[3][0], self.__mData[3][1], self.__mData[3][2], self.__mData[3][3]),
)
# transpose self
data.transpose()
return data
def reset(self) -> None:
# reset to identy
for i in range(4):
for j in range(4):
self.__mData[i][j] = 0.0
self.__mData[0][0] = 1.0
self.__mData[1][1] = 1.0
self.__mData[2][2] = 1.0
self.__mData[3][3] = 1.0
def __swap_row_column(self) -> None:
# swap column 1 and 2
for i in range(4):
self.__mData[i][1], self.__mData[i][2] = self.__mData[i][2], self.__mData[i][1]
# swap row 1 and 2
for i in range(4):
self.__mData[1][i], self.__mData[2][i] = self.__mData[2][i], self.__mData[1][i]
def to_virtools_matrix(self) -> None:
self.__swap_row_column()
def to_blender_matrix(self) -> None:
self.__swap_row_column()
class VXTEXTURE_BLENDMODE(enum.IntEnum):
"""!
Blend Mode Flags
def _vxmatrix_conv_co(self: VxMatrix) -> None:
"""
VXTEXTUREBLEND_DECAL = 1 ##< Texture replace any material information
VXTEXTUREBLEND_MODULATE = 2 ##< Texture and material are combine. Alpha information of the texture replace material alpha component.
VXTEXTUREBLEND_DECALALPHA = 3 ##< Alpha information in the texture specify how material and texture are combined. Alpha information of the texture replace material alpha component.
VXTEXTUREBLEND_MODULATEALPHA = 4 ##< Alpha information in the texture specify how material and texture are combined
VXTEXTUREBLEND_DECALMASK = 5
VXTEXTUREBLEND_MODULATEMASK = 6
VXTEXTUREBLEND_COPY = 7 ##< Equivalent to DECAL
VXTEXTUREBLEND_ADD = 8
VXTEXTUREBLEND_DOTPRODUCT3 = 9 ##< Perform a Dot Product 3 between texture (normal map) and a referential vector given in VXRENDERSTATE_TEXTUREFACTOR.
VXTEXTUREBLEND_MAX = 10
class VXTEXTURE_FILTERMODE(enum.IntEnum):
"""!
Filter Mode Options
Convert World Matrix coordinate system between Virtools and Blender.
"""
VXTEXTUREFILTER_NEAREST = 1 ##< No Filter
VXTEXTUREFILTER_LINEAR = 2 ##< Bilinear Interpolation
VXTEXTUREFILTER_MIPNEAREST = 3 ##< Mip mapping
VXTEXTUREFILTER_MIPLINEAR = 4 ##< Mip Mapping with Bilinear interpolation
VXTEXTUREFILTER_LINEARMIPNEAREST = 5 ##< Mip Mapping with Bilinear interpolation between mipmap levels.
VXTEXTUREFILTER_LINEARMIPLINEAR = 6 ##< Trilinear Filtering
VXTEXTUREFILTER_ANISOTROPIC = 7 ##< Anisotropic filtering
# swap column 1 and 2
for i in range(4):
self.__mData[i][1], self.__mData[i][2] = self.__mData[i][2], self.__mData[i][1]
# swap row 1 and 2
for i in range(4):
self.__mData[1][i], self.__mData[2][i] = self.__mData[2][i], self.__mData[1][i]
class VXTEXTURE_ADDRESSMODE(enum.IntEnum):
"""!
Texture addressing modes.
def _vxmatrix_from_blender(self: VxMatrix, data_: mathutils.Matrix) -> None:
"""
VXTEXTURE_ADDRESSWRAP = 1 ##< Default mesh wrap mode is used (see CKMesh::SetWrapMode)
VXTEXTURE_ADDRESSMIRROR = 2 ##< Texture coordinates outside the range [0..1] are flipped evenly.
VXTEXTURE_ADDRESSCLAMP = 3 ##< Texture coordinates greater than 1.0 are set to 1.0, and values less than 0.0 are set to 0.0.
VXTEXTURE_ADDRESSBORDER = 4 ##< When texture coordinates are greater than 1.0 or less than 0.0 texture is set to a color defined in CKMaterial::SetTextureBorderColor.
VXTEXTURE_ADDRESSMIRRORONCE = 5 ##<
Set matrix by blender matrix.
"""
# transposed first
data: mathutils.Matrix = data_.transposed()
(
self.__mData[0][0], self.__mData[0][1], self.__mData[0][2], self.__mData[0][3],
self.__mData[1][0], self.__mData[1][1], self.__mData[1][2], self.__mData[1][3],
self.__mData[2][0], self.__mData[2][1], self.__mData[2][2], self.__mData[2][3],
self.__mData[3][0], self.__mData[3][1], self.__mData[3][2], self.__mData[3][3]
) = (
data[0][0], data[0][1], data[0][2], data[0][3],
data[1][0], data[1][1], data[1][2], data[1][3],
data[2][0], data[2][1], data[2][2], data[2][3],
data[3][0], data[3][1], data[3][2], data[3][3]
)
class VXBLEND_MODE(enum.IntEnum):
"""!
Blending Mode options
def _vxmatrix_to_blender(self: VxMatrix) -> mathutils.Matrix:
"""
VXBLEND_ZERO = 1 ##< Blend factor is (0, 0, 0, 0).
VXBLEND_ONE = 2 ##< Blend factor is (1, 1, 1, 1).
VXBLEND_SRCCOLOR = 3 ##< Blend factor is (Rs, Gs, Bs, As).
VXBLEND_INVSRCCOLOR = 4 ##< Blend factor is (1-Rs, 1-Gs, 1-Bs, 1-As).
VXBLEND_SRCALPHA = 5 ##< Blend factor is (As, As, As, As).
VXBLEND_INVSRCALPHA = 6 ##< Blend factor is (1-As, 1-As, 1-As, 1-As).
VXBLEND_DESTALPHA = 7 ##< Blend factor is (Ad, Ad, Ad, Ad).
VXBLEND_INVDESTALPHA = 8 ##< Blend factor is (1-Ad, 1-Ad, 1-Ad, 1-Ad).
VXBLEND_DESTCOLOR = 9 ##< Blend factor is (Rd, Gd, Bd, Ad).
VXBLEND_INVDESTCOLOR = 10 ##< Blend factor is (1-Rd, 1-Gd, 1-Bd, 1-Ad).
VXBLEND_SRCALPHASAT = 11 ##< Blend factor is (f, f, f, 1); f = min(As, 1-Ad).
#VXBLEND_BOTHSRCALPHA = 12 ##< Source blend factor is (As, As, As, As) and destination blend factor is (1-As, 1-As, 1-As, 1-As)
#VXBLEND_BOTHINVSRCALPHA = 13 ##< Source blend factor is (1-As, 1-As, 1-As, 1-As) and destination blend factor is (As, As, As, As)
Get blender matrix from this matrix
"""
data: mathutils.Matrix = mathutils.Matrix(
(self.__mData[0][0], self.__mData[0][1], self.__mData[0][2], self.__mData[0][3]),
(self.__mData[1][0], self.__mData[1][1], self.__mData[1][2], self.__mData[1][3]),
(self.__mData[2][0], self.__mData[2][1], self.__mData[2][2], self.__mData[2][3]),
(self.__mData[3][0], self.__mData[3][1], self.__mData[3][2], self.__mData[3][3]),
)
# transpose self
data.transpose()
return data
class VXFILL_MODE(enum.IntEnum):
"""!
Fill Mode Options
"""
VXFILL_POINT = 1 ##< Vertices rendering
VXFILL_WIREFRAME = 2 ##< Edges rendering
VXFILL_SOLID = 3 ##< Face rendering
VxMatrix.conv_co = _vxmatrix_conv_co
VxMatrix.from_blender = _vxmatrix_from_blender
VxMatrix.to_blender = _vxmatrix_to_blender
class VXSHADE_MODE(enum.IntEnum):
"""!
Shade Mode Options
"""
VXSHADE_FLAT = 1 ##< Flat Shading
VXSHADE_GOURAUD = 2 ##< Gouraud Shading
VXSHADE_PHONG = 3 ##< Phong Shading (Not yet supported by most implementation)
#endregion
class VXCMPFUNC(enum.IntEnum):
"""!
Comparison Function
"""
VXCMP_NEVER = 1 ##< Always fail the test.
VXCMP_LESS = 2 ##< Accept if value if less than current value.
VXCMP_EQUAL = 3 ##< Accept if value if equal than current value.
VXCMP_LESSEQUAL = 4 ##< Accept if value if less or equal than current value.
VXCMP_GREATER = 5 ##< Accept if value if greater than current value.
VXCMP_NOTEQUAL = 6 ##< Accept if value if different than current value.
VXCMP_GREATEREQUAL = 7 ##< Accept if value if greater or equal current value.
VXCMP_ALWAYS = 8 ##< Always accept the test.

View File

@ -0,0 +1,483 @@
[
{
"Type": "Flat",
"BindingDisplayTexture": "Flat.png",
"UnitSize": "Small",
"ExpandType": "Freedom",
"InitColumnDirection": "PositiveY",
"DefaultSideConfig": {
"UseTwoDTop": false,
"UseTwoDRight": false,
"UseTwoDBottom": false,
"UseTwoDLeft": false,
"UseThreeDTop": true,
"UseThreeDBottom": false
},
"ThreeDTopFace": {
"Vertices": [
"0, 0, 0",
"2.5+d2, 0, 0",
"2.5+d2, 2.5+d1, 0",
"0, 2.5+d1, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, 0.5",
"0, -d2",
"0.5+d1, -d2",
"0.5+d1, 0.5"
]
}
]
},
"ThreeDBottomFace": {
"Vertices": [
"0, 0, -5-d3",
"2.5+d2, 0, -5-d3",
"2.5+d2, 2.5+d1, -5-d3",
"0, 2.5+d1, -5-d3"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
3,
2,
1,
0
],
"UVs": [
"0, 0.5",
"0, -d2",
"0.5+d1, -d2",
"0.5+d1, 0.5"
]
}
]
},
"TwoDTopSide": {
"Vertices": [
"0, 0, 0",
"0, 2.5+d1, 0",
"0, 2.5+d1, -5-d3",
"0, 0, -5-d3"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, 0",
"0, 0.5+d1",
"1+d3, 0.5+d1",
"1+d3, 0"
]
}
]
},
"TwoDRightSide": {
"Vertices": [
"2.5+d2, 2.5+d1, 0",
"2.5+d2, 2.5+d1, -5-d3",
"0, 2.5+d1, -5-d3",
"0, 2.5+d1, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, -d2",
"1+d3, -d2",
"1+d3, 0.5",
"0, 0.5"
]
}
]
},
"TwoDBottomSide": {
"Vertices": [
"2.5+d2, 2.5+d1, 0",
"2.5+d2, 0, 0",
"2.5+d2, 0, -5-d3",
"2.5+d2, 2.5+d1, -5-d3"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, 0.5+d1",
"0, 0",
"1+d3, 0",
"1+d3, 0.5+d1"
]
}
]
},
"TwoDLeftSide": {
"Vertices": [
"0, 0, 0",
"0, 0, -5-d3",
"2.5+d2, 0, -5-d3",
"2.5+d2, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, 0.5",
"1+d3, 0.5",
"1+d3, -d2",
"0, -d2"
]
}
]
},
"TwoDTopSideExpand": null,
"TwoDRightSideExpand": null,
"TwoDBottomSideExpand": null,
"TwoDLeftSideExpand": null
},
{
"Type": "NormalSinkTransition",
"BindingDisplayTexture": "NormalSinkTransition.png",
"UnitSize": "Large",
"ExpandType": "Static",
"InitColumnDirection": "PositiveX",
"DefaultSideConfig": {
"UseTwoDTop": false,
"UseTwoDRight": true,
"UseTwoDBottom": false,
"UseTwoDLeft": true,
"UseThreeDTop": true,
"UseThreeDBottom": false
},
"ThreeDTopFace": {
"Vertices": [
"0, 0, 0",
"5, 0, 0",
"0, 2.5, -0.7",
"5, 5, 0",
"0, 5, 0"
],
"Faces": [
{
"Type": "TRIANGLE",
"Textures": "FloorTopProfilFlat",
"Indices": [
0,
1,
2
],
"UVs": [
"0, 1",
"0, 0",
"0.5, 1"
]
},
{
"Type": "TRIANGLE",
"Textures": "FloorTopProfilFlat",
"Indices": [
3,
2,
1
],
"UVs": [
"1, 0",
"0.5, 1",
"0, 0"
]
},
{
"Type": "TRIANGLE",
"Textures": "FloorTopProfilFlat",
"Indices": [
2,
3,
4
],
"UVs": [
"0.5, 1",
"1, 0",
"1, 1"
]
}
]
},
"ThreeDBottomFace": {
"Vertices": [
"5, 0, -5-d3",
"5, 5, -5-d3",
"0, 5, -5-d3",
"0, 0, -5-d3"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
3,
2,
1,
0
],
"UVs": [
"0, 1",
"1, 1",
"1, 0",
"0, 0"
]
}
]
},
"TwoDTopSide": {
"Vertices": [
"0, 0, -5-d3",
"0, 0, 0",
"0, 2.5, -0.7",
"0, 2.5, -5-d3",
"0, 5, -5-d3",
"0, 5, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, -d3",
"0, 1",
"0.5, 0.86",
"0.5, -d3"
]
},
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
5,
4,
3,
2
],
"UVs": [
"1, 1",
"1, -d3",
"0.5, -d3",
"0.5, 0.86"
]
}
]
},
"TwoDRightSide": {
"Vertices": [
"5, 5, 0",
"5, 5, -5-d3",
"0, 5, -5-d3",
"0, 5, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, 0",
"1+d3, 0",
"1+d3, 1",
"0, 1"
]
}
]
},
"TwoDBottomSide": {
"Vertices": [
"5, 5, 0",
"5, 0, 0",
"5, 0, -5-d3",
"5, 5, -5-d3"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, 1",
"0, 0",
"1+d3, 0",
"1+d3, 1"
]
}
]
},
"TwoDLeftSide": {
"Vertices": [
"5, 0, 0",
"5, 0, -5-d3",
"0, 0, -5-d3",
"0, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorSide",
"Indices": [
3,
2,
1,
0
],
"UVs": [
"0, 1",
"1+d3, 1",
"1+d3, 0",
"0, 0"
]
}
]
},
"TwoDTopSideExpand": null,
"TwoDRightSideExpand": {
"Vertices": [
"0, 5, 0",
"5, 5, 0",
"5, 5, -2.5",
"0, 5, -2.5",
"0, 5, -5-d3",
"5, 5, -5-d3"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorder_ForSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, 1",
"0, 0",
"0.5, 0",
"0.5, 1"
]
},
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
5,
4,
3,
2
],
"UVs": [
"0.5+d3, 0",
"0.5+d3, 1",
"0, 1",
"0, 0"
]
}
]
},
"TwoDBottomSideExpand": null,
"TwoDLeftSideExpand": {
"Vertices": [
"0, 0, 0",
"5, 0, 0",
"5, 0, -2.5",
"0, 0, -2.5",
"0, 0, -5-d3",
"5, 0, -5-d3"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorder_ForSide",
"Indices": [
3,
2,
1,
0
],
"UVs": [
"0.5, 1",
"0.5, 0",
"0, 0",
"0, 1"
]
},
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
2,
3,
4,
5
],
"UVs": [
"0, 0",
"0, 1",
"0.5+d3, 1",
"0.5+d3, 0"
]
}
]
}
}
]

View File

@ -0,0 +1,680 @@
[
{
"Type": "NormalBorder",
"BindingDisplayTexture": "NormalBorder.png",
"UnitSize": "Small",
"ExpandType": "Column",
"InitColumnDirection": "PositiveX",
"DefaultSideConfig": {
"UseTwoDTop": false,
"UseTwoDRight": false,
"UseTwoDBottom": false,
"UseTwoDLeft": true,
"UseThreeDTop": true,
"UseThreeDBottom": false
},
"ThreeDTopFace": {
"Vertices": [
"0, 0, 0",
"2.5+d1, 0, 0",
"2.5+d1, 2.5, 0",
"0, 2.5, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopFlat",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, 0.5",
"0, -d1",
"0.5, -d1",
"0.5, 0.5"
]
}
]
},
"ThreeDBottomFace": {
"Vertices": [
"2.5+d1, 0, -5-d3",
"2.5+d1, 2.5, -5-d3",
"0, 2.5, -5-d3",
"0, 0, -5-d3"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
3,
2,
1,
0
],
"UVs": [
"0, 0.5",
"0.5, 0.5",
"0.5, -d1",
"0, -d1"
]
}
]
},
"TwoDTopSide": {
"Vertices": [
"0, 0, -5-d3",
"0, 2.5, -5-d3",
"0, 2.5, 0",
"0, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
3,
2,
1,
0
],
"UVs": [
"0, 0.5",
"0, 0",
"1+d3, 0",
"1+d3, 0.5"
]
}
]
},
"TwoDRightSide": {
"Vertices": [
"2.5+d1, 2.5, 0",
"2.5+d1, 2.5, -5-d3",
"0, 2.5, -5-d3",
"0, 2.5, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, -d1",
"1+d3, -d1",
"1+d3, 0.5",
"0, 0.5"
]
}
]
},
"TwoDBottomSide": {
"Vertices": [
"2.5+d1, 0, -5-d3",
"2.5+d1, 2.5, -5-d3",
"2.5+d1, 2.5, 0",
"2.5+d1, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"1+d3, 0.5",
"1+d3, 0",
"0, 0",
"0, 0.5"
]
}
]
},
"TwoDLeftSide": {
"Vertices": [
"2.5+d1, 0, 0",
"2.5+d1, 0, -5-d3",
"0, 0, -5-d3",
"0, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorSide",
"Indices": [
3,
2,
1,
0
],
"UVs": [
"0, 0.5",
"1+d3, 0.5",
"1+d3, -d1",
"0, -d1"
]
}
]
},
"TwoDTopSideExpand": null,
"TwoDRightSideExpand": null,
"TwoDBottomSideExpand": null,
"TwoDLeftSideExpand": {
"Vertices": [
"2.5+d1, 0, -5-d3",
"0, 0, -5-d3",
"0, 0, -2.5",
"2.5+d1, 0, -2.5",
"2.5+d1, 0, 0",
"0, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorder_ForSide",
"Indices": [
2,
3,
4,
5
],
"UVs": [
"0.5, 0.5",
"0.5, -d1",
"0, -d1",
"0, 0.5"
]
},
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
3,
2,
1,
0
],
"UVs": [
"0, -d1",
"0, 0.5",
"0.5+d3, 0.5",
"0.5+d3, -d1"
]
}
]
}
},
{
"Type": "NormalOutterCorner",
"BindingDisplayTexture": "NormalOutterCorner.png",
"UnitSize": "Small",
"ExpandType": "Static",
"InitColumnDirection": "PositiveX",
"DefaultSideConfig": {
"UseTwoDTop": true,
"UseTwoDRight": false,
"UseTwoDBottom": false,
"UseTwoDLeft": true,
"UseThreeDTop": true,
"UseThreeDBottom": false
},
"ThreeDTopFace": {
"Vertices": [
"0, 0, 0",
"2.5, 0, 0",
"2.5, 2.5, 0",
"0, 2.5, 0"
],
"Faces": [
{
"Type": "TRIANGLE",
"Textures": "FloorTopFlat",
"Indices": [
0,
1,
2
],
"UVs": [
"0, 0.5",
"0, 1",
"0.5, 1"
]
},
{
"Type": "TRIANGLE",
"Textures": "FloorTopFlat",
"Indices": [
0,
2,
3
],
"UVs": [
"1, 0.5",
"0.5, 1",
"1, 1"
]
}
]
},
"ThreeDBottomFace": {
"Vertices": [
"2.5, 0, -5-d3",
"2.5, 2.5, -5-d3",
"0, 2.5, -5-d3",
"0, 0, -5-d3"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
3,
2,
1,
0
],
"UVs": [
"0, 0.5",
"0.5, 0.5",
"0.5, 0",
"0, 0"
]
}
]
},
"TwoDTopSide": {
"Vertices": [
"0, 0, -5-d3",
"0, 0, 0",
"0, 2.5, 0",
"0, 2.5, -5-d3"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"1+d3, 0",
"0, 0",
"0, 0.5",
"1+d3, 0.5"
]
}
]
},
"TwoDRightSide": {
"Vertices": [
"2.5, 2.5, -5-d3",
"0, 2.5, -5-d3",
"0, 2.5, 0",
"2.5, 2.5, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"1+d3, 0",
"1+d3, 0.5",
"0, 0.5",
"0, 0"
]
}
]
},
"TwoDBottomSide": {
"Vertices": [
"2.5, 0, -5-d3",
"2.5, 2.5, -5-d3",
"2.5, 2.5, 0",
"2.5, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"1+d3, 0",
"1+d3, 0.5",
"0, 0.5",
"0, 0"
]
}
]
},
"TwoDLeftSide": {
"Vertices": [
"2.5, 0, 0",
"2.5, 0, -5-d3",
"0, 0, -5-d3",
"0, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorSide",
"Indices": [
3,
2,
1,
0
],
"UVs": [
"0, 0.5",
"1+d3, 0.5",
"1+d3, 0",
"0, 0"
]
}
]
},
"TwoDTopSideExpand": {
"Vertices": [
"0, 0, -5-d3",
"0, 2.5, -5-d3",
"0, 2.5, -2.5",
"0, 0, -2.5",
"0, 0, 0",
"0, 2.5, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorder_ForSide",
"Indices": [
2,
3,
4,
5
],
"UVs": [
"0.5, 0.5",
"0.5, 0",
"0, 0",
"0, 0.5"
]
},
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
3,
2,
1,
0
],
"UVs": [
"0, 0",
"0, 0.5",
"0.5+d3, 0.5",
"0.5+d3, 0"
]
}
]
},
"TwoDRightSideExpand": null,
"TwoDBottomSideExpand": null,
"TwoDLeftSideExpand": {
"Vertices": [
"2.5, 0, -5-d3",
"0, 0, -5-d3",
"0, 0, -2.5",
"2.5, 0, -2.5",
"2.5, 0, 0",
"0, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorder_ForSide",
"Indices": [
2,
3,
4,
5
],
"UVs": [
"0.5, 0.5",
"0.5, 0",
"0, 0",
"0, 0.5"
]
},
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
3,
2,
1,
0
],
"UVs": [
"0, 0",
"0, 0.5",
"0.5+d3, 0.5",
"0.5+d3, 0"
]
}
]
}
},
{
"Type": "NormalInnerCorner",
"BindingDisplayTexture": "NormalInnerCorner.png",
"UnitSize": "Small",
"ExpandType": "Static",
"InitColumnDirection": "PositiveX",
"DefaultSideConfig": {
"UseTwoDTop": false,
"UseTwoDRight": false,
"UseTwoDBottom": false,
"UseTwoDLeft": false,
"UseThreeDTop": true,
"UseThreeDBottom": false
},
"ThreeDTopFace": {
"Vertices": [
"2.5, 0, 0",
"2.5, 2.5, 0",
"0, 0, 0",
"0, 2.5, 0"
],
"Faces": [
{
"Type": "TRIANGLE",
"Textures": "FloorTopFlat",
"Indices": [
0,
1,
2
],
"UVs": [
"0.5, 1",
"0, 1",
"0.5, 0.5"
]
},
{
"Type": "TRIANGLE",
"Textures": "FloorTopFlat",
"Indices": [
3,
2,
1
],
"UVs": [
"0.5, 1",
"0.5, 0.5",
"1, 1"
]
}
]
},
"ThreeDBottomFace": {
"Vertices": [
"2.5, 0, -5-d3",
"2.5, 2.5, -5-d3",
"0, 2.5, -5-d3",
"0, 0, -5-d3"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
3,
2,
1,
0
],
"UVs": [
"0, 0.5",
"0.5, 0.5",
"0.5, 0",
"0, 0"
]
}
]
},
"TwoDTopSide": {
"Vertices": [
"0, 0, 0",
"0, 2.5, 0",
"0, 2.5, -5-d3",
"0, 0, -5-d3"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, 0",
"0, 0.5",
"1+d3, 0.5",
"1+d3, 0"
]
}
]
},
"TwoDRightSide": {
"Vertices": [
"2.5, 2.5, 0",
"2.5, 2.5, -5-d3",
"0, 2.5, -5-d3",
"0, 2.5, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, 0",
"1+d3, 0",
"1+d3, 0.5",
"0, 0.5"
]
}
]
},
"TwoDBottomSide": {
"Vertices": [
"2.5, 2.5, 0",
"2.5, 0, 0",
"2.5, 0, -5-d3",
"2.5, 2.5, -5-d3"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, 0.5",
"0, 0",
"1+d3, 0",
"1+d3, 0.5"
]
}
]
},
"TwoDLeftSide": {
"Vertices": [
"0, 0, 0",
"0, 0, -5-d3",
"2.5, 0, -5-d3",
"2.5, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, 0.5",
"1+d3, 0.5",
"1+d3, 0",
"0, 0"
]
}
]
},
"TwoDTopSideExpand": null,
"TwoDRightSideExpand": null,
"TwoDBottomSideExpand": null,
"TwoDLeftSideExpand": null
}
]

View File

@ -0,0 +1,493 @@
[
{
"Type": "RibbonBorder",
"BindingDisplayTexture": "RibbonBorder.png",
"UnitSize": "Small",
"ExpandType": "Column",
"InitColumnDirection": "PositiveX",
"DefaultSideConfig": {
"UseTwoDTop": false,
"UseTwoDRight": false,
"UseTwoDBottom": false,
"UseTwoDLeft": true,
"UseThreeDTop": true,
"UseThreeDBottom": false
},
"ThreeDTopFace": {
"Vertices": [
"2.5+d1, 0, 0",
"2.5+d1, 2.5, -0.7",
"0, 2.5, -0.7",
"0, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopFlat",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, -d1",
"1, -d1",
"1, 0.5",
"0, 0.5"
]
}
]
},
"ThreeDBottomFace": {
"Vertices": [
"2.5+d1, 0, -5-d3",
"2.5+d1, 2.5, -5-d3",
"0, 2.5, -5-d3",
"0, 0, -5-d3"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
3,
2,
1,
0
],
"UVs": [
"0, 0.5",
"0.5, 0.5",
"0.5, -d1",
"0, -d1"
]
}
]
},
"TwoDTopSide": {
"Vertices": [
"0, 0, -5-d3",
"0, 0, 0",
"0, 2.5, -0.7",
"0, 2.5, -5-d3"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"1+d3, 0",
"0, 0",
"0.14, 0.5",
"1+d3, 0.5"
]
}
]
},
"TwoDRightSide": {
"Vertices": [
"2.5+d1, 2.5, -0.7",
"2.5+d1, 2.5, -5-d3",
"0, 2.5, -5-d3",
"0, 2.5, -0.7"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0.14, -d1",
"1+d3, -d1",
"1+d3, 0.5",
"0.14, 0.5"
]
}
]
},
"TwoDBottomSide": {
"Vertices": [
"2.5+d1, 0, 0",
"2.5+d1, 0, -5-d3",
"2.5+d1, 2.5, -5-d3",
"2.5+d1, 2.5, -0.7"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, 0",
"1+d3, 0",
"1+d3, 0.5",
"0.14, 0.5"
]
}
]
},
"TwoDLeftSide": {
"Vertices": [
"2.5+d1, 0, 0",
"2.5+d1, 0, -5-d3",
"0, 0, -5-d3",
"0, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorSide",
"Indices": [
3,
2,
1,
0
],
"UVs": [
"0, 0.5",
"1+d3, 0.5",
"1+d3, -d1",
"0, -d1"
]
}
]
},
"TwoDTopSideExpand": null,
"TwoDRightSideExpand": null,
"TwoDBottomSideExpand": null,
"TwoDLeftSideExpand": {
"Vertices": [
"2.5+d1, 0, -5-d3",
"0, 0, -5-d3",
"0, 0, -2.5",
"2.5+d1, 0, -2.5",
"2.5+d1, 0, 0",
"0, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorder_ForSide",
"Indices": [
2,
3,
4,
5
],
"UVs": [
"0.5, 0.5",
"0.5, -d1",
"0, -d1",
"0, 0.5"
]
},
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
3,
2,
1,
0
],
"UVs": [
"0, -d1",
"0, 0.5",
"0.5+d3, 0.5",
"0.5+d3, -d1"
]
}
]
}
},
{
"Type": "RibbonOutterCorner",
"BindingDisplayTexture": "RibbonOutterCorner.png",
"UnitSize": "Small",
"ExpandType": "Static",
"InitColumnDirection": "PositiveX",
"DefaultSideConfig": {
"UseTwoDTop": true,
"UseTwoDRight": false,
"UseTwoDBottom": false,
"UseTwoDLeft": true,
"UseThreeDTop": true,
"UseThreeDBottom": false
},
"ThreeDTopFace": {
"Vertices": [
"0, 0, 0",
"2.5, 0, 0",
"2.5, 2.5, -0.7",
"0, 2.5, 0"
],
"Faces": [
{
"Type": "TRIANGLE",
"Textures": "FloorTopFlat",
"Indices": [
0,
1,
2
],
"UVs": [
"0, 0",
"0, 1",
"1, 1"
]
},
{
"Type": "TRIANGLE",
"Textures": "FloorTopFlat",
"Indices": [
0,
2,
3
],
"UVs": [
"1, 0",
"0, 1",
"1, 1"
]
}
]
},
"ThreeDBottomFace": {
"Vertices": [
"2.5, 0, -5-d3",
"2.5, 2.5, -5-d3",
"0, 2.5, -5-d3",
"0, 0, -5-d3"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
3,
2,
1,
0
],
"UVs": [
"0, 0.5",
"0.5, 0.5",
"0.5, 0",
"0, 0"
]
}
]
},
"TwoDTopSide": {
"Vertices": [
"0, 0, -5-d3",
"0, 0, 0",
"0, 2.5, 0",
"0, 2.5, -5-d3"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"1+d3, 0",
"0, 0",
"0, 0.5",
"1+d3, 0.5"
]
}
]
},
"TwoDRightSide": {
"Vertices": [
"2.5, 2.5, -5-d3",
"0, 2.5, -5-d3",
"0, 2.5, 0",
"2.5, 2.5, -0.7"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"1+d3, 0",
"1+d3, 0.5",
"0, 0.5",
"0.14, 0"
]
}
]
},
"TwoDBottomSide": {
"Vertices": [
"2.5, 0, -5-d3",
"2.5, 2.5, -5-d3",
"2.5, 2.5, -0.7",
"2.5, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"1+d3, 0",
"1+d3, 0.5",
"0.14, 0.5",
"0, 0"
]
}
]
},
"TwoDLeftSide": {
"Vertices": [
"2.5, 0, 0",
"2.5, 0, -5-d3",
"0, 0, -5-d3",
"0, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorSide",
"Indices": [
3,
2,
1,
0
],
"UVs": [
"0, 0.5",
"1+d3, 0.5",
"1+d3, 0",
"0, 0"
]
}
]
},
"TwoDTopSideExpand": {
"Vertices": [
"0, 0, -5-d3",
"0, 2.5, -5-d3",
"0, 2.5, -2.5",
"0, 0, -2.5",
"0, 0, 0",
"0, 2.5, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorder_ForSide",
"Indices": [
2,
3,
4,
5
],
"UVs": [
"0.5, 0.5",
"0.5, 0",
"0, 0",
"0, 0.5"
]
},
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
3,
2,
1,
0
],
"UVs": [
"0, 0",
"0, 0.5",
"0.5+d3, 0.5",
"0.5+d3, 0"
]
}
]
},
"TwoDRightSideExpand": null,
"TwoDBottomSideExpand": null,
"TwoDLeftSideExpand": {
"Vertices": [
"2.5, 0, -5-d3",
"0, 0, -5-d3",
"0, 0, -2.5",
"2.5, 0, -2.5",
"2.5, 0, 0",
"0, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorder_ForSide",
"Indices": [
2,
3,
4,
5
],
"UVs": [
"0.5, 0.5",
"0.5, 0",
"0, 0",
"0, 0.5"
]
},
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
3,
2,
1,
0
],
"UVs": [
"0, 0",
"0, 0.5",
"0.5+d3, 0.5",
"0.5+d3, 0"
]
}
]
}
}
]

View File

@ -0,0 +1,680 @@
[
{
"Type": "SinkBorder",
"BindingDisplayTexture": "SinkBorder.png",
"UnitSize": "Small",
"ExpandType": "Column",
"InitColumnDirection": "PositiveX",
"DefaultSideConfig": {
"UseTwoDTop": false,
"UseTwoDRight": false,
"UseTwoDBottom": false,
"UseTwoDLeft": true,
"UseThreeDTop": true,
"UseThreeDBottom": false
},
"ThreeDTopFace": {
"Vertices": [
"2.5+d1, 0, 0",
"2.5+d1, 2.5, -0.7",
"0, 2.5, -0.7",
"0, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopProfil",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, -d1",
"0.5, -d1",
"0.5, 0.5",
"0, 0.5"
]
}
]
},
"ThreeDBottomFace": {
"Vertices": [
"2.5+d1, 0, -5-d3",
"2.5+d1, 2.5, -5-d3",
"0, 2.5, -5-d3",
"0, 0, -5-d3"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
3,
2,
1,
0
],
"UVs": [
"0, 0.5",
"0.5, 0.5",
"0.5, -d1",
"0, -d1"
]
}
]
},
"TwoDTopSide": {
"Vertices": [
"0, 0, -5-d3",
"0, 0, 0",
"0, 2.5, -0.7",
"0, 2.5, -5-d3"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"1+d3, 0",
"0, 0",
"0.14, 0.5",
"1+d3, 0.5"
]
}
]
},
"TwoDRightSide": {
"Vertices": [
"2.5+d1, 2.5, -0.7",
"2.5+d1, 2.5, -5-d3",
"0, 2.5, -5-d3",
"0, 2.5, -0.7"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0.14, -d1",
"1+d3, -d1",
"1+d3, 0.5",
"0.14, 0.5"
]
}
]
},
"TwoDBottomSide": {
"Vertices": [
"2.5+d1, 0, 0",
"2.5+d1, 0, -5-d3",
"2.5+d1, 2.5, -5-d3",
"2.5+d1, 2.5, -0.7"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, 0",
"1+d3, 0",
"1+d3, 0.5",
"0.14, 0.5"
]
}
]
},
"TwoDLeftSide": {
"Vertices": [
"2.5+d1, 0, 0",
"2.5+d1, 0, -5-d3",
"0, 0, -5-d3",
"0, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorSide",
"Indices": [
3,
2,
1,
0
],
"UVs": [
"0, 0.5",
"1+d3, 0.5",
"1+d3, -d1",
"0, -d1"
]
}
]
},
"TwoDTopSideExpand": null,
"TwoDRightSideExpand": null,
"TwoDBottomSideExpand": null,
"TwoDLeftSideExpand": {
"Vertices": [
"2.5+d1, 0, -5-d3",
"0, 0, -5-d3",
"0, 0, -2.5",
"2.5+d1, 0, -2.5",
"2.5+d1, 0, 0",
"0, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorder_ForSide",
"Indices": [
2,
3,
4,
5
],
"UVs": [
"0.5, 0.5",
"0.5, -d1",
"0, -d1",
"0, 0.5"
]
},
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
3,
2,
1,
0
],
"UVs": [
"0, -d1",
"0, 0.5",
"0.5+d3, 0.5",
"0.5+d3, -d1"
]
}
]
}
},
{
"Type": "SinkOutterCorner",
"BindingDisplayTexture": "SinkOutterCorner.png",
"UnitSize": "Small",
"ExpandType": "Static",
"InitColumnDirection": "PositiveX",
"DefaultSideConfig": {
"UseTwoDTop": true,
"UseTwoDRight": false,
"UseTwoDBottom": false,
"UseTwoDLeft": true,
"UseThreeDTop": true,
"UseThreeDBottom": false
},
"ThreeDTopFace": {
"Vertices": [
"0, 0, 0",
"2.5, 0, 0",
"2.5, 2.5, -0.7",
"0, 2.5, 0"
],
"Faces": [
{
"Type": "TRIANGLE",
"Textures": "FloorTopProfil",
"Indices": [
0,
1,
2
],
"UVs": [
"0, 0.5",
"0, 1",
"0.5, 1"
]
},
{
"Type": "TRIANGLE",
"Textures": "FloorTopProfil",
"Indices": [
0,
2,
3
],
"UVs": [
"1, 0.5",
"0.5, 1",
"1, 1"
]
}
]
},
"ThreeDBottomFace": {
"Vertices": [
"2.5, 0, -5-d3",
"2.5, 2.5, -5-d3",
"0, 2.5, -5-d3",
"0, 0, -5-d3"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
3,
2,
1,
0
],
"UVs": [
"0, 0.5",
"0.5, 0.5",
"0.5, 0",
"0, 0"
]
}
]
},
"TwoDTopSide": {
"Vertices": [
"0, 0, -5-d3",
"0, 0, 0",
"0, 2.5, 0",
"0, 2.5, -5-d3"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"1+d3, 0",
"0, 0",
"0, 0.5",
"1+d3, 0.5"
]
}
]
},
"TwoDRightSide": {
"Vertices": [
"2.5, 2.5, -5-d3",
"0, 2.5, -5-d3",
"0, 2.5, 0",
"2.5, 2.5, -0.7"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"1+d3, 0",
"1+d3, 0.5",
"0, 0.5",
"0.14, 0"
]
}
]
},
"TwoDBottomSide": {
"Vertices": [
"2.5, 0, -5-d3",
"2.5, 2.5, -5-d3",
"2.5, 2.5, -0.7",
"2.5, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"1+d3, 0",
"1+d3, 0.5",
"0.14, 0.5",
"0, 0"
]
}
]
},
"TwoDLeftSide": {
"Vertices": [
"2.5, 0, 0",
"2.5, 0, -5-d3",
"0, 0, -5-d3",
"0, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorSide",
"Indices": [
3,
2,
1,
0
],
"UVs": [
"0, 0.5",
"1+d3, 0.5",
"1+d3, 0",
"0, 0"
]
}
]
},
"TwoDTopSideExpand": {
"Vertices": [
"0, 0, -5-d3",
"0, 2.5, -5-d3",
"0, 2.5, -2.5",
"0, 0, -2.5",
"0, 0, 0",
"0, 2.5, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorder_ForSide",
"Indices": [
2,
3,
4,
5
],
"UVs": [
"0.5, 0.5",
"0.5, 0",
"0, 0",
"0, 0.5"
]
},
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
3,
2,
1,
0
],
"UVs": [
"0, 0",
"0, 0.5",
"0.5+d3, 0.5",
"0.5+d3, 0"
]
}
]
},
"TwoDRightSideExpand": null,
"TwoDBottomSideExpand": null,
"TwoDLeftSideExpand": {
"Vertices": [
"2.5, 0, -5-d3",
"0, 0, -5-d3",
"0, 0, -2.5",
"2.5, 0, -2.5",
"2.5, 0, 0",
"0, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorder_ForSide",
"Indices": [
2,
3,
4,
5
],
"UVs": [
"0.5, 0.5",
"0.5, 0",
"0, 0",
"0, 0.5"
]
},
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
3,
2,
1,
0
],
"UVs": [
"0, 0",
"0, 0.5",
"0.5+d3, 0.5",
"0.5+d3, 0"
]
}
]
}
},
{
"Type": "SinkInnerCorner",
"BindingDisplayTexture": "SinkInnerCorner.png",
"UnitSize": "Small",
"ExpandType": "Static",
"InitColumnDirection": "PositiveX",
"DefaultSideConfig": {
"UseTwoDTop": false,
"UseTwoDRight": false,
"UseTwoDBottom": false,
"UseTwoDLeft": false,
"UseThreeDTop": true,
"UseThreeDBottom": false
},
"ThreeDTopFace": {
"Vertices": [
"2.5, 0, -0.7",
"2.5, 2.5, 0",
"0, 0, -0.7",
"0, 2.5, -0.7"
],
"Faces": [
{
"Type": "TRIANGLE",
"Textures": "FloorTopProfil",
"Indices": [
0,
1,
2
],
"UVs": [
"0.5, 1",
"0, 1",
"0.5, 0.5"
]
},
{
"Type": "TRIANGLE",
"Textures": "FloorTopProfil",
"Indices": [
3,
2,
1
],
"UVs": [
"0.5, 1",
"0.5, 0.5",
"1, 1"
]
}
]
},
"ThreeDBottomFace": {
"Vertices": [
"2.5, 0, -5-d3",
"2.5, 2.5, -5-d3",
"0, 2.5, -5-d3",
"0, 0, -5-d3"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
3,
2,
1,
0
],
"UVs": [
"0, 0.5",
"0.5, 0.5",
"0.5, 0",
"0, 0"
]
}
]
},
"TwoDTopSide": {
"Vertices": [
"0, 0, -0.7",
"0, 2.5, -0.7",
"0, 2.5, -5-d3",
"0, 0, -5-d3"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0.14, 0",
"0.14, 0.5",
"1+d3, 0.5",
"1+d3, 0"
]
}
]
},
"TwoDRightSide": {
"Vertices": [
"2.5, 2.5, 0",
"2.5, 2.5, -5-d3",
"0, 2.5, -5-d3",
"0, 2.5, -0.7"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, 0",
"1+d3, 0",
"1+d3, 0.5",
"0.14, 0.5"
]
}
]
},
"TwoDBottomSide": {
"Vertices": [
"2.5, 2.5, 0",
"2.5, 0, -0.7",
"2.5, 0, -5-d3",
"2.5, 2.5, -5-d3"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, 0.5",
"0.14, 0",
"1+d3, 0",
"1+d3, 0.5"
]
}
]
},
"TwoDLeftSide": {
"Vertices": [
"0, 0, -0.7",
"0, 0, -5-d3",
"2.5, 0, -5-d3",
"2.5, 0, -0.7"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "FloorTopBorderless_ForSide",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0.14, 0.5",
"1+d3, 0.5",
"1+d3, 0",
"0.14, 0"
]
}
]
},
"TwoDTopSideExpand": null,
"TwoDRightSideExpand": null,
"TwoDBottomSideExpand": null,
"TwoDLeftSideExpand": null
}
]

View File

@ -0,0 +1,827 @@
[
{
"Type": "WoodTrafo",
"BindingDisplayTexture": "WoodTrafo.png",
"UnitSize": "Large",
"ExpandType": "Static",
"InitColumnDirection": "PositiveX",
"DefaultSideConfig": {
"UseTwoDTop": true,
"UseTwoDRight": true,
"UseTwoDBottom": true,
"UseTwoDLeft": true,
"UseThreeDTop": true,
"UseThreeDBottom": true
},
"ThreeDTopFace": {
"Vertices": [
"0, 5, 0",
"0, 0, 0",
"5, 0, 0",
"5, 5, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "BallWood",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, 0",
"1, 0",
"1, 1",
"0, 1"
]
}
]
},
"ThreeDBottomFace": {
"Vertices": [
"0, 0, -5-d3",
"0, 5, -5-d3",
"5, 5, -5-d3",
"5, 0, -5-d3"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "BallWood",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, 0",
"1, 0",
"1, 1",
"0, 1"
]
}
]
},
"TwoDTopSide": {
"Vertices": [
"0, 5, -5-d3",
"0, 0, -5-d3",
"0, 0, 0",
"0, 5, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "BallWood",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, -d3",
"1, -d3",
"1, 1",
"0, 1"
]
}
]
},
"TwoDRightSide": {
"Vertices": [
"5, 5, -5-d3",
"0, 5, -5-d3",
"0, 5, 0",
"5, 5, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "BallWood",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, -d3",
"1, -d3",
"1, 1",
"0, 1"
]
}
]
},
"TwoDBottomSide": {
"Vertices": [
"5, 0, -5-d3",
"5, 5, -5-d3",
"5, 5, 0",
"5, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "BallWood",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, -d3",
"1, -d3",
"1, 1",
"0, 1"
]
}
]
},
"TwoDLeftSide": {
"Vertices": [
"0, 0, -5-d3",
"5, 0, -5-d3",
"5, 0, 0",
"0, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "BallWood",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, -d3",
"1, -d3",
"1, 1",
"0, 1"
]
}
]
},
"TwoDTopSideExpand": {
"Vertices": [
"0, 5, -5-d3",
"0, 0, -5-d3",
"0, 0, 0",
"0, 5, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "BallWood",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"1+d3, 0",
"1+d3, 1",
"0, 1",
"0, 0"
]
}
]
},
"TwoDRightSideExpand": {
"Vertices": [
"5, 5, -5-d3",
"0, 5, -5-d3",
"0, 5, 0",
"5, 5, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "BallWood",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"1+d3, 0",
"1+d3, 1",
"0, 1",
"0, 0"
]
}
]
},
"TwoDBottomSideExpand": {
"Vertices": [
"5, 0, -5-d3",
"5, 5, -5-d3",
"5, 5, 0",
"5, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "BallWood",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"1+d3, 0",
"1+d3, 1",
"0, 1",
"0, 0"
]
}
]
},
"TwoDLeftSideExpand": {
"Vertices": [
"0, 0, -5-d3",
"5, 0, -5-d3",
"5, 0, 0",
"0, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "BallWood",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"1+d3, 0",
"1+d3, 1",
"0, 1",
"0, 0"
]
}
]
}
},
{
"Type": "StoneTrafo",
"BindingDisplayTexture": "StoneTrafo.png",
"UnitSize": "Large",
"ExpandType": "Static",
"InitColumnDirection": "PositiveX",
"DefaultSideConfig": {
"UseTwoDTop": true,
"UseTwoDRight": true,
"UseTwoDBottom": true,
"UseTwoDLeft": true,
"UseThreeDTop": true,
"UseThreeDBottom": true
},
"ThreeDTopFace": {
"Vertices": [
"0, 5, 0",
"0, 0, 0",
"5, 0, 0",
"5, 5, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "BallStone",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, 0",
"1, 0",
"1, 1",
"0, 1"
]
}
]
},
"ThreeDBottomFace": {
"Vertices": [
"0, 0, -5-d3",
"0, 5, -5-d3",
"5, 5, -5-d3",
"5, 0, -5-d3"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "BallStone",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, 0",
"1, 0",
"1, 1",
"0, 1"
]
}
]
},
"TwoDTopSide": {
"Vertices": [
"0, 5, -5-d3",
"0, 0, -5-d3",
"0, 0, 0",
"0, 5, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "BallStone",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, -d3",
"1, -d3",
"1, 1",
"0, 1"
]
}
]
},
"TwoDRightSide": {
"Vertices": [
"5, 5, -5-d3",
"0, 5, -5-d3",
"0, 5, 0",
"5, 5, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "BallStone",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, -d3",
"1, -d3",
"1, 1",
"0, 1"
]
}
]
},
"TwoDBottomSide": {
"Vertices": [
"5, 0, -5-d3",
"5, 5, -5-d3",
"5, 5, 0",
"5, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "BallStone",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, -d3",
"1, -d3",
"1, 1",
"0, 1"
]
}
]
},
"TwoDLeftSide": {
"Vertices": [
"0, 0, -5-d3",
"5, 0, -5-d3",
"5, 0, 0",
"0, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "BallStone",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, -d3",
"1, -d3",
"1, 1",
"0, 1"
]
}
]
},
"TwoDTopSideExpand": {
"Vertices": [
"0, 5, -5-d3",
"0, 0, -5-d3",
"0, 0, 0",
"0, 5, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "BallStone",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"1+d3, 0",
"1+d3, 1",
"0, 1",
"0, 0"
]
}
]
},
"TwoDRightSideExpand": {
"Vertices": [
"5, 5, -5-d3",
"0, 5, -5-d3",
"0, 5, 0",
"5, 5, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "BallStone",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"1+d3, 0",
"1+d3, 1",
"0, 1",
"0, 0"
]
}
]
},
"TwoDBottomSideExpand": {
"Vertices": [
"5, 0, -5-d3",
"5, 5, -5-d3",
"5, 5, 0",
"5, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "BallStone",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"1+d3, 0",
"1+d3, 1",
"0, 1",
"0, 0"
]
}
]
},
"TwoDLeftSideExpand": {
"Vertices": [
"0, 0, -5-d3",
"5, 0, -5-d3",
"5, 0, 0",
"0, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "BallStone",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"1+d3, 0",
"1+d3, 1",
"0, 1",
"0, 0"
]
}
]
}
},
{
"Type": "PaperTrafo",
"BindingDisplayTexture": "PaperTrafo.png",
"UnitSize": "Large",
"ExpandType": "Static",
"InitColumnDirection": "PositiveX",
"DefaultSideConfig": {
"UseTwoDTop": true,
"UseTwoDRight": true,
"UseTwoDBottom": true,
"UseTwoDLeft": true,
"UseThreeDTop": true,
"UseThreeDBottom": true
},
"ThreeDTopFace": {
"Vertices": [
"0, 5, 0",
"0, 0, 0",
"5, 0, 0",
"5, 5, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "BallPaper",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, 0",
"1, 0",
"1, 1",
"0, 1"
]
}
]
},
"ThreeDBottomFace": {
"Vertices": [
"0, 0, -5-d3",
"0, 5, -5-d3",
"5, 5, -5-d3",
"5, 0, -5-d3"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "BallPaper",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, 0",
"1, 0",
"1, 1",
"0, 1"
]
}
]
},
"TwoDTopSide": {
"Vertices": [
"0, 5, -5-d3",
"0, 0, -5-d3",
"0, 0, 0",
"0, 5, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "BallPaper",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, -d3",
"1, -d3",
"1, 1",
"0, 1"
]
}
]
},
"TwoDRightSide": {
"Vertices": [
"5, 5, -5-d3",
"0, 5, -5-d3",
"0, 5, 0",
"5, 5, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "BallPaper",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, -d3",
"1, -d3",
"1, 1",
"0, 1"
]
}
]
},
"TwoDBottomSide": {
"Vertices": [
"5, 0, -5-d3",
"5, 5, -5-d3",
"5, 5, 0",
"5, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "BallPaper",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, -d3",
"1, -d3",
"1, 1",
"0, 1"
]
}
]
},
"TwoDLeftSide": {
"Vertices": [
"0, 0, -5-d3",
"5, 0, -5-d3",
"5, 0, 0",
"0, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "BallPaper",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"0, -d3",
"1, -d3",
"1, 1",
"0, 1"
]
}
]
},
"TwoDTopSideExpand": {
"Vertices": [
"0, 5, -5-d3",
"0, 0, -5-d3",
"0, 0, 0",
"0, 5, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "BallPaper",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"1+d3, 0",
"1+d3, 1",
"0, 1",
"0, 0"
]
}
]
},
"TwoDRightSideExpand": {
"Vertices": [
"5, 5, -5-d3",
"0, 5, -5-d3",
"0, 5, 0",
"5, 5, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "BallPaper",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"1+d3, 0",
"1+d3, 1",
"0, 1",
"0, 0"
]
}
]
},
"TwoDBottomSideExpand": {
"Vertices": [
"5, 0, -5-d3",
"5, 5, -5-d3",
"5, 5, 0",
"5, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "BallPaper",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"1+d3, 0",
"1+d3, 1",
"0, 1",
"0, 0"
]
}
]
},
"TwoDLeftSideExpand": {
"Vertices": [
"0, 0, -5-d3",
"5, 0, -5-d3",
"5, 0, 0",
"0, 0, 0"
],
"Faces": [
{
"Type": "RECTANGLE",
"Textures": "BallPaper",
"Indices": [
0,
1,
2,
3
],
"UVs": [
"1+d3, 0",
"1+d3, 1",
"0, 1",
"0, 0"
]
}
]
}
}
]

View File

@ -0,0 +1,317 @@
[
{
"Type": "NormalFloor",
"BindingDisplayTexture": "NormalFloor.png",
"UnitSize": "Small",
"ExpandType": "Column",
"InitColumnDirection": "PositiveX",
"DefaultSideConfig": {
"UseTwoDTop": false,
"UseTwoDRight": true,
"UseTwoDBottom": false,
"UseTwoDLeft": true,
"UseThreeDTop": true,
"UseThreeDBottom": false
},
"SmashedBlocks": [
{
"Type": "NormalBorder",
"Rotation": "R0",
"SideSync": "2dTop;False;2dBottom;2dLeft;3dTop;3dBottom",
"StartPosition": "0, 0, 0",
"ExpandParam": "d1, 0"
},
{
"Type": "NormalBorder",
"Rotation": "R180",
"SideSync": "2dBottom;False;2dTop;2dRight;3dTop;3dBottom",
"StartPosition": "d1, (2.5*1), 0",
"ExpandParam": "d1, 0"
}
]
},
{
"Type": "NormalFloorTerminal",
"BindingDisplayTexture": "NormalFloorTerminal.png",
"UnitSize": "Small",
"ExpandType": "Static",
"InitColumnDirection": "PositiveX",
"DefaultSideConfig": {
"UseTwoDTop": true,
"UseTwoDRight": true,
"UseTwoDBottom": false,
"UseTwoDLeft": true,
"UseThreeDTop": true,
"UseThreeDBottom": false
},
"SmashedBlocks": [
{
"Type": "NormalOutterCorner",
"Rotation": "R0",
"SideSync": "2dTop;False;2dBottom;2dLeft;3dTop;3dBottom",
"StartPosition": "0, 0, 0",
"ExpandParam": "0, 0"
},
{
"Type": "NormalOutterCorner",
"Rotation": "R270",
"SideSync": "2dRight;2dBottom;False;2dTop;3dTop;3dBottom",
"StartPosition": "0, (2.5*1), 0",
"ExpandParam": "0, 0"
}
]
},
{
"Type": "Normal1x1",
"BindingDisplayTexture": "Normal1x1.png",
"UnitSize": "Small",
"ExpandType": "Static",
"InitColumnDirection": "PositiveX",
"DefaultSideConfig": {
"UseTwoDTop": true,
"UseTwoDRight": true,
"UseTwoDBottom": true,
"UseTwoDLeft": true,
"UseThreeDTop": true,
"UseThreeDBottom": false
},
"SmashedBlocks": [
{
"Type": "NormalOutterCorner",
"Rotation": "R0",
"SideSync": "2dTop;False;False;2dLeft;3dTop;3dBottom",
"StartPosition": "0, 0, 0",
"ExpandParam": "0, 0"
},
{
"Type": "NormalOutterCorner",
"Rotation": "R90",
"SideSync": "2dLeft;False;False;2dBottom;3dTop;3dBottom",
"StartPosition": "(2.5*1), 0, 0",
"ExpandParam": "0, 0"
},
{
"Type": "NormalOutterCorner",
"Rotation": "R180",
"SideSync": "2dBottom;False;False;2dRight;3dTop;3dBottom",
"StartPosition": "(2.5*1), (2.5*1), 0",
"ExpandParam": "0, 0"
},
{
"Type": "NormalOutterCorner",
"Rotation": "R270",
"SideSync": "2dRight;False;False;2dTop;3dTop;3dBottom",
"StartPosition": "0, (2.5*1), 0",
"ExpandParam": "0, 0"
}
]
},
{
"Type": "NormalPlatform",
"BindingDisplayTexture": "NormalPlatform.png",
"UnitSize": "Small",
"ExpandType": "Freedom",
"InitColumnDirection": "PositiveY",
"DefaultSideConfig": {
"UseTwoDTop": true,
"UseTwoDRight": true,
"UseTwoDBottom": true,
"UseTwoDLeft": true,
"UseThreeDTop": true,
"UseThreeDBottom": false
},
"SmashedBlocks": [
{
"Type": "Flat",
"Rotation": "R0",
"SideSync": "False;False;False;False;3dTop;3dBottom",
"StartPosition": "(2.5*1), (2.5*1), 0",
"ExpandParam": "d1, d2"
},
{
"Type": "NormalBorder",
"Rotation": "R0",
"SideSync": "False;False;False;2dLeft;3dTop;3dBottom",
"StartPosition": "(2.5*1), 0, 0",
"ExpandParam": "d2, 0"
},
{
"Type": "NormalBorder",
"Rotation": "R90",
"SideSync": "False;False;False;2dBottom;3dTop;3dBottom",
"StartPosition": "(2.5*2) +d2, (2.5*1), 0",
"ExpandParam": "d1, 0"
},
{
"Type": "NormalBorder",
"Rotation": "R180",
"SideSync": "False;False;False;2dRight;3dTop;3dBottom",
"StartPosition": "(2.5*1) +d2, (2.5*2) +d1, 0",
"ExpandParam": "d2, 0"
},
{
"Type": "NormalBorder",
"Rotation": "R270",
"SideSync": "False;False;False;2dTop;3dTop;3dBottom",
"StartPosition": "0, (2.5*1) +d1, 0",
"ExpandParam": "d1, 0"
},
{
"Type": "NormalOutterCorner",
"Rotation": "R0",
"SideSync": "2dTop;False;False;2dLeft;3dTop;3dBottom",
"StartPosition": "0, 0, 0",
"ExpandParam": "0, 0"
},
{
"Type": "NormalOutterCorner",
"Rotation": "R90",
"SideSync": "2dLeft;False;False;2dBottom;3dTop;3dBottom",
"StartPosition": "(2.5*2) +d2, 0, 0",
"ExpandParam": "0, 0"
},
{
"Type": "NormalOutterCorner",
"Rotation": "R180",
"SideSync": "2dBottom;False;False;2dRight;3dTop;3dBottom",
"StartPosition": "(2.5*2) +d2, (2.5*2) +d1, 0",
"ExpandParam": "0, 0"
},
{
"Type": "NormalOutterCorner",
"Rotation": "R270",
"SideSync": "2dRight;False;False;2dTop;3dTop;3dBottom",
"StartPosition": "0, (2.5*2) +d1, 0",
"ExpandParam": "0, 0"
}
]
},
{
"Type": "NormalLConnector",
"BindingDisplayTexture": "NormalLConnector.png",
"UnitSize": "Small",
"ExpandType": "Static",
"InitColumnDirection": "PositiveX",
"DefaultSideConfig": {
"UseTwoDTop": true,
"UseTwoDRight": false,
"UseTwoDBottom": false,
"UseTwoDLeft": true,
"UseThreeDTop": true,
"UseThreeDBottom": false
},
"SmashedBlocks": [
{
"Type": "NormalOutterCorner",
"Rotation": "R0",
"SideSync": "2dTop;False;False;2dLeft;3dTop;3dBottom",
"StartPosition": "0, 0, 0",
"ExpandParam": "0, 0"
},
{
"Type": "NormalBorder",
"Rotation": "R0",
"SideSync": "False;False;2dBottom;2dLeft;3dTop;3dBottom",
"StartPosition": "(2.5*1), 0, 0",
"ExpandParam": "0, 0"
},
{
"Type": "NormalInnerCorner",
"Rotation": "R0",
"SideSync": "False;2dRight;2dBottom;False;3dTop;3dBottom",
"StartPosition": "(2.5*1), (2.5*1), 0",
"ExpandParam": "0, 0"
},
{
"Type": "NormalBorder",
"Rotation": "R270",
"SideSync": "2dRight;False;False;2dTop;3dTop;3dBottom",
"StartPosition": "0, (2.5*1), 0",
"ExpandParam": "0, 0"
}
]
},
{
"Type": "NormalTConnector",
"BindingDisplayTexture": "NormalTConnector.png",
"UnitSize": "Small",
"ExpandType": "Static",
"InitColumnDirection": "PositiveX",
"DefaultSideConfig": {
"UseTwoDTop": true,
"UseTwoDRight": false,
"UseTwoDBottom": false,
"UseTwoDLeft": false,
"UseThreeDTop": true,
"UseThreeDBottom": false
},
"SmashedBlocks": [
{
"Type": "NormalInnerCorner",
"Rotation": "R270",
"SideSync": "False;2dBottom;2dLeft;False;3dTop;3dBottom",
"StartPosition": "(2.5*1), 0, 0",
"ExpandParam": "0, 0"
},
{
"Type": "NormalInnerCorner",
"Rotation": "R0",
"SideSync": "False;2dRight;2dBottom;False;3dTop;3dBottom",
"StartPosition": "(2.5*1), (2.5*1), 0",
"ExpandParam": "0, 0"
},
{
"Type": "NormalBorder",
"Rotation": "R270",
"SideSync": "2dRight;False;2dLeft;2dTop;3dTop;3dBottom",
"StartPosition": "0, (2.5*1), 0",
"ExpandParam": "1, 0"
}
]
},
{
"Type": "NormalCrossroad",
"BindingDisplayTexture": "NormalCrossroad.png",
"UnitSize": "Small",
"ExpandType": "Static",
"InitColumnDirection": "PositiveX",
"DefaultSideConfig": {
"UseTwoDTop": false,
"UseTwoDRight": false,
"UseTwoDBottom": false,
"UseTwoDLeft": false,
"UseThreeDTop": true,
"UseThreeDBottom": false
},
"SmashedBlocks": [
{
"Type": "NormalInnerCorner",
"Rotation": "R0",
"SideSync": "False;2dRight;2dBottom;False;3dTop;3dBottom",
"StartPosition": "(2.5*1), (2.5*1), 0",
"ExpandParam": "0, 0"
},
{
"Type": "NormalInnerCorner",
"Rotation": "R90",
"SideSync": "False;2dTop;2dRight;False;3dTop;3dBottom",
"StartPosition": "0, (2.5*1), 0",
"ExpandParam": "0, 0"
},
{
"Type": "NormalInnerCorner",
"Rotation": "R180",
"SideSync": "False;2dLeft;2dTop;False;3dTop;3dBottom",
"StartPosition": "0, 0, 0",
"ExpandParam": "0, 0"
},
{
"Type": "NormalInnerCorner",
"Rotation": "R270",
"SideSync": "False;2dBottom;2dLeft;False;3dTop;3dBottom",
"StartPosition": "(2.5*1), 0, 0",
"ExpandParam": "0, 0"
}
]
}
]

View File

@ -0,0 +1,397 @@
[
{
"Type": "SinkFloor",
"BindingDisplayTexture": "SinkFloor.png",
"UnitSize": "Small",
"ExpandType": "Column",
"InitColumnDirection": "PositiveX",
"DefaultSideConfig": {
"UseTwoDTop": false,
"UseTwoDRight": true,
"UseTwoDBottom": false,
"UseTwoDLeft": true,
"UseThreeDTop": true,
"UseThreeDBottom": false
},
"SmashedBlocks": [
{
"Type": "SinkBorder",
"Rotation": "R0",
"SideSync": "2dTop;False;2dBottom;2dLeft;3dTop;3dBottom",
"StartPosition": "0, 0, 0",
"ExpandParam": "d1, 0"
},
{
"Type": "SinkBorder",
"Rotation": "R180",
"SideSync": "2dBottom;False;2dTop;2dRight;3dTop;3dBottom",
"StartPosition": "d1, (2.5*1), 0",
"ExpandParam": "d1, 0"
}
]
},
{
"Type": "SinkFloorTerminal",
"BindingDisplayTexture": "SinkFloorTerminal.png",
"UnitSize": "Small",
"ExpandType": "Static",
"InitColumnDirection": "PositiveX",
"DefaultSideConfig": {
"UseTwoDTop": true,
"UseTwoDRight": true,
"UseTwoDBottom": false,
"UseTwoDLeft": true,
"UseThreeDTop": true,
"UseThreeDBottom": false
},
"SmashedBlocks": [
{
"Type": "SinkOutterCorner",
"Rotation": "R0",
"SideSync": "2dTop;False;2dBottom;2dLeft;3dTop;3dBottom",
"StartPosition": "0, 0, 0",
"ExpandParam": "0, 0"
},
{
"Type": "SinkOutterCorner",
"Rotation": "R270",
"SideSync": "2dRight;2dBottom;False;2dTop;3dTop;3dBottom",
"StartPosition": "0, (2.5*1), 0",
"ExpandParam": "0, 0"
}
]
},
{
"Type": "Sink1x1",
"BindingDisplayTexture": "Sink1x1.png",
"UnitSize": "Small",
"ExpandType": "Static",
"InitColumnDirection": "PositiveX",
"DefaultSideConfig": {
"UseTwoDTop": true,
"UseTwoDRight": true,
"UseTwoDBottom": true,
"UseTwoDLeft": true,
"UseThreeDTop": true,
"UseThreeDBottom": false
},
"SmashedBlocks": [
{
"Type": "SinkOutterCorner",
"Rotation": "R0",
"SideSync": "2dTop;False;False;2dLeft;3dTop;3dBottom",
"StartPosition": "0, 0, 0",
"ExpandParam": "0, 0"
},
{
"Type": "SinkOutterCorner",
"Rotation": "R90",
"SideSync": "2dLeft;False;False;2dBottom;3dTop;3dBottom",
"StartPosition": "(2.5*1), 0, 0",
"ExpandParam": "0, 0"
},
{
"Type": "SinkOutterCorner",
"Rotation": "R180",
"SideSync": "2dBottom;False;False;2dRight;3dTop;3dBottom",
"StartPosition": "(2.5*1), (2.5*1), 0",
"ExpandParam": "0, 0"
},
{
"Type": "SinkOutterCorner",
"Rotation": "R270",
"SideSync": "2dRight;False;False;2dTop;3dTop;3dBottom",
"StartPosition": "0, (2.5*1), 0",
"ExpandParam": "0, 0"
}
]
},
{
"Type": "SinkPlatform",
"BindingDisplayTexture": "SinkPlatform.png",
"UnitSize": "Small",
"ExpandType": "Freedom",
"InitColumnDirection": "PositiveY",
"DefaultSideConfig": {
"UseTwoDTop": true,
"UseTwoDRight": true,
"UseTwoDBottom": true,
"UseTwoDLeft": true,
"UseThreeDTop": true,
"UseThreeDBottom": false
},
"SmashedBlocks": [
{
"Type": "Flat",
"Rotation": "R0",
"SideSync": "False;False;False;False;3dTop;3dBottom",
"StartPosition": "(2.5*1), (2.5*1), -0.7",
"ExpandParam": "d1, d2"
},
{
"Type": "SinkBorder",
"Rotation": "R0",
"SideSync": "False;False;False;2dLeft;3dTop;3dBottom",
"StartPosition": "(2.5*1), 0, 0",
"ExpandParam": "d2, 0"
},
{
"Type": "SinkBorder",
"Rotation": "R90",
"SideSync": "False;False;False;2dBottom;3dTop;3dBottom",
"StartPosition": "(2.5*2) +d2, (2.5*1), 0",
"ExpandParam": "d1, 0"
},
{
"Type": "SinkBorder",
"Rotation": "R180",
"SideSync": "False;False;False;2dRight;3dTop;3dBottom",
"StartPosition": "(2.5*1) +d2, (2.5*2) +d1, 0",
"ExpandParam": "d2, 0"
},
{
"Type": "SinkBorder",
"Rotation": "R270",
"SideSync": "False;False;False;2dTop;3dTop;3dBottom",
"StartPosition": "0, (2.5*1) +d1, 0",
"ExpandParam": "d1, 0"
},
{
"Type": "SinkOutterCorner",
"Rotation": "R0",
"SideSync": "2dTop;False;False;2dLeft;3dTop;3dBottom",
"StartPosition": "0, 0, 0",
"ExpandParam": "0, 0"
},
{
"Type": "SinkOutterCorner",
"Rotation": "R90",
"SideSync": "2dLeft;False;False;2dBottom;3dTop;3dBottom",
"StartPosition": "(2.5*2) +d2, 0, 0",
"ExpandParam": "0, 0"
},
{
"Type": "SinkOutterCorner",
"Rotation": "R180",
"SideSync": "2dBottom;False;False;2dRight;3dTop;3dBottom",
"StartPosition": "(2.5*2) +d2, (2.5*2) +d1, 0",
"ExpandParam": "0, 0"
},
{
"Type": "SinkOutterCorner",
"Rotation": "R270",
"SideSync": "2dRight;False;False;2dTop;3dTop;3dBottom",
"StartPosition": "0, (2.5*2) +d1, 0",
"ExpandParam": "0, 0"
}
]
},
{
"Type": "RibbonPlatform",
"BindingDisplayTexture": "RibbonPlatform.png",
"UnitSize": "Small",
"ExpandType": "Freedom",
"InitColumnDirection": "PositiveY",
"DefaultSideConfig": {
"UseTwoDTop": true,
"UseTwoDRight": true,
"UseTwoDBottom": true,
"UseTwoDLeft": true,
"UseThreeDTop": true,
"UseThreeDBottom": false
},
"SmashedBlocks": [
{
"Type": "Flat",
"Rotation": "R0",
"SideSync": "False;False;False;False;3dTop;3dBottom",
"StartPosition": "(2.5*1), (2.5*1), -0.7",
"ExpandParam": "d1, d2"
},
{
"Type": "RibbonBorder",
"Rotation": "R0",
"SideSync": "False;False;False;2dLeft;3dTop;3dBottom",
"StartPosition": "(2.5*1), 0, 0",
"ExpandParam": "d2, 0"
},
{
"Type": "RibbonBorder",
"Rotation": "R90",
"SideSync": "False;False;False;2dBottom;3dTop;3dBottom",
"StartPosition": "(2.5*2) +d2, (2.5*1), 0",
"ExpandParam": "d1, 0"
},
{
"Type": "RibbonBorder",
"Rotation": "R180",
"SideSync": "False;False;False;2dRight;3dTop;3dBottom",
"StartPosition": "(2.5*1) +d2, (2.5*2) +d1, 0",
"ExpandParam": "d2, 0"
},
{
"Type": "RibbonBorder",
"Rotation": "R270",
"SideSync": "False;False;False;2dTop;3dTop;3dBottom",
"StartPosition": "0, (2.5*1) +d1, 0",
"ExpandParam": "d1, 0"
},
{
"Type": "RibbonOutterCorner",
"Rotation": "R0",
"SideSync": "2dTop;False;False;2dLeft;3dTop;3dBottom",
"StartPosition": "0, 0, 0",
"ExpandParam": "0, 0"
},
{
"Type": "RibbonOutterCorner",
"Rotation": "R90",
"SideSync": "2dLeft;False;False;2dBottom;3dTop;3dBottom",
"StartPosition": "(2.5*2) +d2, 0, 0",
"ExpandParam": "0, 0"
},
{
"Type": "RibbonOutterCorner",
"Rotation": "R180",
"SideSync": "2dBottom;False;False;2dRight;3dTop;3dBottom",
"StartPosition": "(2.5*2) +d2, (2.5*2) +d1, 0",
"ExpandParam": "0, 0"
},
{
"Type": "RibbonOutterCorner",
"Rotation": "R270",
"SideSync": "2dRight;False;False;2dTop;3dTop;3dBottom",
"StartPosition": "0, (2.5*2) +d1, 0",
"ExpandParam": "0, 0"
}
]
},
{
"Type": "SinkLConnector",
"BindingDisplayTexture": "SinkLConnector.png",
"UnitSize": "Small",
"ExpandType": "Static",
"InitColumnDirection": "PositiveX",
"DefaultSideConfig": {
"UseTwoDTop": true,
"UseTwoDRight": false,
"UseTwoDBottom": false,
"UseTwoDLeft": true,
"UseThreeDTop": true,
"UseThreeDBottom": false
},
"SmashedBlocks": [
{
"Type": "SinkOutterCorner",
"Rotation": "R0",
"SideSync": "2dTop;False;False;2dLeft;3dTop;3dBottom",
"StartPosition": "0, 0, 0",
"ExpandParam": "0, 0"
},
{
"Type": "SinkBorder",
"Rotation": "R0",
"SideSync": "False;False;2dBottom;2dLeft;3dTop;3dBottom",
"StartPosition": "(2.5*1), 0, 0",
"ExpandParam": "0, 0"
},
{
"Type": "SinkInnerCorner",
"Rotation": "R0",
"SideSync": "False;2dRight;2dBottom;False;3dTop;3dBottom",
"StartPosition": "(2.5*1), (2.5*1), 0",
"ExpandParam": "0, 0"
},
{
"Type": "SinkBorder",
"Rotation": "R270",
"SideSync": "2dRight;False;False;2dTop;3dTop;3dBottom",
"StartPosition": "0, (2.5*1), 0",
"ExpandParam": "0, 0"
}
]
},
{
"Type": "SinkTConnector",
"BindingDisplayTexture": "SinkTConnector.png",
"UnitSize": "Small",
"ExpandType": "Static",
"InitColumnDirection": "PositiveX",
"DefaultSideConfig": {
"UseTwoDTop": true,
"UseTwoDRight": false,
"UseTwoDBottom": false,
"UseTwoDLeft": false,
"UseThreeDTop": true,
"UseThreeDBottom": false
},
"SmashedBlocks": [
{
"Type": "SinkInnerCorner",
"Rotation": "R270",
"SideSync": "False;2dBottom;2dLeft;False;3dTop;3dBottom",
"StartPosition": "(2.5*1), 0, 0",
"ExpandParam": "0, 0"
},
{
"Type": "SinkInnerCorner",
"Rotation": "R0",
"SideSync": "False;2dRight;2dBottom;False;3dTop;3dBottom",
"StartPosition": "(2.5*1), (2.5*1), 0",
"ExpandParam": "0, 0"
},
{
"Type": "SinkBorder",
"Rotation": "R270",
"SideSync": "2dRight;False;2dLeft;2dTop;3dTop;3dBottom",
"StartPosition": "0, (2.5*1), 0",
"ExpandParam": "1, 0"
}
]
},
{
"Type": "SinkCrossroad",
"BindingDisplayTexture": "SinkCrossroad.png",
"UnitSize": "Small",
"ExpandType": "Static",
"InitColumnDirection": "PositiveX",
"DefaultSideConfig": {
"UseTwoDTop": false,
"UseTwoDRight": false,
"UseTwoDBottom": false,
"UseTwoDLeft": false,
"UseThreeDTop": true,
"UseThreeDBottom": false
},
"SmashedBlocks": [
{
"Type": "SinkInnerCorner",
"Rotation": "R0",
"SideSync": "False;2dRight;2dBottom;False;3dTop;3dBottom",
"StartPosition": "(2.5*1), (2.5*1), 0",
"ExpandParam": "0, 0"
},
{
"Type": "SinkInnerCorner",
"Rotation": "R90",
"SideSync": "False;2dTop;2dRight;False;3dTop;3dBottom",
"StartPosition": "0, (2.5*1), 0",
"ExpandParam": "0, 0"
},
{
"Type": "SinkInnerCorner",
"Rotation": "R180",
"SideSync": "False;2dLeft;2dTop;False;3dTop;3dBottom",
"StartPosition": "0, 0, 0",
"ExpandParam": "0, 0"
},
{
"Type": "SinkInnerCorner",
"Rotation": "R270",
"SideSync": "False;2dBottom;2dLeft;False;3dTop;3dBottom",
"StartPosition": "(2.5*1), 0, 0",
"ExpandParam": "0, 0"
}
]
}
]

View File

@ -0,0 +1,262 @@
[
{
"Type": "WideFloor",
"BindingDisplayTexture": "WideFloor.png",
"UnitSize": "Small",
"ExpandType": "Freedom",
"InitColumnDirection": "PositiveY",
"DefaultSideConfig": {
"UseTwoDTop": false,
"UseTwoDRight": true,
"UseTwoDBottom": false,
"UseTwoDLeft": true,
"UseThreeDTop": true,
"UseThreeDBottom": false
},
"SmashedBlocks": [
{
"Type": "SinkBorder",
"Rotation": "R0",
"SideSync": "2dTop;False;2dBottom;2dLeft;3dTop;3dBottom",
"StartPosition": "0, 0, 0",
"ExpandParam": "d2, 0"
},
{
"Type": "SinkBorder",
"Rotation": "R180",
"SideSync": "2dBottom;False;2dTop;2dRight;3dTop;3dBottom",
"StartPosition": "d2, (2.5*2)+d1, 0",
"ExpandParam": "d2, 0"
},
{
"Type": "Flat",
"Rotation": "R0",
"SideSync": "2dTop;False;2dBottom;False;3dTop;3dBottom",
"StartPosition": "0, (2.5*1), -0.7",
"ExpandParam": "d1, d2"
}
]
},
{
"Type": "WideFloorTerminal",
"BindingDisplayTexture": "WideFloorTerminal.png",
"UnitSize": "Small",
"ExpandType": "Column",
"InitColumnDirection": "PositiveY",
"DefaultSideConfig": {
"UseTwoDTop": true,
"UseTwoDRight": true,
"UseTwoDBottom": false,
"UseTwoDLeft": true,
"UseThreeDTop": true,
"UseThreeDBottom": false
},
"SmashedBlocks": [
{
"Type": "SinkOutterCorner",
"Rotation": "R0",
"SideSync": "2dTop;False;2dBottom;2dLeft;3dTop;3dBottom",
"StartPosition": "0, 0, 0",
"ExpandParam": "0, 0"
},
{
"Type": "SinkOutterCorner",
"Rotation": "R270",
"SideSync": "2dRight;2dBottom;False;2dTop;3dTop;3dBottom",
"StartPosition": "0, (2.5*2)+d1, 0",
"ExpandParam": "0, 0"
},
{
"Type": "SinkBorder",
"Rotation": "R270",
"SideSync": "False;2dBottom;False;2dTop;3dTop;3dBottom",
"StartPosition": "0, (2.5*1) +d1, 0",
"ExpandParam": "d1, 0"
}
]
},
{
"Type": "WideLConnector",
"BindingDisplayTexture": "WideLConnector.png",
"UnitSize": "Small",
"ExpandType": "Column",
"InitColumnDirection": "PositiveY",
"DefaultSideConfig": {
"UseTwoDTop": true,
"UseTwoDRight": false,
"UseTwoDBottom": false,
"UseTwoDLeft": true,
"UseThreeDTop": true,
"UseThreeDBottom": false
},
"SmashedBlocks": [
{
"Type": "SinkOutterCorner",
"Rotation": "R0",
"SideSync": "2dTop;False;False;2dLeft;3dTop;3dBottom",
"StartPosition": "0, 0, 0",
"ExpandParam": "0, 0"
},
{
"Type": "SinkBorder",
"Rotation": "R0",
"SideSync": "False;False;2dBottom;2dLeft;3dTop;3dBottom",
"StartPosition": "(2.5*1), 0, 0",
"ExpandParam": "d1 + 1, 0"
},
{
"Type": "SinkInnerCorner",
"Rotation": "R0",
"SideSync": "False;2dRight;2dBottom;False;3dTop;3dBottom",
"StartPosition": "(2.5*2) + d1, (2.5*2) + d1, 0",
"ExpandParam": "0, 0"
},
{
"Type": "SinkBorder",
"Rotation": "R270",
"SideSync": "2dRight;False;False;2dTop;3dTop;3dBottom",
"StartPosition": "0, (2.5*2)+d1, 0",
"ExpandParam": "d1 + 1, 0"
},
{
"Type": "Flat",
"Rotation": "R0",
"SideSync": "False;False;2dBottom;False;3dTop;3dBottom",
"StartPosition": "2.5, 2.5, -0.7",
"ExpandParam": "d1, d1 + 1"
},
{
"Type": "Flat",
"Rotation": "R0",
"SideSync": "False;2dRight;False;False;3dTop;3dBottom",
"StartPosition": "2.5, (2.5 * 2) + d1, -0.7",
"ExpandParam": "0, d1"
}
]
},
{
"Type": "WideTConnector",
"BindingDisplayTexture": "WideTConnector.png",
"UnitSize": "Small",
"ExpandType": "Column",
"InitColumnDirection": "PositiveY",
"DefaultSideConfig": {
"UseTwoDTop": true,
"UseTwoDRight": false,
"UseTwoDBottom": false,
"UseTwoDLeft": false,
"UseThreeDTop": true,
"UseThreeDBottom": false
},
"SmashedBlocks": [
{
"Type": "SinkInnerCorner",
"Rotation": "R270",
"SideSync": "False;2dBottom;2dLeft;False;3dTop;3dBottom",
"StartPosition": "(2.5*2) + d1, 0, 0",
"ExpandParam": "0, 0"
},
{
"Type": "SinkInnerCorner",
"Rotation": "R0",
"SideSync": "False;2dRight;2dBottom;False;3dTop;3dBottom",
"StartPosition": "(2.5*2) + d1, (2.5*2) + d1, 0",
"ExpandParam": "0, 0"
},
{
"Type": "SinkBorder",
"Rotation": "R270",
"SideSync": "2dRight;False;2dLeft;2dTop;3dTop;3dBottom",
"StartPosition": "0, (2.5*2) + d1, 0",
"ExpandParam": "d1 + 2, 0"
},
{
"Type": "Flat",
"Rotation": "R0",
"SideSync": "False;False;2dBottom;False;3dTop;3dBottom",
"StartPosition": "2.5, 2.5, -0.7",
"ExpandParam": "d1, d1+1"
},
{
"Type": "Flat",
"Rotation": "R0",
"SideSync": "False;False;False;2dLeft;3dTop;3dBottom",
"StartPosition": "2.5, 0, -0.7",
"ExpandParam": "0, d1"
},
{
"Type": "Flat",
"Rotation": "R0",
"SideSync": "False;2dRight;False;False;3dTop;3dBottom",
"StartPosition": "2.5, (2.5*2)+d1, -0.7",
"ExpandParam": "0, d1"
}
]
},
{
"Type": "WideCrossroad",
"BindingDisplayTexture": "WideCrossroad.png",
"UnitSize": "Small",
"ExpandType": "Column",
"InitColumnDirection": "PositiveY",
"DefaultSideConfig": {
"UseTwoDTop": false,
"UseTwoDRight": false,
"UseTwoDBottom": false,
"UseTwoDLeft": false,
"UseThreeDTop": true,
"UseThreeDBottom": false
},
"SmashedBlocks": [
{
"Type": "SinkInnerCorner",
"Rotation": "R0",
"SideSync": "False;2dRight;2dBottom;False;3dTop;3dBottom",
"StartPosition": "(2.5*2)+d1, (2.5*2)+d1, 0",
"ExpandParam": "0, 0"
},
{
"Type": "SinkInnerCorner",
"Rotation": "R90",
"SideSync": "False;2dTop;2dRight;False;3dTop;3dBottom",
"StartPosition": "0, (2.5*2)+d1, 0",
"ExpandParam": "0, 0"
},
{
"Type": "SinkInnerCorner",
"Rotation": "R180",
"SideSync": "False;2dLeft;2dTop;False;3dTop;3dBottom",
"StartPosition": "0, 0, 0",
"ExpandParam": "0, 0"
},
{
"Type": "SinkInnerCorner",
"Rotation": "R270",
"SideSync": "False;2dBottom;2dLeft;False;3dTop;3dBottom",
"StartPosition": "(2.5*2)+d1, 0, 0",
"ExpandParam": "0, 0"
},
{
"Type": "Flat",
"Rotation": "R0",
"SideSync": "2dTop;False;2dBottom;False;3dTop;3dBottom",
"StartPosition": "0, 2.5, -0.7",
"ExpandParam": "d1, d1+2"
},
{
"Type": "Flat",
"Rotation": "R0",
"SideSync": "False;False;False;2dLeft;3dTop;3dBottom",
"StartPosition": "2.5, 0, -0.7",
"ExpandParam": "0, d1"
},
{
"Type": "Flat",
"Rotation": "R0",
"SideSync": "False;2dRight;False;False;3dTop;3dBottom",
"StartPosition": "2.5, (2.5*2)+d1, -0.7",
"ExpandParam": "0, d1"
}
]
}
]