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:
authorLukas Stockner <lukasstockner97>2020-02-15 03:49:50 +0300
committerLukas Stockner <lukas.stockner@freenet.de>2020-02-15 05:37:20 +0300
commitf6aafd5186bd921637df755797c7ff6f3036a361 (patch)
tree8a09a244cb18e926907cfeb9df7674063b702ae0 /source/blender/blenlib/intern
parentfa4ab69abf5750857e0b79295b13efa73aef0766 (diff)
Modifiers: Add option to directly specify a 2D transform for UVWarp
Currently the only option is to warp based on the transform of other objects, which is inconvenient if you want to e.g. control it through a driver - you need to set up a dummy object and go through that, which is clunky and should be unneccessary. Reviewed By: brecht Differential Revision: https://developer.blender.org/D6690
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r--source/blender/blenlib/intern/math_matrix.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c
index 4d8a2f72eca..86a08a42247 100644
--- a/source/blender/blenlib/intern/math_matrix.c
+++ b/source/blender/blenlib/intern/math_matrix.c
@@ -210,6 +210,16 @@ void swap_m4m4(float m1[4][4], float m2[4][4])
}
}
+void shuffle_m4(float R[4][4], int index[4])
+{
+ zero_m4(R);
+ for (int k = 0; k < 4; k++) {
+ if (index[k] >= 0) {
+ R[index[k]][k] = 1.0f;
+ }
+ }
+}
+
/******************************** Arithmetic *********************************/
void mul_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])