Cleanup: Remove Unused use_ambient_occusion Property

`use_ambient_occlusion` is a legacy property and not
connected to anything. The clip editor still write
to it for enabling the ambient occlusion renderpass.

This change will remove the legaccy option and
won't enable ambient occlusion pass anymore due
to visual and performance impact.

Pull Request: https://projects.blender.org/blender/blender/pulls/109783
This commit is contained in:
Jeroen Bakker 2023-07-10 11:18:22 +02:00
parent 080ab8b8b6
commit fa4def46c8
3 changed files with 2 additions and 11 deletions

View File

@ -564,8 +564,7 @@ class CLIP_OT_setup_tracking_scene(Operator):
world = bpy.data.worlds.new(name="World")
scene.world = world
# Having AO enabled is nice for shadow catcher.
world.light_settings.use_ambient_occlusion = True
# Setup ambient occlusion parameters for convenience.
world.light_settings.distance = 1.0
if hasattr(scene, "cycles"):
world.light_settings.ao_factor = 0.05

View File

@ -97,7 +97,7 @@ enum {
WO_MODE_UNUSED_3 = 1 << 3, /* cleared */
WO_MODE_UNUSED_4 = 1 << 4, /* cleared */
WO_MODE_UNUSED_5 = 1 << 5, /* cleared */
WO_AMB_OCC = 1 << 6,
WO_MODE_UNUSED_6 = 1 << 6, /* cleared */
WO_MODE_UNUSED_7 = 1 << 7, /* cleared */
};

View File

@ -130,14 +130,6 @@ static void rna_def_lighting(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Lighting", "Lighting for a World data-block");
/* ambient occlusion */
prop = RNA_def_property(srna, "use_ambient_occlusion", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, nullptr, "mode", WO_AMB_OCC);
RNA_def_property_ui_text(
prop,
"Use Ambient Occlusion",
"Use Ambient Occlusion to add shadowing based on distance between objects");
RNA_def_property_update(prop, 0, "rna_World_update");
prop = RNA_def_property(srna, "ao_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, nullptr, "aoenergy");
RNA_def_property_range(prop, 0, INT_MAX);