Blender V4.3
crazyspace.cc File Reference
#include "MEM_guardedalloc.h"
#include "DNA_mesh_types.h"
#include "DNA_modifier_types.h"
#include "DNA_object_types.h"
#include "BLI_linklist.h"
#include "BLI_math_matrix.h"
#include "BLI_math_rotation.h"
#include "BLI_utildefines.h"
#include "BKE_crazyspace.hh"
#include "BKE_curves.hh"
#include "BKE_editmesh.hh"
#include "BKE_geometry_set.hh"
#include "BKE_grease_pencil.hh"
#include "BKE_lib_id.hh"
#include "BKE_mesh.hh"
#include "BKE_mesh_runtime.hh"
#include "BKE_mesh_wrapper.hh"
#include "BKE_modifier.hh"
#include "BKE_multires.hh"
#include "BKE_object_types.hh"
#include "BKE_report.hh"
#include "DEG_depsgraph_query.hh"

Go to the source code of this file.

Namespaces

namespace  blender
 
namespace  blender::bke
 
namespace  blender::bke::crazyspace
 

Functions

BLI_INLINE void tan_calc_quat_v3 (float r_quat[4], const float co_1[3], const float co_2[3], const float co_3[3])
 
static void set_crazy_vertex_quat (float r_quat[4], const float co_1[3], const float co_2[3], const float co_3[3], const float vd_1[3], const float vd_2[3], const float vd_3[3])
 
static bool modifiers_disable_subsurf_temporary (Object *ob, const int cageIndex)
 
blender::Array< blender::float3BKE_crazyspace_get_mapped_editverts (Depsgraph *depsgraph, Object *obedit)
 
void BKE_crazyspace_set_quats_editmesh (BMEditMesh *em, const blender::Span< blender::float3 > origcos, const blender::Span< blender::float3 > mappedcos, float(*quats)[4], const bool use_select)
 
void BKE_crazyspace_set_quats_mesh (Mesh *mesh, const blender::Span< blender::float3 > origcos, const blender::Span< blender::float3 > mappedcos, float(*quats)[4])
 
int BKE_crazyspace_get_first_deform_matrices_editbmesh (Depsgraph *depsgraph, Scene *scene, Object *ob, BMEditMesh *em, blender::Array< blender::float3x3, 0 > &deformmats, blender::Array< blender::float3, 0 > &deformcos)
 
static void crazyspace_init_object_for_eval (Depsgraph *depsgraph, Object *object, Object *object_crazy)
 
static bool crazyspace_modifier_supports_deform_matrices (ModifierData *md)
 
static bool crazyspace_modifier_supports_deform (ModifierData *md)
 
int BKE_sculpt_get_first_deform_matrices (Depsgraph *depsgraph, Scene *scene, Object *object, blender::Array< blender::float3x3, 0 > &deformmats, blender::Array< blender::float3, 0 > &deformcos)
 
void BKE_crazyspace_build_sculpt (Depsgraph *depsgraph, Scene *scene, Object *object, blender::Array< blender::float3x3, 0 > &deformmats, blender::Array< blender::float3, 0 > &deformcos)
 
GeometryDeformation blender::bke::crazyspace::get_evaluated_curves_deformation (const Object *ob_eval, const Object &ob_orig)
 
GeometryDeformation blender::bke::crazyspace::get_evaluated_curves_deformation (const Depsgraph &depsgraph, const Object &ob_orig)
 
GeometryDeformation blender::bke::crazyspace::get_evaluated_grease_pencil_drawing_deformation (const Object *ob_eval, const Object &ob_orig, int layer_index, int frame)
 
GeometryDeformation blender::bke::crazyspace::get_evaluated_grease_pencil_drawing_deformation (const Depsgraph &depsgraph, const Object &ob_orig, int layer_index, int frame)
 
Crazyspace API
void BKE_crazyspace_api_eval (Depsgraph *depsgraph, Scene *scene, Object *object, ReportList *reports)
 
void BKE_crazyspace_api_displacement_to_deformed (Object *object, ReportList *reports, int vertex_index, const float displacement[3], float r_displacement_deformed[3])
 
void BKE_crazyspace_api_displacement_to_original (Object *object, ReportList *reports, int vertex_index, const float displacement_deformed[3], float r_displacement[3])
 
void BKE_crazyspace_api_eval_clear (Object *object)
 

Function Documentation

◆ BKE_crazyspace_api_displacement_to_deformed()

void BKE_crazyspace_api_displacement_to_deformed ( Object * object,
ReportList * reports,
int vertex_index,
const float displacement[3],
float r_displacement_deformed[3] )

Definition at line 512 of file crazyspace.cc.

References BKE_reportf(), mul_v3_m3v3(), and RPT_ERROR.

◆ BKE_crazyspace_api_displacement_to_original()

void BKE_crazyspace_api_displacement_to_original ( Object * object,
ReportList * reports,
int vertex_index,
const float displacement_deformed[3],
float r_displacement[3] )

Definition at line 532 of file crazyspace.cc.

References BKE_reportf(), copy_v3_v3(), invert_m3_m3(), mul_v3_m3v3(), and RPT_ERROR.

◆ BKE_crazyspace_api_eval()

void BKE_crazyspace_api_eval ( Depsgraph * depsgraph,
Scene * scene,
Object * object,
ReportList * reports )

Definition at line 487 of file crazyspace.cc.

References BKE_crazyspace_build_sculpt(), BKE_report(), depsgraph, OB_MESH, and RPT_ERROR.

◆ BKE_crazyspace_api_eval_clear()

void BKE_crazyspace_api_eval_clear ( Object * object)

Definition at line 556 of file crazyspace.cc.

Referenced by BKE_object_free_derived_caches().

◆ BKE_crazyspace_build_sculpt()

◆ BKE_crazyspace_get_first_deform_matrices_editbmesh()

◆ BKE_crazyspace_get_mapped_editverts()

◆ BKE_crazyspace_set_quats_editmesh()

◆ BKE_crazyspace_set_quats_mesh()

void BKE_crazyspace_set_quats_mesh ( Mesh * mesh,
const blender::Span< blender::float3 > origcos,
const blender::Span< blender::float3 > mappedcos,
float(*) quats[4] )

Definition at line 184 of file crazyspace.cc.

References blender::Span< T >::is_empty(), and set_crazy_vertex_quat().

Referenced by BKE_crazyspace_build_sculpt().

◆ BKE_sculpt_get_first_deform_matrices()

◆ crazyspace_init_object_for_eval()

static void crazyspace_init_object_for_eval ( Depsgraph * depsgraph,
Object * object,
Object * object_crazy )
static

Crazy-space evaluation needs to have an object which has all the fields evaluated, but the mesh data being at undeformed state. This way it can re-apply modifiers and also have proper pointers to key data blocks.

Similar to BKE_object_eval_reset(), but does not modify the actual evaluated object.

Definition at line 300 of file crazyspace.cc.

References Object::data, DEG_get_evaluated_object(), depsgraph, and Object::runtime.

Referenced by BKE_crazyspace_build_sculpt(), and BKE_sculpt_get_first_deform_matrices().

◆ crazyspace_modifier_supports_deform()

static bool crazyspace_modifier_supports_deform ( ModifierData * md)
static

◆ crazyspace_modifier_supports_deform_matrices()

static bool crazyspace_modifier_supports_deform_matrices ( ModifierData * md)
static

◆ modifiers_disable_subsurf_temporary()

static bool modifiers_disable_subsurf_temporary ( Object * ob,
const int cageIndex )
static

◆ set_crazy_vertex_quat()

static void set_crazy_vertex_quat ( float r_quat[4],
const float co_1[3],
const float co_2[3],
const float co_3[3],
const float vd_1[3],
const float vd_2[3],
const float vd_3[3] )
static

◆ tan_calc_quat_v3()

BLI_INLINE void tan_calc_quat_v3 ( float r_quat[4],
const float co_1[3],
const float co_2[3],
const float co_3[3] )

Definition at line 36 of file crazyspace.cc.

References cross_v3_v3v3(), nor, normalize_v3(), sub_v3_v3v3(), tri_to_quat_ex(), and unit_qt().

Referenced by set_crazy_vertex_quat().