Blender V2.61 - r43446
|
#include <stdlib.h>
#include <string.h>
#include "DNA_ID.h"
#include "BKE_idcode.h"
Go to the source code of this file.
Classes | |
struct | IDType |
Defines | |
#define | IDTYPE_FLAGS_ISLINKABLE (1<<0) |
Functions | |
static IDType * | idtype_from_name (const char *str) |
static IDType * | idtype_from_code (int code) |
int | BKE_idcode_is_valid (int code) |
int | BKE_idcode_is_linkable (int code) |
const char * | BKE_idcode_to_name (int code) |
int | BKE_idcode_from_name (const char *name) |
const char * | BKE_idcode_to_name_plural (int code) |
int | BKE_idcode_iter_step (int *index) |
Variables | |
static IDType | idtypes [] |
static int | nidtypes = sizeof(idtypes)/sizeof(idtypes[0]) |
Definition in file idcode.c.
#define IDTYPE_FLAGS_ISLINKABLE (1<<0) |
Definition at line 46 of file idcode.c.
Referenced by BKE_idcode_is_linkable().
int BKE_idcode_from_name | ( | const char * | name | ) |
Convert a name into an idcode (ie. ID_SCE)
name | The name to convert. |
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.
code | The code to check. |
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.
code | The code to check. |
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.
index,start | as 0. |
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.
code | The code to convert. |
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).
code | The code to convert. |
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().
static IDType* idtype_from_code | ( | int | code | ) | [static] |
Definition at line 95 of file idcode.c.
References i, nidtypes, and NULL.
Referenced by BKE_idcode_is_linkable(), BKE_idcode_is_valid(), BKE_idcode_to_name(), and BKE_idcode_to_name_plural().
static IDType* idtype_from_name | ( | const char * | str | ) | [static] |
Definition at line 83 of file idcode.c.
Referenced by BKE_idcode_iter_step(), idtype_from_code(), and idtype_from_name().