Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey@blender.org>2022-01-05 11:53:48 +0300
committerSergey Sharybin <sergey@blender.org>2022-01-25 16:43:44 +0300
commit196da819ba4cf553c76468a091966f33081efb08 (patch)
tree0d289d01aa832fd7a629df02d106daffdb64a462 /source/blender/editors/object
parent31296f6f9d67570920c143be24b26e28f10a0ebb (diff)
Python: Expose crazyspace correction functionality via RNA
Allows to perform correction of coordinate delta/displacement in a similar way of how sculpt mode handles sculpting on a deformed mesh. An example of usecase of this is allowing riggers and sciprters to improve corrective shapekey workflow. The usage consists of pre-processing and access. For example: object.crazyspace_eval(depsgraph, scene) # When we have a difference between two vertices and want to convert # it to a space to be stored, say, in shapekey: delta_in_orig_space = rigged_ob.crazyspace_displacement_to_original( vertex_index=i, displacement=delta) # The reverse of above. delta_in_deformed_space = rigged_ob.crazyspace_displacement_to_deformed( vertex_index=i, displacement=delta) object.crazyspace_eval_clear() Fuller explanation with actual usecases and studio examples are written in the comment: https://developer.blender.org/D13892#368898 Differential Revision: https://developer.blender.org/D13892
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_shapekey.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/object/object_shapekey.c b/source/blender/editors/object/object_shapekey.c
index fd649854d8f..a871ddea48c 100644
--- a/source/blender/editors/object/object_shapekey.c
+++ b/source/blender/editors/object/object_shapekey.c
@@ -43,13 +43,16 @@
#include "DNA_object_types.h"
#include "BKE_context.h"
+#include "BKE_crazyspace.h"
#include "BKE_key.h"
#include "BKE_lattice.h"
#include "BKE_main.h"
#include "BKE_object.h"
+#include "BKE_report.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
+#include "DEG_depsgraph_query.h"
#include "BLI_sys_types.h" /* for intptr_t support */