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: 

Viewer Window Double Click Event

1 REPLY 1
Reply
Message 1 of 2
Anonymous
329 Views, 1 Reply

Viewer Window Double Click Event

Does anyone know if the Viewer Window has a Double Click Event Property and how I could access that?

Alternatively, does anyone know how to read the mouse input when it is not associated with an event? I am trying to read the mouse button state with an FBSystem OnIdle callback function.

Thanks,
Chris
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

There are plenty of existing events you can connect to. Un fortunatly you can only see them the the ORSDK Help even if they work in Python.

From the ORSDK Help look in FBScene.OnChange

this will lead you to the FBEventSceneChange

Here is the list of Scene event type you can check for

00114 enum FBSceneChangeType
00115 {
00116 kFBSceneChangeNone,
00117 kFBSceneChangeDestroy,
00118 kFBSceneChangeAttach,
00119 kFBSceneChangeDetach,
00120 kFBSceneChangeAddChild,
00121 kFBSceneChangeRemoveChild,
00122 kFBSceneChangeSelect,
00123 kFBSceneChangeUnselect,
00124 kFBSceneChangeRename,
00125 kFBSceneChangeRenamePrefix,
00126 kFBSceneChangeRenameUnique,
00127 kFBSceneChangeRenameUniquePrefix,
00128 kFBSceneChangeRenamed,
00129 kFBSceneChangeRenamedPrefix,
00130 kFBSceneChangeRenamedUnique,
00131 kFBSceneChangeRenamedUniquePrefix,
00132 kFBSceneChangeSoftSelect,
00133 kFBSceneChangeSoftUnselect,
00134 kFBSceneChangeHardSelect,
00135 kFBSceneChangeActivate,
00136 kFBSceneChangeDeactivate,
00137 kFBSceneChangeLoadBegin,
00138 kFBSceneChangeLoadEnd,
00139 kFBSceneChangeClearBegin,
00140 kFBSceneChangeClearEnd,
00141 kFBSceneChangeTransactionBegin,
00142 kFBSceneChangeTransactionEnd,
00143 kFBSceneChangeReSelect,
00144 kFBSceneChangeChangeName,
00145 kFBSceneChangeChangedName,
00146 kFBSceneChangePreParent,
00147 kFBSceneChangePreUnparent,
00148 kFBSceneChangeFocus,
00149 kFBSceneChangeChangedParent,
00150 kFBSceneChangeReorder,
00151 kFBSceneChangeReordered,
00152 }

Every time a scene change is done it will call you function so if you want to proceed on a specific case you need to check the type of the change and then do what ever you need.

The OnChange event in Python MUST be deleted the OnChange event before closing MB otherwise it will crash during close. Do so by adding an event in the FBApplication.OnFileExit

This is complex so try with caution.

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

Post to forums  

Autodesk Design & Make Report