예제 #1
0
파일: idcode.c 프로젝트: diekev/blender
/**
 * 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
파일: idcode.c 프로젝트: nttputus/blensor
int BKE_idcode_from_name(const char *name) 
{
	IDType *idt= idtype_from_name(name);
	
	return idt?idt->code:0;
}