Skip to content

Commit

Permalink
Merge remote-tracking branch 'blender/master' into sync_blender_master
Browse files Browse the repository at this point in the history
# Conflicts:
#	.gitmodules
#	GNUmakefile
#	build_files/buildbot/slave_pack.py
#	release/datafiles/locale
#	release/freedesktop/icons/16x16/apps/blender.png
#	release/freedesktop/icons/22x22/apps/blender.png
#	release/freedesktop/icons/24x24/apps/blender.png
#	release/freedesktop/icons/256x256/apps/blender.png
#	release/freedesktop/icons/32x32/apps/blender.png
#	release/freedesktop/icons/48x48/apps/blender.png
#	release/freedesktop/icons/scalable/apps/blender.svg
#	release/scripts/addons
#	release/scripts/addons_contrib
#	release/text/readme.html
#	release/windows/icons/winblender.ico
#	release/windows/icons/winblenderfile.ico
#	source/tools
  • Loading branch information
ReinerBforartists committed Dec 30, 2018
2 parents 6f4f9e5 + 543ddbe commit d5632db
Show file tree
Hide file tree
Showing 511 changed files with 634,614 additions and 905,556 deletions.
4 changes: 2 additions & 2 deletions .arcconfig
@@ -1,7 +1,7 @@
{
"project_id" : "Blender",
"conduit_uri" : "https://developer.blender.org/",
"git.default-relative-commit" : "origin/blender2.8",
"git.default-relative-commit" : "origin/master",
"arc.land.update.default" : "rebase",
"arc.land.onto.default" : "blender2.8"
"arc.land.onto.default" : "master"
}
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -37,3 +37,4 @@ Desktop.ini
# in-source lib downloads
/build_files/build_environment/downloads
/.gitmodules
/.gitmodules
5 changes: 0 additions & 5 deletions build_files/build_environment/cmake/osl.cmake
Expand Up @@ -81,11 +81,6 @@ if(WIN32)
${OSL_EXTRA_ARGS}
-DPUGIXML_HOME=${LIBDIR}/pugixml
)
elseif(UNIX AND NOT APPLE)
set(OSL_EXTRA_ARGS
${OSL_EXTRA_ARGS}
-DPUGIXML_HOME=${LIBDIR}/pugixml
)
elseif(APPLE)
# Make symbol hiding consistent with OIIO which defaults to OFF,
# avoids linker warnings on macOS
Expand Down
8 changes: 4 additions & 4 deletions build_files/buildbot/slave_pack.py
Expand Up @@ -107,8 +107,8 @@ def create_tar_bz2(src, dest, package_name):
if builder.endswith('vc2015'):
platform += "-vc14"
builderified_name = 'bforartists-{}-{}-{}'.format(blender_full_version, git_hash, platform)
# NOTE: Blender 2.8 is already respected by blender_full_version.
if branch != '' and branch != 'blender2.8':
# NOTE: Blender 2.7 is already respected by blender_full_version.
if branch != '' and branch != 'blender2.7':
builderified_name = branch + "-" + builderified_name

os.rename(result_file, "{}.zip".format(builderified_name))
Expand Down Expand Up @@ -177,8 +177,8 @@ def create_tar_bz2(src, dest, package_name):
blender_glibc,
blender_arch,
bforartists_version)
# NOTE: Blender 2.8 is already respected by blender_full_version.
if branch != '' and branch != 'blender2.8':
# NOTE: Blender 2.7 is already respected by blender_full_version.
if branch != '' and branch != 'blender2.7':
package_name = branch + "-" + package_name

upload_filename = package_name + ".tar.bz2"
Expand Down
8 changes: 2 additions & 6 deletions build_files/windows/update_sources.cmd
Expand Up @@ -11,10 +11,6 @@ if "%GIT%" == "" (
goto EOF
)
"%GIT%" pull --rebase
"%GIT%" submodule update --init --recursive
rem Use blender2.8 branch for submodules that have it.
"%GIT%" submodule foreach "git checkout blender2.8 || git checkout master"
"%GIT%" submodule foreach git pull --rebase origin
"%GIT%" submodule foreach git pull --rebase origin master


:EOF
:EOF
6 changes: 3 additions & 3 deletions doc/manpage/blender.1.py
Expand Up @@ -65,7 +65,7 @@ def man_format(data):

fw('''
.SH NAME
blender \- a 3D modelling and rendering package''')
blender \- a full-featured 3D application''')

fw('''
.SH SYNOPSIS
Expand All @@ -76,9 +76,9 @@ def man_format(data):
.SH DESCRIPTION
.PP
.B blender
is a 3D modelling and rendering package. Originating as the in-house software of a high quality animation studio, Blender has proven to be an extremely fast and versatile design instrument. The software has a personal touch, offering a unique approach to the world of Three Dimensions.
is a full-featured 3D application. It supports the entirety of the 3D pipeline - modeling, rigging, animation, simulation, rendering, compositing, motion tracking, and video editing.
Use Blender to create TV commercials, to make technical visualizations, business graphics, to create content for games, or design user interfaces. You can easy build and manage complex environments. The renderer is versatile and extremely fast. All basic animation principles (curves & keys) are well implemented.
Use Blender to create 3D images and animations, films and commercials, content for games, architectural and industrial visualizatons, and scientific visualizations.
http://www.blender.org''')

Expand Down
4 changes: 2 additions & 2 deletions intern/cycles/blender/addon/properties.py
Expand Up @@ -272,7 +272,7 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):

use_layer_samples: EnumProperty(
name="Layer Samples",
description="How to use per render layer sample settings",
description="How to use per view layer sample settings",
items=enum_use_layer_samples,
default='USE',
)
Expand Down Expand Up @@ -1144,7 +1144,7 @@ class CyclesObjectSettings(bpy.types.PropertyGroup):
name="Holdout",
description="Render objects as a holdout or matte, creating a "
"hole in the image with zero alpha, to fill out in "
"compositing with real footange or another render",
"compositing with real footage or another render",
default=False,
)

Expand Down
23 changes: 23 additions & 0 deletions intern/cycles/blender/addon/ui.py
Expand Up @@ -244,6 +244,12 @@ def draw(self, context):
col.prop(cscene, "sample_all_lights_direct")
col.prop(cscene, "sample_all_lights_indirect")

for view_layer in scene.view_layers:
if view_layer.samples > 0:
layout.separator()
layout.row().prop(cscene, "use_layer_samples")
break


class CYCLES_RENDER_PT_sampling_total(CyclesButtonsPanel, Panel):
bl_label = "Total Samples"
Expand Down Expand Up @@ -720,6 +726,22 @@ def draw(self, context):
col.active = rd.use_freestyle


class CYCLES_RENDER_PT_override(CyclesButtonsPanel, Panel):
bl_label = "Override"
bl_options = {'DEFAULT_CLOSED'}
bl_context = "view_layer"

def draw(self, context):
layout = self.layout
layout.use_property_split = True
layout.use_property_decorate = False

view_layer = context.view_layer

layout.prop(view_layer, "material_override")
layout.prop(view_layer, "samples")


class CYCLES_RENDER_PT_passes(CyclesButtonsPanel, Panel):
bl_label = "Passes"
bl_context = "view_layer"
Expand Down Expand Up @@ -2098,6 +2120,7 @@ def get_panels():
CYCLES_RENDER_PT_performance_final_render,
CYCLES_RENDER_PT_performance_viewport,
CYCLES_RENDER_PT_filter,
CYCLES_RENDER_PT_override,
CYCLES_RENDER_PT_passes,
CYCLES_RENDER_PT_passes_data,
CYCLES_RENDER_PT_passes_light,
Expand Down
22 changes: 16 additions & 6 deletions intern/cycles/blender/blender_mesh.cpp
Expand Up @@ -979,23 +979,33 @@ Mesh *BlenderSync::sync_mesh(BL::Depsgraph& b_depsgraph,
BL::Object& b_ob,
BL::Object& b_ob_instance,
bool object_updated,
bool hide_tris)
bool show_self,
bool show_particles)
{
/* test if we can instance or if the object is modified */
BL::ID b_ob_data = b_ob.data();
BL::ID key = (BKE_object_is_modified(b_ob))? b_ob_instance: b_ob_data;
BL::Material material_override = view_layer.material_override;

/* find shader indices */
vector<Shader*> used_shaders;

BL::Object::material_slots_iterator slot;
for(b_ob.material_slots.begin(slot); slot != b_ob.material_slots.end(); ++slot) {
BL::ID b_material(slot->material());
find_shader(b_material, used_shaders, scene->default_surface);
if(material_override) {
find_shader(material_override, used_shaders, scene->default_surface);
}
else {
BL::ID b_material(slot->material());
find_shader(b_material, used_shaders, scene->default_surface);
}
}

if(used_shaders.size() == 0) {
used_shaders.push_back(scene->default_surface);
if(material_override)
find_shader(material_override, used_shaders, scene->default_surface);
else
used_shaders.push_back(scene->default_surface);
}

/* test if we need to sync */
Expand Down Expand Up @@ -1086,7 +1096,7 @@ Mesh *BlenderSync::sync_mesh(BL::Depsgraph& b_depsgraph,
mesh->subdivision_type);

if(b_mesh) {
if(view_layer.use_surfaces && !hide_tris) {
if(view_layer.use_surfaces && show_self) {
if(mesh->subdivision_type != Mesh::SUBDIVISION_NONE)
create_subd_mesh(scene, mesh, b_ob, b_mesh, used_shaders,
dicing_rate, max_subdivisions);
Expand All @@ -1096,7 +1106,7 @@ Mesh *BlenderSync::sync_mesh(BL::Depsgraph& b_depsgraph,
create_mesh_volume_attributes(scene, b_ob, mesh, b_scene.frame_current());
}

if(view_layer.use_hair && mesh->subdivision_type == Mesh::SUBDIVISION_NONE)
if(view_layer.use_hair && show_particles && mesh->subdivision_type == Mesh::SUBDIVISION_NONE)
sync_curves(mesh, b_mesh, b_ob, false);

/* free derived mesh */
Expand Down
90 changes: 8 additions & 82 deletions intern/cycles/blender/blender_object.cpp
Expand Up @@ -295,7 +295,8 @@ Object *BlenderSync::sync_object(BL::Depsgraph& b_depsgraph,
BL::ViewLayer& b_view_layer,
BL::DepsgraphObjectInstance& b_instance,
float motion_time,
bool hide_tris,
bool show_self,
bool show_particles,
BlenderObjectCulling& culling,
bool *use_portal)
{
Expand Down Expand Up @@ -403,7 +404,7 @@ Object *BlenderSync::sync_object(BL::Depsgraph& b_depsgraph,
object_updated = true;

/* mesh sync */
object->mesh = sync_mesh(b_depsgraph, b_ob, b_ob_instance, object_updated, hide_tris);
object->mesh = sync_mesh(b_depsgraph, b_ob, b_ob_instance, object_updated, show_self, show_particles);

/* special case not tracked by object update flags */

Expand Down Expand Up @@ -505,82 +506,6 @@ Object *BlenderSync::sync_object(BL::Depsgraph& b_depsgraph,
return object;
}

static bool object_render_hide_original(BL::Object::type_enum ob_type,
BL::Object::instance_type_enum dupli_type)
{
/* metaball exception, they duplicate self */
if(ob_type == BL::Object::type_META)
return false;

return (dupli_type == BL::Object::instance_type_VERTS ||
dupli_type == BL::Object::instance_type_FACES ||
dupli_type == BL::Object::instance_type_FRAMES);
}

static bool object_render_hide(BL::Object& b_ob,
bool top_level,
bool parent_hide,
bool& hide_triangles,
BL::Depsgraph::mode_enum depsgraph_mode)
{
/* check if we should render or hide particle emitter */
BL::Object::particle_systems_iterator b_psys;

bool hair_present = false;
bool has_particles = false;
bool show_emitter = false;
bool hide_emitter = false;
bool hide_as_dupli_parent = false;
bool hide_as_dupli_child_original = false;

for(b_ob.particle_systems.begin(b_psys); b_psys != b_ob.particle_systems.end(); ++b_psys) {
if((b_psys->settings().render_type() == BL::ParticleSettings::render_type_PATH) &&
(b_psys->settings().type()==BL::ParticleSettings::type_HAIR))
hair_present = true;
has_particles = true;
}

/* Both mode_PREVIEW and mode_VIEWPORT are treated the same here.*/
const bool show_instancer = depsgraph_mode == BL::Depsgraph::mode_RENDER
? b_ob.show_instancer_for_render()
: b_ob.show_instancer_for_viewport();

if(has_particles) {
show_emitter = show_instancer;
hide_emitter = !show_emitter;
} else if(b_ob.is_instancer()) {
if(top_level || show_instancer) {
hide_as_dupli_parent = true;
}
}

/* hide original object for duplis */
BL::Object parent = b_ob.parent();
while(parent) {
if(object_render_hide_original(b_ob.type(),
parent.instance_type()))
{
if(parent_hide) {
hide_as_dupli_child_original = true;
break;
}
}
parent = parent.parent();
}

hide_triangles = hide_emitter;

if(show_emitter) {
return false;
}
else if(hair_present) {
return hide_as_dupli_child_original;
}
else {
return (hide_as_dupli_parent || hide_as_dupli_child_original);
}
}

/* Object Loop */

void BlenderSync::sync_objects(BL::Depsgraph& b_depsgraph, float motion_time)
Expand Down Expand Up @@ -608,7 +533,6 @@ void BlenderSync::sync_objects(BL::Depsgraph& b_depsgraph, float motion_time)
bool use_portal = false;

BL::ViewLayer b_view_layer = b_depsgraph.view_layer_eval();
BL::Depsgraph::mode_enum depsgraph_mode = b_depsgraph.mode();

BL::Depsgraph::object_instances_iterator b_instance_iter;
for(b_depsgraph.object_instances.begin(b_instance_iter);
Expand All @@ -624,15 +548,17 @@ void BlenderSync::sync_objects(BL::Depsgraph& b_depsgraph, float motion_time)
culling.init_object(scene, b_ob);

/* test if object needs to be hidden */
bool hide_tris;
const bool show_self = b_instance.show_self();
const bool show_particles = b_instance.show_particles();

if(!object_render_hide(b_ob, true, true, hide_tris, depsgraph_mode)) {
if(show_self || show_particles) {
/* object itself */
sync_object(b_depsgraph,
b_view_layer,
b_instance,
motion_time,
hide_tris,
show_self,
show_particles,
culling,
&use_portal);
}
Expand Down
10 changes: 6 additions & 4 deletions intern/cycles/blender/blender_session.cpp
Expand Up @@ -481,13 +481,15 @@ void BlenderSession::render(BL::Depsgraph& b_depsgraph_)
scene->integrator->tag_update(scene);
}

int effective_layer_samples = session_params.samples;
/* Update number of samples per layer. */
int samples = sync->get_layer_samples();
bool bound_samples = sync->get_layer_bound_samples();
int effective_layer_samples;

/* TODO: Update number of samples per layer. */
#if 0
if(samples != 0 && (!bound_samples || (samples < session_params.samples)))
effective_layer_samples = samples;
#endif
else
effective_layer_samples = session_params.samples;

/* Update tile manager if we're doing resumable render. */
update_resumable_tile_manager(effective_layer_samples);
Expand Down
19 changes: 19 additions & 0 deletions intern/cycles/blender/blender_sync.cpp
Expand Up @@ -372,6 +372,25 @@ void BlenderSync::sync_view_layer(BL::SpaceView3D& /*b_v3d*/, BL::ViewLayer& b_v
view_layer.use_background_ao = b_view_layer.use_ao();
view_layer.use_surfaces = b_view_layer.use_solid();
view_layer.use_hair = b_view_layer.use_strand();

/* Material override. */
view_layer.material_override = b_view_layer.material_override();

/* Sample override. */
PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles");
int use_layer_samples = get_enum(cscene, "use_layer_samples");

view_layer.bound_samples = (use_layer_samples == 1);
view_layer.samples = 0;

if(use_layer_samples != 2) {
int samples = b_view_layer.samples();
if(get_boolean(cscene, "use_square_samples"))
view_layer.samples = samples * samples;
else
view_layer.samples = samples;
}

}

/* Images */
Expand Down

0 comments on commit d5632db

Please sign in to comment.