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

C++ ED_area_tag_redraw函数代码示例

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

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



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

示例1: report_replay_exec

// TODO, get this working again!
static int report_replay_exec(bContext *C, wmOperator *UNUSED(op))
{
//	SpaceInfo *sc = CTX_wm_space_info(C);
//	ReportList *reports = CTX_wm_reports(C);
//	int report_mask = info_report_mask(sc);
//	Report *report;

#if 0
	sc->type = CONSOLE_TYPE_PYTHON;

	for (report = reports->list.last; report; report = report->prev) {
		if ((report->type & report_mask) &&
		    (report->type & RPT_OPERATOR_ALL | RPT_PROPERTY_ALL) &&
		    (report->flag & SELECT))
		{
			console_history_add_str(sc, report->message, 0);
			WM_operator_name_call(C, "CONSOLE_OT_execute", WM_OP_EXEC_DEFAULT, NULL);

			ED_area_tag_redraw(CTX_wm_area(C));
		}
	}

	sc->type = CONSOLE_TYPE_REPORT;
#endif
	ED_area_tag_redraw(CTX_wm_area(C));

	return OPERATOR_FINISHED;
}
开发者ID:danielmarg,项目名称:blender-main,代码行数:29,代码来源:info_report.c


示例2: rna_Area_type_update

static void rna_Area_type_update(bContext *C, PointerRNA *ptr)
{
	wmWindowManager *wm = CTX_wm_manager(C);
	wmWindow *win;
	bScreen *sc = (bScreen *)ptr->id.data;
	ScrArea *sa = (ScrArea *)ptr->data;

	/* XXX this call still use context, so we trick it to work in the right context */
	for (win = wm->windows.first; win; win = win->next) {
		if (sc == win->screen) {
			wmWindow *prevwin = CTX_wm_window(C);
			ScrArea *prevsa = CTX_wm_area(C);
			ARegion *prevar = CTX_wm_region(C);

			CTX_wm_window_set(C, win);
			CTX_wm_area_set(C, sa);
			CTX_wm_region_set(C, NULL);

			ED_area_newspace(C, sa, sa->butspacetype);
			ED_area_tag_redraw(sa);

			CTX_wm_window_set(C, prevwin);
			CTX_wm_area_set(C, prevsa);
			CTX_wm_region_set(C, prevar);
			break;
		}
	}
}
开发者ID:Eibriel,项目名称:kiriblender,代码行数:28,代码来源:rna_screen.c


示例3: actkeys_viewall

static int actkeys_viewall(bContext *C, const short onlySel)
{
	bAnimContext ac;
	View2D *v2d;
	float extra;
	
	/* get editor data */
	if (ANIM_animdata_get_context(C, &ac) == 0)
		return OPERATOR_CANCELLED;
	v2d= &ac.ar->v2d;
	
	/* set the horizontal range, with an extra offset so that the extreme keys will be in view */
	get_keyframe_extents(&ac, &v2d->cur.xmin, &v2d->cur.xmax, onlySel);
	
	extra= 0.1f * (v2d->cur.xmax - v2d->cur.xmin);
	v2d->cur.xmin -= extra;
	v2d->cur.xmax += extra;
	
	/* set vertical range */
	v2d->cur.ymax= 0.0f;
	v2d->cur.ymin= (float)-(v2d->mask.ymax - v2d->mask.ymin);
	
	/* do View2D syncing */
	UI_view2d_sync(CTX_wm_screen(C), CTX_wm_area(C), v2d, V2D_LOCK_COPY);
	
	/* just redraw this view */
	ED_area_tag_redraw(CTX_wm_area(C));
	
	return OPERATOR_FINISHED;
}
开发者ID:OldBrunet,项目名称:BGERTPS,代码行数:30,代码来源:action_edit.c


示例4: console_scrollback_append_exec

/* the python exec operator uses this */
static int console_scrollback_append_exec(bContext *C, wmOperator *op)
{
	SpaceConsole *sc = CTX_wm_space_console(C);
	ARegion *ar = CTX_wm_region(C);
	ConsoleLine *ci;
	
	char *str = RNA_string_get_alloc(op->ptr, "text", NULL, 0); /* own this text in the new line, don't free */
	int type = RNA_enum_get(op->ptr, "type");

	console_history_verify(C);
	
	ci = console_scrollback_add_str(sc, str, 1); /* own the string */
	ci->type = type;
	
	console_scrollback_limit(sc);

	/* 'ar' can be null depending on the operator that runs
	 * rendering with invoke default for eg causes this */
	if (ar) {
		console_textview_update_rect(sc, ar);
	}

	ED_area_tag_redraw(CTX_wm_area(C));
	
	return OPERATOR_FINISHED;
}
开发者ID:mistajuliax,项目名称:OctaneBlender,代码行数:27,代码来源:console_ops.c


示例5: localview_exec

static int localview_exec(bContext *C, wmOperator *op)
{
	const int smooth_viewtx = WM_operator_smooth_viewtx_get(op);
	wmWindowManager *wm = CTX_wm_manager(C);
	wmWindow *win = CTX_wm_window(C);
	Main *bmain = CTX_data_main(C);
	Scene *scene = CTX_data_scene(C);
	ScrArea *sa = CTX_wm_area(C);
	View3D *v3d = CTX_wm_view3d(C);
	bool changed;
	
	if (v3d->localvd) {
		changed = view3d_localview_exit(wm, win, bmain, scene, sa, smooth_viewtx);
	}
	else {
		changed = view3d_localview_init(wm, win, bmain, scene, sa, smooth_viewtx, op->reports);
	}

	if (changed) {
		DAG_id_type_tag(bmain, ID_OB);
		ED_area_tag_redraw(sa);

		/* unselected objects become selected when exiting */
		if (v3d->localvd == NULL) {
			WM_event_add_notifier(C, NC_SCENE | ND_OB_SELECT, scene);
		}

		return OPERATOR_FINISHED;
	}
	else {
		return OPERATOR_CANCELLED;
	}
}
开发者ID:greg100795,项目名称:blender-git,代码行数:33,代码来源:view3d_view.c


示例6: rna_Area_type_update

static void rna_Area_type_update(bContext *C, PointerRNA *ptr)
{
	wmWindowManager *wm = CTX_wm_manager(C);
	wmWindow *win;
	bScreen *sc = (bScreen *)ptr->id.data;
	ScrArea *sa = (ScrArea *)ptr->data;

	/* XXX this call still use context, so we trick it to work in the right context */
	for (win = wm->windows.first; win; win = win->next) {
		if (sc == win->screen) {
			wmWindow *prevwin = CTX_wm_window(C);
			ScrArea *prevsa = CTX_wm_area(C);
			ARegion *prevar = CTX_wm_region(C);

			CTX_wm_window_set(C, win);
			CTX_wm_area_set(C, sa);
			CTX_wm_region_set(C, NULL);

			ED_area_newspace(C, sa, sa->butspacetype, true);
			ED_area_tag_redraw(sa);

			/* It is possible that new layers becomes visible. */
			if (sa->spacetype == SPACE_VIEW3D) {
				DAG_on_visible_update(CTX_data_main(C), false);
			}

			CTX_wm_window_set(C, prevwin);
			CTX_wm_area_set(C, prevsa);
			CTX_wm_region_set(C, prevar);
			break;
		}
	}
}
开发者ID:wchargin,项目名称:blender,代码行数:33,代码来源:rna_screen.c


示例7: report_select_all_toggle_exec

static int report_select_all_toggle_exec(bContext *C, wmOperator *UNUSED(op))
{
	SpaceInfo *sinfo = CTX_wm_space_info(C);
	ReportList *reports = CTX_wm_reports(C);
	int report_mask = info_report_mask(sinfo);
	int deselect = 0;

	Report *report;

	for (report = reports->list.last; report; report = report->prev) {
		if ((report->type & report_mask) && (report->flag & SELECT)) {
			deselect = 1;
			break;
		}
	}


	if (deselect) {
		for (report = reports->list.last; report; report = report->prev)
			if (report->type & report_mask)
				report->flag &= ~SELECT;
	}
	else {
		for (report = reports->list.last; report; report = report->prev)
			if (report->type & report_mask)
				report->flag |= SELECT;
	}

	ED_area_tag_redraw(CTX_wm_area(C));

	return OPERATOR_FINISHED;
}
开发者ID:danielmarg,项目名称:blender-main,代码行数:32,代码来源:info_report.c


示例8: report_delete_exec

static int report_delete_exec(bContext *C, wmOperator *UNUSED(op))
{
	SpaceInfo *sinfo = CTX_wm_space_info(C);
	ReportList *reports = CTX_wm_reports(C);
	int report_mask = info_report_mask(sinfo);


	Report *report, *report_next;

	for (report = reports->list.first; report; ) {

		report_next = report->next;

		if ((report->type & report_mask) && (report->flag & SELECT)) {
			BLI_remlink(&reports->list, report);
			MEM_freeN((void *)report->message);
			MEM_freeN(report);
		}

		report = report_next;
	}

	ED_area_tag_redraw(CTX_wm_area(C));

	return OPERATOR_FINISHED;
}
开发者ID:danielmarg,项目名称:blender-main,代码行数:26,代码来源:info_report.c


示例9: text_autocomplete_invoke

static int text_autocomplete_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
{
	SpaceText *st = CTX_wm_space_text(C);
	Text *text = CTX_data_edit_text(C);

	st->doplugins = true;
	op->customdata = text_autocomplete_build(text);

	if (texttool_suggest_first()) {

		ED_area_tag_redraw(CTX_wm_area(C));

		if (texttool_suggest_first() == texttool_suggest_last()) {
			confirm_suggestion(st->text);
			text_update_line_edited(st->text->curl);
			text_autocomplete_free(C, op);
			return OPERATOR_FINISHED;
		}
		else {
			WM_event_add_modal_handler(C, op);
			return OPERATOR_RUNNING_MODAL;
		}
	}
	else {
		text_autocomplete_free(C, op);
		return OPERATOR_CANCELLED;
	}
}
开发者ID:DrangPo,项目名称:blender,代码行数:28,代码来源:text_autocomplete.c


示例10: file_select_all_exec

static int file_select_all_exec(bContext *C, wmOperator *UNUSED(op))
{
	ScrArea *sa = CTX_wm_area(C);
	SpaceFile *sfile = CTX_wm_space_file(C);
	FileSelection sel;
	int numfiles = filelist_numfiles(sfile->files);
	int i;
	bool is_selected = false;

	sel.first = 0; 
	sel.last = numfiles - 1;

	/* Is any file selected ? */
	for (i = 0; i < numfiles; ++i) {
		if (filelist_is_selected(sfile->files, i, CHECK_ALL)) {
			is_selected = true;
			break;
		}
	}
	/* select all only if previously no file was selected */
	if (is_selected) {
		filelist_select(sfile->files, &sel, FILE_SEL_REMOVE, SELECTED_FILE, CHECK_ALL);
	}
	else {
		const FileCheckType check_type = (sfile->params->flag & FILE_DIRSEL_ONLY) ? CHECK_DIRS : CHECK_FILES;
		filelist_select(sfile->files, &sel, FILE_SEL_ADD, SELECTED_FILE, check_type);
	}
	ED_area_tag_redraw(sa);
	return OPERATOR_FINISHED;
}
开发者ID:manwapastorelli,项目名称:blender-git,代码行数:30,代码来源:file_ops.c


示例11: console_clear_exec

/* the python exec operator uses this */
static int console_clear_exec(bContext *C, wmOperator *op)
{
	SpaceConsole *sc = CTX_wm_space_console(C);
	ARegion *ar = CTX_wm_region(C);
	
	const bool scrollback = RNA_boolean_get(op->ptr, "scrollback");
	const bool history = RNA_boolean_get(op->ptr, "history");
	
	/*ConsoleLine *ci = */ console_history_verify(C);
	
	if (scrollback) { /* last item in mistory */
		while (sc->scrollback.first)
			console_scrollback_free(sc, sc->scrollback.first);
	}
	
	if (history) {
		while (sc->history.first)
			console_history_free(sc, sc->history.first);
		console_history_verify(C);
	}

	console_textview_update_rect(sc, ar);
	ED_area_tag_redraw(CTX_wm_area(C));

	return OPERATOR_FINISHED;
}
开发者ID:mistajuliax,项目名称:OctaneBlender,代码行数:27,代码来源:console_ops.c


示例12: console_indent_exec

static int console_indent_exec(bContext *C, wmOperator *UNUSED(op))
{
	SpaceConsole *sc = CTX_wm_space_console(C);
	ARegion *ar = CTX_wm_region(C);
	ConsoleLine *ci = console_history_verify(C);
	int spaces;
	int len;

	for (spaces = 0; spaces < ci->len; spaces++) {
		if (ci->line[spaces] != ' ')
			break;
	}

	len = TAB_LENGTH - spaces % TAB_LENGTH;

	console_line_verify_length(ci, ci->len + len);

	memmove(ci->line + len, ci->line, ci->len + 1);
	memset(ci->line, ' ', len);
	ci->len += len;
	BLI_assert(ci->len >= 0);
	console_line_cursor_set(ci, ci->cursor + len);
	console_select_offset(sc, len);

	console_textview_update_rect(sc, ar);
	ED_area_tag_redraw(CTX_wm_area(C));

	console_scroll_bottom(ar);

	return OPERATOR_FINISHED;
}
开发者ID:mistajuliax,项目名称:OctaneBlender,代码行数:31,代码来源:console_ops.c


示例13: console_insert_exec

static int console_insert_exec(bContext *C, wmOperator *op)
{
	SpaceConsole *sc = CTX_wm_space_console(C);
	ARegion *ar = CTX_wm_region(C);
	ConsoleLine *ci = console_history_verify(C);
	char *str = RNA_string_get_alloc(op->ptr, "text", NULL, 0);
	int len;

	if (str[0] == '\t' && str[1] == '\0') {
		len = TAB_LENGTH;
		MEM_freeN(str);
		str = MEM_mallocN(len + 1, "insert_exec");
		memset(str, ' ', len);
		str[len] = '\0';
	}

	len = console_line_insert(ci, str);
	
	MEM_freeN(str);
	
	if (len == 0) {
		return OPERATOR_CANCELLED;
	}
	else {
		console_select_offset(sc, len);
	}

	console_textview_update_rect(sc, ar);
	ED_area_tag_redraw(CTX_wm_area(C));

	console_scroll_bottom(ar);

	return OPERATOR_FINISHED;
}
开发者ID:mistajuliax,项目名称:OctaneBlender,代码行数:34,代码来源:console_ops.c


示例14: sample_exit

static void sample_exit(bContext *C, wmOperator *op)
{
	ImageSampleInfo *info = op->customdata;

	ED_region_draw_cb_exit(info->art, info->draw_handle);
	ED_area_tag_redraw(CTX_wm_area(C));
	MEM_freeN(info);
}
开发者ID:SuriyaaKudoIsc,项目名称:blender-git,代码行数:8,代码来源:sequencer_view.c


示例15: render_view_show_invoke

static int render_view_show_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *event)
{
	wmWindow *wincur = CTX_wm_window(C);
	
	/* test if we have currently a temp screen active */
	if (wincur->screen->temp) {
		wm_window_lower(wincur);
	}
	else {
		wmWindow *win, *winshow;
		ScrArea *sa = find_area_showing_r_result(C, CTX_data_scene(C), &winshow);
		
		/* is there another window on current scene showing result? */
		for (win = CTX_wm_manager(C)->windows.first; win; win = win->next) {
			bScreen *sc = win->screen;
			if ((sc->temp && ((ScrArea *)sc->areabase.first)->spacetype == SPACE_IMAGE) ||
			    (win == winshow && winshow != wincur))
			{
				wm_window_raise(win);
				return OPERATOR_FINISHED;
			}
		}
		
		/* determine if render already shows */
		if (sa) {
			/* but don't close it when rendering */
			if (G.is_rendering == false) {
				SpaceImage *sima = sa->spacedata.first;

				if (sima->flag & SI_PREVSPACE) {
					sima->flag &= ~SI_PREVSPACE;

					if (sima->flag & SI_FULLWINDOW) {
						sima->flag &= ~SI_FULLWINDOW;
						ED_screen_full_prevspace(C, sa, false);
					}
					else if (sima->next) {
						/* workaround for case of double prevspace, render window
						 * with a file browser on top of it (same as in ED_area_prevspace) */
						if (sima->next->spacetype == SPACE_FILE && sima->next->next)
							ED_area_newspace(C, sa, sima->next->next->spacetype);
						else
							ED_area_newspace(C, sa, sima->next->spacetype);
						ED_area_tag_redraw(sa);
					}
				}
			}
		}
		else {
			render_view_open(C, event->x, event->y);
		}
	}

	return OPERATOR_FINISHED;
}
开发者ID:AwesomeDoesIt,项目名称:blender-git,代码行数:55,代码来源:render_view.c


示例16: actkeys_viewall

static int actkeys_viewall(bContext *C, const bool only_sel)
{
	bAnimContext ac;
	View2D *v2d;
	float extra, min, max;
	bool found;
	
	/* get editor data */
	if (ANIM_animdata_get_context(C, &ac) == 0)
		return OPERATOR_CANCELLED;
	v2d = &ac.ar->v2d;
	
	/* set the horizontal range, with an extra offset so that the extreme keys will be in view */
	found = get_keyframe_extents(&ac, &min, &max, only_sel);

	if (only_sel && (found == false))
		return OPERATOR_CANCELLED;

	v2d->cur.xmin = min;
	v2d->cur.xmax = max;

	extra = 0.1f * BLI_rctf_size_x(&v2d->cur);
	v2d->cur.xmin -= extra;
	v2d->cur.xmax += extra;
	
	/* set vertical range */
	if (only_sel == false) {
		/* view all -> the summary channel is usually the shows everything, and resides right at the top... */
		v2d->cur.ymax = 0.0f;
		v2d->cur.ymin = (float)-BLI_rcti_size_y(&v2d->mask);
	}
	else {
		/* locate first selected channel (or the active one), and frame those */
		float ymin = v2d->cur.ymin;
		float ymax = v2d->cur.ymax;
		
		if (actkeys_channels_get_selected_extents(&ac, &ymin, &ymax)) {
			/* recenter the view so that this range is in the middle */
			float ymid = (ymax - ymin) / 2.0f + ymin;
			float x_center;
			
			UI_view2d_center_get(v2d, &x_center, NULL);
			UI_view2d_center_set(v2d, x_center, ymid);
		}
	}
	
	/* do View2D syncing */
	UI_view2d_sync(CTX_wm_screen(C), CTX_wm_area(C), v2d, V2D_LOCK_COPY);
	
	/* just redraw this view */
	ED_area_tag_redraw(CTX_wm_area(C));
	
	return OPERATOR_FINISHED;
}
开发者ID:pawkoz,项目名称:dyplom,代码行数:54,代码来源:action_edit.c


示例17: pin_cb

static void pin_cb(bContext *C, void *UNUSED(arg1), void *UNUSED(arg2))
{
	SpaceButs *sbuts = CTX_wm_space_buts(C);

	if (sbuts->flag & SB_PIN_CONTEXT) {
		sbuts->pinid = buttons_context_id_path(C);
	}
	else
		sbuts->pinid = NULL;
	
	ED_area_tag_redraw(CTX_wm_area(C));
}
开发者ID:DarkDefender,项目名称:blender-npr-tess2,代码行数:12,代码来源:buttons_context.c


示例18: file_highlight_invoke

static int file_highlight_invoke(bContext *C, wmOperator *UNUSED(op), const wmEvent *event)
{
	ARegion *ar = CTX_wm_region(C);
	SpaceFile *sfile = CTX_wm_space_file(C);

	if (!file_highlight_set(sfile, ar, event->x, event->y))
		return OPERATOR_CANCELLED;

	ED_area_tag_redraw(CTX_wm_area(C));
	
	return OPERATOR_FINISHED;
}
开发者ID:manwapastorelli,项目名称:blender-git,代码行数:12,代码来源:file_ops.c


示例19: select_report_pick_exec

static int select_report_pick_exec(bContext *C, wmOperator *op)
{
	int report_index = RNA_int_get(op->ptr, "report_index");
	Report *report = BLI_findlink(&CTX_wm_reports(C)->list, report_index);

	if (!report)
		return OPERATOR_CANCELLED;

	report->flag ^= SELECT; /* toggle */

	ED_area_tag_redraw(CTX_wm_area(C));

	return OPERATOR_FINISHED;
}
开发者ID:danielmarg,项目名称:blender-main,代码行数:14,代码来源:info_report.c


示例20: do_action_buttons

static void do_action_buttons(bContext *C, void *arg, int event)
{
	/* special exception for mode changing - enable custom settings? */
	if (event == B_MODECHANGE) {
		SpaceAction *saction= CTX_wm_space_action(C);
		
		/* if the new mode is ShapeKeys editor, enable sliders */
		if (saction->mode == SACTCONT_SHAPEKEY)
			saction->flag |= SACTION_SLIDERS;
	}
	
	ED_area_tag_refresh(CTX_wm_area(C));
	ED_area_tag_redraw(CTX_wm_area(C));
}
开发者ID:jinjoh,项目名称:NOOR,代码行数:14,代码来源:action_header.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ ED_context_get_markers函数代码示例发布时间:2022-05-30
下一篇:
C++ EDMA_DRV_IRQHandler函数代码示例发布时间: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