View Full Version : Hook Python script to shortcut key
sin3d 12-10-2008, 06:11 PM Helo Anyone here knows how to assign a shortcut key to a Python script that i wrote?
Thanks
Sin
|
|
LoneCanuck
12-10-2008, 06:54 PM
Under your C:\Program Files\Autodesk\MotionBuilder75 Ext2\bin\config\Scripts folder there is a file called "ActionScript.txt"
Inside this file, you will find this:
Script1 = NewCamera.py
Script2 =
Script3 =
Script4 =
Script5 =
Script6 =
Script7 =
Script8 =
Script9 =
Script10 =
Script11 =
Script12 =
Any script you have, in the same folder, you can assign to one of those twelve slots (following the above example).
After that, you need to edit your Keyboard settings (depends on what you are using inside Motionbuilder) under C:\Program Files\Autodesk\MotionBuilder75 Ext2\bin\config\Keyboard
Inside that file, you will find:
action.global.script1 = {SHFT:F1*DN}
action.global.script2 =
action.global.script3 =
action.global.script4 =
action.global.script5 =
action.global.script6 =
action.global.script7 =
action.global.script8 =
action.global.script9 =
action.global.script10 =
action.global.script11 =
action.global.script12 =
This is where you define what hotkey triggers the corresponding script. In this example, Shift F1 triggers the first script in the list (NewCamera.py) which creates a new camera in the scene.
Hope this helps
sin3d
12-10-2008, 09:08 PM
I figured out too, thanks a bunch!:thumbsup:
hrydek
12-12-2008, 01:01 AM
Anybody knows how to assign more than 12 shortcuts?
CGTalk Moderation
12-12-2008, 01:01 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.