本文整理汇总了C++中IFACE_函数的典型用法代码示例。如果您正苦于以下问题:C++ IFACE_函数的具体用法?C++ IFACE_怎么用?C++ IFACE_使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了IFACE_函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: draw_modifier__cycles
/* draw settings for cycles modifier */
static void draw_modifier__cycles(uiLayout *layout, ID *id, FModifier *fcm, short UNUSED(width))
{
uiLayout *split, *col;
PointerRNA ptr;
/* init the RNA-pointer */
RNA_pointer_create(id, &RNA_FModifierCycles, fcm, &ptr);
/* split into 2 columns
* NOTE: the mode comboboxes shouldn't get labels, otherwise there isn't enough room
*/
split = uiLayoutSplit(layout, 0.5f, FALSE);
/* before range */
col = uiLayoutColumn(split, TRUE);
uiItemL(col, IFACE_("Before:"), ICON_NONE);
uiItemR(col, &ptr, "mode_before", 0, "", ICON_NONE);
uiItemR(col, &ptr, "cycles_before", 0, NULL, ICON_NONE);
/* after range */
col = uiLayoutColumn(split, TRUE);
uiItemL(col, IFACE_("After:"), ICON_NONE);
uiItemR(col, &ptr, "mode_after", 0, "", ICON_NONE);
uiItemR(col, &ptr, "cycles_after", 0, NULL, ICON_NONE);
}
开发者ID:Eibriel,项目名称:kiriblender,代码行数:26,代码来源:fmodifier_ui.c
示例2: unpack_all_invoke
static int unpack_all_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
{
Main *bmain = CTX_data_main(C);
uiPopupMenu *pup;
uiLayout *layout;
char title[64];
int count = 0;
count = countPackedFiles(bmain);
if (!count) {
BKE_report(op->reports, RPT_WARNING, "No packed files to unpack");
G.fileflags &= ~G_AUTOPACK;
return OPERATOR_CANCELLED;
}
if (count == 1)
strcpy(title, IFACE_("Unpack 1 File"));
else
BLI_snprintf(title, sizeof(title), IFACE_("Unpack %d Files"), count);
pup = uiPupMenuBegin(C, title, ICON_NONE);
layout = uiPupMenuLayout(pup);
uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT);
uiItemsEnumO(layout, "FILE_OT_unpack_all", "method");
uiPupMenuEnd(C, pup);
return OPERATOR_CANCELLED;
}
开发者ID:Walid-Shouman,项目名称:Blender,代码行数:31,代码来源:info_ops.c
示例3: graph_panel_driverVar__transChan
/* settings for 'transform channel' driver variable type */
static void graph_panel_driverVar__transChan(uiLayout *layout, ID *id, DriverVar *dvar)
{
DriverTarget *dtar = &dvar->targets[0];
Object *ob = (Object *)dtar->id;
PointerRNA dtar_ptr;
uiLayout *col, *sub;
/* initialize RNA pointer to the target */
RNA_pointer_create(id, &RNA_DriverTarget, dtar, &dtar_ptr);
/* properties */
col = uiLayoutColumn(layout, true);
uiLayoutSetRedAlert(col, (dtar->flag & DTAR_FLAG_INVALID)); /* XXX: per field... */
uiItemR(col, &dtar_ptr, "id", 0, IFACE_("Object"), ICON_NONE);
if (dtar->id && GS(dtar->id->name) == ID_OB && ob->pose) {
PointerRNA tar_ptr;
RNA_pointer_create(dtar->id, &RNA_Pose, ob->pose, &tar_ptr);
uiItemPointerR(col, &dtar_ptr, "bone_target", &tar_ptr, "bones", IFACE_("Bone"), ICON_BONE_DATA);
}
sub = uiLayoutColumn(layout, true);
uiItemR(sub, &dtar_ptr, "transform_type", 0, NULL, ICON_NONE);
uiItemR(sub, &dtar_ptr, "transform_space", 0, IFACE_("Space"), ICON_NONE);
}
开发者ID:diekev,项目名称:blender,代码行数:27,代码来源:graph_buttons.c
示例4: BLI_countlist
/* rl==NULL means composite result */
static char *pass_menu(RenderLayer *rl, short *curpass)
{
RenderPass *rpass;
int len = 64 + 32 * (rl ? BLI_countlist(&rl->passes) : 1);
short a, nr = 0;
char *str = MEM_callocN(len, "menu layers");
strcpy(str, IFACE_("Pass %t"));
a = strlen(str);
/* rendered results don't have a Combined pass */
if (rl == NULL || rl->rectf) {
a += sprintf(str + a, "|%s %%x0", IFACE_("Combined"));
nr = 1;
}
if (rl)
for (rpass = rl->passes.first; rpass; rpass = rpass->next, nr++)
a += sprintf(str + a, "|%s %%x%d", IFACE_(rpass->name), nr);
if (*curpass >= nr)
*curpass = 0;
return str;
}
开发者ID:Eibriel,项目名称:kiriblender,代码行数:26,代码来源:image_buttons.c
示例5: EEVEE_lightcache_info_update
void EEVEE_lightcache_info_update(SceneEEVEE *eevee)
{
LightCache *lcache = eevee->light_cache;
if (lcache != NULL) {
if (lcache->flag & LIGHTCACHE_BAKING) {
BLI_strncpy(
eevee->light_cache_info, IFACE_("Baking light cache"), sizeof(eevee->light_cache_info));
return;
}
char formatted_mem[15];
BLI_str_format_byte_unit(formatted_mem, eevee_lightcache_memsize_get(lcache), true);
int irr_samples = eevee_lightcache_irradiance_sample_count(lcache);
BLI_snprintf(eevee->light_cache_info,
sizeof(eevee->light_cache_info),
IFACE_("%d Ref. Cubemaps, %d Irr. Samples (%s in memory)"),
lcache->cube_len - 1,
irr_samples,
formatted_mem);
}
else {
BLI_strncpy(eevee->light_cache_info,
IFACE_("No light cache in this scene"),
sizeof(eevee->light_cache_info));
}
}
开发者ID:wangyxuan,项目名称:blender,代码行数:29,代码来源:eevee_lightcache.c
示例6: ui_imageuser_layer_menu
static void ui_imageuser_layer_menu(bContext *UNUSED(C), uiLayout *layout, void *rnd_pt)
{
void **rnd_data = rnd_pt;
uiBlock *block = uiLayoutGetBlock(layout);
RenderResult *rr = rnd_data[0];
ImageUser *iuser = rnd_data[1];
RenderLayer *rl;
RenderLayer rl_fake = {NULL};
const char *fake_name;
int nr;
uiBlockSetCurLayout(block, layout);
uiLayoutColumn(layout, false);
uiDefBut(block, LABEL, 0, IFACE_("Layer"),
0, 0, UI_UNIT_X * 5, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
uiItemS(layout);
nr = BLI_countlist(&rr->layers) - 1;
fake_name = ui_imageuser_layer_fake_name(rr);
if (fake_name) {
BLI_strncpy(rl_fake.name, fake_name, sizeof(rl_fake.name));
nr += 1;
}
for (rl = rr->layers.last; rl; rl = rl->prev, nr--) {
final:
uiDefButS(block, BUTM, B_NOP, IFACE_(rl->name), 0, 0,
UI_UNIT_X * 5, UI_UNIT_X, &iuser->layer, (float) nr, 0.0, 0, -1, "");
}
开发者ID:zedd4x,项目名称:bepuik,代码行数:31,代码来源:image_buttons.c
示例7: uiCollada_importSettings
static void uiCollada_importSettings(uiLayout *layout, PointerRNA *imfptr)
{
uiLayout *box, *row;
/* Import Options: */
box = uiLayoutBox(layout);
row = uiLayoutRow(box, false);
uiItemL(row, IFACE_("Import Data Options:"), ICON_MESH_DATA);
row = uiLayoutRow(box, false);
uiItemR(row, imfptr, "import_units", 0, NULL, ICON_NONE);
box = uiLayoutBox(layout);
row = uiLayoutRow(box, false);
uiItemL(row, IFACE_("Armature Options:"), ICON_MESH_DATA);
row = uiLayoutRow(box, false);
uiItemR(row, imfptr, "fix_orientation", 0, NULL, ICON_NONE);
row = uiLayoutRow(box, false);
uiItemR(row, imfptr, "find_chains", 0, NULL, ICON_NONE);
row = uiLayoutRow(box, false);
uiItemR(row, imfptr, "min_chain_length", 0, NULL, ICON_NONE);
}
开发者ID:Bforartists,项目名称:Bforartists,代码行数:25,代码来源:io_collada.c
示例8: graph_panel_driverVar__singleProp
/* settings for 'single property' driver variable type */
static void graph_panel_driverVar__singleProp(uiLayout *layout, ID *id, DriverVar *dvar)
{
DriverTarget *dtar = &dvar->targets[0];
PointerRNA dtar_ptr;
uiLayout *row, *col;
/* initialize RNA pointer to the target */
RNA_pointer_create(id, &RNA_DriverTarget, dtar, &dtar_ptr);
/* Target ID */
row = uiLayoutRow(layout, FALSE);
uiTemplateAnyID(row, &dtar_ptr, "id", "id_type", IFACE_("Prop:"));
/* Target Property */
// TODO: make this less technical...
if (dtar->id) {
PointerRNA root_ptr;
/* get pointer for resolving the property selected */
RNA_id_pointer_create(dtar->id, &root_ptr);
col = uiLayoutColumn(layout, TRUE);
/* rna path */
uiTemplatePathBuilder(col, &dtar_ptr, "data_path", &root_ptr, IFACE_("Path"));
}
}
开发者ID:vanangamudi,项目名称:blender-main,代码行数:27,代码来源:graph_buttons.c
示例9: graph_panel_view
/* Graph Editor View Settings */
static void graph_panel_view(const bContext *C, Panel *pa)
{
bScreen *sc = CTX_wm_screen(C);
SpaceIpo *sipo = CTX_wm_space_graph(C);
Scene *scene = CTX_data_scene(C);
PointerRNA spaceptr, sceneptr;
uiLayout *col, *sub, *row;
/* get RNA pointers for use when creating the UI elements */
RNA_id_pointer_create(&scene->id, &sceneptr);
RNA_pointer_create(&sc->id, &RNA_SpaceGraphEditor, sipo, &spaceptr);
/* 2D-Cursor */
col = uiLayoutColumn(pa->layout, FALSE);
uiItemR(col, &spaceptr, "show_cursor", 0, NULL, ICON_NONE);
sub = uiLayoutColumn(col, TRUE);
uiLayoutSetActive(sub, RNA_boolean_get(&spaceptr, "show_cursor"));
uiItemO(sub, IFACE_("Cursor from Selection"), ICON_NONE, "GRAPH_OT_frame_jump");
sub = uiLayoutColumn(col, TRUE);
uiLayoutSetActive(sub, RNA_boolean_get(&spaceptr, "show_cursor"));
row = uiLayoutSplit(sub, 0.7f, TRUE);
uiItemR(row, &sceneptr, "frame_current", 0, IFACE_("Cursor X"), ICON_NONE);
uiItemEnumO(row, "GRAPH_OT_snap", IFACE_("To Keys"), 0, "type", GRAPHKEYS_SNAP_CFRA);
row = uiLayoutSplit(sub, 0.7f, TRUE);
uiItemR(row, &spaceptr, "cursor_position_y", 0, IFACE_("Cursor Y"), ICON_NONE);
uiItemEnumO(row, "GRAPH_OT_snap", IFACE_("To Keys"), 0, "type", GRAPHKEYS_SNAP_VALUE);
}
开发者ID:vanangamudi,项目名称:blender-main,代码行数:30,代码来源:graph_buttons.c
示例10: WM_window_open_temp
void WM_window_open_temp(bContext *C, rcti *position, int type)
{
wmWindow *win;
ScrArea *sa;
/* changes rect to fit within desktop */
wm_window_check_position(position);
/* test if we have a temp screen already */
for (win = CTX_wm_manager(C)->windows.first; win; win = win->next)
if (win->screen->temp)
break;
/* add new window? */
if (win == NULL) {
win = wm_window_new(C);
win->posx = position->xmin;
win->posy = position->ymin;
}
win->sizex = position->xmax - position->xmin;
win->sizey = position->ymax - position->ymin;
if (win->ghostwin) {
wm_window_set_size(win, win->sizex, win->sizey);
wm_window_raise(win);
}
/* add new screen? */
if (win->screen == NULL)
win->screen = ED_screen_add(win, CTX_data_scene(C), "temp");
win->screen->temp = 1;
/* make window active, and validate/resize */
CTX_wm_window_set(C, win);
WM_check(C);
/* ensure it shows the right spacetype editor */
sa = win->screen->areabase.first;
CTX_wm_area_set(C, sa);
if (type == WM_WINDOW_RENDER) {
ED_area_newspace(C, sa, SPACE_IMAGE);
}
else {
ED_area_newspace(C, sa, SPACE_USERPREF);
}
ED_screen_set(C, win->screen);
if (sa->spacetype == SPACE_IMAGE)
GHOST_SetTitle(win->ghostwin, IFACE_("Blender Render"));
else if (ELEM(sa->spacetype, SPACE_OUTLINER, SPACE_USERPREF))
GHOST_SetTitle(win->ghostwin, IFACE_("Blender User Preferences"));
else if (sa->spacetype == SPACE_FILE)
GHOST_SetTitle(win->ghostwin, IFACE_("Blender File View"));
else
GHOST_SetTitle(win->ghostwin, "Blender");
}
开发者ID:vanangamudi,项目名称:blender-main,代码行数:60,代码来源:wm_window.c
示例11: graph_panel_driverVar__singleProp
/* settings for 'single property' driver variable type */
static void graph_panel_driverVar__singleProp(uiLayout *layout, ID *id, DriverVar *dvar)
{
DriverTarget *dtar = &dvar->targets[0];
PointerRNA dtar_ptr;
uiLayout *row, *col;
/* initialize RNA pointer to the target */
RNA_pointer_create(id, &RNA_DriverTarget, dtar, &dtar_ptr);
/* Target ID */
row = uiLayoutRow(layout, false);
uiLayoutSetRedAlert(row, ((dtar->flag & DTAR_FLAG_INVALID) && !dtar->id));
uiTemplateAnyID(row, &dtar_ptr, "id", "id_type", IFACE_("Prop:"));
/* Target Property */
if (dtar->id) {
PointerRNA root_ptr;
/* get pointer for resolving the property selected */
RNA_id_pointer_create(dtar->id, &root_ptr);
/* rna path */
col = uiLayoutColumn(layout, true);
uiLayoutSetRedAlert(col, (dtar->flag & DTAR_FLAG_INVALID));
uiTemplatePathBuilder(col, &dtar_ptr, "data_path", &root_ptr, IFACE_("Path"));
}
}
开发者ID:SuriyaaKudoIsc,项目名称:blender-git,代码行数:28,代码来源:graph_buttons.c
示例12: graph_panel_driverVar__rotDiff
/* settings for 'rotation difference' driver variable type */
static void graph_panel_driverVar__rotDiff(uiLayout *layout, ID *id, DriverVar *dvar)
{
DriverTarget *dtar = &dvar->targets[0];
DriverTarget *dtar2 = &dvar->targets[1];
Object *ob1 = (Object *)dtar->id;
Object *ob2 = (Object *)dtar2->id;
PointerRNA dtar_ptr, dtar2_ptr;
uiLayout *col;
/* initialize RNA pointer to the target */
RNA_pointer_create(id, &RNA_DriverTarget, dtar, &dtar_ptr);
RNA_pointer_create(id, &RNA_DriverTarget, dtar2, &dtar2_ptr);
/* Bone 1 */
col = uiLayoutColumn(layout, TRUE);
uiTemplateAnyID(col, &dtar_ptr, "id", "id_type", IFACE_("Bone 1:"));
if (dtar->id && ob1->pose) {
PointerRNA tar_ptr;
RNA_pointer_create(dtar->id, &RNA_Pose, ob1->pose, &tar_ptr);
uiItemPointerR(col, &dtar_ptr, "bone_target", &tar_ptr, "bones", "", ICON_BONE_DATA);
}
col = uiLayoutColumn(layout, TRUE);
uiTemplateAnyID(col, &dtar2_ptr, "id", "id_type", IFACE_("Bone 2:"));
if (dtar2->id && ob2->pose) {
PointerRNA tar_ptr;
RNA_pointer_create(dtar2->id, &RNA_Pose, ob2->pose, &tar_ptr);
uiItemPointerR(col, &dtar2_ptr, "bone_target", &tar_ptr, "bones", "", ICON_BONE_DATA);
}
}
开发者ID:vanangamudi,项目名称:blender-main,代码行数:35,代码来源:graph_buttons.c
示例13: ui_node_sock_name
static void ui_node_sock_name(bNodeSocket *sock, char name[UI_MAX_NAME_STR])
{
if (sock->link && sock->link->fromnode) {
bNode *node = sock->link->fromnode;
char node_name[UI_MAX_NAME_STR];
if (node->type == NODE_GROUP) {
if (node->id)
BLI_strncpy(node_name, node->id->name + 2, UI_MAX_NAME_STR);
else
BLI_strncpy(node_name, N_(node->typeinfo->ui_name), UI_MAX_NAME_STR);
}
else
BLI_strncpy(node_name, node->typeinfo->ui_name, UI_MAX_NAME_STR);
if (BLI_listbase_is_empty(&node->inputs) &&
node->outputs.first != node->outputs.last)
{
BLI_snprintf(name, UI_MAX_NAME_STR, "%s | %s", IFACE_(node_name), IFACE_(sock->link->fromsock->name));
}
else {
BLI_strncpy(name, IFACE_(node_name), UI_MAX_NAME_STR);
}
}
else if (sock->type == SOCK_SHADER)
BLI_strncpy(name, IFACE_("None"), UI_MAX_NAME_STR);
else
BLI_strncpy(name, IFACE_("Default"), UI_MAX_NAME_STR);
}
开发者ID:JasonWilkins,项目名称:blender-viewport_fx,代码行数:29,代码来源:node_templates.c
示例14: graph_panel_driverVar__transChan
/* settings for 'transform channel' driver variable type */
static void graph_panel_driverVar__transChan(uiLayout *layout, ID *id, DriverVar *dvar)
{
DriverTarget *dtar = &dvar->targets[0];
Object *ob = (Object *)dtar->id;
PointerRNA dtar_ptr;
uiLayout *col, *sub;
/* initialize RNA pointer to the target */
RNA_pointer_create(id, &RNA_DriverTarget, dtar, &dtar_ptr);
/* properties */
col = uiLayoutColumn(layout, TRUE);
uiTemplateAnyID(col, &dtar_ptr, "id", "id_type", IFACE_("Ob/Bone:"));
if (dtar->id && ob->pose) {
PointerRNA tar_ptr;
RNA_pointer_create(dtar->id, &RNA_Pose, ob->pose, &tar_ptr);
uiItemPointerR(col, &dtar_ptr, "bone_target", &tar_ptr, "bones", "", ICON_BONE_DATA);
}
sub = uiLayoutColumn(layout, TRUE);
uiItemR(sub, &dtar_ptr, "transform_type", 0, NULL, ICON_NONE);
uiItemR(sub, &dtar_ptr, "transform_space", 0, IFACE_("Space"), ICON_NONE);
}
开发者ID:vanangamudi,项目名称:blender-main,代码行数:26,代码来源:graph_buttons.c
示例15: node_add_menu
static void node_add_menu(bContext *C, uiLayout *layout, void *arg_nodeclass)
{
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
SpaceNode *snode = CTX_wm_space_node(C);
bNodeTree *ntree;
int nodeclass = GET_INT_FROM_POINTER(arg_nodeclass);
int event, compatibility = 0;
ntree = snode->nodetree;
if (!ntree) {
uiItemS(layout);
return;
}
if (ntree->type == NTREE_SHADER) {
if (BKE_scene_use_new_shading_nodes(scene))
compatibility = NODE_NEW_SHADING;
else
compatibility = NODE_OLD_SHADING;
}
if (nodeclass == NODE_CLASS_GROUP) {
bNodeTree *ngroup;
uiLayoutSetFunc(layout, do_node_add_group, NULL);
/* XXX hack: negative numbers used for empty group types */
if (node_tree_has_type(ntree->type, NODE_GROUP))
uiItemV(layout, IFACE_("New Group"), 0, -NODE_GROUP);
uiItemS(layout);
for (ngroup = bmain->nodetree.first, event = 0; ngroup; ngroup = ngroup->id.next, ++event) {
/* only use group trees */
if (ngroup->type == ntree->type && ngroup->nodetype == NODE_GROUP) {
uiItemV(layout, ngroup->id.name + 2, 0, event);
}
}
}
else {
bNodeType *ntype;
uiLayoutSetFunc(layout, do_node_add_static, NULL);
for (ntype = ntreeGetType(ntree->type)->node_types.first; ntype; ntype = ntype->next) {
if (ntype->nclass == nodeclass && ntype->name) {
if (!compatibility || (ntype->compatibility & compatibility)) {
uiItemV(layout, IFACE_(ntype->name), 0, ntype->type);
}
}
}
}
}
开发者ID:danielmarg,项目名称:blender-main,代码行数:54,代码来源:node_header.c
示例16: IFACE_
static const char *ui_imageuser_layer_fake_name(RenderResult *rr)
{
if (rr->rectf) {
return IFACE_("Composite");
}
else if (rr->rect32) {
return IFACE_("Sequence");
}
else {
return NULL;
}
}
开发者ID:zedd4x,项目名称:bepuik,代码行数:12,代码来源:image_buttons.c
示例17: setNearestAxis2d
static void setNearestAxis2d(TransInfo *t)
{
/* no correction needed... just use whichever one is lower */
if (abs(t->mval[0] - t->con.imval[0]) < abs(t->mval[1] - t->con.imval[1])) {
t->con.mode |= CON_AXIS1;
BLI_strncpy(t->con.text, IFACE_(" along Y axis"), sizeof(t->con.text));
}
else {
t->con.mode |= CON_AXIS0;
BLI_strncpy(t->con.text, IFACE_(" along X axis"), sizeof(t->con.text));
}
}
开发者ID:GeniaPenksik,项目名称:blender,代码行数:12,代码来源:transform_constraints.c
示例18: RE_RenderViewGetById
static const char *ui_imageuser_layer_fake_name(RenderResult *rr)
{
RenderView *rv = RE_RenderViewGetById(rr, 0);
if (rv->rectf) {
return IFACE_("Composite");
}
else if (rv->rect32) {
return IFACE_("Sequence");
}
else {
return NULL;
}
}
开发者ID:bitfusionio,项目名称:blender,代码行数:13,代码来源:image_buttons.c
示例19: node_tree_interface_panel
static void node_tree_interface_panel(const bContext *C, Panel *pa)
{
SpaceNode *snode = CTX_wm_space_node(C);
bNodeTree *ntree = (snode) ? snode->edittree : NULL;
bNodeSocket *sock;
int in_out;
uiLayout *layout = pa->layout, *row, *split, *col;
PointerRNA ptr, sockptr, opptr;
if (!ntree)
return;
RNA_id_pointer_create((ID *)ntree, &ptr);
node_tree_find_active_socket(ntree, &sock, &in_out);
RNA_pointer_create((ID *)ntree, &RNA_NodeSocketInterface, sock, &sockptr);
row = uiLayoutRow(layout, false);
split = uiLayoutRow(row, true);
col = uiLayoutColumn(split, true);
uiItemL(col, IFACE_("Inputs:"), ICON_NONE);
uiTemplateList(col, (bContext *)C, "NODE_UL_interface_sockets", "inputs", &ptr, "inputs", &ptr, "active_input",
NULL, 0, 0, 0, 0);
opptr = uiItemFullO(col, "NODE_OT_tree_socket_add", "", ICON_PLUS, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS);
RNA_enum_set(&opptr, "in_out", SOCK_IN);
col = uiLayoutColumn(split, true);
uiItemL(col, IFACE_("Outputs:"), ICON_NONE);
uiTemplateList(col, (bContext *)C, "NODE_UL_interface_sockets", "outputs", &ptr, "outputs", &ptr, "active_output",
NULL, 0, 0, 0, 0);
opptr = uiItemFullO(col, "NODE_OT_tree_socket_add", "", ICON_PLUS, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS);
RNA_enum_set(&opptr, "in_out", SOCK_OUT);
col = uiLayoutColumn(row, true);
opptr = uiItemFullO(col, "NODE_OT_tree_socket_move", "", ICON_TRIA_UP, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS);
RNA_enum_set(&opptr, "direction", 1);
opptr = uiItemFullO(col, "NODE_OT_tree_socket_move", "", ICON_TRIA_DOWN, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS);
RNA_enum_set(&opptr, "direction", 2);
if (sock) {
row = uiLayoutRow(layout, true);
uiItemR(row, &sockptr, "name", 0, NULL, ICON_NONE);
uiItemO(row, "", ICON_X, "NODE_OT_tree_socket_remove");
if (sock->typeinfo->interface_draw) {
uiItemS(layout);
sock->typeinfo->interface_draw((bContext *)C, layout, &sockptr);
}
}
}
开发者ID:Andrewson3D,项目名称:blender-for-vray,代码行数:51,代码来源:node_buttons.c
示例20: MEM_callocN
static char *slot_menu(void)
{
char *str;
int a, slot;
str = MEM_callocN(IMA_MAX_RENDER_SLOT * 32, "menu slots");
strcpy(str, IFACE_("Slot %t"));
a = strlen(str);
for (slot = 0; slot < IMA_MAX_RENDER_SLOT; slot++)
a += sprintf(str + a, IFACE_("|Slot %d %%x%d"), slot + 1, slot);
return str;
}
开发者ID:Eibriel,项目名称:kiriblender,代码行数:15,代码来源:image_buttons.c
注:本文中的IFACE_函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论