mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
Fix couple of stuff
This commit is contained in:
parent
82a071864c
commit
347216a3ac
@ -54,7 +54,7 @@ void DaeMaterials::add_material_instance(const FCDMaterialInstance* instance) {
|
||||
nassertv(instance != NULL);
|
||||
const string semantic (FROM_FSTRING(instance->GetSemantic()));
|
||||
if (_materials.count(semantic) > 0) {
|
||||
daeegg_cat.warning() << "Ignoring duplicate material with semantic" << semantic << endl;
|
||||
daeegg_cat.warning() << "Ignoring duplicate material with semantic " << semantic << endl;
|
||||
return;
|
||||
}
|
||||
_materials[semantic] = new DaeMaterial();
|
||||
@ -63,7 +63,11 @@ void DaeMaterials::add_material_instance(const FCDMaterialInstance* instance) {
|
||||
for (size_t vib = 0; vib < instance->GetVertexInputBindingCount(); ++vib) {
|
||||
const FCDMaterialInstanceBindVertexInput* mivib = instance->GetVertexInputBinding(vib);
|
||||
assert(mivib != NULL);
|
||||
#if FCOLLADA_VERSION >= 0x00030005
|
||||
_materials[semantic]->_uvsets[mivib->inputSet] = *mivib->semantic;
|
||||
#else
|
||||
_materials[semantic]->_uvsets[mivib->inputSet] = FROM_FSTRING(mivib->semantic);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Handle the material stuff
|
||||
|
@ -36,7 +36,6 @@
|
||||
#include "FCDocument/FCDGeometry.h"
|
||||
#include "FCDocument/FCDGeometryInstance.h"
|
||||
#include "FCDocument/FCDGeometryPolygons.h"
|
||||
#include "FCDocument/FCDGeometryPolygonsInput.h"
|
||||
#include "FCDocument/FCDGeometrySource.h"
|
||||
#include "FCDocument/FCDSkinController.h"
|
||||
#include "FCDocument/FCDController.h"
|
||||
@ -46,6 +45,9 @@
|
||||
#include "FCDocument/FCDExtra.h"
|
||||
#include "FCDocument/FCDEffect.h"
|
||||
#include "FCDocument/FCDEffectStandard.h"
|
||||
#if FCOLLADA_VERSION >= 0x00030005
|
||||
#include "FCDocument/FCDGeometryPolygonsInput.h"
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: DAEToEggConverter::Constructor
|
||||
@ -136,13 +138,15 @@ convert_file(const Filename &filename) {
|
||||
// Read the file
|
||||
FCollada::Initialize();
|
||||
_document = FCollada::LoadDocument(filename.to_os_specific().c_str());
|
||||
if(_document == NULL) {
|
||||
if (_document == NULL) {
|
||||
daeegg_cat.error() << "Failed to load document: " << _error_handler.GetErrorString() << endl;
|
||||
FCollada::Release();
|
||||
return false;
|
||||
}
|
||||
// Make sure the file uses consistent coordinate system and length
|
||||
FCDocumentTools::StandardizeUpAxisAndLength(_document);
|
||||
if (_document->GetAsset() != NULL) {
|
||||
FCDocumentTools::StandardizeUpAxisAndLength(_document);
|
||||
}
|
||||
|
||||
_table = new EggTable();
|
||||
_table->set_table_type(EggTable::TT_table);
|
||||
|
Loading…
x
Reference in New Issue
Block a user