• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ BLI_remlink函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中BLI_remlink函数的典型用法代码示例。如果您正苦于以下问题:C++ BLI_remlink函数的具体用法?C++ BLI_remlink怎么用?C++ BLI_remlink使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了BLI_remlink函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: BLI_end_threads

void VideoFFmpeg::stopCache()
{
	if (m_cacheStarted)
	{
		m_stopThread = true;
		BLI_end_threads(&m_thread);
		// now delete the cache
		CacheFrame *frame;
		CachePacket *packet;
		while ((frame = (CacheFrame *)m_frameCacheBase.first) != NULL)
		{
			BLI_remlink(&m_frameCacheBase, frame);
			MEM_freeN(frame->frame->data[0]);
			av_free(frame->frame);
			delete frame;
		}
		while ((frame = (CacheFrame *)m_frameCacheFree.first) != NULL)
		{
			BLI_remlink(&m_frameCacheFree, frame);
			MEM_freeN(frame->frame->data[0]);
			av_free(frame->frame);
			delete frame;
		}
		while ((packet = (CachePacket *)m_packetCacheBase.first) != NULL)
		{
			BLI_remlink(&m_packetCacheBase, packet);
			av_free_packet(&packet->packet);
			delete packet;
		}
		while ((packet = (CachePacket *)m_packetCacheFree.first) != NULL)
		{
			BLI_remlink(&m_packetCacheFree, packet);
			delete packet;
		}
		m_cacheStarted = false;
	}
}
开发者ID:jonntd,项目名称:blender,代码行数:37,代码来源:VideoFFmpeg.cpp


示例2: wm_window_close

/* this is event from ghost, or exit-blender op */
void wm_window_close(bContext *C, wmWindowManager *wm, wmWindow *win)
{
	wmWindow *tmpwin;
	bScreen *screen = win->screen;
	
	/* first check if we have any non-temp remaining windows */
	if ((U.uiflag & USER_QUIT_PROMPT) && !wm->file_saved) {
		if (wm->windows.first) {
			for (tmpwin = wm->windows.first; tmpwin; tmpwin = tmpwin->next) {
				if (tmpwin == win)
					continue;
				if (tmpwin->screen->temp == 0)
					break;
			}
			if (tmpwin == NULL) {
				if (!GHOST_confirmQuit(win->ghostwin))
					return;
			}
		}
	}

	BLI_remlink(&wm->windows, win);
	
	wm_draw_window_clear(win);
	CTX_wm_window_set(C, win);  /* needed by handlers */
	WM_event_remove_handlers(C, &win->handlers);
	WM_event_remove_handlers(C, &win->modalhandlers);
	ED_screen_exit(C, win, win->screen); 
	
	wm_window_free(C, wm, win);
	
	/* if temp screen, delete it after window free (it stops jobs that can access it) */
	if (screen->temp) {
		Main *bmain = CTX_data_main(C);
		BKE_libblock_free(&bmain->screen, screen);
	}
	
	/* check remaining windows */
	if (wm->windows.first) {
		for (win = wm->windows.first; win; win = win->next)
			if (win->screen->temp == 0)
				break;
		/* in this case we close all */
		if (win == NULL)
			WM_exit(C);
	}
	else
		WM_exit(C);
}
开发者ID:vanangamudi,项目名称:blender-main,代码行数:50,代码来源:wm_window.c


示例3: pthread_mutex_lock

void VideoFFmpeg::releaseFrame(AVFrame *frame)
{
	if (frame == m_frameRGB)
	{
		// this is not a frame from the cache, ignore
		return;
	}
	// this frame MUST be the first one of the queue
	pthread_mutex_lock(&m_cacheMutex);
	CacheFrame *cacheFrame = (CacheFrame *)m_frameCacheBase.first;
	assert (cacheFrame != NULL && cacheFrame->frame == frame);
	BLI_remlink(&m_frameCacheBase, cacheFrame);
	BLI_addtail(&m_frameCacheFree, cacheFrame);
	pthread_mutex_unlock(&m_cacheMutex);
}
开发者ID:Ichthyostega,项目名称:blender,代码行数:15,代码来源:VideoFFmpeg.cpp


示例4: sensor_remove_exec

static int sensor_remove_exec(bContext *C, wmOperator *op)
{
    Object *ob = NULL;
    bSensor *sens = edit_sensor_property_get(C, op, &ob);

    if (!sens)
        return OPERATOR_CANCELLED;

    BLI_remlink(&(ob->sensors), sens);
    free_sensor(sens);

    WM_event_add_notifier(C, NC_LOGIC, NULL);

    return OPERATOR_FINISHED;
}
开发者ID:244xiao,项目名称:blender,代码行数:15,代码来源:logic_ops.c


示例5: wm_window_close

/* this is event from ghost, or exit-blender op */
void wm_window_close(bContext *C, wmWindowManager *wm, wmWindow *win)
{
    wmWindow *tmpwin;
    bool do_exit = false;

    /* first check if we have to quit (there are non-temp remaining windows) */
    for (tmpwin = wm->windows.first; tmpwin; tmpwin = tmpwin->next) {
        if (tmpwin == win)
            continue;
        if (tmpwin->screen->temp == 0)
            break;
    }

    if (tmpwin == NULL)
        do_exit = 1;

    if ((U.uiflag & USER_QUIT_PROMPT) && !wm->file_saved) {
        if (do_exit) {
            if (!GHOST_confirmQuit(win->ghostwin))
                return;
        }
    }

    /* let WM_exit do all freeing, for correct quit.blend save */
    if (do_exit) {
        WM_exit(C);
    }
    else {
        bScreen *screen = win->screen;

        BLI_remlink(&wm->windows, win);

        wm_draw_window_clear(win);

        CTX_wm_window_set(C, win);  /* needed by handlers */
        WM_event_remove_handlers(C, &win->handlers);
        WM_event_remove_handlers(C, &win->modalhandlers);
        ED_screen_exit(C, win, win->screen);

        wm_window_free(C, wm, win);

        /* if temp screen, delete it after window free (it stops jobs that can access it) */
        if (screen->temp) {
            Main *bmain = CTX_data_main(C);
            BKE_libblock_free(bmain, screen);
        }
    }
}
开发者ID:JasonWilkins,项目名称:blender-viewport_fx,代码行数:49,代码来源:wm_window.c


示例6: controller_remove_exec

static int controller_remove_exec(bContext *C, wmOperator *op)
{
    Object *ob = NULL;
    bController *cont = edit_controller_property_get(C, op, &ob);

    if (!cont)
        return OPERATOR_CANCELLED;

    BLI_remlink(&(ob->controllers), cont);
    unlink_controller(cont);
    free_controller(cont);

    WM_event_add_notifier(C, NC_LOGIC, NULL);

    return OPERATOR_FINISHED;
}
开发者ID:244xiao,项目名称:blender,代码行数:16,代码来源:logic_ops.c


示例7: actuator_remove_exec

static int actuator_remove_exec(bContext *C, wmOperator *op)
{
    Object *ob = NULL;
    bActuator *act = edit_actuator_property_get(C, op, &ob);

    if (!act)
        return OPERATOR_CANCELLED;

    BLI_remlink(&(ob->actuators), act);
    unlink_actuator(act);
    free_actuator(act);

    WM_event_add_notifier(C, NC_LOGIC, NULL);

    return OPERATOR_FINISHED;
}
开发者ID:244xiao,项目名称:blender,代码行数:16,代码来源:logic_ops.c


示例8: BLI_callback_global_finalize

/* call on application exit */
void BLI_callback_global_finalize(void)
{
	eCbEvent evt;
	for (evt = 0; evt < BLI_CB_EVT_TOT; evt++) {
		ListBase *lb = &callback_slots[evt];
		bCallbackFuncStore *funcstore;
		bCallbackFuncStore *funcstore_next;
		for (funcstore = (bCallbackFuncStore *)lb->first; funcstore; funcstore = funcstore_next) {
			funcstore_next = (bCallbackFuncStore *)funcstore->next;
			BLI_remlink(lb, funcstore);
			if (funcstore->alloc) {
				MEM_freeN(funcstore);
			}
		}
	}
}
开发者ID:244xiao,项目名称:blender,代码行数:17,代码来源:callbacks.c


示例9: freeMetaElemlist

/* free all MetaElems from ListBase */
static void freeMetaElemlist(ListBase *lb)
{
	MetaElem *ml, *next;

	if (lb == NULL) return;

	ml = lb->first;
	while (ml) {
		next = ml->next;
		BLI_remlink(lb, ml);
		MEM_freeN(ml);
		ml = next;
	}

	lb->first = lb->last = NULL;
}
开发者ID:danielmarg,项目名称:blender-main,代码行数:17,代码来源:mball_edit.c


示例10: unpackImage

int unpackImage(ReportList *reports, Image *ima, int how)
{
	int ret_value = RET_ERROR;

	if (ima != NULL) {
		while (ima->packedfiles.last) {
			char localname[FILE_MAX], absname[FILE_MAX];
			char *newname;
			ImagePackedFile *imapf = ima->packedfiles.last;

			unpack_generate_paths(imapf->filepath, (ID *)ima, absname, localname, sizeof(absname), sizeof(localname));
			newname = unpackFile(reports, absname, localname, imapf->packedfile, how);

			if (newname != NULL) {
				ImageView *iv;

				ret_value = ret_value == RET_ERROR ? RET_ERROR : RET_OK;
				freePackedFile(imapf->packedfile);
				imapf->packedfile = NULL;

				/* update the new corresponding view filepath */
				iv = BLI_findstring(&ima->views, imapf->filepath, offsetof(ImageView, filepath));
				if (iv) {
					BLI_strncpy(iv->filepath, newname, sizeof(imapf->filepath));
				}

				/* keep the new name in the image for non-pack specific reasons */
				if (how != PF_REMOVE) {
					BLI_strncpy(ima->name, newname, sizeof(imapf->filepath));
				}
				MEM_freeN(newname);
			}
			else {
				ret_value = RET_ERROR;
			}

			BLI_remlink(&ima->packedfiles, imapf);
			MEM_freeN(imapf);
		}
	}

	if (ret_value == RET_OK) {
		BKE_image_signal(ima, NULL, IMA_SIGNAL_RELOAD);
	}

	return(ret_value);
}
开发者ID:Bforartists,项目名称:Bforartists,代码行数:47,代码来源:packedFile.c


示例11: RE_engines_exit

void RE_engines_exit(void)
{
	RenderEngineType *type, *next;

	for (type = R_engines.first; type; type = next) {
		next = type->next;

		BLI_remlink(&R_engines, type);

		if (!(type->flag & RE_INTERNAL)) {
			if (type->ext.free)
				type->ext.free(type->ext.data);

			MEM_freeN(type);
		}
	}
}
开发者ID:akonneker,项目名称:blensor,代码行数:17,代码来源:external_engine.c


示例12: wm_window_match_init

/* To be able to read files without windows closing, opening, moving
 * we try to prepare for worst case:
 * - active window gets active screen from file
 * - restoring the screens from non-active windows
 * Best case is all screens match, in that case they get assigned to proper window
 */
static void wm_window_match_init(bContext *C, ListBase *wmlist)
{
	wmWindowManager *wm;
	wmWindow *win, *active_win;
	
	*wmlist = G.main->wm;
	BLI_listbase_clear(&G.main->wm);
	
	active_win = CTX_wm_window(C);

	/* first wrap up running stuff */
	/* code copied from wm_init_exit.c */
	for (wm = wmlist->first; wm; wm = wm->id.next) {
		
		WM_jobs_kill_all(wm);
		
		for (win = wm->windows.first; win; win = win->next) {
		
			CTX_wm_window_set(C, win);  /* needed by operator close callbacks */
			WM_event_remove_handlers(C, &win->handlers);
			WM_event_remove_handlers(C, &win->modalhandlers);
			ED_screen_exit(C, win, win->screen);
		}
	}
	
	/* reset active window */
	CTX_wm_window_set(C, active_win);

	ED_editors_exit(C);

	/* just had return; here from r12991, this code could just get removed?*/
#if 0
	if (wm == NULL) return;
	if (G.fileflags & G_FILE_NO_UI) return;
	
	/* we take apart the used screens from non-active window */
	for (win = wm->windows.first; win; win = win->next) {
		BLI_strncpy(win->screenname, win->screen->id.name, MAX_ID_NAME);
		if (win != wm->winactive) {
			BLI_remlink(&G.main->screen, win->screen);
			//BLI_addtail(screenbase, win->screen);
		}
	}
#endif
}
开发者ID:ChunHungLiu,项目名称:blender,代码行数:51,代码来源:wm_files.c


示例13: blf_font_free

void blf_font_free(FontBLF *font)
{
	GlyphCacheBLF *gc;

	font->glyph_cache = NULL;
	while (font->cache.first) {
		gc = font->cache.first;
		BLI_remlink(&font->cache, gc);
		blf_glyph_cache_free(gc);
	}

	FT_Done_Face(font->face);
	if (font->filename)
		MEM_freeN(font->filename);
	if (font->name)
		MEM_freeN(font->name);
	MEM_freeN(font);
}
开发者ID:vanangamudi,项目名称:blender-main,代码行数:18,代码来源:blf_font.c


示例14: blf_glyph_cache_clear

void blf_glyph_cache_clear(FontBLF *font)
{
	GlyphCacheBLF *gc;
	GlyphBLF *g;
	int i;

	for (gc = font->cache.first; gc; gc = gc->next) {
		for (i = 0; i < 257; i++) {
			while (gc->bucket[i].first) {
				g = gc->bucket[i].first;
				BLI_remlink(&(gc->bucket[i]), g);
				blf_glyph_free(g);
			}
		}

		memset(gc->glyph_ascii_table, 0, sizeof(gc->glyph_ascii_table));
	}
}
开发者ID:nttputus,项目名称:blensor,代码行数:18,代码来源:blf_glyph.c


示例15: blf_glyph_cache_free

void blf_glyph_cache_free(GlyphCacheBLF *gc)
{
	GlyphBLF *g;
	int i;

	for (i = 0; i < 257; i++) {
		while (gc->bucket[i].first) {
			g = gc->bucket[i].first;
			BLI_remlink(&(gc->bucket[i]), g);
			blf_glyph_free(g);
		}
	}

	if (gc->cur_tex+1 > 0)
		glDeleteTextures(gc->cur_tex+1, gc->textures);
	free((void *)gc->textures);
	MEM_freeN(gc);
}
开发者ID:nttputus,项目名称:blensor,代码行数:18,代码来源:blf_glyph.c


示例16: render_result_views_free

static void render_result_views_free(RenderResult *res)
{
	while (res->views.first) {
		RenderView *rv = res->views.first;
		BLI_remlink(&res->views, rv);

		if (rv->rect32)
			MEM_freeN(rv->rect32);

		if (rv->rectz)
			MEM_freeN(rv->rectz);

		if (rv->rectf)
			MEM_freeN(rv->rectf);

		MEM_freeN(rv);
	}
}
开发者ID:sntulix,项目名称:blender-api-javascript,代码行数:18,代码来源:render_result.c


示例17: WM_event_remove_timer

void WM_event_remove_timer(wmWindowManager *wm, wmWindow *UNUSED(win), wmTimer *timer)
{
	wmTimer *wt;
	
	/* extra security check */
	for (wt = wm->timers.first; wt; wt = wt->next)
		if (wt == timer)
			break;
	if (wt) {
		if (wm->reports.reporttimer == wt)
			wm->reports.reporttimer = NULL;
		
		BLI_remlink(&wm->timers, wt);
		if (wt->customdata)
			MEM_freeN(wt->customdata);
		MEM_freeN(wt);
	}
}
开发者ID:vanangamudi,项目名称:blender-main,代码行数:18,代码来源:wm_window.c


示例18: rem_from_group

/* also used for ob==NULL */
int rem_from_group(Group *group, Object *ob)
{
	GroupObject *go, *gon;
	int removed = 0;
	if(group==NULL) return 0;
	
	go= group->gobject.first;
	while(go) {
		gon= go->next;
		if(go->ob==ob) {
			BLI_remlink(&group->gobject, go);
			free_group_object(go);
			removed = 1;
			/* should break here since an object being in a group twice cant happen? */
		}
		go= gon;
	}
	return removed;
}
开发者ID:jinjoh,项目名称:NOOR,代码行数:20,代码来源:group.c


示例19: wm_operator_register

/* called on event handling by event_system.c */
void wm_operator_register(bContext *C, wmOperator *op)
{
	wmWindowManager *wm= CTX_wm_manager(C);
	int tot;

	BLI_addtail(&wm->operators, op);
	tot= BLI_countlist(&wm->operators);
	
	while(tot>MAX_OP_REGISTERED) {
		wmOperator *opt= wm->operators.first;
		BLI_remlink(&wm->operators, opt);
		WM_operator_free(opt);
		tot--;
	}
	
	/* so the console is redrawn */
	WM_event_add_notifier(C, NC_SPACE|ND_SPACE_INFO_REPORT, NULL);
	WM_event_add_notifier(C, NC_WM|ND_HISTORY, NULL);
}
开发者ID:mik0001,项目名称:Blender,代码行数:20,代码来源:wm.c


示例20: RE_engine_end_result

void RE_engine_end_result(RenderEngine *engine, RenderResult *result, int cancel, int merge_results)
{
	Render *re = engine->re;

	if (!result) {
		return;
	}

	/* merge. on break, don't merge in result for preview renders, looks nicer */
	if (!cancel) {
		/* for exr tile render, detect tiles that are done */
		RenderPart *pa = get_part_from_result(re, result);

		if (pa) {
			pa->status = PART_STATUS_READY;
		}
		else if (re->result->do_exr_tile) {
			/* if written result does not match any tile and we are using save
			 * buffers, we are going to get openexr save errors */
			fprintf(stderr, "RenderEngine.end_result: dimensions do not match any OpenEXR tile.\n");
		}
	}

	if (!cancel || merge_results) {
		if (re->result->do_exr_tile) {
			if (!cancel) {
				render_result_exr_file_merge(re->result, result);
			}
		}
		else if (!(re->test_break(re->tbh) && (re->r.scemode & R_BUTS_PREVIEW)))
			render_result_merge(re->result, result);

		/* draw */
		if (!re->test_break(re->tbh)) {
			result->renlay = result->layers.first; /* weak, draws first layer always */
			re->display_update(re->duh, result, NULL);
		}
	}

	/* free */
	BLI_remlink(&engine->fullresult, result);
	render_result_free(result);
}
开发者ID:akonneker,项目名称:blensor,代码行数:43,代码来源:external_engine.c



注:本文中的BLI_remlink函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ BLI_snprintf函数代码示例发布时间:2022-05-30
下一篇:
C++ BLI_rcti_size_y函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap