Merged changes in the trunk up to revision 52546.
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Mon, 26 Nov 2012 02:32:34 +0000 (02:32 +0000)
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Mon, 26 Nov 2012 02:32:34 +0000 (02:32 +0000)
Conflicts resolved:
release/datafiles/startup.blend
release/scripts/startup/bl_ui/space_view3d.py
source/blender/blenkernel/intern/idcode.c

26 files changed:
1  2 
release/datafiles/startup.blend
release/scripts/startup/bl_ui/space_view3d.py
source/blender/blenfont/BLF_translation.h
source/blender/blenkernel/intern/idcode.c
source/blender/blenlib/CMakeLists.txt
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/bmesh/intern/bmesh_construct.c
source/blender/bmesh/intern/bmesh_operators.h
source/blender/bmesh/operators/bmo_similar.c
source/blender/editors/animation/anim_channels_edit.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/mesh/editmesh_select.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/mesh/mesh_ops.c
source/blender/editors/transform/transform.c
source/blender/makesdna/DNA_action_types.h
source/blender/makesdna/DNA_userdef_types.h
source/blender/makesrna/RNA_access.h
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/shadeoutput.c
source/blender/windowmanager/WM_types.h

index f8d722a,6bb3400..3d31f9c
Binary files differ
@@@ -1838,13 -1838,8 +1838,13 @@@ class VIEW3D_MT_edit_mesh_edges(Menu)
  
          layout.separator()
  
-         layout.operator("mesh.edge_rotate", text="Rotate Edge CW").direction = 'CW'
-         layout.operator("mesh.edge_rotate", text="Rotate Edge CCW").direction = 'CCW'
 +        layout.operator("mesh.mark_freestyle_edge").clear = False
 +        layout.operator("mesh.mark_freestyle_edge", text="Clear Freestyle Edge").clear = True
 +
 +        layout.separator()
 +
+         layout.operator("mesh.edge_rotate", text="Rotate Edge CW").use_ccw = False
+         layout.operator("mesh.edge_rotate", text="Rotate Edge CCW").use_ccw = True
  
          layout.separator()
  
@@@ -100,8 -108,39 +108,40 @@@ const char *BLF_translate_do_tooltip(co
  /* Default context for operator names/labels. */
  #define BLF_I18NCONTEXT_OPERATOR_DEFAULT "Operator"
  
- /* Audio disambiguation context. */
- #define BLF_I18NCONTEXT_AUDIO "Audio"
+ /* ID-types contexts. */
+ /* WARNING! Keep it in sync with idtypes in blenkernel/intern/idcode.c */
+ #define BLF_I18NCONTEXT_ID_ACTION               "Action"
+ #define BLF_I18NCONTEXT_ID_ARMATURE             "Armature"
+ #define BLF_I18NCONTEXT_ID_BRUSH                "Brush"
+ #define BLF_I18NCONTEXT_ID_CAMERA               "Camera"
+ #define BLF_I18NCONTEXT_ID_CURVE                "Curve"
++#define BLF_I18NCONTEXT_ID_FREESTYLELINESTYLE   "FreestyleLineStyle"
+ #define BLF_I18NCONTEXT_ID_GPENCIL              "GPencil"
+ #define BLF_I18NCONTEXT_ID_GROUP                "Group"
+ #define BLF_I18NCONTEXT_ID_ID                   "ID"
+ #define BLF_I18NCONTEXT_ID_IMAGE                "Image"
+ /*#define BLF_I18NCONTEXT_ID_IPO                  "Ipo"*/ /* Deprecated */
+ #define BLF_I18NCONTEXT_ID_SHAPEKEY             "Key"
+ #define BLF_I18NCONTEXT_ID_LAMP                 "Lamp"
+ #define BLF_I18NCONTEXT_ID_LIBRARY              "Library"
+ #define BLF_I18NCONTEXT_ID_LATTICE              "Lattice"
+ #define BLF_I18NCONTEXT_ID_MATERIAL             "Material"
+ #define BLF_I18NCONTEXT_ID_METABALL             "Metaball"
+ #define BLF_I18NCONTEXT_ID_MESH                 "Mesh"
+ #define BLF_I18NCONTEXT_ID_NODETREE             "NodeTree"
+ #define BLF_I18NCONTEXT_ID_OBJECT               "Object"
+ #define BLF_I18NCONTEXT_ID_PARTICLESETTINGS     "ParticleSettings"
+ #define BLF_I18NCONTEXT_ID_SCENE                "Scene"
+ #define BLF_I18NCONTEXT_ID_SCREEN               "Screen"
+ #define BLF_I18NCONTEXT_ID_SEQUENCE             "Sequence"
+ #define BLF_I18NCONTEXT_ID_SPEAKER              "Speaker"
+ #define BLF_I18NCONTEXT_ID_SOUND                "Sound"
+ #define BLF_I18NCONTEXT_ID_TEXTURE              "Texture"
+ #define BLF_I18NCONTEXT_ID_TEXT                 "Text"
+ #define BLF_I18NCONTEXT_ID_VFONT                "VFont"
+ #define BLF_I18NCONTEXT_ID_WORLD                "World"
+ #define BLF_I18NCONTEXT_ID_WINDOWMANAGER        "WindowManager"
+ #define BLF_I18NCONTEXT_ID_MOVIECLIP            "MovieClip"
+ #define BLF_I18NCONTEXT_ID_MASK                 "Mask"
  
  #endif /* __BLF_TRANSLATION_H__ */
@@@ -47,40 -47,40 +47,41 @@@ typedef struct 
  } IDType;
  
  /* plural need to match rna_main.c's MainCollectionDef */
+ /* WARNING! Keep it in sync with i18n contexts in BLF_translation.h */
  static IDType idtypes[] = {
-       { ID_AC,        "Action",   "actions",      IDTYPE_FLAGS_ISLINKABLE},
-       { ID_AR,        "Armature", "armatures",    IDTYPE_FLAGS_ISLINKABLE},
-       { ID_BR,        "Brush",    "brushes",      IDTYPE_FLAGS_ISLINKABLE},
-       { ID_CA,        "Camera",   "cameras",      IDTYPE_FLAGS_ISLINKABLE},
-       { ID_CU,        "Curve",    "curves",       IDTYPE_FLAGS_ISLINKABLE},
-       { ID_GD,        "GPencil",  "grease_pencil", IDTYPE_FLAGS_ISLINKABLE},  /* rename gpencil */
-       { ID_GR,        "Group",    "groups",       IDTYPE_FLAGS_ISLINKABLE},
-       { ID_ID,        "ID",       "ids",          0}, /* plural is fake */
-       { ID_IM,        "Image",    "images",       IDTYPE_FLAGS_ISLINKABLE},
-       { ID_IP,        "Ipo",      "ipos",         IDTYPE_FLAGS_ISLINKABLE},  /* deprecated */
-       { ID_KE,        "Key",      "shape_keys",   0},
-       { ID_LA,        "Lamp",     "lamps",        IDTYPE_FLAGS_ISLINKABLE},
-       { ID_LI,        "Library",  "libraries",    0},
-       { ID_LS,        "FreestyleLineStyle", "linestyles", IDTYPE_FLAGS_ISLINKABLE},
-       { ID_LT,        "Lattice",  "lattices",     IDTYPE_FLAGS_ISLINKABLE},
-       { ID_MA,        "Material", "materials",    IDTYPE_FLAGS_ISLINKABLE},
-       { ID_MB,        "Metaball", "metaballs",    IDTYPE_FLAGS_ISLINKABLE},
-       { ID_ME,        "Mesh",     "meshes",       IDTYPE_FLAGS_ISLINKABLE},
-       { ID_NT,        "NodeTree", "node_groups",  IDTYPE_FLAGS_ISLINKABLE},
-       { ID_OB,        "Object",   "objects",      IDTYPE_FLAGS_ISLINKABLE},
-       { ID_PA,        "ParticleSettings", "particles", 0},
-       { ID_SCE,       "Scene",    "scenes",       IDTYPE_FLAGS_ISLINKABLE},
-       { ID_SCR,       "Screen",   "screens",      0},
-       { ID_SEQ,       "Sequence", "sequences",    0}, /* not actually ID data */
-       { ID_SPK,       "Speaker",  "speakers",     IDTYPE_FLAGS_ISLINKABLE},
-       { ID_SO,        "Sound",    "sounds",       IDTYPE_FLAGS_ISLINKABLE},
-       { ID_TE,        "Texture",  "textures",     IDTYPE_FLAGS_ISLINKABLE},
-       { ID_TXT,       "Text",     "texts",        IDTYPE_FLAGS_ISLINKABLE},
-       { ID_VF,        "VFont",    "fonts",        IDTYPE_FLAGS_ISLINKABLE},
-       { ID_WO,        "World",    "worlds",       IDTYPE_FLAGS_ISLINKABLE},
-       { ID_WM,        "WindowManager", "window_managers", 0},
-       { ID_MC,        "MovieClip", "movieclips",  IDTYPE_FLAGS_ISLINKABLE},
-       { ID_MSK,        "Mask",     "masks",       IDTYPE_FLAGS_ISLINKABLE},
+       { ID_AC,     "Action",           "actions",         IDTYPE_FLAGS_ISLINKABLE },
+       { ID_AR,     "Armature",         "armatures",       IDTYPE_FLAGS_ISLINKABLE },
+       { ID_BR,     "Brush",            "brushes",         IDTYPE_FLAGS_ISLINKABLE },
+       { ID_CA,     "Camera",           "cameras",         IDTYPE_FLAGS_ISLINKABLE },
+       { ID_CU,     "Curve",            "curves",          IDTYPE_FLAGS_ISLINKABLE },
+       { ID_GD,     "GPencil",          "grease_pencil",   IDTYPE_FLAGS_ISLINKABLE }, /* rename gpencil */
+       { ID_GR,     "Group",            "groups",          IDTYPE_FLAGS_ISLINKABLE },
+       { ID_ID,     "ID",               "ids",             0                       }, /* plural is fake */
+       { ID_IM,     "Image",            "images",          IDTYPE_FLAGS_ISLINKABLE },
+       { ID_IP,     "Ipo",              "ipos",            IDTYPE_FLAGS_ISLINKABLE }, /* deprecated */
+       { ID_KE,     "Key",              "shape_keys",      0                       },
+       { ID_LA,     "Lamp",             "lamps",           IDTYPE_FLAGS_ISLINKABLE },
+       { ID_LI,     "Library",          "libraries",       0                       },
++      { ID_LS,     "FreestyleLineStyle", "linestyles",    IDTYPE_FLAGS_ISLINKABLE },
+       { ID_LT,     "Lattice",          "lattices",        IDTYPE_FLAGS_ISLINKABLE },
+       { ID_MA,     "Material",         "materials",       IDTYPE_FLAGS_ISLINKABLE },
+       { ID_MB,     "Metaball",         "metaballs",       IDTYPE_FLAGS_ISLINKABLE },
+       { ID_MC,     "MovieClip",        "movieclips",      IDTYPE_FLAGS_ISLINKABLE },
+       { ID_ME,     "Mesh",             "meshes",          IDTYPE_FLAGS_ISLINKABLE },
+       { ID_MSK,    "Mask",             "masks",           IDTYPE_FLAGS_ISLINKABLE },
+       { ID_NT,     "NodeTree",         "node_groups",     IDTYPE_FLAGS_ISLINKABLE },
+       { ID_OB,     "Object",           "objects",         IDTYPE_FLAGS_ISLINKABLE },
+       { ID_PA,     "ParticleSettings", "particles",       0                       },
+       { ID_SCE,    "Scene",            "scenes",          IDTYPE_FLAGS_ISLINKABLE },
+       { ID_SCR,    "Screen",           "screens",         0                       },
+       { ID_SEQ,    "Sequence",         "sequences",       0                       }, /* not actually ID data */
+       { ID_SPK,    "Speaker",          "speakers",        IDTYPE_FLAGS_ISLINKABLE },
+       { ID_SO,     "Sound",            "sounds",          IDTYPE_FLAGS_ISLINKABLE },
+       { ID_TE,     "Texture",          "textures",        IDTYPE_FLAGS_ISLINKABLE },
+       { ID_TXT,    "Text",             "texts",           IDTYPE_FLAGS_ISLINKABLE },
+       { ID_VF,     "VFont",            "fonts",           IDTYPE_FLAGS_ISLINKABLE },
+       { ID_WO,     "World",            "worlds",          IDTYPE_FLAGS_ISLINKABLE },
+       { ID_WM,     "WindowManager",    "window_managers", 0                       },
  };
  static int nidtypes = sizeof(idtypes) / sizeof(idtypes[0]);
  
Simple merge
@@@ -315,17 -316,17 +316,18 @@@ static const char *template_id_browse_t
        if (type) {
                switch (RNA_type_to_ID_code(type)) {
                        case ID_SCE: return N_("Browse Scene to be linked");
-                       case ID_OB: return N_("Browse Object to be linked");
-                       case ID_ME: return N_("Browse Mesh Data to be linked");
-                       case ID_CU: return N_("Browse Curve Data to be linked");
-                       case ID_MB: return N_("Browse Metaball Data to be linked");
-                       case ID_MA: return N_("Browse Material to be linked");
-                       case ID_TE: return N_("Browse Texture to be linked");
-                       case ID_IM: return N_("Browse Image to be linked");
-                       case ID_LT: return N_("Browse Lattice Data to be linked");
-                       case ID_LA: return N_("Browse Lamp Data to be linked");
-                       case ID_CA: return N_("Browse Camera Data to be linked");
-                       case ID_WO: return N_("Browse World Settings to be linked");
+                       case ID_OB:  return N_("Browse Object to be linked");
+                       case ID_ME:  return N_("Browse Mesh Data to be linked");
+                       case ID_CU:  return N_("Browse Curve Data to be linked");
+                       case ID_MB:  return N_("Browse Metaball Data to be linked");
+                       case ID_MA:  return N_("Browse Material to be linked");
+                       case ID_TE:  return N_("Browse Texture to be linked");
+                       case ID_IM:  return N_("Browse Image to be linked");
++                      case ID_LS:  return N_("Browse Line Style Data to be linked");
+                       case ID_LT:  return N_("Browse Lattice Data to be linked");
+                       case ID_LA:  return N_("Browse Lamp Data to be linked");
+                       case ID_CA:  return N_("Browse Camera Data to be linked");
+                       case ID_WO:  return N_("Browse World Settings to be linked");
                        case ID_SCR: return N_("Choose Screen lay-out");
                        case ID_TXT: return N_("Browse Text to be linked");
                        case ID_SPK: return N_("Browse Speaker Data to be linked");
        return N_("Browse ID data to be linked");
  }
  
- static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, StructRNA *type, short idcode, int flag, const char *newop, const char *openop, const char *unlinkop)
+ /* Return a type-based i18n context, needed e.g. by "New" button.
+  * In most languages, this adjective takes different form based on gender of type name...
+  */
+ static const char *template_id_context(StructRNA *type)
+ {
+       if (type) {
+               switch (RNA_type_to_ID_code(type)) {
+                       case ID_SCE: return BLF_I18NCONTEXT_ID_SCENE;
+                       case ID_OB:  return BLF_I18NCONTEXT_ID_OBJECT;
+                       case ID_ME:  return BLF_I18NCONTEXT_ID_MESH;
+                       case ID_CU:  return BLF_I18NCONTEXT_ID_CURVE;
+                       case ID_MB:  return BLF_I18NCONTEXT_ID_METABALL;
+                       case ID_MA:  return BLF_I18NCONTEXT_ID_MATERIAL;
+                       case ID_TE:  return BLF_I18NCONTEXT_ID_TEXTURE;
+                       case ID_IM:  return BLF_I18NCONTEXT_ID_IMAGE;
++                      case ID_LS:  return BLF_I18NCONTEXT_ID_FREESTYLELINESTYLE;
+                       case ID_LT:  return BLF_I18NCONTEXT_ID_LATTICE;
+                       case ID_LA:  return BLF_I18NCONTEXT_ID_LAMP;
+                       case ID_CA:  return BLF_I18NCONTEXT_ID_CAMERA;
+                       case ID_WO:  return BLF_I18NCONTEXT_ID_WORLD;
+                       case ID_SCR: return BLF_I18NCONTEXT_ID_SCREEN;
+                       case ID_TXT: return BLF_I18NCONTEXT_ID_TEXT;
+                       case ID_SPK: return BLF_I18NCONTEXT_ID_SPEAKER;
+                       case ID_SO:  return BLF_I18NCONTEXT_ID_SOUND;
+                       case ID_AR:  return BLF_I18NCONTEXT_ID_ARMATURE;
+                       case ID_AC:  return BLF_I18NCONTEXT_ID_ACTION;
+                       case ID_NT:  return BLF_I18NCONTEXT_ID_NODETREE;
+                       case ID_BR:  return BLF_I18NCONTEXT_ID_BRUSH;
+                       case ID_PA:  return BLF_I18NCONTEXT_ID_PARTICLESETTINGS;
+                       case ID_GD:  return BLF_I18NCONTEXT_ID_GPENCIL;
+               }
+       }
+       return BLF_I18NCONTEXT_DEFAULT;
+ }
+ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, StructRNA *type, short idcode, int flag,
+                         const char *newop, const char *openop, const char *unlinkop)
  {
        uiBut *but;
        uiBlock *block;
Simple merge