svn merge -r41638:41648 ^/trunk/blender
authorCampbell Barton <ideasman42@gmail.com>
Thu, 10 Nov 2011 01:50:22 +0000 (01:50 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 10 Nov 2011 01:50:22 +0000 (01:50 +0000)
16 files changed:
source/blender/blenkernel/intern/movieclip.c
source/blender/blenkernel/intern/particle_system.c
source/blender/editors/armature/reeb.c
source/blender/editors/space_clip/tracking_ops.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_node/node_header.c
source/blender/editors/space_node/node_templates.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_snap.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_generics.c
source/blender/imbuf/intern/anim_movie.c
source/blender/makesrna/intern/rna_movieclip.c
source/blender/makesrna/intern/rna_tracking.c
source/blender/nodes/composite/nodes/node_composite_moviedistortion.c
source/blender/render/intern/source/occlusion.c

index b72a3be1014139c1d68923a33358344427897fa5..540d757f0c9d037d1bd3c5175dd12ddd5150bef1 100644 (file)
@@ -191,15 +191,13 @@ static ImBuf *movieclip_load_sequence_file(MovieClip *clip, MovieClipUser *user,
 {
        struct ImBuf *ibuf;
        char name[FILE_MAX];
-       int loadflag /*, size */ /* UNUSED */, undistort;
+       int loadflag, use_proxy= 0;
 
-       /* size= rendersize_to_number(user->render_size); */
-
-       undistort= user->render_flag&MCLIP_PROXY_RENDER_UNDISTORT;
-
-       if((flag&MCLIP_USE_PROXY) && user->render_size != MCLIP_PROXY_RENDER_SIZE_FULL)
+       use_proxy= (flag&MCLIP_USE_PROXY) && user->render_size != MCLIP_PROXY_RENDER_SIZE_FULL;
+       if(use_proxy) {
+               int undistort= user->render_flag&MCLIP_PROXY_RENDER_UNDISTORT;
                get_proxy_fname(clip, user->render_size, undistort, framenr, name);
-       else
+       else
                get_sequence_fname(clip, framenr, name);
 
        loadflag= IB_rect|IB_multilayer;
@@ -318,7 +316,7 @@ static ImBuf *get_imbuf_cache(MovieClip *clip, MovieClipUser *user, int flag)
        if(clip->cache) {
                MovieClipImBufCacheKey key;
 
-               key.framenr= user?user->framenr:clip->lastframe;
+               key.framenr= user->framenr;
 
                if(flag&MCLIP_USE_PROXY) {
                        key.proxy= rendersize_to_proxy(user, flag);
@@ -346,7 +344,7 @@ static void put_imbuf_cache(MovieClip *clip, MovieClipUser *user, ImBuf *ibuf, i
                                moviecache_hashcmp, moviecache_keydata);
        }
 
-       key.framenr= user?user->framenr:clip->lastframe;
+       key.framenr= user->framenr;
 
        if(flag&MCLIP_USE_PROXY) {
                key.proxy= rendersize_to_proxy(user, flag);
@@ -478,9 +476,6 @@ static void real_ibuf_size(MovieClip *clip, MovieClipUser *user, ImBuf *ibuf, in
 
 static int need_undistorted_cache(MovieClipUser *user, int flag)
 {
-       if (!user)
-               return 0;
-
        /* only full undistorted render can be used as on-fly undistorting image */
        if(flag&MCLIP_USE_PROXY) {
                if(user->render_size != MCLIP_PROXY_RENDER_SIZE_FULL || (user->render_flag&MCLIP_PROXY_RENDER_UNDISTORT)==0)
@@ -495,7 +490,7 @@ static ImBuf *get_undistorted_cache(MovieClip *clip, MovieClipUser *user)
 {
        MovieClipCache *cache= clip->cache;
        MovieTrackingCamera *camera= &clip->tracking.camera;
-       int framenr= user?user->framenr:clip->lastframe;
+       int framenr= user->framenr;
 
        /* no cache or no cached undistorted image */
        if(!clip->cache || !clip->cache->undistibuf)
@@ -530,7 +525,7 @@ static ImBuf *get_undistorted_ibuf(MovieClip *clip, struct MovieDistortion *dist
        else
                undistibuf= BKE_tracking_undistort(&clip->tracking, ibuf, ibuf->x, ibuf->y, 0.0f);
 
-       if(undistibuf->userflags|= IB_RECT_INVALID) {
+       if(undistibuf->userflags&IB_RECT_INVALID) {
                ibuf->userflags&= ~IB_RECT_INVALID;
                IMB_rect_from_float(undistibuf);
        }
@@ -547,7 +542,7 @@ static ImBuf *put_undistorted_cache(MovieClip *clip, MovieClipUser *user, ImBuf
 
        copy_v2_v2(cache->principal, camera->principal);
        copy_v3_v3(&cache->k1, &camera->k1);
-       cache->undist_framenr= user?user->framenr:clip->lastframe;
+       cache->undist_framenr= user->framenr;
 
        if(cache->undistibuf)
                IMB_freeImBuf(cache->undistibuf);
@@ -568,7 +563,7 @@ static ImBuf *put_undistorted_cache(MovieClip *clip, MovieClipUser *user, ImBuf
 ImBuf *BKE_movieclip_get_ibuf(MovieClip *clip, MovieClipUser *user)
 {
        ImBuf *ibuf= NULL;
-       int framenr= user?user->framenr:clip->lastframe;
+       int framenr= user->framenr;
        int cache_undistorted= 0;
 
        /* cache isn't threadsafe itself and also loading of movies
@@ -586,11 +581,11 @@ ImBuf *BKE_movieclip_get_ibuf(MovieClip *clip, MovieClipUser *user)
                ibuf= get_imbuf_cache(clip, user, clip->flag);
 
        if(!ibuf) {
-               int use_sequence= 1;
+               int use_sequence= 0;
 
                /* undistorted proxies for movies should be read as image sequence */
-               use_sequence&= user->render_flag&MCLIP_PROXY_RENDER_UNDISTORT;
-               use_sequence&= user->render_size!=MCLIP_PROXY_RENDER_SIZE_FULL;
+               use_sequence= (user->render_flag&MCLIP_PROXY_RENDER_UNDISTORT) &&
+                       (user->render_size!=MCLIP_PROXY_RENDER_SIZE_FULL);
 
                if(clip->source==MCLIP_SRC_SEQUENCE || use_sequence)
                        ibuf= movieclip_load_sequence_file(clip, user, framenr, clip->flag);
@@ -622,7 +617,7 @@ ImBuf *BKE_movieclip_get_ibuf(MovieClip *clip, MovieClipUser *user)
 ImBuf *BKE_movieclip_get_ibuf_flag(MovieClip *clip, MovieClipUser *user, int flag)
 {
        ImBuf *ibuf= NULL;
-       int framenr= user?user->framenr:clip->lastframe;
+       int framenr= user->framenr;
        int cache_undistorted= 0;
 
        /* cache isn't threadsafe itself and also loading of movies
@@ -668,7 +663,7 @@ ImBuf *BKE_movieclip_get_ibuf_flag(MovieClip *clip, MovieClipUser *user, int fla
 ImBuf *BKE_movieclip_get_stable_ibuf(MovieClip *clip, MovieClipUser *user, float loc[2], float *scale, float *angle)
 {
        ImBuf *ibuf, *stableibuf= NULL;
-       int framenr= user?user->framenr:clip->lastframe;
+       int framenr= user->framenr;
 
        ibuf= BKE_movieclip_get_ibuf(clip, user);
 
@@ -749,7 +744,7 @@ int BKE_movieclip_has_frame(MovieClip *clip, MovieClipUser *user)
 
 void BKE_movieclip_get_size(MovieClip *clip, MovieClipUser *user, int *width, int *height)
 {
-       if(!user || user->framenr==clip->lastframe) {
+       if(user->framenr==clip->lastframe) {
                *width= clip->lastsize[0];
                *height= clip->lastsize[1];
        } else {
index c759641f6a90ab24fd182676813515986e33befb..0caad66622689655694459acc4b02bc59d35658c 100644 (file)
@@ -3177,7 +3177,7 @@ static int collision_response(ParticleData *pa, ParticleCollision *col, BVHTreeR
                                mul_v3_fl(v1_tan, 1.0f - 0.01f * frict);
 
                                /* surface_velocity is opposite to cm velocity */
-                               mul_v3_v3fl(vr_tan, v1_tan, -1.0f);
+                               negate_v3_v3(vr_tan, v1_tan);
 
                                /* get back to global coordinates */
                                add_v3_v3(v1_tan, vc_tan);
index 2e5dafeb5071dafbfa45397450b5037b9eb2e7e7..c5c8b149713adf1c59c5c2763804827437f7732c 100644 (file)
@@ -3695,7 +3695,7 @@ void REEB_draw()
                
                if (G.scene->toolsettings->skgen_options & SKGEN_DISP_INDEX)
                {
-                       interp_v3_v3v3(vec, arc->head->p, arc->tail->p, 0.5f);
+                       mid_v3_v3v3(vec, arc->head->p, arc->tail->p);
                        s += sprintf(s, "%i (%i-%i-%i) ", i, arc->symmetry_level, arc->symmetry_flag, arc->symmetry_group);
                
                        if (G.scene->toolsettings->skgen_options & SKGEN_DISP_WEIGHT)
index e5bf053aa1ce1dff02e081da8853301cfce3b3dc..6f2289388f584905848e82390213ec65e2030c7c 100644 (file)
@@ -1537,7 +1537,7 @@ static int solve_camera_exec(bContext *C, wmOperator *op)
        }
 
        /* could fail if footage uses images with different sizes */
-       BKE_movieclip_get_size(clip, NULL, &width, &height);
+       BKE_movieclip_get_size(clip, &sc->user, &width, &height);
 
        error= BKE_tracking_solve_reconstruction(tracking, width, height);
 
@@ -1546,6 +1546,9 @@ static int solve_camera_exec(bContext *C, wmOperator *op)
        else
                BKE_reportf(op->reports, RPT_INFO, "Average reprojection error %.3f", error);
 
+       if(scene->clip)
+               id_us_min(&clip->id);
+
        scene->clip= clip;
        id_us_plus(&clip->id);
 
index 745611c6251e26d5ca7dafc873fe7298a0434fbf..2d8fbb133b47fd9a022f8c4734386b41c5ad7be7 100644 (file)
@@ -2211,9 +2211,7 @@ bNode *node_add_node(SpaceNode *snode, Main *bmain, Scene *scene, bNodeTemplate
                                node->id = &scene->id;
                        }
                        else if(ELEM3(node->type, CMP_NODE_MOVIECLIP, CMP_NODE_MOVIEDISTORTION, CMP_NODE_STABILIZE2D)) {
-                               if(G.main->movieclip.first == G.main->movieclip.last) {
-                                       node->id= G.main->movieclip.first;
-                               }
+                               node->id = (ID *)scene->clip;
                        }
                        
                        ntreeCompositForceHidden(snode->edittree, scene);
index d752dd79a19661b67439c6019eaa2891fdee325e..6dd5eeba83284cab19707d30b4eeb77a5448d588 100644 (file)
@@ -229,7 +229,7 @@ static void node_add_menu(bContext *C, uiLayout *layout, void *arg_nodeclass)
 static void node_menu_add_foreach_cb(void *calldata, int nclass, const char *name)
 {
        uiLayout *layout= calldata;
-       uiItemMenuF(layout, IFACE_(name), 0, node_add_menu, SET_INT_IN_POINTER(nclass));
+       uiItemMenuF(layout, name, 0, node_add_menu, SET_INT_IN_POINTER(nclass));
 }
 
 static void node_menu_add(const bContext *C, Menu *menu)
index b877bea6be93fafa7075d82247c294efeef61f68..806a6f988283a7966c95051282e34eb594ac81cd 100644 (file)
@@ -432,7 +432,7 @@ static void node_menu_column_foreach_cb(void *calldata, int nclass, const char *
        NodeLinkArg *arg = (NodeLinkArg*)calldata;
 
        if(!ELEM(nclass, NODE_CLASS_GROUP, NODE_CLASS_LAYOUT))
-               ui_node_menu_column(arg, nclass, IFACE_(name));
+               ui_node_menu_column(arg, nclass, name);
 }
 
 static void ui_template_node_link_menu(bContext *C, uiLayout *layout, void *but_p)
index a297f9bdf0fe4868aae66aa74a1f726111ed3134..fbadf4d394ad9a7290e4e57e581b09aa5aac3e39 100644 (file)
@@ -2624,7 +2624,7 @@ static void draw_em_measure_stats(View3D *v3d, RegionView3D *rv3d,
                                copy_v3_v3(v1, eed->v1->co);
                                copy_v3_v3(v2, eed->v2->co);
 
-                               interp_v3_v3v3(vmid, v1, v2, 0.5f);
+                               mid_v3_v3v3(vmid, v1, v2);
 
                                if(do_global) {
                                        mul_mat3_m4_v3(ob->obmat, v1);
index 582ee56961ae41fac5bbb717f5f46f2289637382..fd46112e7764bea00280f007f25eb41ed53f4cd0 100644 (file)
@@ -832,7 +832,7 @@ static void bundle_midpoint(Scene *scene, Object *ob, float vec[3])
        }
 
        if(ok) {
-               interp_v3_v3v3(vec, min, max, 0.5);
+               mid_v3_v3v3(vec, min, max);
        }
 }
 
index e5ae4aa56b3294f9d52dfedd8e4358380fa57859..5ef74c0af20d00b7a1854a7a084b698599aee967 100644 (file)
@@ -517,7 +517,7 @@ wmKeyMap* transform_modal_keymap(wmKeyConfig *keyconf)
        {NUM_MODAL_INCREMENT_UP, "INCREMENT_UP", 0, "Numinput Increment Up", ""},
        {NUM_MODAL_INCREMENT_DOWN, "INCREMENT_DOWN", 0, "Numinput Increment Down", ""},
        {TFM_MODAL_PROPSIZE_UP, "PROPORTIONAL_SIZE_UP", 0, "Increase Proportional Influence", ""},
-       {TFM_MODAL_PROPSIZE_DOWN, "PROPORTIONAL_SIZE_DOWN", 0, "Decrease Poportional Influence", ""},
+       {TFM_MODAL_PROPSIZE_DOWN, "PROPORTIONAL_SIZE_DOWN", 0, "Decrease Proportional Influence", ""},
        {TFM_MODAL_AUTOIK_LEN_INC, "AUTOIK_CHAIN_LEN_UP", 0, "Increase Max AutoIK Chain Length", ""},
        {TFM_MODAL_AUTOIK_LEN_DEC, "AUTOIK_CHAIN_LEN_DOWN", 0, "Decrease Max AutoIK Chain Length", ""},
        {0, NULL, 0, NULL, NULL}};
index 409dbdf33afd38e62c2bce325b3f0c888976d104..82920ca51ffe3bca70e1be1888451faf10a76d5a 100644 (file)
@@ -619,6 +619,65 @@ static void recalcData_nla(TransInfo *t)
        }
 }
 
+/* helper for recalcData() - for Image Editor transforms */
+static void recalcData_image(TransInfo *t)
+{
+       if (t->obedit && t->obedit->type == OB_MESH) {
+               SpaceImage *sima= t->sa->spacedata.first;
+               
+               flushTransUVs(t);
+               if(sima->flag & SI_LIVE_UNWRAP)
+                       ED_uvedit_live_unwrap_re_solve();
+               
+               DAG_id_tag_update(t->obedit->data, 0);
+       }
+}
+
+/* helper for recalcData() - for Movie Clip transforms */
+static void recalcData_clip(TransInfo *t)
+{
+       SpaceClip *sc= t->sa->spacedata.first;
+       MovieClip *clip= ED_space_clip(sc);
+       MovieTrackingTrack *track;
+       
+       if(t->state == TRANS_CANCEL) {
+               track= clip->tracking.tracks.first;
+               while(track) {
+                       if(TRACK_VIEW_SELECTED(sc, track)) {
+                               MovieTrackingMarker *marker= BKE_tracking_ensure_marker(track, sc->user.framenr);
+                               
+                               marker->flag= track->transflag;
+                       }
+                       
+                       track= track->next;
+               }
+       }
+       
+       flushTransTracking(t);
+       
+       track= clip->tracking.tracks.first;
+       while(track) {
+               if(TRACK_VIEW_SELECTED(sc, track)) {
+                       if (t->mode == TFM_TRANSLATION) {
+                               if(TRACK_AREA_SELECTED(track, TRACK_AREA_PAT))
+                                       BKE_tracking_clamp_track(track, CLAMP_PAT_POS);
+                               if(TRACK_AREA_SELECTED(track, TRACK_AREA_SEARCH))
+                                       BKE_tracking_clamp_track(track, CLAMP_SEARCH_POS);
+                       }
+                       else if (t->mode == TFM_RESIZE) {
+                               if(TRACK_AREA_SELECTED(track, TRACK_AREA_PAT))
+                                       BKE_tracking_clamp_track(track, CLAMP_PAT_DIM);
+                               if(TRACK_AREA_SELECTED(track, TRACK_AREA_SEARCH))
+                                       BKE_tracking_clamp_track(track, CLAMP_SEARCH_DIM);
+                       }
+               }
+               
+               track= track->next;
+       }
+       
+       DAG_id_tag_update(&clip->id, 0);
+}
+
 /* helper for recalcData() - for 3d-view transforms */
 static void recalcData_view3d(TransInfo *t)
 {
@@ -855,60 +914,13 @@ void recalcData(TransInfo *t)
                recalcData_nla(t);
        }
        else if (t->spacetype == SPACE_IMAGE) {
-               if (t->obedit && t->obedit->type == OB_MESH) {
-                       SpaceImage *sima= t->sa->spacedata.first;
-                       
-                       flushTransUVs(t);
-                       if(sima->flag & SI_LIVE_UNWRAP)
-                               ED_uvedit_live_unwrap_re_solve();
-                       
-                       DAG_id_tag_update(t->obedit->data, 0);
-               }
+               recalcData_image(t);
        }
        else if (t->spacetype == SPACE_VIEW3D) {
                recalcData_view3d(t);
        }
        else if (t->spacetype == SPACE_CLIP) {
-               SpaceClip *sc= t->sa->spacedata.first;
-               MovieClip *clip= ED_space_clip(sc);
-               MovieTrackingTrack *track;
-
-               if(t->state == TRANS_CANCEL) {
-                       track= clip->tracking.tracks.first;
-                       while(track) {
-                               if(TRACK_VIEW_SELECTED(sc, track)) {
-                                       MovieTrackingMarker *marker= BKE_tracking_ensure_marker(track, sc->user.framenr);
-
-                                       marker->flag= track->transflag;
-                               }
-
-                               track= track->next;
-                       }
-               }
-
-               flushTransTracking(t);
-
-               track= clip->tracking.tracks.first;
-               while(track) {
-                       if(TRACK_VIEW_SELECTED(sc, track)) {
-                               if (t->mode == TFM_TRANSLATION) {
-                                       if(TRACK_AREA_SELECTED(track, TRACK_AREA_PAT))
-                                               BKE_tracking_clamp_track(track, CLAMP_PAT_POS);
-                                       if(TRACK_AREA_SELECTED(track, TRACK_AREA_SEARCH))
-                                               BKE_tracking_clamp_track(track, CLAMP_SEARCH_POS);
-                               }
-                               else if (t->mode == TFM_RESIZE) {
-                                       if(TRACK_AREA_SELECTED(track, TRACK_AREA_PAT))
-                                               BKE_tracking_clamp_track(track, CLAMP_PAT_DIM);
-                                       if(TRACK_AREA_SELECTED(track, TRACK_AREA_SEARCH))
-                                               BKE_tracking_clamp_track(track, CLAMP_SEARCH_DIM);
-                               }
-                       }
-
-                       track= track->next;
-               }
-
-               DAG_id_tag_update(&clip->id, 0);
+               recalcData_clip(t);
        }
 }
 
index 3adb9a3791fb2ba3ef0b8dfedc5ee55c1c0b53dd..09b79e5164838337c2de91ac240fdeaf51a457f8 100644 (file)
@@ -890,7 +890,7 @@ static int ffmpeg_seek_by_byte(AVFormatContext *pFormatCtx)
 
 static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position,
                                IMB_Timecode_Type tc) {
-       int64_t pts_to_search = 0;
+       unsigned long long pts_to_search = 0;
        double frame_rate;
        double pts_time_base;
        long long st_time; 
index afdf3cd9c460dd213eaeee2f33b99553a8463861..ad53a96b817f4e579b21f03b0616b0d18a43c1ea 100644 (file)
@@ -66,24 +66,6 @@ static void rna_MovieClip_size_get(PointerRNA *ptr, int *values)
        values[1]= clip->lastsize[1];
 }
 
-static void rna_MovieClip_resolution_get(PointerRNA *ptr, float *values)
-{
-       MovieClip *clip= (MovieClip*)ptr->id.data;
-       ImBuf *ibuf;
-
-       ibuf= BKE_movieclip_get_ibuf(clip, NULL);
-       if (ibuf) {
-               values[0]= ibuf->ppm[0];
-               values[1]= ibuf->ppm[1];
-
-               IMB_freeImBuf(ibuf);
-       }
-       else {
-               values[0]= 0;
-               values[1]= 0;
-       }
-}
-
 #else
 
 static void rna_def_movieclip_proxy(BlenderRNA *brna)
@@ -235,10 +217,6 @@ static void rna_def_movieclip(BlenderRNA *brna)
        RNA_def_property_int_funcs(prop, "rna_MovieClip_size_get" , NULL, NULL);
        RNA_def_property_clear_flag(prop, PROP_EDITABLE);
 
-       prop= RNA_def_float_vector(srna, "resolution" , 2 , NULL , 0, 0, "Resolution" , "X/Y pixels per meter" , 0 , 0);
-       RNA_def_property_float_funcs(prop, "rna_MovieClip_resolution_get", NULL, NULL);
-       RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-
        prop= RNA_def_property(srna, "display_aspect", PROP_FLOAT, PROP_XYZ);
        RNA_def_property_float_sdna(prop, NULL, "aspx");
        RNA_def_property_array(prop, 2);
index 15ded001237a93b917fe4fa2c223dbcf23a3379c..2c6384c75d82d2c69fd610db008661cbcc6c1ab0 100644 (file)
@@ -242,7 +242,7 @@ static void rna_def_trackingSettings(BlenderRNA *brna)
        prop= RNA_def_property(srna, "frames_limit", PROP_INT, PROP_NONE);
        RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
        RNA_def_property_int_sdna(prop, NULL, "frames_limit");
-       RNA_def_property_range(prop, 0, INT_MAX);
+       RNA_def_property_range(prop, 0, SHRT_MAX);
        RNA_def_property_ui_text(prop, "Frames Limit", "Amount of frames to be tracked during single tracking operation");
 
        /* adjust frames */
@@ -418,7 +418,7 @@ static void rna_def_trackingTrack(BlenderRNA *brna)
 
        static EnumPropertyItem tracker_items[] = {
                {TRACKER_SAD, "SAD", 0, "SAD", "Sum of Absolute Differences tracker"},
-               {TRACKER_KLT, "KLT", 0, "KLT", "Kanade–Lucas–Tomasi racker"},
+               {TRACKER_KLT, "KLT", 0, "KLT", "Kanade–Lucas–Tomasi tracker"},
                {0, NULL, 0, NULL, NULL}};
 
        rna_def_trackingMarker(brna);
index 439616377a10b3e38be1b0db85f58c9c35eb9ce6..8411de39353bd9b2bccf4193ec2166c7f658e94f 100644 (file)
@@ -45,7 +45,7 @@ static bNodeSocketTemplate cmp_node_moviedistortion_out[]= {
        {       -1, 0, ""       }
 };
 
-static void exec(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out)
+static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
 {
        if(in[0]->data) {
                if(node->id) {
@@ -57,14 +57,18 @@ static void exec(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **
                        ibuf= IMB_allocImBuf(cbuf->x, cbuf->y, 32, 0);
 
                        if(ibuf) {
+                               RenderData *rd= data;
                                ImBuf *obuf;
                                MovieTracking *tracking= &clip->tracking;
                                int width, height;
                                float overscan= 0.0f;
+                               MovieClipUser user= {0};
+
+                               BKE_movieclip_user_set_frame(&user, rd->cfra);
 
                                ibuf->rect_float= cbuf->rect;
 
-                               BKE_movieclip_get_size(clip, NULL, &width, &height);
+                               BKE_movieclip_get_size(clip, &user, &width, &height);
 
                                if(!node->storage)
                                        node->storage= BKE_tracking_distortion_create();
index 7434425d24bb511d3ba4f88436f42e0d25c6c6c3..0984c9e784fb5c6d33e3bc3d054f211a88e95e95 100644 (file)
@@ -321,7 +321,7 @@ static void occ_face(const OccFace *face, float co[3], float normal[3], float *a
        
        if(co) {
                if(vlr->v4)
-                       interp_v3_v3v3(co, vlr->v1->co, vlr->v3->co, 0.5f);
+                       mid_v3_v3v3(co, vlr->v1->co, vlr->v3->co);
                else
                        cent_tri_v3(co, vlr->v1->co, vlr->v2->co, vlr->v3->co);
 
@@ -1623,7 +1623,7 @@ static void *exec_strandsurface_sample(void *data)
                if(face[3]) {
                        co4= mesh->co[face[3]];
 
-                       interp_v3_v3v3(co, co1, co3, 0.5f);
+                       mid_v3_v3v3(co, co1, co3);
                        normal_quad_v3( n,co1, co2, co3, co4);
                }
                else {