[Bf-python] Scriptlink limitations
Joe Eagar
joeedh at gmail.com
Fri Feb 2 11:57:42 CET 2007
IMHO, I think we should kill scriptlinks in favor of a more generic and
usable plugin system. The problem
with scriptlinks is either the user or the script author to make them,
and they tend to only exist on either the scene level or (worse) the
area space level.
A true plugin api would have generic things like draw in 3d viewports
(all of them) get even from 3d viewport, get event when selection state
changes, etc.
Joe
Campbell Barton wrote:
> one of the things that stop me from using scriptlinks more often is
> that theres no way of telling what launched the scriptlink.
>
> The most common case is that you have an object scriptlink and you
> want to refer to that object within the scriptlink.
>
> Could we have a variable Blender.linkdata - so the data that triggers
> the scriplink is assigned to that? - camera/scene/world/object, whatever.
>
> It would be important to note that this variable may change if the
> script did an operation that ended up calling another data's
> scriptlink (render for instance)
>
> So you would need to define the data at the start of the script.
>
> import Blender
> self = Blender.linkdata
> if type(self) != Blender.Types.ObjectType:
> ....
>
>
> What do you think?
> _______________________________________________
> Bf-python mailing list
> Bf-python at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-python
>
More information about the Bf-python
mailing list