[Bf-blender-cvs] [6b433f4eb3d] blender2.8: Merge branch 'master' into blender2.8

Brecht Van Lommel noreply at git.blender.org
Wed Sep 19 18:27:15 CEST 2018


Commit: 6b433f4eb3da0acf092fb4e5417b10f9b304d073
Author: Brecht Van Lommel
Date:   Wed Sep 19 18:19:49 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB6b433f4eb3da0acf092fb4e5417b10f9b304d073

Merge branch 'master' into blender2.8

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



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

diff --cc build_files/cmake/config/blender_headless.cmake
index 73b43272643,18a023af99c..a07a3a7f66c
--- a/build_files/cmake/config/blender_headless.cmake
+++ b/build_files/cmake/config/blender_headless.cmake
@@@ -6,9 -6,10 +6,9 @@@
  #
  
  set(WITH_HEADLESS            ON  CACHE BOOL "" FORCE)
 -set(WITH_GAMEENGINE          OFF CACHE BOOL "" FORCE)
  
  # disable audio, its possible some devs may want this but for now disable
- # so the python module doesnt hold the audio device and loads quickly.
+ # so the python module doesn't hold the audio device and loads quickly.
  set(WITH_AUDASPACE           OFF CACHE BOOL "" FORCE)
  set(WITH_FFTW3               OFF CACHE BOOL "" FORCE)
  set(WITH_JACK                OFF CACHE BOOL "" FORCE)
diff --cc build_files/cmake/config/bpy_module.cmake
index 2371d3f0d76,c90fafc60ab..64f7f78a286
--- a/build_files/cmake/config/bpy_module.cmake
+++ b/build_files/cmake/config/bpy_module.cmake
@@@ -12,8 -12,11 +12,8 @@@ set(WITH_INSTALL_PORTABLE    OFF CACHE 
  # no point int copying python into python
  set(WITH_PYTHON_INSTALL      OFF CACHE BOOL "" FORCE)
  
 -# dont build the game engine
 -set(WITH_GAMEENGINE          OFF CACHE BOOL "" FORCE)
 -
  # disable audio, its possible some devs may want this but for now disable
- # so the python module doesnt hold the audio device and loads quickly.
+ # so the python module doesn't hold the audio device and loads quickly.
  set(WITH_AUDASPACE           OFF CACHE BOOL "" FORCE)
  set(WITH_FFTW3               OFF CACHE BOOL "" FORCE)
  set(WITH_JACK                OFF CACHE BOOL "" FORCE)
diff --cc release/scripts/startup/bl_operators/object_randomize_transform.py
index 6e2dad079ee,1aa1f2e1d0e..6c4531a468b
--- a/release/scripts/startup/bl_operators/object_randomize_transform.py
+++ b/release/scripts/startup/bl_operators/object_randomize_transform.py
@@@ -154,8 -154,8 +154,8 @@@ class RandomizeLocRotSize(Operator)
          default=False,
      )
  
 -    '''scale_min = FloatProperty(
 +    '''scale_min: FloatProperty(
-             name="Minimun Scale Factor",
+             name="Minimum Scale Factor",
              description="Lowest scale percentage possible",
              min=-1.0, max=1.0, precision=3,
              default=0.15,
diff --cc release/scripts/startup/bl_ui/properties_object.py
index 1b49127be76,f7688aa3aa2..2dfbf2aa153
--- a/release/scripts/startup/bl_ui/properties_object.py
+++ b/release/scripts/startup/bl_ui/properties_object.py
@@@ -189,30 -199,35 +189,30 @@@ class OBJECT_PT_collections(ObjectButto
          obj = context.object
  
          row = layout.row(align=True)
 -        if bpy.data.groups:
 -            row.operator("object.group_link", text="Add to Group")
 +        if bpy.data.collections:
 +            row.operator("object.collection_link", text="Add to Collection")
          else:
 -            row.operator("object.group_add", text="Add to Group")
 -        row.operator("object.group_add", text="", icon='ZOOMIN')
 +            row.operator("object.collection_add", text="Add to Collection")
 +        row.operator("object.collection_add", text="", icon='ZOOMIN')
  
          obj_name = obj.name
 -        for group in bpy.data.groups:
 +        for collection in bpy.data.collections:
-             # XXX this is slow and stupid!, we need 2 checks, one thats fast
+             # XXX this is slow and stupid!, we need 2 checks, one that's fast
              # and another that we can be sure its not a name collision
              # from linked library data
 -            group_objects = group.objects
 -            if obj_name in group.objects and obj in group_objects[:]:
 +            collection_objects = collection.objects
 +            if obj_name in collection.objects and obj in collection_objects[:]:
                  col = layout.column(align=True)
  
 -                col.context_pointer_set("group", group)
 +                col.context_pointer_set("collection", collection)
  
                  row = col.box().row()
 -                row.prop(group, "name", text="")
 -                row.operator("object.group_remove", text="", icon='X', emboss=False)
 -                row.menu("GROUP_MT_specials", icon='DOWNARROW_HLT', text="")
 +                row.prop(collection, "name", text="")
 +                row.operator("object.collection_remove", text="", icon='X', emboss=False)
 +                row.menu("COLLECTION_MT_specials", icon='DOWNARROW_HLT', text="")
  
 -                split = col.box().split()
 -
 -                col = split.column()
 -                col.prop(group, "layers", text="Dupli Visibility")
 -
 -                col = split.column()
 -                col.prop(group, "dupli_offset", text="")
 +                row = col.box().row()
 +                row.prop(collection, "dupli_offset", text="")
  
  
  class OBJECT_PT_display(ObjectButtonsPanel, Panel):
diff --cc source/blender/draw/engines/basic/basic_engine.c
index d7928a613be,00000000000..2e3fdf37bdb
mode 100644,000000..100644
--- a/source/blender/draw/engines/basic/basic_engine.c
+++ b/source/blender/draw/engines/basic/basic_engine.c
@@@ -1,215 -1,0 +1,215 @@@
 +/*
 + * Copyright 2016, Blender Foundation.
 + *
 + * 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.
 + *
 + * Contributor(s): Blender Institute
 + *
 + */
 +
 +/** \file basic_engine.c
 + *  \ingroup draw_engine
 + *
 + * Simple engine for drawing color and/or depth.
 + * When we only need simple flat shaders.
 + */
 +
 +#include "DRW_render.h"
 +
 +#include "BKE_icons.h"
 +#include "BKE_idprop.h"
 +#include "BKE_main.h"
 +#include "BKE_particle.h"
 +
 +#include "DNA_particle_types.h"
 +
 +#include "GPU_shader.h"
 +
 +#include "basic_engine.h"
 +/* Shaders */
 +
 +#define BASIC_ENGINE "BLENDER_BASIC"
 +
 +/* *********** LISTS *********** */
 +
 +/* GPUViewport.storage
 + * Is freed everytime the viewport engine changes */
 +typedef struct BASIC_StorageList {
 +	struct BASIC_PrivateData *g_data;
 +} BASIC_StorageList;
 +
 +typedef struct BASIC_PassList {
 +	struct DRWPass *depth_pass;
 +	struct DRWPass *depth_pass_cull;
 +} BASIC_PassList;
 +
 +typedef struct BASIC_Data {
 +	void *engine_type;
 +	DRWViewportEmptyList *fbl;
 +	DRWViewportEmptyList *txl;
 +	BASIC_PassList *psl;
 +	BASIC_StorageList *stl;
 +} BASIC_Data;
 +
 +/* *********** STATIC *********** */
 +
 +static struct {
 +	/* Depth Pre Pass */
 +	struct GPUShader *depth_sh;
 +} e_data = {NULL}; /* Engine data */
 +
 +typedef struct BASIC_PrivateData {
 +	DRWShadingGroup *depth_shgrp;
 +	DRWShadingGroup *depth_shgrp_cull;
 +	DRWShadingGroup *depth_shgrp_hair;
 +} BASIC_PrivateData; /* Transient data */
 +
 +/* Functions */
 +
 +static void basic_engine_init(void *UNUSED(vedata))
 +{
 +	/* Depth prepass */
 +	if (!e_data.depth_sh) {
 +		e_data.depth_sh = DRW_shader_create_3D_depth_only();
 +	}
 +}
 +
 +static void basic_cache_init(void *vedata)
 +{
 +	BASIC_PassList *psl = ((BASIC_Data *)vedata)->psl;
 +	BASIC_StorageList *stl = ((BASIC_Data *)vedata)->stl;
 +
 +	if (!stl->g_data) {
 +		/* Alloc transient pointers */
 +		stl->g_data = MEM_mallocN(sizeof(*stl->g_data), __func__);
 +	}
 +
 +	{
 +		psl->depth_pass = DRW_pass_create(
 +		        "Depth Pass", DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_WIRE);
 +		stl->g_data->depth_shgrp = DRW_shgroup_create(e_data.depth_sh, psl->depth_pass);
 +
 +		psl->depth_pass_cull = DRW_pass_create(
 +		        "Depth Pass Cull",
 +		        DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL | DRW_STATE_CULL_BACK);
 +		stl->g_data->depth_shgrp_cull = DRW_shgroup_create(e_data.depth_sh, psl->depth_pass_cull);
 +	}
 +}
 +
 +static void basic_cache_populate(void *vedata, Object *ob)
 +{
 +	BASIC_StorageList *stl = ((BASIC_Data *)vedata)->stl;
 +
 +	if (!DRW_object_is_renderable(ob)) {
 +		return;
 +	}
 +
 +	const DRWContextState *draw_ctx = DRW_context_state_get();
 +	if (ob != draw_ctx->object_edit) {
 +		for (ParticleSystem *psys = ob->particlesystem.first;
 +		     psys != NULL;
 +		     psys = psys->next)
 +		{
 +			if (!psys_check_enabled(ob, psys, false)) {
 +				continue;
 +			}
 +			if (!DRW_check_psys_visible_within_active_context(ob, psys)) {
 +				continue;
 +			}
 +			ParticleSettings *part = psys->part;
 +			const int draw_as = (part->draw_as == PART_DRAW_REND) ? part->ren_as : part->draw_as;
 +			if (draw_as == PART_DRAW_PATH) {
 +				struct GPUBatch *hairs = DRW_cache_particles_get_hair(ob, psys, NULL);
 +				DRW_shgroup_call_add(stl->g_data->depth_shgrp, hairs, NULL);
 +			}
 +		}
 +	}
 +
 +	/* Make flat object selectable in ortho view if wireframe is enabled. */
 +	if ((draw_ctx->v3d->overlay.flag & V3D_OVERLAY_WIREFRAMES) ||
 +	    (ob->dtx & OB_DRAWWIRE) ||
 +	    (ob->dt == OB_WIRE))
 +	{
 +		int flat_axis = 0;
 +		bool is_flat_object_viewed_from_side = (draw_ctx->rv3d->persp == RV3D_ORTHO) &&
 +		                                       DRW_object_is_flat(ob, &flat_axis) &&
 +		                                       DRW_object_axis_orthogonal_to_view(ob, flat_axis);
 +
 +		if (is_flat_object_viewed_from_side) {
- 			/* Avoid loosing flat objects when in ortho views (see T56549) */
++			/* Avoid losing flat objects when in ortho views (see T56549) */
 +			struct GPUBatch *geom = DRW_cache_object_wire_outline_get(ob);
 +			DRW_shgroup_call_object_add(stl->g_data->depth_shgrp, geom, ob);
 +			return;
 +		}
 +	}
 +
 +	struct GPUBatch *geom = DRW_cache_object_surface_get(ob);
 +	if (geom) {
 +		const bool do_cull = (draw_ctx->v3d && (draw_ctx->v3d->flag2 & V3D_BACKFACE_CULLING));
 +		/* Depth Prepass */
 +		D

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list