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

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

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

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

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

示例1: nla_panel_evaluation

/* evaluation settings for active NLA-Strip */static void nla_panel_evaluation(const bContext *C, Panel *pa){	PointerRNA strip_ptr;	uiLayout *layout = pa->layout;	uiLayout *col, *sub;	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);			col = uiLayoutColumn(layout, true);	uiItemR(col, &strip_ptr, "use_animated_influence", 0, NULL, ICON_NONE);		sub = uiLayoutColumn(col, true);	uiLayoutSetEnabled(sub, RNA_boolean_get(&strip_ptr, "use_animated_influence"));	uiItemR(sub, &strip_ptr, "influence", 0, NULL, ICON_NONE);	col = uiLayoutColumn(layout, true);	sub = uiLayoutRow(col, false);	uiItemR(sub, &strip_ptr, "use_animated_time", 0, NULL, ICON_NONE);	uiItemR(sub, &strip_ptr, "use_animated_time_cyclic", 0, NULL, ICON_NONE);	sub = uiLayoutRow(col, false);	uiLayoutSetEnabled(sub, RNA_boolean_get(&strip_ptr, "use_animated_time"));	uiItemR(sub, &strip_ptr, "strip_time", 0, NULL, ICON_NONE);}
开发者ID:mgschwan,项目名称:blensor,代码行数:31,


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


示例3: workspace_add_menu

static void workspace_add_menu(bContext *C, uiLayout *layout, void *template_v){  Main *bmain = CTX_data_main(C);  const char *app_template = template_v;  bool has_startup_items = false;  wmOperatorType *ot_append = WM_operatortype_find("WORKSPACE_OT_append_activate", true);  WorkspaceConfigFileData *startup_config = workspace_config_file_read(app_template);  WorkspaceConfigFileData *builtin_config = workspace_system_file_read(app_template);  if (startup_config) {    for (WorkSpace *workspace = startup_config->workspaces.first; workspace;         workspace = workspace->id.next) {      uiLayout *row = uiLayoutRow(layout, false);      if (BLI_findstring(&bmain->workspaces, workspace->id.name, offsetof(ID, name))) {        uiLayoutSetActive(row, false);      }      workspace_append_button(row, ot_append, workspace, startup_config->main);      has_startup_items = true;    }  }  if (builtin_config) {    bool has_title = false;    for (WorkSpace *workspace = builtin_config->workspaces.first; workspace;         workspace = workspace->id.next) {      if (startup_config &&          BLI_findstring(&startup_config->workspaces, workspace->id.name, offsetof(ID, name))) {        continue;      }      if (!has_title) {        if (has_startup_items) {          uiItemS(layout);        }        has_title = true;      }      uiLayout *row = uiLayoutRow(layout, false);      if (BLI_findstring(&bmain->workspaces, workspace->id.name, offsetof(ID, name))) {        uiLayoutSetActive(row, false);      }      workspace_append_button(row, ot_append, workspace, builtin_config->main);    }  }  if (startup_config) {    BKE_blendfile_workspace_config_data_free(startup_config);  }  if (builtin_config) {    BKE_blendfile_workspace_config_data_free(builtin_config);  }}
开发者ID:dfelinto,项目名称:blender,代码行数:56,


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


示例5: 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);}
开发者ID:Walid-Shouman,项目名称:Blender,代码行数:12,


示例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: uiTemplateMovieClip

void uiTemplateMovieClip(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, int compact){	PropertyRNA *prop;	PointerRNA clipptr;	MovieClip *clip;	uiLayout *row, *split;	uiBlock *block;	if (!ptr->data)		return;	prop = RNA_struct_find_property(ptr, propname);	if (!prop) {		printf("%s: property not found: %s.%s/n",		       __func__, RNA_struct_identifier(ptr->type), propname);		return;	}	if (RNA_property_type(prop) != PROP_POINTER) {		printf("%s: expected pointer property for %s.%s/n",		       __func__, RNA_struct_identifier(ptr->type), propname);		return;	}	clipptr = RNA_property_pointer_get(ptr, prop);	clip = clipptr.data;	uiLayoutSetContextPointer(layout, "edit_movieclip", &clipptr);	if (!compact)		uiTemplateID(layout, C, ptr, propname, NULL, "CLIP_OT_open", NULL);	if (clip) {		uiLayout *col;		row = uiLayoutRow(layout, FALSE);		block = uiLayoutGetBlock(row);		uiDefBut(block, LABEL, 0, "File Path:", 0, 19, 145, 19, NULL, 0, 0, 0, 0, "");		row = uiLayoutRow(layout, FALSE);		split = uiLayoutSplit(row, 0.0f, FALSE);		row = uiLayoutRow(split, TRUE);		uiItemR(row, &clipptr, "filepath", 0, "", ICON_NONE);		uiItemO(row, "", ICON_FILE_REFRESH, "clip.reload");		col = uiLayoutColumn(layout, FALSE);		uiTemplateColorspaceSettings(col, &clipptr, "colorspace_settings");	}}
开发者ID:danielmarg,项目名称:blender-main,代码行数:50,


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


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


示例10: 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, *row;		/* initialise RNA pointer to the target */	RNA_pointer_create(id, &RNA_DriverTarget, dtar, &dtar_ptr); 		/* properties */	col= uiLayoutColumn(layout, 1);		uiTemplateAnyID(col, &dtar_ptr, "id", "id_type", "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);		}				row= uiLayoutRow(layout, 1);			uiItemR(row, &dtar_ptr, "transform_type", 0, "", ICON_NONE);			uiItemR(row, &dtar_ptr, "use_local_space_transform", 0, NULL, ICON_NONE);}
开发者ID:OldBrunet,项目名称:BGERTPS,代码行数:26,


示例11: file_panel_category

static void file_panel_category(const bContext *C, Panel *pa, FSMenuCategory category, short *nr, int icon, int allow_delete){	SpaceFile *sfile = CTX_wm_space_file(C);	uiBlock *block;	uiBut *but;	uiLayout *box, *col;	struct FSMenu *fsmenu = fsmenu_get();	int i, nentries = fsmenu_get_nentries(fsmenu, category);	/* reset each time */	*nr = -1;	/* hide if no entries */	if (nentries == 0)		return;	/* layout */	uiLayoutSetAlignment(pa->layout, UI_LAYOUT_ALIGN_LEFT);	block = uiLayoutGetBlock(pa->layout);	box = uiLayoutBox(pa->layout);	col = uiLayoutColumn(box, TRUE);	for (i = 0; i < nentries; ++i) {		char dir[FILE_MAX];		char temp[FILE_MAX];		uiLayout *layout = uiLayoutRow(col, FALSE);		char *entry;				entry = fsmenu_get_entry(fsmenu, category, i);				/* set this list item as active if we have a match */		if (sfile->params) {			if (BLI_path_cmp(sfile->params->dir, entry) == 0) {				*nr = i;			}		}		/* create nice bookmark name, shows last directory in the full path currently */		BLI_strncpy(temp, entry, FILE_MAX);		BLI_add_slash(temp);		BLI_getlastdir(temp, dir, FILE_MAX);		BLI_del_slash(dir);		if (dir[0] == 0)			BLI_strncpy(dir, entry, FILE_MAX);		/* create list item */		but = uiDefIconTextButS(block, LISTROW, 0, icon, dir, 0, 0, UI_UNIT_X * 10, UI_UNIT_Y, nr, 0, i, 0, 0, entry);		uiButSetFunc(but, file_panel_cb, entry, NULL);		uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */		uiButSetFlag(but, UI_ICON_LEFT | UI_TEXT_LEFT);		/* create delete button */		if (allow_delete && fsmenu_can_save(fsmenu, category, i)) {			uiBlockSetEmboss(block, UI_EMBOSSN);			uiItemIntO(layout, "", ICON_X, "FILE_OT_delete_bookmark", "index", i);			uiBlockSetEmboss(block, UI_EMBOSS);		}	}}
开发者ID:diosney,项目名称:blender,代码行数:60,


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


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


示例14: 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, "auto_connect", 0, NULL, ICON_NONE);	row = uiLayoutRow(box, false);	uiItemR(row, imfptr, "min_chain_length", 0, NULL, ICON_NONE);}
开发者ID:diekev,项目名称:blender,代码行数:28,


示例15: draw_modifier__limits

/* draw settings for limits modifier */static void draw_modifier__limits(uiLayout *layout, ID *id, FModifier *fcm, short UNUSED(width)){	uiLayout *split, *col, *row;	PointerRNA ptr;		/* init the RNA-pointer */	RNA_pointer_create(id, &RNA_FModifierLimits, fcm, &ptr);		/* row 1: minimum */	{		row= uiLayoutRow(layout, 0);				/* split into 2 columns */		split= uiLayoutSplit(layout, 0.5f, 0);				/* x-minimum */		col= uiLayoutColumn(split, 1);			uiItemR(col, &ptr, "use_min_x", 0, NULL, ICON_NONE);			uiItemR(col, &ptr, "min_x", 0, NULL, ICON_NONE);					/* y-minimum*/		col= uiLayoutColumn(split, 1);			uiItemR(col, &ptr, "use_min_y", 0, NULL, ICON_NONE);			uiItemR(col, &ptr, "min_y", 0, NULL, ICON_NONE);	}		/* row 2: maximum */	{		row= uiLayoutRow(layout, 0);				/* split into 2 columns */		split= uiLayoutSplit(layout, 0.5f, 0);				/* x-minimum */		col= uiLayoutColumn(split, 1);			uiItemR(col, &ptr, "use_max_x", 0, NULL, ICON_NONE);			uiItemR(col, &ptr, "max_x", 0, NULL, ICON_NONE);					/* y-minimum*/		col= uiLayoutColumn(split, 1);			uiItemR(col, &ptr, "use_max_y", 0, NULL, ICON_NONE);			uiItemR(col, &ptr, "max_y", 0, NULL, ICON_NONE);	}}
开发者ID:OldBrunet,项目名称:BGERTPS,代码行数:45,


示例16: graph_panel_modifiers

static void graph_panel_modifiers(const bContext *C, Panel *pa)	{	bAnimListElem *ale;	FCurve *fcu;	FModifier *fcm;	uiLayout *col, *row;	uiBlock *block;	bool active;		if (!graph_panel_context(C, &ale, &fcu))		return;		block = uiLayoutGetBlock(pa->layout);	UI_block_func_handle_set(block, do_graph_region_modifier_buttons, NULL);		/* 'add modifier' button at top of panel */	{		row = uiLayoutRow(pa->layout, false);				/* this is an operator button which calls a 'add modifier' operator... 		 * a menu might be nicer but would be tricky as we need some custom filtering		 */		uiItemMenuEnumO(row, (bContext *)C, "GRAPH_OT_fmodifier_add", "type", IFACE_("Add Modifier"), ICON_NONE);				/* copy/paste (as sub-row) */		row = uiLayoutRow(row, true);		uiItemO(row, "", ICON_COPYDOWN, "GRAPH_OT_fmodifier_copy");		uiItemO(row, "", ICON_PASTEDOWN, "GRAPH_OT_fmodifier_paste");	}		active = !(fcu->flag & FCURVE_MOD_OFF);	/* draw each modifier */	for (fcm = fcu->modifiers.first; fcm; fcm = fcm->next) {		col = uiLayoutColumn(pa->layout, true);		uiLayoutSetActive(col, active);				ANIM_uiTemplate_fmodifier_draw(col, ale->id, &fcu->modifiers, fcm);	}		MEM_freeN(ale);}
开发者ID:diekev,项目名称:blender,代码行数:41,


示例17: graph_panel_modifiers

static void graph_panel_modifiers(const bContext *C, Panel *pa)	{	bAnimListElem *ale;	FCurve *fcu;	FModifier *fcm;	uiLayout *col, *row;	uiBlock *block;		if (!graph_panel_context(C, &ale, &fcu))		return;		block = uiLayoutGetBlock(pa->layout);	uiBlockSetHandleFunc(block, do_graph_region_modifier_buttons, NULL);		/* 'add modifier' button at top of panel */	{		row = uiLayoutRow(pa->layout, false);		block = uiLayoutGetBlock(row);				/* this is an operator button which calls a 'add modifier' operator... 		 * a menu might be nicer but would be tricky as we need some custom filtering		 */		uiDefButO(block, BUT, "GRAPH_OT_fmodifier_add", WM_OP_INVOKE_REGION_WIN, IFACE_("Add Modifier"),		          0.5 * UI_UNIT_X, 0, 7.5 * UI_UNIT_X, UI_UNIT_Y, TIP_("Adds a new F-Curve Modifier for the active F-Curve"));				/* copy/paste (as sub-row)*/		row = uiLayoutRow(row, true);		uiItemO(row, "", ICON_COPYDOWN, "GRAPH_OT_fmodifier_copy");		uiItemO(row, "", ICON_PASTEDOWN, "GRAPH_OT_fmodifier_paste");	}		/* draw each modifier */	for (fcm = fcu->modifiers.first; fcm; fcm = fcm->next) {		col = uiLayoutColumn(pa->layout, true);				ANIM_uiTemplate_fmodifier_draw(col, ale->id, &fcu->modifiers, fcm);	}	MEM_freeN(ale);}
开发者ID:SuriyaaKudoIsc,项目名称:blender-git,代码行数:40,


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


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


示例20: graph_panel_modifiers

static void graph_panel_modifiers(const bContext *C, Panel *pa)	{	bAnimListElem *ale;	FCurve *fcu;	FModifier *fcm;	uiLayout *col, *row;	uiBlock *block;		if (!graph_panel_context(C, &ale, &fcu))		return;		block = uiLayoutGetBlock(pa->layout);	uiBlockSetHandleFunc(block, do_graph_region_modifier_buttons, NULL);		/* 'add modifier' button at top of panel */	{		row = uiLayoutRow(pa->layout, FALSE);		block = uiLayoutGetBlock(row);				// XXX for now, this will be a operator button which calls a 'add modifier' operator		uiDefButO(block, BUT, "GRAPH_OT_fmodifier_add", WM_OP_INVOKE_REGION_WIN, IFACE_("Add Modifier"),		          10, 0, 150, 20, TIP_("Adds a new F-Curve Modifier for the active F-Curve"));				/* copy/paste (as sub-row)*/		row = uiLayoutRow(row, TRUE);		uiItemO(row, "", ICON_COPYDOWN, "GRAPH_OT_fmodifier_copy");		uiItemO(row, "", ICON_PASTEDOWN, "GRAPH_OT_fmodifier_paste");	}		/* draw each modifier */	for (fcm = fcu->modifiers.first; fcm; fcm = fcm->next) {		col = uiLayoutColumn(pa->layout, TRUE);				ANIM_uiTemplate_fmodifier_draw(col, ale->id, &fcu->modifiers, fcm);	}	MEM_freeN(ale);}
开发者ID:vanangamudi,项目名称:blender-main,代码行数:38,


示例21: nla_panel_modifiers

/* F-Modifiers for active NLA-Strip */static void nla_panel_modifiers(const bContext *C, Panel *pa){	PointerRNA strip_ptr;	NlaStrip *strip;	FModifier *fcm;	uiLayout *col, *row;	uiBlock *block;	/* check context and also validity of pointer */	if (!nla_panel_context(C, NULL, NULL, &strip_ptr))		return;	strip = strip_ptr.data;			block = uiLayoutGetBlock(pa->layout);	UI_block_func_handle_set(block, do_nla_region_buttons, NULL);		/* 'add modifier' button at top of panel */	{		row = uiLayoutRow(pa->layout, false);		block = uiLayoutGetBlock(row);				// FIXME: we need to set the only-active property so that this will only add modifiers for the active strip (not all selected)		uiItemMenuEnumO(row, (bContext *)C, "NLA_OT_fmodifier_add", "type", IFACE_("Add Modifier"), ICON_NONE);				/* copy/paste (as sub-row) */		row = uiLayoutRow(row, true);		uiItemO(row, "", ICON_COPYDOWN, "NLA_OT_fmodifier_copy");		uiItemO(row, "", ICON_PASTEDOWN, "NLA_OT_fmodifier_paste");	}		/* draw each modifier */	for (fcm = strip->modifiers.first; fcm; fcm = fcm->next) {		col = uiLayoutColumn(pa->layout, true);				ANIM_uiTemplate_fmodifier_draw(col, strip_ptr.id.data, &strip->modifiers, fcm);	}}
开发者ID:mgschwan,项目名称:blensor,代码行数:38,


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


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



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


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