[Bf-blender-cvs] [0d559a67304] blender2.8: RNA: follow boolean naming conventions

Campbell Barton noreply at git.blender.org
Sat May 26 11:54:52 CEST 2018


Commit: 0d559a67304d25a5c39937528cbc3c3dd51b6396
Author: Campbell Barton
Date:   Sat May 26 11:54:25 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB0d559a67304d25a5c39937528cbc3c3dd51b6396

RNA: follow boolean naming conventions

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

M	release/scripts/startup/bl_ui/properties_material.py
M	release/scripts/startup/bl_ui/properties_render.py
M	release/scripts/startup/bl_ui/space_view3d.py
M	release/scripts/startup/bl_ui/space_view3d_toolbar.py
M	source/blender/makesrna/intern/rna_material.c
M	source/blender/makesrna/intern/rna_scene.c
M	source/blender/makesrna/intern/rna_space.c
M	tests/python/eevee_render_tests.py

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

diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py
index 13c783ad024..9b70c8f22d4 100644
--- a/release/scripts/startup/bl_ui/properties_material.py
+++ b/release/scripts/startup/bl_ui/properties_material.py
@@ -204,7 +204,7 @@ class EEVEE_MATERIAL_PT_options(MaterialButtonsPanel, Panel):
             row.prop(mat, "alpha_threshold")
 
         if mat.blend_method not in {"OPAQUE", "CLIP", "HASHED"}:
-            layout.prop(mat, "transparent_hide_backside")
+            layout.prop(mat, "show_transparent_backside")
 
         layout.prop(mat, "use_screen_refraction")
         layout.prop(mat, "refraction_depth")
diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py
index 304b64cf869..bccde2da2f4 100644
--- a/release/scripts/startup/bl_ui/properties_render.py
+++ b/release/scripts/startup/bl_ui/properties_render.py
@@ -443,17 +443,17 @@ class RENDER_PT_eevee_ambient_occlusion(RenderButtonsPanel, Panel):
     def draw_header(self, context):
         scene = context.scene
         props = scene.eevee
-        self.layout.prop(props, "gtao_enable", text="")
+        self.layout.prop(props, "use_gtao", text="")
 
     def draw(self, context):
         layout = self.layout
         scene = context.scene
         props = scene.eevee
 
-        layout.active = props.gtao_enable
+        layout.active = props.use_gtao
         col = layout.column()
-        col.prop(props, "gtao_use_bent_normals")
-        col.prop(props, "gtao_bounce")
+        col.prop(props, "use_gtao_bent_normals")
+        col.prop(props, "use_gtao_bounce")
         col.prop(props, "gtao_distance")
         col.prop(props, "gtao_factor")
         col.prop(props, "gtao_quality")
@@ -471,14 +471,14 @@ class RENDER_PT_eevee_motion_blur(RenderButtonsPanel, Panel):
     def draw_header(self, context):
         scene = context.scene
         props = scene.eevee
-        self.layout.prop(props, "motion_blur_enable", text="")
+        self.layout.prop(props, "use_motion_blur", text="")
 
     def draw(self, context):
         layout = self.layout
         scene = context.scene
         props = scene.eevee
 
-        layout.active = props.motion_blur_enable
+        layout.active = props.use_motion_blur
         col = layout.column()
         col.prop(props, "motion_blur_samples")
         col.prop(props, "motion_blur_shutter")
@@ -496,14 +496,14 @@ class RENDER_PT_eevee_depth_of_field(RenderButtonsPanel, Panel):
     def draw_header(self, context):
         scene = context.scene
         props = scene.eevee
-        self.layout.prop(props, "dof_enable", text="")
+        self.layout.prop(props, "use_dof", text="")
 
     def draw(self, context):
         layout = self.layout
         scene = context.scene
         props = scene.eevee
 
-        layout.active = props.dof_enable
+        layout.active = props.use_dof
         col = layout.column()
         col.prop(props, "bokeh_max_size")
         col.prop(props, "bokeh_threshold")
@@ -521,14 +521,14 @@ class RENDER_PT_eevee_bloom(RenderButtonsPanel, Panel):
     def draw_header(self, context):
         scene = context.scene
         props = scene.eevee
-        self.layout.prop(props, "bloom_enable", text="")
+        self.layout.prop(props, "use_bloom", text="")
 
     def draw(self, context):
         layout = self.layout
         scene = context.scene
         props = scene.eevee
 
-        layout.active = props.bloom_enable
+        layout.active = props.use_bloom
         col = layout.column()
         col.prop(props, "bloom_threshold")
         col.prop(props, "bloom_knee")
@@ -550,25 +550,25 @@ class RENDER_PT_eevee_volumetric(RenderButtonsPanel, Panel):
     def draw_header(self, context):
         scene = context.scene
         props = scene.eevee
-        self.layout.prop(props, "volumetric_enable", text="")
+        self.layout.prop(props, "use_volumetric", text="")
 
     def draw(self, context):
         layout = self.layout
         scene = context.scene
         props = scene.eevee
 
-        layout.active = props.volumetric_enable
+        layout.active = props.use_volumetric
         col = layout.column()
         col.prop(props, "volumetric_start")
         col.prop(props, "volumetric_end")
         col.prop(props, "volumetric_tile_size")
         col.prop(props, "volumetric_samples")
         col.prop(props, "volumetric_sample_distribution")
-        col.prop(props, "volumetric_lights")
+        col.prop(props, "use_volumetric_lights")
         col.prop(props, "volumetric_light_clamp")
-        col.prop(props, "volumetric_shadows")
+        col.prop(props, "use_volumetric_shadows")
         col.prop(props, "volumetric_shadow_samples")
-        col.prop(props, "volumetric_colored_transmittance")
+        col.prop(props, "use_volumetric_colored_transmittance")
 
 
 class RENDER_PT_eevee_subsurface_scattering(RenderButtonsPanel, Panel):
@@ -583,7 +583,7 @@ class RENDER_PT_eevee_subsurface_scattering(RenderButtonsPanel, Panel):
     def draw_header(self, context):
         scene = context.scene
         props = scene.eevee
-        self.layout.prop(props, "sss_enable", text="")
+        self.layout.prop(props, "use_sss", text="")
 
     def draw(self, context):
         layout = self.layout
@@ -593,7 +593,7 @@ class RENDER_PT_eevee_subsurface_scattering(RenderButtonsPanel, Panel):
         col = layout.column()
         col.prop(props, "sss_samples")
         col.prop(props, "sss_jitter_threshold")
-        col.prop(props, "sss_separate_albedo")
+        col.prop(props, "use_sss_separate_albedo")
 
 
 class RENDER_PT_eevee_screen_space_reflections(RenderButtonsPanel, Panel):
@@ -608,7 +608,7 @@ class RENDER_PT_eevee_screen_space_reflections(RenderButtonsPanel, Panel):
     def draw_header(self, context):
         scene = context.scene
         props = scene.eevee
-        self.layout.prop(props, "ssr_enable", text="")
+        self.layout.prop(props, "use_ssr", text="")
 
     def draw(self, context):
         layout = self.layout
@@ -616,9 +616,9 @@ class RENDER_PT_eevee_screen_space_reflections(RenderButtonsPanel, Panel):
         props = scene.eevee
 
         col = layout.column()
-        col.active = props.ssr_enable
-        col.prop(props, "ssr_refraction")
-        col.prop(props, "ssr_halfres")
+        col.active = props.use_ssr
+        col.prop(props, "use_ssr_refraction")
+        col.prop(props, "use_ssr_halfres")
         col.prop(props, "ssr_quality")
         col.prop(props, "ssr_max_roughness")
         col.prop(props, "ssr_thickness")
@@ -644,7 +644,7 @@ class RENDER_PT_eevee_shadows(RenderButtonsPanel, Panel):
         col.prop(props, "shadow_method")
         col.prop(props, "shadow_cube_size")
         col.prop(props, "shadow_cascade_size")
-        col.prop(props, "shadow_high_bitdepth")
+        col.prop(props, "use_shadow_high_bitdepth")
 
 
 class RENDER_PT_eevee_sampling(RenderButtonsPanel, Panel):
@@ -664,7 +664,7 @@ class RENDER_PT_eevee_sampling(RenderButtonsPanel, Panel):
         col = layout.column()
         col.prop(props, "taa_samples")
         col.prop(props, "taa_render_samples")
-        col.prop(props, "taa_reprojection")
+        col.prop(props, "use_taa_reprojection")
 
 
 class RENDER_PT_eevee_indirect_lighting(RenderButtonsPanel, Panel):
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index ff0ae8a20d5..e3d8a66ae8c 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -3628,7 +3628,7 @@ class VIEW3D_PT_overlay(Panel):
 
             col = layout.column()
             col.active = display_all
-            col.prop(overlay, "transparent_bones")
+            col.prop(overlay, "show_transparent_bones")
             col.prop(overlay, "show_bone_selection")
 
         elif context.mode == 'EDIT_ARMATURE':
@@ -3637,7 +3637,7 @@ class VIEW3D_PT_overlay(Panel):
 
             col = layout.column()
             col.active = display_all
-            col.prop(overlay, "transparent_bones")
+            col.prop(overlay, "show_transparent_bones")
 
         elif context.mode in {'PAINT_WEIGHT', 'PAINT_VERTEX', 'PAINT_TEXTURE'}:
             col.separator()
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index ae82f17bb87..c38ead16dc8 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -570,7 +570,7 @@ class VIEW3D_PT_slots_projectpaint(View3DPanel, Panel):
                 else:
                     slot = None
 
-                if slot and slot.valid:
+                if slot and slot.is_valid:
                     col.label("UV Map:")
                     col.prop_search(slot, "uv_layer", ob.data, "uv_layers", text="")
 
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index 7dc76120097..a81a7452771 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -372,8 +372,8 @@ void RNA_def_material(BlenderRNA *brna)
 	RNA_def_property_ui_text(prop, "Clip Threshold", "A pixel is rendered only if its alpha value is above this threshold");
 	RNA_def_property_update(prop, 0, "rna_Material_draw_update");
 
-	prop = RNA_def_property(srna, "transparent_hide_backside", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "blend_flag", MA_BL_HIDE_BACKSIDE);
+	prop = RNA_def_property(srna, "show_transparent_backside", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_negative_sdna(prop, NULL, "blend_flag", MA_BL_HIDE_BACKSIDE);
 	RNA_def_property_ui_text(prop, "Hide Backside", "Limit transparency to a single layer "
 	                                                 "(avoids transparency sorting problems)");
 	RNA_def_property_update(prop, 0, "rna_Material_draw_update");
@@ -519,7 +519,8 @@ static void rna_def_tex_slot(BlenderRNA *brna)
 	RNA_def_property_ui_text(prop, "UV Map", "Name of UV map");
 	RNA_def_property_update(prop, NC_GEOM | ND_DATA, "rna_Material_update");
 	
-

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list