[Bf-python] OnSave event -- patch attached to email
Joseph
joeeagar at prodigy.net
Wed Jul 21 05:41:55 CEST 2004
Willian Padovani Germano wrote:
>Is this event meant to let scripts also save their data when a .blend file
>is saved or do you have more in your mind? Cause possibly it's better to
>extend the Draw.Register (see Method_Register in api2_2x/Draw.c) with a
>"save" callback that scripts themselves can register, much easier this way.
>I was thinking about adding a "quit" callback, so scripts could exit nicely,
>saving their data, etc., but your idea about "save" covers that and is more
>general.
>
>
I personally think that a scriptlink is more user-friendly myself. It
would allow newer scripters (like me) who have not checked out the Draw
module yet to have a clear way to automatically save data. Also, it
might be a good idea for this to be independant of the Draw module.
>So could you tell us about your ideas of uses for this new event and what
>you think about adding a callback in Draw.Register instead? Others please
>also share your ideas on this.
>
>
The idea for this came up while I was (and still am) designing an
abstract python effects library to be used with Blender. I wanted some
way to save custom per-object data seemlessly, but discovered that this
was not possible with the current API because of the lack of a OnSave
scriptlink..
>>There is a small problem, though. For some reason my build will not
>>allow the creation of object or material scriptlinks. I'm not sure why,
>>but I cannot find anything in my code that could account for this. Was
>>things that way before?
>>
>>
>
>You mean directly on the interface or via the scriptlink methods, like
>object.setScriptLink(textname, event) ? I tested both ways today, for
>objects, worked fine here. Please give more details.
>
>--
>Willian, wgermano at ig.com.br
>
>
I only tried the GUI interface, and it didn't work. I can't seem to
figure out what's wrong; nothing in my code seems as if it could have
this effect.
joeedh
More information about the Bf-python
mailing list