[Bf-committers] Declarative UI Experiment

Elia Sarti vekoon at gmail.com
Tue Aug 10 12:03:29 CEST 2010


How does this make it more like what we have now?
You'd still need to rewrite all UI scripts from scratch.

As I said to avoid having two different ways to do 1 thing you simply 
let Python have full control of the layout system itself (even leaving 
the same exact API as now, just adding some more) so if you're a Python 
developer you can do everything in Python, while if you're a user you 
can use a simpler declarative language (but our own integrated custom 
language, not XML).


Thomas Dinges wrote, on 08/10/2010 07:47 AM:
>    Hey Campbell,
> my main -1 argument was because of the big language change.
> Also i was afraid of then having 2 files for a script (a py file for
> operators and 1 xml file for the ui)
>
> The first 2 versions you propose now are much better than the xml
> version in my oppinion.
> I even would prefer the second method, as it is much more readable.
>
> As I said, let's focus more on what we have now and make changes to that.
>
> +1 to that now. ;-)
>
> Am 10.08.2010 05:34, schrieb Campbell Barton:
>    
>> As I feared the 'XML' topic came up, and without replying to each
>> statement made above lets just say its a very different direction to
>> the one we have been going in and I can understand resistance.
>>
>> The original spec for 2.5 was that we would have a UI layout defined in python,
>> So here are 2 examples of python defined declarative UI's which could
>> fairly easily co-exist with what we have now.
>>
>> - basically a python version of the XML panel
>> http://pastie.org/1083109
>>
>> - this is python also but relies on having some custom classes defined
>> which would expand themselves into the data structure above. Its nice
>> in that it is much easier to read/write, but its also not pure python.
>> http://pastie.org/1083111
>>
>> - original XML for reference.
>> http://pastie.org/1083129
>>
>> For those who gave the proposal a -1, what about one of the 2 methods above?
>>      
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>
>    


More information about the Bf-committers mailing list