diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-10 05:50:22 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-10 05:50:22 +0400 |
commit | 130b4429b0279b8be8afa3ce45e60a359b723add (patch) | |
tree | 8b72d8827d499b74b71e24151844379c96f7e2ba /source/blender | |
parent | 0811236da2d5c709e274d9442fd6fbda471c2136 (diff) | |
parent | e06f206450b634737e3d2b310d1c702a994f28fe (diff) |
svn merge -r41638:41648 ^/trunk/blender
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/movieclip.c | 39 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 2 | ||||
-rw-r--r-- | source/blender/editors/armature/reeb.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_clip/tracking_ops.c | 5 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_edit.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_header.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_templates.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_snap.c | 2 | ||||
-rw-r--r-- | source/blender/editors/transform/transform.c | 2 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_generics.c | 110 | ||||
-rw-r--r-- | source/blender/imbuf/intern/anim_movie.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_movieclip.c | 22 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_tracking.c | 4 | ||||
-rw-r--r-- | source/blender/nodes/composite/nodes/node_composite_moviedistortion.c | 8 | ||||
-rw-r--r-- | source/blender/render/intern/source/occlusion.c | 4 |
16 files changed, 101 insertions, 111 deletions
diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index b72a3be1014..540d757f0c9 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -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 { diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index c759641f6a9..0caad666226 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -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); diff --git a/source/blender/editors/armature/reeb.c b/source/blender/editors/armature/reeb.c index 2e5dafeb507..c5c8b149713 100644 --- a/source/blender/editors/armature/reeb.c +++ b/source/blender/editors/armature/reeb.c @@ -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) diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c index e5bf053aa1c..6f2289388f5 100644 --- a/source/blender/editors/space_clip/tracking_ops.c +++ b/source/blender/editors/space_clip/tracking_ops.c @@ -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); diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index 745611c6251..2d8fbb133b4 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -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); diff --git a/source/blender/editors/space_node/node_header.c b/source/blender/editors/space_node/node_header.c index d752dd79a19..6dd5eeba832 100644 --- a/source/blender/editors/space_node/node_header.c +++ b/source/blender/editors/space_node/node_header.c @@ -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) diff --git a/source/blender/editors/space_node/node_templates.c b/source/blender/editors/space_node/node_templates.c index b877bea6be9..806a6f98828 100644 --- a/source/blender/editors/space_node/node_templates.c +++ b/source/blender/editors/space_node/node_templates.c @@ -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) diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index a297f9bdf0f..fbadf4d394a 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -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); diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c index 582ee56961a..fd46112e776 100644 --- a/source/blender/editors/space_view3d/view3d_snap.c +++ b/source/blender/editors/space_view3d/view3d_snap.c @@ -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); } } diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index e5ae4aa56b3..5ef74c0af20 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -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}}; diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 409dbdf33af..82920ca51ff 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -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); } } diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c index 3adb9a3791f..09b79e51648 100644 --- a/source/blender/imbuf/intern/anim_movie.c +++ b/source/blender/imbuf/intern/anim_movie.c @@ -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; diff --git a/source/blender/makesrna/intern/rna_movieclip.c b/source/blender/makesrna/intern/rna_movieclip.c index afdf3cd9c46..ad53a96b817 100644 --- a/source/blender/makesrna/intern/rna_movieclip.c +++ b/source/blender/makesrna/intern/rna_movieclip.c @@ -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); diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c index 15ded001237..2c6384c75d8 100644 --- a/source/blender/makesrna/intern/rna_tracking.c +++ b/source/blender/makesrna/intern/rna_tracking.c @@ -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); diff --git a/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c b/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c index 439616377a1..8411de39353 100644 --- a/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c +++ b/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c @@ -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(); diff --git a/source/blender/render/intern/source/occlusion.c b/source/blender/render/intern/source/occlusion.c index 7434425d24b..0984c9e784f 100644 --- a/source/blender/render/intern/source/occlusion.c +++ b/source/blender/render/intern/source/occlusion.c @@ -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 { |