|
Blender V4.3
|
#include "BLI_utildefines.h"Go to the source code of this file.
Macros | |
| #define | _BITMAP_POWER 5 |
| #define | _BITMAP_MASK 31 |
| #define | _BITMAP_NUM_BLOCKS(_num) (((_num) + _BITMAP_MASK) >> _BITMAP_POWER) |
| #define | BLI_BITMAP_SIZE(_num) ((size_t)(_BITMAP_NUM_BLOCKS(_num)) * sizeof(BLI_bitmap)) |
| #define | BLI_BITMAP_NEW(_num, _alloc_string) ((BLI_bitmap *)MEM_callocN(BLI_BITMAP_SIZE(_num), _alloc_string)) |
| #define | BLI_BITMAP_NEW_ALLOCA(_num) ((BLI_bitmap *)memset(alloca(BLI_BITMAP_SIZE(_num)), 0, BLI_BITMAP_SIZE(_num))) |
| #define | BLI_BITMAP_NEW_MEMARENA(_mem, _num) |
| #define | BLI_BITMAP_DECLARE(_name, _num) BLI_bitmap _name[_BITMAP_NUM_BLOCKS(_num)] = {} |
| #define | BLI_BITMAP_TEST(_bitmap, _index) |
| #define | BLI_BITMAP_TEST_AND_SET_ATOMIC(_bitmap, _index) |
| #define | BLI_BITMAP_TEST_BOOL(_bitmap, _index) |
| #define | BLI_BITMAP_ENABLE(_bitmap, _index) |
| #define | BLI_BITMAP_DISABLE(_bitmap, _index) |
| #define | BLI_BITMAP_FLIP(_bitmap, _index) |
| #define | BLI_BITMAP_SET(_bitmap, _index, _set) |
| #define | BLI_BITMAP_RESIZE(_bitmap, _num) |
Typedefs | |
| typedef unsigned int | BLI_bitmap |
Functions | |
| void | BLI_bitmap_set_all (BLI_bitmap *bitmap, bool set, size_t bits) |
| void | BLI_bitmap_flip_all (BLI_bitmap *bitmap, size_t bits) |
| void | BLI_bitmap_copy_all (BLI_bitmap *dst, const BLI_bitmap *src, size_t bits) |
| void | BLI_bitmap_and_all (BLI_bitmap *dst, const BLI_bitmap *src, size_t bits) |
| void | BLI_bitmap_or_all (BLI_bitmap *dst, const BLI_bitmap *src, size_t bits) |
| int | BLI_bitmap_find_first_unset (const BLI_bitmap *bitmap, size_t bits) |
| #define _BITMAP_MASK 31 |
Definition at line 26 of file BLI_bitmap.h.
| #define _BITMAP_NUM_BLOCKS | ( | _num | ) | (((_num) + _BITMAP_MASK) >> _BITMAP_POWER) |
Number of blocks needed to hold '_num' bits.
Definition at line 31 of file BLI_bitmap.h.
Referenced by BLI_bitmap_and_all(), BLI_bitmap_find_first_unset(), BLI_bitmap_flip_all(), and BLI_bitmap_or_all().
| #define _BITMAP_POWER 5 |
Definition at line 24 of file BLI_bitmap.h.
Referenced by BLI_bitmap_find_first_unset().
| #define BLI_BITMAP_DECLARE | ( | _name, | |
| _num ) BLI_bitmap _name[_BITMAP_NUM_BLOCKS(_num)] = {} |
Declares a bitmap as a variable.
Definition at line 60 of file BLI_bitmap.h.
Referenced by blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), and blender::tests::TEST().
| #define BLI_BITMAP_DISABLE | ( | _bitmap, | |
| _index ) |
Clear the value of a single bit at '_index'.
Definition at line 89 of file BLI_bitmap.h.
Referenced by BKE_lattice_bitmap_from_flag(), UniqueName_Value::mark_unused(), nlaevalchan_blend_value_get_inverted_lower_evalchan(), nlaevalchan_blend_value_get_inverted_upper_evalchan(), nlaevalchan_combine_value_get_inverted_lower_evalchan(), nlaevalchan_combine_value_get_inverted_upper_evalchan(), nlastrip_evaluate_transition(), and blender::tests::TEST().
| #define BLI_BITMAP_ENABLE | ( | _bitmap, | |
| _index ) |
Set the value of a single bit at '_index'.
Definition at line 82 of file BLI_bitmap.h.
Referenced by BKE_lattice_bitmap_from_flag(), BLI_astar_graph_solve(), BM_lnorspace_invalidate(), bm_loop_normal_mark_indiv_do_loop(), bm_mesh_loops_assign_normal_data(), bm_mesh_loops_split_lnor_fans(), build_emats_stack(), cage_mapped_verts_callback(), curve_select_less(), curve_select_more(), DRW_select_buffer_bitmap_from_circle(), DRW_select_buffer_bitmap_from_poly(), DRW_select_buffer_bitmap_from_rect(), drw_select_mask_px_cb(), DRW_sparse_uniform_buffer_ensure_item(), edbm_set_normals_from_faces_exec(), editmesh_partial_update_begin_fn(), face_edge_loop_islands_calc(), gather_frames_to_render(), gather_frames_to_render_for_adt(), gather_frames_to_render_for_grease_pencil(), get_vertexcos__mapFunc(), blender::gpu::GLShaderInterface::GLShaderInterface(), gradientVertInit__mapFunc(), hook_index_array_to_bitmap(), blender::bke::make_vertexcos__mapFunc(), UniqueName_Value::mark_used(), mesh_calc_hq_normal(), mesh_island_to_astar_graph_edge_process(), mesh_partial_ensure(), mesh_remove_doubles_on_axis(), MOD_get_texture_coords(), MOD_solidify_extrude_modifyMesh(), nla_eval_domain_action(), nlaevalchan_blend_value_get_inverted_lower_evalchan(), nlaevalchan_combine_value_get_inverted_lower_evalchan(), nlasnapshot_from_action(), normalEditModifier_do_directional(), normalEditModifier_do_radial(), partial_elem_face_ensure(), partial_elem_vert_ensure(), pyrna_enum_bitmap_from_set(), similar_vert_select_exec(), blender::ed::object::skin_armature_bone_create(), blender::bke::subdiv::subdiv_foreach_mark_non_loose_geometry(), blender::tests::TEST(), UniqueName_Value::use_if_unused(), UniqueName_Value::use_smallest_unused(), and blender::ed::object::vgroup_mirror().
| #define BLI_BITMAP_FLIP | ( | _bitmap, | |
| _index ) |
Flip the value of a single bit at '_index'.
Definition at line 96 of file BLI_bitmap.h.
| #define BLI_BITMAP_NEW | ( | _num, | |
| _alloc_string ) ((BLI_bitmap *)MEM_callocN(BLI_BITMAP_SIZE(_num), _alloc_string)) |
Allocate memory for a bitmap with '_num' bits; free with MEM_freeN().
Definition at line 41 of file BLI_bitmap.h.
Referenced by BKE_editmesh_vert_coords_alloc(), BKE_mesh_foreach_mapped_vert_coords_get(), BM_lnorspace_invalidate(), BM_loop_normal_editdata_array_init(), bm_mesh_loops_assign_normal_data(), bm_mesh_loops_split_lnor_fans(), BM_mesh_partial_create_from_verts(), BM_mesh_partial_create_from_verts_group_multi(), BM_mesh_partial_create_from_verts_group_single(), build_edge_mats(), buttons_duplicate(), buttons_init(), curve_select_less(), curve_select_more(), curve_select_random_exec(), DRW_select_buffer_bitmap_from_circle(), DRW_select_buffer_bitmap_from_poly(), DRW_select_buffer_bitmap_from_rect(), ed_lattice_select_mirrored(), edbm_set_normals_from_faces_exec(), editmesh_partial_update_begin_fn(), blender::draw::extract_lines_paint_mask(), blender::draw::extract_lines_paint_mask_subdiv(), face_edge_loop_islands_calc(), gather_frames_to_render(), blender::gpu::GLShaderInterface::GLShaderInterface(), hook_index_array_to_bitmap(), lattice_select_more_less(), blender::bke::mesh_get_mapped_verts_coords(), mesh_island_to_astar_graph(), mesh_partial_ensure(), mesh_remove_doubles_on_axis(), MOD_get_texture_coords(), MOD_solidify_extrude_modifyMesh(), blender::ed::object::modifier_skin_armature_create(), multires_mdisps_downsample_hidden(), multires_mdisps_upsample_hidden(), nlavalidmask_init(), normalEditModifier_do_directional(), normalEditModifier_do_radial(), paint_2d_bucket_fill(), paint_weight_gradient_exec(), pyrna_enum_bitmap_from_set(), similar_vert_select_exec(), blender::bke::subdiv::subdiv_foreach_ctx_init(), and blender::ed::object::vgroup_mirror().
| #define BLI_BITMAP_NEW_ALLOCA | ( | _num | ) | ((BLI_bitmap *)memset(alloca(BLI_BITMAP_SIZE(_num)), 0, BLI_BITMAP_SIZE(_num))) |
Allocate a bitmap on the stack.
Definition at line 47 of file BLI_bitmap.h.
| #define BLI_BITMAP_NEW_MEMARENA | ( | _mem, | |
| _num ) |
Allocate using given MemArena.
Definition at line 53 of file BLI_bitmap.h.
Referenced by BLI_astar_solution_init().
| #define BLI_BITMAP_RESIZE | ( | _bitmap, | |
| _num ) |
Resize bitmap to have space for '_num' bits.
Definition at line 118 of file BLI_bitmap.h.
Referenced by DRW_sparse_uniform_buffer_clear(), and DRW_sparse_uniform_buffer_ensure_item().
| #define BLI_BITMAP_SET | ( | _bitmap, | |
| _index, | |||
| _set ) |
Set or clear the value of a single bit at '_index'.
Definition at line 103 of file BLI_bitmap.h.
Referenced by BKE_animsys_nla_remap_keyframe_values(), BLI_rng_shuffle_bitmap(), buttons_main_region_property_search(), curve_select_random_exec(), gpencil_layer_cache_add(), grease_pencil_layer_cache_add(), multires_mdisps_downsample_hidden(), multires_mdisps_upsample_hidden(), nlaevalchan_blend_value_get_inverted_lower_evalchan(), nlaevalchan_blend_value_get_inverted_upper_evalchan(), nlaevalchan_combine_value_get_inverted_lower_evalchan(), nlaevalchan_combine_value_get_inverted_upper_evalchan(), paint_2d_bucket_fill(), paint_2d_fill_add_pixel_byte(), paint_2d_fill_add_pixel_float(), and property_search_all_tabs().
| #define BLI_BITMAP_SIZE | ( | _num | ) | ((size_t)(_BITMAP_NUM_BLOCKS(_num)) * sizeof(BLI_bitmap)) |
Size (in bytes) used to hold '_num' bits.
Definition at line 36 of file BLI_bitmap.h.
Referenced by blend_read_mdisps(), BLI_bitmap_copy_all(), BLI_bitmap_set_all(), GPENCIL_view_layer_data_ensure(), nlavalidmask_init(), and write_mdisps().
| #define BLI_BITMAP_TEST | ( | _bitmap, | |
| _index ) |
Get the value of a single bit at '_index'.
Definition at line 65 of file BLI_bitmap.h.
Referenced by BLI_astar_graph_solve(), BLI_rng_shuffle_bitmap(), BM_lnorspace_invalidate(), BM_loop_normal_editdata_array_init(), bm_loop_normal_mark_indiv_do_loop(), bm_mesh_loops_assign_normal_data(), bm_mesh_loops_split_lnor_fans(), BM_mesh_partial_create_from_verts(), BM_mesh_partial_create_from_verts_group_single(), build_emats_stack(), cage_mapped_verts_callback(), curve_select_less(), curve_select_more(), curve_select_random_exec(), deformVerts_do(), DRW_select_buffer_bitmap_from_poly(), DRW_sparse_uniform_buffer_clear(), DRW_sparse_uniform_buffer_ensure_item(), DRW_sparse_uniform_buffer_flush(), drw_sparse_uniform_buffer_get_ubo(), ED_buttons_tab_has_search_result(), ed_lattice_select_mirrored(), edbm_set_normals_from_faces_exec(), blender::draw::extract_lines_paint_mask_subdiv(), face_edge_loop_islands_calc(), get_vertexcos__mapFunc(), blender::gpu::GLShaderInterface::GLShaderInterface(), gpencil_draw_mask(), gradientVertInit__mapFunc(), lattice_test_bitmap_uvw(), blender::bke::make_vertexcos__mapFunc(), mesh_calc_islands_loop_face_uv(), mesh_island_to_astar_graph(), mesh_partial_ensure(), mesh_remove_doubles_on_axis(), MOD_get_texture_coords(), MOD_solidify_extrude_modifyMesh(), multires_mdisps_downsample_hidden(), multires_mdisps_upsample_hidden(), nladata_flush_channels(), normalEditModifier_do_directional(), normalEditModifier_do_radial(), paint_2d_fill_add_pixel_byte(), paint_2d_fill_add_pixel_float(), partial_elem_face_ensure(), partial_elem_vert_ensure(), property_search_move_to_next_tab_with_results(), similar_vert_select_exec(), blender::ed::object::skin_armature_bone_create(), and blender::ed::object::vgroup_mirror().
| #define BLI_BITMAP_TEST_AND_SET_ATOMIC | ( | _bitmap, | |
| _index ) |
Definition at line 69 of file BLI_bitmap.h.
Referenced by blender::draw::extract_lines_paint_mask_subdiv(), blender::bke::subdiv::subdiv_foreach_corner_vertices_regular_do(), blender::bke::subdiv::subdiv_foreach_corner_vertices_special_do(), blender::bke::subdiv::subdiv_foreach_edge_vertices_regular_do(), and blender::bke::subdiv::subdiv_foreach_edge_vertices_special_do().
| #define BLI_BITMAP_TEST_BOOL | ( | _bitmap, | |
| _index ) |
Definition at line 75 of file BLI_bitmap.h.
Referenced by BKE_animsys_nla_remap_keyframe_values(), do_lasso_select_mesh__doSelectEdge_pass0(), do_lasso_select_mesh__doSelectEdge_pass1(), do_mesh_box_select__doSelectEdge_pass0(), do_mesh_box_select__doSelectEdge_pass1(), edbm_backbuf_check_and_select_edges(), edbm_backbuf_check_and_select_faces(), edbm_backbuf_check_and_select_faces_obmode(), edbm_backbuf_check_and_select_verts(), edbm_backbuf_check_and_select_verts_obmode(), gpencil_draw_mask(), id_check_type(), nlaevalchan_blend_value(), nlaevalchan_blend_value_get_inverted_lower_evalchan(), nlaevalchan_blend_value_get_inverted_upper_evalchan(), nlaevalchan_combine_quaternion(), nlaevalchan_combine_quaternion_get_inverted_lower_evalchan(), nlaevalchan_combine_quaternion_handle_undefined_blend_values(), nlaevalchan_combine_value(), nlaevalchan_combine_value_get_inverted_lower_evalchan(), nlaevalchan_combine_value_get_inverted_upper_evalchan(), nlastrip_evaluate_transition(), screen_opengl_render_anim_step(), blender::bke::subdiv::subdiv_foreach_boundary_edges(), blender::bke::subdiv::subdiv_foreach_loose_vertices_task(), blender::bke::subdiv::subdiv_foreach_vertices_of_loose_edges_task(), blender::tests::TEST(), and UniqueName_Value::use_if_unused().
| typedef unsigned int BLI_bitmap |
Definition at line 17 of file BLI_bitmap.h.
| void BLI_bitmap_and_all | ( | BLI_bitmap * | dst, |
| const BLI_bitmap * | src, | ||
| size_t | bits ) |
Combine two bitmaps with boolean AND.
Definition at line 36 of file bitmap.c.
References _BITMAP_NUM_BLOCKS.
| void BLI_bitmap_copy_all | ( | BLI_bitmap * | dst, |
| const BLI_bitmap * | src, | ||
| size_t | bits ) |
Copy all bits from one bitmap to another.
Definition at line 31 of file bitmap.c.
References BLI_BITMAP_SIZE.
Referenced by nlaevalchan_blendOrcombine_try_copy_to_lower().
| int BLI_bitmap_find_first_unset | ( | const BLI_bitmap * | bitmap, |
| size_t | bits ) |
Find index of the lowest unset bit. Returns -1 if all the bits are set.
Definition at line 52 of file bitmap.c.
References _BITMAP_NUM_BLOCKS, _BITMAP_POWER, bitscan_forward_uint(), BLI_assert, and result.
Referenced by blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), and UniqueName_Value::use_smallest_unused().
| void BLI_bitmap_flip_all | ( | BLI_bitmap * | bitmap, |
| size_t | bits ) |
Invert all bits in the bitmap.
Definition at line 23 of file bitmap.c.
References _BITMAP_NUM_BLOCKS.
Referenced by blender::tests::TEST(), and blender::tests::TEST().
| void BLI_bitmap_or_all | ( | BLI_bitmap * | dst, |
| const BLI_bitmap * | src, | ||
| size_t | bits ) |
Combine two bitmaps with boolean OR.
Definition at line 44 of file bitmap.c.
References _BITMAP_NUM_BLOCKS.
| void BLI_bitmap_set_all | ( | BLI_bitmap * | bitmap, |
| bool | set, | ||
| size_t | bits ) |
Set or clear all bits in the bitmap.
Definition at line 18 of file bitmap.c.
References BLI_BITMAP_SIZE.
Referenced by BLI_astar_graph_solve(), DRW_sparse_uniform_buffer_clear(), gpencil_layer_cache_add(), grease_pencil_layer_cache_add(), nla_eval_domain_action(), nlaevalchan_blendOrcombine_get_inverted_upper_evalchan(), nlaevalchan_combine_quaternion_get_inverted_lower_evalchan(), nlaevalchan_combine_quaternion_get_inverted_upper_evalchan(), nlaevalchan_combine_quaternion_handle_undefined_blend_values(), nlasnapshot_enable_all_blend_domain(), and nlasnapshot_from_action().