Andrew Gorman wrote:
> Hi everyone,
>
> I have sent a .3ds file to Dene for inclusion in the NZ FG scenery and he
> has this error when loading it in ver .98a
>
> WARNING: ssgLoad3ds: Hierarchy entry "0" does not match any defined objects.
> WARNING: ssgLoad3ds: Hierarchy entry "0" does not match any defined objects.
>
> any ideas?
>
> Scenery was modeled in 3dsmax 5, on a WinXP Pro AMD Athalon machine.
>
>
FYI here's the function thats generating the warning:
(it appears the .3ds file format is a bit unknown so it may be just a
glitch from that)
static int parse_frame_objname( unsigned int length ) {
/* This chunk defines a hierarchy elements name and its parent object's
identifier.
This function assumes that the hierarchy is defined from
root to leaf, i.e. a nodes parent must have been declared before the
node itself is declared. */
char *objname = get_string();
ulEndianReadLittle16(model);
ulEndianReadLittle16(model);
short parent_id = ulEndianReadLittle16(model);
DEBUGPRINT("%sObject name: %s, parent: %d%s",
objname, parent_id, "");
_ssg3dsStructureNode *current_structure_node = findStructureNode(
objname );
if ( current_structure_node == NULL ) {
current_structure_node = new _ssg3dsStructureNode;
current_structure_node -> object = new ssgTransform;
current_structure_node -> object -> setName( objname );
addStructureNode( current_structure_node );
}
current_structure_node -> id = current_structure_id;
if ( parent_id != -1 ) {
_ssg3dsStructureNode *parent = findStructureNode( parent_id );
if (parent == NULL) {
ulSetError( UL_WARNING, "ssgLoad3ds: Hierarchy entry \"%d\" does "\
"not match any defined objects.", parent_id );
} else {
parent -> object -> addKid( current_structure_node -> object );
current_structure_node -> has_been_used = true;
}
} else {
top_object -> addKid( current_structure_node -> object );
current_structure_node -> has_been_used = true;
}
delete objname;
return PARSE_OK;
}
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Flightgear-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-users