Пример #1
0
/**
 * Convert a name into an idcode (ie. ID_SCE)
 *
 * \param name The name to convert.
 * \return The code for the name, or 0 if invalid.
 */
short BKE_idcode_from_name(const char *name)
{
	IDType *idt = idtype_from_name(name);
	BLI_assert(idt);
	return idt ? idt->code : 0;
}
Пример #2
0
int BKE_idcode_from_name(const char *name) 
{
	IDType *idt= idtype_from_name(name);
	
	return idt?idt->code:0;
}