[Bf-blender-cvs] [930e526cae6] master: Cleanup: warnings, spelling, formatting

Campbell Barton noreply at git.blender.org
Fri May 20 03:26:17 CEST 2022


Commit: 930e526cae6204658e70fe7f19c61cf3291949f4
Author: Campbell Barton
Date:   Fri May 20 11:24:34 2022 +1000
Branches: master
https://developer.blender.org/rB930e526cae6204658e70fe7f19c61cf3291949f4

Cleanup: warnings, spelling, formatting

Avoid multiple `sound.bl_rna.properties["channels"].enum_items` in
the same line. Note we might want a way to avoid having to do this.

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

M	release/scripts/startup/bl_ui/space_sequencer.py
M	source/blender/blenkernel/BKE_subdiv_eval.h
M	source/blender/editors/transform/transform.c
M	source/blender/imbuf/intern/openexr/openexr_api.cpp

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

diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index 3c10f393503..40da0b03f76 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -1658,8 +1658,11 @@ class SEQUENCER_PT_source(SequencerButtonsPanel, Panel):
                 split.alignment = 'RIGHT'
                 split.label(text="Channels")
                 split.alignment = 'LEFT'
-                txt_channels = sound.bl_rna.properties["channels"].enum_items[sound.bl_rna.properties["channels"].enum_items.find(sound.channels)].name
-                split.label(text=txt_channels)
+
+                # FIXME(@campbellbarton): this is ugly, we may want to support a way of showing a label from an enum.
+                channel_enum_items = sound.bl_rna.properties["channels"].enum_items
+                split.label(text=channel_enum_items[channel_enum_items.find(sound.channels)].name)
+                del channel_enum_items
         else:
             if strip_type == 'IMAGE':
                 col = layout.column()
diff --git a/source/blender/blenkernel/BKE_subdiv_eval.h b/source/blender/blenkernel/BKE_subdiv_eval.h
index 7673f18317a..cb0f2ac7e32 100644
--- a/source/blender/blenkernel/BKE_subdiv_eval.h
+++ b/source/blender/blenkernel/BKE_subdiv_eval.h
@@ -62,7 +62,7 @@ void BKE_subdiv_eval_limit_point_and_derivatives(struct Subdiv *subdiv,
 void BKE_subdiv_eval_limit_point_and_normal(
     struct Subdiv *subdiv, int ptex_face_index, float u, float v, float r_P[3], float r_N[3]);
 
-/* Evaluate smoothly interpolated vertex data (such as orco). */
+/* Evaluate smoothly interpolated vertex data (such as ORCO). */
 void BKE_subdiv_eval_vertex_data(struct Subdiv *subdiv,
                                  const int ptex_face_index,
                                  const float u,
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 7ae041f2b2f..a7e2f616c9e 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1174,7 +1174,7 @@ int transformEvent(TransInfo *t, const wmEvent *event)
                 stopConstraint(t);
                 initSelectConstraint(t);
 
-                /* In this case we might just want to remove the contraint,
+                /* In this case we might just want to remove the constraint,
                  * so set #TREDRAW_SOFT to only select the constraint on the next mouse move event.
                  * This way we can kind of "cancel" due to confirmation without constraint. */
                 t->redraw = TREDRAW_SOFT;
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index 6fcd106c3d4..54ef5438c23 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -2168,7 +2168,7 @@ struct ImBuf *imb_load_openexr(const unsigned char *mem,
 }
 
 struct ImBuf *imb_load_filepath_thumbnail_openexr(const char *filepath,
-                                                  const int flags,
+                                                  const int UNUSED(flags),
                                                   const size_t max_thumb_size,
                                                   char colorspace[],
                                                   size_t *r_width,



More information about the Bf-blender-cvs mailing list