|
Blender V4.3
|
Classes | |
| struct | CopyPixelCommand |
| struct | CopyPixelGroup |
| struct | CopyPixelTile |
| struct | CopyPixelTiles |
| struct | DeltaCopyPixelCommand |
| struct | Edge |
| struct | NodeData |
| class | NonManifoldTileEdges |
| class | NonManifoldUVEdges |
| struct | PackedPixelRow |
| struct | PBVHData |
| class | PixelNodesTileData |
| struct | Rows |
| struct | UDIMTilePixels |
| struct | UDIMTileUndo |
| struct | UVPrimitiveLookup |
| struct | UVPrimitivePaintInput |
| struct | Vertex |
Enumerations | |
| enum class | CoordSpace { UV , Tile } |
Functions | |
| NodeData & | node_data_get (blender::bke::pbvh::Node &node) |
| void | mark_image_dirty (blender::bke::pbvh::Node &node, Image &image, ImageUser &image_user) |
| PBVHData & | data_get (blender::bke::pbvh::Tree &pbvh) |
| void | collect_dirty_tiles (blender::bke::pbvh::Node &node, Vector< image::TileNumber > &r_dirty_tiles) |
| void | copy_pixels (blender::bke::pbvh::Tree &pbvh, Image &image, ImageUser &image_user, image::TileNumber tile_number) |
| static float2 | calc_barycentric_delta (const float2 uvs[3], const float2 start_uv, const float2 end_uv) |
| static float2 | calc_barycentric_delta_x (const ImBuf *image_buffer, const float2 uvs[3], const int x, const int y) |
| static void | extract_barycentric_pixels (UDIMTilePixels &tile_data, const ImBuf *image_buffer, const uv_islands::UVIslandsMask &uv_mask, const int uv_island_index, const int uv_primitive_index, const float2 uvs[3], const float2 tile_offset, const int minx, const int miny, const int maxx, const int maxy) |
| static void | update_geom_primitives (Tree &pbvh, const uv_islands::MeshData &mesh_data) |
| static void | do_encode_pixels (const uv_islands::MeshData &mesh_data, const uv_islands::UVIslandsMask &uv_masks, const UVPrimitiveLookup &uv_prim_lookup, Image &image, ImageUser &image_user, MeshNode &node) |
| static bool | should_pixels_be_updated (const Node &node) |
| static int | count_nodes_to_update (Tree &pbvh) |
| static bool | find_nodes_to_update (Tree &pbvh, Vector< MeshNode * > &r_nodes_to_update) |
| static void | apply_watertight_check (Tree &pbvh, Image &image, ImageUser &image_user) |
| static bool | update_pixels (const Depsgraph &depsgraph, const Object &object, Tree &pbvh, Image &image, ImageUser &image_user) |
| static rcti | get_bounds (const Edge< CoordSpace::Tile > &tile_edge) |
| static void | add_margin (rcti &bounds, int margin) |
| static void | clamp (rcti &bounds, int2 resolution) |
| static const Vertex< CoordSpace::Tile > | convert_coord_space (const Vertex< CoordSpace::UV > &uv_vertex, const image::ImageTileWrapper image_tile, const int2 tile_resolution) |
| static const Edge< CoordSpace::Tile > | convert_coord_space (const Edge< CoordSpace::UV > &uv_edge, const image::ImageTileWrapper image_tile, const int2 tile_resolution) |
| void | copy_update (blender::bke::pbvh::Tree &pbvh, Image &image, ImageUser &image_user, const uv_islands::MeshData &mesh_data) |
Variables | |
| constexpr bool | USE_WATERTIGHT_CHECK = false |
| const int | THREADING_GRAIN_SIZE = 128 |
|
strong |
Coordinate space of a coordinate.
| Enumerator | |
|---|---|
| UV | Coordinate is in UV coordinate space. As in unmodified from mesh data. |
| Tile | Coordinate is in Tile coordinate space. With tile coordinate space each unit is a single pixel of the tile. Range is [0..buffer width]. |
Definition at line 29 of file pbvh_pixels_copy.cc.
Add a margin to the given bounds.
Definition at line 64 of file pbvh_pixels_copy.cc.
References rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by blender::bke::pbvh::pixels::Rows::filter_pixels_for_closer_examination(), and blender::bke::pbvh::pixels::Rows::find_copy_source().
|
static |
Definition at line 295 of file pbvh_pixels.cc.
References BKE_image_acquire_ibuf(), BKE_image_partial_update_mark_full_update(), BKE_image_release_ibuf(), ImBuf::byte_buffer, copy_v4_fl(), copy_v4_uchar(), ImBufByteBuffer::data, ImBufFloatBuffer::data, blender::bke::pbvh::pixels::NodeData::find_tile_data(), ImBuf::float_buffer, blender::bke::image::ImageTileWrapper::get_tile_number(), LISTBASE_FOREACH, blender::bke::pbvh::Tree::nodes(), PBVH_Leaf, blender::bke::pbvh::pixels::UDIMTilePixels::pixel_rows, ImageUser::tile, and ImBuf::x.
|
static |
Calculate the delta of two neighbor UV coordinates in the given image buffer.
Definition at line 32 of file pbvh_pixels.cc.
References barycentric_weights_v2().
Referenced by calc_barycentric_delta_x().
|
static |
Definition at line 45 of file pbvh_pixels.cc.
References calc_barycentric_delta(), ImBuf::x, and ImBuf::y.
Referenced by do_encode_pixels().
Clamp bounds to be between 0,0 and the given resolution.
Definition at line 73 of file pbvh_pixels_copy.cc.
References BLI_rcti_init(), and BLI_rcti_isect().
Referenced by blender::bke::pbvh::pixels::Rows::find_copy_source().
| void blender::bke::pbvh::pixels::collect_dirty_tiles | ( | blender::bke::pbvh::Node & | node, |
| Vector< image::TileNumber > & | r_dirty_tiles ) |
Definition at line 480 of file pbvh_pixels.cc.
References collect_dirty_tiles(), and blender::bke::pbvh::pixels::NodeData::collect_dirty_tiles().
Referenced by collect_dirty_tiles(), blender::ed::sculpt_paint::paint::image::collect_dirty_tiles(), and blender::ed::sculpt_paint::paint::image::fix_non_manifold_seam_bleeding().
|
static |
Definition at line 88 of file pbvh_pixels_copy.cc.
References convert_coord_space(), blender::bke::pbvh::pixels::Edge< Space >::vertex_1, and blender::bke::pbvh::pixels::Edge< Space >::vertex_2.
|
static |
Definition at line 80 of file pbvh_pixels_copy.cc.
References blender::bke::pbvh::pixels::Vertex< Space >::coordinate, and blender::bke::image::ImageTileWrapper::get_tile_offset().
Referenced by convert_coord_space(), and blender::bke::pbvh::pixels::NonManifoldUVEdges::extract_tile_edges().
| void blender::bke::pbvh::pixels::copy_pixels | ( | blender::bke::pbvh::Tree & | pbvh, |
| Image & | image, | ||
| ImageUser & | image_user, | ||
| image::TileNumber | tile_number ) |
Definition at line 557 of file pbvh_pixels_copy.cc.
References BKE_image_acquire_ibuf(), BKE_image_release_ibuf(), copy_pixels(), data_get(), blender::bke::pbvh::pixels::CopyPixelTiles::find_tile(), THREADING_GRAIN_SIZE, ImageUser::tile, tile, and blender::bke::pbvh::pixels::PBVHData::tiles_copy_pixels.
Referenced by copy_pixels(), and blender::ed::sculpt_paint::paint::image::fix_non_manifold_seam_bleeding().
| void blender::bke::pbvh::pixels::copy_update | ( | blender::bke::pbvh::Tree & | pbvh, |
| Image & | image, | ||
| ImageUser & | image_user, | ||
| const uv_islands::MeshData & | mesh_data ) |
Definition at line 512 of file pbvh_pixels_copy.cc.
References BKE_image_acquire_ibuf(), BKE_image_release_ibuf(), blender::bke::pbvh::pixels::CopyPixelTiles::clear(), copy_update(), data_get(), blender::bke::pbvh::pixels::NonManifoldUVEdges::extract_tile_edges(), blender::bke::pbvh::pixels::Rows::filter_pixels_for_closer_examination(), blender::bke::pbvh::pixels::Rows::find_copy_source(), blender::bke::image::ImageTileWrapper::get_tile_number(), blender::bke::pbvh::pixels::Rows::init_pixels(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), LISTBASE_FOREACH, blender::bke::pbvh::pixels::Rows::mark_pixels_effected_by_brush(), blender::bke::pbvh::pixels::Rows::pack_into(), blender::bke::pbvh::pixels::CopyPixelTile::print_compression_rate(), ImageUser::tile, tile, blender::bke::pbvh::pixels::CopyPixelTiles::tiles, blender::bke::pbvh::pixels::PBVHData::tiles_copy_pixels, ImBuf::x, and ImBuf::y.
Referenced by copy_update().
Definition at line 236 of file pbvh_pixels.cc.
References blender::bke::pbvh::Tree::nodes(), result, and should_pixels_be_updated().
Referenced by find_nodes_to_update().
| PBVHData & blender::bke::pbvh::pixels::data_get | ( | blender::bke::pbvh::Tree & | pbvh | ) |
Definition at line 452 of file pbvh_pixels.cc.
References BLI_assert, data, data_get(), and blender::bke::pbvh::Tree::pixels_.
Referenced by copy_pixels(), copy_update(), data_get(), blender::ed::sculpt_paint::paint::image::do_paint_pixels(), and update_geom_primitives().
|
static |
Definition at line 145 of file pbvh_pixels.cc.
References BKE_image_acquire_ibuf(), BKE_image_release_ibuf(), calc_barycentric_delta_x(), ceil(), clamp_f(), blender::bke::pbvh::pixels::UVPrimitivePaintInput::delta_barycentric_coord_u, extract_barycentric_pixels(), blender::bke::mesh::face_triangles_range(), blender::bke::pbvh::uv_islands::MeshData::faces, floor(), blender::bke::image::ImageTileWrapper::get_tile_number(), blender::bke::image::ImageTileWrapper::get_tile_offset(), LISTBASE_FOREACH, blender::bke::pbvh::pixels::UVPrimitiveLookup::lookup, max_fff(), min_fff(), min_ii(), blender::bke::pbvh::pixels::UDIMTilePixels::pixel_rows, ImageUser::tile, tile, blender::bke::pbvh::pixels::UDIMTilePixels::tile_number, blender::bke::pbvh::pixels::NodeData::tiles, blender::bke::pbvh::pixels::NodeData::uv_primitives, ImBuf::x, and ImBuf::y.
|
static |
Definition at line 61 of file pbvh_pixels.cc.
References barycentric_inside_triangle_v2(), barycentric_weights(), barycentric_weights_v2(), is_inside(), blender::bke::pbvh::uv_islands::UVIslandsMask::is_masked(), blender::bke::pbvh::pixels::PackedPixelRow::num_pixels, blender::bke::pbvh::pixels::UDIMTilePixels::pixel_rows, blender::bke::pbvh::pixels::PackedPixelRow::start_barycentric_coord, blender::bke::pbvh::pixels::PackedPixelRow::start_image_coordinate, blender::bke::pbvh::pixels::PackedPixelRow::uv_primitive_index, ImBuf::x, x, and ImBuf::y.
Referenced by do_encode_pixels().
|
static |
Find the nodes that needs to be updated.
The nodes that require updated are added to the r_nodes_to_update parameter. Will fill in r_visited_polygons with polygons that are owned by nodes that do not require updates.
returns if there were any nodes found (true).
Definition at line 256 of file pbvh_pixels.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::bke::pbvh::pixels::NodeData::clear_data(), blender::bke::pbvh::pixels::PBVHData::clear_data(), count_nodes_to_update(), blender::bke::pbvh::Tree::nodes(), PBVH_RebuildPixels, blender::bke::pbvh::Tree::pixels_, blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), and should_pixels_be_updated().
Referenced by update_pixels().
|
static |
Calculate the bounds of the given edge.
Definition at line 54 of file pbvh_pixels_copy.cc.
References BLI_rcti_do_minmax_v(), BLI_rcti_init_minmax(), blender::bke::pbvh::pixels::Edge< Space >::vertex_1, and blender::bke::pbvh::pixels::Edge< Space >::vertex_2.
Referenced by blender::bke::pbvh::pixels::Rows::filter_pixels_for_closer_examination().
| void blender::bke::pbvh::pixels::mark_image_dirty | ( | blender::bke::pbvh::Node & | node, |
| Image & | image, | ||
| ImageUser & | image_user ) |
Definition at line 459 of file pbvh_pixels.cc.
References BKE_image_acquire_ibuf(), BKE_image_release_ibuf(), BLI_assert, blender::bke::pbvh::pixels::NodeData::dirty, blender::bke::pbvh::pixels::NodeData::flags, blender::bke::image::ImageTileWrapper::get_tile_number(), LISTBASE_FOREACH, mark_image_dirty(), blender::bke::pbvh::pixels::NodeData::mark_region(), ImageUser::tile, and tile.
Referenced by mark_image_dirty().
| NodeData & blender::bke::pbvh::pixels::node_data_get | ( | blender::bke::pbvh::Node & | node | ) |
Definition at line 445 of file pbvh_pixels.cc.
References BLI_assert, and node_data_get().
Referenced by blender::ed::sculpt_paint::paint::image::do_paint_pixels(), blender::ed::sculpt_paint::paint::image::do_push_undo_tile(), and node_data_get().
|
static |
Definition at line 218 of file pbvh_pixels.cc.
References PBVH_Leaf, PBVH_RebuildPixels, and PBVH_TexLeaf.
Referenced by count_nodes_to_update(), and find_nodes_to_update().
|
static |
Update the geometry primitives of the pbvh.
Definition at line 106 of file pbvh_pixels.cc.
References blender::bke::pbvh::uv_islands::MeshData::corner_tris, blender::bke::pbvh::uv_islands::MeshData::corner_verts, data_get(), blender::Span< T >::size(), blender::bke::pbvh::pixels::PBVHData::vert_tris, and blender::bke::mesh::vert_tris_from_corner_tris().
Referenced by update_pixels().
|
static |
Definition at line 335 of file pbvh_pixels.cc.
References blender::bke::pbvh::uv_islands::UVIslandsMask::add(), blender::bke::pbvh::uv_islands::UVIslandsMask::add_tile(), BKE_image_acquire_ibuf(), BKE_image_release_ibuf(), CD_PROP_FLOAT2, blender::bke::Corner, CustomData_get_active_layer_name(), depsgraph, blender::bke::pbvh::uv_islands::UVIslandsMask::dilate(), find_nodes_to_update(), blender::bke::image::ImageTileWrapper::get_tile_number(), blender::bke::image::ImageTileWrapper::get_tile_x_offset(), blender::bke::image::ImageTileWrapper::get_tile_y_offset(), blender::Vector< T, InlineBufferCapacity, Allocator >::index_range(), blender::StringRefBase::is_empty(), LISTBASE_FOREACH, blender::threading::parallel_for(), ImageUser::tile, update_geom_primitives(), blender::bke::pbvh::vert_positions_eval(), ImBuf::x, and ImBuf::y.
Referenced by blender::bke::pbvh::build_pixels().
| const int blender::bke::pbvh::pixels::THREADING_GRAIN_SIZE = 128 |
Definition at line 26 of file pbvh_pixels_copy.cc.
Referenced by copy_pixels(), and blender::bke::pbvh::pixels::Rows::find_copy_source().
|
constexpr |
During debugging this check could be enabled. It will write to each image pixel that is covered by the Tree.
Definition at line 59 of file pbvh_pixels.cc.