def node_type_items_cb(self, context):
snode = context.space_data
if not snode:
- return []
+ return ()
tree = snode.edit_tree
if not tree:
- return []
+ return ()
# Lists of basic node types for each
if not node_type_items_dict:
if tree.type in node_type_items_dict:
return node_type_items_dict[tree.type] + node_group_items(tree.type)
else:
- return []
+ return ()
class NODE_OT_add_search(Operator):
struct bContextStore *context;
- /* not ysed yet, was used in 2.4x for ui_draw_pulldown_round & friends */
+ /* not used yet, was used in 2.4x for ui_draw_pulldown_round & friends */
#if 0
void (*embossfunc)(int, int, float, float, float, float, float, int);
void (*sliderfunc)(int, float, float, float, float, float, float, int);
char *str;
opptr = uiButGetOperatorPtrRNA(but); /* allocated when needed, the button owns it */
+ /* so the context is passed to itemf functions (some py itemf functions use it) */
+ WM_operator_properties_sanitize(opptr, FALSE);
+
str = WM_operator_pystring(C, but->optype, opptr, 0);
/* operator info */