[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55172] trunk/blender: More UI message i18n fixes and improvements...

Bastien Montagne montagne29 at wanadoo.fr
Sun Mar 10 18:42:08 CET 2013


Revision: 55172
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55172
Author:   mont29
Date:     2013-03-10 17:42:08 +0000 (Sun, 10 Mar 2013)
Log Message:
-----------
More UI message i18n fixes and improvements...
Fix for keyingsets tips, and make them (and a few others) findable by i18n messages extracting code (for some reasons, their bl_rna.description are void???).

Modified Paths:
--------------
    trunk/blender/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
    trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py
    trunk/blender/release/scripts/startup/keyingsets_builtins.py
    trunk/blender/source/blender/editors/animation/keyframing.c

Modified: trunk/blender/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
===================================================================
--- trunk/blender/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py	2013-03-10 17:40:55 UTC (rev 55171)
+++ trunk/blender/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py	2013-03-10 17:42:08 UTC (rev 55172)
@@ -356,6 +356,8 @@
 
         if bl_rna.description:
             process_msg(msgs, default_context, bl_rna.description, msgsrc, reports, check_ctxt_rna_tip, settings)
+        elif cls.__doc__:  # XXX Some classes (like KeyingSetInfo subclasses) have void description... :(
+            process_msg(msgs, default_context, cls.__doc__, msgsrc, reports, check_ctxt_rna_tip, settings)
 
         if hasattr(bl_rna, 'bl_label') and  bl_rna.bl_label:
             process_msg(msgs, msgctxt, bl_rna.bl_label, msgsrc, reports, check_ctxt_rna, settings)

Modified: trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py	2013-03-10 17:40:55 UTC (rev 55171)
+++ trunk/blender/release/scripts/startup/bl_ui/space_view3d_toolbar.py	2013-03-10 17:42:08 UTC (rev 55172)
@@ -1209,7 +1209,7 @@
 
 
 class VIEW3D_PT_tools_particlemode(View3DPanel, Panel):
-    """default tools for particle mode"""
+    """Default tools for particle mode"""
     bl_context = "particlemode"
     bl_label = "Options"
 

Modified: trunk/blender/release/scripts/startup/keyingsets_builtins.py
===================================================================
--- trunk/blender/release/scripts/startup/keyingsets_builtins.py	2013-03-10 17:40:55 UTC (rev 55171)
+++ trunk/blender/release/scripts/startup/keyingsets_builtins.py	2013-03-10 17:42:08 UTC (rev 55172)
@@ -20,14 +20,11 @@
 
 """
 Built-In Keying Sets
-None of these Keying Sets should be removed, as these
-are needed by various parts of Blender in order for them
+None of these Keying Sets should be removed, as these are needed by various parts of Blender in order for them
 to work correctly.
 
-Beware also about changing the order that these are defined
-here, since this can result in old files referring to the
-wrong Keying Set as the active one, potentially resulting
-in lost (i.e. unkeyed) animation.
+Beware also about changing the order that these are defined here, since this can result in old files referring to the
+wrong Keying Set as the active one, potentially resulting in lost (i.e. unkeyed) animation.
 """
 
 import bpy
@@ -138,9 +135,7 @@
 
 # LocRotScale
 class BUILTIN_KSI_LocRotScale(KeyingSetInfo):
-    """
-    Insert a keyframe on each of the location, rotation, and scale channels
-    """
+    """Insert a keyframe on each of the location, rotation, and scale channels"""
     bl_idname = ANIM_KS_LOC_ROT_SCALE_ID
     bl_label = "LocRotScale"
 
@@ -183,10 +178,8 @@
 
 # VisualLocation
 class BUILTIN_KSI_VisualLoc(KeyingSetInfo):
-    """
-    Insert a keyframe on each of the location channels, taking into account
-    effects of constraints and relationships
-    """
+    """Insert a keyframe on each of the location channels, taking into account effects of constraints """
+    """and relationships"""
     bl_label = "Visual Location"
 
     bl_options = {'INSERTKEY_VISUAL'}
@@ -203,10 +196,8 @@
 
 # VisualRotation
 class BUILTIN_KSI_VisualRot(KeyingSetInfo):
-    """
-    Insert a keyframe on each of the rotation channels, taking into account
-    effects of constraints and relationships
-    """
+    """Insert a keyframe on each of the rotation channels, taking into account effects of constraints """
+    """and relationships"""
     bl_label = "Visual Rotation"
 
     bl_options = {'INSERTKEY_VISUAL'}
@@ -223,10 +214,8 @@
 
 # VisualScaling
 class BUILTIN_KSI_VisualScaling(KeyingSetInfo):
-    """
-    Insert a keyframe on each of the scale channels, taking into account
-    effects of constraints and relationships
-    """
+    """Insert a keyframe on each of the scale channels, taking into account effects of constraints """
+    """and relationships"""
     bl_label = "Visual Scaling"
 
     bl_options = {'INSERTKEY_VISUAL'}
@@ -243,10 +232,8 @@
 
 # VisualLocRot
 class BUILTIN_KSI_VisualLocRot(KeyingSetInfo):
-    """
-    Insert a keyframe on each of the location and rotation channels,
-    taking into account effects of constraints and relationships
-    """
+    """Insert a keyframe on each of the location and rotation channels, taking into account effects of constraints """
+    """and relationships"""
     bl_label = "Visual LocRot"
 
     bl_options = {'INSERTKEY_VISUAL'}
@@ -267,10 +254,8 @@
 
 # VisualLocScale
 class BUILTIN_KSI_VisualLocScale(KeyingSetInfo):
-    """
-    Insert a keyframe on each of the location and scaling channels,
-    taking into account effects of constraints and relationships
-    """
+    """Insert a keyframe on each of the location and scaling channels, taking into account effects of constraints """
+    """and relationships"""
     bl_label = "Visual LocScale"
 
     bl_options = {'INSERTKEY_VISUAL'}
@@ -291,10 +276,8 @@
 
 # VisualLocRotScale
 class BUILTIN_KSI_VisualLocRotScale(KeyingSetInfo):
-    """
-    Insert a keyframe on each of the location, rotation and scaling channels,
-    taking into account effects of constraints and relationships
-    """
+    """Insert a keyframe on each of the location, rotation and scaling channels, taking into account effects """
+    """of constraints and relationships"""
     bl_label = "Visual LocRotScale"
 
     bl_options = {'INSERTKEY_VISUAL'}
@@ -317,10 +300,8 @@
 
 # VisualRotScale
 class BUILTIN_KSI_VisualRotScale(KeyingSetInfo):
-    """
-    Insert a keyframe on each of the rotation and scaling channels,
-    taking into account effects of constraints and relationships
-    """
+    """Insert a keyframe on each of the rotation and scaling channels, taking into account effects of constraints """
+    """and relationships"""
     bl_label = "Visual RotScale"
 
     bl_options = {'INSERTKEY_VISUAL'}
@@ -367,10 +348,8 @@
 
 # All properties that are likely to get animated in a character rig
 class BUILTIN_KSI_WholeCharacter(KeyingSetInfo):
-    """
-    Insert a keyframe for all properties that are likely to get animated in a
-    character rig (useful when blocking out a shot)
-    """
+    """Insert a keyframe for all properties that are likely to get animated in a character rig """
+    """(useful when blocking out a shot)"""
     bl_idname = ANIM_KS_WHOLE_CHARACTER_ID
     bl_label = "Whole Character"
 

Modified: trunk/blender/source/blender/editors/animation/keyframing.c
===================================================================
--- trunk/blender/source/blender/editors/animation/keyframing.c	2013-03-10 17:40:55 UTC (rev 55171)
+++ trunk/blender/source/blender/editors/animation/keyframing.c	2013-03-10 17:42:08 UTC (rev 55172)
@@ -1307,7 +1307,7 @@
 		uiLayout *layout;
 		
 		/* call the menu, which will call this operator again, hence the canceled */
-		pup = uiPupMenuBegin(C, op->type->name, ICON_NONE);
+		pup = uiPupMenuBegin(C, RNA_struct_ui_name(op->type->srna), ICON_NONE);
 		layout = uiPupMenuLayout(pup);
 		uiItemsEnumO(layout, "ANIM_OT_keyframe_insert_menu", "type");
 		uiPupMenuEnd(C, pup);




More information about the Bf-blender-cvs mailing list