Context
* 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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user