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:
authorJulian Eisel <julian@blender.org>2020-06-16 12:31:58 +0300
committerJulian Eisel <julian@blender.org>2020-06-16 12:31:58 +0300
commit87df15190210eb84ef52e5dccc2932918f912da5 (patch)
tree94c4d71ed7c20b2fd7ebac4ce50a736ed165b1d0 /source/blender/editors/transform/transform_convert.c
parentd73920831de0a87faa0c91261dc2ff8d07913318 (diff)
parentcfde6ebf450594faa57c4bfeaecff10fe512c91b (diff)
Merge branch 'asset-uuid' into asset-engine
Diffstat (limited to 'source/blender/editors/transform/transform_convert.c')
-rw-r--r--source/blender/editors/transform/transform_convert.c35
1 files changed, 7 insertions, 28 deletions
diff --git a/source/blender/editors/transform/transform_convert.c b/source/blender/editors/transform/transform_convert.c
index 8496642185d..064057990e0 100644
--- a/source/blender/editors/transform/transform_convert.c
+++ b/source/blender/editors/transform/transform_convert.c
@@ -55,7 +55,6 @@
#include "DEG_depsgraph_build.h"
#include "transform.h"
-#include "transform_mode.h"
#include "transform_snap.h"
/* Own include. */
@@ -70,41 +69,21 @@ bool transform_mode_use_local_origins(const TransInfo *t)
* Transforming around ourselves is no use, fallback to individual origins,
* useful for curve/armatures.
*/
-void transform_around_single_fallback(TransInfo *t)
+void transform_around_single_fallback_ex(TransInfo *t, int data_len_all)
{
if ((ELEM(t->around, V3D_AROUND_CENTER_BOUNDS, V3D_AROUND_CENTER_MEDIAN, V3D_AROUND_ACTIVE)) &&
transform_mode_use_local_origins(t)) {
-
- bool is_data_single = false;
- if (t->data_len_all == 1) {
- is_data_single = true;
- }
- else if (t->data_len_all == 3) {
- if (t->obedit_type == OB_CURVE) {
- /* Special case check for curve, if we have a single curve bezier triple selected
- * treat */
- FOREACH_TRANS_DATA_CONTAINER (t, tc) {
- if (!tc->data_len) {
- continue;
- }
- if (tc->data_len == 3) {
- const TransData *td = tc->data;
- if ((td[0].flag | td[1].flag | td[2].flag) & TD_BEZTRIPLE) {
- if ((td[0].loc == td[1].loc) && (td[1].loc == td[2].loc)) {
- is_data_single = true;
- }
- }
- }
- break;
- }
- }
- }
- if (is_data_single) {
+ if (data_len_all == 1) {
t->around = V3D_AROUND_LOCAL_ORIGINS;
}
}
}
+void transform_around_single_fallback(TransInfo *t)
+{
+ transform_around_single_fallback_ex(t, t->data_len_all);
+}
+
/* -------------------------------------------------------------------- */
/** \name Proportional Editing
* \{ */