示例#1
0
文件: idcode.c 项目: diekev/blender
/**
 * Convert an idcode into a name (plural).
 *
 * \param idcode: The code to convert.
 * \return A static string representing the name of
 * the code.
 */
const char *BKE_idcode_to_name_plural(short idcode)
{
	IDType *idt = idtype_from_code(idcode);
	BLI_assert(idt);
	return idt ? idt->plural : NULL;
}
示例#2
0
文件: idcode.c 项目: diekev/blender
/**
 * Convert an idcode into its translations' context.
 *
 * \param idcode: The code to convert.
 * \return A static string representing the i18n context of the code.
 */
const char *BKE_idcode_to_translation_context(short idcode)
{
	IDType *idt = idtype_from_code(idcode);
	BLI_assert(idt);
	return idt ? idt->i18n_context : BLT_I18NCONTEXT_DEFAULT;
}
示例#3
0
文件: idcode.c 项目: diekev/blender
/**
 * Return if the ID code is a valid ID code.
 *
 * \param idcode: The code to check.
 * \return Boolean, 0 when invalid.
 */
bool BKE_idcode_is_valid(short idcode)
{
	return idtype_from_code(idcode) ? true : false;
}
示例#4
0
文件: idcode.c 项目: diekev/blender
/**
 * Return non-zero when an ID type is linkable.
 *
 * \param idcode: The code to check.
 * \return Boolean, 0 when non linkable.
 */
bool BKE_idcode_is_linkable(short idcode)
{
	IDType *idt = idtype_from_code(idcode);
	BLI_assert(idt);
	return idt ? ((idt->flags & IDTYPE_FLAGS_ISLINKABLE) != 0) : false;
}
示例#5
0
文件: idcode.c 项目: kujira70/Blender
/**
 * Convert an idcode into a name.
 *
 * \param code The code to convert.
 * \return A static string representing the name of
 * the code.
 */
const char *BKE_idcode_to_name(int code) 
{
	IDType *idt = idtype_from_code(code);
	BLI_assert(idt);
	return idt ? idt->name : NULL;
}
示例#6
0
文件: idcode.c 项目: kujira70/Blender
/**
 * Return if the ID code is a valid ID code.
 *
 * \param code The code to check.
 * \return Boolean, 0 when invalid.
 */
bool BKE_idcode_is_valid(int code)
{
	return idtype_from_code(code) ? true : false;
}
示例#7
0
文件: idcode.c 项目: nttputus/blensor
const char *BKE_idcode_to_name_plural(int code) 
{
	IDType *idt= idtype_from_code(code);
	
	return idt?idt->plural:NULL;
}
示例#8
0
文件: idcode.c 项目: nttputus/blensor
int BKE_idcode_is_linkable(int code)
{
	IDType *idt= idtype_from_code(code);
	return idt?(idt->flags&IDTYPE_FLAGS_ISLINKABLE):0;
}
示例#9
0
文件: idcode.c 项目: nttputus/blensor
int BKE_idcode_is_valid(int code) 
{
	return idtype_from_code(code)?1:0;
}