Jump to content

View more

Image of the Day

Working on an auto spawn system. #gamedev #indiedev #screenshotsaturday https://t.co/Mm2kfekz7b
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

COLLADA joint names array from <library_controllers> is null after loading file

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
No replies to this topic

#1 BlackJoker   Members   

1308
Like
0Likes
Like

Posted 05 June 2014 - 03:49 AM

I use autogenerated classed from COLLADA schema 1.4.1 for loading and parsing collada files feom C#.
But I have an issue trying to parse <source id="skin-joints"> inside <controller> tag.
 
I don`t know why, but exactly that array with bone names loaded nothing except joints count and source id.
 
All other sources loading correctly. I tested on few different files and always the same error.
 
Loading file code:
public static COLLADA Load(string fileName)
        {
            FileStream stream = new FileStream(fileName, FileMode.Open);
            COLLADA result;
            try
            {
                result = Load(stream);
            }
            finally
            {
                stream.Close();
            }
            return result;
        }

        public static COLLADA Load(Stream stream)
        {
            StreamReader str = new StreamReader(stream);
            XmlSerializer xSerializer = new XmlSerializer(typeof(COLLADA));

            return (COLLADA)xSerializer.Deserialize(str);            
        }
 
Does anyone faced with it or does anyone know how to fix that issue?
 
As alternative I can parse that part of file by standart XML parser, but I wish to solve this issue using COLLADA classes.

Edited by BlackJoker, 06 June 2014 - 02:48 AM.





Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.