Revision: 49239
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49239
Author:   nazgul
Date:     2012-07-26 09:51:28 +0000 (Thu, 26 Jul 2012)
Log Message:
-----------
Merging r49226 through r49238 from trunk into soc-2011-tomato

Revision Links:
--------------
    
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49226
    
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49238

Modified Paths:
--------------
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_mask.h
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_paint.h
    branches/soc-2011-tomato/source/blender/blenkernel/intern/colortools.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/movieclip.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/object.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/paint.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/scene.c
    branches/soc-2011-tomato/source/blender/editors/include/ED_image.h
    branches/soc-2011-tomato/source/blender/editors/interface/interface_draw.c
    
branches/soc-2011-tomato/source/blender/editors/interface/interface_handlers.c
    branches/soc-2011-tomato/source/blender/editors/mask/mask_edit.c
    branches/soc-2011-tomato/source/blender/editors/object/object_relations.c
    branches/soc-2011-tomato/source/blender/editors/space_clip/clip_intern.h
    branches/soc-2011-tomato/source/blender/editors/space_clip/space_clip.c
    branches/soc-2011-tomato/source/blender/editors/space_clip/tracking_ops.c
    branches/soc-2011-tomato/source/blender/editors/space_image/image_edit.c
    branches/soc-2011-tomato/source/blender/editors/space_image/image_ops.c
    branches/soc-2011-tomato/source/blender/editors/transform/transform.c
    branches/soc-2011-tomato/source/blender/gpu/intern/gpu_material.c
    branches/soc-2011-tomato/source/blender/imbuf/intern/filter.c
    
branches/soc-2011-tomato/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp

Property Changed:
----------------
    branches/soc-2011-tomato/
    branches/soc-2011-tomato/source/blender/editors/interface/interface.c
    branches/soc-2011-tomato/source/blender/editors/space_outliner/


Property changes on: branches/soc-2011-tomato
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-49225
   + 
/branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-49238

Modified: branches/soc-2011-tomato/source/blender/blenkernel/BKE_mask.h
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/BKE_mask.h       
2012-07-26 09:50:27 UTC (rev 49238)
+++ branches/soc-2011-tomato/source/blender/blenkernel/BKE_mask.h       
2012-07-26 09:51:28 UTC (rev 49239)
@@ -127,7 +127,9 @@
 void BKE_mask_unlink(struct Main *bmain, struct Mask *mask);
 
 void BKE_mask_coord_from_movieclip(struct MovieClip *clip, struct 
MovieClipUser *user, float r_co[2], const float co[2]);
+void BKE_mask_coord_from_frame(float r_co[2], const float co[2], const float 
frame_size[2]);
 void BKE_mask_coord_to_movieclip(struct MovieClip *clip, struct MovieClipUser 
*user, float r_co[2], const float co[2]);
+void BKE_mask_coord_to_frame(float r_co[2], const float co[2], const float 
frame_size[2]);
 
 /* parenting */
 

Modified: branches/soc-2011-tomato/source/blender/blenkernel/BKE_paint.h
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/BKE_paint.h      
2012-07-26 09:50:27 UTC (rev 49238)
+++ branches/soc-2011-tomato/source/blender/blenkernel/BKE_paint.h      
2012-07-26 09:51:28 UTC (rev 49239)
@@ -52,9 +52,10 @@
 extern const char PAINT_CURSOR_TEXTURE_PAINT[3];
 
 void BKE_paint_init(struct Paint *p, const char col[3]);
-void free_paint(struct Paint *p);
-void copy_paint(struct Paint *src, struct Paint *tar);
+void BKE_paint_free(struct Paint *p);
+void BKE_paint_copy(struct Paint *src, struct Paint *tar);
 
+/* TODO, give these BKE_ prefix too */
 struct Paint *paint_get_active(struct Scene *sce);
 struct Paint *paint_get_active_from_context(const struct bContext *C);
 struct Brush *paint_brush(struct Paint *paint);

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/colortools.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/colortools.c      
2012-07-26 09:50:27 UTC (rev 49238)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/colortools.c      
2012-07-26 09:51:28 UTC (rev 49239)
@@ -962,7 +962,7 @@
        hist->channels = 3;
        hist->x_resolution = 256;
        hist->xmax = 1.0f;
-       hist->ymax = 1.0f;
+       /* hist->ymax = 1.0f; */ /* now do this on the operator _only_ */
 
        if (ibuf->rect == NULL && ibuf->rect_float == NULL) return;
 

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c    
2012-07-26 09:50:27 UTC (rev 49238)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c    
2012-07-26 09:51:28 UTC (rev 49239)
@@ -1543,49 +1543,65 @@
        mask->id.us = 0;
 }
 
-void BKE_mask_coord_from_movieclip(MovieClip *clip, MovieClipUser *user, float 
r_co[2], const float co[2])
+void BKE_mask_coord_from_frame(float r_co[2], const float co[2], const float 
frame_size[2])
 {
-       int width, height;
-
-       /* scaling for the clip */
-       BKE_movieclip_get_size(clip, user, &width, &height);
-
-       if (width == height) {
+       if (frame_size[0] == frame_size[1]) {
                r_co[0] = co[0];
                r_co[1] = co[1];
        }
-       else if (width < height) {
-               r_co[0] = ((co[0] - 0.5f) * ((float)width / (float)height)) + 
0.5f;
+       else if (frame_size[0] < frame_size[1]) {
+               r_co[0] = ((co[0] - 0.5f) * (frame_size[0] / frame_size[1])) + 
0.5f;
                r_co[1] = co[1];
        }
-       else { /* (width > height) */
+       else { /* (frame_size[0] > frame_size[1]) */
                r_co[0] = co[0];
-               r_co[1] = ((co[1] - 0.5f) * ((float)height / (float)width)) + 
0.5f;
+               r_co[1] = ((co[1] - 0.5f) * (frame_size[1] / frame_size[0])) + 
0.5f;
        }
 }
-
-/* as above but divide */
-void BKE_mask_coord_to_movieclip(MovieClip *clip, MovieClipUser *user, float 
r_co[2], const float co[2])
+void BKE_mask_coord_from_movieclip(MovieClip *clip, MovieClipUser *user, float 
r_co[2], const float co[2])
 {
        int width, height;
+       float frame_size[2];
 
        /* scaling for the clip */
        BKE_movieclip_get_size(clip, user, &width, &height);
 
-       if (width == height) {
+       frame_size[0] = (float)width;
+       frame_size[1] = (float)height;
+
+       BKE_mask_coord_from_frame(r_co, co, frame_size);
+}
+
+/* as above but divide */
+void BKE_mask_coord_to_frame(float r_co[2], const float co[2], const float 
frame_size[2])
+{
+       if (frame_size[0] == frame_size[1]) {
                r_co[0] = co[0];
                r_co[1] = co[1];
        }
-       else if (width < height) {
-               r_co[0] = ((co[0] - 0.5f) / ((float)width / (float)height)) + 
0.5f;
+       else if (frame_size[0] < frame_size[1]) {
+               r_co[0] = ((co[0] - 0.5f) / (frame_size[0] / frame_size[1])) + 
0.5f;
                r_co[1] = co[1];
        }
-       else { /* (width > height) */
+       else { /* (frame_size[0] > frame_size[1]) */
                r_co[0] = co[0];
-               r_co[1] = ((co[1] - 0.5f) / ((float)height / (float)width)) + 
0.5f;
+               r_co[1] = ((co[1] - 0.5f) / (frame_size[1] / frame_size[0])) + 
0.5f;
        }
 }
+void BKE_mask_coord_to_movieclip(MovieClip *clip, MovieClipUser *user, float 
r_co[2], const float co[2])
+{
+       int width, height;
+       float frame_size[2];
 
+       /* scaling for the clip */
+       BKE_movieclip_get_size(clip, user, &width, &height);
+
+       frame_size[0] = (float)width;
+       frame_size[1] = (float)height;
+
+       BKE_mask_coord_to_frame(r_co, co, frame_size);
+}
+
 static int BKE_mask_evaluate_parent(MaskParent *parent, float ctime, float 
r_co[2])
 {
        if (!parent)

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/movieclip.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/movieclip.c       
2012-07-26 09:50:27 UTC (rev 49238)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/movieclip.c       
2012-07-26 09:51:28 UTC (rev 49239)
@@ -1080,7 +1080,7 @@
        else
                clip->source = MCLIP_SRC_SEQUENCE;
 
-       clip->lastsize[0] = clip->lastsize[1] = 0;
+       clip->lastsize[0] = clip->lastsize[1] = IMG_SIZE_FALLBACK;
        movieclip_load_get_szie(clip);
 
        movieclip_calc_length(clip);

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/object.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/object.c  
2012-07-26 09:50:27 UTC (rev 49238)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/object.c  
2012-07-26 09:51:28 UTC (rev 49239)
@@ -210,7 +210,14 @@
        for (md = from->modifiers.first; md; md = md->next) {
                ModifierData *nmd = NULL;
 
-               if (ELEM4(md->type, eModifierType_Hook, eModifierType_Softbody, 
eModifierType_ParticleInstance, eModifierType_Collision)) continue;
+               if (ELEM4(md->type,
+                         eModifierType_Hook,
+                         eModifierType_Softbody,
+                         eModifierType_ParticleInstance,
+                         eModifierType_Collision))
+               {
+                       continue;
+               }
 
                if (!BKE_object_support_modifier_type_check(ob, md->type))
                        continue;
@@ -1318,7 +1325,8 @@
                                                if ((Object *)dtar->id == 
target)
                                                        dtar->id = (ID *)ob;
                                                else {
-                                                       /* only on local 
objects because this causes indirect links a -> b -> c, blend to point directly 
to a.blend
+                                                       /* only on local 
objects because this causes indirect links
+                                                        * 'a -> b -> c', blend 
to point directly to a.blend
                                                         * when a.blend has a 
proxy thats linked into c.blend  */
                                                        if (ob->id.lib == NULL)
                                                                
id_lib_extern((ID *)dtar->id);
@@ -1803,7 +1811,11 @@
                                dm->getVertCo(dm, 0, vec);
                        }
                }
-               else fprintf(stderr, "%s: DerivedMesh is needed to solve 
parenting, object position can be wrong now\n", __func__);
+               else {
+                       fprintf(stderr,
+                               "%s: DerivedMesh is needed to solve parenting, "
+                               "object position can be wrong now\n", __func__);
+               }
        }
        else if (ELEM(par->type, OB_CURVE, OB_SURF)) {
                Nurb *nu;

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/paint.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/paint.c   
2012-07-26 09:50:27 UTC (rev 49238)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/paint.c   
2012-07-26 09:51:28 UTC (rev 49239)
@@ -184,7 +184,7 @@
        p->flags |= PAINT_SHOW_BRUSH;
 }
 
-void free_paint(Paint *paint)
+void BKE_paint_free(Paint *paint)
 {
        id_us_min((ID *)paint->brush);
 }
@@ -193,7 +193,7 @@
  * still do a id_us_plus(), rather then if we were copying betweem 2 existing
  * scenes where a matching value should decrease the existing user count as
  * with paint_brush_set() */
-void copy_paint(Paint *src, Paint *tar)
+void BKE_paint_copy(Paint *src, Paint *tar)
 {
        tar->brush = src->brush;
        id_us_plus((ID *)tar->brush);

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/scene.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/scene.c   
2012-07-26 09:50:27 UTC (rev 49238)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/scene.c   
2012-07-26 09:51:28 UTC (rev 49239)
@@ -188,21 +188,21 @@
                        ts->vpaint->paintcursor = NULL;
                        ts->vpaint->vpaint_prev = NULL;
                        ts->vpaint->wpaint_prev = NULL;
-                       copy_paint(&ts->vpaint->paint, &ts->vpaint->paint);
+                       BKE_paint_copy(&ts->vpaint->paint, &ts->vpaint->paint);
                }
                if (ts->wpaint) {
                        ts->wpaint = MEM_dupallocN(ts->wpaint);
                        ts->wpaint->paintcursor = NULL;
                        ts->wpaint->vpaint_prev = NULL;
                        ts->wpaint->wpaint_prev = NULL;
-                       copy_paint(&ts->wpaint->paint, &ts->wpaint->paint);
+                       BKE_paint_copy(&ts->wpaint->paint, &ts->wpaint->paint);
                }
                if (ts->sculpt) {
                        ts->sculpt = MEM_dupallocN(ts->sculpt);

@@ Diff output truncated at 10240 characters. @@
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to