diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2021-11-01 14:15:09 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2021-11-01 14:15:09 +0300 |
commit | 3f0991266f418e1b256d8157f83fe2ba3c05014d (patch) | |
tree | 38c0c8d0cee18d0d8e7f297c6ce5cf4d210bec9e /intern/cycles/blender | |
parent | a96b2f39b82373d05f543bba325b2dd21baabf63 (diff) | |
parent | 81bd49d4fea41f6e569f3778724b33f15e95f853 (diff) |
Merge branch 'blender-v3.0-release'
Diffstat (limited to 'intern/cycles/blender')
-rw-r--r-- | intern/cycles/blender/addon/engine.py | 1 | ||||
-rw-r--r-- | intern/cycles/blender/addon/properties.py | 21 | ||||
-rw-r--r-- | intern/cycles/blender/addon/version_update.py | 8 | ||||
-rw-r--r-- | intern/cycles/blender/camera.cpp | 2 | ||||
-rw-r--r-- | intern/cycles/blender/curves.cpp | 25 | ||||
-rw-r--r-- | intern/cycles/blender/python.cpp | 5 | ||||
-rw-r--r-- | intern/cycles/blender/sync.cpp | 4 |
7 files changed, 28 insertions, 38 deletions
diff --git a/intern/cycles/blender/addon/engine.py b/intern/cycles/blender/addon/engine.py index c402df12ba9..e5bb77a834a 100644 --- a/intern/cycles/blender/addon/engine.py +++ b/intern/cycles/blender/addon/engine.py @@ -233,6 +233,7 @@ def list_render_passes(scene, srl): if crl.denoising_store_passes: yield ("Denoising Normal", "XYZ", 'VECTOR') yield ("Denoising Albedo", "RGB", 'COLOR') + yield ("Denoising Depth", "Z", 'VALUE') # Custom AOV passes. for aov in srl.aovs: diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py index 1e98e6d0a7c..c92e0ec65af 100644 --- a/intern/cycles/blender/addon/properties.py +++ b/intern/cycles/blender/addon/properties.py @@ -1360,7 +1360,7 @@ class CyclesPreferences(bpy.types.AddonPreferences): elif entry.type == 'CPU': cpu_devices.append(entry) # Extend all GPU devices with CPU. - if compute_device_type != 'CPU': + if len(devices) and compute_device_type != 'CPU': devices.extend(cpu_devices) return devices @@ -1378,12 +1378,18 @@ class CyclesPreferences(bpy.types.AddonPreferences): self.refresh_devices() return None + def get_compute_device_type(self): + if self.compute_device_type == '': + return 'NONE' + return self.compute_device_type + def get_num_gpu_devices(self): import _cycles - device_list = _cycles.available_devices(self.compute_device_type) + compute_device_type = self.get_compute_device_type() + device_list = _cycles.available_devices(compute_device_type) num = 0 for device in device_list: - if device[1] != self.compute_device_type: + if device[1] != compute_device_type: continue for dev in self.devices: if dev.use and dev.id == device[2]: @@ -1425,15 +1431,16 @@ class CyclesPreferences(bpy.types.AddonPreferences): row = layout.row() row.prop(self, "compute_device_type", expand=True) - if self.compute_device_type == 'NONE': + compute_device_type = self.get_compute_device_type() + if compute_device_type == 'NONE': return row = layout.row() - devices = self.get_devices_for_type(self.compute_device_type) - self._draw_devices(row, self.compute_device_type, devices) + devices = self.get_devices_for_type(compute_device_type) + self._draw_devices(row, compute_device_type, devices) import _cycles has_peer_memory = 0 - for device in _cycles.available_devices(self.compute_device_type): + for device in _cycles.available_devices(compute_device_type): if device[3] and self.find_existing_device_entry(device).use: has_peer_memory += 1 if has_peer_memory > 1: diff --git a/intern/cycles/blender/addon/version_update.py b/intern/cycles/blender/addon/version_update.py index b3e8e755903..90ed8873c02 100644 --- a/intern/cycles/blender/addon/version_update.py +++ b/intern/cycles/blender/addon/version_update.py @@ -86,7 +86,7 @@ def do_versions(self): # Device might not currently be available so this can fail try: if system.legacy_compute_device_type == 1: - prop.compute_device_type = 'OPENCL' + prop.compute_device_type = 'NONE' # Was OpenCL elif system.legacy_compute_device_type == 2: prop.compute_device_type = 'CUDA' else: @@ -97,6 +97,12 @@ def do_versions(self): # Init device list for UI prop.get_devices(prop.compute_device_type) + if bpy.context.preferences.version <= (3, 0, 40): + # Disable OpenCL device + prop = bpy.context.preferences.addons[__package__].preferences + if prop['compute_device_type'] == 4: + prop.compute_device_type = 'NONE' + # We don't modify startup file because it assumes to # have all the default values only. if not bpy.data.is_saved: diff --git a/intern/cycles/blender/camera.cpp b/intern/cycles/blender/camera.cpp index f87ebe39d21..b5afcfa7fda 100644 --- a/intern/cycles/blender/camera.cpp +++ b/intern/cycles/blender/camera.cpp @@ -639,7 +639,7 @@ void BlenderSync::sync_camera_motion( /* TODO(sergey): De-duplicate calculation with camera sync. */ float fov = 2.0f * atanf((0.5f * sensor_size) / bcam.lens / aspectratio); if (fov != cam->get_fov()) { - VLOG(1) << "Camera " << b_ob.name() << " FOV change detected."; + VLOG(3) << "Camera " << b_ob.name() << " FOV change detected."; if (motion_time == 0.0f) { cam->set_fov(fov); } diff --git a/intern/cycles/blender/curves.cpp b/intern/cycles/blender/curves.cpp index fb2b329e61d..ffe0c553738 100644 --- a/intern/cycles/blender/curves.cpp +++ b/intern/cycles/blender/curves.cpp @@ -304,10 +304,6 @@ static void ExportCurveSegments(Scene *scene, Hair *hair, ParticleCurveData *CDa } } - if (num_curves > 0) { - VLOG(1) << "Exporting curve segments for mesh " << hair->name; - } - hair->reserve_curves(hair->num_curves() + num_curves, hair->get_curve_keys().size() + num_keys); num_keys = 0; @@ -356,7 +352,7 @@ static void ExportCurveSegments(Scene *scene, Hair *hair, ParticleCurveData *CDa /* check allocation */ if ((hair->get_curve_keys().size() != num_keys) || (hair->num_curves() != num_curves)) { - VLOG(1) << "Allocation failed, clearing data"; + VLOG(1) << "Hair memory allocation failed, clearing data."; hair->clear(true); } } @@ -412,16 +408,11 @@ static void export_hair_motion_validate_attribute(Hair *hair, if (num_motion_keys != num_keys || !have_motion) { /* No motion or hair "topology" changed, remove attributes again. */ if (num_motion_keys != num_keys) { - VLOG(1) << "Hair topology changed, removing attribute."; - } - else { - VLOG(1) << "No motion, removing attribute."; + VLOG(1) << "Hair topology changed, removing motion attribute."; } hair->attributes.remove(ATTR_STD_MOTION_VERTEX_POSITION); } else if (motion_step > 0) { - VLOG(1) << "Filling in new motion vertex position for motion_step " << motion_step; - /* Motion, fill up previous steps that we might have skipped because * they had no motion, but we need them anyway now. */ for (int step = 0; step < motion_step; step++) { @@ -437,16 +428,12 @@ static void export_hair_motion_validate_attribute(Hair *hair, static void ExportCurveSegmentsMotion(Hair *hair, ParticleCurveData *CData, int motion_step) { - VLOG(1) << "Exporting curve motion segments for hair " << hair->name << ", motion step " - << motion_step; - /* find attribute */ Attribute *attr_mP = hair->attributes.find(ATTR_STD_MOTION_VERTEX_POSITION); bool new_attribute = false; /* add new attribute if it doesn't exist already */ if (!attr_mP) { - VLOG(1) << "Creating new motion vertex position attribute"; attr_mP = hair->attributes.add(ATTR_STD_MOTION_VERTEX_POSITION); new_attribute = true; } @@ -682,10 +669,6 @@ static void export_hair_curves(Scene *scene, Hair *hair, BL::Hair b_hair) const int num_keys = b_hair.points.length(); const int num_curves = b_hair.curves.length(); - if (num_curves > 0) { - VLOG(1) << "Exporting curve segments for hair " << hair->name; - } - hair->reserve_curves(num_curves, num_keys); /* Export curves and points. */ @@ -743,15 +726,11 @@ static void export_hair_curves(Scene *scene, Hair *hair, BL::Hair b_hair) static void export_hair_curves_motion(Hair *hair, BL::Hair b_hair, int motion_step) { - VLOG(1) << "Exporting curve motion segments for hair " << hair->name << ", motion step " - << motion_step; - /* Find or add attribute. */ Attribute *attr_mP = hair->attributes.find(ATTR_STD_MOTION_VERTEX_POSITION); bool new_attribute = false; if (!attr_mP) { - VLOG(1) << "Creating new motion vertex position attribute"; attr_mP = hair->attributes.add(ATTR_STD_MOTION_VERTEX_POSITION); new_attribute = true; } diff --git a/intern/cycles/blender/python.cpp b/intern/cycles/blender/python.cpp index 20bf6385999..bb9b0a74424 100644 --- a/intern/cycles/blender/python.cpp +++ b/intern/cycles/blender/python.cpp @@ -157,8 +157,6 @@ static PyObject *init_func(PyObject * /*self*/, PyObject *args) DebugFlags().running_inside_blender = true; - VLOG(2) << "Debug flags initialized to:\n" << DebugFlags(); - Py_RETURN_NONE; } @@ -885,8 +883,6 @@ static PyObject *debug_flags_update_func(PyObject * /*self*/, PyObject *args) debug_flags_sync_from_scene(b_scene); - VLOG(2) << "Debug flags set to:\n" << DebugFlags(); - debug_flags_set = true; Py_RETURN_NONE; @@ -896,7 +892,6 @@ static PyObject *debug_flags_reset_func(PyObject * /*self*/, PyObject * /*args*/ { debug_flags_reset(); if (debug_flags_set) { - VLOG(2) << "Debug flags reset to:\n" << DebugFlags(); debug_flags_set = false; } Py_RETURN_NONE; diff --git a/intern/cycles/blender/sync.cpp b/intern/cycles/blender/sync.cpp index e0a13625962..cf0b77a9b16 100644 --- a/intern/cycles/blender/sync.cpp +++ b/intern/cycles/blender/sync.cpp @@ -366,7 +366,9 @@ void BlenderSync::sync_integrator(BL::ViewLayer &b_view_layer, bool background) if ((preview && !preview_scrambling_distance) || use_adaptive_sampling) scrambling_distance = 1.0f; - VLOG(1) << "Used Scrambling Distance: " << scrambling_distance; + if (scrambling_distance != 1.0f) { + VLOG(3) << "Using scrambling distance: " << scrambling_distance; + } integrator->set_scrambling_distance(scrambling_distance); if (get_boolean(cscene, "use_fast_gi")) { |