Blender V2.61 - r43446
Functions

BKE_idcode.h File Reference

Go to the source code of this file.

Functions

const char * BKE_idcode_to_name (int code)
const char * BKE_idcode_to_name_plural (int code)
int BKE_idcode_from_name (const char *name)
int BKE_idcode_is_linkable (int code)
int BKE_idcode_is_valid (int code)
int BKE_idcode_iter_step (int *index)

Detailed Description

Definition in file BKE_idcode.h.


Function Documentation

int BKE_idcode_from_name ( const char *  name)

Convert a name into an idcode (ie. ID_SCE)

Parameters:
nameThe name to convert.
Returns:
The code for the name, or 0 if invalid.

Definition at line 124 of file idcode.c.

References IDType::code, and idtype_from_name().

Referenced by groupname_to_code(), KX_BlenderSceneConverter::LinkBlendFile(), and wm_link_append_exec().

int BKE_idcode_is_linkable ( int  code)

Return non-zero when an ID type is linkable.

Parameters:
codeThe code to check.
Returns:
Boolean, 0 when non linkable.

Definition at line 111 of file idcode.c.

References IDType::flags, IDTYPE_FLAGS_ISLINKABLE, and idtype_from_code().

Referenced by BLO_blendhandle_get_linkable_groups(), bpy_lib_enter(), and bpy_lib_exit().

int BKE_idcode_is_valid ( int  code)

Return if the ID code is a valid ID code.

Parameters:
codeThe code to check.
Returns:
Boolean, 0 when invalid.

Definition at line 106 of file idcode.c.

References idtype_from_code().

Referenced by BLO_blendhandle_get_linkable_groups().

int BKE_idcode_iter_step ( int *  index)

Return an ID code and steps the index forward 1.

Parameters:
index,startas 0.
Returns:
the code, 0 when all codes have been returned.

Definition at line 138 of file idcode.c.

References IDType::code, and nidtypes.

Referenced by bpy_lib_enter(), and bpy_lib_exit().

const char* BKE_idcode_to_name ( int  code)

Convert an idcode into a name.

Parameters:
codeThe code to convert.
Returns:
A static string representing the name of the code.

Definition at line 117 of file idcode.c.

References idtype_from_code(), IDType::name, and NULL.

Referenced by BLO_blendhandle_get_linkable_groups(), read_libraries(), and rna_id_write_error().

const char* BKE_idcode_to_name_plural ( int  code)

Convert an idcode into a name (plural).

Parameters:
codeThe code to convert.
Returns:
A static string representing the name of the code.

Definition at line 131 of file idcode.c.

References idtype_from_code(), NULL, and IDType::plural.

Referenced by bpy_lib_enter(), bpy_lib_exit(), id_drop_copy(), pyrna_prop_repr(), and pyrna_struct_repr().