[Bf-blender-cvs] [26fc7ef55f1] soc-2018-npr: Merge branch 'master' into soc-2018-npr
Yiming Wu
noreply at git.blender.org
Fri Mar 8 12:13:23 CET 2019
Commit: 26fc7ef55f1584bcf9fd262419f1a3f540c186af
Author: Yiming Wu
Date: Fri Mar 8 19:12:37 2019 +0800
Branches: soc-2018-npr
https://developer.blender.org/rB26fc7ef55f1584bcf9fd262419f1a3f540c186af
Merge branch 'master' into soc-2018-npr
# Conflicts:
# release/datafiles/locale
# release/scripts/addons
# release/scripts/addons_contrib
# source/blender/draw/intern/DRW_render.h
# source/blender/makesdna/DNA_light_types.h
# source/blender/makesdna/DNA_scene_types.h
# source/blender/makesrna/intern/rna_scene.c
# source/tools
===================================================================
===================================================================
diff --cc source/blender/blenloader/intern/versioning_280.c
index a63b7afbcd0,8a3e948e4d2..3d9ae899a32
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@@ -1562,35 -1538,9 +1538,35 @@@ void blo_do_versions_280(FileData *fd,
}
}
+ if (!DNA_struct_find(fd->filesdna, "SceneLANPR")) {
+ for (Scene *scene = bmain->scene.first; scene; scene = scene->id.next) {
+
+ scene->lanpr.crease_threshold = 0.7;
+
+ scene->lanpr.line_thickness = 1.5;
+ scene->lanpr.depth_clamp = 0.001;
+ scene->lanpr.depth_strength = 800;
+ scene->lanpr.normal_clamp = 2;
+ scene->lanpr.normal_strength = 10;
+
+ scene->lanpr.enable_intersections = 1;
+
+ scene->lanpr.background_color[0] = 0.76;
+ scene->lanpr.background_color[1] = 0.54;
+ scene->lanpr.background_color[2] = 0.29;
+ scene->lanpr.background_color[3] = 1;
+
+ scene->lanpr.line_color[0] = 0.39;
+ scene->lanpr.line_color[1] = 0.12;
+ scene->lanpr.line_color[2] = 0.04;
+ scene->lanpr.line_color[3] = 1;
+
+ }
+ }
+
if (!MAIN_VERSION_ATLEAST(bmain, 280, 15)) {
- for (Scene *scene = bmain->scene.first; scene; scene = scene->id.next) {
+ for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) {
scene->display.matcap_ssao_distance = 0.2f;
scene->display.matcap_ssao_attenuation = 1.0f;
scene->display.matcap_ssao_samples = 16;
diff --cc source/blender/draw/CMakeLists.txt
index 10734ec985e,aea08f87a84..0503dc61e80
--- a/source/blender/draw/CMakeLists.txt
+++ b/source/blender/draw/CMakeLists.txt
@@@ -120,22 -117,14 +117,20 @@@ set(SR
engines/workbench/workbench_render.c
engines/workbench/workbench_studiolight.c
engines/workbench/workbench_volume.c
- engines/workbench/solid_mode.c
- engines/workbench/transparent_mode.c
engines/external/external_engine.c
- engines/gpencil/gpencil_engine.h
- engines/gpencil/gpencil_engine.c
- engines/gpencil/gpencil_render.c
engines/gpencil/gpencil_cache_utils.c
- engines/gpencil/gpencil_draw_utils.c
engines/gpencil/gpencil_draw_cache_impl.c
+ engines/gpencil/gpencil_draw_utils.c
+ engines/gpencil/gpencil_engine.c
+ engines/gpencil/gpencil_engine.h
+ engines/gpencil/gpencil_render.c
engines/gpencil/gpencil_shader_fx.c
+ engines/lanpr/lanpr_dpix.c
+ engines/lanpr/lanpr_engine.c
+ engines/lanpr/lanpr_snake.c
+ engines/lanpr/lanpr_ops.c
+ engines/lanpr/lanpr_util.c
+ engines/lanpr/lanpr_chain.c
DRW_engine.h
intern/DRW_render.h
diff --cc source/blender/draw/intern/DRW_render.h
index 2607e7e13b5,dee686e270e..6258d393128
--- a/source/blender/draw/intern/DRW_render.h
+++ b/source/blender/draw/intern/DRW_render.h
@@@ -197,31 -194,24 +194,29 @@@ typedef enum
/* Textures from DRW_texture_pool_query_* have the options
* DRW_TEX_FILTER for color float textures, and no options
* for depth textures and integer textures. */
- struct GPUTexture *DRW_texture_pool_query_2D(int w, int h, GPUTextureFormat format, DrawEngineType *engine_type);
+ struct GPUTexture *DRW_texture_pool_query_2D(int w, int h, eGPUTextureFormat format, DrawEngineType *engine_type);
struct GPUTexture *DRW_texture_create_1D(
- int w, GPUTextureFormat format, DRWTextureFlag flags, const float *fpixels);
+ int w, eGPUTextureFormat format, DRWTextureFlag flags, const float *fpixels);
struct GPUTexture *DRW_texture_create_2D(
- int w, int h, GPUTextureFormat format, DRWTextureFlag flags, const float *fpixels);
- struct GPUTexture *DRW_texture_create_2D_multisample(
- int w, int h, GPUTextureFormat format, int samples, DRWTextureFlag flags, const float *fpixels);
+ int w, int h, eGPUTextureFormat format, DRWTextureFlag flags, const float *fpixels);
struct GPUTexture *DRW_texture_create_2D_array(
- int w, int h, int d, GPUTextureFormat format, DRWTextureFlag flags, const float *fpixels);
+ int w, int h, int d, eGPUTextureFormat format, DRWTextureFlag flags, const float *fpixels);
struct GPUTexture *DRW_texture_create_3D(
- int w, int h, int d, GPUTextureFormat format, DRWTextureFlag flags, const float *fpixels);
+ int w, int h, int d, eGPUTextureFormat format, DRWTextureFlag flags, const float *fpixels);
struct GPUTexture *DRW_texture_create_cube(
- int w, GPUTextureFormat format, DRWTextureFlag flags, const float *fpixels);
+ int w, eGPUTextureFormat format, DRWTextureFlag flags, const float *fpixels);
void DRW_texture_ensure_fullscreen_2D(
- struct GPUTexture **tex, GPUTextureFormat format, DRWTextureFlag flags);
+ struct GPUTexture **tex, eGPUTextureFormat format, DRWTextureFlag flags);
void DRW_texture_ensure_2D(
- struct GPUTexture **tex, int w, int h, GPUTextureFormat format, DRWTextureFlag flags);
+ struct GPUTexture **tex, int w, int h, eGPUTextureFormat format, DRWTextureFlag flags);
+void DRW_texture_ensure_fullscreen_2D_multisample(
+ struct GPUTexture **tex, GPUTextureFormat format, int samples, DRWTextureFlag flags);
+void DRW_texture_ensure_2D_multisample(
+ struct GPUTexture **tex, int w, int h, GPUTextureFormat format, int samples, DRWTextureFlag flags);
+
void DRW_texture_generate_mipmaps(struct GPUTexture *tex);
void DRW_texture_free(struct GPUTexture *tex);
#define DRW_TEXTURE_FREE_SAFE(tex) do { \
diff --cc source/blender/draw/intern/draw_manager_texture.c
index 89e2b958ecc,235523f15c5..0a804a9d37f
--- a/source/blender/draw/intern/draw_manager_texture.c
+++ b/source/blender/draw/intern/draw_manager_texture.c
@@@ -92,16 -89,8 +89,16 @@@ GPUTexture *DRW_texture_create_2D(int w
return tex;
}
+GPUTexture *DRW_texture_create_2D_multisample(int w, int h, GPUTextureFormat format, int samples, DRWTextureFlag flags, const float *fpixels)
+{
+ GPUTexture *tex = GPU_texture_create_2D_multisample(w, h, format, fpixels, samples, NULL);
+ drw_texture_set_parameters(tex, flags);
+
+ return tex;
+}
+
GPUTexture *DRW_texture_create_2D_array(
- int w, int h, int d, GPUTextureFormat format, DRWTextureFlag flags, const float *fpixels)
+ int w, int h, int d, eGPUTextureFormat format, DRWTextureFlag flags, const float *fpixels)
{
GPUTexture *tex = GPU_texture_create_2D_array(w, h, d, format, fpixels, NULL);
drw_texture_set_parameters(tex, flags);
diff --cc source/blender/makesdna/DNA_light_types.h
index 00000000000,ec913aa2b48..a98b03f847c
mode 000000,100644..100644
--- a/source/blender/makesdna/DNA_light_types.h
+++ b/source/blender/makesdna/DNA_light_types.h
@@@ -1,0 -1,151 +1,151 @@@
+ /*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ */
+
+ /** \file
+ * \ingroup DNA
+ */
+
+ #ifndef __DNA_LIGHT_TYPES_H__
+ #define __DNA_LIGHT_TYPES_H__
+
+ #include "DNA_defs.h"
+ #include "DNA_ID.h"
+
+ #ifndef MAX_MTEX
-#define MAX_MTEX 18
++#define MAX_MTEX 18
+ #endif
+
+ struct AnimData;
+ struct CurveMapping;
+ struct Ipo;
+ struct MTex;
+ struct bNodeTree;
+
+ typedef struct Light {
+ ID id;
+ /** Animation data (must be immediately after id for utilities to use it). */
+ struct AnimData *adt;
+
+ short type, flag;
+ int mode;
+
+ float r, g, b, k;
+ float shdwr, shdwg, shdwb, shdwpad;
+
+ float energy, dist, spotsize, spotblend;
+
+ /** Quad1 and Quad2 attenuation. */
+ float att1, att2;
+ float coeff_const, coeff_lin, coeff_quad;
+ char _pad0[4];
+ struct CurveMapping *curfalloff;
+ short falloff_type;
+ char _pad2[2];
+
+ float clipsta, clipend;
+ float bias, soft, bleedbias, bleedexp;
+ short bufsize, samp, buffers, filtertype;
+ char bufflag, buftype;
+
+ short area_shape;
+ float area_size, area_sizey, area_sizez;
+
+ /* texact is for buttons */
+ short texact, shadhalostep;
+
+ /** Old animation system, deprecated for 2.5. */
+ struct Ipo *ipo DNA_DEPRECATED;
+ short pr_texture, use_nodes;
+ char _pad6[4];
+
+ /* Eevee */
+ float cascade_max_dist;
+ float cascade_exponent;
+ float cascade_fade;
+ int cascade_count;
+
+ float contact_dist, contact_bias, contact_spread, contact_thickness;
+
+ float spec_fac, att_dist;
+
+ /* preview */
+ struct PreviewImage *preview;
+
+ /* nodes */
+ struct bNodeTree *nodetree;
+ } Light;
+
+ /* **************** LIGHT ********************* */
+
+ /* flag */
+ #define LA_DS_EXPAND (1 << 0)
+ /* NOTE: this must have the same value as MA_DS_SHOW_TEXS,
+ * otherwise anim-editors will not read correctly
+ */
+ #define LA_DS_SHOW_TEXS (1 << 2)
+
+ /* type */
-#define LA_LOCAL 0
-#define LA_SUN 1
-#define LA_SPOT 2
++#define LA_LOCAL 0
++#define LA_SUN 1
++#define LA_SPOT 2
+ /* #define LA_HEMI 3 */ /* not used anymore */
-#define LA_AREA 4
++#define LA_AREA 4
+
+ /* mode */
-#define LA_SHADOW (1 << 0)
++#define LA_SHADOW (1 << 0)
+ /* #define LA_HALO (1 << 1) */ /* not used anymore */
+ /* #define LA_LAYER (1 << 2) */ /* not used anymore */
+ /* #define LA_QUAD (1 << 3) */ /* not used anymore */
+ /* #define LA_NEG (1 << 4) */ /* not used anymore */
+ /* #define LA_ONLYSHADOW(1 << 5) */ /* not used anymore */
+ /* #define LA_SPHERE (1 << 6) */ /* not used anymore */
-#define LA_SQUARE (1 << 7)
++#define LA_SQUARE (1 << 7)
+ /* #define LA_TEXTURE (1 << 8) */ /* not used anymore */
+ /* #define LA_OSATEX (1 << 9) */ /* not used anymore
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list