这篇教程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函数的24个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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,
示例2: rna_Area_type_updatestatic 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,
示例3: actkeys_viewallstatic 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,
示例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,
示例5: localview_execstatic 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,
示例6: rna_Area_type_updatestatic 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,
示例7: report_select_all_toggle_execstatic 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,
示例8: report_delete_execstatic 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,
示例9: text_autocomplete_invokestatic 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,
示例10: file_select_all_execstatic 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,
示例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,
示例12: console_indent_execstatic 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,
示例13: console_insert_execstatic 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,
示例14: sample_exitstatic 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,
示例15: render_view_show_invokestatic 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,
示例16: actkeys_viewallstatic 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,
示例17: pin_cbstatic 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,
示例18: file_highlight_invokestatic 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,
示例19: select_report_pick_execstatic 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,
示例20: do_action_buttonsstatic 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,
示例21: toggle_time_execstatic int toggle_time_exec(bContext *C, wmOperator *UNUSED(op)){ ScrArea *curarea= CTX_wm_area(C); if (curarea == NULL) return OPERATOR_CANCELLED; /* simply toggle draw frames flag in applicable spaces */ // XXX or should relevant spaces define their own version of this? switch (curarea->spacetype) { case SPACE_TIME: /* TimeLine */ { SpaceTime *stime= CTX_wm_space_time(C); stime->flag ^= TIME_DRAWFRAMES; } break; case SPACE_ACTION: /* Action Editor */ { SpaceAction *saction= CTX_wm_space_action(C); saction->flag ^= SACTION_DRAWTIME; } break; case SPACE_IPO: /* Graph Editor */ { SpaceIpo *sipo= CTX_wm_space_graph(C); sipo->flag ^= SIPO_DRAWTIME; } break; case SPACE_NLA: /* NLA Editor */ { SpaceNla *snla= CTX_wm_space_nla(C); snla->flag ^= SNLA_DRAWTIME; } break; case SPACE_SEQ: /* Sequencer */ { SpaceSeq *sseq= CTX_wm_space_seq(C); sseq->flag ^= SEQ_DRAWFRAMES; } break; default: /* editor doesn't show frames */ return OPERATOR_CANCELLED; // XXX or should we pass through instead? } ED_area_tag_redraw(curarea); return OPERATOR_FINISHED;}
开发者ID:OldBrunet,项目名称:BGERTPS,代码行数:49,
示例22: reset_recent_execstatic int reset_recent_exec(bContext *C, wmOperator *UNUSED(op)){ ScrArea *sa = CTX_wm_area(C); char name[FILE_MAX]; struct FSMenu *fsmenu = fsmenu_get(); while (fsmenu_get_entry(fsmenu, FS_CATEGORY_RECENT, 0) != NULL) { fsmenu_remove_entry(fsmenu, FS_CATEGORY_RECENT, 0); } BLI_make_file_string("/", name, BLI_get_folder_create(BLENDER_USER_CONFIG, NULL), BLENDER_BOOKMARK_FILE); fsmenu_write_file(fsmenu, name); ED_area_tag_redraw(sa); return OPERATOR_FINISHED;}
开发者ID:manwapastorelli,项目名称:blender-git,代码行数:15,
示例23: console_history_cycle_exec/* the python exec operator uses this */static int console_history_cycle_exec(bContext *C, wmOperator *op){ SpaceConsole *sc = CTX_wm_space_console(C); ARegion *ar = CTX_wm_region(C); ConsoleLine *ci = console_history_verify(C); /* TODO - stupid, just prevents crashes when no command line */ const bool reverse = RNA_boolean_get(op->ptr, "reverse"); /* assumes down, reverse is up */ int prev_len = ci->len; /* keep a copy of the line above so when history is cycled * this is the only function that needs to know about the double-up */ if (ci->prev) { ConsoleLine *ci_prev = (ConsoleLine *)ci->prev; if (STREQ(ci->line, ci_prev->line)) console_history_free(sc, ci_prev); } if (reverse) { /* last item in history */ ci = sc->history.last; BLI_remlink(&sc->history, ci); BLI_addhead(&sc->history, ci); } else { ci = sc->history.first; BLI_remlink(&sc->history, ci); BLI_addtail(&sc->history, ci); } { /* add a duplicate of the new arg and remove all other instances */ ConsoleLine *cl; while ((cl = console_history_find(sc, ci->line, ci))) console_history_free(sc, cl); console_history_add(sc, (ConsoleLine *)sc->history.last); } ci = sc->history.last; console_select_offset(sc, ci->len - prev_len); /* could be wrapped so update scroll rect */ console_textview_update_rect(sc, ar); ED_area_tag_redraw(CTX_wm_area(C)); console_scroll_bottom(ar); return OPERATOR_FINISHED;}
开发者ID:mistajuliax,项目名称:OctaneBlender,代码行数:49,
示例24: file_filenum_execstatic int file_filenum_exec(bContext *C, wmOperator *op){ SpaceFile *sfile= CTX_wm_space_file(C); ScrArea *sa= CTX_wm_area(C); int inc = RNA_int_get(op->ptr, "increment"); if(sfile->params && (inc != 0)) { BLI_newname(sfile->params->file, inc); ED_area_tag_redraw(sa); file_draw_check_cb(C, NULL, NULL); // WM_event_add_notifier(C, NC_WINDOW, NULL); } return OPERATOR_FINISHED;}
开发者ID:OldBrunet,项目名称:BGERTPS,代码行数:16,
注:本文中的ED_area_tag_redraw函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ ED_context_get_markers函数代码示例 C++ EDMA_DRV_IRQHandler函数代码示例 |