Merge branch 'master' into ios-build-script

* master:
  Fix regression on FBX importer unit test
  Check nb of faces and vertices for FBX unit test
  Update helper.py
  Update helper.py
  Solved pyassimp.errors.AssimpError in conda
  Hide commit signature information when fetching commit hash
pull/2045/head
Doron Adler 2018-06-27 09:59:51 +03:00
commit eebf549e8e
4 changed files with 19 additions and 6 deletions

View File

@ -158,7 +158,7 @@ EXECUTE_PROCESS(
# Get the latest abbreviated commit hash of the working branch # Get the latest abbreviated commit hash of the working branch
EXECUTE_PROCESS( EXECUTE_PROCESS(
COMMAND git log -1 --format=%h COMMAND git log -1 --format=%h --no-show-signature
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE GIT_COMMIT_HASH OUTPUT_VARIABLE GIT_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_STRIP_TRAILING_WHITESPACE

View File

@ -437,6 +437,9 @@ void ResolveVertexDataArray(std::vector<T>& data_out, const Scope& source,
// deal with this more elegantly and with less redundancy, but right // deal with this more elegantly and with less redundancy, but right
// now it seems unavoidable. // now it seems unavoidable.
if (MappingInformationType == "ByVertice" && isDirect) { if (MappingInformationType == "ByVertice" && isDirect) {
if (!HasElement(source, indexDataElementName)) {
return;
}
std::vector<T> tempData; std::vector<T> tempData;
ParseVectorDataArray(tempData, GetRequiredElement(source, dataElementName)); ParseVectorDataArray(tempData, GetRequiredElement(source, dataElementName));

View File

@ -27,7 +27,7 @@ additional_dirs, ext_whitelist = [],[]
if os.name=='posix': if os.name=='posix':
additional_dirs.append('./') additional_dirs.append('./')
additional_dirs.append('/usr/lib/') additional_dirs.append('/usr/lib/')
additional_dirs.append('/usr/lib/x86_64-linux-gnu') additional_dirs.append('/usr/lib/x86_64-linux-gnu/')
additional_dirs.append('/usr/local/lib/') additional_dirs.append('/usr/local/lib/')
if 'LD_LIBRARY_PATH' in os.environ: if 'LD_LIBRARY_PATH' in os.environ:
@ -222,11 +222,17 @@ def search_library():
for filename in os.listdir(curfolder): for filename in os.listdir(curfolder):
# our minimum requirement for candidates is that # our minimum requirement for candidates is that
# they should contain 'assimp' somewhere in # they should contain 'assimp' somewhere in
# their name # their name
if filename.lower().find('assimp')==-1 or\ if filename.lower().find('assimp')==-1 :
os.path.splitext(filename)[-1].lower() not in ext_whitelist:
continue continue
is_out=1
for et in ext_whitelist:
if et in filename.lower():
is_out=0
break
if is_out:
continue
library_path = os.path.join(curfolder, filename) library_path = os.path.join(curfolder, filename)
logger.debug('Try ' + library_path) logger.debug('Try ' + library_path)
try: try:

View File

@ -70,6 +70,10 @@ TEST_F( utFBXImporterExporter, importBareBoxWithoutColorsAndTextureCoords ) {
Assimp::Importer importer; Assimp::Importer importer;
const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/FBX/box.fbx", aiProcess_ValidateDataStructure ); const aiScene *scene = importer.ReadFile( ASSIMP_TEST_MODELS_DIR "/FBX/box.fbx", aiProcess_ValidateDataStructure );
EXPECT_NE( nullptr, scene ); EXPECT_NE( nullptr, scene );
EXPECT_EQ(scene->mNumMeshes, 1);
aiMesh* mesh = scene->mMeshes[0];
EXPECT_EQ(mesh->mNumFaces, 12);
EXPECT_EQ(mesh->mNumVertices, 36);
} }
TEST_F( utFBXImporterExporter, importPhongMaterial ) { TEST_F( utFBXImporterExporter, importPhongMaterial ) {