Aah, too easy ;D thanks alot!!

On Fri, Aug 9, 2013 at 2:00 PM, Peter Agg <[email protected]> wrote:

> ...or 1, if you didn't make the plugin with the plugin manager. Or just
> don't return anything.
>
> But yeah, this has had me stumped for hours before. Just one of those
> thing you have to just know.
>
>
>
>
> On 9 August 2013 12:48, Stephen Blair <[email protected]> wrote:
>
>>  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
>>
>>
>>
>

Reply via email to