svn merge -r41638:41648 ^/trunk/blender
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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}};
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user