Blender V2.61 - r43446
Classes | Defines | Typedefs | Enumerations

DNA_ID.h File Reference

ID and Library types, which are fundamental for sdna. More...

#include "DNA_listBase.h"

Go to the source code of this file.

Classes

struct  IDPropertyData
struct  IDProperty
struct  ID
struct  Library
struct  PreviewImage

Defines

#define MAX_IDPROP_NAME   64
#define DEFAULT_ALLOC_FOR_NULL_STRINGS   64
#define IDP_STRING   0
#define IDP_INT   1
#define IDP_FLOAT   2
#define IDP_ARRAY   5
#define IDP_GROUP   6
#define IDP_ID   7
#define IDP_DOUBLE   8
#define IDP_IDPARRAY   9
#define IDP_NUMTYPES   10
#define IDP_STRING_SUB_UTF8   0
#define IDP_STRING_SUB_BYTE   1
#define IDP_FLAG_GHOST   (1<<7)
#define MAX_ID_NAME   66
#define NUM_ICON_SIZES   (ICON_SIZE_PREVIEW + 1)
#define MAKE_ID2(c, d)   ( (d)<<8 | (c) )
#define MOST_SIG_BYTE   1
#define BLITTLE_ENDIAN
#define ID_SCE   MAKE_ID2('S', 'C')
#define ID_LI   MAKE_ID2('L', 'I')
#define ID_OB   MAKE_ID2('O', 'B')
#define ID_ME   MAKE_ID2('M', 'E')
#define ID_CU   MAKE_ID2('C', 'U')
#define ID_MB   MAKE_ID2('M', 'B')
#define ID_MA   MAKE_ID2('M', 'A')
#define ID_TE   MAKE_ID2('T', 'E')
#define ID_IM   MAKE_ID2('I', 'M')
#define ID_LT   MAKE_ID2('L', 'T')
#define ID_LA   MAKE_ID2('L', 'A')
#define ID_CA   MAKE_ID2('C', 'A')
#define ID_IP   MAKE_ID2('I', 'P')
#define ID_KE   MAKE_ID2('K', 'E')
#define ID_WO   MAKE_ID2('W', 'O')
#define ID_SCR   MAKE_ID2('S', 'R')
#define ID_SCRN   MAKE_ID2('S', 'N')
#define ID_VF   MAKE_ID2('V', 'F')
#define ID_TXT   MAKE_ID2('T', 'X')
#define ID_SPK   MAKE_ID2('S', 'K')
#define ID_SO   MAKE_ID2('S', 'O')
#define ID_GR   MAKE_ID2('G', 'R')
#define ID_ID   MAKE_ID2('I', 'D')
#define ID_AR   MAKE_ID2('A', 'R')
#define ID_AC   MAKE_ID2('A', 'C')
#define ID_SCRIPT   MAKE_ID2('P', 'Y')
#define ID_NT   MAKE_ID2('N', 'T')
#define ID_BR   MAKE_ID2('B', 'R')
#define ID_PA   MAKE_ID2('P', 'A')
#define ID_GD   MAKE_ID2('G', 'D')
#define ID_WM   MAKE_ID2('W', 'M')
#define ID_MC   MAKE_ID2('M', 'C')
#define ID_SEQ   MAKE_ID2('S', 'Q')
#define ID_CO   MAKE_ID2('C', 'O')
#define ID_PO   MAKE_ID2('A', 'C')
#define ID_NLA   MAKE_ID2('N', 'L')
#define ID_FLUIDSIM   MAKE_ID2('F', 'S')
#define ID_REAL_USERS(id)   (((ID *)id)->us - ((((ID *)id)->flag & LIB_FAKEUSER) ? 1:0))
#define ID_CHECK_UNDO(id)   ((GS((id)->name) != ID_SCR) && (GS((id)->name) != ID_WM))
#define ID_BLEND_PATH(_bmain, _id)   ((_id)->lib ? (_id)->lib->filepath : (_bmain)->name)
#define GS(a)   (*((short *)(a)))
#define LIB_LOCAL   0
#define LIB_EXTERN   1
#define LIB_INDIRECT   2
#define LIB_TEST   8
#define LIB_TESTEXT   (LIB_TEST | LIB_EXTERN)
#define LIB_TESTIND   (LIB_TEST | LIB_INDIRECT)
#define LIB_READ   16
#define LIB_NEEDLINK   32
#define LIB_NEW   256
#define LIB_FAKEUSER   512
#define LIB_DOIT   1024
#define LIB_PRE_EXISTING   2048
#define LIB_ID_RECALC   4096
#define LIB_ID_RECALC_DATA   8192

Typedefs

typedef struct IDPropertyData IDPropertyData
typedef struct IDProperty IDProperty
typedef struct ID ID
typedef struct Library Library
typedef struct PreviewImage PreviewImage

Enumerations

enum  eIconSizes { ICON_SIZE_ICON, ICON_SIZE_PREVIEW }

Detailed Description

ID and Library types, which are fundamental for sdna.

Definition in file DNA_ID.h.


Define Documentation

#define BLITTLE_ENDIAN

Definition at line 175 of file DNA_ID.h.

#define DEFAULT_ALLOC_FOR_NULL_STRINGS   64

Definition at line 69 of file DNA_ID.h.

Referenced by IDP_New(), and IDP_NewString().

#define GS (   a)    (*((short *)(a)))

Definition at line 232 of file DNA_ID.h.

#define ID_AC   MAKE_ID2('A', 'C')
#define ID_AR   MAKE_ID2('A', 'R')
#define ID_BLEND_PATH (   _bmain,
  _id 
)    ((_id)->lib ? (_id)->lib->filepath : (_bmain)->name)
#define ID_BR   MAKE_ID2('B', 'R')
#define ID_CA   MAKE_ID2('C', 'A')
#define ID_CHECK_UNDO (   id)    ((GS((id)->name) != ID_SCR) && (GS((id)->name) != ID_WM))

Definition at line 225 of file DNA_ID.h.

Referenced by reset_default_button_exec(), and ui_but_is_rna_undo().

#define ID_CO   MAKE_ID2('C', 'O')

Definition at line 215 of file DNA_ID.h.

Referenced by get_rna_access().

#define ID_CU   MAKE_ID2('C', 'U')
#define ID_FLUIDSIM   MAKE_ID2('F', 'S')

Definition at line 221 of file DNA_ID.h.

#define ID_GD   MAKE_ID2('G', 'D')
#define ID_GR   MAKE_ID2('G', 'R')
#define ID_ID   MAKE_ID2('I', 'D')
#define ID_IM   MAKE_ID2('I', 'M')
#define ID_IP   MAKE_ID2('I', 'P')
#define ID_KE   MAKE_ID2('K', 'E')
#define ID_LA   MAKE_ID2('L', 'A')
#define ID_LI   MAKE_ID2('L', 'I')
#define ID_LT   MAKE_ID2('L', 'T')
#define ID_MA   MAKE_ID2('M', 'A')

Definition at line 185 of file DNA_ID.h.

Referenced by acf_generic_group_offset(), add_material(), adrcode_bitmaps_to_paths(), alloc_libblock_notest(), animdata_filter_ds_textures(), BKE_previewimg_free_id(), BKE_previewimg_get(), BLO_blendhandle_get_previews(), buttons_context_path_texture(), buttons_texture_users_from_context(), copy_mtex_copybuf(), dataname(), do_version_mtex_factor_2_50(), do_versions(), draw_sensorbuttons(), ED_node_changed_update(), ED_node_set_active(), ED_node_shader_default(), ED_render_id_flush_update(), expand_main(), filelist_from_main(), flag_render_node_material(), free_libblock(), get_driver_path_hack(), get_flags_for_id(), get_rna_access(), give_active_mtex(), give_node_material(), gpu_active_node_material(), icon_preview_startjob(), id_copy(), id_make_local(), id_type_can_have_animdata(), IDnames_to_dyn_pupstring(), init_render_nodetree(), lib_link_screen(), lib_link_screen_restore(), material_in_nodetree(), mouse_nla_channels(), namebutton_cb(), node_area_listener(), node_area_refresh(), node_tree_from_ID(), nodes_use_tex(), outliner_add_id_contents(), outliner_id_operation_exec(), paste_mtex_copybuf(), preview_prepare_scene(), read_libblock(), set_active_mtex(), set_operation_types(), shader_preview_render(), shader_preview_updatejob(), template_id_browse_tip(), text_idbutton(), texture_slot_move(), tree_element_active(), tree_element_active_texture(), tselem_draw_icon(), ui_but_anim_expression_create(), ui_id_icon_get(), uiTemplatePreview(), unlink_texture_cb(), view3d_mat_drop_poll(), which_libbase(), and write_materials().

#define ID_MB   MAKE_ID2('M', 'B')
#define ID_MC   MAKE_ID2('M', 'C')
#define ID_ME   MAKE_ID2('M', 'E')
#define ID_NLA   MAKE_ID2('N', 'L')

Definition at line 219 of file DNA_ID.h.

Referenced by set_operation_types(), and tselem_draw_icon().

#define ID_NT   MAKE_ID2('N', 'T')
#define ID_OB   MAKE_ID2('O', 'B')

Definition at line 181 of file DNA_ID.h.

Referenced by add_empty_ks_path_exec(), add_only_object(), adrcode_bitmaps_to_paths(), alloc_libblock_notest(), ANIM_apply_keyingset(), animchan_sync_fcurve(), animchan_sync_group(), append_named_part_ex(), bpath_traverse_id(), build_dag(), buttons_context_path_texture(), buttons_texture_users_from_context(), dag_add_driver_relation(), dag_id_flush_update(), DAG_id_tag_update(), DAG_on_visible_update(), dag_scene_flush_layers(), DAG_scene_flush_update(), dataname(), do_versions(), do_versions_ipos_to_animato(), draw_actuatorbuttons(), driver_change_variable_type(), drivers_path_rename_fix(), dtar_id_ensure_proxy_from(), dvar_eval_locDiff(), dvar_eval_transChan(), ED_base_object_free_and_unlink(), ED_object_add_type(), expand_main(), filelist_from_main(), flush_layer_node(), flush_pointcache_reset(), flush_update_node(), free_libblock(), free_libblock_us(), get_rna_access(), icu_to_fcurves(), id_copy(), id_frame_has_keyframe(), id_make_local(), id_type_can_have_animdata(), id_unlink(), idriver_to_cdriver(), ipo_to_animato(), lib_indirect_test_id(), lib_link_modifiers__linkModifiers(), nlaedit_add_sound_exec(), object_hide_view_clear_exec(), object_hide_view_set_exec(), outliner_add_id_contents(), outliner_do_object_operation(), outliner_draw_hierarchy(), outliner_draw_iconrow(), outliner_draw_restrictbuts(), outliner_draw_tree_element(), outliner_find_id(), outliner_make_hierarchy(), outliner_sort(), read_libblock(), rna_def_drivertarget(), rna_def_keyingset_path(), set_operation_types(), skip_fcurve_selected_data(), subtree_has_objects(), template_ID(), template_id_browse_tip(), template_id_cb(), time_draw_idblock_keyframes(), tree_element_active_camera(), tree_element_active_lamp(), tree_element_active_material(), tree_element_set_active_object(), tree_element_show_hierarchy(), treesort_alpha(), tselem_draw_icon(), uiIconFromID(), uiTemplateConstraint(), uiTemplateModifier(), unlink_group_cb(), unlink_material_cb(), view3d_ob_drop_poll(), which_libbase(), and write_objects().

#define ID_PA   MAKE_ID2('P', 'A')
#define ID_PO   MAKE_ID2('A', 'C')

Definition at line 217 of file DNA_ID.h.

Referenced by get_rna_access(), and icu_to_fcurves().

#define ID_REAL_USERS (   id)    (((ID *)id)->us - ((((ID *)id)->flag & LIB_FAKEUSER) ? 1:0))
#define ID_SCE   MAKE_ID2('S', 'C')
#define ID_SCR   MAKE_ID2('S', 'R')
#define ID_SCRIPT   MAKE_ID2('P', 'Y')
#define ID_SCRN   MAKE_ID2('S', 'N')

Definition at line 195 of file DNA_ID.h.

Referenced by blo_read_file_internal(), and write_screens().

#define ID_SEQ   MAKE_ID2('S', 'Q')

Definition at line 213 of file DNA_ID.h.

Referenced by alloc_sequence(), and get_rna_access().

#define ID_SO   MAKE_ID2('S', 'O')
#define ID_SPK   MAKE_ID2('S', 'K')
#define ID_TE   MAKE_ID2('T', 'E')
#define ID_TXT   MAKE_ID2('T', 'X')
#define ID_VF   MAKE_ID2('V', 'F')
#define ID_WM   MAKE_ID2('W', 'M')
#define ID_WO   MAKE_ID2('W', 'O')
#define IDP_ARRAY   5
#define IDP_DOUBLE   8
#define IDP_FLAG_GHOST   (1<<7)

Definition at line 90 of file DNA_ID.h.

Referenced by rna_idproperty_touch(), RNA_property_is_set(), and wm_operator_init_from_last().

#define IDP_FLOAT   2
#define IDP_GROUP   6
#define IDP_ID   7

Definition at line 79 of file DNA_ID.h.

Referenced by IDP_UnlinkProperty().

#define IDP_IDPARRAY   9
#define IDP_INT   1
#define IDP_NUMTYPES   10

Definition at line 82 of file DNA_ID.h.

#define IDP_STRING   0
#define IDP_STRING_SUB_BYTE   1
#define IDP_STRING_SUB_UTF8   0

Definition at line 87 of file DNA_ID.h.

Referenced by BPy_IDProperty_Map_ValidateAndCreate(), and IDP_New().

#define LIB_DOIT   1024
#define LIB_EXTERN   1
#define LIB_FAKEUSER   512
#define LIB_ID_RECALC   4096
#define LIB_ID_RECALC_DATA   8192
#define LIB_INDIRECT   2
#define LIB_LOCAL   0

Definition at line 235 of file DNA_ID.h.

Referenced by blo_read_file_internal(), and id_clear_lib_data().

#define LIB_NEEDLINK   32
#define LIB_NEW   256
#define LIB_PRE_EXISTING   2048
#define LIB_READ   16
#define LIB_TEST   8

Definition at line 238 of file DNA_ID.h.

Referenced by append_id_part(), and expand_main().

#define LIB_TESTEXT   (LIB_TEST | LIB_EXTERN)

Definition at line 239 of file DNA_ID.h.

Referenced by append_named_part().

#define LIB_TESTIND   (LIB_TEST | LIB_INDIRECT)

Definition at line 240 of file DNA_ID.h.

Referenced by expand_doit().

#define MAKE_ID2 (   c,
 
)    ( (d)<<8 | (c) )

Defines for working with IDs.

The tags represent types! This is a dirty way of enabling RTTI. The sig_byte end endian defines aren't really used much.

Definition at line 173 of file DNA_ID.h.

#define MAX_ID_NAME   66

ID is the first thing included in all serializable types. It provides a common handle to place all data in double-linked lists.

Definition at line 104 of file DNA_ID.h.

Referenced by add_named_exec(), add_object(), autocomplete_id(), background_image_add_invoke(), bpy_text_import(), bpy_text_import_name(), calculate_tface_materialname(), check_for_dupid(), convert_tfacematerial(), convert_tfacenomaterial(), copy_mball_properties(), createObjectSpace(), draw_actuatorbuttons(), drop_named_image_invoke(), drop_named_material_invoke(), ED_operatormacros_object(), ED_screen_full_toggle(), find_basis_mball(), group_create_exec(), GROUP_OT_create(), id_search_cb(), image_new_exec(), IMAGE_OT_new(), IMAGE_OT_unpack(), image_unpack_exec(), init_meta(), ipo_to_animdata(), is_mball_basis_for(), list_item_row(), make_proxy_exec(), MESH_OT_drop_named_image(), new_id(), new_node_tree_exec(), node_add_file_exec(), node_composit_buts_renderlayers(), NODE_OT_add_file(), NODE_OT_new_node_tree(), object_mouse_select_menu(), OBJECT_OT_add_named(), OBJECT_OT_drop_named_material(), OBJECT_OT_proxy_make(), OBJECT_OT_select_same_group(), object_select_same_group_exec(), outliner_buttons(), RENDER_OT_render(), render_result_exr_file_path(), rna_def_font(), rna_def_ID(), rna_def_trackingObject(), rna_def_trackingTrack(), rna_search_cb(), screen_render_scene_layer_set(), SOUND_OT_unpack(), sound_unpack_exec(), text_update_drawcache(), ui_get_but_string_max_length(), VIEW3D_OT_background_image_add(), and wm_window_match_init().

#define MAX_IDPROP_NAME   64
#define MOST_SIG_BYTE   1

Definition at line 174 of file DNA_ID.h.

Referenced by do_gammacross_effect_byte().

#define NUM_ICON_SIZES   (ICON_SIZE_PREVIEW + 1)

Typedef Documentation

typedef struct ID ID
typedef struct IDProperty IDProperty
typedef struct Library Library

For each library file used, a Library struct is added to Main WARNING: readfile.c, expand_doit() reads this struct without DNA check!

typedef struct PreviewImage PreviewImage

Enumeration Type Documentation

enum eIconSizes
Enumerator:
ICON_SIZE_ICON 
ICON_SIZE_PREVIEW 

Definition at line 143 of file DNA_ID.h.