return true to abort?
On 09/08/2013 7:45 AM, Michael Heberlein wrote:
Hey all,
I registered a "siOnBeginSceneSave2" event and Softimage runs my code
but doesn't save the scene.
Has anyone seen this before? I know I had this working without
problems before but now I'm stuck. :(
Here's the stripped-down plugin code:
01 from siutils import C
02 def XSILoadPlugin( in_reg ):
03 in_reg.Name = "plugin_onSceneSave_test"; in_reg.Major = 1;
in_reg.Minor = 0
04 in_reg.RegisterEvent( "beginSceneSave", C.siOnBeginSceneSave2 )
05 return True
06 def beginSceneSave_OnEvent( in_ctxt ):
07 Application.LogMessage( "saving %s" % in_ctxt.GetAttribute(
"FileName" ), C.siInfo )
08 return True
And the message log after pressing Ctrl+S:
# INFO : cheers
# INFO : 4373 - This event was aborted:
# <name: beginSceneSave>
# <plug-in:
L:\pipeline\user\mh\workgroups\pnToolbox\Addons\pnPipeline\Application\Plugins\pnPipeline_OnSave_AddVersionProperty.py>
#
# WARNING : 3030-FILE-SaveScene - Command was cancelled.
Application.SaveScene()
Thanks,
Michael