Skip to content

Commit

Permalink
Merge branch 'master' into PLYcomments#4866
Browse files Browse the repository at this point in the history
  • Loading branch information
PencilAmazing authored Feb 1, 2023
2 parents 527d110 + b55e29b commit feb3e9f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 2 additions & 0 deletions code/AssetLib/FBX/FBXConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1455,7 +1455,9 @@ static void copyBoneToSkeletonBone(aiMesh *mesh, aiBone *bone, aiSkeletonBone *s
skeletonBone->mWeights = bone->mWeights;
skeletonBone->mOffsetMatrix = bone->mOffsetMatrix;
skeletonBone->mMeshId = mesh;
#ifndef ASSIMP_BUILD_NO_ARMATUREPOPULATE_PROCESS
skeletonBone->mNode = bone->mNode;
#endif
skeletonBone->mParent = -1;
}

Expand Down
12 changes: 6 additions & 6 deletions code/PostProcessing/JoinVerticesProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,12 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex) {
// We should care only about used vertices, not all of them
// (this can happen due to original file vertices buffer being used by
// multiple meshes)
std::unordered_set<unsigned int> usedVertexIndices;
usedVertexIndices.reserve(pMesh->mNumVertices);
for( unsigned int a = 0; a < pMesh->mNumFaces; a++) {
std::vector<bool> usedVertexIndicesMask;
usedVertexIndicesMask.resize(pMesh->mNumVertices, false);
for (unsigned int a = 0; a < pMesh->mNumFaces; a++) {
aiFace& face = pMesh->mFaces[a];
for( unsigned int b = 0; b < face.mNumIndices; b++) {
usedVertexIndices.insert(face.mIndices[b]);
for (unsigned int b = 0; b < face.mNumIndices; b++) {
usedVertexIndicesMask[face.mIndices[b]] = true;
}
}

Expand Down Expand Up @@ -335,7 +335,7 @@ int JoinVerticesProcess::ProcessMesh( aiMesh* pMesh, unsigned int meshIndex) {
int newIndex = 0;
for( unsigned int a = 0; a < pMesh->mNumVertices; a++) {
// if the vertex is unused Do nothing
if (usedVertexIndices.find(a) == usedVertexIndices.end()) {
if (!usedVertexIndicesMask[a]) {
continue;
}
// collect the vertex data
Expand Down
2 changes: 2 additions & 0 deletions include/assimp/mesh.h
Original file line number Diff line number Diff line change
Expand Up @@ -995,8 +995,10 @@ struct aiSkeletonBone {
#ifdef __cplusplus
aiSkeletonBone() :
mParent(-1),
#ifndef ASSIMP_BUILD_NO_ARMATUREPOPULATE_PROCESS
mArmature(nullptr),
mNode(nullptr),
#endif
mNumnWeights(0),
mMeshId(nullptr),
mWeights(nullptr),
Expand Down
6 changes: 1 addition & 5 deletions port/iOS/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ build_arch()

rm CMakeCache.txt

CMAKE_CLI_INPUT="-DCMAKE_C_COMPILER=$CMAKE_C_COMPILER -DCMAKE_CXX_COMPILER=$CMAKE_CXX_COMPILER -DCMAKE_TOOLCHAIN_FILE=./port/iOS/IPHONEOS_$(echo $1 | tr '[:lower:]' '[:upper:]')_TOOLCHAIN.cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DENABLE_BOOST_WORKAROUND=ON -DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBS"
CMAKE_CLI_INPUT="-DCMAKE_C_COMPILER=$CMAKE_C_COMPILER -DCMAKE_CXX_COMPILER=$CMAKE_CXX_COMPILER -DCMAKE_TOOLCHAIN_FILE=./port/iOS/IPHONEOS_$(echo $1 | tr '[:lower:]' '[:upper:]')_TOOLCHAIN.cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBS"

echo "[!] Running CMake with -G 'Unix Makefiles' $CMAKE_CLI_INPUT"

Expand Down Expand Up @@ -190,12 +190,8 @@ if [[ "$DEPLOY_FAT" -eq 1 ]]; then

if [[ "$BUILD_TYPE" =~ "Debug" ]]; then
make_fat_static_or_shared_binary 'libassimpd'
make_fat_static_binary 'libIrrXMLd'
make_fat_static_binary 'libzlibstaticd'
else
make_fat_static_or_shared_binary 'libassimp'
make_fat_static_binary 'libIrrXML'
make_fat_static_binary 'libzlibstatic'
fi

echo "[!] Done! The fat binaries can be found at $BUILD_DIR"
Expand Down

0 comments on commit feb3e9f

Please sign in to comment.