diff --git a/src/osgPlugins/dae/ReaderWriterDAE.cpp b/src/osgPlugins/dae/ReaderWriterDAE.cpp index 84c8876e6..4e556428e 100644 --- a/src/osgPlugins/dae/ReaderWriterDAE.cpp +++ b/src/osgPlugins/dae/ReaderWriterDAE.cpp @@ -49,7 +49,7 @@ ReaderWriterDAE::readNode(const std::string& fname, std::string fileName( osgDB::findDataFile( fname, options ) ); if( fileName.empty() ) return ReadResult::FILE_NOT_FOUND; - osg::notify(osg::INFO) << "ReaderWriterDAE( \"" << fileName << "\" )" << std::endl; + OSG_INFO << "ReaderWriterDAE( \"" << fileName << "\" )" << std::endl; if (NULL == pDAE) { @@ -64,7 +64,7 @@ ReaderWriterDAE::readNode(const std::string& fname, if ( ! daeReader.convert( fileURI ) ) { - osg::notify( osg::WARN ) << "Load failed in COLLADA DOM conversion" << std::endl; + OSG_WARN << "Load failed in COLLADA DOM conversion" << std::endl; return ReadResult::ERROR_IN_READING_FILE; } @@ -133,14 +133,14 @@ ReaderWriterDAE::writeNode( const osg::Node& node, else if (opt == "ForceTexture") forceTexture = true; else { - osg::notify(osg::NOTICE) + OSG_NOTICE << std::endl << "COLLADA dae plugin: unrecognized option \"" << opt << std::endl; unrecognizedOption = true; } } if (unrecognizedOption) { // TODO Remove this or make use of supportedOptions() - osg::notify(osg::NOTICE) + OSG_NOTICE << "comma-delimited options:" << std::endl << std::endl << "\tpolygon = use polygons instead of polylists for element" << std::endl << "\tGoogleMode = write files suitable for use by Google products" << std::endl diff --git a/src/osgPlugins/dae/daeRAnimations.cpp b/src/osgPlugins/dae/daeRAnimations.cpp index e869551a5..6f2548c22 100644 --- a/src/osgPlugins/dae/daeRAnimations.cpp +++ b/src/osgPlugins/dae/daeRAnimations.cpp @@ -107,7 +107,7 @@ void daeReader::processAnimationClip(osgAnimation::BasicAnimationManager* pOsgAn } else { - osg::notify( osg::WARN ) << "Failed to locate animation " << domInstanceArray[i]->getUrl().getURI() << std::endl; + OSG_WARN << "Failed to locate animation " << domInstanceArray[i]->getUrl().getURI() << std::endl; } } @@ -243,7 +243,7 @@ void mergeKeyframeContainers(osgAnimation::Vec3CubicBezierKeyframeContainer* to, } break; default: - osg::notify(osg::WARN) << "Unsupported interpolation type." << std::endl; + OSG_WARN << "Unsupported interpolation type." << std::endl; break; } @@ -391,12 +391,12 @@ void daeReader::processAnimationMap(const TargetChannelPartMap& tcm, osgAnimatio } else { - osg::notify(osg::WARN) << "Unrecognised vector component \"" << componentName << "\"" << std::endl; + OSG_WARN << "Unrecognised vector component \"" << componentName << "\"" << std::endl; } } else { - osg::notify(osg::WARN) << "Unrecognised keyframe container \"" << channelPart->name << "\"" << std::endl; + OSG_WARN << "Unrecognised keyframe container \"" << channelPart->name << "\"" << std::endl; } } @@ -437,7 +437,7 @@ void daeReader::processAnimationMap(const TargetChannelPartMap& tcm, osgAnimatio } else { - osg::notify(osg::WARN) << "Unsupported interpolation type" << std::endl; + OSG_WARN << "Unsupported interpolation type" << std::endl; } } } @@ -454,7 +454,7 @@ void daeReader::processAnimationMap(const TargetChannelPartMap& tcm, osgAnimatio { if (dynamic_cast(lb->first)) { - osg::notify(osg::WARN) << "Animating elements of matrices not supported." << std::endl; + OSG_WARN << "Animating elements of matrices not supported." << std::endl; } else { @@ -581,25 +581,25 @@ daeReader::ChannelPart* daeReader::processSampler(domChannel* pDomChannel, Sourc } else { - osg::notify(osg::WARN) << "Only TIME based animations are supported" < in " << pDomSource->getName() < in " << pDomSource->getName() <" <" < in " << pDomSource->getName() < in " << pDomSource->getName() <(nc)) { - osg::notify(osg::WARN) << "Unrecognised AnimationUpdateCallback" << std::endl; + OSG_WARN << "Unrecognised AnimationUpdateCallback" << std::endl; } return NULL; @@ -783,7 +783,7 @@ void convertDegreesToRadians(osgAnimation::KeyframeContainer* pKeyframeContainer } else { - osg::notify(osg::WARN) << "Warning: rotation keyframes not converted to radians." << std::endl; + OSG_WARN << "Warning: rotation keyframes not converted to radians." << std::endl; } } @@ -819,22 +819,22 @@ void daeReader::processChannel(domChannel* pDomChannel, SourceMap& sources, Targ } else { - osg::notify(osg::WARN) << "Target \"" << channelName << "\" not found." << std::endl; + OSG_WARN << "Target \"" << channelName << "\" not found." << std::endl; } } else { - osg::notify(osg::WARN) << "Could not locate UpdateCallback for target " << pDomChannel->getTarget()<< std::endl; + OSG_WARN << "Could not locate UpdateCallback for target " << pDomChannel->getTarget()<< std::endl; } } else { - osg::notify( osg::WARN ) << " source " << pDomChannel->getSource().getURI() << " has no corresponding osgAnimation::Channel" << std::endl; + OSG_WARN << " source " << pDomChannel->getSource().getURI() << " has no corresponding osgAnimation::Channel" << std::endl; } } else { - osg::notify( osg::WARN ) << "Could not locate source " << pDomChannel->getSource().getURI() << std::endl; + OSG_WARN << "Could not locate source " << pDomChannel->getSource().getURI() << std::endl; } } @@ -859,7 +859,7 @@ void daeReader::extractTargetName(const std::string& daeTarget, std::string& cha } else { - osg::notify(osg::WARN) << "Couldn't extract a proper name for target " << daeTarget << std::endl; + OSG_WARN << "Couldn't extract a proper name for target " << daeTarget << std::endl; } } diff --git a/src/osgPlugins/dae/daeRGeometry.cpp b/src/osgPlugins/dae/daeRGeometry.cpp index 156be3bcd..328ffdd0a 100644 --- a/src/osgPlugins/dae/daeRGeometry.cpp +++ b/src/osgPlugins/dae/daeRGeometry.cpp @@ -58,7 +58,7 @@ osg::Geode* daeReader::getOrCreateGeometry(domGeometry *pDomGeometry, domBind_ma osg::Geode *pCopiedOsgGeode = static_cast(pOsgGeode->clone(osg::CopyOp::DEEP_COPY_DRAWABLES)); if ( pCopiedOsgGeode == NULL ) { - osg::notify( osg::WARN ) << "Failed to load geometry " << pDomGeometry->getName() << std::endl; + OSG_WARN << "Failed to load geometry " << pDomGeometry->getName() << std::endl; return NULL; } @@ -134,7 +134,7 @@ osg::Geode* daeReader::processInstanceGeometry( domInstance_geometry *pDomInstan domGeometry *pDomGeometry = daeSafeCast< domGeometry >(getElementFromURI(pDomInstanceGeometry->getUrl())); if (!pDomGeometry) { - osg::notify( osg::WARN ) << "Failed to locate geometry " << pDomInstanceGeometry->getUrl().getURI() << std::endl; + OSG_WARN << "Failed to locate geometry " << pDomInstanceGeometry->getUrl().getURI() << std::endl; return NULL; } @@ -153,7 +153,7 @@ osg::Node* daeReader::processMorph(domMorph* pDomMorph, domBind_material* pDomBi if (!pDomGeometry) { - osg::notify( osg::WARN ) << "Failed to locate geometry " << pDomMorph->getSource().getURI() << std::endl; + OSG_WARN << "Failed to locate geometry " << pDomMorph->getSource().getURI() << std::endl; return NULL; } @@ -189,7 +189,7 @@ osg::Node* daeReader::processMorph(domMorph* pDomMorph, domBind_material* pDomBi pOsgMorphGeometry->setMethod(osgAnimation::MorphGeometry::NORMALIZED); break; default: - osg::notify( osg::WARN ) << "Unknown morph method method type " << std::endl; + OSG_WARN << "Unknown morph method method type " << std::endl; } // 1 @@ -199,7 +199,7 @@ osg::Node* daeReader::processMorph(domMorph* pDomMorph, domBind_material* pDomBi // TODO how to handle multiple pairs of morph inputs? if (domInputs.getCount() > 2) { - osg::notify( osg::WARN ) << "Only a single pair of morph inputs is supported." << std::endl; + OSG_WARN << "Only a single pair of morph inputs is supported." << std::endl; } for (size_t i=0; i < 2; i++) @@ -230,7 +230,7 @@ osg::Node* daeReader::processMorph(domMorph* pDomMorph, domBind_material* pDomBi } else { - osg::notify( osg::WARN ) << "Failed to locate morph geometry '" << names.get(j) << "'" << std::endl; + OSG_WARN << "Failed to locate morph geometry '" << names.get(j) << "'" << std::endl; } } } @@ -254,14 +254,14 @@ osg::Node* daeReader::processMorph(domMorph* pDomMorph, domBind_material* pDomBi } else { - osg::notify( osg::WARN ) << "Failed to locate morph geometry '" << pIDREFS->get(j).getID() << "'" << std::endl; + OSG_WARN << "Failed to locate morph geometry '" << pIDREFS->get(j).getID() << "'" << std::endl; } } } } else { - osg::notify( osg::WARN ) << "Could not find morph source '" << domInputs[i]->getSource().getURI() << "'" <getSource().getURI() << "'" <getSource().getURI() << "'" <getSource().getURI() << "'" <(getElementFromURI(pDomInstanceController->getUrl())); if (!pDomController) { - osg::notify( osg::WARN ) << "Failed to locate controller " << pDomInstanceController->getUrl().getURI() << std::endl; + OSG_WARN << "Failed to locate controller " << pDomInstanceController->getUrl().getURI() << std::endl; return NULL; } @@ -329,7 +329,7 @@ osg::Node* daeReader::processInstanceController( domInstance_controller *pDomIns return processMorph(pDomController->getMorph(), pDomInstanceController->getBind_material()); } - osg::notify( osg::WARN ) << "Expected skin or morph element in controller '" << pDomController->getName() << "'" << std::endl; + OSG_WARN << "Expected skin or morph element in controller '" << pDomController->getName() << "'" << std::endl; return NULL; } @@ -412,14 +412,14 @@ osg::Geode *daeReader::processMesh(domMesh* pDomMesh) // osg::Geode *daeReader::processConvexMesh(domConvex_mesh* pDomConvexMesh) { -// osg::notify( osg::WARN ) << "Unsupported geometry convex mesh '" << pDomConvexMesh->getId() << "'" << std::endl; +// OSG_WARN << "Unsupported geometry convex mesh '" << pDomConvexMesh->getId() << "'" << std::endl; return NULL; } // osg::Geode *daeReader::processSpline(domSpline* pDomSpline) { -// osg::notify( osg::WARN ) << "Unsupported geometry type spline '" << pDomSpline->getId() << "'" << std::endl; +// OSG_WARN << "Unsupported geometry type spline '" << pDomSpline->getId() << "'" << std::endl; return NULL; } @@ -448,7 +448,7 @@ osg::Geode *daeReader::processGeometry(domGeometry *pDomGeometry) } #endif - osg::notify( osg::WARN ) << "Unexpected geometry type in geometry '" << pDomGeometry->getId() << "'" << std::endl; + OSG_WARN << "Unexpected geometry type in geometry '" << pDomGeometry->getId() << "'" << std::endl; return NULL; } @@ -499,7 +499,7 @@ void daeReader::processPolylist(osg::Geode* geode, const domMesh* pDomMesh, cons const domPolylist::domVcount* pDomVcount = group->getVcount(); if (!pDomVcount) { - osg::notify(osg::WARN) << "Index counts not found." << std::endl; + OSG_WARN << "Index counts not found." << std::endl; return; } @@ -524,7 +524,7 @@ void daeReader::processPolylist(osg::Geode* geode, const domMesh* pDomMesh, cons size_t primitiveLength = vCount[i]; if (j + primitiveLength > vertexList.size()) { - osg::notify(osg::WARN) << "Error: vertex counts are greater than the number of indices." << std::endl; + OSG_WARN << "Error: vertex counts are greater than the number of indices." << std::endl; return; } for (size_t k = 2; k < primitiveLength; ++k) @@ -653,14 +653,14 @@ void resolveMeshInputs( if (strcmp(COMMON_PROFILE_INPUT_COLOR, semantic) == 0) { if (color_source != NULL) - osg::notify( osg::WARN )<<"Overwriting vertices input(COLOR) with input from primitive"<getSet(); if (set >= MAX_TEXTURE_COORDINATE_SETS) { - osg::notify( osg::WARN )<<"Texture coordinate set "<< set << + OSG_WARN<<"Texture coordinate set "<< set << "was requested, the maximum allowed is " << MAX_TEXTURE_COORDINATE_SETS - 1 << "." << std::endl; continue; } if (texcoord_sources[set]) - osg::notify( osg::WARN )<<"Overwriting vertices input(TEXCOORD) with input from primitive"<getTechnique_common() == NULL ) { - osg::notify( osg::WARN ) << "No COMMON technique for bind_material" << std::endl; + OSG_WARN << "No COMMON technique for bind_material" << std::endl; return; } @@ -161,7 +161,7 @@ void daeReader::processBindMaterial( domBind_material *bm, domGeometry *geom, os osg::Geometry *clonedGeometry = drawable->asGeometry(); if (NULL == clonedGeometry) { - osg::notify( osg::WARN ) << "Failed to convert drawable to geometry object" << std::endl; + OSG_WARN << "Failed to convert drawable to geometry object" << std::endl; break; } clonedGeometry->getTexCoordArrayList().clear(); @@ -175,7 +175,7 @@ void daeReader::processBindMaterial( domBind_material *bm, domGeometry *geom, os } else { - osg::notify( osg::WARN ) << "Failed to locate with id " << ima[i]->getTarget().getURI() << std::endl; + OSG_WARN << "Failed to locate with id " << ima[i]->getTarget().getURI() << std::endl; } break; @@ -183,7 +183,7 @@ void daeReader::processBindMaterial( domBind_material *bm, domGeometry *geom, os } if (!found) { - osg::notify( osg::WARN ) << "Failed to locate with symbol " << materialName << std::endl; + OSG_WARN << "Failed to locate with symbol " << materialName << std::endl; } } } @@ -208,7 +208,7 @@ void daeReader::processMaterial(osg::StateSet *ss, domMaterial *mat ) } else { - osg::notify( osg::WARN ) << "Failed to locate effect " << mat->getInstance_effect()->getUrl().getURI() << std::endl; + OSG_WARN << "Failed to locate effect " << mat->getInstance_effect()->getUrl().getURI() << std::endl; } } @@ -234,7 +234,7 @@ void daeReader::processEffect(osg::StateSet *ss, domEffect *effect ) { if (hasCOMMON ) { - osg::notify( osg::WARN ) << "Effect already has a profile_COMMON. Skipping this one" << std::endl; + OSG_WARN << "Effect already has a profile_COMMON. Skipping this one" << std::endl; continue; } _currentEffect = effect; @@ -243,7 +243,7 @@ void daeReader::processEffect(osg::StateSet *ss, domEffect *effect ) continue; } - osg::notify( osg::WARN ) << "unsupported effect profile " << effect->getFx_profile_abstract_array()[i]->getTypeName() << std::endl; + OSG_WARN << "unsupported effect profile " << effect->getFx_profile_abstract_array()[i]->getTypeName() << std::endl; } } @@ -323,7 +323,7 @@ void daeReader::processProfileCOMMON(osg::StateSet *ss, domProfile_COMMON *pc ) osg::Texture2D *DiffuseStateAttribute = NULL; processColorOrTextureType(ss, b->getEmission(), osg::Material::EMISSION, mat.get(), NULL, &EmissionStateAttribute ); if (NULL != EmissionStateAttribute) - osg::notify( osg::WARN ) << "Currently no support for in Emission channel " << std::endl; + OSG_WARN << "Currently no support for in Emission channel " << std::endl; processColorOrTextureType(ss, b->getAmbient(), osg::Material::AMBIENT, mat.get(), NULL, &AmbientStateAttribute ); @@ -363,7 +363,7 @@ void daeReader::processProfileCOMMON(osg::StateSet *ss, domProfile_COMMON *pc ) else { if (NULL != AmbientStateAttribute ) - osg::notify( osg::WARN ) << "Ambient occlusion map only supported when diffuse texture also specified" << std::endl; + OSG_WARN << "Ambient occlusion map only supported when diffuse texture also specified" << std::endl; } if (processColorOrTextureType(ss, b->getSpecular(), osg::Material::SPECULAR, mat.get(), b->getShininess() ) && (NULL != DiffuseStateAttribute) ) @@ -397,7 +397,7 @@ void daeReader::processProfileCOMMON(osg::StateSet *ss, domProfile_COMMON *pc ) osg::Texture2D *DiffuseStateAttribute = NULL; processColorOrTextureType(ss, p->getEmission(), osg::Material::EMISSION, mat.get(), NULL, &EmissionStateAttribute ); if (NULL != EmissionStateAttribute) - osg::notify( osg::WARN ) << "Currently no support for in Emission channel " << std::endl; + OSG_WARN << "Currently no support for in Emission channel " << std::endl; processColorOrTextureType(ss, p->getAmbient(), osg::Material::AMBIENT, mat.get(), NULL, &AmbientStateAttribute ); @@ -437,7 +437,7 @@ void daeReader::processProfileCOMMON(osg::StateSet *ss, domProfile_COMMON *pc ) else { if (NULL != AmbientStateAttribute ) - osg::notify( osg::WARN ) << "Ambient occlusion map only supported when diffuse texture also specified" << std::endl; + OSG_WARN << "Ambient occlusion map only supported when diffuse texture also specified" << std::endl; } if (processColorOrTextureType(ss, p->getSpecular(), osg::Material::SPECULAR, mat.get(), p->getShininess() ) && (NULL != DiffuseStateAttribute) ) @@ -469,7 +469,7 @@ void daeReader::processProfileCOMMON(osg::StateSet *ss, domProfile_COMMON *pc ) osg::Texture2D *DiffuseStateAttribute = NULL; processColorOrTextureType(ss, l->getEmission(), osg::Material::EMISSION, mat.get(), NULL, &EmissionStateAttribute ); if (NULL != EmissionStateAttribute) - osg::notify( osg::WARN ) << "Currently no support for in Emission channel " << std::endl; + OSG_WARN << "Currently no support for in Emission channel " << std::endl; processColorOrTextureType(ss, l->getAmbient(), osg::Material::AMBIENT, mat.get(), NULL, &AmbientStateAttribute); @@ -509,7 +509,7 @@ void daeReader::processProfileCOMMON(osg::StateSet *ss, domProfile_COMMON *pc ) else { if (NULL != AmbientStateAttribute ) - osg::notify( osg::WARN ) << "Ambient occlusion map only supported when diffuse texture also specified" << std::endl; + OSG_WARN << "Ambient occlusion map only supported when diffuse texture also specified" << std::endl; } processTransparencySettings(l->getTransparent(), l->getTransparency(), ss, mat.get(), DiffuseTextureName ); @@ -599,11 +599,11 @@ bool daeReader::processColorOrTextureType(const osg::StateSet* ss, retVal = true; } else - osg::notify( osg::WARN ) << "Currently no support for in Emission channel " << std::endl; + OSG_WARN << "Currently no support for in Emission channel " << std::endl; } else { - osg::notify( osg::WARN ) << "Missing , or in Emission channel " << std::endl; + OSG_WARN << "Missing , or in Emission channel " << std::endl; } } else if (channel == osg::Material::AMBIENT ) @@ -629,14 +629,14 @@ bool daeReader::processColorOrTextureType(const osg::StateSet* ss, *sa = processTexture( cot->getTexture(), ss, AMBIENT_OCCLUSION_UNIT); else { - osg::notify( osg::WARN ) << "Currently no support for in Ambient channel " << std::endl; + OSG_WARN << "Currently no support for in Ambient channel " << std::endl; mat->setAmbient( osg::Material::FRONT_AND_BACK, osg::Vec4( 0.2f, 0.2f, 0.2f, 1.0f ) ); } retVal = true; } else { - osg::notify( osg::WARN ) << "Missing , or in Ambient channel " << std::endl; + OSG_WARN << "Missing , or in Ambient channel " << std::endl; } } else if (channel == osg::Material::DIFFUSE ) @@ -653,7 +653,7 @@ bool daeReader::processColorOrTextureType(const osg::StateSet* ss, *sa = processTexture( cot->getTexture(), ss, MAIN_TEXTURE_UNIT); else { - osg::notify( osg::WARN ) << "Currently no support for in Diffuse channel " << std::endl; + OSG_WARN << "Currently no support for in Diffuse channel " << std::endl; mat->setDiffuse( osg::Material::FRONT_AND_BACK, osg::Vec4( 0.8f, 0.8f, 0.8f, 1.0f ) ); } domExtra *extra = cot->getTexture()->getExtra(); @@ -687,7 +687,7 @@ bool daeReader::processColorOrTextureType(const osg::StateSet* ss, } else { - osg::notify( osg::WARN ) << "Missing , or in Diffuse channel " << std::endl; + OSG_WARN << "Missing , or in Diffuse channel " << std::endl; } } else if (channel == osg::Material::SPECULAR ) @@ -709,11 +709,11 @@ bool daeReader::processColorOrTextureType(const osg::StateSet* ss, } else if (cot->getTexture() != NULL) { - osg::notify( osg::WARN ) << "Currently no support for in Specular channel " << std::endl; + OSG_WARN << "Currently no support for in Specular channel " << std::endl; } else { - osg::notify( osg::WARN ) << "Missing , or in Specular channel " << std::endl; + OSG_WARN << "Missing , or in Specular channel " << std::endl; } if (fop != NULL && fop->getFloat() != NULL ) @@ -840,7 +840,7 @@ osg::Texture::WrapMode getWrapMode(domFx_sampler_wrap_common domWrap) case FX_SAMPLER_WRAP_COMMON_BORDER: return osg::Texture::CLAMP_TO_BORDER; default: - osg::notify(osg::WARN) << "Unrecognised domFx_sampler_wrap_common." << std::endl; + OSG_WARN << "Unrecognised domFx_sampler_wrap_common." << std::endl; } return osg::Texture::CLAMP; } @@ -863,7 +863,7 @@ osg::Texture::FilterMode getFilterMode(domFx_sampler_filter_common domFilter, bo case FX_SAMPLER_FILTER_COMMON_LINEAR_MIPMAP_LINEAR: return allowMipMap ? osg::Texture::LINEAR_MIPMAP_LINEAR : osg::Texture::LINEAR; default: - osg::notify(osg::WARN) << "Unrecognised domFx_sampler_filter_common." << std::endl; + OSG_WARN << "Unrecognised domFx_sampler_filter_common." << std::endl; } return osg::Texture::LINEAR; } @@ -872,7 +872,7 @@ std::string daeReader::processImagePath(const domImage* pDomImage) const { if (pDomImage == NULL) { - osg::notify( osg::WARN ) << "Could not locate image for texture" << std::endl; + OSG_WARN << "Could not locate image for texture" << std::endl; return std::string(); } @@ -887,7 +887,7 @@ std::string daeReader::processImagePath(const domImage* pDomImage) const path = cdom::uriToNativePath(path); if (path.empty()) { - osg::notify( osg::WARN ) << "Unable to get path from URI." << std::endl; + OSG_WARN << "Unable to get path from URI." << std::endl; return std::string(); } #ifdef WIN32 @@ -900,12 +900,12 @@ std::string daeReader::processImagePath(const domImage* pDomImage) const } else { - osg::notify( osg::WARN ) << "Only images with a \"file\" scheme URI are supported in this version." << std::endl; + OSG_WARN << "Only images with a \"file\" scheme URI are supported in this version." << std::endl; } } else { - osg::notify( osg::WARN ) << "Embedded image data is not supported in this version." << std::endl; + OSG_WARN << "Embedded image data is not supported in this version." << std::endl; } return std::string(); } @@ -1000,19 +1000,19 @@ osg::Texture2D* daeReader::processTexture( domImage *dImg = NULL; std::string target = std::string("./") + std::string(tex->getTexture()); - osg::notify(osg::NOTICE)<<"processTexture("<getTexture() << + OSG_WARN << "Could not locate newparam for texture sampler2D \"" << tex->getTexture() << "\". Checking if data does incorrect linking straight to the image" << std::endl; _dae->getDatabase()->getElement( (daeElement**)&dImg, 0, tex->getTexture(), "image" ); if (dImg != NULL ) { - osg::notify( osg::WARN ) << "Direct image link found. Data is incorrect but will continue to load texture" << std::endl; + OSG_WARN << "Direct image link found. Data is incorrect but will continue to load texture" << std::endl; } } else @@ -1031,7 +1031,7 @@ osg::Texture2D* daeReader::processTexture( if (sampler == NULL ) { - osg::notify( osg::WARN ) << "Wrong newparam type. Expected sampler2D" << std::endl; + OSG_WARN << "Wrong newparam type. Expected sampler2D" << std::endl; return NULL; } @@ -1041,7 +1041,7 @@ osg::Texture2D* daeReader::processTexture( el = res2.getElement(); if (el == NULL ) { - osg::notify( osg::WARN ) << "Could not locate newparam for source " << sampler->getSource()->getValue() << std::endl; + OSG_WARN << "Could not locate newparam for source " << sampler->getSource()->getValue() << std::endl; return NULL; } cnp = daeSafeCast< domCommon_newparam_type >( el ); @@ -1058,7 +1058,7 @@ osg::Texture2D* daeReader::processTexture( if (surface == NULL ) { - osg::notify( osg::WARN ) << "Wrong newparam type. Expected surface" << std::endl; + OSG_WARN << "Wrong newparam type. Expected surface" << std::endl; return NULL; } @@ -1117,7 +1117,7 @@ osg::Texture2D* daeReader::processTexture( return NULL; } - osg::notify(osg::INFO)<<" processTexture(..) - readImage("< for " << texCoordSetName << std::endl; + OSG_WARN << "Failed to find matching for " << texCoordSetName << std::endl; if (cachedGeometry->getNumTexCoordArrays()) { clonedGeometry->setTexCoordData(tuu, cachedGeometry->getTexCoordData(0)); diff --git a/src/osgPlugins/dae/daeRSceneObjects.cpp b/src/osgPlugins/dae/daeRSceneObjects.cpp index 47f2fcba5..7c368268a 100644 --- a/src/osgPlugins/dae/daeRSceneObjects.cpp +++ b/src/osgPlugins/dae/daeRSceneObjects.cpp @@ -40,7 +40,7 @@ osg::Group* daeReader::processOsgMultiSwitch(domTechnique* teq) } else { - osg::notify(osg::WARN) << "Expected element 'ActiveSwitchSet' not found" << std::endl; + OSG_WARN << "Expected element 'ActiveSwitchSet' not found" << std::endl; } any = daeSafeCast(teq->getChild("ValueLists")); @@ -70,18 +70,18 @@ osg::Group* daeReader::processOsgMultiSwitch(domTechnique* teq) } else { - osg::notify(osg::WARN) << "Child of element 'ValueLists' is not of type 'ValueList'" << std::endl; + OSG_WARN << "Child of element 'ValueLists' is not of type 'ValueList'" << std::endl; } } else { - osg::notify(osg::WARN) << "Element 'ValueLists' does not contain expected elements." << std::endl; + OSG_WARN << "Element 'ValueLists' does not contain expected elements." << std::endl; } } } else { - osg::notify(osg::WARN) << "Expected element 'ValueLists' not found" << std::endl; + OSG_WARN << "Expected element 'ValueLists' not found" << std::endl; } return msw; } @@ -107,7 +107,7 @@ osg::Group* daeReader::processOsgSwitch(domTechnique* teq) } else { - osg::notify(osg::WARN) << "Expected element 'ValueList' not found" << std::endl; + OSG_WARN << "Expected element 'ValueList' not found" << std::endl; } return sw; } @@ -133,7 +133,7 @@ osg::Group* daeReader::processOsgSequence(domTechnique* teq) } else { - osg::notify(osg::WARN) << "Expected element 'FrameTime' not found" << std::endl; + OSG_WARN << "Expected element 'FrameTime' not found" << std::endl; } any = daeSafeCast< domAny >(teq->getChild("LastFrameTime")); @@ -143,7 +143,7 @@ osg::Group* daeReader::processOsgSequence(domTechnique* teq) } else { - osg::notify(osg::WARN) << "Expected element 'LastFrameTime' not found" << std::endl; + OSG_WARN << "Expected element 'LastFrameTime' not found" << std::endl; } osg::Sequence::LoopMode loopmode = osg::Sequence::LOOP; @@ -154,7 +154,7 @@ osg::Group* daeReader::processOsgSequence(domTechnique* teq) } else { - osg::notify(osg::WARN) << "Expected element 'LoopMode' not found" << std::endl; + OSG_WARN << "Expected element 'LoopMode' not found" << std::endl; } int begin=0; @@ -165,7 +165,7 @@ osg::Group* daeReader::processOsgSequence(domTechnique* teq) } else { - osg::notify(osg::WARN) << "Expected element 'IntervalBegin' not found" << std::endl; + OSG_WARN << "Expected element 'IntervalBegin' not found" << std::endl; } int end=-1; @@ -176,7 +176,7 @@ osg::Group* daeReader::processOsgSequence(domTechnique* teq) } else { - osg::notify(osg::WARN) << "Expected element 'IntervalEnd' not found" << std::endl; + OSG_WARN << "Expected element 'IntervalEnd' not found" << std::endl; } sq->setInterval(loopmode, begin, end); @@ -189,7 +189,7 @@ osg::Group* daeReader::processOsgSequence(domTechnique* teq) } else { - osg::notify(osg::WARN) << "Expected element 'DurationSpeed' not found" << std::endl; + OSG_WARN << "Expected element 'DurationSpeed' not found" << std::endl; } int nreps = -1; @@ -200,7 +200,7 @@ osg::Group* daeReader::processOsgSequence(domTechnique* teq) } else { - osg::notify(osg::WARN) << "Expected element 'DurationNReps' not found" << std::endl; + OSG_WARN << "Expected element 'DurationNReps' not found" << std::endl; } sq->setDuration(speed, nreps); @@ -212,7 +212,7 @@ osg::Group* daeReader::processOsgSequence(domTechnique* teq) } else { - osg::notify(osg::WARN) << "Expected element 'SequenceMode' not found" << std::endl; + OSG_WARN << "Expected element 'SequenceMode' not found" << std::endl; } return sq; @@ -237,7 +237,7 @@ osg::Group* daeReader::processOsgLOD(domTechnique* teq) } else { - osg::notify(osg::WARN) << "Expected element 'Radius' not found" << std::endl; + OSG_WARN << "Expected element 'Radius' not found" << std::endl; } } @@ -248,7 +248,7 @@ osg::Group* daeReader::processOsgLOD(domTechnique* teq) } else { - osg::notify(osg::WARN) << "Expected element 'RangeMode' not found" << std::endl; + OSG_WARN << "Expected element 'RangeMode' not found" << std::endl; } any = daeSafeCast< domAny >(teq->getChild("RangeList")); @@ -277,7 +277,7 @@ osg::Group* daeReader::processOsgLOD(domTechnique* teq) } else { - osg::notify(osg::WARN) << "'MinMax' does not contain a valid minimum value" << std::endl; + OSG_WARN << "'MinMax' does not contain a valid minimum value" << std::endl; } if (iter != stringValues.end()) @@ -286,19 +286,19 @@ osg::Group* daeReader::processOsgLOD(domTechnique* teq) } else { - osg::notify(osg::WARN) << "'MinMax' does not contain a valid maximum value" << std::endl; + OSG_WARN << "'MinMax' does not contain a valid maximum value" << std::endl; } rangelist.push_back(minMaxPair); } else { - osg::notify(osg::WARN) << "Child of element 'RangeList' is not of type 'MinMax'" << std::endl; + OSG_WARN << "Child of element 'RangeList' is not of type 'MinMax'" << std::endl; } } else { - osg::notify(osg::WARN) << "Element 'RangeList' does not contain expected elements." << std::endl; + OSG_WARN << "Element 'RangeList' does not contain expected elements." << std::endl; } } @@ -306,7 +306,7 @@ osg::Group* daeReader::processOsgLOD(domTechnique* teq) } else { - osg::notify(osg::WARN) << "Expected element 'RangeList' not found" << std::endl; + OSG_WARN << "Expected element 'RangeList' not found" << std::endl; } return lod; @@ -325,7 +325,7 @@ osg::Node* daeReader::processLight( domLight *dlight ) { if (_numlights >= 7) { - osg::notify( osg::WARN ) << "More than 8 lights may not be supported by OpenGL driver." << std::endl; + OSG_WARN << "More than 8 lights may not be supported by OpenGL driver." << std::endl; } //do light processing here. @@ -337,7 +337,7 @@ osg::Node* daeReader::processLight( domLight *dlight ) if ( dlight->getTechnique_common() == NULL || dlight->getTechnique_common()->getContents().getCount() == 0 ) { - osg::notify( osg::WARN ) << "Invalid content for light" << std::endl; + OSG_WARN << "Invalid content for light" << std::endl; return NULL; } @@ -369,7 +369,7 @@ osg::Node* daeReader::processLight( domLight *dlight ) { if ( ambient->getColor() == NULL ) { - osg::notify( osg::WARN ) << "Invalid content for ambient light" << std::endl; + OSG_WARN << "Invalid content for ambient light" << std::endl; return NULL; } @@ -386,7 +386,7 @@ osg::Node* daeReader::processLight( domLight *dlight ) { if ( directional->getColor() == NULL ) { - osg::notify( osg::WARN ) << "Invalid content for directional light" << std::endl; + OSG_WARN << "Invalid content for directional light" << std::endl; return NULL; } light->setAmbient( osg::Vec4( 0, 0, 0, 0)); @@ -406,7 +406,7 @@ osg::Node* daeReader::processLight( domLight *dlight ) { if ( point->getColor() == NULL ) { - osg::notify( osg::WARN ) << "Invalid content for point light" << std::endl; + OSG_WARN << "Invalid content for point light" << std::endl; return NULL; } light->setAmbient( osg::Vec4( 0, 0, 0, 0)); @@ -449,7 +449,7 @@ osg::Node* daeReader::processLight( domLight *dlight ) { if ( spot->getColor() == NULL ) { - osg::notify( osg::WARN ) << "Invalid content for spot light" << std::endl; + OSG_WARN << "Invalid content for spot light" << std::endl; return NULL; } light->setAmbient( osg::Vec4( 0, 0, 0, 0)); @@ -557,7 +557,7 @@ osg::Node* daeReader::processCamera( domCamera * dcamera ) if (pAspectRatio) { - osg::notify(osg::WARN) << "Unexpected in '" << dcamera->getId() << "'" << std::endl; + OSG_WARN << "Unexpected in '" << dcamera->getId() << "'" << std::endl; } } else if (pAspectRatio) @@ -591,7 +591,7 @@ osg::Node* daeReader::processCamera( domCamera * dcamera ) else { // xfov or yfov expected - osg::notify(osg::WARN) << "Expected or in '" << dcamera->getId() << "'" << std::endl; + OSG_WARN << "Expected or in '" << dcamera->getId() << "'" << std::endl; } //domTargetableFloat *pZnear = daeSafeCast< domTargetableFloat >(pDomPerspective->getZnear()); @@ -611,7 +611,7 @@ osg::Node* daeReader::processCamera( domCamera * dcamera ) //domTargetableFloat *pAspectRatio = daeSafeCast< domTargetableFloat >(pDomOrthographic->getAspect_ratio()); // TODO The current osg::CameraView does not support an orthographic view - osg::notify(osg::WARN) << "Orthographic in '" << dcamera->getId() << "' not supported" << std::endl; + OSG_WARN << "Orthographic in '" << dcamera->getId() << "' not supported" << std::endl; //domTargetableFloat *pZnear = daeSafeCast< domTargetableFloat >(pDomOrthographic->getZnear()); //domTargetableFloat *pZfar = daeSafeCast< domTargetableFloat >(pDomOrthographic->getZfar()); diff --git a/src/osgPlugins/dae/daeRSkinning.cpp b/src/osgPlugins/dae/daeRSkinning.cpp index fdf442ca0..f2ec22969 100644 --- a/src/osgPlugins/dae/daeRSkinning.cpp +++ b/src/osgPlugins/dae/daeRSkinning.cpp @@ -57,7 +57,7 @@ domNode* daeReader::findJointNode(daeElement* searchFrom, domInstance_controller pDomJointsSource = daeSafeCast(getElementFromURI(domInputs[i]->getSource())); if (!pDomJointsSource) { - osg::notify( osg::WARN ) << "Could not find skin joints source '" << domInputs[i]->getSource().getURI() << "'" <getSource().getURI() << "'" <" <" < 2) { - osg::notify( osg::WARN ) << "Only a single pair of skin joints inputs is supported." << std::endl; + OSG_WARN << "Only a single pair of skin joints inputs is supported." << std::endl; } domSource* pDomJointsSource = NULL; @@ -165,7 +165,7 @@ void getJointsAndInverseObjectspaceBindMatrices(domInstance_controller* pDomInst pDomJointsSource = daeSafeCast(getElementFromURI(domInputs[i]->getSource())); if (!pDomJointsSource) { - osg::notify( osg::WARN ) << "Could not find skin joints source '" << domInputs[i]->getSource().getURI() << "'" <getSource().getURI() << "'" <(getElementFromURI(domInputs[i]->getSource())); if (!pDomInvBindMatricesSource) { - osg::notify( osg::WARN ) << "Could not find skin inverse bind matrices source '" << domInputs[i]->getSource().getURI() << "'" <getSource().getURI() << "'" <get(i).getID() << "'" << std::endl; + OSG_WARN << "Failed to locate joint '" << pIDREFS->get(i).getID() << "'" << std::endl; } } } @@ -219,13 +219,13 @@ void getJointsAndInverseObjectspaceBindMatrices(domInstance_controller* pDomInst } else { - osg::notify( osg::WARN ) << "Failed to locate joint '" << pNames->get(i) << "'" << std::endl; + OSG_WARN << "Failed to locate joint '" << pNames->get(i) << "'" << std::endl; } } } else { - osg::notify( osg::WARN ) << "No valid names or IDREFS array in " <" <getSource().getURI() << std::endl; + OSG_WARN << "Failed to locate geometry " << pDomSkin->getSource().getURI() << std::endl; return; } @@ -304,7 +304,7 @@ void daeReader::processSkin(domSkin* pDomSkin, domNode* skeletonRoot, osgAnimati if (!pDomGeometry) { - osg::notify( osg::WARN ) << "Skin source is of type " << pDaeSkinSource->getTypeName() << " which is not supported." << std::endl; + OSG_WARN << "Skin source is of type " << pDaeSkinSource->getTypeName() << " which is not supported." << std::endl; return; } @@ -385,7 +385,7 @@ void daeReader::processSkin(domSkin* pDomSkin, domNode* skeletonRoot, osgAnimati if (domInputs.getCount() > 2) { - osg::notify( osg::WARN ) << "Only a single pair of skin vertex weights inputs is supported." << std::endl; + OSG_WARN << "Only a single pair of skin vertex weights inputs is supported." << std::endl; } domSource* pDomJointsSource = NULL; @@ -397,7 +397,7 @@ void daeReader::processSkin(domSkin* pDomSkin, domNode* skeletonRoot, osgAnimati pDomJointsSource = daeSafeCast(getElementFromURI(domInputs[i]->getSource())); if (!pDomJointsSource) { - osg::notify( osg::WARN ) << "Could not find skin joints source '" << domInputs[i]->getSource().getURI() << "'" <getSource().getURI() << "'" <(getElementFromURI(domInputs[i]->getSource())); if (!pDomWeightsSource) { - osg::notify( osg::WARN ) << "Could not find skin weights source '" << domInputs[i]->getSource().getURI() << "'" <getSource().getURI() << "'" <get(i).getID()); - osg::notify(osg::WARN) << "Cannot find bone " << pIDREFs->get(i).getID() << std::endl; + OSG_WARN << "Cannot find bone " << pIDREFs->get(i).getID() << std::endl; } } } else { - osg::notify( osg::WARN ) << "No valid names or IDREFS array in " <" < jointWeightIndices.getCount()) { - osg::notify( osg::WARN ) << "vIndex is larger than number of v values" <= jointNames.size()) { - osg::notify( osg::WARN ) << "Joint index is larger the number of joints" <= weights.getCount()) { - osg::notify( osg::WARN ) << "Weight index is larger the number of weights" <getValue(); if (r.getCount() != 4 ) { - osg::notify(osg::WARN) << "Data is wrong size for rotate" << std::endl; + OSG_WARN << "Data is wrong size for rotate" << std::endl; continue; } @@ -71,7 +71,7 @@ osg::Transform* daeReader::processOsgMatrixTransform(domNode *node, bool isBone) const domFloat3& t = pDomTranslate->getValue(); if (t.getCount() != 3 ) { - osg::notify(osg::WARN)<<"Data is wrong size for translate"<getValue(); if (s.getCount() != 3 ) { - osg::notify(osg::WARN)<<"Data is wrong size for scale"<getValue().getCount() != 16 ) { - osg::notify(osg::WARN)<<"Data is wrong size for matrix"<getValue().getCount() != 9 ) { - osg::notify(osg::WARN)<<"Data is wrong size for lookat"<getValue().getCount() != 7 ) { - osg::notify(osg::WARN)<<"Data is wrong size for skew"<(teq->getChild("MaxHPR")); @@ -250,7 +250,7 @@ osg::Group* daeReader::processOsgDOFTransform(domTechnique* teq) } else { - osg::notify(osg::WARN) << "Expected element 'MaxHPR' not found" << std::endl; + OSG_WARN << "Expected element 'MaxHPR' not found" << std::endl; } any = daeSafeCast< domAny >(teq->getChild("IncrementHPR")); @@ -260,7 +260,7 @@ osg::Group* daeReader::processOsgDOFTransform(domTechnique* teq) } else { - osg::notify(osg::WARN) << "Expected element 'IncrementHPR' not found" << std::endl; + OSG_WARN << "Expected element 'IncrementHPR' not found" << std::endl; } any = daeSafeCast< domAny >(teq->getChild("CurrentHPR")); @@ -270,7 +270,7 @@ osg::Group* daeReader::processOsgDOFTransform(domTechnique* teq) } else { - osg::notify(osg::WARN) << "Expected element 'CurrentHPR' not found" << std::endl; + OSG_WARN << "Expected element 'CurrentHPR' not found" << std::endl; } any = daeSafeCast< domAny >(teq->getChild("MinTranslate")); @@ -280,7 +280,7 @@ osg::Group* daeReader::processOsgDOFTransform(domTechnique* teq) } else { - osg::notify(osg::WARN) << "Expected element 'MinTranslate' not found" << std::endl; + OSG_WARN << "Expected element 'MinTranslate' not found" << std::endl; } any = daeSafeCast< domAny >(teq->getChild("MaxTranslate")); @@ -290,7 +290,7 @@ osg::Group* daeReader::processOsgDOFTransform(domTechnique* teq) } else { - osg::notify(osg::WARN) << "Expected element 'MaxTranslate' not found" << std::endl; + OSG_WARN << "Expected element 'MaxTranslate' not found" << std::endl; } any = daeSafeCast< domAny >(teq->getChild("IncrementTranslate")); @@ -300,7 +300,7 @@ osg::Group* daeReader::processOsgDOFTransform(domTechnique* teq) } else { - osg::notify(osg::WARN) << "Expected element 'IncrementTranslate' not found" << std::endl; + OSG_WARN << "Expected element 'IncrementTranslate' not found" << std::endl; } any = daeSafeCast< domAny >(teq->getChild("CurrentTranslate")); @@ -310,7 +310,7 @@ osg::Group* daeReader::processOsgDOFTransform(domTechnique* teq) } else { - osg::notify(osg::WARN) << "Expected element 'CurrentTranslate' not found" << std::endl; + OSG_WARN << "Expected element 'CurrentTranslate' not found" << std::endl; } any = daeSafeCast< domAny >(teq->getChild("MinScale")); @@ -320,7 +320,7 @@ osg::Group* daeReader::processOsgDOFTransform(domTechnique* teq) } else { - osg::notify(osg::WARN) << "Expected element 'MinScale' not found" << std::endl; + OSG_WARN << "Expected element 'MinScale' not found" << std::endl; } any = daeSafeCast< domAny >(teq->getChild("MaxScale")); @@ -330,7 +330,7 @@ osg::Group* daeReader::processOsgDOFTransform(domTechnique* teq) } else { - osg::notify(osg::WARN) << "Expected element 'MaxScale' not found" << std::endl; + OSG_WARN << "Expected element 'MaxScale' not found" << std::endl; } any = daeSafeCast< domAny >(teq->getChild("IncrementScale")); @@ -340,7 +340,7 @@ osg::Group* daeReader::processOsgDOFTransform(domTechnique* teq) } else { - osg::notify(osg::WARN) << "Expected element 'IncrementScale' not found" << std::endl; + OSG_WARN << "Expected element 'IncrementScale' not found" << std::endl; } any = daeSafeCast< domAny >(teq->getChild("CurrentScale")); @@ -350,7 +350,7 @@ osg::Group* daeReader::processOsgDOFTransform(domTechnique* teq) } else { - osg::notify(osg::WARN) << "Expected element 'CurrentScale' not found" << std::endl; + OSG_WARN << "Expected element 'CurrentScale' not found" << std::endl; } any = daeSafeCast< domAny >(teq->getChild("MultOrder")); @@ -360,7 +360,7 @@ osg::Group* daeReader::processOsgDOFTransform(domTechnique* teq) } else { - osg::notify(osg::WARN) << "Expected element 'MultOrder' not found" << std::endl; + OSG_WARN << "Expected element 'MultOrder' not found" << std::endl; } any = daeSafeCast< domAny >(teq->getChild("LimitationFlags")); @@ -370,7 +370,7 @@ osg::Group* daeReader::processOsgDOFTransform(domTechnique* teq) } else { - osg::notify(osg::WARN) << "Expected element 'LimitationFlags' not found" << std::endl; + OSG_WARN << "Expected element 'LimitationFlags' not found" << std::endl; } any = daeSafeCast< domAny >(teq->getChild("AnimationOn")); @@ -380,7 +380,7 @@ osg::Group* daeReader::processOsgDOFTransform(domTechnique* teq) } else { - osg::notify(osg::WARN) << "Expected element 'AnimationOn' not found" << std::endl; + OSG_WARN << "Expected element 'AnimationOn' not found" << std::endl; } any = daeSafeCast< domAny >(teq->getChild("PutMatrix")); @@ -392,7 +392,7 @@ osg::Group* daeReader::processOsgDOFTransform(domTechnique* teq) } else { - osg::notify(osg::WARN) << "Expected element 'PutMatrix' not found" << std::endl; + OSG_WARN << "Expected element 'PutMatrix' not found" << std::endl; } return dof; diff --git a/src/osgPlugins/dae/daeReader.cpp b/src/osgPlugins/dae/daeReader.cpp index d40ddf361..e3226a3f0 100644 --- a/src/osgPlugins/dae/daeReader.cpp +++ b/src/osgPlugins/dae/daeReader.cpp @@ -58,14 +58,14 @@ bool daeReader::convert( const std::string &fileURI ) if (!_document) { - osg::notify( osg::WARN ) << "Load failed in COLLADA DOM" << std::endl; + OSG_WARN << "Load failed in COLLADA DOM" << std::endl; return false; } - osg::notify( osg::INFO ) << "URI loaded: " << fileURI << std::endl; + OSG_INFO << "URI loaded: " << fileURI << std::endl; if ( !_document->getScene() || !_document->getScene()->getInstance_visual_scene() ) { - osg::notify( osg::WARN ) << "No scene found!" << std::endl; + OSG_WARN << "No scene found!" << std::endl; return false; } @@ -113,7 +113,7 @@ bool daeReader::convert( const std::string &fileURI ) _visualScene = daeSafeCast< domVisual_scene >( getElementFromURI( ivs->getUrl() ) ); if ( _visualScene == NULL ) { - osg::notify( osg::WARN ) << "Unable to locate visual scene!" << std::endl; + OSG_WARN << "Unable to locate visual scene!" << std::endl; return false; } @@ -165,7 +165,7 @@ bool daeReader::convert( const std::string &fileURI ) } else { - osg::notify( osg::WARN ) << "Could not locate target " << pDomChannel->getTarget()<< std::endl; + OSG_WARN << "Could not locate target " << pDomChannel->getTarget()<< std::endl; } } } @@ -183,7 +183,7 @@ bool daeReader::convert( const std::string &fileURI ) domController *pDomController = daeSafeCast(getElementFromURI(pInstanceController->getUrl())); if (!pDomController) { - osg::notify( osg::WARN ) << "Failed to locate controller " << pInstanceController->getUrl().getURI() << std::endl; + OSG_WARN << "Failed to locate controller " << pInstanceController->getUrl().getURI() << std::endl; continue; } @@ -221,7 +221,7 @@ bool daeReader::convert( const std::string &fileURI ) pDomJointsSource = daeSafeCast(getElementFromURI(inputURIs[i]->getSource())); if (!pDomJointsSource) { - osg::notify( osg::WARN ) << "Could not find skin joints source '" << inputURIs[i]->getSource().getURI() << "'" <getSource().getURI() << "'" <getNode_array().getCount(); if (nbVisualSceneGroup==0) { - osg::notify( osg::WARN ) << "No visual scene group found !" << std::endl; + OSG_WARN << "No visual scene group found !" << std::endl; retVal = new osg::Group(); retVal->setName("Empty Collada scene"); } @@ -451,19 +451,19 @@ void daeReader::processNodeExtra(osg::Node* osgNode, domNode *node) } else { - osg::notify(osg::WARN) << "Child of element 'Descriptions' is not of type 'Description'" << std::endl; + OSG_WARN << "Child of element 'Descriptions' is not of type 'Description'" << std::endl; } } else { - osg::notify(osg::WARN) << "Element 'Descriptions' does not contain expected elements." << std::endl; + OSG_WARN << "Element 'Descriptions' does not contain expected elements." << std::endl; } } osgNode->setDescriptions(descriptions); } else { - osg::notify(osg::WARN) << "Expected element 'Descriptions' not found" << std::endl; + OSG_WARN << "Expected element 'Descriptions' not found" << std::endl; } } } @@ -567,7 +567,7 @@ osg::Node* daeReader::processNode( domNode *node, bool skeleton) if (c) addChild(attachTo, processCamera( c )); else - osg::notify( osg::WARN ) << "Failed to locate camera " << cameraInstanceArray[i]->getUrl().getURI() << std::endl; + OSG_WARN << "Failed to locate camera " << cameraInstanceArray[i]->getUrl().getURI() << std::endl; } // 0..* @@ -601,7 +601,7 @@ osg::Node* daeReader::processNode( domNode *node, bool skeleton) if (pDomLight) addChild(attachTo, processLight(pDomLight)); else - osg::notify( osg::WARN ) << "Failed to locate light " << lightInstanceArray[i]->getUrl().getURI() << std::endl; + OSG_WARN << "Failed to locate light " << lightInstanceArray[i]->getUrl().getURI() << std::endl; } // 0..* @@ -615,7 +615,7 @@ osg::Node* daeReader::processNode( domNode *node, bool skeleton) // Recursive call addChild(attachTo, processNode( n, skeleton )); else - osg::notify( osg::WARN ) << "Failed to locate node " << nodeInstanceArray[i]->getUrl().getURI() << std::endl; + OSG_WARN << "Failed to locate node " << nodeInstanceArray[i]->getUrl().getURI() << std::endl; } // 0..* diff --git a/src/osgPlugins/dae/daeWAnimations.cpp b/src/osgPlugins/dae/daeWAnimations.cpp index 05dc50a79..f390b8a66 100644 --- a/src/osgPlugins/dae/daeWAnimations.cpp +++ b/src/osgPlugins/dae/daeWAnimations.cpp @@ -288,7 +288,7 @@ void daeWriter::writeAnimations( osg::Node &node ) } else { - osg::notify( osg::WARN ) << "Could not find animation target '" << targetName << "'" << std::endl; + OSG_WARN << "Could not find animation target '" << targetName << "'" << std::endl; } } @@ -332,7 +332,7 @@ void daeWriter::writeAnimations( osg::Node &node ) } else { - osg::notify( osg::WARN ) << "Could not find animation target '" << targetName << "'" << std::endl; + OSG_WARN << "Could not find animation target '" << targetName << "'" << std::endl; } } @@ -376,7 +376,7 @@ void daeWriter::writeAnimations( osg::Node &node ) } else { - osg::notify( osg::WARN ) << "Could not find animation target '" << targetName << "'" << std::endl; + OSG_WARN << "Could not find animation target '" << targetName << "'" << std::endl; } } } @@ -472,7 +472,7 @@ void daeWriter::writeAnimations( osg::Node &node ) } else { - osg::notify( osg::WARN ) << "Could not find animation target '" << targetName << "'" << std::endl; + OSG_WARN << "Could not find animation target '" << targetName << "'" << std::endl; } } } diff --git a/src/osgPlugins/dae/daeWGeometry.cpp b/src/osgPlugins/dae/daeWGeometry.cpp index f3792896b..eafde1809 100644 --- a/src/osgPlugins/dae/daeWGeometry.cpp +++ b/src/osgPlugins/dae/daeWGeometry.cpp @@ -422,7 +422,7 @@ void daeWriter::apply( osg::Geode &node ) } else { - osg::notify( osg::WARN ) << "Non-geometry drawables are not supported" << std::endl; + OSG_WARN << "Non-geometry drawables are not supported" << std::endl; } } @@ -546,7 +546,7 @@ bool daeWriter::processGeometry( osg::Geometry *geom, domGeometry *geo, const st } break; default: - osg::notify( osg::WARN ) << "Invalid array type for vertices" << std::endl; + OSG_WARN << "Invalid array type for vertices" << std::endl; break; } @@ -602,9 +602,9 @@ bool daeWriter::processGeometry( osg::Geometry *geom, domGeometry *geo, const st //no normals case ArrayNIndices::NONE: - osg::notify( osg::WARN ) << "No array type for normals"<getNumPrimitiveSets() == 0 ) { - osg::notify( osg::WARN ) << "NO PRIMITIVE SET!!" << std::endl; + OSG_WARN << "NO PRIMITIVE SET!!" << std::endl; return false; } bool valid = false; @@ -797,7 +797,7 @@ bool daeWriter::processGeometry( osg::Geometry *geom, domGeometry *geo, const st { case GL_POINTS: { - osg::notify( osg::WARN ) << "Geometry contains points rendering. COLLADA does not" << std::endl; + OSG_WARN << "Geometry contains points rendering. COLLADA does not" << std::endl; continue; } case GL_LINES: @@ -924,7 +924,7 @@ bool daeWriter::processGeometry( osg::Geometry *geom, domGeometry *geo, const st //(primitive type+begin+end),(primitive type+begin+end)... case osg::PrimitiveSet::DrawArraysPrimitiveType: { - //osg::notify( osg::WARN ) << "DrawArrays" << std::endl; + //OSG_WARN << "DrawArrays" << std::endl; if ( primLength == 0 ) { @@ -1022,7 +1022,7 @@ bool daeWriter::processGeometry( osg::Geometry *geom, domGeometry *geo, const st //(primitive type) + (end1),(end2),(end3)... case osg::PrimitiveSet::DrawArrayLengthsPrimitiveType: { - //osg::notify( osg::WARN ) << "DrawArrayLengths" << std::endl; + //OSG_WARN << "DrawArrayLengths" << std::endl; osg::DrawArrayLengths* drawArrayLengths = static_cast( ps ); @@ -1123,7 +1123,7 @@ bool daeWriter::processGeometry( osg::Geometry *geom, domGeometry *geo, const st //draw elements (array of shared vertices + array of indices) case osg::PrimitiveSet::DrawElementsUBytePrimitiveType: { - //osg::notify( osg::WARN ) << "DrawElementsUByte" << std::endl; + //OSG_WARN << "DrawElementsUByte" << std::endl; if ( primLength == 0 ) primLength = ps->getNumIndices(); @@ -1223,7 +1223,7 @@ bool daeWriter::processGeometry( osg::Geometry *geom, domGeometry *geo, const st } case osg::PrimitiveSet::DrawElementsUShortPrimitiveType: { - //osg::notify( osg::WARN ) << "DrawElementsUShort" << std::endl; + //OSG_WARN << "DrawElementsUShort" << std::endl; if ( primLength == 0 ) primLength = ps->getNumIndices(); osg::DrawElementsUShort* drawElements = static_cast( ps ); @@ -1323,7 +1323,7 @@ bool daeWriter::processGeometry( osg::Geometry *geom, domGeometry *geo, const st } case osg::PrimitiveSet::DrawElementsUIntPrimitiveType: { - //osg::notify( osg::WARN ) << "DrawElementsUInt" << std::endl; + //OSG_WARN << "DrawElementsUInt" << std::endl; if ( primLength == 0 ) primLength = ps->getNumIndices(); @@ -1422,7 +1422,7 @@ bool daeWriter::processGeometry( osg::Geometry *geom, domGeometry *geo, const st break; } default: - osg::notify( osg::WARN ) << "Unsupported primitiveSet" << std::endl; + OSG_WARN << "Unsupported primitiveSet" << std::endl; break; } diff --git a/src/osgPlugins/dae/daeWMaterials.cpp b/src/osgPlugins/dae/daeWMaterials.cpp index cc53765d3..8b5f2d304 100644 --- a/src/osgPlugins/dae/daeWMaterials.cpp +++ b/src/osgPlugins/dae/daeWMaterials.cpp @@ -370,7 +370,7 @@ void daeWriter::processMaterial( osg::StateSet *ss, domBind_material *pDomBindMa pTransparency->setValue(1.0); } else - osg::notify( osg::WARN ) << "Unsupported BlendFunction parameters in transparency processing." << std::endl; + OSG_WARN << "Unsupported BlendFunction parameters in transparency processing." << std::endl; } else if (tex != NULL && tex->getImage( 0 ) != NULL) { @@ -392,12 +392,12 @@ void daeWriter::processMaterial( osg::StateSet *ss, domBind_material *pDomBindMa } else { - osg::notify( osg::WARN ) << "Transparency processing - No texture or BlendColor." << std::endl; + OSG_WARN << "Transparency processing - No texture or BlendColor." << std::endl; } } else { - osg::notify( osg::WARN ) << "Transparency processing - BlendFunction not found." << std::endl; + OSG_WARN << "Transparency processing - BlendFunction not found." << std::endl; } } diff --git a/src/osgPlugins/dae/daeWSceneObjects.cpp b/src/osgPlugins/dae/daeWSceneObjects.cpp index c5eb986df..af99d09e3 100644 --- a/src/osgPlugins/dae/daeWSceneObjects.cpp +++ b/src/osgPlugins/dae/daeWSceneObjects.cpp @@ -348,7 +348,7 @@ void daeWriter::apply( osg::LOD &node ) void daeWriter::apply( osg::ProxyNode &node ) { - osg::notify( osg::WARN ) << "ProxyNode. Missing " << node.getNumChildren() << " children" << std::endl; + OSG_WARN << "ProxyNode. Missing " << node.getNumChildren() << " children" << std::endl; } void daeWriter::apply( osg::LightSource &node ) diff --git a/src/osgPlugins/dae/daeWTransforms.cpp b/src/osgPlugins/dae/daeWTransforms.cpp index 7918cc1ea..f76b6d4d7 100644 --- a/src/osgPlugins/dae/daeWTransforms.cpp +++ b/src/osgPlugins/dae/daeWTransforms.cpp @@ -300,7 +300,7 @@ void daeWriter::apply( osg::Transform &node ) else { currentNode->setId(getNodeName(node, "transform").c_str()); - osg::notify( osg::WARN ) << "some other transform type. Missing " << node.getNumChildren() << " children" << std::endl; + OSG_WARN << "some other transform type. Missing " << node.getNumChildren() << " children" << std::endl; } } @@ -313,7 +313,7 @@ void daeWriter::apply( osg::Transform &node ) void daeWriter::apply( osg::CoordinateSystemNode &node ) { - osg::notify( osg::WARN ) << "CoordinateSystemNode. Missing " << node.getNumChildren() << " children" << std::endl; + OSG_WARN << "CoordinateSystemNode. Missing " << node.getNumChildren() << " children" << std::endl; } diff --git a/src/osgPlugins/dae/daeWriter.cpp b/src/osgPlugins/dae/daeWriter.cpp index 8b4929fcf..7a6284191 100644 --- a/src/osgPlugins/dae/daeWriter.cpp +++ b/src/osgPlugins/dae/daeWriter.cpp @@ -108,7 +108,7 @@ void daeWriter::debugPrint( osg::Node &node ) { indent += " "; } - osg::notify( osg::INFO ) << indent << node.className() << std::endl; + OSG_INFO << indent << node.className() << std::endl; #endif } diff --git a/src/osgPlugins/dae/daeWriter.h b/src/osgPlugins/dae/daeWriter.h index 4a3d707de..d659ea7cd 100644 --- a/src/osgPlugins/dae/daeWriter.h +++ b/src/osgPlugins/dae/daeWriter.h @@ -104,7 +104,7 @@ public: else { // TODO store in a multimap and let the exporter create multiple s for each connected node - osg::notify( osg::WARN ) << "Multiple nodes using the same update callback not supported" << std::endl; + OSG_WARN << "Multiple nodes using the same update callback not supported" << std::endl; } } } @@ -278,7 +278,7 @@ protected: //inner classes vec4 = (osg::Vec4Array*)array; break; default: - osg::notify( osg::WARN ) << "Array is unsupported vector type" << std::endl; + OSG_WARN << "Array is unsupported vector type" << std::endl; break; } } diff --git a/src/osgPlugins/dae/domSourceReader.cpp b/src/osgPlugins/dae/domSourceReader.cpp index f38aa1d18..d0cb4d86d 100644 --- a/src/osgPlugins/dae/domSourceReader.cpp +++ b/src/osgPlugins/dae/domSourceReader.cpp @@ -24,7 +24,7 @@ domSourceReader::domSourceReader( domSource *src ) : m_array_type( None ), m_cou { domSource::domTechnique_common* technique = src->getTechnique_common(); if ( technique == NULL ) { - osg::notify(osg::WARN)<<"Warning: IntDaeSource::createFrom: Unable to find COMMON technique"<getStride() << std::endl; + OSG_WARN << "Unsupported stride in Source: " << accessor->getStride() << std::endl; return; } } } else { - osg::notify(osg::WARN) << "No float array found" << std::endl; + OSG_WARN << "No float array found" << std::endl; } } diff --git a/src/osgPlugins/dae/domSourceReader.h b/src/osgPlugins/dae/domSourceReader.h index 227b94bf6..2ee62d92a 100644 --- a/src/osgPlugins/dae/domSourceReader.h +++ b/src/osgPlugins/dae/domSourceReader.h @@ -49,7 +49,7 @@ public: int getCount() const { return m_count; }; -#define ASSERT_TYPE(type) if (type!=m_array_type) { osg::notify(osg::WARN)<<"Wrong array type requested ("#type" != "<