[Bf-python] Scriptlink limitations

Campbell Barton cbarton at metavr.com
Thu Feb 1 05:22:54 CET 2007


Sorry, just after posting I saw Blender.link
now why arnt there more scriptlinks? ;)

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
> 


-- 
Campbell J Barton

133 Hope Street
Geelong West, Victoria 3218 Australia

URL:    http://www.metavr.com
e-mail: cbarton at metavr.com
phone: AU (03) 5229 0241



More information about the Bf-python mailing list