您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ uiItemL函数代码示例

51自学网 2021-06-03 09:06:48
  C++
这篇教程C++ uiItemL函数代码示例写得很实用,希望能帮到您。

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

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


示例2: 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,


示例3: nla_panel_animdata

/* active AnimData */static void nla_panel_animdata(const bContext *C, Panel *pa){	PointerRNA adt_ptr;	/* AnimData *adt; */	uiLayout *layout = pa->layout;	uiLayout *row;	uiBlock *block;		/* check context and also validity of pointer */	if (!nla_panel_context(C, &adt_ptr, NULL, NULL))		return;	/* adt = adt_ptr.data; */		block = uiLayoutGetBlock(layout);	UI_block_func_handle_set(block, do_nla_region_buttons, NULL);		/* AnimData Source Properties ----------------------------------- */		/* icon + id-block name of block where AnimData came from to prevent 	 * accidentally changing the properties of the wrong action	 */	if (adt_ptr.id.data) {		ID *id = adt_ptr.id.data;		PointerRNA id_ptr;				RNA_id_pointer_create(id, &id_ptr);				/* ID-block name > AnimData */		row = uiLayoutRow(layout, true);		uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_LEFT);				uiItemL(row, id->name + 2, RNA_struct_ui_icon(id_ptr.type));  /* id-block (src) */		uiItemL(row, "", VICO_SMALL_TRI_RIGHT_VEC);                   /* expander */		uiItemL(row, IFACE_("Animation Data"), ICON_ANIM_DATA);       /* animdata */				uiItemS(layout);	}		/* Active Action Properties ------------------------------------- */	/* action */	row = uiLayoutRow(layout, true);	uiTemplateID(	        row, (bContext *)C, &adt_ptr, "action",	        "ACTION_OT_new", NULL, "NLA_OT_action_unlink", UI_TEMPLATE_ID_FILTER_ALL);		/* extrapolation */	row = uiLayoutRow(layout, true);	uiItemR(row, &adt_ptr, "action_extrapolation", 0, NULL, ICON_NONE);		/* blending */	row = uiLayoutRow(layout, true);	uiItemR(row, &adt_ptr, "action_blend_type", 0, NULL, ICON_NONE);			/* influence */	row = uiLayoutRow(layout, true);	uiItemR(row, &adt_ptr, "action_influence", 0, NULL, ICON_NONE);}
开发者ID:mgschwan,项目名称:blensor,代码行数:59,


示例4: graph_panel_key_properties

static void graph_panel_key_properties(const bContext *C, Panel *pa){	bAnimListElem *ale;	FCurve *fcu;	BezTriple *bezt, *prevbezt;		uiLayout *layout = pa->layout;	uiLayout *col;	uiBlock *block;	if (!graph_panel_context(C, &ale, &fcu))		return;		block = uiLayoutGetBlock(layout);	uiBlockSetHandleFunc(block, do_graph_region_buttons, NULL);		/* only show this info if there are keyframes to edit */	if (get_active_fcurve_keyframe_edit(fcu, &bezt, &prevbezt)) {		PointerRNA bezt_ptr;				/* RNA pointer to keyframe, to allow editing */		RNA_pointer_create(ale->id, &RNA_Keyframe, bezt, &bezt_ptr);				/* interpolation */		col= uiLayoutColumn(layout, 0);			uiItemR(col, &bezt_ptr, "interpolation", 0, NULL, ICON_NONE);					/* numerical coordinate editing */		col= uiLayoutColumn(layout, 1);			/* keyframe itself */			uiItemR(col, &bezt_ptr, "co", 0, "Key", ICON_NONE);						/* previous handle - only if previous was Bezier interpolation */			if ((prevbezt) && (prevbezt->ipo == BEZT_IPO_BEZ))				uiItemR(col, &bezt_ptr, "handle_left", 0, NULL, ICON_NONE);						/* next handle - only if current is Bezier interpolation */			if (bezt->ipo == BEZT_IPO_BEZ)				uiItemR(col, &bezt_ptr, "handle_right", 0, NULL, ICON_NONE);	}	else {		if ((fcu->bezt == NULL) && (fcu->modifiers.first)) {			/* modifiers only - so no keyframes to be active */			uiItemL(layout, "F-Curve only has F-Modifiers", ICON_NONE);			uiItemL(layout, "See Modifiers panel below", ICON_INFO);		}		else if (fcu->fpt) {			/* samples only */			uiItemL(layout, "F-Curve doesn't have any keyframes as it only contains sampled points", ICON_NONE);		}		else			uiItemL(layout, "No active keyframe on F-Curve", ICON_NONE);	}		MEM_freeN(ale);}
开发者ID:OldBrunet,项目名称:BGERTPS,代码行数:56,


示例5: uiDefAutoButsRNA

/** * /a check_prop callback filters functions to avoid drawing certain properties, * in cases where PROP_HIDDEN flag can't be used for a property. */int uiDefAutoButsRNA(uiLayout *layout, PointerRNA *ptr,                     int (*check_prop)(PointerRNA *, PropertyRNA *),                     const char label_align){	uiLayout *split, *col;	int flag;	const char *name;	int tot = 0;	assert(ELEM3(label_align, '/0', 'H', 'V'));	RNA_STRUCT_BEGIN (ptr, prop)	{		flag = RNA_property_flag(prop);		if (flag & PROP_HIDDEN || (check_prop && check_prop(ptr, prop) == FALSE))			continue;		if (label_align != '/0') {			PropertyType type = RNA_property_type(prop);			int is_boolean = (type == PROP_BOOLEAN && !RNA_property_array_check(prop));			name = RNA_property_ui_name(prop);			if (label_align == 'V') {				col = uiLayoutColumn(layout, TRUE);				if (!is_boolean)					uiItemL(col, name, ICON_NONE);			}			else if (label_align == 'H') {				split = uiLayoutSplit(layout, 0.5f, FALSE);				col = uiLayoutColumn(split, FALSE);				uiItemL(col, (is_boolean) ? "" : name, ICON_NONE);				col = uiLayoutColumn(split, FALSE);			}			else {				col = NULL;			}			/* may meed to add more cases here.			 * don't override enum flag names */			/* name is shown above, empty name for button below */			name = (flag & PROP_ENUM_FLAG || is_boolean) ? NULL : "";		}		else {			col = layout;			name = NULL; /* no smart label alignment, show default name with button */		}		uiItemFullR(col, ptr, prop, -1, 0, 0, name, ICON_NONE);		tot++;	}
开发者ID:vanangamudi,项目名称:blender-main,代码行数:58,


示例6: 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,


示例7: buttons_context_draw

void buttons_context_draw(const bContext *C, uiLayout *layout){	SpaceButs *sbuts = CTX_wm_space_buts(C);	ButsContextPath *path = sbuts->path;	uiLayout *row;	uiBlock *block;	uiBut *but;	PointerRNA *ptr;	char namebuf[128], *name;	int a, icon;	if (!path)		return;	row = uiLayoutRow(layout, true);	uiLayoutSetAlignment(row, UI_LAYOUT_ALIGN_LEFT);	block = uiLayoutGetBlock(row);	UI_block_emboss_set(block, UI_EMBOSS_NONE);	but = uiDefIconButBitC(block, UI_BTYPE_ICON_TOGGLE, SB_PIN_CONTEXT, 0, ICON_UNPINNED, 0, 0, UI_UNIT_X, UI_UNIT_Y, &sbuts->flag,	                       0, 0, 0, 0, TIP_("Follow context or keep fixed datablock displayed"));	UI_but_flag_disable(but, UI_BUT_UNDO); /* skip undo on screen buttons */	UI_but_func_set(but, pin_cb, NULL, NULL);	for (a = 0; a < path->len; a++) {		ptr = &path->ptr[a];		if (a != 0)			uiItemL(row, "", VICO_SMALL_TRI_RIGHT_VEC);		if (ptr->data) {			icon = RNA_struct_ui_icon(ptr->type);			name = RNA_struct_name_get_alloc(ptr, namebuf, sizeof(namebuf), NULL);			if (name) {				if (!ELEM(sbuts->mainb, BCONTEXT_RENDER, BCONTEXT_SCENE, BCONTEXT_RENDER_LAYER) && ptr->type == &RNA_Scene)					uiItemLDrag(row, ptr, "", icon);  /* save some space */				else					uiItemLDrag(row, ptr, name, icon);				if (name != namebuf)					MEM_freeN(name);			}			else				uiItemL(row, "", icon);		}	}}
开发者ID:DarkDefender,项目名称:blender-npr-tess2,代码行数:48,


示例8: template_texture_user_menu

static void template_texture_user_menu(bContext *C, uiLayout *layout, void *UNUSED(arg)){	/* callback when opening texture user selection menu, to create buttons. */	SpaceButs *sbuts = CTX_wm_space_buts(C);	ButsContextTexture *ct= (sbuts)? sbuts->texuser: NULL;	ButsTextureUser *user;	uiBlock *block = uiLayoutGetBlock(layout);	const char *last_category = NULL;	for(user=ct->users.first; user; user=user->next) {		uiBut *but;		char name[UI_MAX_NAME_STR];		/* add label per category */		if(!last_category || strcmp(last_category, user->category) != 0) {			uiItemL(layout, user->category, ICON_NONE);			but= block->buttons.last;			but->flag= UI_TEXT_LEFT;		}		/* create button */		BLI_snprintf(name, UI_MAX_NAME_STR, "  %s", user->name);		but = uiDefIconTextBut(block, BUT, 0, user->icon, name, 0, 0, UI_UNIT_X*4, UI_UNIT_Y,			NULL, 0.0, 0.0, 0.0, 0.0, "");		uiButSetNFunc(but, template_texture_select, MEM_dupallocN(user), NULL);		last_category = user->category;	}}
开发者ID:mik0001,项目名称:Blender,代码行数:30,


示例9: uiblock_layer_pass_arrow_buttons

static void uiblock_layer_pass_arrow_buttons(uiLayout *layout, RenderResult *rr, ImageUser *iuser, short *render_slot){	uiBlock *block = uiLayoutGetBlock(layout);	uiLayout *row;	uiBut *but;	const float dpi_fac = UI_DPI_FAC;		row = uiLayoutRow(layout, TRUE);	if (rr == NULL || iuser == NULL)		return;	if (rr->layers.first == NULL) {		uiItemL(row, IFACE_("No Layers in Render Result"), ICON_NONE);		return;	}	/* decrease, increase arrows */	but = uiDefIconBut(block, BUT, 0, ICON_TRIA_LEFT,   0, 0, 0.85f * UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, TIP_("Previous Layer"));	uiButSetFunc(but, image_multi_declay_cb, rr, iuser);	but = uiDefIconBut(block, BUT, 0, ICON_TRIA_RIGHT,  0, 0, 0.90f * UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, TIP_("Next Layer"));	uiButSetFunc(but, image_multi_inclay_cb, rr, iuser);	uiblock_layer_pass_buttons(row, rr, iuser, 230 * dpi_fac, render_slot);	/* decrease, increase arrows */	but = uiDefIconBut(block, BUT, 0, ICON_TRIA_LEFT,   0, 0, 0.85f * UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, TIP_("Previous Pass"));	uiButSetFunc(but, image_multi_decpass_cb, rr, iuser);	but = uiDefIconBut(block, BUT, 0, ICON_TRIA_RIGHT,  0, 0, 0.90f * UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, TIP_("Next Pass"));	uiButSetFunc(but, image_multi_incpass_cb, rr, iuser);	uiBlockEndAlign(block);}
开发者ID:Eibriel,项目名称:kiriblender,代码行数:32,


示例10: graph_panel_properties

static void graph_panel_properties(const bContext *C, Panel *pa){	bAnimListElem *ale;	FCurve *fcu;	PointerRNA fcu_ptr;	uiLayout *layout = pa->layout;	uiLayout *col, *row, *sub;	// uiBlock *block;  // UNUSED	char name[256];	int icon = 0;	if (!graph_panel_context(C, &ale, &fcu))		return;		// UNUSED	// block = uiLayoutGetBlock(layout);	// uiBlockSetHandleFunc(block, do_graph_region_buttons, NULL);		/* F-Curve pointer */	RNA_pointer_create(ale->id, &RNA_FCurve, fcu, &fcu_ptr);		/* user-friendly 'name' for F-Curve */	/* TODO: only show the path if this is invalid? */	col = uiLayoutColumn(layout, false);	icon = getname_anim_fcurve(name, ale->id, fcu);	uiItemL(col, name, icon);			/* RNA-Path Editing - only really should be enabled when things aren't working */	col = uiLayoutColumn(layout, true);	uiLayoutSetEnabled(col, (fcu->flag & FCURVE_DISABLED) != 0);	uiItemR(col, &fcu_ptr, "data_path", 0, "", ICON_RNA);	uiItemR(col, &fcu_ptr, "array_index", 0, NULL, ICON_NONE);			/* color settings */	col = uiLayoutColumn(layout, true);	uiItemL(col, IFACE_("Display Color:"), ICON_NONE);			row = uiLayoutRow(col, true);	uiItemR(row, &fcu_ptr, "color_mode", 0, "", ICON_NONE);				sub = uiLayoutRow(row, true);	uiLayoutSetEnabled(sub, (fcu->color_mode == FCURVE_COLOR_CUSTOM));	uiItemR(sub, &fcu_ptr, "color", 0, "", ICON_NONE);		MEM_freeN(ale);}
开发者ID:SuriyaaKudoIsc,项目名称:blender-git,代码行数:46,


示例11: template_texture_user_menu

static void template_texture_user_menu(bContext *C, uiLayout *layout, void *UNUSED(arg)){  /* callback when opening texture user selection menu, to create buttons. */  SpaceProperties *sbuts = CTX_wm_space_properties(C);  ButsContextTexture *ct = sbuts->texuser;  ButsTextureUser *user;  uiBlock *block = uiLayoutGetBlock(layout);  const char *last_category = NULL;  for (user = ct->users.first; user; user = user->next) {    uiBut *but;    char name[UI_MAX_NAME_STR];    /* add label per category */    if (!last_category || !STREQ(last_category, user->category)) {      uiItemL(layout, IFACE_(user->category), ICON_NONE);      but = block->buttons.last;      but->drawflag = UI_BUT_TEXT_LEFT;    }    /* create button */    if (user->prop) {      PointerRNA texptr = RNA_property_pointer_get(&user->ptr, user->prop);      Tex *tex = texptr.data;      if (tex) {        BLI_snprintf(name, UI_MAX_NAME_STR, "  %s - %s", user->name, tex->id.name + 2);      }      else {        BLI_snprintf(name, UI_MAX_NAME_STR, "  %s", user->name);      }    }    else {      BLI_snprintf(name, UI_MAX_NAME_STR, "  %s", user->name);    }    but = uiDefIconTextBut(block,                           UI_BTYPE_BUT,                           0,                           user->icon,                           name,                           0,                           0,                           UI_UNIT_X * 4,                           UI_UNIT_Y,                           NULL,                           0.0,                           0.0,                           0.0,                           0.0,                           "");    UI_but_funcN_set(but, template_texture_select, MEM_dupallocN(user), NULL);    last_category = user->category;  }  UI_block_flag_enable(block, UI_BLOCK_NO_FLIP);}
开发者ID:dfelinto,项目名称:blender,代码行数:58,


示例12: driver_dvar_invalid_name_query_cb

/* callback to report why a driver variable is invalid */static void driver_dvar_invalid_name_query_cb(bContext *C, void *dvar_v, void *UNUSED(arg)){	uiPopupMenu *pup = UI_popup_menu_begin(C, CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Invalid Variable Name"), ICON_NONE);	uiLayout *layout = UI_popup_menu_layout(pup);		DriverVar *dvar = (DriverVar *)dvar_v;		if (dvar->flag & DVAR_FLAG_INVALID_EMPTY) {		uiItemL(layout, "It cannot be left blank", ICON_ERROR);	}	if (dvar->flag & DVAR_FLAG_INVALID_START_NUM) {		uiItemL(layout, "It cannot start with a number", ICON_ERROR);	}	if (dvar->flag & DVAR_FLAG_INVALID_START_CHAR) {		uiItemL(layout, 		        "It cannot start with a special character,"		        " including '$', '@', '!', '~', '+', '-', '_', '.', or ' '",		        ICON_NONE);	}	if (dvar->flag & DVAR_FLAG_INVALID_HAS_SPACE) {		uiItemL(layout, "It cannot contain spaces (e.g. 'a space')", ICON_ERROR);	}	if (dvar->flag & DVAR_FLAG_INVALID_HAS_DOT) {		uiItemL(layout, "It cannot contain dots (e.g. 'a.dot')", ICON_ERROR);	}	if (dvar->flag & DVAR_FLAG_INVALID_HAS_SPECIAL) {		uiItemL(layout, "It cannot contain special (non-alphabetical/numeric) characters", ICON_ERROR);	}	if (dvar->flag & DVAR_FLAG_INVALID_PY_KEYWORD) {		uiItemL(layout, "It cannot be a reserved keyword in Python", ICON_INFO);	}		UI_popup_menu_end(C, pup);}
开发者ID:diekev,项目名称:blender,代码行数:35,


示例13: draw_modifier__envelope

/* draw settings for envelope modifier */static void draw_modifier__envelope(uiLayout *layout, ID *id, FModifier *fcm, short UNUSED(width)){	FMod_Envelope *env = (FMod_Envelope *)fcm->data;	FCM_EnvelopeData *fed;	uiLayout *col, *row;	uiBlock *block;	uiBut *but;	PointerRNA ptr;	int i;		/* init the RNA-pointer */	RNA_pointer_create(id, &RNA_FModifierEnvelope, fcm, &ptr);		/* general settings */	col = uiLayoutColumn(layout, TRUE);	uiItemL(col, IFACE_("Envelope:"), ICON_NONE);	uiItemR(col, &ptr, "reference_value", 0, NULL, ICON_NONE);	row = uiLayoutRow(col, TRUE);	uiItemR(row, &ptr, "default_min", 0, IFACE_("Min"), ICON_NONE);	uiItemR(row, &ptr, "default_max", 0, IFACE_("Max"), ICON_NONE);	/* control points header */	/* TODO: move this control-point control stuff to using the new special widgets for lists	 * the current way is far too cramped */	row = uiLayoutRow(layout, FALSE);	block = uiLayoutGetBlock(row);			uiDefBut(block, LABEL, 1, IFACE_("Control Points:"), 0, 0, 7.5 * UI_UNIT_X, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");			but = uiDefBut(block, BUT, B_FMODIFIER_REDRAW, IFACE_("Add Point"), 0, 0, 7.5 * UI_UNIT_X, UI_UNIT_Y,	               NULL, 0, 0, 0, 0, TIP_("Add a new control-point to the envelope on the current frame"));	uiButSetFunc(but, fmod_envelope_addpoint_cb, env, NULL);			/* control points list */	for (i = 0, fed = env->data; i < env->totvert; i++, fed++) {		/* get a new row to operate on */		row = uiLayoutRow(layout, TRUE);		block = uiLayoutGetBlock(row);				uiBlockBeginAlign(block);		but = uiDefButF(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Fra:"), 0, 0, 4.5 * UI_UNIT_X, UI_UNIT_Y,		                &fed->time, -MAXFRAMEF, MAXFRAMEF, 10, 1, TIP_("Frame that envelope point occurs"));		uiButSetFunc(but, validate_fmodifier_cb, fcm, NULL);					uiDefButF(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Min:"), 0, 0, 5 * UI_UNIT_X, UI_UNIT_Y,		          &fed->min, -UI_FLT_MAX, UI_FLT_MAX, 10, 2, TIP_("Minimum bound of envelope at this point"));		uiDefButF(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Max:"), 0, 0, 5 * UI_UNIT_X, UI_UNIT_Y,		          &fed->max, -UI_FLT_MAX, UI_FLT_MAX, 10, 2, TIP_("Maximum bound of envelope at this point"));		but = uiDefIconBut(block, BUT, B_FMODIFIER_REDRAW, ICON_X, 0, 0, 0.9 * UI_UNIT_X, UI_UNIT_Y,		                   NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Delete envelope control point"));		uiButSetFunc(but, fmod_envelope_deletepoint_cb, env, SET_INT_IN_POINTER(i));		uiBlockBeginAlign(block);	}}
开发者ID:Eibriel,项目名称:kiriblender,代码行数:57,


示例14: rna_uiItemL

static void rna_uiItemL(uiLayout *layout, const char *name, const char *text_ctxt, int translate,                        int icon, int icon_value){	/* Get translated name (label). */	name = rna_translate_ui_text(name, text_ctxt, NULL, NULL, translate);	if (icon_value && !icon) {		icon = icon_value;	}	uiItemL(layout, name, icon);}
开发者ID:flair2005,项目名称:mechanical-blender,代码行数:12,


示例15: view3d_panel_operator_redo_operator

static void view3d_panel_operator_redo_operator(const bContext *C, Panel *pa, wmOperator *op){	if (op->type->flag & OPTYPE_MACRO) {		for (op = op->macro.first; op; op = op->next) {			uiItemL(pa->layout, RNA_struct_ui_name(op->type->srna), ICON_NONE);			view3d_panel_operator_redo_operator(C, pa, op);		}	}	else {		view3d_panel_operator_redo_buts(C, pa, op);	}}
开发者ID:Andrewson3D,项目名称:blender-for-vray,代码行数:12,


示例16: ui_alembic_import_settings

static void ui_alembic_import_settings(uiLayout *layout, PointerRNA *imfptr){	uiLayout *box = uiLayoutBox(layout);	uiLayout *row = uiLayoutRow(box, false);	uiItemL(row, IFACE_("Manual Transform:"), ICON_NONE);	row = uiLayoutRow(box, false);	uiItemR(row, imfptr, "scale", 0, NULL, ICON_NONE);	box = uiLayoutBox(layout);	row = uiLayoutRow(box, false);	uiItemL(row, IFACE_("Options:"), ICON_NONE);	row = uiLayoutRow(box, false);	uiItemR(row, imfptr, "set_frame_range", 0, NULL, ICON_NONE);	row = uiLayoutRow(box, false);	uiItemR(row, imfptr, "is_sequence", 0, NULL, ICON_NONE);	row = uiLayoutRow(box, false);	uiItemR(row, imfptr, "validate_meshes", 0, NULL, ICON_NONE);}
开发者ID:wisaac407,项目名称:blender,代码行数:22,


示例17: file_panel_bookmarks

static void file_panel_bookmarks(const bContext *C, Panel *pa){	SpaceFile *sfile= CTX_wm_space_file(C);	uiLayout *row;	if(sfile) {		row= uiLayoutRow(pa->layout, 0);		uiItemO(row, UI_translate_do_iface(N_("Add")), ICON_ZOOMIN, "file.bookmark_add");		uiItemL(row, NULL, ICON_NONE);		file_panel_category(C, pa, FS_CATEGORY_BOOKMARKS, &sfile->bookmarknr, ICON_BOOKMARKS, 1, 0);	}}
开发者ID:BHCLL,项目名称:blendocv,代码行数:13,


示例18: nla_panel_actclip

/* action-clip only settings for active NLA-Strip */static void nla_panel_actclip(const bContext *C, Panel *pa){	PointerRNA strip_ptr;	uiLayout *layout = pa->layout;	uiLayout *column, *row;	uiBlock *block;	/* check context and also validity of pointer */	if (!nla_panel_context(C, NULL, NULL, &strip_ptr))		return;		block = uiLayoutGetBlock(layout);	UI_block_func_handle_set(block, do_nla_region_buttons, NULL);			/* Strip Properties ------------------------------------- */	/* action pointer */	row = uiLayoutRow(layout, true);	uiItemR(row, &strip_ptr, "action", 0, NULL, ICON_ACTION);			/* action extents */	// XXX custom names were used here (to avoid the prefixes)... probably not necessary in future?	column = uiLayoutColumn(layout, true);	uiItemL(column, IFACE_("Action Extents:"), ICON_NONE);	uiItemR(column, &strip_ptr, "action_frame_start", 0, IFACE_("Start Frame"), ICON_NONE);	uiItemR(column, &strip_ptr, "action_frame_end", 0, IFACE_("End Frame"), ICON_NONE);		// XXX: this layout may actually be too abstract and confusing, and may be better using standard column layout	row = uiLayoutRow(layout, false);	uiItemR(row, &strip_ptr, "use_sync_length", 0, IFACE_("Sync Length"), ICON_NONE);	uiItemO(row, IFACE_("Now"), ICON_FILE_REFRESH, "NLA_OT_action_sync_length");			/* action usage */	column = uiLayoutColumn(layout, true);	uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_time") == false);	uiItemL(column, IFACE_("Playback Settings:"), ICON_NONE);	uiItemR(column, &strip_ptr, "scale", 0, NULL, ICON_NONE);	uiItemR(column, &strip_ptr, "repeat", 0, NULL, ICON_NONE);}
开发者ID:mgschwan,项目名称:blensor,代码行数:39,


示例19: uiTemplateTextureUser

void uiTemplateTextureUser(uiLayout *layout, bContext *C){  /* texture user selection dropdown menu. the available users have been   * gathered before drawing in ButsContextTexture, we merely need to   * display the current item. */  SpaceProperties *sbuts = CTX_wm_space_properties(C);  ButsContextTexture *ct = (sbuts) ? sbuts->texuser : NULL;  uiBlock *block = uiLayoutGetBlock(layout);  uiBut *but;  ButsTextureUser *user;  char name[UI_MAX_NAME_STR];  if (!ct) {    return;  }  /* get current user */  user = ct->user;  if (!user) {    uiItemL(layout, IFACE_("No textures in context"), ICON_NONE);    return;  }  /* create button */  BLI_strncpy(name, user->name, UI_MAX_NAME_STR);  if (user->icon) {    but = uiDefIconTextMenuBut(block,                               template_texture_user_menu,                               NULL,                               user->icon,                               name,                               0,                               0,                               UI_UNIT_X * 4,                               UI_UNIT_Y,                               "");  }  else {    but = uiDefMenuBut(        block, template_texture_user_menu, NULL, name, 0, 0, UI_UNIT_X * 4, UI_UNIT_Y, "");  }  /* some cosmetic tweaks */  UI_but_type_set_menu_from_pulldown(but);  but->flag &= ~UI_BUT_ICON_SUBMENU;}
开发者ID:dfelinto,项目名称:blender,代码行数:49,


示例20: file_panel_recent

static void file_panel_recent(const bContext *C, Panel *pa){	SpaceFile *sfile = CTX_wm_space_file(C);	uiLayout *row;	if (sfile) {		if (!(U.uiflag & USER_HIDE_RECENT) ) {			row = uiLayoutRow(pa->layout, FALSE);			uiItemO(row, IFACE_("Reset"), ICON_X, "file.reset_recent");			uiItemL(row, NULL, ICON_NONE);			file_panel_category(C, pa, FS_CATEGORY_RECENT, &sfile->recentnr, ICON_FILE_FOLDER, 0);		}	}}
开发者ID:diosney,项目名称:blender,代码行数:15,


示例21: ui_template_node_link_menu

static void ui_template_node_link_menu(bContext *C, uiLayout *layout, void *but_p){	Main *bmain = CTX_data_main(C);	Scene *scene = CTX_data_scene(C);	uiBlock *block = uiLayoutGetBlock(layout);	uiBut *but = (uiBut *)but_p;	uiLayout *split, *column;	NodeLinkArg *arg = (NodeLinkArg *)but->func_argN;	bNodeSocket *sock = arg->sock;	bNodeTreeType *ntreetype = arg->ntree->typeinfo;	UI_block_flag_enable(block, UI_BLOCK_NO_FLIP);	UI_block_layout_set_current(block, layout);	split = uiLayoutSplit(layout, 0.0f, false);	arg->bmain = bmain;	arg->scene = scene;	arg->layout = split;	if (ntreetype && ntreetype->foreach_nodeclass)		ntreetype->foreach_nodeclass(scene, arg, node_menu_column_foreach_cb);	column = uiLayoutColumn(split, false);	UI_block_layout_set_current(block, column);	if (sock->link) {		uiItemL(column, IFACE_("Link"), ICON_NONE);		but = block->buttons.last;		but->drawflag = UI_BUT_TEXT_LEFT;		but = uiDefBut(block, UI_BTYPE_BUT, 0, IFACE_("Remove"), 0, 0, UI_UNIT_X * 4, UI_UNIT_Y,		               NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Remove nodes connected to the input"));		UI_but_funcN_set(but, ui_node_link, MEM_dupallocN(arg), SET_INT_IN_POINTER(UI_NODE_LINK_REMOVE));		but = uiDefBut(block, UI_BTYPE_BUT, 0, IFACE_("Disconnect"), 0, 0, UI_UNIT_X * 4, UI_UNIT_Y,		               NULL, 0.0, 0.0, 0.0, 0.0, TIP_("Disconnect nodes connected to the input"));		UI_but_funcN_set(but, ui_node_link, MEM_dupallocN(arg), SET_INT_IN_POINTER(UI_NODE_LINK_DISCONNECT));	}	ui_node_menu_column(arg, NODE_CLASS_GROUP, N_("Group"));}
开发者ID:JasonWilkins,项目名称:blender-viewport_fx,代码行数:41,


示例22: uiTemplateTextureUser

void uiTemplateTextureUser(uiLayout *layout, bContext *C){	/* texture user selection dropdown menu. the available users have been	   gathered before drawing in ButsContextTexture, we merely need to	   display the current item. */	SpaceButs *sbuts = CTX_wm_space_buts(C);	ButsContextTexture *ct= (sbuts)? sbuts->texuser: NULL;	uiBlock *block = uiLayoutGetBlock(layout);	uiBut *but;	ButsTextureUser *user;	char name[UI_MAX_NAME_STR];	if(!ct)		return;	/* get current user */	user= ct->user;	if(!user) {		uiItemL(layout, "No textures in context.", ICON_NONE);		return;	}	/* create button */	BLI_snprintf(name, UI_MAX_NAME_STR, "%s", user->name);	if(user->icon) {		but= uiDefIconTextMenuBut(block, template_texture_user_menu, NULL,			user->icon, name, 0, 0, UI_UNIT_X*4, UI_UNIT_Y, "");	}	else {		but= uiDefMenuBut(block, template_texture_user_menu, NULL,			name, 0, 0, UI_UNIT_X*4, UI_UNIT_Y, "");	}	/* some cosmetic tweaks */	but->type= MENU;	but->flag |= UI_TEXT_LEFT;	but->flag &= ~UI_ICON_SUBMENU;}
开发者ID:mik0001,项目名称:Blender,代码行数:40,


示例23: nla_panel_properties

/* generic settings for active NLA-Strip */static void nla_panel_properties(const bContext *C, Panel *pa){	PointerRNA strip_ptr;	uiLayout *layout = pa->layout;	uiLayout *column, *row, *sub;	uiBlock *block;	short showEvalProps = 1;		if (!nla_panel_context(C, NULL, NULL, &strip_ptr))		return;		block = uiLayoutGetBlock(layout);	UI_block_func_handle_set(block, do_nla_region_buttons, NULL);		/* Strip Properties ------------------------------------- */	/* strip type */	row = uiLayoutColumn(layout, true);	uiItemR(row, &strip_ptr, "name", 0, NULL, ICON_NLA);     // XXX icon?	uiItemR(row, &strip_ptr, "type", 0, NULL, ICON_NONE);		/* strip extents */	column = uiLayoutColumn(layout, true);	uiItemL(column, IFACE_("Strip Extents:"), ICON_NONE);	uiItemR(column, &strip_ptr, "frame_start", 0, NULL, ICON_NONE);	uiItemR(column, &strip_ptr, "frame_end", 0, NULL, ICON_NONE);		/* Evaluation-Related Strip Properties ------------------ */		/* sound properties strips don't have these settings */	if (RNA_enum_get(&strip_ptr, "type") == NLASTRIP_TYPE_SOUND)		showEvalProps = 0;		/* only show if allowed to... */	if (showEvalProps) {		/* extrapolation */		row = uiLayoutRow(layout, true);		uiItemR(row, &strip_ptr, "extrapolation", 0, NULL, ICON_NONE);				/* blending */		row = uiLayoutRow(layout, true);		uiItemR(row, &strip_ptr, "blend_type", 0, NULL, ICON_NONE);					/* blend in/out + autoblending		 *	- blend in/out can only be set when autoblending is off		 */		column = uiLayoutColumn(layout, true);		uiLayoutSetActive(column, RNA_boolean_get(&strip_ptr, "use_animated_influence") == false);		uiItemR(column, &strip_ptr, "use_auto_blend", 0, NULL, ICON_NONE);     // XXX as toggle?		sub = uiLayoutColumn(column, true);		uiLayoutSetActive(sub, RNA_boolean_get(&strip_ptr, "use_auto_blend") == false);		uiItemR(sub, &strip_ptr, "blend_in", 0, NULL, ICON_NONE);		uiItemR(sub, &strip_ptr, "blend_out", 0, NULL, ICON_NONE);					/* settings */		column = uiLayoutColumn(layout, true);		uiLayoutSetActive(column, !(RNA_boolean_get(&strip_ptr, "use_animated_influence") || RNA_boolean_get(&strip_ptr, "use_animated_time")));		uiItemL(column, IFACE_("Playback Settings:"), ICON_NONE);		uiItemR(column, &strip_ptr, "mute", 0, NULL, ICON_NONE);		uiItemR(column, &strip_ptr, "use_reverse", 0, NULL, ICON_NONE);	}}
开发者ID:mgschwan,项目名称:blensor,代码行数:63,



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


C++ uiItemR函数代码示例
C++ ui函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。