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

Antonio Vazquez noreply at git.blender.org
Fri Jun 22 23:05:00 CEST 2018


Commit: 5eb25b18560232a76827b6a6c03a55ae87230bb3
Author: Antonio Vazquez
Date:   Fri Jun 22 22:54:07 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB5eb25b18560232a76827b6a6c03a55ae87230bb3

Merge branch 'blender2.8' into greasepencil-object

 Conflicts:
	source/blender/makesdna/DNA_scene_types.h
	source/blender/makesrna/intern/rna_scene.c

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



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

diff --cc source/blender/makesdna/DNA_scene_types.h
index 87d246bc130,c83b2510ed8..22be1c62f42
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@@ -1264,9 -1236,12 +1264,12 @@@ typedef struct ToolSettings 
  	/* Auto-IK */
  	short autoik_chainlen;  /* runtime only */
  
+ 	/* SCE_MPR_LOC/SCAL */
+ 	char manipulator_flag;
+ 
  	/* Grease Pencil */
  	char gpencil_flags;		/* flags/options for how the tool works */
 -	char gpencil_src;		/* for main 3D view Grease Pencil, where data comes from */
 +	char gpencil_src;		/* for main 3D view Grease Pencil, where data comes from */ /* DEPRECATED */
  
  	char gpencil_v3d_align; /* stroke placement settings: 3D View */
  	char gpencil_v2d_align; /*                          : General 2D Editor */
diff --cc source/blender/makesrna/intern/rna_scene.c
index d7ac126d69b,1fbb416f3d8..2223da10710
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@@ -544,6 -543,116 +551,14 @@@ static void rna_GPencilInterpolateSetti
  	{
  		settings->custom_ipo = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
  	}
 -}
 -
 -/* Grease pencil Drawing Brushes */
 -static bGPDbrush *rna_GPencil_brush_new(ToolSettings *ts, const char *name, int setactive)
 -{
 -	bGPDbrush *brush = BKE_gpencil_brush_addnew(ts, name, setactive != 0);
 -
 -	WM_main_add_notifier(NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 -
 -	return brush;
 -}
 -
 -static void rna_GPencil_brush_remove(ToolSettings *ts, ReportList *reports, PointerRNA *brush_ptr)
 -{
 -	bGPDbrush *brush = brush_ptr->data;
 -	if (BLI_findindex(&ts->gp_brushes, brush) == -1) {
 -		BKE_report(reports, RPT_ERROR, "Brush not found in grease pencil data");
 -		return;
 -	}
 -
 -	BKE_gpencil_brush_delete(ts, brush);
 -	RNA_POINTER_INVALIDATE(brush_ptr);
+ 
 -	WM_main_add_notifier(NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
+ }
 -
 -static PointerRNA rna_GPencilBrushes_active_get(PointerRNA *ptr)
 -{
 -	ToolSettings *ts = (ToolSettings *) ptr->data;
 -
 -	bGPDbrush *brush;
 -
 -	for (brush = ts->gp_brushes.first; brush; brush = brush->next) {
 -		if (brush->flag & GP_BRUSH_ACTIVE) {
 -			break;
 -		}
 -	}
 -
 -	if (brush) {
 -		return rna_pointer_inherit_refine(ptr, &RNA_GPencilBrush, brush);
 -	}
 -
 -	return rna_pointer_inherit_refine(ptr, NULL, NULL);
 -}
 -
 -static void rna_GPencilBrushes_active_set(PointerRNA *ptr, PointerRNA value)
 -{
 -	ToolSettings *ts = (ToolSettings *) ptr->data;
 -
 -	bGPDbrush *brush;
 -
 -	for (brush = ts->gp_brushes.first; brush; brush = brush->next) {
 -		if (brush == value.data) {
 -			brush->flag |= GP_BRUSH_ACTIVE;
 -		}
 -		else {
 -			brush->flag &= ~GP_BRUSH_ACTIVE;
 -		}
 -	}
 -	WM_main_add_notifier(NC_GPENCIL | NA_EDITED, NULL);
 -}
 -
 -static int rna_GPencilBrushes_index_get(PointerRNA *ptr)
 -{
 -	ToolSettings *ts = (ToolSettings *) ptr->data;
 -	bGPDbrush *brush = BKE_gpencil_brush_getactive(ts);
 -
 -	return BLI_findindex(&ts->gp_brushes, brush);
 -}
 -
 -static void rna_GPencilBrushes_index_set(PointerRNA *ptr, int value)
 -{
 -	ToolSettings *ts = (ToolSettings *) ptr->data;
 -
 -	bGPDbrush *brush = BLI_findlink(&ts->gp_brushes, value);
 -
 -	BKE_gpencil_brush_setactive(ts, brush);
 -	WM_main_add_notifier(NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
 -}
 -
 -static void rna_GPencilBrushes_index_range(PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax)
 -{
 -	ToolSettings *ts = (ToolSettings *) ptr->data;
 -
 -	*min = 0;
 -	*max = max_ii(0, BLI_listbase_count(&ts->gp_brushes) - 1);
 -
 -	*softmin = *min;
 -	*softmax = *max;
 -}
 -
 -static void rna_GPencilBrush_name_set(PointerRNA *ptr, const char *value)
 -{
 -	ToolSettings *ts = ((Scene *) ptr->id.data)->toolsettings;
 -	bGPDbrush *brush = ptr->data;
 -
 -	/* copy the new name into the name slot */
 -	BLI_strncpy_utf8(brush->info, value, sizeof(brush->info));
 -
 -	BLI_uniquename(&ts->gp_brushes, brush, DATA_("GP_Brush"), '.', offsetof(bGPDbrush, info), sizeof(brush->info));
 -}
 -
 -/* ----------------- end of Grease pencil drawing brushes ------------*/
 -
+ static void rna_ToolSettings_manipulator_flag_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
+ {
+ 	ToolSettings *ts = scene->toolsettings;
+ 	if ((ts->manipulator_flag & (SCE_MANIP_TRANSLATE | SCE_MANIP_ROTATE | SCE_MANIP_SCALE)) == 0) {
+ 		ts->manipulator_flag |= SCE_MANIP_TRANSLATE;
+ 	}
  }
  
  static void rna_SpaceImageEditor_uv_sculpt_update(Main *bmain, Scene *scene, PointerRNA *UNUSED(ptr))



More information about the Bf-blender-cvs mailing list