* Made it based on string lookups rather than fixed enum, to make
  it extensible by python scripts.
* Context callbacks now also have to specify RNA type when returning
  pointers or collections. For non-RNA wrapped data, UnknownType can
  be used.
* RNA wrapped context. The WM entries are fixed, for data context
  only main and scene are defined properties. Other data entries have
  to be dynamically looked up.
* I've added some special code in python for the dynamic context
  lookups. Tried to hide it behind RNA but didn't find a clean way to
  do it yet. Still unused/untested.

* Also minor fix for warning about propertional edit property in
  transform code, and fix for usage of operator poll with checking if
  it was NULL.
This commit is contained in:
2009-03-19 19:03:38 +00:00
parent 77e0199dc3
commit 1b94cb752c
25 changed files with 268 additions and 190 deletions

View File

@@ -600,7 +600,7 @@ void uiEndBlock(const bContext *C, uiBlock *block)
/* temp? Proper check for greying out */
if(but->opname) {
wmOperatorType *ot= WM_operatortype_find(but->opname);
if(ot==NULL || ot->poll((bContext *)C)==0) {
if(ot==NULL || (ot->poll && ot->poll((bContext *)C)==0)) {
but->flag |= UI_BUT_DISABLED;
but->lock = 1;
}