Pain with psfbsdk

Pain with psfbsdk

smoke_smk
Contributor Contributor
525 Views
3 Replies
Message 1 of 4

Pain with psfbsdk

smoke_smk
Contributor
Contributor

several days fight with FBApplication.ExecuteScript

 

from pyfbsdk import *

from pyfbsdk_additions import *

path = "D:\Distrib\MotionBuilder my Scripts\_GetStore_0.py"

FBApplication.ExecuteScript(path)

 

get error:

FBApplication.ExecuteScript(path)

Boost.Python.ArgumentError: Python argument types in

FBApplication.ExecuteScript(str)

did not match C++ signature:

ExecuteScript(class PYFBSDK::FBApplication_Wrapper {lvalue}, char const * __ptr64)

 

How its work? No where examples or description.

0 Likes
526 Views
3 Replies
Replies (3)
Message 2 of 4

damian.pajda
Advocate
Advocate

first try to use double backslashes in the path:
path = "D:\\Distrib\\MotionBuilder my Scripts\\_GetStore_0.py"

 

And add () after FBApplication -> FBApplication():

FBApplication().ExecuteScript(path)

Message 3 of 4

vdebaie
Advocate
Advocate

You could also try:

path = r"D:\Distrib\MotionBuilder my Scripts\_GetStore_0.py"
0 Likes
Message 4 of 4

smoke_smk
Contributor
Contributor

"FBApplication()" - omg нow could I miss this. Thank you very much! All work fine now!