Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/modules/nodeitems_utils.py
| Show First 20 Lines • Show All 138 Lines • ▼ Show 20 Lines | |||||
| def node_categories_iter(context): | def node_categories_iter(context): | ||||
| for cat_type in _node_categories.values(): | for cat_type in _node_categories.values(): | ||||
| for cat in cat_type[0]: | for cat in cat_type[0]: | ||||
| if cat.poll and ((context is None) or cat.poll(context)): | if cat.poll and ((context is None) or cat.poll(context)): | ||||
| yield cat | yield cat | ||||
| def has_node_categories(context): | |||||
| for cat_type in _node_categories.values(): | |||||
| for cat in cat_type[0]: | |||||
| if cat.poll and ((context is None) or cat.poll(context)): | |||||
| return True | |||||
| return False | |||||
| def node_items_iter(context): | def node_items_iter(context): | ||||
| for cat in node_categories_iter(context): | for cat in node_categories_iter(context): | ||||
| for item in cat.items(context): | for item in cat.items(context): | ||||
| yield item | yield item | ||||
| def unregister_node_cat_types(cats): | def unregister_node_cat_types(cats): | ||||
| for mt in cats[2]: | for mt in cats[2]: | ||||
| Show All 20 Lines | |||||