Call for Submission
NAB 2012 Best of the Best Show Reel
Submit your work today!
  • 1/3
You are here: Forum Home / Autodesk® MotionBuilder® / Python / execute script in scene from another script
  RSS 2.0 ATOM  

execute script in scene from another script
Rate this thread
 
40265
 
Permlink of this thread   Subscribe to this thread
avatar
  • no_to_co
  • Posted: 01 March 2010 07:46 AM
  • Total Posts: 5
  • Joined: 17 December 2007 09:37 AM

Hi,

I have a scripthat is loaded in the scene.  I am running a different scrip and would like to execute the scripthat is already loaded in.  How do I do that?

Thank you, Al.



Replies: 0
avatar

In the class FBApplication, there is a function called ‘ExecuteScript’, this is used to execute a python script file. you can use this function to re-trigger your script..I hope that’s what your asking I am a little confused by your question,

~Kristine



KRISTINE MIDDLEMISS | DEVELOPER CONSULTANT
AUTODESK Media & Entertainment

Replies: 0
avatar
  • John McC
  • Posted: 03 March 2010 04:14 PM

If you want to execute a script in multiple places and not use the open reality sdk, you could copy your code into a separate python file as a function, place this new file in your pythonpath folder (see the python documentation) and then you should be able to call it from multiple places.



Replies: 0
avatar
  • no_to_co
  • Posted: 04 March 2010 07:12 AM

Kristine Middlemiss 02 March 2010 04:37 PM

In the class FBApplication, there is a function called ‘ExecuteScript’, this is used to execute a python script file. you can use this function to re-trigger your script..I hope that’s what your asking I am a little confused by your question,


~Kristine

I have an FBX file that has a python scrip in it.  I load in that scene using another script, and I want to trigger the script in that loaded file from the script that loads the file.  It looks like ExecuteScript only executes a script has a file path to it.



Replies: 0




   
  Settings Choose Theme color: