From 9917db0399487b8eec95742b94188d41f54903a6 Mon Sep 17 00:00:00 2001 From: yyc12345 Date: Mon, 9 Feb 2026 16:38:53 +0800 Subject: [PATCH] feat: finish fixing for pybmap --- .../BMapSharp/BMapSharp/BMapSharp.csproj | 2 +- Assets/BMapBindings/README.md | 7 + Assets/BMapBindings/pybmap/pyproject.toml | 2 +- Assets/BMapBindings/pybmap/src/pybmap/bmap.py | 2768 ++++++++++++----- .../pybmap/src/pybmap/bmap_wrapper.py | 211 +- .../pybmap/src/pybmap/virtools_types.py | 315 +- Assets/BMapBindings/pybmap/tests/main.py | 6 +- Assets/BMapBindings/pybmap/uv.lock | 2 +- .../ExpFctsRender/templates/expfcts.py.jinja | 9 +- 9 files changed, 2304 insertions(+), 1018 deletions(-) create mode 100644 Assets/BMapBindings/README.md diff --git a/Assets/BMapBindings/BMapSharp/BMapSharp/BMapSharp.csproj b/Assets/BMapBindings/BMapSharp/BMapSharp/BMapSharp.csproj index c4b1513..65f20fe 100644 --- a/Assets/BMapBindings/BMapSharp/BMapSharp/BMapSharp.csproj +++ b/Assets/BMapBindings/BMapSharp/BMapSharp/BMapSharp.csproj @@ -10,7 +10,7 @@ yyc12345 The C# binding to BMap. BearKidsTeam - SPDX:MIT + MIT diff --git a/Assets/BMapBindings/README.md b/Assets/BMapBindings/README.md new file mode 100644 index 0000000..ff96b07 --- /dev/null +++ b/Assets/BMapBindings/README.md @@ -0,0 +1,7 @@ +# BMap Bindings + +## Test + +* `BMAP_FILE_NAME`: The path to the map for loading. +* `BMAP_BALLANCE_DIR`:The path to the Ballance directory for finding textures +* `BMAP_ENCODINGS`: The name of encodings used by BMap for loading map. Multiple encodings is supported by separating them with commas, for example: `cp1252,gbk`. diff --git a/Assets/BMapBindings/pybmap/pyproject.toml b/Assets/BMapBindings/pybmap/pyproject.toml index a4bafc2..1b2b5e8 100644 --- a/Assets/BMapBindings/pybmap/pyproject.toml +++ b/Assets/BMapBindings/pybmap/pyproject.toml @@ -3,7 +3,7 @@ name = "pybmap" version = "0.4.0" description = "The Python binding to BMap." readme = "README.md" -license = "SPDX:MIT" +license = "MIT" authors = [{ name = "yyc12345" }] classifiers = ["Private :: Do Not Upload"] requires-python = ">=3.11" diff --git a/Assets/BMapBindings/pybmap/src/pybmap/bmap.py b/Assets/BMapBindings/pybmap/src/pybmap/bmap.py index f0a7fb0..d19968d 100644 --- a/Assets/BMapBindings/pybmap/src/pybmap/bmap.py +++ b/Assets/BMapBindings/pybmap/src/pybmap/bmap.py @@ -1,4 +1,7 @@ -import ctypes, os, sys, typing +import ctypes +import sys +import typing +import pathlib #region Type Defines @@ -67,41 +70,49 @@ bm_VxMatrix_p = ctypes.POINTER(bm_VxMatrix) #region BMap Loader -_g_BMapLibName: str +# Decide the name of DLL +_BMAP_DLL_NAME: str if sys.platform.startswith('win32') or sys.platform.startswith('cygwin'): - _g_BMapLibName = "BMap.dll" + _BMAP_DLL_NAME = "BMap.dll" elif sys.platform.startswith('linux') or sys.platform.startswith('freebsd'): - _g_BMapLibName = "BMap.so" + _BMAP_DLL_NAME = "BMap.so" elif sys.platform.startswith('darwin'): - _g_BMapLibName = "BMap.dylib" + _BMAP_DLL_NAME = "BMap.dylib" else: - _g_BMapLibName = "BMap.bin" + _BMAP_DLL_NAME = "BMap.bin" -_g_BMapLibPath: str = os.path.join(os.path.dirname(__file__), _g_BMapLibName) +# Build the path to DLL +_BMAP_DLL_PATH: pathlib.Path = pathlib.Path(__file__).resolve().parent / _BMAP_DLL_NAME + +# Load DLL into Python +_BMAP_MODULE: ctypes.CDLL | None = None -_g_BMapModule: ctypes.CDLL | None = None try: - _g_BMapModule = ctypes.cdll.LoadLibrary(_g_BMapLibPath) + _BMAP_MODULE = ctypes.cdll.LoadLibrary(str(_BMAP_DLL_PATH)) except: - print(f'Fail to load native BMap dynamic library file "{_g_BMapLibPath}".') - _g_BMapModule = None + print(f'Fail to load native BMap dynamic library file "{_BMAP_DLL_PATH}".') + _BMAP_MODULE = None def is_bmap_available() -> bool: - return _g_BMapModule is not None + return _BMAP_MODULE is not None -def _bmap_error_check(result: bool, func, args): +def _bmap_error_checker(result: bool, func, args) -> bool: if not result: raise BMapException("BMap operation failed.") return result -def _create_bmap_func(fct_name: str, fct_params: list[typing.Any]) -> typing.Callable[..., bm_bool]: - if _g_BMapModule is None: return None +Ts = typing.TypeVarTuple('Ts') + +def _create_bmap_func(fct_name: str, fct_params: tuple[*Ts]) -> typing.Callable[[typing.Unpack[Ts]], bm_bool]: + if _BMAP_MODULE is None: + raise BMapException(f'Fail to load native BMap dynamic library file "{_BMAP_DLL_PATH}".') - cache: typing.Callable[..., bm_bool] = getattr(_g_BMapModule, fct_name) + # Reference: https://docs.python.org/3.11/library/ctypes.html#foreign-functions + cache: typing.Any = getattr(_BMAP_MODULE, fct_name) cache.argtypes = fct_params cache.restype = bm_bool - cache.errcheck = _bmap_error_check + cache.errcheck = _bmap_error_checker return cache #endregion @@ -110,803 +121,1932 @@ def _create_bmap_func(fct_name: str, fct_params: list[typing.Any]) -> typing.Cal ##### GENERATED FUNCTIONS BEGIN ##### -## 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 raw_callback[in] Type: BMap::NakedOutputCallback. -# @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_callback, 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 raw_callback[in] Type: BMap::NakedOutputCallback. -# @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_callback, 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 texture_save_opt[in] Type: LibCmo::CK2::CK_TEXTURE_SAVEOPTIONS. -# @param use_compress[in] Type: bool. -# @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_enum, bm_bool, 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]) -## BMFile_GetTargetLightCount -# @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_GetTargetLightCount = _create_bmap_func('BMFile_GetTargetLightCount', [bm_void_p, bm_CKDWORD_p]) -## BMFile_GetTargetLight -# @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_GetTargetLight = _create_bmap_func('BMFile_GetTargetLight', [bm_void_p, bm_CKDWORD, bm_CKID_p]) -## BMFile_CreateTargetLight -# @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_CreateTargetLight = _create_bmap_func('BMFile_CreateTargetLight', [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_VxVector3_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_VxVector3_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_GetLitMode -# @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_mode[out] Type: LibCmo::VxMath::VXMESH_LITMODE. Use ctypes.byref(data) pass it. -# @return True if no error, otherwise False. -BMMesh_GetLitMode = _create_bmap_func('BMMesh_GetLitMode', [bm_void_p, bm_CKID, bm_enum_p]) -## BMMesh_SetLitMode -# @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 mode[in] Type: LibCmo::VxMath::VXMESH_LITMODE. -# @return True if no error, otherwise False. -BMMesh_SetLitMode = _create_bmap_func('BMMesh_SetLitMode', [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_VxVector3_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_VxVector3_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]) -## BM3dEntity_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. -BM3dEntity_GetWorldMatrix = _create_bmap_func('BM3dEntity_GetWorldMatrix', [bm_void_p, bm_CKID, bm_VxMatrix_p]) -## BM3dEntity_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. -BM3dEntity_SetWorldMatrix = _create_bmap_func('BM3dEntity_SetWorldMatrix', [bm_void_p, bm_CKID, bm_VxMatrix]) -## BM3dEntity_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. -BM3dEntity_GetCurrentMesh = _create_bmap_func('BM3dEntity_GetCurrentMesh', [bm_void_p, bm_CKID, bm_CKID_p]) -## BM3dEntity_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. -BM3dEntity_SetCurrentMesh = _create_bmap_func('BM3dEntity_SetCurrentMesh', [bm_void_p, bm_CKID, bm_CKID]) -## BM3dEntity_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. -BM3dEntity_GetVisibility = _create_bmap_func('BM3dEntity_GetVisibility', [bm_void_p, bm_CKID, bm_bool_p]) -## BM3dEntity_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. -BM3dEntity_SetVisibility = _create_bmap_func('BM3dEntity_SetVisibility', [bm_void_p, bm_CKID, bm_bool]) -## BMLight_GetType -# @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::VXLIGHT_TYPE. Use ctypes.byref(data) pass it. -# @return True if no error, otherwise False. -BMLight_GetType = _create_bmap_func('BMLight_GetType', [bm_void_p, bm_CKID, bm_enum_p]) -## BMLight_SetType -# @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::VXLIGHT_TYPE. -# @return True if no error, otherwise False. -BMLight_SetType = _create_bmap_func('BMLight_SetType', [bm_void_p, bm_CKID, bm_enum]) -## BMLight_GetColor -# @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. -BMLight_GetColor = _create_bmap_func('BMLight_GetColor', [bm_void_p, bm_CKID, bm_VxColor_p]) -## BMLight_SetColor -# @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. -BMLight_SetColor = _create_bmap_func('BMLight_SetColor', [bm_void_p, bm_CKID, bm_VxColor]) -## BMLight_GetConstantAttenuation -# @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. -BMLight_GetConstantAttenuation = _create_bmap_func('BMLight_GetConstantAttenuation', [bm_void_p, bm_CKID, bm_CKFLOAT_p]) -## BMLight_SetConstantAttenuation -# @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. -BMLight_SetConstantAttenuation = _create_bmap_func('BMLight_SetConstantAttenuation', [bm_void_p, bm_CKID, bm_CKFLOAT]) -## BMLight_GetLinearAttenuation -# @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. -BMLight_GetLinearAttenuation = _create_bmap_func('BMLight_GetLinearAttenuation', [bm_void_p, bm_CKID, bm_CKFLOAT_p]) -## BMLight_SetLinearAttenuation -# @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. -BMLight_SetLinearAttenuation = _create_bmap_func('BMLight_SetLinearAttenuation', [bm_void_p, bm_CKID, bm_CKFLOAT]) -## BMLight_GetQuadraticAttenuation -# @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. -BMLight_GetQuadraticAttenuation = _create_bmap_func('BMLight_GetQuadraticAttenuation', [bm_void_p, bm_CKID, bm_CKFLOAT_p]) -## BMLight_SetQuadraticAttenuation -# @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. -BMLight_SetQuadraticAttenuation = _create_bmap_func('BMLight_SetQuadraticAttenuation', [bm_void_p, bm_CKID, bm_CKFLOAT]) -## BMLight_GetRange -# @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. -BMLight_GetRange = _create_bmap_func('BMLight_GetRange', [bm_void_p, bm_CKID, bm_CKFLOAT_p]) -## BMLight_SetRange -# @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. -BMLight_SetRange = _create_bmap_func('BMLight_SetRange', [bm_void_p, bm_CKID, bm_CKFLOAT]) -## BMLight_GetHotSpot -# @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. -BMLight_GetHotSpot = _create_bmap_func('BMLight_GetHotSpot', [bm_void_p, bm_CKID, bm_CKFLOAT_p]) -## BMLight_SetHotSpot -# @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. -BMLight_SetHotSpot = _create_bmap_func('BMLight_SetHotSpot', [bm_void_p, bm_CKID, bm_CKFLOAT]) -## BMLight_GetFalloff -# @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. -BMLight_GetFalloff = _create_bmap_func('BMLight_GetFalloff', [bm_void_p, bm_CKID, bm_CKFLOAT_p]) -## BMLight_SetFalloff -# @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. -BMLight_SetFalloff = _create_bmap_func('BMLight_SetFalloff', [bm_void_p, bm_CKID, bm_CKFLOAT]) -## BMLight_GetFalloffShape -# @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. -BMLight_GetFalloffShape = _create_bmap_func('BMLight_GetFalloffShape', [bm_void_p, bm_CKID, bm_CKFLOAT_p]) -## BMLight_SetFalloffShape -# @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. -BMLight_SetFalloffShape = _create_bmap_func('BMLight_SetFalloffShape', [bm_void_p, bm_CKID, bm_CKFLOAT]) +BMInit = _create_bmap_func('BMInit', ()) +""" +BMInit + +:return: True if no error, otherwise False. +:rtype: bool +""" +BMDispose = _create_bmap_func('BMDispose', ()) +""" +BMDispose + +:return: True if no error, otherwise False. +:rtype: bool +""" +BMFile_Load = _create_bmap_func('BMFile_Load', (bm_CKSTRING, bm_CKSTRING, bm_CKSTRING, bm_callback, bm_CKDWORD, bm_CKSTRING_p, bm_void_pp, )) +""" +BMFile_Load + +:param file_name: Direction: input. +:type file_name: bm_CKSTRING (LibCmo::CKSTRING in C++). +:param temp_folder: Direction: input. +:type temp_folder: bm_CKSTRING (LibCmo::CKSTRING in C++). +:param texture_folder: Direction: input. +:type texture_folder: bm_CKSTRING (LibCmo::CKSTRING in C++). +:param raw_callback: Direction: input. +:type raw_callback: bm_callback (BMap::NakedOutputCallback in C++). +:param encoding_count: Direction: input. +:type encoding_count: bm_CKDWORD (LibCmo::CKDWORD in C++). +:param encodings: Direction: input. +:type encodings: bm_CKSTRING_p (LibCmo::CKSTRING* in C++). +:param out_file: Direction: output. +:type out_file: bm_void_pp (BMap::BMFile* in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMFile_Create = _create_bmap_func('BMFile_Create', (bm_CKSTRING, bm_CKSTRING, bm_callback, bm_CKDWORD, bm_CKSTRING_p, bm_void_pp, )) +""" +BMFile_Create + +:param temp_folder: Direction: input. +:type temp_folder: bm_CKSTRING (LibCmo::CKSTRING in C++). +:param texture_folder: Direction: input. +:type texture_folder: bm_CKSTRING (LibCmo::CKSTRING in C++). +:param raw_callback: Direction: input. +:type raw_callback: bm_callback (BMap::NakedOutputCallback in C++). +:param encoding_count: Direction: input. +:type encoding_count: bm_CKDWORD (LibCmo::CKDWORD in C++). +:param encodings: Direction: input. +:type encodings: bm_CKSTRING_p (LibCmo::CKSTRING* in C++). +:param out_file: Direction: output. +:type out_file: bm_void_pp (BMap::BMFile* in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMFile_Save = _create_bmap_func('BMFile_Save', (bm_void_p, bm_CKSTRING, bm_enum, bm_bool, bm_CKINT, )) +""" +BMFile_Save + +:param map_file: Direction: input. +:type map_file: bm_void_p (BMap::BMFile* in C++). +:param file_name: Direction: input. +:type file_name: bm_CKSTRING (LibCmo::CKSTRING in C++). +:param texture_save_opt: Direction: input. +:type texture_save_opt: bm_enum (LibCmo::CK2::CK_TEXTURE_SAVEOPTIONS in C++). +:param use_compress: Direction: input. +:type use_compress: bm_bool (bool in C++). +:param compreess_level: Direction: input. +:type compreess_level: bm_CKINT (LibCmo::CKINT in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMFile_Free = _create_bmap_func('BMFile_Free', (bm_void_p, )) +""" +BMFile_Free + +:param map_file: Direction: input. +:type map_file: bm_void_p (BMap::BMFile* in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMFile_GetGroupCount = _create_bmap_func('BMFile_GetGroupCount', (bm_void_p, bm_CKDWORD_p, )) +""" +BMFile_GetGroupCount + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param out_count: Direction: output. +:type out_count: bm_CKDWORD_p (LibCmo::CKDWORD in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMFile_GetGroup = _create_bmap_func('BMFile_GetGroup', (bm_void_p, bm_CKDWORD, bm_CKID_p, )) +""" +BMFile_GetGroup + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param idx: Direction: input. +:type idx: bm_CKDWORD (LibCmo::CKDWORD in C++). +:param out_id: Direction: output. +:type out_id: bm_CKID_p (LibCmo::CK2::CK_ID in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMFile_CreateGroup = _create_bmap_func('BMFile_CreateGroup', (bm_void_p, bm_CKID_p, )) +""" +BMFile_CreateGroup + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param out_id: Direction: output. +:type out_id: bm_CKID_p (LibCmo::CK2::CK_ID in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMFile_Get3dObjectCount = _create_bmap_func('BMFile_Get3dObjectCount', (bm_void_p, bm_CKDWORD_p, )) +""" +BMFile_Get3dObjectCount + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param out_count: Direction: output. +:type out_count: bm_CKDWORD_p (LibCmo::CKDWORD in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMFile_Get3dObject = _create_bmap_func('BMFile_Get3dObject', (bm_void_p, bm_CKDWORD, bm_CKID_p, )) +""" +BMFile_Get3dObject + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param idx: Direction: input. +:type idx: bm_CKDWORD (LibCmo::CKDWORD in C++). +:param out_id: Direction: output. +:type out_id: bm_CKID_p (LibCmo::CK2::CK_ID in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMFile_Create3dObject = _create_bmap_func('BMFile_Create3dObject', (bm_void_p, bm_CKID_p, )) +""" +BMFile_Create3dObject + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param out_id: Direction: output. +:type out_id: bm_CKID_p (LibCmo::CK2::CK_ID in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMFile_GetMeshCount = _create_bmap_func('BMFile_GetMeshCount', (bm_void_p, bm_CKDWORD_p, )) +""" +BMFile_GetMeshCount + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param out_count: Direction: output. +:type out_count: bm_CKDWORD_p (LibCmo::CKDWORD in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMFile_GetMesh = _create_bmap_func('BMFile_GetMesh', (bm_void_p, bm_CKDWORD, bm_CKID_p, )) +""" +BMFile_GetMesh + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param idx: Direction: input. +:type idx: bm_CKDWORD (LibCmo::CKDWORD in C++). +:param out_id: Direction: output. +:type out_id: bm_CKID_p (LibCmo::CK2::CK_ID in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMFile_CreateMesh = _create_bmap_func('BMFile_CreateMesh', (bm_void_p, bm_CKID_p, )) +""" +BMFile_CreateMesh + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param out_id: Direction: output. +:type out_id: bm_CKID_p (LibCmo::CK2::CK_ID in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMFile_GetMaterialCount = _create_bmap_func('BMFile_GetMaterialCount', (bm_void_p, bm_CKDWORD_p, )) +""" +BMFile_GetMaterialCount + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param out_count: Direction: output. +:type out_count: bm_CKDWORD_p (LibCmo::CKDWORD in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMFile_GetMaterial = _create_bmap_func('BMFile_GetMaterial', (bm_void_p, bm_CKDWORD, bm_CKID_p, )) +""" +BMFile_GetMaterial + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param idx: Direction: input. +:type idx: bm_CKDWORD (LibCmo::CKDWORD in C++). +:param out_id: Direction: output. +:type out_id: bm_CKID_p (LibCmo::CK2::CK_ID in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMFile_CreateMaterial = _create_bmap_func('BMFile_CreateMaterial', (bm_void_p, bm_CKID_p, )) +""" +BMFile_CreateMaterial + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param out_id: Direction: output. +:type out_id: bm_CKID_p (LibCmo::CK2::CK_ID in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMFile_GetTextureCount = _create_bmap_func('BMFile_GetTextureCount', (bm_void_p, bm_CKDWORD_p, )) +""" +BMFile_GetTextureCount + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param out_count: Direction: output. +:type out_count: bm_CKDWORD_p (LibCmo::CKDWORD in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMFile_GetTexture = _create_bmap_func('BMFile_GetTexture', (bm_void_p, bm_CKDWORD, bm_CKID_p, )) +""" +BMFile_GetTexture + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param idx: Direction: input. +:type idx: bm_CKDWORD (LibCmo::CKDWORD in C++). +:param out_id: Direction: output. +:type out_id: bm_CKID_p (LibCmo::CK2::CK_ID in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMFile_CreateTexture = _create_bmap_func('BMFile_CreateTexture', (bm_void_p, bm_CKID_p, )) +""" +BMFile_CreateTexture + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param out_id: Direction: output. +:type out_id: bm_CKID_p (LibCmo::CK2::CK_ID in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMFile_GetTargetLightCount = _create_bmap_func('BMFile_GetTargetLightCount', (bm_void_p, bm_CKDWORD_p, )) +""" +BMFile_GetTargetLightCount + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param out_count: Direction: output. +:type out_count: bm_CKDWORD_p (LibCmo::CKDWORD in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMFile_GetTargetLight = _create_bmap_func('BMFile_GetTargetLight', (bm_void_p, bm_CKDWORD, bm_CKID_p, )) +""" +BMFile_GetTargetLight + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param idx: Direction: input. +:type idx: bm_CKDWORD (LibCmo::CKDWORD in C++). +:param out_id: Direction: output. +:type out_id: bm_CKID_p (LibCmo::CK2::CK_ID in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMFile_CreateTargetLight = _create_bmap_func('BMFile_CreateTargetLight', (bm_void_p, bm_CKID_p, )) +""" +BMFile_CreateTargetLight + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param out_id: Direction: output. +:type out_id: bm_CKID_p (LibCmo::CK2::CK_ID in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMFile_GetTargetCameraCount = _create_bmap_func('BMFile_GetTargetCameraCount', (bm_void_p, bm_CKDWORD_p, )) +""" +BMFile_GetTargetCameraCount + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param out_count: Direction: output. +:type out_count: bm_CKDWORD_p (LibCmo::CKDWORD in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMFile_GetTargetCamera = _create_bmap_func('BMFile_GetTargetCamera', (bm_void_p, bm_CKDWORD, bm_CKID_p, )) +""" +BMFile_GetTargetCamera + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param idx: Direction: input. +:type idx: bm_CKDWORD (LibCmo::CKDWORD in C++). +:param out_id: Direction: output. +:type out_id: bm_CKID_p (LibCmo::CK2::CK_ID in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMFile_CreateTargetCamera = _create_bmap_func('BMFile_CreateTargetCamera', (bm_void_p, bm_CKID_p, )) +""" +BMFile_CreateTargetCamera + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param out_id: Direction: output. +:type out_id: bm_CKID_p (LibCmo::CK2::CK_ID in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMeshTrans_New = _create_bmap_func('BMMeshTrans_New', (bm_void_pp, )) +""" +BMMeshTrans_New + +:param out_trans: Direction: output. +:type out_trans: bm_void_pp (BMap::BMMeshTransition* in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMeshTrans_Delete = _create_bmap_func('BMMeshTrans_Delete', (bm_void_p, )) +""" +BMMeshTrans_Delete + +:param trans: Direction: input. +:type trans: bm_void_p (BMap::BMMeshTransition* in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMeshTrans_PrepareVertexCount = _create_bmap_func('BMMeshTrans_PrepareVertexCount', (bm_void_p, bm_CKDWORD, )) +""" +BMMeshTrans_PrepareVertexCount + +:param trans: Direction: input. The pointer to corresponding BMMeshTransition. +:type trans: bm_void_p (BMap::BMMeshTransition* in C++). +:param count: Direction: input. +:type count: bm_CKDWORD (LibCmo::CKDWORD in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMeshTrans_PrepareVertex = _create_bmap_func('BMMeshTrans_PrepareVertex', (bm_void_p, bm_VxVector3_pp, )) +""" +BMMeshTrans_PrepareVertex + +:param trans: Direction: input. The pointer to corresponding BMMeshTransition. +:type trans: bm_void_p (BMap::BMMeshTransition* in C++). +:param out_mem: Direction: output. +:type out_mem: bm_VxVector3_pp (LibCmo::VxMath::VxVector3* in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMeshTrans_PrepareNormalCount = _create_bmap_func('BMMeshTrans_PrepareNormalCount', (bm_void_p, bm_CKDWORD, )) +""" +BMMeshTrans_PrepareNormalCount + +:param trans: Direction: input. The pointer to corresponding BMMeshTransition. +:type trans: bm_void_p (BMap::BMMeshTransition* in C++). +:param count: Direction: input. +:type count: bm_CKDWORD (LibCmo::CKDWORD in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMeshTrans_PrepareNormal = _create_bmap_func('BMMeshTrans_PrepareNormal', (bm_void_p, bm_VxVector3_pp, )) +""" +BMMeshTrans_PrepareNormal + +:param trans: Direction: input. The pointer to corresponding BMMeshTransition. +:type trans: bm_void_p (BMap::BMMeshTransition* in C++). +:param out_mem: Direction: output. +:type out_mem: bm_VxVector3_pp (LibCmo::VxMath::VxVector3* in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMeshTrans_PrepareUVCount = _create_bmap_func('BMMeshTrans_PrepareUVCount', (bm_void_p, bm_CKDWORD, )) +""" +BMMeshTrans_PrepareUVCount + +:param trans: Direction: input. The pointer to corresponding BMMeshTransition. +:type trans: bm_void_p (BMap::BMMeshTransition* in C++). +:param count: Direction: input. +:type count: bm_CKDWORD (LibCmo::CKDWORD in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMeshTrans_PrepareUV = _create_bmap_func('BMMeshTrans_PrepareUV', (bm_void_p, bm_VxVector2_pp, )) +""" +BMMeshTrans_PrepareUV + +:param trans: Direction: input. The pointer to corresponding BMMeshTransition. +:type trans: bm_void_p (BMap::BMMeshTransition* in C++). +:param out_mem: Direction: output. +:type out_mem: bm_VxVector2_pp (LibCmo::VxMath::VxVector2* in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMeshTrans_PrepareMtlSlotCount = _create_bmap_func('BMMeshTrans_PrepareMtlSlotCount', (bm_void_p, bm_CKDWORD, )) +""" +BMMeshTrans_PrepareMtlSlotCount + +:param trans: Direction: input. The pointer to corresponding BMMeshTransition. +:type trans: bm_void_p (BMap::BMMeshTransition* in C++). +:param count: Direction: input. +:type count: bm_CKDWORD (LibCmo::CKDWORD in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMeshTrans_PrepareMtlSlot = _create_bmap_func('BMMeshTrans_PrepareMtlSlot', (bm_void_p, bm_CKID_pp, )) +""" +BMMeshTrans_PrepareMtlSlot + +:param trans: Direction: input. The pointer to corresponding BMMeshTransition. +:type trans: bm_void_p (BMap::BMMeshTransition* in C++). +:param out_mem: Direction: output. +:type out_mem: bm_CKID_pp (LibCmo::CK2::CK_ID* in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMeshTrans_PrepareFaceCount = _create_bmap_func('BMMeshTrans_PrepareFaceCount', (bm_void_p, bm_CKDWORD, )) +""" +BMMeshTrans_PrepareFaceCount + +:param trans: Direction: input. The pointer to corresponding BMMeshTransition. +:type trans: bm_void_p (BMap::BMMeshTransition* in C++). +:param count: Direction: input. +:type count: bm_CKDWORD (LibCmo::CKDWORD in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMeshTrans_PrepareFaceVertexIndices = _create_bmap_func('BMMeshTrans_PrepareFaceVertexIndices', (bm_void_p, bm_CKDWORD_pp, )) +""" +BMMeshTrans_PrepareFaceVertexIndices + +:param trans: Direction: input. The pointer to corresponding BMMeshTransition. +:type trans: bm_void_p (BMap::BMMeshTransition* in C++). +:param out_mem: Direction: output. +:type out_mem: bm_CKDWORD_pp (LibCmo::CKDWORD* in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMeshTrans_PrepareFaceNormalIndices = _create_bmap_func('BMMeshTrans_PrepareFaceNormalIndices', (bm_void_p, bm_CKDWORD_pp, )) +""" +BMMeshTrans_PrepareFaceNormalIndices + +:param trans: Direction: input. The pointer to corresponding BMMeshTransition. +:type trans: bm_void_p (BMap::BMMeshTransition* in C++). +:param out_mem: Direction: output. +:type out_mem: bm_CKDWORD_pp (LibCmo::CKDWORD* in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMeshTrans_PrepareFaceUVIndices = _create_bmap_func('BMMeshTrans_PrepareFaceUVIndices', (bm_void_p, bm_CKDWORD_pp, )) +""" +BMMeshTrans_PrepareFaceUVIndices + +:param trans: Direction: input. The pointer to corresponding BMMeshTransition. +:type trans: bm_void_p (BMap::BMMeshTransition* in C++). +:param out_mem: Direction: output. +:type out_mem: bm_CKDWORD_pp (LibCmo::CKDWORD* in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMeshTrans_PrepareFaceMtlSlot = _create_bmap_func('BMMeshTrans_PrepareFaceMtlSlot', (bm_void_p, bm_CKDWORD_pp, )) +""" +BMMeshTrans_PrepareFaceMtlSlot + +:param trans: Direction: input. The pointer to corresponding BMMeshTransition. +:type trans: bm_void_p (BMap::BMMeshTransition* in C++). +:param out_mem: Direction: output. +:type out_mem: bm_CKDWORD_pp (LibCmo::CKDWORD* in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMeshTrans_Parse = _create_bmap_func('BMMeshTrans_Parse', (bm_void_p, bm_void_p, bm_CKID, )) +""" +BMMeshTrans_Parse + +:param trans: Direction: input. The pointer to corresponding BMMeshTransition. +:type trans: bm_void_p (BMap::BMMeshTransition* in C++). +:param bmfile: Direction: input. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMObject_GetName = _create_bmap_func('BMObject_GetName', (bm_void_p, bm_CKID, bm_CKSTRING_p, )) +""" +BMObject_GetName + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_name: Direction: output. +:type out_name: bm_CKSTRING_p (LibCmo::CKSTRING in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMObject_SetName = _create_bmap_func('BMObject_SetName', (bm_void_p, bm_CKID, bm_CKSTRING, )) +""" +BMObject_SetName + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param name: Direction: input. +:type name: bm_CKSTRING (LibCmo::CKSTRING in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMGroup_AddObject = _create_bmap_func('BMGroup_AddObject', (bm_void_p, bm_CKID, bm_CKID, )) +""" +BMGroup_AddObject + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param memberid: Direction: input. +:type memberid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMGroup_GetObjectCount = _create_bmap_func('BMGroup_GetObjectCount', (bm_void_p, bm_CKID, bm_CKDWORD_p, )) +""" +BMGroup_GetObjectCount + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_count: Direction: output. +:type out_count: bm_CKDWORD_p (LibCmo::CKDWORD in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMGroup_GetObject = _create_bmap_func('BMGroup_GetObject', (bm_void_p, bm_CKID, bm_CKDWORD, bm_CKID_p, )) +""" +BMGroup_GetObject + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param pos: Direction: input. +:type pos: bm_CKDWORD (LibCmo::CKDWORD in C++). +:param out_objid: Direction: output. +:type out_objid: bm_CKID_p (LibCmo::CK2::CK_ID in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMTexture_GetFileName = _create_bmap_func('BMTexture_GetFileName', (bm_void_p, bm_CKID, bm_CKSTRING_p, )) +""" +BMTexture_GetFileName + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_filename: Direction: output. +:type out_filename: bm_CKSTRING_p (LibCmo::CKSTRING in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMTexture_LoadImage = _create_bmap_func('BMTexture_LoadImage', (bm_void_p, bm_CKID, bm_CKSTRING, )) +""" +BMTexture_LoadImage + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param filename: Direction: input. +:type filename: bm_CKSTRING (LibCmo::CKSTRING in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMTexture_SaveImage = _create_bmap_func('BMTexture_SaveImage', (bm_void_p, bm_CKID, bm_CKSTRING, )) +""" +BMTexture_SaveImage + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param filename: Direction: input. +:type filename: bm_CKSTRING (LibCmo::CKSTRING in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMTexture_GetSaveOptions = _create_bmap_func('BMTexture_GetSaveOptions', (bm_void_p, bm_CKID, bm_enum_p, )) +""" +BMTexture_GetSaveOptions + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_saveopt: Direction: output. +:type out_saveopt: bm_enum_p (LibCmo::CK2::CK_TEXTURE_SAVEOPTIONS in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMTexture_SetSaveOptions = _create_bmap_func('BMTexture_SetSaveOptions', (bm_void_p, bm_CKID, bm_enum, )) +""" +BMTexture_SetSaveOptions + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param saveopt: Direction: input. +:type saveopt: bm_enum (LibCmo::CK2::CK_TEXTURE_SAVEOPTIONS in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMTexture_GetVideoFormat = _create_bmap_func('BMTexture_GetVideoFormat', (bm_void_p, bm_CKID, bm_enum_p, )) +""" +BMTexture_GetVideoFormat + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_vfmt: Direction: output. +:type out_vfmt: bm_enum_p (LibCmo::VxMath::VX_PIXELFORMAT in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMTexture_SetVideoFormat = _create_bmap_func('BMTexture_SetVideoFormat', (bm_void_p, bm_CKID, bm_enum, )) +""" +BMTexture_SetVideoFormat + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param vfmt: Direction: input. +:type vfmt: bm_enum (LibCmo::VxMath::VX_PIXELFORMAT in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_GetDiffuse = _create_bmap_func('BMMaterial_GetDiffuse', (bm_void_p, bm_CKID, bm_VxColor_p, )) +""" +BMMaterial_GetDiffuse + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_VxColor_p (LibCmo::VxMath::VxColor in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_SetDiffuse = _create_bmap_func('BMMaterial_SetDiffuse', (bm_void_p, bm_CKID, bm_VxColor, )) +""" +BMMaterial_SetDiffuse + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param col: Direction: input. +:type col: bm_VxColor (LibCmo::VxMath::VxColor in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_GetAmbient = _create_bmap_func('BMMaterial_GetAmbient', (bm_void_p, bm_CKID, bm_VxColor_p, )) +""" +BMMaterial_GetAmbient + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_VxColor_p (LibCmo::VxMath::VxColor in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_SetAmbient = _create_bmap_func('BMMaterial_SetAmbient', (bm_void_p, bm_CKID, bm_VxColor, )) +""" +BMMaterial_SetAmbient + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param col: Direction: input. +:type col: bm_VxColor (LibCmo::VxMath::VxColor in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_GetSpecular = _create_bmap_func('BMMaterial_GetSpecular', (bm_void_p, bm_CKID, bm_VxColor_p, )) +""" +BMMaterial_GetSpecular + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_VxColor_p (LibCmo::VxMath::VxColor in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_SetSpecular = _create_bmap_func('BMMaterial_SetSpecular', (bm_void_p, bm_CKID, bm_VxColor, )) +""" +BMMaterial_SetSpecular + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param col: Direction: input. +:type col: bm_VxColor (LibCmo::VxMath::VxColor in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_GetEmissive = _create_bmap_func('BMMaterial_GetEmissive', (bm_void_p, bm_CKID, bm_VxColor_p, )) +""" +BMMaterial_GetEmissive + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_VxColor_p (LibCmo::VxMath::VxColor in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_SetEmissive = _create_bmap_func('BMMaterial_SetEmissive', (bm_void_p, bm_CKID, bm_VxColor, )) +""" +BMMaterial_SetEmissive + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param col: Direction: input. +:type col: bm_VxColor (LibCmo::VxMath::VxColor in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_GetSpecularPower = _create_bmap_func('BMMaterial_GetSpecularPower', (bm_void_p, bm_CKID, bm_CKFLOAT_p, )) +""" +BMMaterial_GetSpecularPower + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_CKFLOAT_p (LibCmo::CKFLOAT in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_SetSpecularPower = _create_bmap_func('BMMaterial_SetSpecularPower', (bm_void_p, bm_CKID, bm_CKFLOAT, )) +""" +BMMaterial_SetSpecularPower + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param val: Direction: input. +:type val: bm_CKFLOAT (LibCmo::CKFLOAT in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_GetTexture = _create_bmap_func('BMMaterial_GetTexture', (bm_void_p, bm_CKID, bm_CKID_p, )) +""" +BMMaterial_GetTexture + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_texid: Direction: output. +:type out_texid: bm_CKID_p (LibCmo::CK2::CK_ID in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_SetTexture = _create_bmap_func('BMMaterial_SetTexture', (bm_void_p, bm_CKID, bm_CKID, )) +""" +BMMaterial_SetTexture + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param texid: Direction: input. +:type texid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_GetTextureBorderColor = _create_bmap_func('BMMaterial_GetTextureBorderColor', (bm_void_p, bm_CKID, bm_CKDWORD_p, )) +""" +BMMaterial_GetTextureBorderColor + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_CKDWORD_p (LibCmo::CKDWORD in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_SetTextureBorderColor = _create_bmap_func('BMMaterial_SetTextureBorderColor', (bm_void_p, bm_CKID, bm_CKDWORD, )) +""" +BMMaterial_SetTextureBorderColor + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param val: Direction: input. +:type val: bm_CKDWORD (LibCmo::CKDWORD in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_GetTextureBlendMode = _create_bmap_func('BMMaterial_GetTextureBlendMode', (bm_void_p, bm_CKID, bm_enum_p, )) +""" +BMMaterial_GetTextureBlendMode + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_enum_p (LibCmo::VxMath::VXTEXTURE_BLENDMODE in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_SetTextureBlendMode = _create_bmap_func('BMMaterial_SetTextureBlendMode', (bm_void_p, bm_CKID, bm_enum, )) +""" +BMMaterial_SetTextureBlendMode + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param val: Direction: input. +:type val: bm_enum (LibCmo::VxMath::VXTEXTURE_BLENDMODE in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_GetTextureMinMode = _create_bmap_func('BMMaterial_GetTextureMinMode', (bm_void_p, bm_CKID, bm_enum_p, )) +""" +BMMaterial_GetTextureMinMode + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_enum_p (LibCmo::VxMath::VXTEXTURE_FILTERMODE in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_SetTextureMinMode = _create_bmap_func('BMMaterial_SetTextureMinMode', (bm_void_p, bm_CKID, bm_enum, )) +""" +BMMaterial_SetTextureMinMode + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param val: Direction: input. +:type val: bm_enum (LibCmo::VxMath::VXTEXTURE_FILTERMODE in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_GetTextureMagMode = _create_bmap_func('BMMaterial_GetTextureMagMode', (bm_void_p, bm_CKID, bm_enum_p, )) +""" +BMMaterial_GetTextureMagMode + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_enum_p (LibCmo::VxMath::VXTEXTURE_FILTERMODE in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_SetTextureMagMode = _create_bmap_func('BMMaterial_SetTextureMagMode', (bm_void_p, bm_CKID, bm_enum, )) +""" +BMMaterial_SetTextureMagMode + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param val: Direction: input. +:type val: bm_enum (LibCmo::VxMath::VXTEXTURE_FILTERMODE in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_GetTextureAddressMode = _create_bmap_func('BMMaterial_GetTextureAddressMode', (bm_void_p, bm_CKID, bm_enum_p, )) +""" +BMMaterial_GetTextureAddressMode + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_enum_p (LibCmo::VxMath::VXTEXTURE_ADDRESSMODE in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_SetTextureAddressMode = _create_bmap_func('BMMaterial_SetTextureAddressMode', (bm_void_p, bm_CKID, bm_enum, )) +""" +BMMaterial_SetTextureAddressMode + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param val: Direction: input. +:type val: bm_enum (LibCmo::VxMath::VXTEXTURE_ADDRESSMODE in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_GetSourceBlend = _create_bmap_func('BMMaterial_GetSourceBlend', (bm_void_p, bm_CKID, bm_enum_p, )) +""" +BMMaterial_GetSourceBlend + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_enum_p (LibCmo::VxMath::VXBLEND_MODE in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_SetSourceBlend = _create_bmap_func('BMMaterial_SetSourceBlend', (bm_void_p, bm_CKID, bm_enum, )) +""" +BMMaterial_SetSourceBlend + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param val: Direction: input. +:type val: bm_enum (LibCmo::VxMath::VXBLEND_MODE in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_GetDestBlend = _create_bmap_func('BMMaterial_GetDestBlend', (bm_void_p, bm_CKID, bm_enum_p, )) +""" +BMMaterial_GetDestBlend + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_enum_p (LibCmo::VxMath::VXBLEND_MODE in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_SetDestBlend = _create_bmap_func('BMMaterial_SetDestBlend', (bm_void_p, bm_CKID, bm_enum, )) +""" +BMMaterial_SetDestBlend + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param val: Direction: input. +:type val: bm_enum (LibCmo::VxMath::VXBLEND_MODE in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_GetFillMode = _create_bmap_func('BMMaterial_GetFillMode', (bm_void_p, bm_CKID, bm_enum_p, )) +""" +BMMaterial_GetFillMode + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_enum_p (LibCmo::VxMath::VXFILL_MODE in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_SetFillMode = _create_bmap_func('BMMaterial_SetFillMode', (bm_void_p, bm_CKID, bm_enum, )) +""" +BMMaterial_SetFillMode + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param val: Direction: input. +:type val: bm_enum (LibCmo::VxMath::VXFILL_MODE in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_GetShadeMode = _create_bmap_func('BMMaterial_GetShadeMode', (bm_void_p, bm_CKID, bm_enum_p, )) +""" +BMMaterial_GetShadeMode + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_enum_p (LibCmo::VxMath::VXSHADE_MODE in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_SetShadeMode = _create_bmap_func('BMMaterial_SetShadeMode', (bm_void_p, bm_CKID, bm_enum, )) +""" +BMMaterial_SetShadeMode + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param val: Direction: input. +:type val: bm_enum (LibCmo::VxMath::VXSHADE_MODE in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_GetAlphaTestEnabled = _create_bmap_func('BMMaterial_GetAlphaTestEnabled', (bm_void_p, bm_CKID, bm_bool_p, )) +""" +BMMaterial_GetAlphaTestEnabled + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_bool_p (bool in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_SetAlphaTestEnabled = _create_bmap_func('BMMaterial_SetAlphaTestEnabled', (bm_void_p, bm_CKID, bm_bool, )) +""" +BMMaterial_SetAlphaTestEnabled + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param enabled: Direction: input. +:type enabled: bm_bool (bool in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_GetAlphaBlendEnabled = _create_bmap_func('BMMaterial_GetAlphaBlendEnabled', (bm_void_p, bm_CKID, bm_bool_p, )) +""" +BMMaterial_GetAlphaBlendEnabled + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_bool_p (bool in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_SetAlphaBlendEnabled = _create_bmap_func('BMMaterial_SetAlphaBlendEnabled', (bm_void_p, bm_CKID, bm_bool, )) +""" +BMMaterial_SetAlphaBlendEnabled + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param enabled: Direction: input. +:type enabled: bm_bool (bool in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_GetPerspectiveCorrectionEnabled = _create_bmap_func('BMMaterial_GetPerspectiveCorrectionEnabled', (bm_void_p, bm_CKID, bm_bool_p, )) +""" +BMMaterial_GetPerspectiveCorrectionEnabled + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_bool_p (bool in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_SetPerspectiveCorrectionEnabled = _create_bmap_func('BMMaterial_SetPerspectiveCorrectionEnabled', (bm_void_p, bm_CKID, bm_bool, )) +""" +BMMaterial_SetPerspectiveCorrectionEnabled + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param enabled: Direction: input. +:type enabled: bm_bool (bool in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_GetZWriteEnabled = _create_bmap_func('BMMaterial_GetZWriteEnabled', (bm_void_p, bm_CKID, bm_bool_p, )) +""" +BMMaterial_GetZWriteEnabled + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_bool_p (bool in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_SetZWriteEnabled = _create_bmap_func('BMMaterial_SetZWriteEnabled', (bm_void_p, bm_CKID, bm_bool, )) +""" +BMMaterial_SetZWriteEnabled + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param enabled: Direction: input. +:type enabled: bm_bool (bool in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_GetTwoSidedEnabled = _create_bmap_func('BMMaterial_GetTwoSidedEnabled', (bm_void_p, bm_CKID, bm_bool_p, )) +""" +BMMaterial_GetTwoSidedEnabled + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_bool_p (bool in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_SetTwoSidedEnabled = _create_bmap_func('BMMaterial_SetTwoSidedEnabled', (bm_void_p, bm_CKID, bm_bool, )) +""" +BMMaterial_SetTwoSidedEnabled + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param enabled: Direction: input. +:type enabled: bm_bool (bool in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_GetAlphaRef = _create_bmap_func('BMMaterial_GetAlphaRef', (bm_void_p, bm_CKID, bm_CKBYTE_p, )) +""" +BMMaterial_GetAlphaRef + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_CKBYTE_p (LibCmo::CKBYTE in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_SetAlphaRef = _create_bmap_func('BMMaterial_SetAlphaRef', (bm_void_p, bm_CKID, bm_CKBYTE, )) +""" +BMMaterial_SetAlphaRef + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param val: Direction: input. +:type val: bm_CKBYTE (LibCmo::CKBYTE in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_GetAlphaFunc = _create_bmap_func('BMMaterial_GetAlphaFunc', (bm_void_p, bm_CKID, bm_enum_p, )) +""" +BMMaterial_GetAlphaFunc + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_enum_p (LibCmo::VxMath::VXCMPFUNC in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_SetAlphaFunc = _create_bmap_func('BMMaterial_SetAlphaFunc', (bm_void_p, bm_CKID, bm_enum, )) +""" +BMMaterial_SetAlphaFunc + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param val: Direction: input. +:type val: bm_enum (LibCmo::VxMath::VXCMPFUNC in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_GetZFunc = _create_bmap_func('BMMaterial_GetZFunc', (bm_void_p, bm_CKID, bm_enum_p, )) +""" +BMMaterial_GetZFunc + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_enum_p (LibCmo::VxMath::VXCMPFUNC in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMaterial_SetZFunc = _create_bmap_func('BMMaterial_SetZFunc', (bm_void_p, bm_CKID, bm_enum, )) +""" +BMMaterial_SetZFunc + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param val: Direction: input. +:type val: bm_enum (LibCmo::VxMath::VXCMPFUNC in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMesh_GetLitMode = _create_bmap_func('BMMesh_GetLitMode', (bm_void_p, bm_CKID, bm_enum_p, )) +""" +BMMesh_GetLitMode + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_mode: Direction: output. +:type out_mode: bm_enum_p (LibCmo::VxMath::VXMESH_LITMODE in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMesh_SetLitMode = _create_bmap_func('BMMesh_SetLitMode', (bm_void_p, bm_CKID, bm_enum, )) +""" +BMMesh_SetLitMode + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param mode: Direction: input. +:type mode: bm_enum (LibCmo::VxMath::VXMESH_LITMODE in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMesh_GetVertexCount = _create_bmap_func('BMMesh_GetVertexCount', (bm_void_p, bm_CKID, bm_CKDWORD_p, )) +""" +BMMesh_GetVertexCount + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_count: Direction: output. +:type out_count: bm_CKDWORD_p (LibCmo::CKDWORD in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMesh_SetVertexCount = _create_bmap_func('BMMesh_SetVertexCount', (bm_void_p, bm_CKID, bm_CKDWORD, )) +""" +BMMesh_SetVertexCount + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param count: Direction: input. +:type count: bm_CKDWORD (LibCmo::CKDWORD in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMesh_GetVertexPositions = _create_bmap_func('BMMesh_GetVertexPositions', (bm_void_p, bm_CKID, bm_VxVector3_pp, )) +""" +BMMesh_GetVertexPositions + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_mem: Direction: output. +:type out_mem: bm_VxVector3_pp (LibCmo::VxMath::VxVector3* in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMesh_GetVertexNormals = _create_bmap_func('BMMesh_GetVertexNormals', (bm_void_p, bm_CKID, bm_VxVector3_pp, )) +""" +BMMesh_GetVertexNormals + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_mem: Direction: output. +:type out_mem: bm_VxVector3_pp (LibCmo::VxMath::VxVector3* in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMesh_GetVertexUVs = _create_bmap_func('BMMesh_GetVertexUVs', (bm_void_p, bm_CKID, bm_VxVector2_pp, )) +""" +BMMesh_GetVertexUVs + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_mem: Direction: output. +:type out_mem: bm_VxVector2_pp (LibCmo::VxMath::VxVector2* in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMesh_GetFaceCount = _create_bmap_func('BMMesh_GetFaceCount', (bm_void_p, bm_CKID, bm_CKDWORD_p, )) +""" +BMMesh_GetFaceCount + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_count: Direction: output. +:type out_count: bm_CKDWORD_p (LibCmo::CKDWORD in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMesh_SetFaceCount = _create_bmap_func('BMMesh_SetFaceCount', (bm_void_p, bm_CKID, bm_CKDWORD, )) +""" +BMMesh_SetFaceCount + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param count: Direction: input. +:type count: bm_CKDWORD (LibCmo::CKDWORD in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMesh_GetFaceIndices = _create_bmap_func('BMMesh_GetFaceIndices', (bm_void_p, bm_CKID, bm_CKWORD_pp, )) +""" +BMMesh_GetFaceIndices + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_mem: Direction: output. +:type out_mem: bm_CKWORD_pp (LibCmo::CKWORD* in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMesh_GetFaceMaterialSlotIndexs = _create_bmap_func('BMMesh_GetFaceMaterialSlotIndexs', (bm_void_p, bm_CKID, bm_CKWORD_pp, )) +""" +BMMesh_GetFaceMaterialSlotIndexs + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_mem: Direction: output. +:type out_mem: bm_CKWORD_pp (LibCmo::CKWORD* in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMesh_GetMaterialSlotCount = _create_bmap_func('BMMesh_GetMaterialSlotCount', (bm_void_p, bm_CKID, bm_CKDWORD_p, )) +""" +BMMesh_GetMaterialSlotCount + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_count: Direction: output. +:type out_count: bm_CKDWORD_p (LibCmo::CKDWORD in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMesh_SetMaterialSlotCount = _create_bmap_func('BMMesh_SetMaterialSlotCount', (bm_void_p, bm_CKID, bm_CKDWORD, )) +""" +BMMesh_SetMaterialSlotCount + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param count: Direction: input. +:type count: bm_CKDWORD (LibCmo::CKDWORD in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMesh_GetMaterialSlot = _create_bmap_func('BMMesh_GetMaterialSlot', (bm_void_p, bm_CKID, bm_CKDWORD, bm_CKID_p, )) +""" +BMMesh_GetMaterialSlot + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param index: Direction: input. +:type index: bm_CKDWORD (LibCmo::CKDWORD in C++). +:param out_mtlid: Direction: output. +:type out_mtlid: bm_CKID_p (LibCmo::CK2::CK_ID in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMMesh_SetMaterialSlot = _create_bmap_func('BMMesh_SetMaterialSlot', (bm_void_p, bm_CKID, bm_CKDWORD, bm_CKID, )) +""" +BMMesh_SetMaterialSlot + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param index: Direction: input. +:type index: bm_CKDWORD (LibCmo::CKDWORD in C++). +:param mtlid: Direction: input. +:type mtlid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BM3dEntity_GetWorldMatrix = _create_bmap_func('BM3dEntity_GetWorldMatrix', (bm_void_p, bm_CKID, bm_VxMatrix_p, )) +""" +BM3dEntity_GetWorldMatrix + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_mat: Direction: output. +:type out_mat: bm_VxMatrix_p (LibCmo::VxMath::VxMatrix in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BM3dEntity_SetWorldMatrix = _create_bmap_func('BM3dEntity_SetWorldMatrix', (bm_void_p, bm_CKID, bm_VxMatrix, )) +""" +BM3dEntity_SetWorldMatrix + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param mat: Direction: input. +:type mat: bm_VxMatrix (LibCmo::VxMath::VxMatrix in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BM3dEntity_GetCurrentMesh = _create_bmap_func('BM3dEntity_GetCurrentMesh', (bm_void_p, bm_CKID, bm_CKID_p, )) +""" +BM3dEntity_GetCurrentMesh + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_meshid: Direction: output. +:type out_meshid: bm_CKID_p (LibCmo::CK2::CK_ID in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BM3dEntity_SetCurrentMesh = _create_bmap_func('BM3dEntity_SetCurrentMesh', (bm_void_p, bm_CKID, bm_CKID, )) +""" +BM3dEntity_SetCurrentMesh + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param meshid: Direction: input. +:type meshid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BM3dEntity_GetVisibility = _create_bmap_func('BM3dEntity_GetVisibility', (bm_void_p, bm_CKID, bm_bool_p, )) +""" +BM3dEntity_GetVisibility + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_isVisible: Direction: output. +:type out_isVisible: bm_bool_p (bool in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BM3dEntity_SetVisibility = _create_bmap_func('BM3dEntity_SetVisibility', (bm_void_p, bm_CKID, bm_bool, )) +""" +BM3dEntity_SetVisibility + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param is_visible: Direction: input. +:type is_visible: bm_bool (bool in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMLight_GetType = _create_bmap_func('BMLight_GetType', (bm_void_p, bm_CKID, bm_enum_p, )) +""" +BMLight_GetType + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_enum_p (LibCmo::VxMath::VXLIGHT_TYPE in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMLight_SetType = _create_bmap_func('BMLight_SetType', (bm_void_p, bm_CKID, bm_enum, )) +""" +BMLight_SetType + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param val: Direction: input. +:type val: bm_enum (LibCmo::VxMath::VXLIGHT_TYPE in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMLight_GetColor = _create_bmap_func('BMLight_GetColor', (bm_void_p, bm_CKID, bm_VxColor_p, )) +""" +BMLight_GetColor + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_VxColor_p (LibCmo::VxMath::VxColor in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMLight_SetColor = _create_bmap_func('BMLight_SetColor', (bm_void_p, bm_CKID, bm_VxColor, )) +""" +BMLight_SetColor + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param col: Direction: input. +:type col: bm_VxColor (LibCmo::VxMath::VxColor in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMLight_GetConstantAttenuation = _create_bmap_func('BMLight_GetConstantAttenuation', (bm_void_p, bm_CKID, bm_CKFLOAT_p, )) +""" +BMLight_GetConstantAttenuation + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_CKFLOAT_p (LibCmo::CKFLOAT in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMLight_SetConstantAttenuation = _create_bmap_func('BMLight_SetConstantAttenuation', (bm_void_p, bm_CKID, bm_CKFLOAT, )) +""" +BMLight_SetConstantAttenuation + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param val: Direction: input. +:type val: bm_CKFLOAT (LibCmo::CKFLOAT in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMLight_GetLinearAttenuation = _create_bmap_func('BMLight_GetLinearAttenuation', (bm_void_p, bm_CKID, bm_CKFLOAT_p, )) +""" +BMLight_GetLinearAttenuation + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_CKFLOAT_p (LibCmo::CKFLOAT in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMLight_SetLinearAttenuation = _create_bmap_func('BMLight_SetLinearAttenuation', (bm_void_p, bm_CKID, bm_CKFLOAT, )) +""" +BMLight_SetLinearAttenuation + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param val: Direction: input. +:type val: bm_CKFLOAT (LibCmo::CKFLOAT in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMLight_GetQuadraticAttenuation = _create_bmap_func('BMLight_GetQuadraticAttenuation', (bm_void_p, bm_CKID, bm_CKFLOAT_p, )) +""" +BMLight_GetQuadraticAttenuation + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_CKFLOAT_p (LibCmo::CKFLOAT in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMLight_SetQuadraticAttenuation = _create_bmap_func('BMLight_SetQuadraticAttenuation', (bm_void_p, bm_CKID, bm_CKFLOAT, )) +""" +BMLight_SetQuadraticAttenuation + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param val: Direction: input. +:type val: bm_CKFLOAT (LibCmo::CKFLOAT in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMLight_GetRange = _create_bmap_func('BMLight_GetRange', (bm_void_p, bm_CKID, bm_CKFLOAT_p, )) +""" +BMLight_GetRange + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_CKFLOAT_p (LibCmo::CKFLOAT in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMLight_SetRange = _create_bmap_func('BMLight_SetRange', (bm_void_p, bm_CKID, bm_CKFLOAT, )) +""" +BMLight_SetRange + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param val: Direction: input. +:type val: bm_CKFLOAT (LibCmo::CKFLOAT in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMLight_GetHotSpot = _create_bmap_func('BMLight_GetHotSpot', (bm_void_p, bm_CKID, bm_CKFLOAT_p, )) +""" +BMLight_GetHotSpot + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_CKFLOAT_p (LibCmo::CKFLOAT in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMLight_SetHotSpot = _create_bmap_func('BMLight_SetHotSpot', (bm_void_p, bm_CKID, bm_CKFLOAT, )) +""" +BMLight_SetHotSpot + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param val: Direction: input. +:type val: bm_CKFLOAT (LibCmo::CKFLOAT in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMLight_GetFalloff = _create_bmap_func('BMLight_GetFalloff', (bm_void_p, bm_CKID, bm_CKFLOAT_p, )) +""" +BMLight_GetFalloff + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_CKFLOAT_p (LibCmo::CKFLOAT in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMLight_SetFalloff = _create_bmap_func('BMLight_SetFalloff', (bm_void_p, bm_CKID, bm_CKFLOAT, )) +""" +BMLight_SetFalloff + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param val: Direction: input. +:type val: bm_CKFLOAT (LibCmo::CKFLOAT in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMLight_GetFalloffShape = _create_bmap_func('BMLight_GetFalloffShape', (bm_void_p, bm_CKID, bm_CKFLOAT_p, )) +""" +BMLight_GetFalloffShape + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_CKFLOAT_p (LibCmo::CKFLOAT in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMLight_SetFalloffShape = _create_bmap_func('BMLight_SetFalloffShape', (bm_void_p, bm_CKID, bm_CKFLOAT, )) +""" +BMLight_SetFalloffShape + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param val: Direction: input. +:type val: bm_CKFLOAT (LibCmo::CKFLOAT in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMCamera_GetProjectionType = _create_bmap_func('BMCamera_GetProjectionType', (bm_void_p, bm_CKID, bm_enum_p, )) +""" +BMCamera_GetProjectionType + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_enum_p (LibCmo::CK2::CK_CAMERA_PROJECTION in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMCamera_SetProjectionType = _create_bmap_func('BMCamera_SetProjectionType', (bm_void_p, bm_CKID, bm_enum, )) +""" +BMCamera_SetProjectionType + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param val: Direction: input. +:type val: bm_enum (LibCmo::CK2::CK_CAMERA_PROJECTION in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMCamera_GetOrthographicZoom = _create_bmap_func('BMCamera_GetOrthographicZoom', (bm_void_p, bm_CKID, bm_CKFLOAT_p, )) +""" +BMCamera_GetOrthographicZoom + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_CKFLOAT_p (LibCmo::CKFLOAT in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMCamera_SetOrthographicZoom = _create_bmap_func('BMCamera_SetOrthographicZoom', (bm_void_p, bm_CKID, bm_CKFLOAT, )) +""" +BMCamera_SetOrthographicZoom + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param val: Direction: input. +:type val: bm_CKFLOAT (LibCmo::CKFLOAT in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMCamera_GetFrontPlane = _create_bmap_func('BMCamera_GetFrontPlane', (bm_void_p, bm_CKID, bm_CKFLOAT_p, )) +""" +BMCamera_GetFrontPlane + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_CKFLOAT_p (LibCmo::CKFLOAT in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMCamera_SetFrontPlane = _create_bmap_func('BMCamera_SetFrontPlane', (bm_void_p, bm_CKID, bm_CKFLOAT, )) +""" +BMCamera_SetFrontPlane + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param val: Direction: input. +:type val: bm_CKFLOAT (LibCmo::CKFLOAT in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMCamera_GetBackPlane = _create_bmap_func('BMCamera_GetBackPlane', (bm_void_p, bm_CKID, bm_CKFLOAT_p, )) +""" +BMCamera_GetBackPlane + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_CKFLOAT_p (LibCmo::CKFLOAT in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMCamera_SetBackPlane = _create_bmap_func('BMCamera_SetBackPlane', (bm_void_p, bm_CKID, bm_CKFLOAT, )) +""" +BMCamera_SetBackPlane + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param val: Direction: input. +:type val: bm_CKFLOAT (LibCmo::CKFLOAT in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMCamera_GetFov = _create_bmap_func('BMCamera_GetFov', (bm_void_p, bm_CKID, bm_CKFLOAT_p, )) +""" +BMCamera_GetFov + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_val: Direction: output. +:type out_val: bm_CKFLOAT_p (LibCmo::CKFLOAT in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMCamera_SetFov = _create_bmap_func('BMCamera_SetFov', (bm_void_p, bm_CKID, bm_CKFLOAT, )) +""" +BMCamera_SetFov + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param val: Direction: input. +:type val: bm_CKFLOAT (LibCmo::CKFLOAT in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" +BMCamera_GetAspectRatio = _create_bmap_func('BMCamera_GetAspectRatio', (bm_void_p, bm_CKID, bm_CKDWORD_p, bm_CKDWORD_p, )) +""" +BMCamera_GetAspectRatio + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param out_width: Direction: output. +:type out_width: bm_CKDWORD_p (LibCmo::CKDWORD in C++). Use ctypes.byref(data) pass it. +:param out_height: Direction: output. +:type out_height: bm_CKDWORD_p (LibCmo::CKDWORD in C++). Use ctypes.byref(data) pass it. +:return: True if no error, otherwise False. +:rtype: bool +""" +BMCamera_SetAspectRatio = _create_bmap_func('BMCamera_SetAspectRatio', (bm_void_p, bm_CKID, bm_CKDWORD, bm_CKDWORD, )) +""" +BMCamera_SetAspectRatio + +:param bmfile: Direction: input. The pointer to corresponding BMFile. +:type bmfile: bm_void_p (BMap::BMFile* in C++). +:param objid: Direction: input. The CKID of object you accessing. +:type objid: bm_CKID (LibCmo::CK2::CK_ID in C++). +:param width: Direction: input. +:type width: bm_CKDWORD (LibCmo::CKDWORD in C++). +:param height: Direction: input. +:type height: bm_CKDWORD (LibCmo::CKDWORD in C++). +:return: True if no error, otherwise False. +:rtype: bool +""" ##### GENERATED FUNCTIONS END ##### diff --git a/Assets/BMapBindings/pybmap/src/pybmap/bmap_wrapper.py b/Assets/BMapBindings/pybmap/src/pybmap/bmap_wrapper.py index f3880b1..afe2ef3 100644 --- a/Assets/BMapBindings/pybmap/src/pybmap/bmap_wrapper.py +++ b/Assets/BMapBindings/pybmap/src/pybmap/bmap_wrapper.py @@ -1,30 +1,36 @@ -import ctypes, typing, atexit, enum -from . import bmap, virtools_types +import ctypes +import typing +import atexit +import enum +from . import bmap +from . import 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" +INVALID_PTR: bmap.bm_void_p = bmap.bm_void_p(0) +INVALID_CKID: int = 0 +BMAP_ENCODING: str = "utf-8" def _python_callback(strl: bytes): """ The Python type callback for BMFile. - Simply add a prefix when output. - Need a convertion before passing to BMFile. + + This function simply add a prefix when output. + Extra convertion is required before passing to BMFile FFI function. """ - # YYC Remarks: + # YYC MARK: # The passing value to this function is bytes, not bmap.bm_CKSTRING. # I think Python do an auto convertion in there. if strl is not None: - print(f'[PyBMap] {strl.decode(g_BMapEncoding)}') -_g_RawCallback: bmap.bm_callback = bmap.bm_callback(_python_callback) + print(f'[pybmap] {strl.decode(BMAP_ENCODING)}') + +RAW_CALLBACK = bmap.bm_callback(_python_callback) #endregion #region Help Functions -class _Utils: +class _utils: @staticmethod def raise_out_of_length_exception() -> None: raise bmap.BMapException("The length of given data is too short when assigning struct array.") @@ -39,7 +45,7 @@ class _Utils: pdata[idx] = user_vector[_j] idx += 1 except StopIteration: - _Utils.raise_out_of_length_exception() + _utils.raise_out_of_length_exception() @staticmethod def _vector_iterator(pdata: typing.Any, item_count: int, factor_count: int) -> typing.Iterator[tuple[typing.Any, ...]]: @@ -53,39 +59,37 @@ class _Utils: @staticmethod def vxvector3_assigner(pvector: bmap.bm_VxVector3_p, count: int, itor: typing.Iterator[virtools_types.VxVector3]) -> None: - _Utils._vector_assigner(ctypes.cast(pvector, bmap.bm_CKFLOAT_p), count, 3, map(lambda v: (v.x, v.y, v.z), itor)) + _utils._vector_assigner(ctypes.cast(pvector, bmap.bm_CKFLOAT_p), count, 3, map(lambda v: (v.x, v.y, v.z), itor)) @staticmethod def vxvector3_iterator(pvector: bmap.bm_VxVector3_p, count: int) -> typing.Iterator[virtools_types.VxVector3]: return map( lambda v: virtools_types.VxVector3(*v), - _Utils._vector_iterator(ctypes.cast(pvector, bmap.bm_CKFLOAT_p), count, 3) + _utils._vector_iterator(ctypes.cast(pvector, bmap.bm_CKFLOAT_p), count, 3) ) @staticmethod def vxvector2_assigner(pvector: bmap.bm_VxVector2_p, count: int, itor: typing.Iterator[virtools_types.VxVector2]) -> None: - _Utils._vector_assigner(ctypes.cast(pvector, bmap.bm_CKFLOAT_p), count, 2, map(lambda v: (v.x, v.y), itor)) + _utils._vector_assigner(ctypes.cast(pvector, bmap.bm_CKFLOAT_p), count, 2, map(lambda v: (v.x, v.y), itor)) @staticmethod def vxvector2_iterator(pvector: bmap.bm_VxVector2_p, count: int) -> typing.Iterator[virtools_types.VxVector2]: return map( lambda v: virtools_types.VxVector2(*v), - _Utils._vector_iterator(ctypes.cast(pvector, bmap.bm_CKFLOAT_p), count, 2) + _utils._vector_iterator(ctypes.cast(pvector, bmap.bm_CKFLOAT_p), count, 2) ) - """! - @remarks - bmap.bm_CKWORD_p | bmap.bm_CKDWORD_p is just a type hint. - We actually do not need distinguish them in code. - Because the stride when increasing them is decided by their runtime type. - """ + # YYC MARK: + # bmap.bm_CKWORD_p | bmap.bm_CKDWORD_p is just a type hint. + # We actually do not need distinguish them in code. + # Because the stride when increasing them is decided by their runtime type. @staticmethod def ckfaceindices_assigner(pindices: bmap.bm_CKWORD_p | bmap.bm_CKDWORD_p, count: int, itor: typing.Iterator[virtools_types.CKFaceIndices]) -> None: - _Utils._vector_assigner(pindices, count, 3, map(lambda v: (v.i1, v.i2, v.i3), itor)) + _utils._vector_assigner(pindices, count, 3, map(lambda v: (v.i1, v.i2, v.i3), itor)) @staticmethod def ckfaceindices_iterator(pindices: bmap.bm_CKWORD_p | bmap.bm_CKDWORD_p, count: int) -> typing.Iterator[virtools_types.CKFaceIndices]: return map( lambda v: virtools_types.CKFaceIndices(*v), - _Utils._vector_iterator(pindices, count, 3) + _utils._vector_iterator(pindices, count, 3) ) #endregion @@ -122,7 +126,7 @@ class _AbstractPointer(): TEnumType = typing.TypeVar('TEnumType', bound = enum.IntEnum) TIntegralType = bmap.bm_CKDWORD | bmap.bm_CKWORD | bmap.bm_CKINT | bmap.bm_CKBYTE | bmap.bm_CKID TFloatPointType = bmap.bm_CKFLOAT -TPointerType = typing.TypeVar('TPointerType') +TPointerType = typing.TypeVar('TPointerType', bound=ctypes._Pointer) class _AbstractCKObject(_AbstractPointer): __mCKID: int @@ -148,6 +152,7 @@ class _AbstractCKObject(_AbstractPointer): def __hash__(self) -> int: return hash((_AbstractPointer.__hash__(self), self.__mCKID)) + # YYC MARK: # Convenient Value Getter Setter # Focusing on those which widely called types. @@ -183,11 +188,11 @@ class _AbstractCKObject(_AbstractPointer): data: bmap.bm_CKSTRING = bmap.bm_CKSTRING() getter_(self._get_pointer(), self._get_ckid(), ctypes.byref(data)) if data.value is None: return None - else: return data.value.decode(g_BMapEncoding) + else: return data.value.decode(BMAP_ENCODING) def _set_str_value(self, setter_: typing.Callable[[bmap.bm_void_p, bmap.bm_CKID, bmap.bm_CKSTRING], bmap.bm_bool], data_: str | None) -> None: data: bmap.bm_CKSTRING if data_ is None: data = bmap.bm_CKSTRING(0) - else: data = bmap.bm_CKSTRING(data_.encode(g_BMapEncoding)) + else: data = bmap.bm_CKSTRING(data_.encode(BMAP_ENCODING)) setter_(self._get_pointer(), self._get_ckid(), data) def _set_vxcolor_value(self, @@ -209,7 +214,7 @@ class _AbstractCKObject(_AbstractPointer): return ret def _get_pointer_value(self, ptr_type_: type[TPointerType], getter_: typing.Callable[[bmap.bm_void_p, bmap.bm_CKID, typing.Any], bmap.bm_bool]) -> TPointerType: - data = ptr_type_() + data: TPointerType = ptr_type_() getter_(self._get_pointer(), self._get_ckid(), ctypes.byref(data)) return data @@ -234,18 +239,16 @@ if is_bmap_available(): #region Real Type Defines -"""! -@remarks -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. -""" +# YYC MARK: +# 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: @@ -258,10 +261,10 @@ class BMTexture(BMObject): return self._get_str_value(bmap.BMTexture_GetFileName) def load_image(self, filepath: str) -> None: - filename: bmap.bm_CKSTRING = bmap.bm_CKSTRING(filepath.encode(g_BMapEncoding)) + filename: bmap.bm_CKSTRING = bmap.bm_CKSTRING(filepath.encode(BMAP_ENCODING)) 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)) + filename: bmap.bm_CKSTRING = bmap.bm_CKSTRING(filepath.encode(BMAP_ENCODING)) bmap.BMTexture_SaveImage(self._get_pointer(), self._get_ckid(), filename) def get_save_options(self) -> virtools_types.CK_TEXTURE_SAVEOPTIONS: @@ -299,11 +302,11 @@ class BMMaterial(BMObject): 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 + if objid.value == INVALID_CKID: 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) + objid: bmap.bm_CKID = bmap.bm_CKID(INVALID_CKID) if tex_ is not None: objid = tex_._get_ckid() bmap.BMMaterial_SetTexture(self._get_pointer(), self._get_ckid(), objid) @@ -398,25 +401,25 @@ class BMMesh(BMObject): def get_vertex_positions(self) -> typing.Iterator[virtools_types.VxVector3]: # get raw pointer and return raw_vector = self._get_pointer_value(bmap.bm_VxVector3_p, bmap.BMMesh_GetVertexPositions) - return _Utils.vxvector3_iterator(raw_vector, self.get_vertex_count()) + return _utils.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 = self._get_pointer_value(bmap.bm_VxVector3_p, bmap.BMMesh_GetVertexPositions) - _Utils.vxvector3_assigner(raw_vector, self.get_vertex_count(), itor) + _utils.vxvector3_assigner(raw_vector, self.get_vertex_count(), itor) def get_vertex_normals(self) -> typing.Iterator[virtools_types.VxVector3]: raw_vector = self._get_pointer_value(bmap.bm_VxVector3_p, bmap.BMMesh_GetVertexNormals) - return _Utils.vxvector3_iterator(raw_vector, self.get_vertex_count()) + return _utils.vxvector3_iterator(raw_vector, self.get_vertex_count()) def set_vertex_normals(self, itor: typing.Iterator[virtools_types.VxVector3]) -> None: raw_vector = self._get_pointer_value(bmap.bm_VxVector3_p, bmap.BMMesh_GetVertexNormals) - _Utils.vxvector3_assigner(raw_vector, self.get_vertex_count(), itor) + _utils.vxvector3_assigner(raw_vector, self.get_vertex_count(), itor) def get_vertex_uvs(self) -> typing.Iterator[virtools_types.VxVector2]: raw_vector = self._get_pointer_value(bmap.bm_VxVector2_p, bmap.BMMesh_GetVertexUVs) - return _Utils.vxvector2_iterator(raw_vector, self.get_vertex_count()) + return _utils.vxvector2_iterator(raw_vector, self.get_vertex_count()) def set_vertex_uvs(self, itor: typing.Iterator[virtools_types.VxVector2]) -> None: raw_vector = self._get_pointer_value(bmap.bm_VxVector2_p, bmap.BMMesh_GetVertexUVs) - _Utils.vxvector2_assigner(raw_vector, self.get_vertex_count(), itor) + _utils.vxvector2_assigner(raw_vector, self.get_vertex_count(), itor) def get_face_count(self) -> int: return self._get_integral_value(bmap.bm_CKDWORD, bmap.BMMesh_GetFaceCount) @@ -425,10 +428,10 @@ class BMMesh(BMObject): def get_face_indices(self) -> typing.Iterator[virtools_types.CKFaceIndices]: raw_idx = self._get_pointer_value(bmap.bm_CKWORD_p, bmap.BMMesh_GetFaceIndices) - return _Utils.ckfaceindices_iterator(raw_idx, self.get_face_count()) + return _utils.ckfaceindices_iterator(raw_idx, self.get_face_count()) def set_face_indices(self, itor: typing.Iterator[virtools_types.CKFaceIndices]) -> None: raw_idx = self._get_pointer_value(bmap.bm_CKWORD_p, bmap.BMMesh_GetFaceIndices) - _Utils.ckfaceindices_assigner(raw_idx, self.get_face_count(), itor) + _utils.ckfaceindices_assigner(raw_idx, self.get_face_count(), itor) def get_face_material_slot_indexs(self) -> typing.Iterator[int]: raw_idx = self._get_pointer_value(bmap.bm_CKWORD_p, bmap.BMMesh_GetFaceMaterialSlotIndexs) @@ -441,7 +444,7 @@ class BMMesh(BMObject): for i in range(self.get_face_count()): raw_idx[i] = next(itor) except StopIteration: - _Utils.raise_out_of_length_exception() + _utils.raise_out_of_length_exception() def get_material_slot_count(self) -> int: return self._get_integral_value(bmap.bm_CKDWORD, bmap.BMMesh_GetMaterialSlotCount) @@ -454,7 +457,7 @@ class BMMesh(BMObject): 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: + if mtlid.value == INVALID_CKID: yield None else: yield BMMaterial(self._get_pointer(), mtlid) @@ -468,13 +471,13 @@ class BMMesh(BMObject): # analyze mtl item mtlobj: BMMaterial | None = next(itor) if mtlobj is None: - mtlid.value = g_InvalidCKID + mtlid.value = INVALID_CKID else: mtlid = mtlobj._get_ckid() # set bmap.BMMesh_SetMaterialSlot(self._get_pointer(), self._get_ckid(), idx, mtlid) except StopIteration: - _Utils.raise_out_of_length_exception() + _utils.raise_out_of_length_exception() class BM3dEntity(BMObject): def get_world_matrix(self) -> virtools_types.VxMatrix: @@ -494,13 +497,13 @@ class BM3dEntity(BMObject): def get_current_mesh(self) -> BMMesh | None: ckid: bmap.bm_CKID = bmap.bm_CKID() bmap.BM3dEntity_GetCurrentMesh(self._get_pointer(), self._get_ckid(), ctypes.byref(ckid)) - if ckid.value == g_InvalidCKID: + if ckid.value == INVALID_CKID: 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) + ckid: bmap.bm_CKID = bmap.bm_CKID(INVALID_CKID) if mesh is not None: ckid = mesh._get_ckid() bmap.BM3dEntity_SetCurrentMesh(self._get_pointer(), self._get_ckid(), ckid) @@ -558,6 +561,43 @@ class BMLight(BM3dEntity): class BMTargetLight(BMLight): pass +class BMCamera(BM3dEntity): + def get_projection_type(self) -> virtools_types.CK_CAMERA_PROJECTION: + return self._get_enum_value(virtools_types.CK_CAMERA_PROJECTION, bmap.BMCamera_GetProjectionType) + def set_type(self, data_: virtools_types.CK_CAMERA_PROJECTION) -> None: + self._set_enum_value(bmap.BMCamera_SetProjectionType, data_) + + def get_orthographic_zoom(self) -> float: + return self._get_float_point_value(bmap.bm_CKFLOAT, bmap.BMCamera_GetOrthographicZoom) + def set_orthographic_zoom(self, val_: float) -> None: + self._set_float_point_value(bmap.bm_CKFLOAT, bmap.BMCamera_SetOrthographicZoom, val_) + + def get_front_plane(self) -> float: + return self._get_float_point_value(bmap.bm_CKFLOAT, bmap.BMCamera_GetFrontPlane) + def set_front_plane(self, val_: float) -> None: + self._set_float_point_value(bmap.bm_CKFLOAT, bmap.BMCamera_SetFrontPlane, val_) + def get_back_plane(self) -> float: + return self._get_float_point_value(bmap.bm_CKFLOAT, bmap.BMCamera_GetBackPlane) + def set_back_plane(self, val_: float) -> None: + self._set_float_point_value(bmap.bm_CKFLOAT, bmap.BMCamera_SetBackPlane, val_) + def get_fov(self) -> float: + return self._get_float_point_value(bmap.bm_CKFLOAT, bmap.BMCamera_GetFov) + def set_fov(self, val_: float) -> None: + self._set_float_point_value(bmap.bm_CKFLOAT, bmap.BMCamera_SetFov, val_) + + def get_aspect_ratio(self) -> tuple[int, int]: + width = bmap.bm_CKDWORD() + height = bmap.bm_CKDWORD() + bmap.BMCamera_GetAspectRatio(self._get_pointer(), self._get_ckid(), ctypes.byref(width), ctypes.byref(height)) + return (width.value, height.value) + def set_aspect_ratio(self, width_: int, height_: int) -> None: + width = bmap.bm_CKDWORD(width_) + height = bmap.bm_CKDWORD(height_) + bmap.BMCamera_SetAspectRatio(self._get_pointer(), self._get_ckid(), width, height) + +class BMTargetCamera(BMCamera): + pass + class BMGroup(BMObject): def add_object(self, member: BM3dObject) -> None: bmap.BMGroup_AddObject(self._get_pointer(), self._get_ckid(), member._get_ckid()) @@ -578,19 +618,19 @@ class BMGroup(BMObject): yield BM3dObject(self._get_pointer(), retid) class BMFileReader(_AbstractPointer): - def __init__(self, file_name_: str, temp_folder_: str, texture_folder_: str, encodings_: tuple[str]): + 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)) + file_name: bmap.bm_CKSTRING = bmap.bm_CKSTRING(file_name_.encode(BMAP_ENCODING)) + temp_folder: bmap.bm_CKSTRING = bmap.bm_CKSTRING(temp_folder_.encode(BMAP_ENCODING)) + texture_folder: bmap.bm_CKSTRING = bmap.bm_CKSTRING(texture_folder_.encode(BMAP_ENCODING)) 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_) + *(strl.encode(BMAP_ENCODING) for strl in encodings_) ) out_file: bmap.bm_void_p = bmap.bm_void_p() # exec bmap.BMFile_Load( - file_name, temp_folder, texture_folder, _g_RawCallback, + file_name, temp_folder, texture_folder, RAW_CALLBACK, encoding_count, encodings, ctypes.byref(out_file) ) @@ -606,7 +646,7 @@ class BMFileReader(_AbstractPointer): def dispose(self) -> None: if self._is_valid(): bmap.BMFile_Free(self._get_pointer()) - self._set_pointer(g_InvalidPtr) + self._set_pointer(INVALID_PTR) def __get_ckobject_count(self, count_getter: typing.Callable[[bmap.bm_void_p, bmap.bm_CKDWORD_p], bmap.bm_bool]) -> int: @@ -655,20 +695,25 @@ class BMFileReader(_AbstractPointer): return self.__get_ckobject_count(bmap.BMFile_GetTargetLightCount) def get_target_lights(self) -> typing.Iterator[BMTargetLight]: return self.__get_ckobjects(BMTargetLight, bmap.BMFile_GetTargetLightCount, bmap.BMFile_GetTargetLight) + def get_target_camera_count(self) -> int: + return self.__get_ckobject_count(bmap.BMFile_GetTargetCameraCount) + def get_target_cameras(self) -> typing.Iterator[BMTargetCamera]: + return self.__get_ckobjects(BMTargetCamera, bmap.BMFile_GetTargetCameraCount, bmap.BMFile_GetTargetCamera) + class BMFileWriter(_AbstractPointer): - def __init__(self, temp_folder_: str, texture_folder_: str, encodings_: tuple[str]): + 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)) + temp_folder: bmap.bm_CKSTRING = bmap.bm_CKSTRING(temp_folder_.encode(BMAP_ENCODING)) + texture_folder: bmap.bm_CKSTRING = bmap.bm_CKSTRING(texture_folder_.encode(BMAP_ENCODING)) 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_) + *(strl.encode(BMAP_ENCODING) for strl in encodings_) ) out_file: bmap.bm_void_p = bmap.bm_void_p() # exec bmap.BMFile_Create( - temp_folder, texture_folder, _g_RawCallback, + temp_folder, texture_folder, RAW_CALLBACK, encoding_count, encodings, ctypes.byref(out_file) ) @@ -683,7 +728,7 @@ class BMFileWriter(_AbstractPointer): def save(self, file_name_: str, texture_save_opt_: virtools_types.CK_TEXTURE_SAVEOPTIONS, use_compress_: bool, compress_level_: int) -> None: # create param - file_name: bmap.bm_CKSTRING = bmap.bm_CKSTRING(file_name_.encode(g_BMapEncoding)) + file_name: bmap.bm_CKSTRING = bmap.bm_CKSTRING(file_name_.encode(BMAP_ENCODING)) texture_save_opt: bmap.bm_enum = bmap.bm_enum(texture_save_opt_.value) use_compress: bmap.bm_bool = bmap.bm_bool(use_compress_) compress_level: bmap.bm_CKINT = bmap.bm_CKINT(compress_level_) @@ -693,7 +738,7 @@ class BMFileWriter(_AbstractPointer): def dispose(self) -> None: if self._is_valid(): bmap.BMFile_Free(self._get_pointer()) - self._set_pointer(g_InvalidPtr) + self._set_pointer(INVALID_PTR) def __create_ckobject(self, class_type: type[TCKObject], @@ -717,6 +762,8 @@ class BMFileWriter(_AbstractPointer): return self.__create_ckobject(BMGroup, bmap.BMFile_CreateGroup) def create_target_light(self) -> BMTargetLight: return self.__create_ckobject(BMTargetLight, bmap.BMFile_CreateTargetLight) + def create_target_camera(self) -> BMTargetCamera: + return self.__create_ckobject(BMTargetCamera, bmap.BMFile_CreateTargetCamera) class BMMeshTrans(_AbstractPointer): def __init__(self): @@ -733,7 +780,7 @@ class BMMeshTrans(_AbstractPointer): def dispose(self) -> None: if self._is_valid(): bmap.BMMeshTrans_Delete(self._get_pointer()) - self._set_pointer(g_InvalidPtr) + self._set_pointer(INVALID_PTR) def parse(self, objmesh: BMMesh) -> None: bmap.BMMeshTrans_Parse(self._get_pointer(), objmesh._get_pointer(), objmesh._get_ckid()) @@ -746,7 +793,7 @@ class BMMeshTrans(_AbstractPointer): raw_vector: bmap.bm_VxVector3_p = bmap.bm_VxVector3_p() bmap.BMMeshTrans_PrepareVertex(self._get_pointer(), ctypes.byref(raw_vector)) # set by pointer - _Utils.vxvector3_assigner(raw_vector, count, itor) + _utils.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) @@ -755,7 +802,7 @@ class BMMeshTrans(_AbstractPointer): raw_vector: bmap.bm_VxVector3_p = bmap.bm_VxVector3_p() bmap.BMMeshTrans_PrepareNormal(self._get_pointer(), ctypes.byref(raw_vector)) - _Utils.vxvector3_assigner(raw_vector, count, itor) + _utils.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) @@ -764,7 +811,7 @@ class BMMeshTrans(_AbstractPointer): raw_vector: bmap.bm_VxVector2_p = bmap.bm_VxVector2_p() bmap.BMMeshTrans_PrepareUV(self._get_pointer(), ctypes.byref(raw_vector)) - _Utils.vxvector2_assigner(raw_vector, count, itor) + _utils.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) @@ -777,12 +824,12 @@ class BMMeshTrans(_AbstractPointer): for _ in range(count): usermtl: BMMaterial | None = next(itor) if usermtl is None: - raw_ckid[idx] = g_InvalidCKID + raw_ckid[idx] = INVALID_CKID else: raw_ckid[idx] = usermtl._get_ckid().value idx += 1 except StopIteration: - _Utils.raise_out_of_length_exception() + _utils.raise_out_of_length_exception() def prepare_face(self, count: int, @@ -806,9 +853,9 @@ class BMMeshTrans(_AbstractPointer): # iterate and assign # assigne triple indices - _Utils.ckfaceindices_assigner(raw_vec_idx, count, vec_idx) - _Utils.ckfaceindices_assigner(raw_nml_idx, count, nml_idx) - _Utils.ckfaceindices_assigner(raw_uv_idx, count, uv_idx) + _utils.ckfaceindices_assigner(raw_vec_idx, count, vec_idx) + _utils.ckfaceindices_assigner(raw_nml_idx, count, nml_idx) + _utils.ckfaceindices_assigner(raw_uv_idx, count, uv_idx) # assign mtl index try: idx: int = 0 @@ -816,6 +863,6 @@ class BMMeshTrans(_AbstractPointer): raw_mtl_idx[idx] = next(mtl_idx) idx += 1 except StopIteration: - _Utils.raise_out_of_length_exception() + _utils.raise_out_of_length_exception() #endregion diff --git a/Assets/BMapBindings/pybmap/src/pybmap/virtools_types.py b/Assets/BMapBindings/pybmap/src/pybmap/virtools_types.py index 24113b0..8dbe306 100644 --- a/Assets/BMapBindings/pybmap/src/pybmap/virtools_types.py +++ b/Assets/BMapBindings/pybmap/src/pybmap/virtools_types.py @@ -1,4 +1,4 @@ -import typing, enum +import enum ConstVxVector2 = tuple[float, float] ConstVxVector3 = tuple[float, float, float] @@ -175,153 +175,250 @@ class VxMatrix(): ) 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. + 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 pathswhen loading the composition.""" + CKTEXTURE_IMAGEFORMAT = 2 + """Save using format specified. The bitmap data will be converted to thespecified 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 thatwas used originally for the texture or sprite will be append tothe 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) + # 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 VXLIGHT_TYPE(enum.IntEnum): - """! - Light type """ - VX_LIGHTPOINT = 1 ##< The Light is a point of light - VX_LIGHTSPOT = 2 ##< The light is a spotlight - VX_LIGHTDIREC = 3 ##< The light is directional light : Lights comes from an infinite point so only direction of light can be given - #VX_LIGHTPARA = 4 ##< Obsolete, do not use + Light type. + """ + VX_LIGHTPOINT = 1 + """The Light is a point of light""" + VX_LIGHTSPOT = 2 + """The light is a spotlight""" + VX_LIGHTDIREC = 3 + """The light is directional light : Lights comes from an infinite point so only direction of light can be given""" + # VX_LIGHTPARA = 4 + # """Obsolete, do not use""" 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 + 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_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_DOTPRODUCT3 = 9 + """Perform a Dot Product 3 between texture (normal map)and a referential vector given in VXRENDERSTATE_TEXTUREFACTOR.""" VXTEXTUREBLEND_MAX = 10 + # VXTEXTUREBLEND_MASK = 0xF 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 + 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""" + # VXTEXTUREFILTER_MASK = 0xF 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 ##< + 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 + """""" + # VXTEXTURE_ADDRESSMASK = 0x7 + # """mask for all values""" 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) + 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)""" + # VXBLEND_MASK = 0xF + # """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 + Fill Mode Options + """ + VXFILL_POINT = 1 + """Vertices rendering""" + VXFILL_WIREFRAME = 2 + """Edges rendering""" + VXFILL_SOLID = 3 + """Face rendering""" + # VXFILL_MASK = 3 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) + VXSHADE_FLAT = 1 + """Flat Shading""" + VXSHADE_GOURAUD = 2 + """Gouraud Shading""" + VXSHADE_PHONG = 3 + """Phong Shading (Not yet supported by most implementation)""" + # VXSHADE_MASK = 3 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. + 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.""" + # VXCMP_MASK = 0xF + # """Mask for all possible values.""" class VXMESH_LITMODE(enum.IntEnum): - """! - {filename:VXMESH_LITMODE} - Summary: Mesh lighting options - - Remarks: - + The VXMESH_LITMODE is used by CKMesh::SetLitMode to specify how lighting is done. - See Also: CKMaterial,CKMesh """ - VX_PRELITMESH = 0 ##< Lighting use color information store with vertices - VX_LITMESH = 1 ##< Lighting is done by renderer using normals and face material information. \ No newline at end of file + Mesh lighting options + """ + VX_PRELITMESH = 0 + """Lighting use color information store with vertices""" + VX_LITMESH = 1 + """Lighting is done by renderer using normals and face material information.""" + +class CK_CAMERA_PROJECTION(enum.IntEnum): + CK_PERSPECTIVEPROJECTION = 1 + CK_ORTHOGRAPHICPROJECTION = 2 diff --git a/Assets/BMapBindings/pybmap/tests/main.py b/Assets/BMapBindings/pybmap/tests/main.py index fff896a..93e420a 100644 --- a/Assets/BMapBindings/pybmap/tests/main.py +++ b/Assets/BMapBindings/pybmap/tests/main.py @@ -14,9 +14,9 @@ def main() -> None: return # Check BMap status. - # if True: - # print('Fail to initialize native BMap.') - # return + if not bmap.is_bmap_available(): + print('Fail to initialize native BMap.') + return # Waiting debugger input(f'Python PID is {os.getpid()}. Waiting for debugger, press any key to continue...') diff --git a/Assets/BMapBindings/pybmap/uv.lock b/Assets/BMapBindings/pybmap/uv.lock index d86584c..15ab334 100644 --- a/Assets/BMapBindings/pybmap/uv.lock +++ b/Assets/BMapBindings/pybmap/uv.lock @@ -4,5 +4,5 @@ requires-python = ">=3.11" [[package]] name = "pybmap" -version = "0.1.0" +version = "0.4.0" source = { editable = "." } diff --git a/Assets/CodeGen/BMapBinder/ExpFctsRender/templates/expfcts.py.jinja b/Assets/CodeGen/BMapBinder/ExpFctsRender/templates/expfcts.py.jinja index a91e614..dfed91c 100644 --- a/Assets/CodeGen/BMapBinder/ExpFctsRender/templates/expfcts.py.jinja +++ b/Assets/CodeGen/BMapBinder/ExpFctsRender/templates/expfcts.py.jinja @@ -1,15 +1,10 @@ {%- for fct in payload.fcts %} -{{ fct.fct_name }} = _create_bmap_func('{{ fct.fct_name }}', [ -{%- for param in fct.fct_params %} -{{- utils.get_python_type(param) }} -{%- if not loop.last %}, {% endif %} -{%- endfor -%} -]) +{{ fct.fct_name }} = _create_bmap_func('{{ fct.fct_name }}', ({% for param in fct.fct_params %}{{ utils.get_python_type(param) }}, {% endfor %})) """ {{ fct.fct_name }} {% for param in fct.fct_params %} :param {{ param.var_name }}: Direction: {% if param.is_input -%} input {%- else -%} output {%- endif %}. {{ param.var_desc }} -:type {{ param.var_name }}: {{ utils.get_python_type(param) }} ({{ param.var_type.to_c_type() }} in C++). {% if param.is_input -%} Use ctypes.byref() pass it. {%- endif %} +:type {{ param.var_name }}: {{ utils.get_python_type(param) }} ({{ param.var_type.to_c_type() }} in C++). {% if not param.is_input -%} Use ctypes.byref(data) pass it. {%- endif %} {%- endfor %} :return: True if no error, otherwise False. :rtype: bool