svn merge ^/trunk/blender -r43819:43830

This commit is contained in:
Campbell Barton 2012-02-02 00:04:47 +00:00
commit 8926cbd0a7
19 changed files with 1081 additions and 970 deletions

@ -606,6 +606,7 @@ class CyclesMaterial_PT_settings(CyclesButtonsPanel, Panel):
col = split.column()
col.prop(cmat, "sample_as_light")
col.prop(mat, "pass_index")
class CyclesTexture_PT_context(CyclesButtonsPanel, Panel):

@ -85,6 +85,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel):
col.label()
col.prop(fluid, "use_speed_vectors")
col.prop(fluid, "use_reverse_frames")
col.prop(fluid, "frame_offset", text="Offset")
layout.prop(fluid, "filepath", text="")

@ -720,17 +720,21 @@ class CLIP_PT_proxy(Panel):
layout.active = clip.use_proxy
layout.label(text="Build Sizes:")
layout.label(text="Build Original:")
row = layout.row()
row.prop(clip.proxy, "build_25")
row.prop(clip.proxy, "build_50")
row = layout.row(align=True)
row.prop(clip.proxy, "build_25", toggle=True)
row.prop(clip.proxy, "build_50", toggle=True)
row.prop(clip.proxy, "build_75", toggle=True)
row.prop(clip.proxy, "build_100", toggle=True)
row = layout.row()
row.prop(clip.proxy, "build_75")
row.prop(clip.proxy, "build_100")
layout.label(text="Build Undistorted:")
layout.prop(clip.proxy, "build_undistorted")
row = layout.row(align=True)
row.prop(clip.proxy, "build_undistorted_25", toggle=True)
row.prop(clip.proxy, "build_undistorted_50", toggle=True)
row.prop(clip.proxy, "build_undistorted_75", toggle=True)
row.prop(clip.proxy, "build_undistorted_100", toggle=True)
layout.prop(clip.proxy, "quality")
@ -738,7 +742,7 @@ class CLIP_PT_proxy(Panel):
if clip.use_proxy_custom_directory:
layout.prop(clip.proxy, "directory")
layout.operator("clip.rebuild_proxy", text="Rebuild Proxy")
layout.operator("clip.rebuild_proxy", text="Build Proxy")
if clip.source == 'MOVIE':
col = layout.column()

@ -49,7 +49,7 @@ void BKE_movieclip_reload(struct MovieClip *clip);
struct ImBuf *BKE_movieclip_get_ibuf(struct MovieClip *clip, struct MovieClipUser *user);
struct ImBuf *BKE_movieclip_get_postprocessed_ibuf(struct MovieClip *clip, struct MovieClipUser *user, int postprocess_flag);
struct ImBuf *BKE_movieclip_get_stable_ibuf(struct MovieClip *clip, struct MovieClipUser *user, float loc[2], float *scale, float *angle, int postprocess_flag);
struct ImBuf *BKE_movieclip_get_ibuf_flag(struct MovieClip *clip, struct MovieClipUser *user, int flag);
struct ImBuf *BKE_movieclip_get_ibuf_flag(struct MovieClip *clip, struct MovieClipUser *user, int flag, int cache_flag);
void BKE_movieclip_get_size(struct MovieClip *clip, struct MovieClipUser *user, int *width, int *height);
void BKE_movieclip_aspect(struct MovieClip *clip, float *aspx, float *aspy);
int BKE_movieclip_has_frame(struct MovieClip *clip, struct MovieClipUser *user);
@ -64,6 +64,9 @@ void BKE_movieclip_get_cache_segments(struct MovieClip *clip, struct MovieClipUs
void BKE_movieclip_build_proxy_frame(struct MovieClip *clip, int clip_flag, struct MovieDistortion *distortion,
int cfra, int *build_sizes, int build_count, int undistorted);
/* cacheing flags */
#define MOVIECLIP_CACHE_SKIP (1<<0)
/* postprocessing flags */
#define MOVIECLIP_DISABLE_RED (1<<0)
#define MOVIECLIP_DISABLE_GREEN (1<<1)

@ -631,7 +631,8 @@ static ImBuf *put_postprocessed_frame_to_cache(MovieClip *clip, MovieClipUser *u
return postproc_ibuf;
}
static ImBuf *movieclip_get_postprocessed_ibuf(MovieClip *clip, MovieClipUser *user, int flag, int postprocess_flag)
static ImBuf *movieclip_get_postprocessed_ibuf(MovieClip *clip, MovieClipUser *user, int flag,
int postprocess_flag, int cache_flag)
{
ImBuf *ibuf= NULL;
int framenr= user->framenr, need_postprocess= 0;
@ -664,7 +665,7 @@ static ImBuf *movieclip_get_postprocessed_ibuf(MovieClip *clip, MovieClipUser *u
ibuf= movieclip_load_movie_file(clip, user, framenr, flag);
}
if(ibuf)
if(ibuf && (cache_flag & MOVIECLIP_CACHE_SKIP) == 0)
put_imbuf_cache(clip, user, ibuf, flag);
}
@ -687,17 +688,17 @@ static ImBuf *movieclip_get_postprocessed_ibuf(MovieClip *clip, MovieClipUser *u
ImBuf *BKE_movieclip_get_ibuf(MovieClip *clip, MovieClipUser *user)
{
return BKE_movieclip_get_ibuf_flag(clip, user, clip->flag);
return BKE_movieclip_get_ibuf_flag(clip, user, clip->flag, 0);
}
ImBuf *BKE_movieclip_get_ibuf_flag(MovieClip *clip, MovieClipUser *user, int flag)
ImBuf *BKE_movieclip_get_ibuf_flag(MovieClip *clip, MovieClipUser *user, int flag, int cache_flag)
{
return movieclip_get_postprocessed_ibuf(clip, user, flag, 0);
return movieclip_get_postprocessed_ibuf(clip, user, flag, 0, cache_flag);
}
ImBuf *BKE_movieclip_get_postprocessed_ibuf(MovieClip *clip, MovieClipUser *user, int postprocess_flag)
{
return movieclip_get_postprocessed_ibuf(clip, user, clip->flag, postprocess_flag);
return movieclip_get_postprocessed_ibuf(clip, user, clip->flag, postprocess_flag, 0);
}
static ImBuf *get_stable_cached_frame(MovieClip *clip, MovieClipUser *user, int framenr)
@ -1021,7 +1022,7 @@ void BKE_movieclip_build_proxy_frame(MovieClip *clip, int clip_flag, struct Movi
user.render_flag= 0;
user.render_size= MCLIP_PROXY_RENDER_SIZE_FULL;
ibuf= BKE_movieclip_get_ibuf_flag(clip, &user, clip_flag);
ibuf= BKE_movieclip_get_ibuf_flag(clip, &user, clip_flag, MOVIECLIP_CACHE_SKIP);
if(ibuf) {
ImBuf *tmpibuf= ibuf;

@ -975,8 +975,8 @@ MovieTrackingContext *BKE_tracking_context_new(MovieClip *clip, MovieClipUser *u
context->clip_flag= clip->flag&MCLIP_TIMECODE_FLAGS;
context->user= *user;
context->user.render_size= 0;
context->user.render_flag= MCLIP_PROXY_RENDER_SIZE_FULL;
context->user.render_size= MCLIP_PROXY_RENDER_SIZE_FULL;
context->user.render_flag= 0;
if(!sequence)
BLI_begin_threaded_malloc();
@ -1226,7 +1226,7 @@ static ImBuf *get_frame_ibuf(MovieTrackingContext *context, int framenr)
user.framenr= framenr;
ibuf= BKE_movieclip_get_ibuf_flag(context->clip, &user, context->clip_flag);
ibuf= BKE_movieclip_get_ibuf_flag(context->clip, &user, context->clip_flag, MOVIECLIP_CACHE_SKIP);
return ibuf;
}
@ -1330,7 +1330,7 @@ int BKE_tracking_next(MovieTrackingContext *context)
if(context->backwards) context->user.framenr--;
else context->user.framenr++;
ibuf_new= BKE_movieclip_get_ibuf_flag(context->clip, &context->user, context->clip_flag);
ibuf_new= BKE_movieclip_get_ibuf_flag(context->clip, &context->user, context->clip_flag, MOVIECLIP_CACHE_SKIP);
if(!ibuf_new)
return 0;

@ -310,7 +310,7 @@ int ED_mesh_uv_texture_add(bContext *C, Mesh *me, const char *name, int active_s
layernum = CustomData_number_of_layers(&em->bm->pdata, CD_MTEXPOLY);
if (layernum >= MAX_MTFACE)
return 0;
return -1;
BM_add_data_layer(em->bm, &em->bm->pdata, CD_MTEXPOLY);
CustomData_set_layer_active(&em->bm->pdata, CD_MTEXPOLY, layernum);
@ -335,7 +335,7 @@ int ED_mesh_uv_texture_add(bContext *C, Mesh *me, const char *name, int active_s
else {
layernum = CustomData_number_of_layers(&me->pdata, CD_MTEXPOLY);
if (layernum >= MAX_MTFACE)
return 0;
return -1;
if (me->mtpoly) {
CustomData_add_layer_named(&me->pdata, CD_MTEXPOLY, CD_DUPLICATE, me->mtpoly, me->totpoly, name);
@ -362,7 +362,7 @@ int ED_mesh_uv_texture_add(bContext *C, Mesh *me, const char *name, int active_s
DAG_id_tag_update(&me->id, 0);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, me);
return 1;
return layernum;
}
int ED_mesh_uv_texture_remove(bContext *C, Object *ob, Mesh *me)
@ -399,7 +399,7 @@ int ED_mesh_color_add(bContext *C, Scene *UNUSED(scene), Object *UNUSED(ob), Mes
layernum= CustomData_number_of_layers(&em->bm->ldata, CD_MLOOPCOL);
if (layernum >= MAX_MCOL) {
return 0;
return -1;
}
BM_add_data_layer(em->bm, &em->bm->pdata, CD_MLOOPCOL);
@ -417,7 +417,7 @@ int ED_mesh_color_add(bContext *C, Scene *UNUSED(scene), Object *UNUSED(ob), Mes
else {
layernum= CustomData_number_of_layers(&me->ldata, CD_MLOOPCOL);
if (layernum >= CD_MLOOPCOL) {
return 0;
return -1;
}
if(me->mloopcol) {
@ -440,7 +440,7 @@ int ED_mesh_color_add(bContext *C, Scene *UNUSED(scene), Object *UNUSED(ob), Mes
DAG_id_tag_update(&me->id, 0);
WM_event_add_notifier(C, NC_GEOM|ND_DATA, me);
return 1;
return layernum;
}
int ED_mesh_color_remove(bContext *C, Object *ob, Mesh *me)
@ -493,7 +493,7 @@ static int uv_texture_add_exec(bContext *C, wmOperator *UNUSED(op))
Object *ob= ED_object_context(C);
Mesh *me= ob->data;
if(!ED_mesh_uv_texture_add(C, me, NULL, TRUE))
if(ED_mesh_uv_texture_add(C, me, NULL, TRUE) == -1)
return OPERATOR_CANCELLED;
return OPERATOR_FINISHED;
@ -631,7 +631,7 @@ static int vertex_color_add_exec(bContext *C, wmOperator *UNUSED(op))
Object *ob= ED_object_context(C);
Mesh *me= ob->data;
if(!ED_mesh_color_add(C, scene, ob, me, NULL, TRUE))
if(ED_mesh_color_add(C, scene, ob, me, NULL, TRUE) == -1)
return OPERATOR_CANCELLED;
return OPERATOR_FINISHED;

@ -1003,6 +1003,7 @@ static DerivedMesh *multiresbake_create_loresdm(Scene *scene, Object *ob, int *l
DerivedMesh *cddm= CDDM_from_mesh(me, ob);
tmp_mmd.lvl= *lvl;
tmp_mmd.sculptlvl= *lvl;
dm= multires_dm_create_from_derived(&tmp_mmd, 1, cddm, ob, 0, 0);
cddm->release(cddm);
}

@ -834,6 +834,27 @@ static void proxy_freejob(void *pjv)
MEM_freeN(pj);
}
static int proxy_bitflag_to_array(int size_flag, int build_sizes[4], int undistort)
{
int build_count = 0;
int size_flags[2][4] = {{MCLIP_PROXY_SIZE_25,
MCLIP_PROXY_SIZE_50,
MCLIP_PROXY_SIZE_75,
MCLIP_PROXY_SIZE_100},
{MCLIP_PROXY_UNDISTORTED_SIZE_25,
MCLIP_PROXY_UNDISTORTED_SIZE_50,
MCLIP_PROXY_UNDISTORTED_SIZE_75,
MCLIP_PROXY_UNDISTORTED_SIZE_100}};
int size_nr = undistort ? 1 : 0;
if(size_flag & size_flags[size_nr][0]) build_sizes[build_count++]= MCLIP_PROXY_RENDER_SIZE_25;
if(size_flag & size_flags[size_nr][1]) build_sizes[build_count++]= MCLIP_PROXY_RENDER_SIZE_50;
if(size_flag & size_flags[size_nr][2]) build_sizes[build_count++]= MCLIP_PROXY_RENDER_SIZE_75;
if(size_flag & size_flags[size_nr][3]) build_sizes[build_count++]= MCLIP_PROXY_RENDER_SIZE_100;
return build_count;
}
/* only this runs inside thread */
static void proxy_startjob(void *pjv, short *stop, short *do_update, float *progress)
{
@ -841,22 +862,23 @@ static void proxy_startjob(void *pjv, short *stop, short *do_update, float *prog
Scene *scene=pj->scene;
MovieClip *clip= pj->clip;
struct MovieDistortion *distortion= NULL;
int cfra, undistort;
short tc_flag, size_flag, quality, build_flag;
int sfra= SFRA, efra= EFRA;
short tc_flag, size_flag, quality;
int cfra, sfra= SFRA, efra= EFRA;
int build_sizes[4], build_count= 0;
int build_undistort_sizes[4], build_undistort_count= 0;
tc_flag= clip->proxy.build_tc_flag;
size_flag= clip->proxy.build_size_flag;
quality= clip->proxy.quality;
build_flag= clip->proxy.build_flag;
undistort= build_flag&MCLIP_PROXY_RENDER_UNDISTORT;
build_count= proxy_bitflag_to_array(size_flag, build_sizes, 0);
build_undistort_count= proxy_bitflag_to_array(size_flag, build_undistort_sizes, 1);
if(clip->source == MCLIP_SRC_MOVIE) {
if(clip->anim)
IMB_anim_index_rebuild(clip->anim, tc_flag, size_flag, quality, stop, do_update, progress);
if(!undistort) {
if(!build_undistort_count) {
return;
}
else {
@ -865,20 +887,14 @@ static void proxy_startjob(void *pjv, short *stop, short *do_update, float *prog
}
}
if(size_flag&IMB_PROXY_25) build_sizes[build_count++]= MCLIP_PROXY_RENDER_SIZE_25;
if(size_flag&IMB_PROXY_50) build_sizes[build_count++]= MCLIP_PROXY_RENDER_SIZE_50;
if(size_flag&IMB_PROXY_75) build_sizes[build_count++]= MCLIP_PROXY_RENDER_SIZE_75;
if(size_flag&IMB_PROXY_100) build_sizes[build_count++]= MCLIP_PROXY_RENDER_SIZE_100;
if(undistort)
if(build_undistort_count)
distortion= BKE_tracking_distortion_create();
for(cfra= sfra; cfra<=efra; cfra++) {
if(clip->source != MCLIP_SRC_MOVIE)
BKE_movieclip_build_proxy_frame(clip, pj->clip_flag, NULL, cfra, build_sizes, build_count, 0);
if(undistort)
BKE_movieclip_build_proxy_frame(clip, pj->clip_flag, distortion, cfra, build_sizes, build_count, 1);
BKE_movieclip_build_proxy_frame(clip, pj->clip_flag, distortion, cfra, build_undistort_sizes, build_undistort_count, 1);
if(*stop || G.afbreek)
break;

@ -2757,7 +2757,7 @@ static int detect_features_exec(bContext *C, wmOperator *op)
SpaceClip *sc= CTX_wm_space_clip(C);
MovieClip *clip= ED_space_clip(sc);
int clip_flag= clip->flag&MCLIP_TIMECODE_FLAGS;
ImBuf *ibuf= BKE_movieclip_get_ibuf_flag(clip, &sc->user, clip_flag);
ImBuf *ibuf= BKE_movieclip_get_ibuf_flag(clip, &sc->user, clip_flag, MOVIECLIP_CACHE_SKIP);
MovieTracking *tracking= &clip->tracking;
ListBase *tracksbase= BKE_tracking_get_tracks(tracking);
MovieTrackingTrack *track= tracksbase->first;

@ -1256,7 +1256,11 @@ void mtex_bump_bicubic( vec3 texco, sampler2D ima, float hScale,
ivec2 vDim;
vDim = textureSize(ima, 0);
vec2 fTexLoc = vDim*texco.xy-vec2(0.5,0.5);
// taking the fract part of the texture coordinate is a hardcoded wrap mode.
// this is acceptable as textures use wrap mode exclusively in 3D view elsewhere in blender.
// this is done so that we can still get a valid texel with uvs outside the 0,1 range
// by texelFetch below, as coordinates are clamped when using this function.
vec2 fTexLoc = vDim*fract(texco.xy) - vec2(0.5, 0.5);
ivec2 iTexLoc = ivec2(floor(fTexLoc));
vec2 t = clamp(fTexLoc - iTexLoc, 0.0, 1.0); // sat just to be pedantic
@ -1279,7 +1283,14 @@ void mtex_bump_bicubic( vec3 texco, sampler2D ima, float hScale,
for(int i = 0; i < 4; i++){
for(int j = 0; j < 4; j++){
rgbtobw(texelFetch(ima, (iTexLocMod + ivec2(i,j)), 0), H[i][j]);
ivec2 iTexTmp = iTexLocMod + ivec2(i,j);
// wrap texture coordinates manually for texelFetch to work on uvs oitside the 0,1 range.
// this is guaranteed to work since we take the fractional part of the uv above.
iTexTmp.x = (iTexTmp.x < 0)? iTexTmp.x + vDim.x : ((iTexTmp.x >= vDim.x)? iTexTmp.x - vDim.x : iTexTmp.x);
iTexTmp.y = (iTexTmp.y < 0)? iTexTmp.y + vDim.y : ((iTexTmp.y >= vDim.y)? iTexTmp.y - vDim.y : iTexTmp.y);
rgbtobw(texelFetch(ima, iTexTmp, 0), H[i][j]);
}
}

File diff suppressed because it is too large Load Diff

@ -57,8 +57,6 @@ typedef struct MovieClipProxy {
short quality; /* proxy build quality */
short build_size_flag; /* size flags (see below) of all proxies to build */
short build_tc_flag; /* time code flags (see below) of all tc indices to build */
short build_flag, pad; /* other build flags */
char pad2[4];
} MovieClipProxy;
typedef struct MovieClip {
@ -98,8 +96,15 @@ typedef struct MovieClipScopes {
float slide_scale[2]; /* scale used for sliding from previewe area */
} MovieClipScopes;
/* MovieClipProxy->build_flag */
#define MCLIP_PROXY_BUILD_UNDISTORT 1 /* build undistorted proxies as well */
/* MovieClipProxy->build_size_flag */
#define MCLIP_PROXY_SIZE_25 (1<<0)
#define MCLIP_PROXY_SIZE_50 (1<<1)
#define MCLIP_PROXY_SIZE_75 (1<<2)
#define MCLIP_PROXY_SIZE_100 (1<<3)
#define MCLIP_PROXY_UNDISTORTED_SIZE_25 (1<<4)
#define MCLIP_PROXY_UNDISTORTED_SIZE_50 (1<<5)
#define MCLIP_PROXY_UNDISTORTED_SIZE_75 (1<<6)
#define MCLIP_PROXY_UNDISTORTED_SIZE_100 (1<<7)
/* MovieClip->source */
#define MCLIP_SRC_SEQUENCE 1

@ -74,6 +74,9 @@ typedef struct FluidsimSettings {
float animStart, animEnd;
/* bake start end time (in blender frames) */
int bakeStart, bakeEnd;
/* offset for baked frames */
int frameOffset;
int pad;
/* g star param (LBM compressibility) */
float gstar;
/* activate refinement? */

@ -335,6 +335,11 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "End Time", "Simulation time of the last blender frame (in seconds)");
prop= RNA_def_property(srna, "frame_offset", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "frameOffset");
RNA_def_property_ui_text(prop, "Cache Offset", "Offset when reading baked cache");
RNA_def_property_update(prop, NC_OBJECT, "rna_fluid_update");
prop= RNA_def_property(srna, "simulation_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "realsize");
RNA_def_property_range(prop, 0.001, 10);

@ -33,6 +33,7 @@
#include "MEM_guardedalloc.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_types.h"
@ -1130,21 +1131,25 @@ static int rna_Mesh_tot_face_get(PointerRNA *ptr)
return me->edit_btmesh ? me->edit_btmesh->bm->totfacesel : 0;
}
static CustomDataLayer *rna_Mesh_vertex_color_new(struct Mesh *me, struct bContext *C, const char *name)
static PointerRNA rna_Mesh_vertex_color_new(struct Mesh *me, struct bContext *C, const char *name)
{
CustomData *ldata = rna_mesh_ldata_helper(me);
PointerRNA ptr;
CustomData *ldata;
CustomDataLayer *cdl= NULL;
int index;
int index= ED_mesh_color_add(C, NULL, NULL, me, name, FALSE);
if(ED_mesh_color_add(C, NULL, NULL, me, name, FALSE)) {
index= CustomData_get_named_layer_index(ldata, CD_MLOOPCOL, name);
cdl= (index == -1)? NULL: &ldata->layers[index];
}
return cdl;
if(index != -1) {
ldata= rna_mesh_ldata_helper(me);
cdl= &ldata->layers[CustomData_get_layer_index_n(ldata, CD_MLOOPCOL, index)];
}
static CustomDataLayer *rna_Mesh_int_property_new(struct Mesh *me, struct bContext *C, const char *name)
RNA_pointer_create(&me->id, &RNA_MeshLoopColorLayer, cdl, &ptr);
return ptr;
}
static PointerRNA rna_Mesh_int_property_new(struct Mesh *me, struct bContext *C, const char *name)
{
PointerRNA ptr;
CustomDataLayer *cdl = NULL;
int index;
@ -1153,11 +1158,13 @@ static CustomDataLayer *rna_Mesh_int_property_new(struct Mesh *me, struct bConte
cdl = (index == -1) ? NULL : &(me->fdata.layers[index]);
return cdl;
RNA_pointer_create(&me->id, &RNA_MeshIntPropertyLayer, cdl, &ptr);
return ptr;
}
static CustomDataLayer *rna_Mesh_float_property_new(struct Mesh *me, struct bContext *C, const char *name)
static PointerRNA rna_Mesh_float_property_new(struct Mesh *me, struct bContext *C, const char *name)
{
PointerRNA ptr;
CustomDataLayer *cdl = NULL;
int index;
@ -1166,11 +1173,13 @@ static CustomDataLayer *rna_Mesh_float_property_new(struct Mesh *me, struct bCon
cdl = (index == -1) ? NULL : &(me->fdata.layers[index]);
return cdl;
RNA_pointer_create(&me->id, &RNA_MeshFloatPropertyLayer, cdl, &ptr);
return ptr;
}
static CustomDataLayer *rna_Mesh_string_property_new(struct Mesh *me, struct bContext *C, const char *name)
static PointerRNA rna_Mesh_string_property_new(struct Mesh *me, struct bContext *C, const char *name)
{
PointerRNA ptr;
CustomDataLayer *cdl = NULL;
int index;
@ -1179,20 +1188,24 @@ static CustomDataLayer *rna_Mesh_string_property_new(struct Mesh *me, struct bCo
cdl = (index == -1) ? NULL : &(me->fdata.layers[index]);
return cdl;
RNA_pointer_create(&me->id, &RNA_MeshStringPropertyLayer, cdl, &ptr);
return ptr;
}
static CustomDataLayer *rna_Mesh_uv_texture_new(struct Mesh *me, struct bContext *C, const char *name)
static PointerRNA rna_Mesh_uv_texture_new(struct Mesh *me, struct bContext *C, const char *name)
{
CustomData *pdata = rna_mesh_pdata_helper(me);
PointerRNA ptr;
CustomData *pdata;
CustomDataLayer *cdl= NULL;
int index;
int index = ED_mesh_uv_texture_add(C, me, name, FALSE);
if(ED_mesh_uv_texture_add(C, me, name, FALSE)) {
index= CustomData_get_named_layer_index(pdata, CD_MTEXPOLY, name);
cdl= (index == -1)? NULL: &pdata->layers[index];
if(index != -1) {
pdata= rna_mesh_pdata_helper(me);
cdl= &pdata->layers[CustomData_get_layer_index_n(pdata, CD_MTEXPOLY, index)];
}
return cdl;
RNA_pointer_create(&me->id, &RNA_MeshTexturePolyLayer, cdl, &ptr);
return ptr;
}
#else
@ -2007,7 +2020,7 @@ static void rna_def_mesh_faces(BlenderRNA *brna, PropertyRNA *cprop)
PropertyRNA *prop;
FunctionRNA *func;
PropertyRNA *parm;
// PropertyRNA *parm;
RNA_def_property_srna(cprop, "MeshFaces");
srna= RNA_def_struct(brna, "MeshFaces", NULL);
@ -2123,6 +2136,7 @@ static void rna_def_loop_colors(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_ui_description(func, "Add a vertex color layer to Mesh");
RNA_def_string(func, "name", "Col", 0, "", "Vertex color name");
parm= RNA_def_pointer(func, "layer", "MeshLoopColorLayer", "", "The newly created layer");
RNA_def_property_flag(parm, PROP_RNAPTR);
RNA_def_function_return(func, parm);
/*
@ -2189,6 +2203,7 @@ static void rna_def_int_layers(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_ui_description(func, "Add a integer property layer to Mesh");
RNA_def_string(func, "name", "Int Prop", 0, "", "Int property name");
parm= RNA_def_pointer(func, "layer", "MeshIntPropertyLayer", "", "The newly created layer");
RNA_def_property_flag(parm, PROP_RNAPTR);
RNA_def_function_return(func, parm);
}
@ -2210,6 +2225,7 @@ static void rna_def_float_layers(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_ui_description(func, "Add a float property layer to Mesh");
RNA_def_string(func, "name", "Float Prop", 0, "", "Float property name");
parm= RNA_def_pointer(func, "layer", "MeshFloatPropertyLayer", "", "The newly created layer");
RNA_def_property_flag(parm, PROP_RNAPTR);
RNA_def_function_return(func, parm);
}
@ -2231,6 +2247,7 @@ static void rna_def_string_layers(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_ui_description(func, "Add a string property layer to Mesh");
RNA_def_string(func, "name", "String Prop", 0, "", "String property name");
parm= RNA_def_pointer(func, "layer", "MeshStringPropertyLayer", "", "The newly created layer");
RNA_def_property_flag(parm, PROP_RNAPTR);
RNA_def_function_return(func, parm);
}
@ -2279,6 +2296,7 @@ static void rna_def_uv_textures(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_ui_description(func, "Add a UV map layer to Mesh");
RNA_def_string(func, "name", "UVMap", 0, "", "UV map name");
parm= RNA_def_pointer(func, "layer", "MeshTexturePolyLayer", "", "The newly created layer");
RNA_def_property_flag(parm, PROP_RNAPTR);
RNA_def_function_return(func, parm);
/*

@ -87,24 +87,36 @@ static void rna_def_movieclip_proxy(BlenderRNA *brna)
/* build proxy sized */
prop= RNA_def_property(srna, "build_25", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "build_size_flag", IMB_PROXY_25);
RNA_def_property_boolean_sdna(prop, NULL, "build_size_flag", MCLIP_PROXY_SIZE_25);
RNA_def_property_ui_text(prop, "25%", "Build proxy resolution 25% of the original footage dimension");
prop= RNA_def_property(srna, "build_50", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "build_size_flag", IMB_PROXY_50);
RNA_def_property_boolean_sdna(prop, NULL, "build_size_flag", MCLIP_PROXY_SIZE_50);
RNA_def_property_ui_text(prop, "50%", "Build proxy resolution 50% of the original footage dimension");
prop= RNA_def_property(srna, "build_75", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "build_size_flag", IMB_PROXY_75);
RNA_def_property_boolean_sdna(prop, NULL, "build_size_flag", MCLIP_PROXY_SIZE_75);
RNA_def_property_ui_text(prop, "75%", "Build proxy resolution 75% of the original footage dimension");
prop= RNA_def_property(srna, "build_100", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "build_size_flag", IMB_PROXY_100);
RNA_def_property_boolean_sdna(prop, NULL, "build_size_flag", MCLIP_PROXY_SIZE_100);
RNA_def_property_ui_text(prop, "100%", "Build proxy resolution 100% of the original footage dimension");
prop= RNA_def_property(srna, "build_undistorted", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "build_flag", MCLIP_PROXY_BUILD_UNDISTORT);
RNA_def_property_ui_text(prop, "Build Undistorted", "Also build undistorted proxies for selected sizes");
prop= RNA_def_property(srna, "build_undistorted_25", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "build_size_flag", MCLIP_PROXY_UNDISTORTED_SIZE_25);
RNA_def_property_ui_text(prop, "25%", "Build proxy resolution 25% of the original undistorted footage dimension");
prop= RNA_def_property(srna, "build_undistorted_50", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "build_size_flag", MCLIP_PROXY_UNDISTORTED_SIZE_50);
RNA_def_property_ui_text(prop, "50%", "Build proxy resolution 50% of the original undistorted footage dimension");
prop= RNA_def_property(srna, "build_undistorted_75", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "build_size_flag", MCLIP_PROXY_UNDISTORTED_SIZE_75);
RNA_def_property_ui_text(prop, "75%", "Build proxy resolution 75% of the original undistorted footage dimension");
prop= RNA_def_property(srna, "build_undistorted_100", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "build_size_flag", MCLIP_PROXY_UNDISTORTED_SIZE_100);
RNA_def_property_ui_text(prop, "100%", "Build proxy resolution 100% of the original undistorted footage dimension");
/* build timecodes */
prop= RNA_def_property(srna, "build_record_run", PROP_BOOLEAN, PROP_NONE);

@ -3393,12 +3393,14 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_motion_blur", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_MBLUR);
RNA_def_property_ui_text(prop, "Motion Blur", "Use multi-sampled 3D scene motion blur");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "motion_blur_samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "mblur_samples");
RNA_def_property_range(prop, 1, 32);
RNA_def_property_ui_text(prop, "Motion Samples", "Number of scene samples to take with motion blur");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
prop= RNA_def_property(srna, "motion_blur_shutter", PROP_FLOAT, PROP_NONE);

@ -475,6 +475,9 @@ static DerivedMesh *fluidsim_read_cache(Object *ob, DerivedMesh *orgdm, Fluidsim
break;
}
/* offset baked frame */
curFrame += fss->frameOffset;
BLI_path_abs(targetFile, modifier_path_relbase(ob));
BLI_path_frame(targetFile, curFrame, 0); // fixed #frame-no