[Bf-taskforce25] context proposal

Ton Roosendaal ton at blender.org
Sat Dec 6 19:13:44 CET 2008


Hi Brecht,

Thanks for the doc, looks very clear!
One thing to look a bit further at is how the "data context" would 
work. As you write:

"As a screen/area/region or even a group of buttons is drawn, data 
would be pushed into and popped from the context continuously."

I'm not sure how this will work... you cannot build selection lists for 
all objects/vertices etc for each event that gets passed on via 
handlers? (Like: scene layer versus local layer).

I wouldn't "store" in the context selection lists or anything really, 
but provide methods for how to retreive it. Those methods will only 
check context when called, making context switches cheap (no cpu time 
to build lists).

Example: to get a selection a call like:

	ObjBaseList *obl= CTX_OB_selection(C);

The rules for how object selections are delivered are quite standard in 
the UI spec, so the default context doesn't change much. It can even be 
adjusted, like for python or special nonstandard cases:

	CTX_OB_selection_set(C, select_func)

Or did I misinterpret this? Like:

	RNA_pointer_get(C->data, "selected_objects");

To me it seems to go against the context concept... context is by 
definition what the user wants/indicates, not data in RNA.

-Ton-

------------------------------------------------------------------------
Ton Roosendaal  Blender Foundation   ton at blender.org    www.blender.org
Blender Institute BV  Entrepotdok 57A  1018AD Amsterdam The Netherlands

On 5 Dec, 2008, at 2:20, Brecht Van Lommel wrote:

> Hi,
>
> I've written a proposal on context and how the API for it could look.
> Feedback on this is welcome, I'm sure there's many issues I have
> overlooked, it's quite a broad and slippery subject. The thing that I 
> am
> especially doubting about is data context, i.e. how if it is a good 
> idea
> to use RNA to push arbitrary identifier + RNA pointers pairs into the
> context.
>
> http://wiki.blender.org/index.php/BlenderDev/Blender2.5/Context
>
> I also started a proposal document on how to deal with specific globals
> and bad calls. It's very much work in progress, but reveals various
> issues related to context and data access that we may want to fix, or
> decide not to fix for 2.5 .
>
> http://wiki.blender.org/index.php/BlenderDev/Blender2.5/GlobalsBadCalls
>
> Brecht.
>
> _______________________________________________
> Bf-taskforce25 mailing list
> Bf-taskforce25 at blender.org
> http://lists.blender.org/mailman/listinfo/bf-taskforce25
>



More information about the Bf-taskforce25 mailing list