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

Joshua Leung noreply at git.blender.org
Wed Apr 18 10:57:15 CEST 2018


Commit: 46422a3517470a00f1d8e956e057435ca4773daf
Author: Joshua Leung
Date:   Wed Apr 18 10:36:47 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB46422a3517470a00f1d8e956e057435ca4773daf

Merge branch 'blender2.8' into greasepencil-object

# Conflicts:
#	source/blender/blenloader/intern/versioning_280.c
#	source/blender/makesrna/intern/rna_scene.c

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



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

diff --cc source/blender/blenloader/intern/versioning_280.c
index 10d4e8a2cc3,b3cd1a6a1b7..9dd7d6d5765
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@@ -1136,21 -906,7 +1111,9 @@@ void blo_do_versions_280(FileData *fd, 
  				probe->intensity = 1.0f;
  			}
  		}
 +	}
  
- 	/* Hero open movie special code. This could removed later */
- 	/* if (!MAIN_VERSION_ATLEAST(main, 280, 6)) */
- 	{
- 		/* rescale old grease pencil pixel factor (needed for Hero open movie files) */
- 		for (bGPdata *gpd = main->gpencil.first; gpd; gpd = gpd->id.next) {
- 			/* old data was always bigger than 30 */
- 			if (gpd->pixfactor > 30.0f) {
- 				gpd->pixfactor = 1000.0f / gpd->pixfactor;
- 			}
- 		}
- 	}
- 
 +	if (!MAIN_VERSION_ATLEAST(main, 280, 6)) {
  		for (Object *ob = main->object.first; ob; ob = ob->id.next) {
  			bConstraint *con, *con_next;
  			con = ob->constraints.first;
@@@ -1164,5 -920,23 +1127,35 @@@
  				con = con_next;
  			}
  		}
+ 
+ 		if (!DNA_struct_elem_find(fd->filesdna, "Scene", "int", "orientation_index_custom")) {
+ 			for (Scene *scene = main->scene.first; scene; scene = scene->id.next) {
+ 				scene->orientation_index_custom = -1;
+ 			}
+ 		}
+ 
+ 		for (bScreen *sc = main->screen.first; sc; sc = sc->id.next) {
+ 			for (ScrArea *sa = sc->areabase.first; sa; sa = sa->next) {
+ 				for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) {
+ 					if (sl->spacetype == SPACE_VIEW3D) {
+ 						View3D *v3d = (View3D *)sl;
+ 						v3d->drawtype_solid = OB_LIGHTING_STUDIO;
+ 						v3d->drawtype_wireframe = OB_LIGHTING_STUDIO;
+ 					}
+ 				}
+ 			}
+ 		}
+ 	}
++	
++	/* Hero open movie special code. This could removed later */
++	/* if (!MAIN_VERSION_ATLEAST(main, 280, 6)) */
++	{
++		/* rescale old grease pencil pixel factor (needed for Hero open movie files) */
++		for (bGPdata *gpd = main->gpencil.first; gpd; gpd = gpd->id.next) {
++			/* old data was always bigger than 30 */
++			if (gpd->pixfactor > 30.0f) {
++				gpd->pixfactor = 1000.0f / gpd->pixfactor;
++			}
++		}
 +	}
  }
diff --cc source/blender/draw/CMakeLists.txt
index 8c4aec301f6,fc91d674c41..e6d150485d8
--- a/source/blender/draw/CMakeLists.txt
+++ b/source/blender/draw/CMakeLists.txt
@@@ -104,17 -104,10 +104,17 @@@ set(SR
  	engines/eevee/eevee_subsurface.c
  	engines/eevee/eevee_temporal_sampling.c
  	engines/eevee/eevee_volumes.c
- 	engines/workbench/workbench_materials_solid.c
  	engines/workbench/workbench_engine.c
  	engines/workbench/solid_flat_mode.c
+ 	engines/workbench/solid_studio_mode.c
  	engines/external/external_engine.c
 +	engines/gpencil/gpencil_engine.h
 +	engines/gpencil/gpencil_engine.c
 +	engines/gpencil/gpencil_cache_utils.c
 +	engines/gpencil/gpencil_draw_cache_impl.c
 +	engines/gpencil/gpencil_geom.c
 +	engines/gpencil/gpencil_vfx.c
 +	engines/gpencil/gpencil_depth_of_field.c
  
  	DRW_engine.h
  	intern/DRW_render.h
diff --cc source/blender/makesrna/intern/rna_scene.c
index 05e110bcd8c,6f9b1ccebf5..8df5db8bf53
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@@ -1988,6 -2164,223 +2070,24 @@@ static void rna_def_gpencil_interpolate
  	RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL);
  }
  
 -/* Grease Pencil Drawing Brushes */
 -static void rna_def_gpencil_brush(BlenderRNA *brna)
 -{
 -	StructRNA *srna;
 -	PropertyRNA *prop;
 -
 -	srna = RNA_def_struct(brna, "GPencilBrush", NULL);
 -	RNA_def_struct_sdna(srna, "bGPDbrush");
 -	RNA_def_struct_ui_text(srna, "Grease Pencil Brush",
 -	                       "Collection of brushes being used to control the line style of new strokes");
 -	RNA_def_struct_ui_icon(srna, ICON_BRUSH_DATA);
 -
 -	/* Name */
 -	prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
 -	RNA_def_property_string_sdna(prop, NULL, "info");
 -	RNA_def_property_ui_text(prop, "Name", "Brush name");
 -	RNA_def_property_string_funcs(prop, NULL, NULL, "rna_GPencilBrush_name_set");
 -	RNA_def_struct_name_property(srna, prop);
 -	RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);
 -
 -	/* Line Thickness */
 -	prop = RNA_def_property(srna, "line_width", PROP_INT, PROP_PIXEL);
 -	RNA_def_property_int_sdna(prop, NULL, "thickness");
 -	RNA_def_property_range(prop, 1, 300);
 -	RNA_def_property_ui_range(prop, 1, 10, 1, 0);
 -	RNA_def_property_ui_text(prop, "Thickness", "Thickness of strokes (in pixels)");
 -	RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);
 -
 -	/* Sensitivity factor for new strokes */
 -	prop = RNA_def_property(srna, "pen_sensitivity_factor", PROP_FLOAT, PROP_NONE);
 -	RNA_def_property_float_sdna(prop, NULL, "draw_sensitivity");
 -	RNA_def_property_range(prop, 0.1f, 3.0f);
 -	RNA_def_property_ui_text(prop, "Sensitivity", "Pressure sensitivity factor for new strokes");
 -	RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);
 -
 -	/* Strength factor for new strokes */
 -	prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
 -	RNA_def_property_float_sdna(prop, NULL, "draw_strength");
 -	RNA_def_property_range(prop, 0.0f, 1.0f);
 -	RNA_def_property_ui_text(prop, "Strength", "Color strength for new strokes (affect alpha factor of color)");
 -	RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);
 -
 -	/* Jitter factor for new strokes */
 -	prop = RNA_def_property(srna, "jitter", PROP_FLOAT, PROP_NONE);
 -	RNA_def_property_float_sdna(prop, NULL, "draw_jitter");
 -	RNA_def_property_range(prop, 0.0f, 1.0f);
 -	RNA_def_property_ui_text(prop, "Jitter", "Jitter factor for new strokes");
 -	RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);
 -
 -	/* Randomnes factor for sensitivity and strength */
 -	prop = RNA_def_property(srna, "random_press", PROP_FLOAT, PROP_NONE);
 -	RNA_def_property_float_sdna(prop, NULL, "draw_random_press");
 -	RNA_def_property_range(prop, 0.0f, 1.0f);
 -	RNA_def_property_ui_text(prop, "Randomness", "Randomness factor for pressure and strength in new strokes");
 -	RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);
 -
 -	/* Randomnes factor for subdivision */
 -	prop = RNA_def_property(srna, "random_subdiv", PROP_FLOAT, PROP_NONE);
 -	RNA_def_property_float_sdna(prop, NULL, "draw_random_sub");
 -	RNA_def_property_range(prop, 0.0f, 1.0f);
 -	RNA_def_property_ui_text(prop, "Random Subdivision", "Randomness factor for new strokes after subdivision");
 -	RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);
 -
 -	/* Angle when brush is full size */
 -	prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
 -	RNA_def_property_float_sdna(prop, NULL, "draw_angle");
 -	RNA_def_property_range(prop, -M_PI_2, M_PI_2);
 -	RNA_def_property_ui_text(prop, "Angle",
 -	                         "Direction of the stroke at which brush gives maximal thickness "
 -	                         "(0° for horizontal)");
 -	RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);
 -
 -	/* Factor to change brush size depending of angle */
 -	prop = RNA_def_property(srna, "angle_factor", PROP_FLOAT, PROP_NONE);
 -	RNA_def_property_float_sdna(prop, NULL, "draw_angle_factor");
 -	RNA_def_property_range(prop, 0.0f, 1.0f);
 -	RNA_def_property_ui_text(prop, "Angle Factor",
 -	                         "Reduce brush thickness by this factor when stroke is perpendicular to 'Angle' direction");
 -	RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);
 -
 -	/* Smoothing factor for new strokes */
 -	prop = RNA_def_property(srna, "pen_smooth_factor", PROP_FLOAT, PROP_NONE);
 -	RNA_def_property_float_sdna(prop, NULL, "draw_smoothfac");
 -	RNA_def_property_range(prop, 0.0, 2.0f);
 -	RNA_def_property_ui_text(prop, "Smooth",
 -	                         "Amount of smoothing to apply to newly created strokes, to reduce jitter/noise");
 -	RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);
 -
 -	/* Iterations of the Smoothing factor */
 -	prop = RNA_def_property(srna, "pen_smooth_steps", PROP_INT, PROP_NONE);
 -	RNA_def_property_int_sdna(prop, NULL, "draw_smoothlvl");
 -	RNA_def_property_range(prop, 1, 3);
 -	RNA_def_property_ui_text(prop, "Iterations",
 -	                         "Number of times to smooth newly created strokes");
 -	RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);
 -
 -	/* Subdivision level for new strokes */
 -	prop = RNA_def_property(srna, "pen_subdivision_steps", PROP_INT, PROP_NONE);
 -	RNA_def_property_int_sdna(prop, NULL, "sublevel");
 -	RNA_def_property_range(prop, 0, 3);
 -	RNA_def_property_ui_text(prop, "Subdivision Steps",
 -	                         "Number of times to subdivide newly created strokes, for less jagged strokes");
 -	RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);
 -
 -	/* Curves for pressure */
 -	prop = RNA_def_property(srna, "curve_sensitivity", PROP_POINTER, PROP_NONE);
 -	RNA_def_property_pointer_sdna(prop, NULL, "cur_sensitivity");
 -	RNA_def_property_struct_type(prop, "CurveMapping");
 -	RNA_def_property_ui_text(prop, "Curve Sensitivity", "Curve used for the sensitivity");
 -	RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);
 -
 -	prop = RNA_def_property(srna, "curve_strength", PROP_POINTER, PROP_NONE);
 -	RNA_def_property_pointer_sdna(prop, NULL, "cur_strength");
 -	RNA_def_property_struct_type(prop, "CurveMapping");
 -	RNA_def_property_ui_text(prop, "Curve Strength", "Curve used for the strength");
 -	RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);
 -
 -	prop = RNA_def_property(srna, "curve_jitter", PROP_POINTER, PROP_NONE);
 -	RNA_def_property_pointer_sdna(prop, NULL, "cur_jitter");
 -	RNA_def_property_struct_type(prop, "CurveMapping");
 -	RNA_def_property_ui_text(prop, "Curve Jitter", "Curve used for the jitter effect");
 -	RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);
 -
 -	/* Flags */
 -	prop = RNA_def_property(srna, "use_pressure", PROP_BOOLEAN, PROP_NONE);
 -	RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_USE_PRESSURE);
 -	RNA_def_property_ui_icon(prop, ICON_STYLUS_PRESSURE, 0);
 -	RNA_def_property_ui_text(prop, "Use Pressure", "Use tablet pressure");
 -	RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, NULL);
 -
 -	prop = RNA_def_property(srna, "use_strength_pressure", PROP_BOOLEAN, PROP_NONE);
 -	RNA_def_property_bo

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list