Well after a little work I found a work around,but there should not have to be a work around.This should be a HIGH Priority Bug.
We had to find a work around,needed it for new Game Editor that can be hooked up to any engine written in DBpro.We are creating the editor in a C# Dll.I wonder if anybody is reading this post.
// Reported by Stab in the Dark Software 01/05/2010
// BUG: DBpro Save Object command not saving Hierarchy correctly
// or
// DBpro Load Object Command Not Reading Hierarchy Properly
// Note: Need to use Matrix1's DLL to see DBO Hierarchy
sync on : sync rate 0 :
color backdrop rgb(0,0,128)
Autocam Off
Set Ambient Light 60
set text font "Lucida console" : set text size 18 : set text transparent
Position Camera 0,10,40,-100
Make Object Cube 1,5
Make Object Cube 2,5
Make Mesh From Object 1,2
Delete Object 2
Add Limb 1,1,1
Add Limb 1,2,1
Add Limb 1,3,1
Link Limb 1,0,1
Link Limb 1,0,2
Link Limb 1,1,3
Offset Limb 1,1,0,20,0,1
Offset Limb 1,2,-20,20,0,1
Offset Limb 1,3,0,40,0,1
If File Exist("Test.dbo")=1 then Delete File "Test.dbo"
Save Object "Test.dbo",1
Do
Set Cursor 20,20
Print "Object One's Limb #1 Parent is Limb #" ;Get Limb Parent(1,1)
Print "Limb #0"
Print " Parent # ";Get Limb Parent(1,0)
Print " Child # ";Get Limb Child(1,0)
Print " Sibling # ";Get Limb Sibling(1,0)
Print "Limb #1"
Print " Parent # ";Get Limb Parent(1,1)
Print " Child # ";Get Limb Child(1,1)
Print " Sibling # ";Get Limb Sibling(1,1)
Print ""
Print " After Saving to DBO and Loading DBO "
Print "Limb 1 Has Lost its Parent Relationship "
If object exist(3)
Print ""
Print "Object 3's Limb's Parent " ;Get Limb Parent(3,1)
Print "Limb #0"
Print " Parent # ";Get Limb Parent(3,0)
Print " Child # ";Get Limb Child(3,0)
Print " Sibling # ";Get Limb Sibling(3,0)
Print "Limb #1"
Print " Parent # ";Get Limb Parent(3,1)
Print " Child # ";Get Limb Child(3,1)
Print " Sibling # ";Get Limb Sibling(3,1)
EndIf
If UpKey()=1
if object exist(3)=0
Load Object "Test.dbo",3
//This line does the trick
SD Repair Hierarchy 3
Position Object 3,40,0,0
EndIf
EndIf
sync
Loop
[img]
[/img]
WindowsXP SP1,Vista,Windows 7 DBpro v7.61
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.