Пример #1
0
static void rna_Menu_unregister(Main *UNUSED(bmain), StructRNA *type)
{
	MenuType *mt = RNA_struct_blender_type_get(type);

	if (!mt)
		return;

	RNA_struct_free_extension(type, &mt->ext);
	RNA_struct_free(&BLENDER_RNA, type);

	WM_menutype_freelink(mt);

	/* update while blender is running */
	WM_main_add_notifier(NC_WINDOW, NULL);
}
Пример #2
0
static void rna_Menu_unregister(const bContext *C, StructRNA *type)
{
	MenuType *mt= RNA_struct_blender_type_get(type);

	if(!mt)
		return;
	
	RNA_struct_free_extension(type, &mt->ext);

	WM_menutype_freelink(mt);

	RNA_struct_free(&BLENDER_RNA, type);

	/* update while blender is running */
	if(C)
		WM_main_add_notifier(NC_SCREEN|NA_EDITED, NULL);
}