当前位置: 首页>>代码示例>>C++>>正文


C++ ED_area_tag_redraw函数代码示例

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


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


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