コード例 #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;
}