[Bf-committers] Timestamp

Ton Roosendaal ton at blender.org
Sat Nov 5 10:43:22 CET 2005


Hi,

For the python-driver, we are working on the first insertion of a  
python script in the dependency graph. A next step could be a nice  
method for scripts (scriptlinks) to provide dependency information as  
well, so execution of scriptlinks then can become depgraphed as well.
It could be as simple as the way how now scripts can get menus, so  
Blender can query the script to get information on what dependencies  
internally exist.

Once in the depgraph, updates will all handle automatic. If you use  
external data (like files stored on disk), the script itself should  
take care of evaluating whether that data has expired and needs  
re-read... Blender has no facilities for that yet. If we can solve  
script dependencies on internal Blender data, we already get a giant  
leap forward I think!

-Ton-


On 27 Oct, 2005, at 11:57, Toni Alatalo wrote:

> On Thursday 27 October 2005 01:36, Campbell Barton wrote:
>> It depends, is this for blenders internal workings then I agree (dont
>> expose to python). the example given about normal map generation  
>> sounded
>
> with exposing the DAG to Python, i just meant that Blender provides a  
> way for
> scripts to get DataChanged etc. events - for example by having such
> scriptlinks as you proposed. i guess we all agree that the actual DAG  
> should
> be hidden from the API users.
>
>> like a python plugin to me. I have made python plugins also that would
>> have had an advantage if there was a timestamp on a mesh.
>
> is that also for the same reason that Jordi mentioned, that the  
> dependants are
> (quoting him)  'not "alive" all the time. Imagine that what i want to  
> do is
> like a plugin that is run sometimes. When run i want to check if i can  
> reuse
> some of the data the plugin has stored in disk from the previous  
> execution.'?
>
> dunno if the DAG could be used somehow to solve that too (like queuing  
> the
> events somewhere when the recipient plugin is not "alive", huh?) but  
> at least
> that way it sounds awkward to me,
>
> perhaps the timestamp would indeed be the solution there - dunno if  
> there are
> any complexities in getting it implemented (i guess storing one int  
> does not
> take much cpu even though it would happen to many objects very often).  
> so is
> it already added to the metadata/properties wishlist?-)
>
>> - Cam
>
> ~Toni
>
>>
>> Toni Alatalo wrote:
>>> On Thursday 27 October 2005 00:50, Campbell Barton wrote:
>>>> This is a good example of where metadata could be usefull-
>>>> Would need an "OnDataChange" scriptlink or somthing? I made a patch  
>>>> for
>>>
>>> hm i dont think that is about metadata/properties, but just about the
>>> dependency graph.., or?
>>>
>>> i do think the depgraph should be exposed to Python too .. so  
>>> scripts can
>>> e.g. subscribe to listen to changes in their objects of interest,  
>>> e.g.
>>> with a scriptlink like that.
>>>
>>>> - Cam
>>>
>>> ~Toni
>>> _______________________________________________
>>> Bf-committers mailing list
>>> Bf-committers at projects.blender.org
>>> http://projects.blender.org/mailman/listinfo/bf-committers
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-committers
>
>
------------------------------------------------------------------------ 
--
Ton Roosendaal  Blender Foundation ton at blender.org  
http://www.blender.org



More information about the Bf-committers mailing list