Merge branch 'master' into master
commit
78dbef8711
27
Build.md
27
Build.md
|
@ -84,23 +84,28 @@ Besides the toolchain, compilation should be the same as for Linux / Unix.
|
|||
|
||||
### CMake build options
|
||||
The cmake-build-environment provides options to configure the build. The following options can be used:
|
||||
- **ASSIMP_HUNTER_ENABLED (default OFF)**: Enable Hunter package manager support.
|
||||
- **BUILD_SHARED_LIBS (default ON)**: Generation of shared libs (dll for windows, so for Linux). Set this to OFF to get a static lib.
|
||||
- **BUILD_FRAMEWORK ( default OFF, MacOnly)**: Build package as Mac OS X Framework bundle
|
||||
- **ASSIMP_BUILD_FRAMEWORK (default OFF, MacOnly)**: Build package as Mac OS X Framework bundle.
|
||||
- **ASSIMP_DOUBLE_PRECISION (default OFF)**: All data will be stored as double values.
|
||||
- **ASSIMP_OPT_BUILD_PACKAGES ( default OFF)**: Set to ON to generate CPack configuration files and packaging targets
|
||||
- **ASSIMP_ANDROID_JNIIOSYSTEM ( default OFF )**: Android JNI IOSystem support is active
|
||||
- **ASSIMP_NO_EXPORT ( default OFF )**: Disable Assimp's export functionality
|
||||
- **ASSIMP_BUILD_ZLIB ( default OFF )**: Build your own zlib
|
||||
- **ASSIMP_OPT_BUILD_PACKAGES (default OFF)**: Set to ON to generate CPack configuration files and packaging targets.
|
||||
- **ASSIMP_ANDROID_JNIIOSYSTEM (default OFF)**: Android JNI IOSystem support is active.
|
||||
- **ASSIMP_NO_EXPORT (default OFF)**: Disable Assimp's export functionality.
|
||||
- **ASSIMP_BUILD_ZLIB (default OFF)**: Build our own zlib.
|
||||
- **ASSIMP_BUILD_ALL_EXPORTERS_BY_DEFAULT (default ON)**: Build Assimp with all exporter senabled.
|
||||
- **ASSIMP_BUILD_ALL_IMPORTERS_BY_DEFAULT (default ON)**: Build Assimp with all importer senabled.
|
||||
- **ASSIMP_BUILD_ASSIMP_TOOLS (default ON)**: If the supplementary tools for Assimp are built in addition to the library.
|
||||
- **ASSIMP_BUILD_SAMPLES (default OFF)**: If the official samples are built as well (needs Glut).
|
||||
- **ASSIMP_BUILD_TESTS (default ON)**: If the test suite for Assimp is built in addition to the library.
|
||||
- **ASSIMP_COVERALLS (default OFF)**: Enable this to measure test coverage.
|
||||
- **ASSIMP_ERROR_MAX( default OFF)**: Enable all warnings.
|
||||
- **ASSIMP_WERROR( default OFF )**: Treat warnings as errors.
|
||||
- **ASSIMP_INSTALL (default ON)**: Install Assimp library. Disable this if you want to use Assimp as a submodule.
|
||||
- **ASSIMP_WARNINGS_AS_ERRORS (default ON)**: Treat all warnings as errors.
|
||||
- **ASSIMP_ASAN (default OFF)**: Enable AddressSanitizer.
|
||||
- **ASSIMP_UBSAN (default OFF)**: Enable Undefined Behavior sanitizer.
|
||||
- **SYSTEM_IRRXML ( default OFF )**: Use system installed Irrlicht/IrrXML library.
|
||||
- **BUILD_DOCS ( default OFF )**: Build documentation using Doxygen.
|
||||
- **INJECT_DEBUG_POSTFIX( default ON )**: Inject debug postfix in .a/.so lib names
|
||||
- **IGNORE_GIT_HASH ( default OFF )**: Don't call git to get the hash.
|
||||
- **ASSIMP_BUILD_DOCS (default OFF)**: Build documentation using Doxygen. OBSOLETE, see https://github.com/assimp/assimp-docs
|
||||
- **ASSIMP_INJECT_DEBUG_POSTFIX (default ON)**: Inject debug postfix in .a/.so/.lib/.dll lib names
|
||||
- **ASSIMP_IGNORE_GIT_HASH (default OFF)**: Don't call git to get the hash.
|
||||
- **ASSIMP_INSTALL_PDB (default ON)**: Install MSVC debug files.
|
||||
- **USE_STATIC_CRT (default OFF)**: Link against the static MSVC runtime libraries.
|
||||
- **ASSIMP_BUILD_DRACO (default OFF)**: Build Draco libraries. Primarily for glTF.
|
||||
- **ASSIMP_BUILD_ASSIMP_VIEW (default ON, if DirectX found, OFF otherwise)**: Build Assimp view tool (requires DirectX).
|
||||
|
|
|
@ -108,9 +108,9 @@ OPTION( ASSIMP_INSTALL
|
|||
"Disable this if you want to use assimp as a submodule."
|
||||
ON
|
||||
)
|
||||
OPTION ( ASSIMP_ERROR_MAX
|
||||
"Enable all warnings."
|
||||
OFF
|
||||
OPTION ( ASSIMP_WARNINGS_AS_ERRORS
|
||||
"Treat all warnings as errors."
|
||||
ON
|
||||
)
|
||||
OPTION ( ASSIMP_ASAN
|
||||
"Enable AddressSanitizer."
|
||||
|
@ -139,10 +139,6 @@ IF (WIN32)
|
|||
ADD_DEFINITIONS( -DWIN32_LEAN_AND_MEAN )
|
||||
|
||||
IF(MSVC)
|
||||
OPTION (ASSIMP_BUILD_ASSIMP_VIEW
|
||||
"If the Assimp view tool is built. (requires DirectX)"
|
||||
OFF )
|
||||
|
||||
OPTION( ASSIMP_INSTALL_PDB
|
||||
"Install MSVC debug files."
|
||||
ON )
|
||||
|
@ -184,6 +180,7 @@ ENDIF()
|
|||
IF(NOT BUILD_SHARED_LIBS)
|
||||
MESSAGE(STATUS "Shared libraries disabled")
|
||||
SET(LINK_SEARCH_START_STATIC TRUE)
|
||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX} ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
ELSE()
|
||||
MESSAGE(STATUS "Shared libraries enabled")
|
||||
ENDIF()
|
||||
|
@ -231,16 +228,6 @@ IF(ASSIMP_DOUBLE_PRECISION)
|
|||
ADD_DEFINITIONS(-DASSIMP_DOUBLE_PRECISION)
|
||||
ENDIF()
|
||||
|
||||
CONFIGURE_FILE(
|
||||
${CMAKE_CURRENT_LIST_DIR}/revision.h.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/revision.h
|
||||
)
|
||||
|
||||
CONFIGURE_FILE(
|
||||
${CMAKE_CURRENT_LIST_DIR}/include/assimp/config.h.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/include/assimp/config.h
|
||||
)
|
||||
|
||||
INCLUDE_DIRECTORIES( BEFORE
|
||||
./
|
||||
code/
|
||||
|
@ -337,16 +324,6 @@ IF (ASSIMP_COVERALLS)
|
|||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
|
||||
ENDIF()
|
||||
|
||||
IF (ASSIMP_ERROR_MAX)
|
||||
MESSAGE(STATUS "Turning on all warnings")
|
||||
IF (MSVC)
|
||||
ADD_COMPILE_OPTIONS(/W4) # NB: there is a /Wall option, pedantic mode
|
||||
ELSE()
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF (ASSIMP_ASAN)
|
||||
MESSAGE(STATUS "AddressSanitizer enabled")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
|
||||
|
@ -707,10 +684,12 @@ ENDIF()
|
|||
|
||||
# Main assimp code
|
||||
ADD_SUBDIRECTORY( code/ )
|
||||
|
||||
IF ( ASSIMP_BUILD_ASSIMP_TOOLS )
|
||||
# The viewer for windows only
|
||||
IF (WIN32)
|
||||
OPTION ( ASSIMP_BUILD_ASSIMP_VIEW "If the Assimp view tool is built. (requires DirectX)" OFF )
|
||||
FIND_PACKAGE(DirectX)
|
||||
OPTION ( ASSIMP_BUILD_ASSIMP_VIEW "If the Assimp view tool is built. (requires DirectX)" ${DirectX_FOUND} )
|
||||
IF ( ASSIMP_BUILD_ASSIMP_VIEW )
|
||||
ADD_SUBDIRECTORY( tools/assimp_view/ )
|
||||
ENDIF ()
|
||||
|
@ -735,12 +714,22 @@ IF ( ASSIMP_BUILD_TESTS )
|
|||
ADD_SUBDIRECTORY( test/ )
|
||||
ENDIF ()
|
||||
|
||||
# Generate a pkg-config .pc for the Assimp library.
|
||||
# Generate a pkg-config .pc, revision.h, and config.h for the Assimp library.
|
||||
CONFIGURE_FILE( "${PROJECT_SOURCE_DIR}/assimp.pc.in" "${PROJECT_BINARY_DIR}/assimp.pc" @ONLY )
|
||||
IF ( ASSIMP_INSTALL )
|
||||
INSTALL( FILES "${PROJECT_BINARY_DIR}/assimp.pc" DESTINATION ${ASSIMP_LIB_INSTALL_DIR}/pkgconfig/ COMPONENT ${LIBASSIMP-DEV_COMPONENT})
|
||||
ENDIF()
|
||||
|
||||
CONFIGURE_FILE(
|
||||
${CMAKE_CURRENT_LIST_DIR}/revision.h.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/revision.h
|
||||
)
|
||||
|
||||
CONFIGURE_FILE(
|
||||
${CMAKE_CURRENT_LIST_DIR}/include/assimp/config.h.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/include/assimp/config.h
|
||||
)
|
||||
|
||||
IF ( ASSIMP_INSTALL )
|
||||
IF(CMAKE_CPACK_COMMAND AND UNIX AND ASSIMP_OPT_BUILD_PACKAGES)
|
||||
# Packing information
|
||||
|
|
|
@ -9,9 +9,11 @@ A library to import and export various 3d-model-formats including scene-post-pro
|
|||
src="https://scan.coverity.com/projects/5607/badge.svg"/>
|
||||
</a>
|
||||
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/9973693b7bdd4543b07084d5d9cf4745)](https://www.codacy.com/gh/assimp/assimp/dashboard?utm_source=github.com&utm_medium=referral&utm_content=assimp/assimp&utm_campaign=Badge_Grade)
|
||||
|
||||
[![Coverage Status](https://coveralls.io/repos/github/assimp/assimp/badge.svg?branch=master)](https://coveralls.io/github/assimp/assimp?branch=master)
|
||||
[![Join the chat at https://gitter.im/assimp/assimp](https://badges.gitter.im/assimp/assimp.svg)](https://gitter.im/assimp/assimp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/assimp/assimp.svg)](http://isitmaintained.com/project/assimp/assimp "Average time to resolve an issue")
|
||||
[![Percentage of issues still open](http://isitmaintained.com/badge/open/assimp/assimp.svg)](http://isitmaintained.com/project/assimp/assimp "Percentage of issues still open")
|
||||
[![Total alerts](https://img.shields.io/lgtm/alerts/g/assimp/assimp.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/assimp/assimp/alerts/)
|
||||
<br>
|
||||
|
||||
|
@ -58,6 +60,7 @@ Open Asset Import Library is implemented in C++. The directory structure looks l
|
|||
/code Source code
|
||||
/contrib Third-party libraries
|
||||
/doc Documentation (doxysource and pre-compiled docs)
|
||||
/fuzz Contains the test-code for the Google-Fuzzer project
|
||||
/include Public header C and C++ header files
|
||||
/scripts Scripts used to generate the loading code for some formats
|
||||
/port Ports to other languages and scripts to maintain those.
|
||||
|
|
|
@ -55,7 +55,7 @@ if(WIN32) # The only platform it makes sense to check for DirectX SDK
|
|||
endif(CMAKE_CL_64)
|
||||
find_library(DirectX_LIBRARY NAMES d3d9 HINTS ${DirectX_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX_LIBPATH_SUFFIX})
|
||||
find_library(DirectX_D3DX9_LIBRARY NAMES d3dx9 HINTS ${DirectX_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX_LIBPATH_SUFFIX})
|
||||
find_library(DirectX_DXERR_LIBRARY NAMES DxErr HINTS ${DirectX_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX_LIBPATH_SUFFIX})
|
||||
find_library(DirectX_DXERR_LIBRARY NAMES DxErr DxErr9 HINTS ${DirectX_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX_LIBPATH_SUFFIX})
|
||||
find_library(DirectX_DXGUID_LIBRARY NAMES dxguid HINTS ${DirectX_LIB_SEARCH_PATH} PATH_SUFFIXES ${DirectX_LIBPATH_SUFFIX})
|
||||
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ bool getNodeAttribute(const XmlNode &node, const std::string &attribute, int &va
|
|||
return false;
|
||||
}
|
||||
|
||||
aiMatrix4x4 parseTransformMatrix(std::string matrixStr) {
|
||||
aiMatrix4x4 parseTransformMatrix(const std::string& matrixStr) {
|
||||
// split the string
|
||||
std::vector<float> numbers;
|
||||
std::string currentNumber;
|
||||
|
|
|
@ -646,10 +646,13 @@ void Parser::ParseLV2MaterialBlock(ASE::Material &mat) {
|
|||
}
|
||||
|
||||
// get a reference to the material
|
||||
if (iIndex < mat.avSubMaterials.size()) {
|
||||
Material &sMat = mat.avSubMaterials[iIndex];
|
||||
|
||||
// parse the material block
|
||||
ParseLV2MaterialBlock(sMat);
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -365,7 +365,7 @@ static void WriteDump(const char *pFile, const char *cmd, const aiScene *scene,
|
|||
|
||||
ioprintf(io, "\t\t\t<MatProperty key=\"%s\" \n\t\t\ttype=\"%s\" tex_usage=\"%s\" tex_index=\"%u\"",
|
||||
prop->mKey.data, sz,
|
||||
::TextureTypeToString((aiTextureType)prop->mSemantic), prop->mIndex);
|
||||
::aiTextureTypeToString((aiTextureType)prop->mSemantic), prop->mIndex);
|
||||
|
||||
if (prop->mType == aiPTI_Float) {
|
||||
ioprintf(io, " size=\"%i\">\n\t\t\t\t",
|
||||
|
|
|
@ -281,7 +281,7 @@ void BlenderImporter::ExtractScene(Scene &out, const FileDatabase &file) {
|
|||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void BlenderImporter::ParseSubCollection(const Blender::Scene &in, aiNode *root, std::shared_ptr<Collection> collection, ConversionData &conv_data) {
|
||||
void BlenderImporter::ParseSubCollection(const Blender::Scene &in, aiNode *root, const std::shared_ptr<Collection>& collection, ConversionData &conv_data) {
|
||||
|
||||
std::deque<Object *> root_objects;
|
||||
// Count number of objects
|
||||
|
|
|
@ -117,7 +117,7 @@ protected:
|
|||
void InternReadFile(const std::string &pFile, aiScene *pScene, IOSystem *pIOHandler) override;
|
||||
void ParseBlendFile(Blender::FileDatabase &out, std::shared_ptr<IOStream> stream);
|
||||
void ExtractScene(Blender::Scene &out, const Blender::FileDatabase &file);
|
||||
void ParseSubCollection(const Blender::Scene &in, aiNode *root, std::shared_ptr<Blender::Collection> collection, Blender::ConversionData &conv_data);
|
||||
void ParseSubCollection(const Blender::Scene &in, aiNode *root, const std::shared_ptr<Blender::Collection>& collection, Blender::ConversionData &conv_data);
|
||||
void ConvertBlendFile(aiScene *out, const Blender::Scene &in, const Blender::FileDatabase &file);
|
||||
|
||||
private:
|
||||
|
|
|
@ -232,7 +232,6 @@ void FBXConverter::ConvertNodes(uint64_t id, aiNode *parent, aiNode *root_node)
|
|||
nodes_chain.clear();
|
||||
post_nodes_chain.clear();
|
||||
|
||||
aiMatrix4x4 new_abs_transform = parent->mTransformation;
|
||||
std::string node_name = FixNodeName(model->Name());
|
||||
// even though there is only a single input node, the design of
|
||||
// assimp (or rather: the complicated transformation chain that
|
||||
|
@ -266,12 +265,10 @@ void FBXConverter::ConvertNodes(uint64_t id, aiNode *parent, aiNode *root_node)
|
|||
|
||||
child->mParent = last_parent;
|
||||
last_parent = child.mNode;
|
||||
|
||||
new_abs_transform *= child->mTransformation;
|
||||
}
|
||||
|
||||
// attach geometry
|
||||
ConvertModel(*model, nodes_chain.back().mNode, root_node, new_abs_transform);
|
||||
ConvertModel(*model, nodes_chain.back().mNode, root_node);
|
||||
|
||||
// check if there will be any child nodes
|
||||
const std::vector<const Connection *> &child_conns = doc.GetConnectionsByDestinationSequenced(model->ID(), "Model");
|
||||
|
@ -290,8 +287,6 @@ void FBXConverter::ConvertNodes(uint64_t id, aiNode *parent, aiNode *root_node)
|
|||
|
||||
postnode->mParent = last_parent;
|
||||
last_parent = postnode.mNode;
|
||||
|
||||
new_abs_transform *= postnode->mTransformation;
|
||||
}
|
||||
} else {
|
||||
// free the nodes we allocated as we don't need them
|
||||
|
@ -899,8 +894,7 @@ void FBXConverter::SetupNodeMetadata(const Model &model, aiNode &nd) {
|
|||
}
|
||||
}
|
||||
|
||||
void FBXConverter::ConvertModel(const Model &model, aiNode *parent, aiNode *root_node,
|
||||
const aiMatrix4x4 &absolute_transform) {
|
||||
void FBXConverter::ConvertModel(const Model &model, aiNode *parent, aiNode *root_node) {
|
||||
const std::vector<const Geometry *> &geos = model.GetGeometry();
|
||||
|
||||
std::vector<unsigned int> meshes;
|
||||
|
@ -911,8 +905,7 @@ void FBXConverter::ConvertModel(const Model &model, aiNode *parent, aiNode *root
|
|||
const MeshGeometry *const mesh = dynamic_cast<const MeshGeometry *>(geo);
|
||||
const LineGeometry *const line = dynamic_cast<const LineGeometry *>(geo);
|
||||
if (mesh) {
|
||||
const std::vector<unsigned int> &indices = ConvertMesh(*mesh, model, parent, root_node,
|
||||
absolute_transform);
|
||||
const std::vector<unsigned int> &indices = ConvertMesh(*mesh, model, parent, root_node);
|
||||
std::copy(indices.begin(), indices.end(), std::back_inserter(meshes));
|
||||
} else if (line) {
|
||||
const std::vector<unsigned int> &indices = ConvertLine(*line, root_node);
|
||||
|
@ -933,8 +926,7 @@ void FBXConverter::ConvertModel(const Model &model, aiNode *parent, aiNode *root
|
|||
}
|
||||
|
||||
std::vector<unsigned int>
|
||||
FBXConverter::ConvertMesh(const MeshGeometry &mesh, const Model &model, aiNode *parent, aiNode *root_node,
|
||||
const aiMatrix4x4 &absolute_transform) {
|
||||
FBXConverter::ConvertMesh(const MeshGeometry &mesh, const Model &model, aiNode *parent, aiNode *root_node) {
|
||||
std::vector<unsigned int> temp;
|
||||
|
||||
MeshMap::const_iterator it = meshes_converted.find(&mesh);
|
||||
|
@ -957,13 +949,13 @@ FBXConverter::ConvertMesh(const MeshGeometry &mesh, const Model &model, aiNode *
|
|||
const MatIndexArray::value_type base = mindices[0];
|
||||
for (MatIndexArray::value_type index : mindices) {
|
||||
if (index != base) {
|
||||
return ConvertMeshMultiMaterial(mesh, model, parent, root_node, absolute_transform);
|
||||
return ConvertMeshMultiMaterial(mesh, model, parent, root_node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// faster code-path, just copy the data
|
||||
temp.push_back(ConvertMeshSingleMaterial(mesh, model, absolute_transform, parent, root_node));
|
||||
temp.push_back(ConvertMeshSingleMaterial(mesh, model, parent, root_node));
|
||||
return temp;
|
||||
}
|
||||
|
||||
|
@ -1032,8 +1024,7 @@ aiMesh *FBXConverter::SetupEmptyMesh(const Geometry &mesh, aiNode *parent) {
|
|||
}
|
||||
|
||||
unsigned int FBXConverter::ConvertMeshSingleMaterial(const MeshGeometry &mesh, const Model &model,
|
||||
const aiMatrix4x4 &absolute_transform, aiNode *parent,
|
||||
aiNode *) {
|
||||
aiNode *parent, aiNode *) {
|
||||
const MatIndexArray &mindices = mesh.GetMaterialIndices();
|
||||
aiMesh *const out_mesh = SetupEmptyMesh(mesh, parent);
|
||||
|
||||
|
@ -1152,7 +1143,7 @@ unsigned int FBXConverter::ConvertMeshSingleMaterial(const MeshGeometry &mesh, c
|
|||
}
|
||||
|
||||
if (doc.Settings().readWeights && mesh.DeformerSkin() != nullptr) {
|
||||
ConvertWeights(out_mesh, mesh, absolute_transform, parent, NO_MATERIAL_SEPARATION, nullptr);
|
||||
ConvertWeights(out_mesh, mesh, parent, NO_MATERIAL_SEPARATION, nullptr);
|
||||
}
|
||||
|
||||
std::vector<aiAnimMesh *> animMeshes;
|
||||
|
@ -1200,8 +1191,7 @@ unsigned int FBXConverter::ConvertMeshSingleMaterial(const MeshGeometry &mesh, c
|
|||
|
||||
std::vector<unsigned int>
|
||||
FBXConverter::ConvertMeshMultiMaterial(const MeshGeometry &mesh, const Model &model, aiNode *parent,
|
||||
aiNode *root_node,
|
||||
const aiMatrix4x4 &absolute_transform) {
|
||||
aiNode *root_node) {
|
||||
const MatIndexArray &mindices = mesh.GetMaterialIndices();
|
||||
ai_assert(mindices.size());
|
||||
|
||||
|
@ -1211,7 +1201,7 @@ FBXConverter::ConvertMeshMultiMaterial(const MeshGeometry &mesh, const Model &mo
|
|||
for (MatIndexArray::value_type index : mindices) {
|
||||
if (had.find(index) == had.end()) {
|
||||
|
||||
indices.push_back(ConvertMeshMultiMaterial(mesh, model, index, parent, root_node, absolute_transform));
|
||||
indices.push_back(ConvertMeshMultiMaterial(mesh, model, index, parent, root_node));
|
||||
had.insert(index);
|
||||
}
|
||||
}
|
||||
|
@ -1221,8 +1211,7 @@ FBXConverter::ConvertMeshMultiMaterial(const MeshGeometry &mesh, const Model &mo
|
|||
|
||||
unsigned int FBXConverter::ConvertMeshMultiMaterial(const MeshGeometry &mesh, const Model &model,
|
||||
MatIndexArray::value_type index,
|
||||
aiNode *parent, aiNode *,
|
||||
const aiMatrix4x4 &absolute_transform) {
|
||||
aiNode *parent, aiNode *) {
|
||||
aiMesh *const out_mesh = SetupEmptyMesh(mesh, parent);
|
||||
|
||||
const MatIndexArray &mindices = mesh.GetMaterialIndices();
|
||||
|
@ -1385,7 +1374,7 @@ unsigned int FBXConverter::ConvertMeshMultiMaterial(const MeshGeometry &mesh, co
|
|||
ConvertMaterialForMesh(out_mesh, model, mesh, index);
|
||||
|
||||
if (process_weights) {
|
||||
ConvertWeights(out_mesh, mesh, absolute_transform, parent, index, &reverseMapping);
|
||||
ConvertWeights(out_mesh, mesh, parent, index, &reverseMapping);
|
||||
}
|
||||
|
||||
std::vector<aiAnimMesh *> animMeshes;
|
||||
|
@ -1436,7 +1425,6 @@ unsigned int FBXConverter::ConvertMeshMultiMaterial(const MeshGeometry &mesh, co
|
|||
}
|
||||
|
||||
void FBXConverter::ConvertWeights(aiMesh *out, const MeshGeometry &geo,
|
||||
const aiMatrix4x4 &absolute_transform,
|
||||
aiNode *parent, unsigned int materialIndex,
|
||||
std::vector<unsigned int> *outputVertStartIndices) {
|
||||
ai_assert(geo.DeformerSkin());
|
||||
|
@ -1508,7 +1496,7 @@ void FBXConverter::ConvertWeights(aiMesh *out, const MeshGeometry &geo,
|
|||
// XXX this could be heavily simplified by collecting the bone
|
||||
// data in a single step.
|
||||
ConvertCluster(bones, cluster, out_indices, index_out_indices,
|
||||
count_out_indices, absolute_transform, parent);
|
||||
count_out_indices, parent);
|
||||
}
|
||||
|
||||
bone_map.clear();
|
||||
|
@ -1537,8 +1525,7 @@ const aiNode *GetNodeByName(aiNode *current_node) {
|
|||
|
||||
void FBXConverter::ConvertCluster(std::vector<aiBone *> &local_mesh_bones, const Cluster *cl,
|
||||
std::vector<size_t> &out_indices, std::vector<size_t> &index_out_indices,
|
||||
std::vector<size_t> &count_out_indices, const aiMatrix4x4 &absolute_transform,
|
||||
aiNode *) {
|
||||
std::vector<size_t> &count_out_indices, aiNode *) {
|
||||
ai_assert(cl); // make sure cluster valid
|
||||
std::string deformer_name = cl->TargetNode()->Name();
|
||||
aiString bone_name = aiString(FixNodeName(deformer_name));
|
||||
|
@ -1553,14 +1540,16 @@ void FBXConverter::ConvertCluster(std::vector<aiBone *> &local_mesh_bones, const
|
|||
bone = new aiBone();
|
||||
bone->mName = bone_name;
|
||||
|
||||
bone->mOffsetMatrix = cl->Transform();
|
||||
// store local transform link for post processing
|
||||
/*
|
||||
bone->mOffsetMatrix = cl->TransformLink();
|
||||
bone->mOffsetMatrix.Inverse();
|
||||
|
||||
aiMatrix4x4 matrix = (aiMatrix4x4)absolute_transform;
|
||||
|
||||
bone->mOffsetMatrix = bone->mOffsetMatrix * matrix; // * mesh_offset
|
||||
|
||||
*/
|
||||
//
|
||||
// Now calculate the aiVertexWeights
|
||||
//
|
||||
|
|
|
@ -180,14 +180,12 @@ private:
|
|||
void SetupNodeMetadata(const Model& model, aiNode& nd);
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void ConvertModel(const Model &model, aiNode *parent, aiNode *root_node,
|
||||
const aiMatrix4x4 &absolute_transform);
|
||||
void ConvertModel(const Model &model, aiNode *parent, aiNode *root_node);
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// MeshGeometry -> aiMesh, return mesh index + 1 or 0 if the conversion failed
|
||||
std::vector<unsigned int>
|
||||
ConvertMesh(const MeshGeometry &mesh, const Model &model, aiNode *parent, aiNode *root_node,
|
||||
const aiMatrix4x4 &absolute_transform);
|
||||
ConvertMesh(const MeshGeometry &mesh, const Model &model, aiNode *parent, aiNode *root_node);
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
std::vector<unsigned int> ConvertLine(const LineGeometry& line, aiNode *root_node);
|
||||
|
@ -197,17 +195,15 @@ private:
|
|||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
unsigned int ConvertMeshSingleMaterial(const MeshGeometry &mesh, const Model &model,
|
||||
const aiMatrix4x4 &absolute_transform, aiNode *parent,
|
||||
aiNode *root_node);
|
||||
aiNode *parent, aiNode *root_node);
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
std::vector<unsigned int>
|
||||
ConvertMeshMultiMaterial(const MeshGeometry &mesh, const Model &model, aiNode *parent, aiNode *root_node,
|
||||
const aiMatrix4x4 &absolute_transform);
|
||||
ConvertMeshMultiMaterial(const MeshGeometry &mesh, const Model &model, aiNode *parent, aiNode *root_node);
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
unsigned int ConvertMeshMultiMaterial(const MeshGeometry &mesh, const Model &model, MatIndexArray::value_type index,
|
||||
aiNode *parent, aiNode *root_node, const aiMatrix4x4 &absolute_transform);
|
||||
aiNode *parent, aiNode *root_node);
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
static const unsigned int NO_MATERIAL_SEPARATION = /* std::numeric_limits<unsigned int>::max() */
|
||||
|
@ -220,15 +216,14 @@ private:
|
|||
* - outputVertStartIndices is only used when a material index is specified, it gives for
|
||||
* each output vertex the DOM index it maps to.
|
||||
*/
|
||||
void ConvertWeights(aiMesh *out, const MeshGeometry &geo, const aiMatrix4x4 &absolute_transform,
|
||||
aiNode *parent = nullptr, unsigned int materialIndex = NO_MATERIAL_SEPARATION,
|
||||
void ConvertWeights(aiMesh *out, const MeshGeometry &geo, aiNode *parent = nullptr,
|
||||
unsigned int materialIndex = NO_MATERIAL_SEPARATION,
|
||||
std::vector<unsigned int> *outputVertStartIndices = nullptr);
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void ConvertCluster(std::vector<aiBone *> &local_mesh_bones, const Cluster *cl,
|
||||
std::vector<size_t> &out_indices, std::vector<size_t> &index_out_indices,
|
||||
std::vector<size_t> &count_out_indices, const aiMatrix4x4 &absolute_transform,
|
||||
aiNode *parent );
|
||||
std::vector<size_t> &count_out_indices, aiNode *parent );
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void ConvertMaterialForMesh(aiMesh* out, const Model& model, const MeshGeometry& geo,
|
||||
|
|
|
@ -4,7 +4,6 @@ Open Asset Import Library (assimp)
|
|||
|
||||
Copyright (c) 2006-2022, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
|
@ -51,7 +50,6 @@ namespace Assimp {
|
|||
namespace IFC {
|
||||
namespace {
|
||||
|
||||
|
||||
// --------------------------------------------------------------------------------
|
||||
// Conic is the base class for Circle and Ellipse
|
||||
// --------------------------------------------------------------------------------
|
||||
|
@ -546,8 +544,10 @@ IfcFloat RecursiveSearch(const Curve* cv, const IfcVector3& val, IfcFloat a, Ifc
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef __INTEL_LLVM_COMPILER
|
||||
ai_assert( min_diff[ 0 ] != inf );
|
||||
ai_assert( min_diff[ 1 ] != inf );
|
||||
#endif // __INTEL_LLVM_COMPILER
|
||||
if ( std::fabs(a-min_point[0]) < threshold || recurse >= max_recurse) {
|
||||
return min_point[0];
|
||||
}
|
||||
|
@ -606,8 +606,10 @@ bool BoundedCurve::IsClosed() const {
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
void BoundedCurve::SampleDiscrete(TempMesh& out) const {
|
||||
const ParamRange& range = GetParametricRange();
|
||||
#ifndef __INTEL_LLVM_COMPILER
|
||||
ai_assert( range.first != std::numeric_limits<IfcFloat>::infinity() );
|
||||
ai_assert( range.second != std::numeric_limits<IfcFloat>::infinity() );
|
||||
#endif // __INTEL_LLVM_COMPILER
|
||||
|
||||
return SampleDiscrete(out,range.first,range.second);
|
||||
}
|
||||
|
|
|
@ -1428,7 +1428,7 @@ bool GenerateOpenings(std::vector<TempOpening>& openings,
|
|||
return true;
|
||||
}
|
||||
|
||||
std::vector<IfcVector2> GetContourInPlane2D(std::shared_ptr<TempMesh> mesh,IfcMatrix3 planeSpace,
|
||||
std::vector<IfcVector2> GetContourInPlane2D(const std::shared_ptr<TempMesh>& mesh,IfcMatrix3 planeSpace,
|
||||
IfcVector3 planeNor,IfcFloat planeOffset,
|
||||
IfcVector3 extrusionDir,IfcVector3& wall_extrusion,bool& first,bool& ok) {
|
||||
std::vector<IfcVector2> contour;
|
||||
|
@ -1491,7 +1491,7 @@ static void logSegment(std::pair<IfcVector2,IfcVector2> segment) {
|
|||
IFCImporter::LogInfo(msg2.str().c_str());
|
||||
}
|
||||
|
||||
std::vector<std::vector<IfcVector2>> GetContoursInPlane3D(std::shared_ptr<TempMesh> mesh,IfcMatrix3 planeSpace,
|
||||
std::vector<std::vector<IfcVector2>> GetContoursInPlane3D(const std::shared_ptr<TempMesh>& mesh,IfcMatrix3 planeSpace,
|
||||
IfcFloat planeOffset) {
|
||||
|
||||
{
|
||||
|
@ -1676,7 +1676,7 @@ std::vector<std::vector<IfcVector2>> GetContoursInPlane3D(std::shared_ptr<TempMe
|
|||
std::stringstream msg;
|
||||
msg << "GetContoursInPlane3D: found " << contours.size() << " contours:\n";
|
||||
|
||||
for(auto c : contours) {
|
||||
for(const auto& c : contours) {
|
||||
msg << " Contour: \n";
|
||||
for(auto p : c) {
|
||||
msg << " " << p.x << " " << p.y << " \n";
|
||||
|
@ -1690,7 +1690,7 @@ std::vector<std::vector<IfcVector2>> GetContoursInPlane3D(std::shared_ptr<TempMe
|
|||
return contours;
|
||||
}
|
||||
|
||||
std::vector<std::vector<IfcVector2>> GetContoursInPlane(std::shared_ptr<TempMesh> mesh,IfcMatrix3 planeSpace,
|
||||
std::vector<std::vector<IfcVector2>> GetContoursInPlane(const std::shared_ptr<TempMesh>& mesh,IfcMatrix3 planeSpace,
|
||||
IfcVector3 planeNor,IfcFloat planeOffset,
|
||||
IfcVector3 extrusionDir,IfcVector3& wall_extrusion,bool& first) {
|
||||
|
||||
|
|
|
@ -52,9 +52,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <assimp/scene.h>
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
#include <fstream>
|
||||
|
||||
#include <iomanip>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
|
||||
static const aiImporterDesc desc = { "MMD Importer",
|
||||
"",
|
||||
|
@ -102,26 +103,32 @@ const aiImporterDesc *MMDImporter::GetInfo() const {
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
// MMD import implementation
|
||||
void MMDImporter::InternReadFile(const std::string &file, aiScene *pScene,
|
||||
IOSystem * /*pIOHandler*/) {
|
||||
// Read file by istream
|
||||
std::filebuf fb;
|
||||
if (!fb.open(file, std::ios::in | std::ios::binary)) {
|
||||
IOSystem* pIOHandler) {
|
||||
|
||||
auto streamCloser = [&](IOStream *pStream) {
|
||||
pIOHandler->Close(pStream);
|
||||
};
|
||||
|
||||
static const std::string mode = "rb";
|
||||
const std::unique_ptr<IOStream, decltype(streamCloser)> fileStream(pIOHandler->Open(file, mode), streamCloser);
|
||||
|
||||
if (fileStream == nullptr) {
|
||||
throw DeadlyImportError("Failed to open file ", file, ".");
|
||||
}
|
||||
|
||||
std::istream fileStream(&fb);
|
||||
|
||||
// Get the file-size and validate it, throwing an exception when fails
|
||||
fileStream.seekg(0, fileStream.end);
|
||||
size_t fileSize = static_cast<size_t>(fileStream.tellg());
|
||||
fileStream.seekg(0, fileStream.beg);
|
||||
|
||||
if (fileSize < sizeof(pmx::PmxModel)) {
|
||||
const size_t fileSize = fileStream->FileSize();
|
||||
if (fileSize < sizeof(pmx::PmxModel))
|
||||
{
|
||||
throw DeadlyImportError(file, " is too small.");
|
||||
}
|
||||
|
||||
std::vector<char> contents(fileStream->FileSize());
|
||||
fileStream->Read(contents.data(), 1, contents.size());
|
||||
|
||||
std::istringstream iss(std::string(contents.begin(), contents.end()));
|
||||
|
||||
pmx::PmxModel model;
|
||||
model.Read(&fileStream);
|
||||
model.Read(&iss);
|
||||
|
||||
CreateDataFromImport(&model, pScene);
|
||||
}
|
||||
|
|
|
@ -333,7 +333,7 @@ void X3DImporter::readHead(XmlNode &node) {
|
|||
}
|
||||
mScene->mMetaData = aiMetadata::Alloc(static_cast<unsigned int>(metaArray.size()));
|
||||
unsigned int i = 0;
|
||||
for (auto currentMeta : metaArray) {
|
||||
for (const auto& currentMeta : metaArray) {
|
||||
mScene->mMetaData->Set(i, currentMeta.name, aiString(currentMeta.value));
|
||||
++i;
|
||||
}
|
||||
|
|
|
@ -150,7 +150,7 @@ SET( Core_SRCS
|
|||
Common/Assimp.cpp
|
||||
)
|
||||
|
||||
IF(MSVC)
|
||||
IF(MSVC OR (MINGW AND BUILD_SHARED_LIBS))
|
||||
list(APPEND Core_SRCS "res/assimp.rc")
|
||||
ENDIF()
|
||||
|
||||
|
@ -1054,7 +1054,9 @@ ENDIF()
|
|||
# Check dependencies for glTF importer with Open3DGC-compression.
|
||||
# RT-extensions is used in "contrib/Open3DGC/o3dgcTimer.h" for collecting statistics. Pointed file
|
||||
# has implementation for different platforms: WIN32, __MACH__ and other ("else" block).
|
||||
IF (NOT WIN32)
|
||||
FIND_PACKAGE(RT QUIET)
|
||||
ENDIF ()
|
||||
IF (NOT ASSIMP_HUNTER_ENABLED AND (RT_FOUND OR WIN32))
|
||||
SET( ASSIMP_IMPORTER_GLTF_USE_OPEN3DGC 1 )
|
||||
ADD_DEFINITIONS( -DASSIMP_IMPORTER_GLTF_USE_OPEN3DGC=1 )
|
||||
|
@ -1177,11 +1179,13 @@ ADD_LIBRARY(assimp::assimp ALIAS assimp)
|
|||
|
||||
TARGET_USE_COMMON_OUTPUT_DIRECTORY(assimp)
|
||||
|
||||
# enable warnings as errors ########################################
|
||||
IF (ASSIMP_WARNINGS_AS_ERRORS)
|
||||
MESSAGE(STATUS "Treating all warnings as errors (for assimp library only)")
|
||||
IF (MSVC)
|
||||
TARGET_COMPILE_OPTIONS(assimp PRIVATE /WX)
|
||||
TARGET_COMPILE_OPTIONS(assimp PRIVATE /W4 /WX)
|
||||
ELSE()
|
||||
TARGET_COMPILE_OPTIONS(assimp PRIVATE -Werror)
|
||||
TARGET_COMPILE_OPTIONS(assimp PRIVATE -Wall -Werror)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# adds C_FLAGS required to compile zip.c on old GCC 4.x compiler
|
||||
|
@ -1264,6 +1268,16 @@ if( MSVC )
|
|||
set(LIBRARY_SUFFIX "${ASSIMP_LIBRARY_SUFFIX}-${MSVC_PREFIX}-mt" CACHE STRING "the suffix for the assimp windows library")
|
||||
endif()
|
||||
|
||||
if (MINGW)
|
||||
set(LIBRARY_SUFFIX "-${ASSIMP_SOVERSION}" CACHE STRING "the suffix for the assimp MinGW shared library")
|
||||
SET_TARGET_PROPERTIES( assimp PROPERTIES
|
||||
ARCHIVE_OUTPUT_NAME assimp
|
||||
)
|
||||
if (NOT BUILD_SHARED_LIBS)
|
||||
TARGET_LINK_LIBRARIES ( assimp -static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -lwinpthread ) # winpthread is for libminizip.
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "WindowsStore")
|
||||
target_compile_definitions(assimp PUBLIC WindowsStore)
|
||||
TARGET_LINK_LIBRARIES(assimp advapi32)
|
||||
|
@ -1275,12 +1289,6 @@ SET_TARGET_PROPERTIES( assimp PROPERTIES
|
|||
OUTPUT_NAME assimp${LIBRARY_SUFFIX}
|
||||
)
|
||||
|
||||
if (WIN32 AND CMAKE_COMPILER_IS_GNUCXX AND BUILD_SHARED_LIBS)
|
||||
set_target_properties(assimp PROPERTIES
|
||||
SUFFIX "-${ASSIMP_SOVERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if (APPLE)
|
||||
if (ASSIMP_BUILD_FRAMEWORK)
|
||||
SET_TARGET_PROPERTIES( assimp PROPERTIES
|
||||
|
|
|
@ -63,7 +63,7 @@ inline int select_fseek(FILE *file, int64_t offset, int origin) {
|
|||
|
||||
|
||||
|
||||
#if defined _WIN32 && (!defined __GNUC__ || __MSVCRT_VERSION__ >= 0x0601)
|
||||
#if defined _WIN64 && (!defined __GNUC__ || __MSVCRT_VERSION__ >= 0x0601)
|
||||
template <>
|
||||
inline size_t select_ftell<8>(FILE *file) {
|
||||
return (size_t)::_ftelli64(file);
|
||||
|
@ -149,7 +149,7 @@ size_t DefaultIOStream::FileSize() const {
|
|||
//
|
||||
// See here for details:
|
||||
// https://www.securecoding.cert.org/confluence/display/seccode/FIO19-C.+Do+not+use+fseek()+and+ftell()+to+compute+the+size+of+a+regular+file
|
||||
#if defined _WIN32 && (!defined __GNUC__ || __MSVCRT_VERSION__ >= 0x0601)
|
||||
#if defined _WIN64 && (!defined __GNUC__ || __MSVCRT_VERSION__ >= 0x0601)
|
||||
struct __stat64 fileStat;
|
||||
//using fileno + fstat avoids having to handle the filename
|
||||
int err = _fstat64(_fileno(mFile), &fileStat);
|
||||
|
|
|
@ -46,7 +46,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include <assimp/material.h>
|
||||
|
||||
// -------------------------------------------------------------------------------
|
||||
const char *TextureTypeToString(aiTextureType in) {
|
||||
const char *aiTextureTypeToString(aiTextureType in) {
|
||||
switch (in) {
|
||||
case aiTextureType_NONE:
|
||||
return "n/a";
|
||||
|
|
|
@ -590,7 +590,7 @@ void PbrtExporter::WriteMaterial(int m) {
|
|||
for (int i = 1; i <= aiTextureType_UNKNOWN; i++) {
|
||||
int count = material->GetTextureCount(aiTextureType(i));
|
||||
if (count > 0)
|
||||
mOutput << TextureTypeToString(aiTextureType(i)) << ": " << count << " ";
|
||||
mOutput << aiTextureTypeToString(aiTextureType(i)) << ": " << count << " ";
|
||||
}
|
||||
mOutput << "\n";
|
||||
|
||||
|
|
|
@ -415,7 +415,7 @@ void ComputeUVMappingProcess::Execute( aiScene* pScene)
|
|||
if (!DefaultLogger::isNullLogger())
|
||||
{
|
||||
ai_snprintf(buffer, 1024, "Found non-UV mapped texture (%s,%u). Mapping type: %s",
|
||||
TextureTypeToString((aiTextureType)prop->mSemantic),prop->mIndex,
|
||||
aiTextureTypeToString((aiTextureType)prop->mSemantic),prop->mIndex,
|
||||
MappingTypeToString(mapping));
|
||||
|
||||
ASSIMP_LOG_INFO(buffer);
|
||||
|
|
|
@ -521,7 +521,7 @@ void ValidateDSProcess::Validate(const aiAnimation *pAnimation) {
|
|||
// ------------------------------------------------------------------------------------------------
|
||||
void ValidateDSProcess::SearchForInvalidTextures(const aiMaterial *pMaterial,
|
||||
aiTextureType type) {
|
||||
const char *szType = TextureTypeToString(type);
|
||||
const char *szType = aiTextureTypeToString(type);
|
||||
|
||||
// ****************************************************************************
|
||||
// Search all keys of the material ...
|
||||
|
|
|
@ -1,80 +1,37 @@
|
|||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
#include "revision.h"
|
||||
#include "winres.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#define APSTUDIO_HIDDEN_SYMBOLS
|
||||
#include "windows.h"
|
||||
#undef APSTUDIO_HIDDEN_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Deutsch (Deutschland) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
|
||||
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION VER_FILEVERSION
|
||||
PRODUCTVERSION VER_FILEVERSION
|
||||
FILEFLAGSMASK 0x17L
|
||||
FILEFLAGSMASK VS_FF_DEBUG
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
FILEFLAGS VS_FF_DEBUG
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x7L
|
||||
FILESUBTYPE 0x0L
|
||||
FILEOS VOS_NT
|
||||
FILETYPE VFT_DLL
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040704b0"
|
||||
BLOCK "000004B0"
|
||||
BEGIN
|
||||
VALUE "Comments", "Licensed under a 3-clause BSD license"
|
||||
VALUE "CompanyName", "assimp team"
|
||||
VALUE "CompanyName", "ASSIMP Team"
|
||||
VALUE "FileDescription", "Open Asset Import Library"
|
||||
VALUE "FileVersion", VER_FILEVERSION
|
||||
VALUE "FileVersion", VER_FILEVERSION_STR
|
||||
VALUE "InternalName", "assimp"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2006-2020"
|
||||
VALUE "LegalCopyright", VER_COPYRIGHT_STR
|
||||
VALUE "OriginalFilename", VER_ORIGINAL_FILENAME_STR
|
||||
VALUE "ProductName", "Open Asset Import Library"
|
||||
VALUE "ProductVersion", VER_FILEVERSION_STR
|
||||
,0
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x407, 1200
|
||||
VALUE "Translation", 0x0, 65001
|
||||
END
|
||||
END
|
||||
|
||||
#endif // Deutsch (Deutschland) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by assimp.rc
|
||||
|
||||
// Next standard values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 101
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
|
@ -1,63 +0,0 @@
|
|||
/*
|
||||
* Boost.Foreach support for pugixml classes.
|
||||
* This file is provided to the public domain.
|
||||
* Written by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
|
||||
*/
|
||||
|
||||
#ifndef HEADER_PUGIXML_FOREACH_HPP
|
||||
#define HEADER_PUGIXML_FOREACH_HPP
|
||||
|
||||
#include <boost/range/iterator.hpp>
|
||||
|
||||
#include "pugixml.hpp"
|
||||
|
||||
/*
|
||||
* These types add support for BOOST_FOREACH macro to xml_node and xml_document classes (child iteration only).
|
||||
* Example usage:
|
||||
* BOOST_FOREACH(xml_node n, doc) {}
|
||||
*/
|
||||
|
||||
namespace boost
|
||||
{
|
||||
template<> struct range_mutable_iterator<pugi::xml_node>
|
||||
{
|
||||
typedef pugi::xml_node::iterator type;
|
||||
};
|
||||
|
||||
template<> struct range_const_iterator<pugi::xml_node>
|
||||
{
|
||||
typedef pugi::xml_node::iterator type;
|
||||
};
|
||||
|
||||
template<> struct range_mutable_iterator<pugi::xml_document>
|
||||
{
|
||||
typedef pugi::xml_document::iterator type;
|
||||
};
|
||||
|
||||
template<> struct range_const_iterator<pugi::xml_document>
|
||||
{
|
||||
typedef pugi::xml_document::iterator type;
|
||||
};
|
||||
}
|
||||
|
||||
/*
|
||||
* These types add support for BOOST_FOREACH macro to xml_node and xml_document classes (child/attribute iteration).
|
||||
* Example usage:
|
||||
* BOOST_FOREACH(xml_node n, children(doc)) {}
|
||||
* BOOST_FOREACH(xml_node n, attributes(doc)) {}
|
||||
*/
|
||||
|
||||
namespace pugi
|
||||
{
|
||||
inline xml_object_range<xml_node_iterator> children(const pugi::xml_node& node)
|
||||
{
|
||||
return node.children();
|
||||
}
|
||||
|
||||
inline xml_object_range<xml_attribute_iterator> attributes(const pugi::xml_node& node)
|
||||
{
|
||||
return node.attributes();
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,6 +1,6 @@
|
|||
pugixml 1.11 - an XML processing library
|
||||
pugixml 1.12 - an XML processing library
|
||||
|
||||
Copyright (C) 2006-2020, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
|
||||
Copyright (C) 2006-2022, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
|
||||
Report bugs and download new versions at https://pugixml.org/
|
||||
|
||||
This is the distribution of pugixml, which is a C++ XML processing library,
|
||||
|
@ -26,7 +26,7 @@ The distribution contains the following folders:
|
|||
|
||||
This library is distributed under the MIT License:
|
||||
|
||||
Copyright (c) 2006-2019 Arseny Kapoulkine
|
||||
Copyright (c) 2006-2022 Arseny Kapoulkine
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* pugixml parser - version 1.11
|
||||
* pugixml parser - version 1.12
|
||||
* --------------------------------------------------------
|
||||
* Copyright (C) 2006-2020, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
|
||||
* Copyright (C) 2006-2022, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
|
||||
* Report bugs and download new versions at https://pugixml.org/
|
||||
*
|
||||
* This library is distributed under the MIT License. See notice at the end
|
||||
|
@ -52,7 +52,7 @@
|
|||
#endif
|
||||
|
||||
/**
|
||||
* Copyright (c) 2006-2020 Arseny Kapoulkine
|
||||
* Copyright (c) 2006-2022 Arseny Kapoulkine
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* pugixml parser - version 1.11
|
||||
* pugixml parser - version 1.12
|
||||
* --------------------------------------------------------
|
||||
* Copyright (C) 2006-2020, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
|
||||
* Copyright (C) 2006-2022, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
|
||||
* Report bugs and download new versions at https://pugixml.org/
|
||||
*
|
||||
* This library is distributed under the MIT License. See notice at the end
|
||||
|
@ -132,8 +132,10 @@ using std::memset;
|
|||
#endif
|
||||
|
||||
// In some environments MSVC is a compiler but the CRT lacks certain MSVC-specific features
|
||||
#if defined(_MSC_VER) && !defined(__S3E__)
|
||||
#if defined(_MSC_VER) && !defined(__S3E__) && !defined(_WIN32_WCE)
|
||||
# define PUGI__MSVC_CRT_VERSION _MSC_VER
|
||||
#elif defined(_WIN32_WCE)
|
||||
# define PUGI__MSVC_CRT_VERSION 1310 // MSVC7.1
|
||||
#endif
|
||||
|
||||
// Not all platforms have snprintf; we define a wrapper that uses snprintf if possible. This only works with buffers with a known size.
|
||||
|
@ -526,7 +528,8 @@ PUGI__NS_BEGIN
|
|||
xml_memory_page* page = xml_memory_page::construct(memory);
|
||||
assert(page);
|
||||
|
||||
page->allocator = _root->allocator;
|
||||
assert(this == _root->allocator);
|
||||
page->allocator = this;
|
||||
|
||||
return page;
|
||||
}
|
||||
|
@ -4732,7 +4735,7 @@ PUGI__NS_BEGIN
|
|||
// we need to get length of entire file to load it in memory; the only (relatively) sane way to do it is via seek/tell trick
|
||||
PUGI__FN xml_parse_status get_file_size(FILE* file, size_t& out_result)
|
||||
{
|
||||
#if defined(PUGI__MSVC_CRT_VERSION) && PUGI__MSVC_CRT_VERSION >= 1400 && !defined(_WIN32_WCE)
|
||||
#if defined(PUGI__MSVC_CRT_VERSION) && PUGI__MSVC_CRT_VERSION >= 1400
|
||||
// there are 64-bit versions of fseek/ftell, let's use them
|
||||
typedef __int64 length_type;
|
||||
|
||||
|
@ -6735,7 +6738,7 @@ namespace pugi
|
|||
return const_cast<xml_node*>(&_wrap); // BCC5 workaround
|
||||
}
|
||||
|
||||
PUGI__FN const xml_node_iterator& xml_node_iterator::operator++()
|
||||
PUGI__FN xml_node_iterator& xml_node_iterator::operator++()
|
||||
{
|
||||
assert(_wrap._root);
|
||||
_wrap._root = _wrap._root->next_sibling;
|
||||
|
@ -6749,7 +6752,7 @@ namespace pugi
|
|||
return temp;
|
||||
}
|
||||
|
||||
PUGI__FN const xml_node_iterator& xml_node_iterator::operator--()
|
||||
PUGI__FN xml_node_iterator& xml_node_iterator::operator--()
|
||||
{
|
||||
_wrap = _wrap._root ? _wrap.previous_sibling() : _parent.last_child();
|
||||
return *this;
|
||||
|
@ -6796,7 +6799,7 @@ namespace pugi
|
|||
return const_cast<xml_attribute*>(&_wrap); // BCC5 workaround
|
||||
}
|
||||
|
||||
PUGI__FN const xml_attribute_iterator& xml_attribute_iterator::operator++()
|
||||
PUGI__FN xml_attribute_iterator& xml_attribute_iterator::operator++()
|
||||
{
|
||||
assert(_wrap._attr);
|
||||
_wrap._attr = _wrap._attr->next_attribute;
|
||||
|
@ -6810,7 +6813,7 @@ namespace pugi
|
|||
return temp;
|
||||
}
|
||||
|
||||
PUGI__FN const xml_attribute_iterator& xml_attribute_iterator::operator--()
|
||||
PUGI__FN xml_attribute_iterator& xml_attribute_iterator::operator--()
|
||||
{
|
||||
_wrap = _wrap._attr ? _wrap.previous_attribute() : _parent.last_attribute();
|
||||
return *this;
|
||||
|
@ -6857,7 +6860,7 @@ namespace pugi
|
|||
return const_cast<xml_node*>(&_wrap); // BCC5 workaround
|
||||
}
|
||||
|
||||
PUGI__FN const xml_named_node_iterator& xml_named_node_iterator::operator++()
|
||||
PUGI__FN xml_named_node_iterator& xml_named_node_iterator::operator++()
|
||||
{
|
||||
assert(_wrap._root);
|
||||
_wrap = _wrap.next_sibling(_name);
|
||||
|
@ -6871,7 +6874,7 @@ namespace pugi
|
|||
return temp;
|
||||
}
|
||||
|
||||
PUGI__FN const xml_named_node_iterator& xml_named_node_iterator::operator--()
|
||||
PUGI__FN xml_named_node_iterator& xml_named_node_iterator::operator--()
|
||||
{
|
||||
if (_wrap._root)
|
||||
_wrap = _wrap.previous_sibling(_name);
|
||||
|
@ -7091,8 +7094,12 @@ namespace pugi
|
|||
#endif
|
||||
|
||||
// move allocation state
|
||||
// note that other->_root may point to the embedded document page, in which case we should keep original (empty) state
|
||||
if (other->_root != PUGI__GETPAGE(other))
|
||||
{
|
||||
doc->_root = other->_root;
|
||||
doc->_busy_size = other->_busy_size;
|
||||
}
|
||||
|
||||
// move buffer state
|
||||
doc->buffer = other->buffer;
|
||||
|
@ -8265,7 +8272,7 @@ PUGI__NS_BEGIN
|
|||
}
|
||||
|
||||
// gets mantissa digits in the form of 0.xxxxx with 0. implied and the exponent
|
||||
#if defined(PUGI__MSVC_CRT_VERSION) && PUGI__MSVC_CRT_VERSION >= 1400 && !defined(_WIN32_WCE)
|
||||
#if defined(PUGI__MSVC_CRT_VERSION) && PUGI__MSVC_CRT_VERSION >= 1400
|
||||
PUGI__FN void convert_number_to_mantissa_exponent(double value, char (&buffer)[32], char** out_mantissa, int* out_exponent)
|
||||
{
|
||||
// get base values
|
||||
|
@ -11822,15 +11829,17 @@ PUGI__NS_BEGIN
|
|||
lexeme_t l = _lexer.current();
|
||||
_lexer.next();
|
||||
|
||||
if (++_depth > xpath_ast_depth_limit)
|
||||
return error_rec();
|
||||
|
||||
if (l == lex_double_slash)
|
||||
{
|
||||
n = alloc_node(ast_step, n, axis_descendant_or_self, nodetest_type_node, 0);
|
||||
if (!n) return 0;
|
||||
|
||||
++_depth;
|
||||
}
|
||||
|
||||
if (++_depth > xpath_ast_depth_limit)
|
||||
return error_rec();
|
||||
|
||||
n = parse_step(n);
|
||||
if (!n) return 0;
|
||||
}
|
||||
|
@ -12995,7 +13004,7 @@ namespace pugi
|
|||
#endif
|
||||
|
||||
/**
|
||||
* Copyright (c) 2006-2020 Arseny Kapoulkine
|
||||
* Copyright (c) 2006-2022 Arseny Kapoulkine
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* pugixml parser - version 1.11
|
||||
* pugixml parser - version 1.12
|
||||
* --------------------------------------------------------
|
||||
* Copyright (C) 2006-2020, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
|
||||
* Copyright (C) 2006-2022, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
|
||||
* Report bugs and download new versions at https://pugixml.org/
|
||||
*
|
||||
* This library is distributed under the MIT License. See notice at the end
|
||||
|
@ -11,10 +11,10 @@
|
|||
* Copyright (C) 2003, by Kristen Wegner (kristen@tima.net)
|
||||
*/
|
||||
|
||||
#ifndef PUGIXML_VERSION
|
||||
// Define version macro; evaluates to major * 1000 + minor * 10 + patch so that it's safe to use in less-than comparisons
|
||||
// Note: pugixml used major * 100 + minor * 10 + patch format up until 1.9 (which had version identifier 190); starting from pugixml 1.10, the minor version number is two digits
|
||||
# define PUGIXML_VERSION 1110
|
||||
#ifndef PUGIXML_VERSION
|
||||
# define PUGIXML_VERSION 1120 // 1.12
|
||||
#endif
|
||||
|
||||
// Include user configuration file (this can define various configuration macros)
|
||||
|
@ -312,6 +312,8 @@ namespace pugi
|
|||
It begin() const { return _begin; }
|
||||
It end() const { return _end; }
|
||||
|
||||
bool empty() const { return _begin == _end; }
|
||||
|
||||
private:
|
||||
It _begin, _end;
|
||||
};
|
||||
|
@ -851,10 +853,10 @@ namespace pugi
|
|||
xml_node& operator*() const;
|
||||
xml_node* operator->() const;
|
||||
|
||||
const xml_node_iterator& operator++();
|
||||
xml_node_iterator& operator++();
|
||||
xml_node_iterator operator++(int);
|
||||
|
||||
const xml_node_iterator& operator--();
|
||||
xml_node_iterator& operator--();
|
||||
xml_node_iterator operator--(int);
|
||||
};
|
||||
|
||||
|
@ -893,10 +895,10 @@ namespace pugi
|
|||
xml_attribute& operator*() const;
|
||||
xml_attribute* operator->() const;
|
||||
|
||||
const xml_attribute_iterator& operator++();
|
||||
xml_attribute_iterator& operator++();
|
||||
xml_attribute_iterator operator++(int);
|
||||
|
||||
const xml_attribute_iterator& operator--();
|
||||
xml_attribute_iterator& operator--();
|
||||
xml_attribute_iterator operator--(int);
|
||||
};
|
||||
|
||||
|
@ -929,10 +931,10 @@ namespace pugi
|
|||
xml_node& operator*() const;
|
||||
xml_node* operator->() const;
|
||||
|
||||
const xml_named_node_iterator& operator++();
|
||||
xml_named_node_iterator& operator++();
|
||||
xml_named_node_iterator operator++(int);
|
||||
|
||||
const xml_named_node_iterator& operator--();
|
||||
xml_named_node_iterator& operator--();
|
||||
xml_named_node_iterator operator--(int);
|
||||
|
||||
private:
|
||||
|
@ -1474,7 +1476,7 @@ namespace std
|
|||
#endif
|
||||
|
||||
/**
|
||||
* Copyright (c) 2006-2020 Arseny Kapoulkine
|
||||
* Copyright (c) 2006-2022 Arseny Kapoulkine
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
|
|
|
@ -335,7 +335,7 @@ enum aiTextureType {
|
|||
|
||||
// -------------------------------------------------------------------------------
|
||||
// Get a string for a given aiTextureType
|
||||
ASSIMP_API const char *TextureTypeToString(enum aiTextureType in);
|
||||
ASSIMP_API const char *aiTextureTypeToString(enum aiTextureType in);
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
/** @brief Defines all shading models supported by the library
|
||||
|
|
|
@ -18,11 +18,12 @@
|
|||
#else
|
||||
#define VER_FILEVERSION_STR STR(VER_MAJOR) "." STR(VER_MINOR) "." STR(VER_PATCH) "." STR(VER_BUILD) " (Commit @GIT_COMMIT_HASH@)"
|
||||
#endif
|
||||
#define VER_COPYRIGHT_STR "\xA9 2006-2022"
|
||||
|
||||
#ifdef NDEBUG
|
||||
#define VER_ORIGINAL_FILENAME_STR "assimp@LIBRARY_SUFFIX@.dll"
|
||||
#define VER_ORIGINAL_FILENAME_STR "@CMAKE_SHARED_LIBRARY_PREFIX@assimp@LIBRARY_SUFFIX@.dll"
|
||||
#else
|
||||
#define VER_ORIGINAL_FILENAME_STR "assimp@LIBRARY_SUFFIX@@CMAKE_DEBUG_POSTFIX@.dll"
|
||||
#define VER_ORIGINAL_FILENAME_STR "@CMAKE_SHARED_LIBRARY_PREFIX@assimp@LIBRARY_SUFFIX@@CMAKE_DEBUG_POSTFIX@.dll"
|
||||
#endif // NDEBUG
|
||||
|
||||
#endif // ASSIMP_REVISION_H_INC
|
||||
|
|
Binary file not shown.
|
@ -42,6 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "UnitTestPCH.h"
|
||||
#include "AbstractImportExportBase.h"
|
||||
#include "AssetLib/MMD/MMDImporter.h"
|
||||
#include "assimp/postprocess.h"
|
||||
|
||||
#include <assimp/Importer.hpp>
|
||||
|
||||
|
@ -51,9 +52,8 @@ class utPMXImporter : public AbstractImportExportBase {
|
|||
public:
|
||||
virtual bool importerTest() {
|
||||
Assimp::Importer importer;
|
||||
/*const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/../models-nonbsd/MMD/Alicia_blade.pmx", aiProcess_ValidateDataStructure );
|
||||
return nullptr != scene;*/
|
||||
return true;
|
||||
const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/../models-nonbsd/MMD/Alicia_blade.pmx", aiProcess_ValidateDataStructure );
|
||||
return nullptr != scene;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -47,16 +47,19 @@ INCLUDE_DIRECTORIES(
|
|||
|
||||
LINK_DIRECTORIES( ${Assimp_BINARY_DIR} ${Assimp_BINARY_DIR}/lib )
|
||||
|
||||
if(WIN32)
|
||||
set ( ASSIMP_CMD_RC assimp_cmd.rc)
|
||||
endif()
|
||||
|
||||
ADD_EXECUTABLE( assimp_cmd
|
||||
assimp_cmd.rc
|
||||
CompareDump.cpp
|
||||
ImageExtractor.cpp
|
||||
Main.cpp
|
||||
Main.h
|
||||
resource.h
|
||||
WriteDump.cpp
|
||||
Info.cpp
|
||||
Export.cpp
|
||||
${ASSIMP_CMD_RC}
|
||||
)
|
||||
|
||||
TARGET_USE_COMMON_OUTPUT_DIRECTORY(assimp_cmd)
|
||||
|
|
|
@ -441,7 +441,7 @@ int Assimp_Info(const char *const *params, unsigned int num) {
|
|||
prop->mKey.data,
|
||||
prop->mIndex,
|
||||
prop->mDataLength,
|
||||
TextureTypeToString(textype));
|
||||
aiTextureTypeToString(textype));
|
||||
}
|
||||
}
|
||||
if (scene->mNumMaterials) {
|
||||
|
|
|
@ -1,51 +1,39 @@
|
|||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
#include "../../revision.h"
|
||||
#include "revision.h"
|
||||
#include "winres.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#define APSTUDIO_HIDDEN_SYMBOLS
|
||||
#include "windows.h"
|
||||
#undef APSTUDIO_HIDDEN_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Deutsch (Deutschland) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
IDI_ASSIMP_CMD ICON "../shared/assimp_tools_icon.ico"
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDI_ASSIMP_VIEW ICON "../shared/assimp_tools_icon.ico"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION VER_FILEVERSION
|
||||
PRODUCTVERSION VER_FILEVERSION
|
||||
FILEFLAGSMASK VS_FF_DEBUG
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS VS_FF_DEBUG
|
||||
#endif
|
||||
FILEOS VOS_NT
|
||||
FILETYPE VFT_APP
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904B0"
|
||||
BEGIN
|
||||
VALUE "Comments", "Licensed under a 3-clause BSD license"
|
||||
VALUE "CompanyName", "ASSIMP Team"
|
||||
VALUE "FileDescription", "ASSIMP CMD Application"
|
||||
VALUE "FileVersion", VER_FILEVERSION_STR
|
||||
VALUE "InternalName", "assimp"
|
||||
VALUE "LegalCopyright", VER_COPYRIGHT_STR
|
||||
VALUE "OriginalFilename", "assimp.exe"
|
||||
VALUE "ProductName", "ASSIMP CMD Application"
|
||||
VALUE "ProductVersion", VER_FILEVERSION_STR
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 65001
|
||||
END
|
||||
END
|
||||
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by assimp_view.rc
|
||||
//
|
||||
#define IDC_MYICON 2
|
||||
#define IDD_ASSIMP_VIEW_DIALOG 102
|
||||
#define IDD_ABOUTBOX 103
|
||||
#define IDI_ASSIMP_VIEW 107
|
||||
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NO_MFC 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 159
|
||||
#define _APS_NEXT_COMMAND_VALUE 32831
|
||||
#define _APS_NEXT_CONTROL_VALUE 1052
|
||||
#define _APS_NEXT_SYMED_VALUE 110
|
||||
#endif
|
||||
#endif
|
|
@ -39,8 +39,6 @@
|
|||
#----------------------------------------------------------------------
|
||||
cmake_minimum_required( VERSION 3.10 )
|
||||
|
||||
FIND_PACKAGE(DirectX REQUIRED)
|
||||
|
||||
INCLUDE_DIRECTORIES (
|
||||
${Assimp_SOURCE_DIR}/include
|
||||
${Assimp_SOURCE_DIR}/code
|
||||
|
@ -98,7 +96,7 @@ IF ( MSVC )
|
|||
ENDIF ()
|
||||
|
||||
# Link the executable to the assimp + dx libs.
|
||||
TARGET_LINK_LIBRARIES ( assimp_viewer assimp ${DirectX_LIBRARY} ${DirectX_D3DX9_LIBRARY} comctl32.lib winmm.lib )
|
||||
TARGET_LINK_LIBRARIES ( assimp_viewer assimp ${DirectX_LIBRARY} ${DirectX_D3DX9_LIBRARY} comctl32 winmm )
|
||||
|
||||
INSTALL( TARGETS assimp_viewer
|
||||
DESTINATION "${ASSIMP_BIN_INSTALL_DIR}" COMPONENT assimp-dev
|
||||
|
|
|
@ -1710,13 +1710,13 @@ INT_PTR CALLBACK MessageProc(HWND hwndDlg,UINT uMsg, WPARAM wParam,LPARAM lParam
|
|||
} else if (ID_TOOLS_LOGWINDOW == LOWORD(wParam)) {
|
||||
CLogWindow::Instance().Show();
|
||||
} else if (ID__WEBSITE == LOWORD(wParam)) {
|
||||
ShellExecute(nullptr,"open","http://assimp.sourceforge.net","","",SW_SHOW);
|
||||
} else if (ID__WEBSITESF == LOWORD(wParam)) {
|
||||
ShellExecute(nullptr,"open","https://sourceforge.net/projects/assimp","","",SW_SHOW);
|
||||
ShellExecute(nullptr,"open","https://assimp.org","","",SW_SHOW);
|
||||
} else if (ID__WEBSITEGH == LOWORD(wParam)) {
|
||||
ShellExecute(nullptr,"open","https://github.com/assimp/assimp","","",SW_SHOW);
|
||||
} else if (ID_REPORTBUG == LOWORD(wParam)) {
|
||||
ShellExecute(nullptr,"open","https://sourceforge.net/tracker/?func=add&group_id=226462&atid=1067632","","",SW_SHOW);
|
||||
ShellExecute(nullptr,"open","https://github.com/assimp/assimp/issues/new?assignees=&labels=Bug&template=bug_report.md&title=Bug%3A","","",SW_SHOW);
|
||||
} else if (ID_FR == LOWORD(wParam)) {
|
||||
ShellExecute(nullptr,"open","https://sourceforge.net/forum/forum.php?forum_id=817653","","",SW_SHOW);
|
||||
ShellExecute(nullptr,"open","https://github.com/assimp/assimp/issues/new?assignees=&labels=Feature-Request&template=feature_request.md","","",SW_SHOW);
|
||||
} else if (ID_TOOLS_CLEARLOG == LOWORD(wParam)) {
|
||||
CLogWindow::Instance().Clear();
|
||||
} else if (ID_TOOLS_SAVELOGTOFILE == LOWORD(wParam)) {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
#include "revision.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -15,10 +16,10 @@
|
|||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Deutsch (Deutschland) resources
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
|
||||
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -43,9 +44,9 @@ FONT 9, "Courier New", 400, 0, 0x0
|
|||
BEGIN
|
||||
LTEXT "Open Asset Import Library (Assimp)",IDC_STATIC,30,14,144,9
|
||||
LTEXT "A free C/C++ library to read various well-known 3D model formats into a straightforward in-memory format for easy processing by applications. Licensed under a 3-clause BSD license and totally awesome.",IDC_STATIC,31,34,204,24
|
||||
LTEXT "(c) 2008-2020. Assimp Development Team. See the CREDITS file for a list of all contributors.",IDC_STATIC,30,65,204,23
|
||||
LTEXT "\xA9 2008-2022. Assimp Development Team. See the CREDITS file for a list of all contributors.",IDC_STATIC,30,65,204,23
|
||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,27,282,1
|
||||
LTEXT "http://assimp.sourceforge.net http://www.zfx.info",IDC_STATIC,31,101,127,22
|
||||
LTEXT "https://assimp.org",IDC_STATIC,31,101,127,22
|
||||
DEFPUSHBUTTON "Love this library",IDOK,186,110,84,14
|
||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ,0,148,283,1
|
||||
CONTROL IDB_BITMAP1,IDC_STATIC,"Static",SS_BITMAP,0,129,514,20
|
||||
|
@ -187,35 +188,33 @@ END
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,1,700,0
|
||||
PRODUCTVERSION 1,1,700,1
|
||||
FILEFLAGSMASK 0x17L
|
||||
FILEVERSION VER_FILEVERSION
|
||||
PRODUCTVERSION VER_FILEVERSION
|
||||
FILEFLAGSMASK VS_FF_DEBUG
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
FILEFLAGS VS_FF_DEBUG
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x0L
|
||||
FILESUBTYPE 0x0L
|
||||
FILEOS VOS_NT
|
||||
FILETYPE VFT_APP
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040704b0"
|
||||
BLOCK "040904B0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "assimp team"
|
||||
VALUE "Comments", "Licensed under a 3-clause BSD license"
|
||||
VALUE "CompanyName", "ASSIMP Team"
|
||||
VALUE "FileDescription", "ASSIMP Viewer Application"
|
||||
VALUE "FileVersion", "1, 1, SVNRevision, 0"
|
||||
VALUE "FileVersion", VER_FILEVERSION_STR
|
||||
VALUE "InternalName", "assimp_view"
|
||||
VALUE "LegalCopyright", "Licensed under the LGPL"
|
||||
VALUE "OriginalFilename", "assimpview32.exe"
|
||||
VALUE "LegalCopyright", VER_COPYRIGHT_STR
|
||||
VALUE "OriginalFilename", "assimp_viewer.exe"
|
||||
VALUE "ProductName", "ASSIMP Viewer Application"
|
||||
VALUE "ProductVersion", "1, 1, SVNRevision, 0"
|
||||
VALUE "ProductVersion", VER_FILEVERSION_STR
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x407, 1200
|
||||
VALUE "Translation", 0x409, 65001
|
||||
END
|
||||
END
|
||||
|
||||
|
@ -381,14 +380,14 @@ BEGIN
|
|||
POPUP "Feedback"
|
||||
BEGIN
|
||||
MENUITEM "Report bug", ID_REPORTBUG
|
||||
MENUITEM "Feature request/discuss", ID_FR
|
||||
MENUITEM "Feature request", ID_FR
|
||||
END
|
||||
MENUITEM "Help", ID__HELP
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "About", ID__ABOUT
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Website", ID__WEBSITE
|
||||
MENUITEM "SF.net Project Page", ID__WEBSITESF
|
||||
MENUITEM "GitHub Repository", ID__WEBSITEGH
|
||||
END
|
||||
END
|
||||
|
||||
|
@ -451,7 +450,7 @@ IDR_HUD RCDATA "HUD.png"
|
|||
|
||||
IDR_HUDMASK RCDATA "HUDMask.png"
|
||||
|
||||
#endif // Deutsch (Deutschland) resources
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
|
|
@ -209,7 +209,7 @@
|
|||
#define ID__WEBSITE 32867
|
||||
#define ID__SF 32868
|
||||
#define ID__ 32869
|
||||
#define ID__WEBSITESF 32870
|
||||
#define ID__WEBSITEGH 32870
|
||||
#define ID_IMPORTSETTINGS_CALCULATETANGENTSPACE 32871
|
||||
#define ID_VIEWER_CTS 32872
|
||||
#define ID_VIEWER_PP_CTS 32873
|
||||
|
|
Loading…
Reference in New Issue