OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

FbxPlugin: Check existance of file before trying to load


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Submission
View previous topic :: View next topic  
Author Message
bbjorn
Appreciator


Joined: 12 Oct 2010
Posts: 219
Location: Linköping, Sweden

PostPosted: Thu May 03, 2018 10:58 am    Post subject:
FbxPlugin: Check existance of file before trying to load
Reply with quote

Hi,

I got a lot of warnings in my applications due to the fact that the FBX plugin was trying to load textures with invalid paths. The problem came from the following code section:

https://github.com/openscenegraph/OpenSceneGraph/blob/5feb9e58f72297bdc53695d7224b5d42cdbcb746/src/osgPlugins/fbx/fbxMaterialToOsgStateSet.cpp#L179-L181

The problem was that in my case the first tried path was always invalid resulting in a fired osg::WARN inside the osgDB::readRefImageFile function.

My solution checks the existence of the suggested path before trying to call readRefImageFile function.

Submitted as:
https://github.com/openscenegraph/OpenSceneGraph/pull/544

Regards,
Björn
Back to top
View user's profile Send private message Visit poster's website
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 12027

PostPosted: Fri May 04, 2018 3:18 pm    Post subject:
FbxPlugin: Check existance of file before trying to load
Reply with quote

Hi Bjorn,

Just doing a reply here for closure as the PR been merged. In future
if you have made a PR on github that will normal be sufficient so no
need to have a message to osg-users to accompany it.

Cheers,
Robert.

On 3 May 2018 at 11:58, Björn Blissing <> wrote:
Quote:
Hi,

I got a lot of warnings in my applications due to the fact that the FBX plugin was trying to load textures with invalid paths. The problem came from the following code section:

https://github.com/openscenegraph/OpenSceneGraph/blob/5feb9e58f72297bdc53695d7224b5d42cdbcb746/src/osgPlugins/fbx/fbxMaterialToOsgStateSet.cpp#L179-L181

The problem was that in my case the first tried path was always invalid resulting in a fired osg::WARN inside the osgDB::readRefImageFile function.

My solution checks the existence of the suggested path before trying to call readRefImageFile function.

Submitted as:
https://github.com/openscenegraph/OpenSceneGraph/pull/544

Regards,
Björn

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=73539#73539








------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Submission All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Load an obj file and mapping a given ... aaa3d General 3 Mon Aug 06, 2018 2:27 pm View latest post
No new posts osgconv osgjs bug file not found memory_thrasher Plugins [osgPlugins] 2 Tue Jul 31, 2018 5:21 pm View latest post
No new posts Load OSG trimesh to ODE: Read Vertice... TKoller General 2 Fri Jul 20, 2018 3:06 pm View latest post
No new posts Model(s) load ~10 times longer in 3.6... davisjamesf General 16 Wed Jul 04, 2018 7:18 pm View latest post
No new posts error while loading .iv file in opens... Rj@123 General 0 Wed Jun 20, 2018 10:52 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP