[Bf-blender-cvs] [4f392784e63] temp-object-multi-mode: Finally compiles, not working though

Campbell Barton noreply at git.blender.org
Tue Apr 10 19:11:58 CEST 2018


Commit: 4f392784e6314c36ab7837f8d7829107a282f5ee
Author: Campbell Barton
Date:   Tue Apr 10 08:25:48 2018 +0200
Branches: temp-object-multi-mode
https://developer.blender.org/rB4f392784e6314c36ab7837f8d7829107a282f5ee

Finally compiles, not working though

===================================================================

M	source/blender/editors/transform/transform_conversions.c
M	source/blender/editors/transform/transform_generics.c

===================================================================

diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 3eeeab31512..bcb4164f5d3 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -8557,4 +8557,9 @@ void createTransData(bContext *C, TransInfo *t)
 			}
 		}
 	}
+
+	BLI_assert(t->total_all_handle == 0);
+	FOREACH_THAND (t, th) {
+		t->total_all_handle += th->total;
+	}
 }
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index a0933107c26..9e80804d062 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -1183,9 +1183,15 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
 	t->settings = ts;
 	t->reports = op ? op->reports : NULL;
 
-	if (obedit) {
+	if (t->thand == NULL) {
+		t->thand = MEM_callocN(sizeof(*t->thand), __func__);
+		t->thand_len = 1;
 	}
 
+	t->helpline = HLP_NONE;
+	
+	t->flag = 0;
+	
 	if (CTX_data_edit_object(C) /* || pose mode .. etc. */) {
 		uint objects_len;
 		Object **objects = BKE_view_layer_array_from_objects_in_mode(
@@ -1200,18 +1206,12 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
 			normalize_m3(th->obedit_mat);
 		}
 		t->obedit_type = objects[0]->type;
+		t->flag |= T_EDIT;
 	}
 	else {
 		t->obedit_type = -1;
 	}
 
-	t->thand = NULL;
-	t->thand_len = 0;
-
-	t->helpline = HLP_NONE;
-	
-	t->flag = 0;
-	
 	t->redraw = TREDRAW_HARD;  /* redraw first time */
 	
 	if (event) {



More information about the Bf-blender-cvs mailing list