svn merge ^/trunk/blender -r48527:48537
authorCampbell Barton <ideasman42@gmail.com>
Tue, 3 Jul 2012 14:05:18 +0000 (14:05 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 3 Jul 2012 14:05:18 +0000 (14:05 +0000)
29 files changed:
release/scripts/modules/bl_i18n_utils/__init__.py [moved from release/scripts/modules/i18n/__init__.py with 100% similarity]
release/scripts/modules/bl_i18n_utils/bl_process_msg.py [moved from release/scripts/modules/i18n/bl_process_msg.py with 98% similarity]
release/scripts/modules/bl_i18n_utils/check_po.py [moved from release/scripts/modules/i18n/check_po.py with 100% similarity]
release/scripts/modules/bl_i18n_utils/clean_po.py [moved from release/scripts/modules/i18n/clean_po.py with 100% similarity]
release/scripts/modules/bl_i18n_utils/import_po_from_branches.py [moved from release/scripts/modules/i18n/import_po_from_branches.py with 100% similarity]
release/scripts/modules/bl_i18n_utils/merge_po.py [moved from release/scripts/modules/i18n/merge_po.py with 100% similarity]
release/scripts/modules/bl_i18n_utils/rtl_preprocess.py [moved from release/scripts/modules/i18n/rtl_preprocess.py with 100% similarity]
release/scripts/modules/bl_i18n_utils/settings.py [moved from release/scripts/modules/i18n/settings.py with 100% similarity]
release/scripts/modules/bl_i18n_utils/spell_check_utils.py [moved from release/scripts/modules/i18n/spell_check_utils.py with 98% similarity]
release/scripts/modules/bl_i18n_utils/update_branches.py [moved from release/scripts/modules/i18n/update_branches.py with 100% similarity]
release/scripts/modules/bl_i18n_utils/update_mo.py [moved from release/scripts/modules/i18n/update_mo.py with 100% similarity]
release/scripts/modules/bl_i18n_utils/update_msg.py [moved from release/scripts/modules/i18n/update_msg.py with 100% similarity]
release/scripts/modules/bl_i18n_utils/update_po.py [moved from release/scripts/modules/i18n/update_po.py with 100% similarity]
release/scripts/modules/bl_i18n_utils/update_pot.py [moved from release/scripts/modules/i18n/update_pot.py with 100% similarity]
release/scripts/modules/bl_i18n_utils/update_trunk.py [moved from release/scripts/modules/i18n/update_trunk.py with 100% similarity]
release/scripts/modules/bl_i18n_utils/user_settings.py [moved from release/scripts/modules/i18n/user_settings.py with 100% similarity]
release/scripts/modules/bl_i18n_utils/utils.py [moved from release/scripts/modules/i18n/utils.py with 100% similarity]
release/scripts/startup/bl_ui/properties_physics_fluid.py
source/blender/blenkernel/BKE_image.h
source/blender/blenkernel/intern/image.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/physics/physics_fluid.c
source/blender/editors/space_graph/space_graph.c
source/blender/editors/space_image/image_buttons.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/makesdna/DNA_image_types.h
source/blender/makesrna/intern/rna_fluidsim.c

similarity index 98%
rename from release/scripts/modules/i18n/bl_process_msg.py
rename to release/scripts/modules/bl_i18n_utils/bl_process_msg.py
index fcbac8a6795278c5c659a0e2d526ac6efb667efc..5c7fc9306f60a3f0dc8a56895faeb6159915fe60 100644 (file)
@@ -108,8 +108,10 @@ def dump_messages_rna(messages, check_ctxt):
         path_resolve = type(bpy.context).__base__.path_resolve
         for idname in op_ids:
             op = get_instance(idname)
-            if 'INTERNAL' in path_resolve(op, "bl_options"):
-                blacklist_rna_class.append(idname)
+            # XXX Do not skip INTERNAL's anymore, some of those ops
+            #     show up in UI now!
+#            if 'INTERNAL' in path_resolve(op, "bl_options"):
+#                blacklist_rna_class.append(idname)
 
         # ---------------------------------------------------------------------
         # Collect builtin classes we don't need to doc
@@ -467,7 +469,7 @@ def dump_messages(do_messages, do_checks):
         for c in check_ctxt.values():
             keys |= c
         # XXX Temp, see below
-        c -= check_ctxt["multi_rnatip"]
+        keys -= check_ctxt["multi_rnatip"]
         for key in keys:
             if key in check_ctxt["undoc_ops"]:
                 print("\tThe following operators are undocumented:")
similarity index 98%
rename from release/scripts/modules/i18n/spell_check_utils.py
rename to release/scripts/modules/bl_i18n_utils/spell_check_utils.py
index 3999c01a896bfd3a67e511ad0e4e1415c34b2d4a..6c60bc1afc0a82734d50271f4452269d3ae2ab15 100644 (file)
@@ -62,7 +62,7 @@ dict_uimsgs = {
     "autoscale",
     "autosmooth",
     "autosplit",
-    "backface",
+    "backface", "backfacing",
     "backimage",
     "backscattered",
     "bandnoise",
@@ -146,7 +146,7 @@ dict_uimsgs = {
     "unbake",
     "uncomment",
     "undeformed",
-    "undistort",
+    "undistort", "undistortion",
     "ungroup",
     "unhide",
     "unindent",
@@ -170,6 +170,7 @@ dict_uimsgs = {
     "blockiness", "blocky",
     "collider", "colliders",
     "deformer", "deformers",
+    "determinator",
     "editability",
     "keyer",
     "lacunarity",
@@ -194,11 +195,15 @@ dict_uimsgs = {
     "config", "configs",
     "const",
     "coord", "coords",
+    "degr",
     "dof",
     "dupli", "duplis",
     "eg",
     "esc",
+    "expr",
     "fac",
+    "fra",
+    "frs",
     "grless",
     "http",
     "init",
@@ -210,6 +215,7 @@ dict_uimsgs = {
     "multicam",
     "num",
     "ok",
+    "orco",
     "ortho",
     "persp",
     "pref", "prefs",
@@ -316,6 +322,7 @@ dict_uimsgs = {
     "breakdowner",
     "bspline",
     "bweight",
+    "colorband",
     "datablock", "datablocks",
     "dopesheet",
     "dupliface", "duplifaces",
index 751f3e18acc5faa37ad15011faeb61c951b910c2..a53c1c973366871f4262ba57b62f55b081200a1c 100644 (file)
@@ -117,10 +117,14 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel):
             col.prop(fluid, "use_animated_mesh")
 
             col = split.column()
-            col.label(text="Slip Type:")
-            col.prop(fluid, "slip_type", text="")
+            subsplit = col.split()
+            subcol = subsplit.column()
+            if fluid.use_animated_mesh:
+                subcol.enabled = False
+            subcol.label(text="Slip Type:")
+            subcol.prop(fluid, "slip_type", text="")
             if fluid.slip_type == 'PARTIALSLIP':
-                col.prop(fluid, "partial_slip_factor", slider=True, text="Amount")
+                subcol.prop(fluid, "partial_slip_factor", slider=True, text="Amount")
 
             col.label(text="Impact:")
             col.prop(fluid, "impact_factor", text="Factor")
index 5844971cde56808fdc2abdf434d72778df61f94c..b1ca348be86fb0b774f8c214866bf9e3b134d2f8 100644 (file)
@@ -158,7 +158,7 @@ void BKE_image_assign_ibuf(struct Image *ima, struct ImBuf *ibuf);
 /* called on frame change or before render */
 void BKE_image_user_frame_calc(struct ImageUser *iuser, int cfra, int fieldnr);
 void BKE_image_user_check_frame_calc(struct ImageUser *iuser, int cfra, int fieldnr);
-int  BKE_image_user_frame_get(const struct ImageUser *iuser, int cfra, int fieldnr);
+int  BKE_image_user_frame_get(const struct ImageUser *iuser, int cfra, int fieldnr, short *r_is_in_range);
 void BKE_image_user_file_path(struct ImageUser *iuser, struct Image *ima, char *path); 
 
 /* sets index offset for multilayer files */
index b568c2ffb0e406a3c07e58ec9c79350cd98fa17d..733b8bebc9d9850d7f4c05278e1772ac27cc7817 100644 (file)
@@ -2802,10 +2802,14 @@ ImBuf *BKE_image_get_ibuf(Image *ima, ImageUser *iuser)
        return BKE_image_acquire_ibuf(ima, iuser, NULL);
 }
 
-int BKE_image_user_frame_get(const ImageUser *iuser, int cfra, int fieldnr)
+int BKE_image_user_frame_get(const ImageUser *iuser, int cfra, int fieldnr, short *r_is_in_range)
 {
        const int len = (iuser->fie_ima * iuser->frames) / 2;
 
+       if (r_is_in_range) {
+               *r_is_in_range = FALSE;
+       }
+
        if (len == 0) {
                return 0;
        }
@@ -2818,10 +2822,23 @@ int BKE_image_user_frame_get(const ImageUser *iuser, int cfra, int fieldnr)
                        cfra = ((cfra) % len);
                        if (cfra < 0) cfra += len;
                        if (cfra == 0) cfra = len;
+
+                       if (r_is_in_range) {
+                               *r_is_in_range = TRUE;
+                       }
                }
 
-               if (cfra < 0) cfra = 0;
-               else if (cfra > len) cfra = len;
+               if (cfra < 0) {
+                       cfra = 0;
+               }
+               else if (cfra > len) {
+                       cfra = len;
+               }
+               else {
+                       if (r_is_in_range) {
+                               *r_is_in_range = TRUE;
+                       }
+               }
 
                /* convert current frame to current field */
                cfra = 2 * (cfra);
@@ -2845,7 +2862,15 @@ int BKE_image_user_frame_get(const ImageUser *iuser, int cfra, int fieldnr)
 void BKE_image_user_frame_calc(ImageUser *iuser, int cfra, int fieldnr)
 {
        if (iuser) {
-               const int framenr = BKE_image_user_frame_get(iuser, cfra, fieldnr);
+               short is_in_range;
+               const int framenr = BKE_image_user_frame_get(iuser, cfra, fieldnr, &is_in_range);
+
+               if (is_in_range) {
+                       iuser->flag |= IMA_USER_FRAME_IN_RANGE;
+               }
+               else {
+                       iuser->flag &= ~IMA_USER_FRAME_IN_RANGE;
+               }
 
                /* allows image users to handle redraws */
                if (iuser->flag & IMA_ANIM_ALWAYS)
index 60469a31a8c815ccedf4942973d9578ab8c8f20f..f9413383577e9760adc370045dd01fbe95a2654c 100644 (file)
@@ -5533,6 +5533,11 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene)
                                                if (ads->filter_grp)
                                                        ads->filter_grp = restore_pointer_by_name(newmain, (ID *)ads->filter_grp, 0);
                                        }
+                                       
+                                       /* force recalc of list of channels (i.e. includes calculating F-Curve colors)
+                                        * thus preventing the "black curves" problem post-undo
+                                        */
+                                       sipo->flag |= SIPO_TEMP_NEEDCHANSYNC;
                                }
                                else if (sl->spacetype == SPACE_BUTS) {
                                        SpaceButs *sbuts = (SpaceButs *)sl;
@@ -5547,10 +5552,10 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene)
                                        SpaceAction *saction = (SpaceAction *)sl;
                                        
                                        saction->action = restore_pointer_by_name(newmain, (ID *)saction->action, 1);
-                                       saction->ads.source= restore_pointer_by_name(newmain, (ID *)saction->ads.source, 1);
+                                       saction->ads.source = restore_pointer_by_name(newmain, (ID *)saction->ads.source, 1);
                                        
                                        if (saction->ads.filter_grp)
-                                               saction->ads.filter_grp= restore_pointer_by_name(newmain, (ID *)saction->ads.filter_grp, 0);
+                                               saction->ads.filter_grp = restore_pointer_by_name(newmain, (ID *)saction->ads.filter_grp, 0);
                                                
                                        
                                        /* force recalc of list of channels, potentially updating the active action 
index 8c77e8bec65e4473c62ada1660472e11f80a5516..7191284bc5bd723ce00da8f30d0abc9887d6a2f4 100644 (file)
@@ -2892,11 +2892,9 @@ static int mesh_separate_material(Main *bmain, Scene *scene, Base *editbase, wmO
 static int mesh_separate_loose(Main *bmain, Scene *scene, Base *editbase, wmOperator *wmop)
 {
        int i;
-       BMVert *v;
        BMEdge *e;
        BMVert *v_seed;
        BMWalker walker;
-       BMIter iter;
        int result = FALSE;
        Object *obedit = editbase->object;
        BMEditMesh *em = BMEdit_FromObject(obedit);
@@ -2913,11 +2911,7 @@ static int mesh_separate_loose(Main *bmain, Scene *scene, Base *editbase, wmOper
         * original mesh.*/
        for (i = 0; i < max_iter; i++) {
                /* Get a seed vertex to start the walk */
-               v_seed = NULL;
-               BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) {
-                       v_seed = v;
-                       break;
-               }
+               v_seed = BM_iter_at_index(bm, BM_VERTS_OF_MESH, NULL, 0);
 
                /* No vertices available, can't do anything */
                if (v_seed == NULL) {
index b31e5c0aea39bb43388d733a8575e7e51a44dc79..2e58fa85a116ed494a51182ddd9ad62db4e6c3de 100644 (file)
@@ -567,11 +567,14 @@ static void export_fluid_objects(ListBase *fobjects, Scene *scene, int length)
                if (deform) {
                        fsmesh.channelSizeVertices = length;
                        fsmesh.channelVertices = fobj->VertexCache;
-                               
-                       // remove channels
+                       
+                       /* remove channels */
                        fsmesh.channelTranslation      = 
                        fsmesh.channelRotation         = 
-                       fsmesh.channelScale            = NULL; 
+                       fsmesh.channelScale            = NULL;
+                       
+                       /* Override user settings, only noslip is supported here! */
+                       fsmesh.obstacleType = FLUIDSIM_OBSTACLE_NOSLIP;
                }
                
                elbeemAddMesh(&fsmesh);
index 756e6997fc817e48ad23b5ebcd7a75adf56e83f1..f4cb4ec3d055e7ccb637616ddfcc4d32d5268815 100644 (file)
@@ -189,6 +189,8 @@ static void graph_init(struct wmWindowManager *UNUSED(wm), ScrArea *sa)
                sipo->ads->source = (ID *)(G.main->scene.first); // FIXME: this is a really nasty hack here for now...
        }
        
+       /* force immediate init of any invalid F-Curve colors */
+       sipo->flag |= SIPO_TEMP_NEEDCHANSYNC;
        ED_area_tag_refresh(sa);
 }
 
@@ -477,7 +479,13 @@ static void graph_listener(ScrArea *sa, wmNotifier *wmn)
                        if (wmn->data == ND_SPACE_GRAPH)
                                ED_area_tag_redraw(sa);
                        break;
-               
+               case NC_WINDOW:
+                       if (sipo->flag & SIPO_TEMP_NEEDCHANSYNC) {
+                               /* force redraw/refresh after undo/redo - prevents "black curve" problem */
+                               ED_area_tag_refresh(sa);
+                       }
+                       break;
+                       
                        // XXX: restore the case below if not enough updates occur...
                        //default:
                        //      if (wmn->data==ND_KEYS)
index 944c8afed10493956aa40d26767eca14af4476c5..b92f4829cd32de72e0335f997589c5edc00e6013 100644 (file)
@@ -148,7 +148,7 @@ static void image_info(Scene *scene, ImageUser *iuser, Image *ima, ImBuf *ibuf,
        /* the frame number, even if we cant */
        if (ima->source == IMA_SRC_SEQUENCE) {
                /* don't use iuser->framenr directly because it may not be updated if auto-refresh is off */
-               const int framenr = BKE_image_user_frame_get(iuser, CFRA, 0);
+               const int framenr = BKE_image_user_frame_get(iuser, CFRA, 0, NULL);
                ofs += sprintf(str + ofs, IFACE_(", Frame: %d"), framenr);
        }
 
index 731304a3b9dd0efe605c57769356a262f961443b..d28e3ac5507871b872a76ac31a23afc76482161a 100644 (file)
@@ -1215,7 +1215,7 @@ static void node_buts_image_user(uiLayout *layout, bContext *C, PointerRNA *ptr,
                Scene *scene = CTX_data_scene(C);
                ImageUser *iuser = iuserptr->data;
                char numstr[32];
-               const int framenr = BKE_image_user_frame_get(iuser, CFRA, 0);
+               const int framenr = BKE_image_user_frame_get(iuser, CFRA, 0, NULL);
                BLI_snprintf(numstr, sizeof(numstr), IFACE_("Frame: %d"), framenr);
                uiItemL(layout, numstr, ICON_NONE);
        }
index 2d4fbb90ae11c1a0c19d606bcbd945e7feb84256..e6ea42aa5bac0edd2f58bf79d8341846c80e8a4e 100644 (file)
@@ -1561,7 +1561,12 @@ static void view3d_draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d,
                                if (ima == NULL)
                                        continue;
                                BKE_image_user_frame_calc(&bgpic->iuser, CFRA, 0);
-                               ibuf = BKE_image_get_ibuf(ima, &bgpic->iuser);
+                               if (ima->source == IMA_SRC_SEQUENCE && !(bgpic->iuser.flag & IMA_USER_FRAME_IN_RANGE)) {
+                                       ibuf = NULL; /* frame is out of range, dont show */
+                               }
+                               else {
+                                       ibuf = BKE_image_get_ibuf(ima, &bgpic->iuser);
+                               }
 
                                image_aspect[0] = ima->aspx;
                                image_aspect[1] = ima->aspx;
index f6c4822bb558bdb6fd2d84fd05b7a4738f851cbc..4a4b21017db7e19b150e07c60f2f158df2fb6981 100644 (file)
@@ -122,6 +122,7 @@ typedef struct Image {
 #define IMA_OLD_PREMUL         128
 #define IMA_CM_PREDIVIDE       256
 #define IMA_USED_FOR_RENDER    512
+#define IMA_USER_FRAME_IN_RANGE        1024 /* for image user, but these flags are mixed */
 
 /* Image.tpageflag */
 #define IMA_TILES                      1
index 8dd1bc86ca178a56d5ecfae85c6b55204350ec47..f288b3ac3bb81d095e943353d64f30dad7eabac8 100644 (file)
@@ -461,8 +461,9 @@ static void rna_def_fluidsim_volume(StructRNA *srna)
        RNA_def_property_boolean_sdna(prop, NULL, "domainNovecgen", 0);
        RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
        RNA_def_property_ui_text(prop, "Export Animated Mesh",
-                                "Export this mesh as an animated one (slower, only use if really necessary [e.g. "
-                                "armatures or parented objects], animated pos/rot/scale F-Curves do not require it)");
+                                "Export this mesh as an animated one (slower and enforces No Splip, only use if really "
+                                "necessary [e.g. armatures or parented objects], animated pos/rot/scale F-Curves "
+                                "do not require it)");
 }
 
 static void rna_def_fluidsim_active(StructRNA *srna)