|
Blender
V3.3
|
#include "MEM_guardedalloc.h"#include "BLI_listbase.h"#include "BLI_math.h"#include "DNA_mesh_types.h"#include "DNA_object_types.h"#include "BKE_context.h"#include "BKE_customdata.h"#include "BKE_mesh_iterators.h"#include "BKE_mesh_runtime.h"#include "DEG_depsgraph.h"#include "DEG_depsgraph_query.h"#include "ED_screen.h"#include "ED_view3d.h"#include "paint_intern.h"Go to the source code of this file.
Classes | |
| struct | VertProjHandle |
| struct | VertProjUpdate |
Functions | |
| static void | vpaint_proj_dm_map_cosnos_init__map_cb (void *userData, int index, const float co[3], const float no[3]) |
| static void | vpaint_proj_dm_map_cosnos_init (struct Depsgraph *depsgraph, Scene *UNUSED(scene), Object *ob, struct VertProjHandle *vp_handle) |
| static void | vpaint_proj_dm_map_cosnos_update__map_cb (void *userData, int index, const float co[3], const float no[3]) |
| static void | vpaint_proj_dm_map_cosnos_update (struct Depsgraph *depsgraph, struct VertProjHandle *vp_handle, ARegion *region, const float mval_fl[2]) |
| struct VertProjHandle * | ED_vpaint_proj_handle_create (struct Depsgraph *depsgraph, Scene *scene, Object *ob, CoNo **r_vcosnos) |
| void | ED_vpaint_proj_handle_update (struct Depsgraph *depsgraph, struct VertProjHandle *vp_handle, ARegion *region, const float mval_fl[2]) |
| void | ED_vpaint_proj_handle_free (struct VertProjHandle *vp_handle) |
Utility functions for getting vertex locations while painting (since they may be instanced multiple times in an evaluated mesh)
Definition in file paint_vertex_proj.c.
| struct VertProjHandle* ED_vpaint_proj_handle_create | ( | struct Depsgraph * | depsgraph, |
| Scene * | scene, | ||
| Object * | ob, | ||
| CoNo ** | r_vcosnos | ||
| ) |
Definition at line 163 of file paint_vertex_proj.c.
References Object::data, depsgraph, VertProjHandle::dists_sq, MEM_mallocN, NULL, VertProjHandle::ob, scene, VertProjHandle::scene, Mesh::totvert, VertProjHandle::use_update, VertProjHandle::vcosnos, and vpaint_proj_dm_map_cosnos_init().
Referenced by vpaint_init_vpaint().
| void ED_vpaint_proj_handle_free | ( | struct VertProjHandle * | vp_handle | ) |
Definition at line 205 of file paint_vertex_proj.c.
References VertProjHandle::dists_sq, MEM_freeN, VertProjHandle::use_update, and VertProjHandle::vcosnos.
Referenced by vpaint_free_vpaintdata().
| void ED_vpaint_proj_handle_update | ( | struct Depsgraph * | depsgraph, |
| struct VertProjHandle * | vp_handle, | ||
| ARegion * | region, | ||
| const float | mval_fl[2] | ||
| ) |
Definition at line 195 of file paint_vertex_proj.c.
References depsgraph, VertProjHandle::use_update, and vpaint_proj_dm_map_cosnos_update().
|
static |
Definition at line 78 of file paint_vertex_proj.c.
References BKE_mesh_foreach_mapped_vert(), CD_MASK_BAREMESH_ORIGINDEX, Object::data, DEG_get_evaluated_object(), DEG_get_evaluated_scene(), depsgraph, MESH_FOREACH_USE_NORMAL, mesh_get_eval_final(), VertProjHandle::ob, Mesh::totvert, VertProjHandle::vcosnos, and vpaint_proj_dm_map_cosnos_init__map_cb().
Referenced by ED_vpaint_proj_handle_create().
|
static |
Definition at line 59 of file paint_vertex_proj.c.
References CoNo::co, copy_v3_v3(), is_zero_v3(), CoNo::no, VertProjHandle::use_update, and VertProjHandle::vcosnos.
Referenced by vpaint_proj_dm_map_cosnos_init().
|
static |
Definition at line 137 of file paint_vertex_proj.c.
References BKE_mesh_foreach_mapped_vert(), BLI_assert, BLI_listbase_is_empty(), CD_MASK_BAREMESH_ORIGINDEX, copy_vn_fl(), Object::data, DEG_get_evaluated_object(), DEG_get_evaluated_scene(), depsgraph, VertProjHandle::dists_sq, MESH_FOREACH_USE_NORMAL, mesh_get_eval_final(), Object::modifiers, VertProjUpdate::mval_fl, VertProjHandle::ob, VertProjUpdate::region, Mesh::totvert, VertProjUpdate::vp_handle, and vpaint_proj_dm_map_cosnos_update__map_cb().
Referenced by ED_vpaint_proj_handle_update().
|
static |
Definition at line 100 of file paint_vertex_proj.c.
References CoNo::co, copy_v3_v3(), VertProjHandle::dists_sq, ED_view3d_project_float_object(), len_squared_v2v2(), VertProjUpdate::mval_fl, CoNo::no, VertProjUpdate::region, V3D_PROJ_RET_OK, V3D_PROJ_TEST_CLIP_BB, V3D_PROJ_TEST_CLIP_NEAR, VertProjHandle::vcosnos, and VertProjUpdate::vp_handle.
Referenced by vpaint_proj_dm_map_cosnos_update().