svn merge: Merging r46558 through r46612, from trunk
authorCampbell Barton <ideasman42@gmail.com>
Sun, 13 May 2012 18:16:25 +0000 (18:16 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 13 May 2012 18:16:25 +0000 (18:16 +0000)
20 files changed:
1  2 
source/blender/blenkernel/BKE_context.h
source/blender/blenkernel/BKE_library.h
source/blender/blenkernel/BKE_main.h
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/idcode.c
source/blender/editors/include/ED_clip.h
source/blender/editors/include/ED_screen.h
source/blender/editors/include/ED_transform.h
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform.h
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_ops.c
source/blender/makesdna/DNA_ID.h
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_ID.c
source/blender/makesrna/intern/rna_main.c
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_space.c

@@@ -66,7 -66,7 +66,7 @@@ void id_clear_lib_data(struct Main *bma
  
  struct ListBase *which_libbase(struct Main *mainlib, short type);
  
- #define MAX_LIBARRAY  41
 -#define MAX_LIBARRAY    40
++#define MAX_LIBARRAY    41
  int set_listbasepointers(struct Main *main, struct ListBase **lb);
  
  void BKE_libblock_free(struct ListBase *lb, void *idv);
Simple merge
@@@ -47,41 -47,40 +47,41 @@@ typedef struct 
  } IDType;
  
  /* plural need to match rna_main.c's MainCollectionDef */
- 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_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},
+ 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_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},
  };
- static int nidtypes= sizeof(idtypes)/sizeof(idtypes[0]);
+ static int nidtypes = sizeof(idtypes) / sizeof(idtypes[0]);
  
  static IDType *idtype_from_name(const char *str) 
  {
@@@ -119,57 -119,56 +119,57 @@@ void    ED_refresh_viewport_fps(struct 
  int ED_screen_animation_play(struct bContext *C, int sync, int mode);
  
  /* screen keymaps */
- void  ED_operatortypes_screen(void);
- void  ED_keymap_screen(struct wmKeyConfig *keyconf);
+ void    ED_operatortypes_screen(void);
+ void    ED_keymap_screen(struct wmKeyConfig *keyconf);
  
  /* operators; context poll callbacks */
- int           ED_operator_screenactive(struct bContext *C);
- int           ED_operator_screen_mainwinactive(struct bContext *C);
- int           ED_operator_areaactive(struct bContext *C);
- int           ED_operator_regionactive(struct bContext *C);
- int           ED_operator_scene_editable(struct bContext *C);
- int           ED_operator_objectmode(struct bContext *C);
- int           ED_operator_view3d_active(struct bContext *C);
- int           ED_operator_region_view3d_active(struct bContext *C);
- int           ED_operator_animview_active(struct bContext *C);
- int           ED_operator_timeline_active(struct bContext *C);
- int           ED_operator_outliner_active(struct bContext *C);
- int           ED_operator_outliner_active_no_editobject(struct bContext *C);
- int           ED_operator_file_active(struct bContext *C);
- int           ED_operator_action_active(struct bContext *C);
- int           ED_operator_buttons_active(struct bContext *C);
- int           ED_operator_node_active(struct bContext *C);
- int           ED_operator_graphedit_active(struct bContext *C);
- int           ED_operator_sequencer_active(struct bContext *C);
- int           ED_operator_image_active(struct bContext *C);
- int           ED_operator_nla_active(struct bContext *C);
- int           ED_operator_logic_active(struct bContext *C);
- int           ED_operator_info_active(struct bContext *C);
- int           ED_operator_console_active(struct bContext *C);
- int           ED_operator_object_active(struct bContext *C);
- int           ED_operator_object_active_editable(struct bContext *C);
- int           ED_operator_object_active_editable_mesh(struct bContext *C);
- int           ED_operator_object_active_editable_font(struct bContext *C);
- int           ED_operator_editmesh(struct bContext *C);
- int           ED_operator_editmesh_view3d(struct bContext *C);
- int           ED_operator_editmesh_region_view3d(struct bContext *C);
- int           ED_operator_editarmature(struct bContext *C);
- int           ED_operator_editcurve(struct bContext *C);
- int           ED_operator_editcurve_3d(struct bContext *C);
- int           ED_operator_editsurf(struct bContext *C);
- int           ED_operator_editsurfcurve(struct bContext *C);
- int           ED_operator_editsurfcurve_region_view3d(struct bContext *C);
- int           ED_operator_editfont(struct bContext *C);
- int           ED_operator_editlattice(struct bContext *C);
- int           ED_operator_editmball(struct bContext *C);
- int           ED_operator_uvedit(struct bContext *C);
- int           ED_operator_uvmap(struct bContext *C);
- int           ED_operator_posemode(struct bContext *C);
+ int     ED_operator_screenactive(struct bContext *C);
+ int     ED_operator_screen_mainwinactive(struct bContext *C);
+ int     ED_operator_areaactive(struct bContext *C);
+ int     ED_operator_regionactive(struct bContext *C);
+ int     ED_operator_scene_editable(struct bContext *C);
+ int     ED_operator_objectmode(struct bContext *C);
+ int     ED_operator_view3d_active(struct bContext *C);
+ int     ED_operator_region_view3d_active(struct bContext *C);
+ int     ED_operator_animview_active(struct bContext *C);
+ int     ED_operator_timeline_active(struct bContext *C);
+ int     ED_operator_outliner_active(struct bContext *C);
+ int     ED_operator_outliner_active_no_editobject(struct bContext *C);
+ int     ED_operator_file_active(struct bContext *C);
+ int     ED_operator_action_active(struct bContext *C);
+ int     ED_operator_buttons_active(struct bContext *C);
+ int     ED_operator_node_active(struct bContext *C);
+ int     ED_operator_graphedit_active(struct bContext *C);
+ int     ED_operator_sequencer_active(struct bContext *C);
+ int     ED_operator_image_active(struct bContext *C);
+ int     ED_operator_nla_active(struct bContext *C);
+ int     ED_operator_logic_active(struct bContext *C);
+ int     ED_operator_info_active(struct bContext *C);
+ int     ED_operator_console_active(struct bContext *C);
+ int     ED_operator_object_active(struct bContext *C);
+ int     ED_operator_object_active_editable(struct bContext *C);
+ int     ED_operator_object_active_editable_mesh(struct bContext *C);
+ int     ED_operator_object_active_editable_font(struct bContext *C);
+ int     ED_operator_editmesh(struct bContext *C);
+ int     ED_operator_editmesh_view3d(struct bContext *C);
+ int     ED_operator_editmesh_region_view3d(struct bContext *C);
+ int     ED_operator_editarmature(struct bContext *C);
+ int     ED_operator_editcurve(struct bContext *C);
+ int     ED_operator_editcurve_3d(struct bContext *C);
+ int     ED_operator_editsurf(struct bContext *C);
+ int     ED_operator_editsurfcurve(struct bContext *C);
+ int     ED_operator_editsurfcurve_region_view3d(struct bContext *C);
+ int     ED_operator_editfont(struct bContext *C);
+ int     ED_operator_editlattice(struct bContext *C);
+ int     ED_operator_editmball(struct bContext *C);
+ int     ED_operator_uvedit(struct bContext *C);
+ int     ED_operator_uvmap(struct bContext *C);
+ int     ED_operator_posemode(struct bContext *C);
 +int           ED_operator_mask(struct bContext *C);
  
  
  /* default keymaps, bitflags */
@@@ -85,17 -85,16 +85,17 @@@ enum 
  } TfmMode;
  
  /* TRANSFORM CONTEXTS */
- #define CTX_NONE                      0
- #define CTX_TEXTURE                   1
- #define CTX_EDGE                      2
- #define CTX_NO_PET                    4
- #define CTX_TWEAK                     8
- #define CTX_NO_MIRROR         16
- #define CTX_AUTOCONFIRM               32
- #define CTX_BMESH                     64
- #define CTX_NDOF                      128
- #define CTX_MOVIECLIP         256
+ #define CTX_NONE            0
+ #define CTX_TEXTURE         1
+ #define CTX_EDGE            2
+ #define CTX_NO_PET          4
+ #define CTX_TWEAK           8
+ #define CTX_NO_MIRROR       16
+ #define CTX_AUTOCONFIRM     32
+ #define CTX_BMESH           64
+ #define CTX_NDOF            128
+ #define CTX_MOVIECLIP       256
 +#define CTX_MASK              512
  
  /* Standalone call to get the transformation center corresponding to the current situation
   * returns 1 if successful, 0 otherwise (usually means there's no selection)
Simple merge
@@@ -2679,8 -2679,8 +2679,9 @@@ static RNAProcessItem PROCESS_ITEMS[] 
        {"rna_world.c", NULL, RNA_def_world},
        {"rna_movieclip.c", NULL, RNA_def_movieclip},
        {"rna_tracking.c", NULL, RNA_def_tracking},
-       {NULL, NULL}};
 +      {"rna_mask.c", NULL, RNA_def_mask},
+       {NULL, NULL}
+ };
  
  static void rna_generate(BlenderRNA *brna, FILE *f, const char *filename, const char *api_filename)
  {
@@@ -319,17 -311,13 +317,14 @@@ void RNA_def_main(BlenderRNA *brna
                {"texts", "Text", "rna_Main_text_begin", "Texts", "Text datablocks", RNA_def_main_texts},
                {"speakers", "Speaker", "rna_Main_speaker_begin", "Speakers", "Speaker datablocks", RNA_def_main_speakers},
                {"sounds", "Sound", "rna_Main_sound_begin", "Sounds", "Sound datablocks", RNA_def_main_sounds},
-               {"armatures", "Armature", "rna_Main_armature_begin", "Armatures", "Armature datablocks",
-                             RNA_def_main_armatures},
+               {"armatures", "Armature", "rna_Main_armature_begin", "Armatures", "Armature datablocks", RNA_def_main_armatures},
                {"actions", "Action", "rna_Main_action_begin", "Actions", "Action datablocks", RNA_def_main_actions},
-               {"particles", "ParticleSettings", "rna_Main_particle_begin", "Particles", "Particle datablocks",
-                             RNA_def_main_particles},
-               {"grease_pencil", "GreasePencil", "rna_Main_gpencil_begin", "Grease Pencil", "Grease Pencil datablocks",
-                                 RNA_def_main_gpencil},
-               {"movieclips", "MovieClip", "rna_Main_movieclips_begin", "Movie Clips", "Movie Clip datablocks",
-                              RNA_def_main_movieclips},
+               {"particles", "ParticleSettings", "rna_Main_particle_begin", "Particles", "Particle datablocks", RNA_def_main_particles},
+               {"grease_pencil", "GreasePencil", "rna_Main_gpencil_begin", "Grease Pencil", "Grease Pencil datablocks", RNA_def_main_gpencil},
+               {"movieclips", "MovieClip", "rna_Main_movieclips_begin", "Movie Clips", "Movie Clip datablocks", RNA_def_main_movieclips},
 +              {"masks", "Mask", "rna_Main_masks_begin", "Masks", "Masks datablocks", RNA_def_main_masks},
-               {NULL, NULL, NULL, NULL, NULL, NULL}};
+               {NULL, NULL, NULL, NULL, NULL, NULL}
+       };
  
        int i;
        
@@@ -1024,22 -1028,15 +1029,22 @@@ static EnumPropertyItem *rna_SpacePrope
  
  static void rna_SpaceClipEditor_clip_set(PointerRNA *ptr, PointerRNA value)
  {
-       SpaceClip *sc = (SpaceClip*)(ptr->data);
-       bScreen *screen = (bScreen*)ptr->id.data;
+       SpaceClip *sc = (SpaceClip *)(ptr->data);
+       bScreen *screen = (bScreen *)ptr->id.data;
  
-       ED_space_clip_set(NULL, screen, sc, (MovieClip*)value.data);
+       ED_space_clip_set(NULL, screen, sc, (MovieClip *)value.data);
  }
  
 +static void rna_SpaceClipEditor_mask_set(PointerRNA *ptr, PointerRNA value)
 +{
 +      SpaceClip *sc= (SpaceClip*)(ptr->data);
 +
 +      ED_space_clip_set_mask(NULL, sc, (Mask*)value.data);
 +}
 +
  static void rna_SpaceClipEditor_clip_mode_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
  {
-       SpaceClip *sc = (SpaceClip*)(ptr->data);
+       SpaceClip *sc = (SpaceClip *)(ptr->data);
  
        sc->scopes.ok = 0;
  }
@@@ -2934,8 -2954,8 +2962,9 @@@ static void rna_def_space_clip(BlenderR
                {SC_MODE_RECONSTRUCTION, "RECONSTRUCTION", ICON_SNAP_FACE, "Reconstruction",
                                         "Show tracking/reconstruction tools"},
                {SC_MODE_DISTORTION, "DISTORTION", ICON_GRID, "Distortion", "Show distortion tools"},
-               {0, NULL, 0, NULL, NULL}};
 +              {SC_MODE_MASKEDITING, "MASKEDITING", ICON_MOD_MASK, "Mask editing", "Show mask editing tools"},
+               {0, NULL, 0, NULL, NULL}
+       };
  
        static EnumPropertyItem view_items[] = {
                {SC_VIEW_CLIP, "CLIP", ICON_SEQUENCE, "Clip", "Show editing clip preview"},
        RNA_def_property_pointer_sdna(prop, NULL, "user");
        RNA_def_property_ui_text(prop, "Movie Clip User",
                                 "Parameters defining which frame of the movie clip is displayed");
-       RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
+       RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, NULL);
  
 +      /* mask */
 +      prop= RNA_def_property(srna, "mask", PROP_POINTER, PROP_NONE);
 +      RNA_def_property_flag(prop, PROP_EDITABLE);
 +      RNA_def_property_ui_text(prop, "Mask", "Mask displayed and edited in this space");
 +      RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceClipEditor_mask_set", NULL, NULL);
 +      RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
 +
        /* mode */
        prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
        RNA_def_property_enum_sdna(prop, NULL, "mode");