MotionBuilder Forum
Welcome to Autodesk’s MotionBuilder Forums. Share your knowledge, ask questions, and explore popular MotionBuilder topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

File Open, Merge

13 REPLIES 13
Reply
Message 1 of 14
Anonymous
615 Views, 13 Replies

File Open, Merge

hi there,

I am using MB2015 and I want to use the FileOpen and FileMerge with the options dialogue.

LOAD_UI = True
lapp = FBApplication()
lapp.FileOpen(path,LOAD_UI)

 I am wondering how do i get the Element all checked with 'Append' or 'Merge' by default instead of not checked at all as shown in the pictures below.

FileOpen.PNG

Thanks

 

13 REPLIES 13
Message 2 of 14
s
Advocate
in reply to: Anonymous

Hi,

 

 please check a documentation page - http://docs.autodesk.com/MB/2014/ENU/MotionBuilder-SDK-Documentation/files/GUID-9CA39221-DEDB-4355-A...

---
Programming and Animation - neill3d.com
Message 3 of 14
Anonymous
in reply to: s

Thanks for the reply. I didn't use the load option because once I use it, I don't get to see the option dialogue anymore for some reasons. Do you have the same problem?

 

lapp = FBApplication()

load_options = FBFbxOptions(True)
load_options.SetAll(FBElementAction.kFBElementActionAppend, False)
lapp.FileOpen(path, True, load_options)

 

Message 4 of 14
s
Advocate
in reply to: Anonymous

No, I don't remember that I was having that problem. But last time I was running script with that, I think it was on mobu 2013.
---
Programming and Animation - neill3d.com
Message 5 of 14
s
Advocate
in reply to: Anonymous

Default options you can specify in the config file - <My Documents>\MB\2015-x64\config\<User>/History.txt
There is a group for each dialog (save, load, merge), for example - [FbxSdkLoadOptions]
---
Programming and Animation - neill3d.com
Message 6 of 14
Anonymous
in reply to: s

No luck. Juct checked the history, they are all AppendElement. I removed the config folder from the path you given and restart MB, the Elements in dialogue box still are not checked if it is called by script. FileOpen(path , True)

 

I tried MB2013, 2014, and 2015, once I used the load options, the dialogue box will be skipped.

 

The only difference I see in MB 2013 is the elelments are all checked by default with the command FileOpen(path , True)

 

Any suggestions? Should this be reported?

 

Thanks!

 

Message 7 of 14
s
Advocate
in reply to: Anonymous

> I don't get to see the option dialogue anymore for some reasons.
Interesting, what steps do you make so that you couldn't see option dialog anymore ?
---
Programming and Animation - neill3d.com
Message 8 of 14
Anonymous
in reply to: s

lapp.FileOpen(path, True, load_options)

The dialogue box will not appear If I add load_options flag for the third paramenter, the second paramenter is to load the UI, so I put True.

Message 9 of 14
s
Advocate
in reply to: Anonymous

I've tried FileOpen with options and after option dialog works as usual.
---
Programming and Animation - neill3d.com
Message 10 of 14
Anonymous
in reply to: s

It has never worked for me, may i copy your sample code and try it out? Which version of MB you are using?

Message 11 of 14
s
Advocate
in reply to: Anonymous

I'm using 2014.

just a sample script
from pyfbsdk import *

mApp = FBApplication()

load_options = FBFbxOptions(True)
load_options.SetAll(FBElementAction.kFBElementActionAppend, False)
mApp.FileOpen("C:\test.fbx", True, load_options)
---
Programming and Animation - neill3d.com
Message 12 of 14
Anonymous
in reply to: s

I ran the script, it opened up the file straight away without the dialogue box. 😞 Tried it with MB2014

Message 13 of 14
Anonymous
in reply to: Anonymous

There was an interesting found this morning. I got the dialogue box appear with elements all checked with Append when I opened one particular fbx file dated in 2012, probably created by MB2013 or earlier. So somehow the fbx file itself determines the behavior of the dialogue box, all fbxs created in mb2015 have failed to open with dialogue box, can anyone explain this?

Message 14 of 14
s
Advocate
in reply to: Anonymous

Yes, you are right. I've tested a file created in 2014/2015 Mobu and now I have the same problem with open dialog box. But I couldn't find any other explanation as a simple bug.
---
Programming and Animation - neill3d.com

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report