[Bf-blender-cvs] [7cd3a984177] greasepencil-object: Merge branch 'blender2.8' into greasepencil-object

Antonio Vazquez noreply at git.blender.org
Sun May 13 13:14:23 CEST 2018


Commit: 7cd3a9841775f9190880dba0bdc39792c4617a43
Author: Antonio Vazquez
Date:   Sun May 13 13:08:24 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB7cd3a9841775f9190880dba0bdc39792c4617a43

Merge branch 'blender2.8' into greasepencil-object

 Conflicts:
	source/blender/editors/transform/transform.c
	source/blender/editors/transform/transform_conversions.c

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



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

diff --cc source/blender/editors/space_view3d/space_view3d.c
index 60fd8f89f6a,d6413e8bdfb..44cea9bc4fe
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@@ -336,12 -335,7 +336,11 @@@ static SpaceLink *view3d_new(const ScrA
  	v3d->near = 0.01f;
  	v3d->far = 1000.0f;
  
 +	v3d->gpencil_grid_size[0] = GP_DEFAULT_GRID_SIZE;
 +	v3d->gpencil_grid_size[1] = GP_DEFAULT_GRID_SIZE;
 +	ARRAY_SET_ITEMS(v3d->gpencil_paper_color, 1.0f, 1.0f, 1.0f, 0.7f);
 +
  	v3d->twflag |= U.manipulator_flag & V3D_MANIPULATOR_DRAW;
- 	v3d->around = V3D_AROUND_CENTER_MEAN;
  
  	v3d->bundle_size = 0.2f;
  	v3d->bundle_drawtype = OB_PLAINAXES;
diff --cc source/blender/editors/transform/transform.c
index 8a1661cf9f5,405c6213017..0d9a1be1115
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@@ -3870,25 -3828,11 +3870,25 @@@ static void ElementRotation_ex(TransInf
  		mul_m3_m3m3(totmat, mat, td->mtx);
  		mul_m3_m3m3(smat, td->smtx, totmat);
  
 +		/* apply gpencil falloff */
 +		if (t->options & CTX_GPENCIL_STROKES) {
 +			bGPDstroke *gps = (bGPDstroke *)td->extra;
 +			float sx = smat[0][0];
 +			float sy = smat[1][1];
 +			float sz = smat[2][2];
 +
 +			mul_m3_fl(smat, gps->runtime.multi_frame_falloff);
 +			/* fix scale */
 +			smat[0][0] = sx;
 +			smat[1][1] = sy;
 +			smat[2][2] = sz;
 +		}
 +
  		sub_v3_v3v3(vec, td->iloc, center);
  		mul_m3_v3(smat, vec);
- 		
+ 
  		add_v3_v3v3(td->loc, vec, center);
- 		
+ 
  		sub_v3_v3v3(vec, td->loc, td->iloc);
  		protectedTransBits(td->protectflag, vec);
  		add_v3_v3v3(td->loc, td->iloc, vec);
diff --cc source/blender/editors/transform/transform_conversions.c
index 7669e38c468,7c5f7dba045..f33e561aae4
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@@ -8060,16 -8059,11 +8068,16 @@@ static void createTransGPencil(bContex
  	 * strokes. This may cause issues in future though.
  	 */
  	tc->data_len = 0;
- 	
+ 
  	if (gpd == NULL)
  		return;
 +	
 +	/* initialize falloff curve */
 +	if (is_multiedit) {
 +		curvemapping_initialize(ts->gp_sculpt.cur_falloff);
 +	}
  
 -	/* First Pass: Count the number of datapoints required for the strokes,
 +	/* First Pass: Count the number of datapoints required for the strokes, 
  	 * (and additional info about the configuration - e.g. 2D/3D?)
  	 */
  	for (gpl = gpd->layers.first; gpl; gpl = gpl->next) {
diff --cc source/blender/editors/transform/transform_generics.c
index ecd0b4143fd,ed146eb3227..ca00b3d0c04
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@@ -1299,9 -1296,9 +1299,9 @@@ void initTransInfo(bContext *C, TransIn
  			t->remove_on_cancel = true;
  		}
  	}
- 	
+ 
  	/* GPencil editing context */
 -	if ((gpd) && (gpd->flag & GP_DATA_STROKE_EDITMODE)) {
 +	if (GPENCIL_ANY_MODE(gpd)) {
  		t->options |= CTX_GPENCIL_STROKES;
  	}
  
diff --cc source/blender/editors/transform/transform_manipulator_3d.c
index 18271b8384b,8257ad595d7..19289a81b46
--- a/source/blender/editors/transform/transform_manipulator_3d.c
+++ b/source/blender/editors/transform/transform_manipulator_3d.c
@@@ -598,8 -598,9 +598,9 @@@ int ED_transform_calc_manipulator_stats
  	const Object *ob_eval = NULL;
  	const Object *obedit_eval = NULL;
  	bGPdata *gpd = CTX_data_gpencil_data(C);
 -	const bool is_gp_edit = ((gpd) && (gpd->flag & GP_DATA_STROKE_EDITMODE));
 +	const bool is_gp_edit = GPENCIL_ANY_MODE(gpd);
  	int a, totsel = 0;
+ 	const int pivot_point = scene->toolsettings->transform_pivot_point;
  
  	/* transform widget matrix */
  	unit_m4(rv3d->twmat);



More information about the Bf-blender-cvs mailing list