Merge branch 'master' into blender2.8

This commit is contained in:
Campbell Barton 2018-08-09 08:20:06 +10:00
commit bf2d0782bc
Notes: blender-bot 2023-02-14 06:17:17 +01:00
Referenced by issue #56294, Collection Instance with Grease Pencil Object Crash
2 changed files with 23 additions and 0 deletions

View File

@ -357,6 +357,8 @@ void range_vn_u(unsigned int *array_tar, const int size, const unsigned int star
void range_vn_fl(float *array_tar, const int size, const float start, const float step);
void negate_vn(float *array_tar, const int size);
void negate_vn_vn(float *array_tar, const float *array_src, const int size);
void mul_vn_vn(float *array_tar, const float *array_src, const int size);
void mul_vn_vnvn(float *array_tar, const float *array_src_a, const float *array_src_b, const int size);
void mul_vn_fl(float *array_tar, const int size, const float f);
void mul_vn_vn_fl(float *array_tar, const float *array_src, const int size, const float f);
void add_vn_vn(float *array_tar, const float *array_src, const int size);

View File

@ -1096,6 +1096,27 @@ void negate_vn_vn(float *array_tar, const float *array_src, const int size)
}
}
void mul_vn_vn(float *array_tar, const float *array_src, const int size)
{
float *tar = array_tar + (size - 1);
const float *src = array_src + (size - 1);
int i = size;
while (i--) {
*(tar--) *= *(src--);
}
}
void mul_vn_vnvn(float *array_tar, const float *array_src_a, const float *array_src_b, const int size)
{
float *tar = array_tar + (size - 1);
const float *src_a = array_src_a + (size - 1);
const float *src_b = array_src_b + (size - 1);
int i = size;
while (i--) {
*(tar--) = *(src_a--) * *(src_b--);
}
}
void mul_vn_fl(float *array_tar, const int size, const float f)
{
float *array_pt = array_tar + (size - 1);