Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-09-23 17:04:01 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-09-23 17:04:01 +0400
commit9494340dae7dd5e3ee070d8e550596a440648870 (patch)
treee73e1b3ede7373db7b8e26db687941b4669b9244 /source
parent74e21161e327a0f91ecef0f8dd1bce65c9e2ef4b (diff)
parenta7891da84bfad1f0cd0f3fc825e7f4dedf469a00 (diff)
svn merge ^/trunk/blender -r40432:40491
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenfont/intern/blf_font.c3
-rw-r--r--source/blender/blenkernel/intern/blender.c2
-rw-r--r--source/blender/blenkernel/intern/cdderivedmesh.c10
-rw-r--r--source/blender/blenkernel/intern/key.c2
-rw-r--r--source/blender/blenkernel/intern/multires.c2
-rw-r--r--source/blender/blenloader/intern/readfile.c3
-rw-r--r--source/blender/blenloader/intern/writefile.c2
-rw-r--r--source/blender/bmesh/operators/extrudeops.c2
-rw-r--r--source/blender/collada/DocumentImporter.cpp2
-rw-r--r--source/blender/editors/armature/armature_ops.c3
-rw-r--r--source/blender/editors/armature/editarmature.c2
-rw-r--r--source/blender/editors/curve/editcurve.c22
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c2
-rw-r--r--source/blender/editors/interface/interface.c10
-rw-r--r--source/blender/editors/object/object_edit.c2
-rw-r--r--source/blender/editors/object/object_ops.c3
-rw-r--r--source/blender/editors/object/object_vgroup.c30
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c4
-rw-r--r--source/blender/editors/space_action/action_draw.c2
-rw-r--r--source/blender/editors/space_action/action_ops.c1
-rw-r--r--source/blender/editors/space_file/file_ops.c4
-rw-r--r--source/blender/editors/space_graph/graph_ops.c1
-rw-r--r--source/blender/editors/space_node/node_edit.c13
-rw-r--r--source/blender/editors/space_node/node_header.c2
-rw-r--r--source/blender/editors/space_node/node_ops.c5
-rw-r--r--source/blender/editors/space_node/space_node.c3
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c7
-rw-r--r--source/blender/editors/space_text/text_draw.c7
-rw-r--r--source/blender/editors/space_view3d/drawobject.c57
-rw-r--r--source/blender/editors/space_view3d/view3d_header.c4
-rw-r--r--source/blender/editors/transform/transform.c5
-rw-r--r--source/blender/editors/transform/transform_conversions.c2
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c2
-rw-r--r--source/blender/gpu/intern/gpu_material.c9
-rw-r--r--source/blender/imbuf/intern/jpeg.c6
-rw-r--r--source/blender/makesrna/intern/rna_action.c2
-rw-r--r--source/blender/makesrna/intern/rna_actuator.c10
-rw-r--r--source/blender/makesrna/intern/rna_define.c19
-rw-r--r--source/blender/makesrna/intern/rna_material.c94
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c2
-rw-r--r--source/blender/modifiers/intern/MOD_navmesh.c6
-rw-r--r--source/blender/modifiers/intern/MOD_solidify.c10
-rw-r--r--source/blender/modifiers/intern/MOD_warp.c4
-rw-r--r--source/blender/modifiers/intern/MOD_weightvg_util.c7
-rw-r--r--source/blender/modifiers/intern/MOD_weightvg_util.h2
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgedit.c7
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgmix.c7
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgproximity.c7
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_lummaMatte.c2
-rw-r--r--source/blender/python/SConscript6
-rw-r--r--source/blender/python/generic/CMakeLists.txt4
-rw-r--r--source/blender/python/generic/blf_py_api.c45
-rw-r--r--source/blender/render/intern/source/pixelshading.c3
-rw-r--r--source/blender/render/intern/source/render_texture.c14
-rw-r--r--source/blender/render/intern/source/shadeinput.c2
-rw-r--r--source/blender/render/intern/source/shadeoutput.c6
-rw-r--r--source/blender/render/intern/source/voxeldata.c2
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c2
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c14
-rw-r--r--source/blender/windowmanager/intern/wm_window.c10
60 files changed, 297 insertions, 226 deletions
diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c
index 26af3a3fd4f..851c6542de0 100644
--- a/source/blender/blenfont/intern/blf_font.c
+++ b/source/blender/blenfont/intern/blf_font.c
@@ -529,6 +529,9 @@ FontBLF *blf_font_new(const char *name, const char *filename)
mfile= blf_dir_metrics_search(filename);
if (mfile) {
err= FT_Attach_File(font->face, mfile);
+ if(err) {
+ fprintf(stderr, "FT_Attach_File failed to load '%s' with error %d\n", filename, (int)err);
+ }
MEM_freeN(mfile);
}
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index 286e40faf71..22278fe29ba 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -318,6 +318,8 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filepath
set_scene_bg(G.main, CTX_data_scene(C));
MEM_freeN(bfd);
+
+ (void)curscene; /* quiet warning */
}
static int handle_subversion_warning(Main *main, ReportList *reports)
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index 12841d15938..0f29c24145d 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -1014,9 +1014,13 @@ static void cdDM_drawMappedFaces(DerivedMesh *dm, int (*setDrawOptions)(void *us
if(!flush && compareDrawOptions) {
int next_orig= (index==NULL) ? next_actualFace : index[next_actualFace];
- /* also compare draw options and flush buffer if they're different
- need for face selection highlight in edit mode */
- flush|= compareDrawOptions(userData, orig, next_orig) == 0;
+ if(orig==ORIGINDEX_NONE || next_orig==ORIGINDEX_NONE) {
+ flush= 1;
+ } else {
+ /* also compare draw options and flush buffer if they're different
+ need for face selection highlight in edit mode */
+ flush|= compareDrawOptions(userData, orig, next_orig) == 0;
+ }
}
if(flush) {
diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c
index dd3a279a5ee..7d0525dc903 100644
--- a/source/blender/blenkernel/intern/key.c
+++ b/source/blender/blenkernel/intern/key.c
@@ -853,7 +853,7 @@ static void do_key(const int start, int end, const int tot, char *poin, Key *key
int a, ofs[32], *ofsp;
int flagdo= 15, flagflo=0, elemsize, poinsize=0;
char *k1, *k2, *k3, *k4, *freek1, *freek2, *freek3, *freek4;
- char *cp, elemstr[8];;
+ char *cp, elemstr[8];
/* currently always 0, in future key_pointer_size may assign */
ofs[1]= 0;
diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c
index b67969f9b38..5df07246b73 100644
--- a/source/blender/blenkernel/intern/multires.c
+++ b/source/blender/blenkernel/intern/multires.c
@@ -1574,7 +1574,7 @@ static void multires_load_old_dm(DerivedMesh *dm, Mesh *me, int totlvl)
}
/* Interior face verts */
- lvl = lvl1->next->next;
+ /* lvl = lvl1->next->next; */ /* UNUSED */
dst = 0;
for(j = 0; j < lvl1->totface; ++j) {
int sides = lvl1->faces[j].v[3] ? 4 : 3;
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index fe91a7626ad..fcb05bf2eef 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -3021,6 +3021,9 @@ static void direct_link_texture(FileData *fd, Tex *tex)
if(tex->vd) {
tex->vd->dataset = NULL;
tex->vd->ok = 0;
+ } else {
+ if(tex->type == TEX_VOXELDATA)
+ tex->vd= MEM_callocN(sizeof(VoxelData), "direct_link_texture VoxelData");
}
tex->nodetree= newdataadr(fd, tex->nodetree);
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 2b0e4ddf024..992bf05679b 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -1789,7 +1789,7 @@ static void write_textures(WriteData *wd, ListBase *idbase)
if(tex->pd->coba) writestruct(wd, DATA, "ColorBand", 1, tex->pd->coba);
if(tex->pd->falloff_curve) write_curvemapping(wd, tex->pd->falloff_curve);
}
- if(tex->type == TEX_VOXELDATA && tex->vd) writestruct(wd, DATA, "VoxelData", 1, tex->vd);
+ if(tex->type == TEX_VOXELDATA) writestruct(wd, DATA, "VoxelData", 1, tex->vd);
/* nodetree is integral part of texture, no libdata */
if(tex->nodetree) {
diff --git a/source/blender/bmesh/operators/extrudeops.c b/source/blender/bmesh/operators/extrudeops.c
index 31467c893eb..805935a3100 100644
--- a/source/blender/bmesh/operators/extrudeops.c
+++ b/source/blender/bmesh/operators/extrudeops.c
@@ -452,7 +452,7 @@ static void solidify_add_thickness(BMesh *bm, float dist)
BLI_array_growone(angles);
}
- angle_poly_v3(angles, verts, f->len);
+ angle_poly_v3(angles, (const float **)verts, f->len);
i = 0;
BM_ITER(l, &loopIter, bm, BM_LOOPS_OF_FACE, f) {
diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp
index 2387c9a1465..e98f551a097 100644
--- a/source/blender/collada/DocumentImporter.cpp
+++ b/source/blender/collada/DocumentImporter.cpp
@@ -816,7 +816,7 @@ bool DocumentImporter::writeCamera( const COLLADAFW::Camera* camera )
double aspect = camera->getAspectRatio().getValue();
double xfov = aspect*yfov;
// xfov is in degrees, cam->lens is in millimiters
- cam->lens = angle_to_lens(DEG2RADF(xfov));;
+ cam->lens = angle_to_lens(DEG2RADF(xfov));
}
break;
}
diff --git a/source/blender/editors/armature/armature_ops.c b/source/blender/editors/armature/armature_ops.c
index 81ece9ddc9a..d559aef6fe2 100644
--- a/source/blender/editors/armature/armature_ops.c
+++ b/source/blender/editors/armature/armature_ops.c
@@ -173,6 +173,7 @@ void ED_operatormacros_armature(void)
ot= WM_operatortype_append_macro("ARMATURE_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
if(ot) {
+ ot->description= "Make copies of the selected bones within the same armature and move them";
WM_operatortype_macro_define(ot, "ARMATURE_OT_duplicate");
otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", 0);
@@ -180,6 +181,7 @@ void ED_operatormacros_armature(void)
ot= WM_operatortype_append_macro("ARMATURE_OT_extrude_move", "Extrude", OPTYPE_UNDO|OPTYPE_REGISTER);
if(ot) {
+ ot->description= "Create new bones from the selected joints and move them";
otmacro=WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude");
RNA_boolean_set(otmacro->ptr, "forked", 0);
otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
@@ -190,6 +192,7 @@ void ED_operatormacros_armature(void)
// that would require fixing a properties bug 19733
ot= WM_operatortype_append_macro("ARMATURE_OT_extrude_forked", "Extrude Forked", OPTYPE_UNDO|OPTYPE_REGISTER);
if(ot) {
+ ot->description= "Create new bones from the selected joints and move them";
otmacro=WM_operatortype_macro_define(ot, "ARMATURE_OT_extrude");
RNA_boolean_set(otmacro->ptr, "forked", 1);
otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index d8dfec82e15..d687b0689ff 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -4298,7 +4298,7 @@ int ED_do_pose_selectbuffer(Scene *scene, Base *base, unsigned int *buffer, shor
* note, special exception for armature mode so we can do multi-select
* we could check for multi-select explicitly but think its fine to
* always give pradictable behavior in weight paint mode - campbell */
- if (!(extend) || ((ob_act && ob_act->mode & OB_MODE_WEIGHT_PAINT) == 0)) {
+ if (!extend || ((ob_act && (ob_act != ob) && (ob_act->mode & OB_MODE_WEIGHT_PAINT)==0))) {
ED_pose_deselectall(ob, 0);
nearBone->flag |= (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
arm->act_bone= nearBone;
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index e873238b658..8c0424bd583 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -2376,7 +2376,7 @@ static void select_adjacent_cp(ListBase *editnurb, short next, short cont, short
BezTriple *bezt;
BPoint *bp;
int a;
- short lastsel= 0, sel=0;
+ short lastsel= 0;
if(next==0) return;
@@ -2388,13 +2388,12 @@ static void select_adjacent_cp(ListBase *editnurb, short next, short cont, short
if(next < 0) bezt= (nu->bezt + (a-1));
while(a--) {
if(a-abs(next) < 0) break;
- sel= 0;
if((lastsel==0) && (bezt->hide==0) && ((bezt->f2 & SELECT) || (selstatus==0))) {
bezt+=next;
if(!(bezt->f2 & SELECT) || (selstatus==0)) {
- sel= select_beztriple(bezt, selstatus, 1, VISIBLE);
+ short sel= select_beztriple(bezt, selstatus, 1, VISIBLE);
if((sel==1) && (cont==0)) lastsel= 1;
- }
+ }
}
else {
bezt+=next;
@@ -2410,11 +2409,10 @@ static void select_adjacent_cp(ListBase *editnurb, short next, short cont, short
if(next < 0) bp= (nu->bp + (a-1));
while(a--) {
if(a-abs(next) < 0) break;
- sel=0;
if((lastsel==0) && (bp->hide==0) && ((bp->f1 & SELECT) || (selstatus==0))) {
bp+=next;
if(!(bp->f1 & SELECT) || (selstatus==0)) {
- sel= select_bpoint(bp, selstatus, 1, VISIBLE);
+ short sel= select_bpoint(bp, selstatus, 1, VISIBLE);
if((sel==1) && (cont==0)) lastsel= 1;
}
}
@@ -2443,7 +2441,6 @@ void selectend_nurb(Object *obedit, short selfirst, short doswap, short selstatu
BezTriple *bezt;
Curve *cu;
int a;
- short sel;
if(obedit==NULL) return;
@@ -2451,7 +2448,6 @@ void selectend_nurb(Object *obedit, short selfirst, short doswap, short selstatu
cu->lastsel= NULL;
for(nu= editnurb->first; nu; nu= nu->next) {
- sel= 0;
if(nu->type == CU_BEZIER) {
a= nu->pntsu;
@@ -2464,6 +2460,7 @@ void selectend_nurb(Object *obedit, short selfirst, short doswap, short selstatu
}
while(a--) {
+ short sel;
if(doswap) sel= swap_selection_beztriple(bezt);
else sel= select_beztriple(bezt, selstatus, 1, VISIBLE);
@@ -2483,6 +2480,7 @@ void selectend_nurb(Object *obedit, short selfirst, short doswap, short selstatu
while(a--) {
if (bp->hide == 0) {
+ short sel;
if(doswap) sel= swap_selection_bpoint(bp);
else sel= select_bpoint(bp, selstatus, 1, VISIBLE);
@@ -5779,6 +5777,7 @@ static int delete_exec(bContext *C, wmOperator *op)
clamp_nurb_order_u(nu);
}*/
}
+ clamp_nurb_order_u(nu);
nurbs_knot_calc_u(nu);
}
nu= next;
@@ -5927,7 +5926,14 @@ static int delete_exec(bContext *C, wmOperator *op)
MEM_freeN(nu1->bp);
nu1->bp= bp;
nu1->pntsu= a;
+ nu1->knotsu= NULL;
nu->pntsu= cut+1;
+
+ clamp_nurb_order_u(nu);
+ nurbs_knot_calc_u(nu);
+
+ clamp_nurb_order_u(nu1);
+ nurbs_knot_calc_u(nu1);
}
}
}
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 6192fc4c188..4ec90d210ad 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -1477,7 +1477,7 @@ static void gpencil_draw_apply (wmOperator *op, tGPsdata *p)
/* start a new stroke, starting from previous point */
gp_stroke_addpoint(p, p->mvalo, p->opressure);
- ok= gp_stroke_addpoint(p, p->mval, p->pressure);
+ gp_stroke_addpoint(p, p->mval, p->pressure);
}
else if (ok == GP_STROKEADD_INVALID) {
/* the painting operation cannot continue... */
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 7dac8c6351a..32fe0fb86f9 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -1935,6 +1935,9 @@ void uiFreeBlock(const bContext *C, uiBlock *block)
ui_free_but(C, but);
}
+ if(block->unit)
+ MEM_freeN(block->unit);
+
if(block->func_argN)
MEM_freeN(block->func_argN);
@@ -2010,10 +2013,15 @@ uiBlock *uiBeginBlock(const bContext *C, ARegion *region, const char *name, shor
block->active= 1;
block->dt= dt;
block->evil_C= (void*)C; // XXX
+
if (scn) {
block->color_profile= (scn->r.color_mgt_flag & R_COLOR_MANAGEMENT);
- block->unit= &scn->unit;
+
+ /* copy to avoid crash when scene gets deleted with ui still open */
+ block->unit= MEM_mallocN(sizeof(scn->unit), "UI UnitSettings");
+ memcpy(block->unit, &scn->unit, sizeof(scn->unit));
}
+
BLI_strncpy(block->name, name, sizeof(block->name));
if(region)
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index be44277c9d1..54a33804b06 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -801,7 +801,7 @@ static void UNUSED_FUNCTION(special_editmenu)(Scene *scene, View3D *v3d)
Object *par= modifiers_isDeformedByArmature(ob);
if(par && (par->mode & OB_MODE_POSE)) {
- nr= pupmenu("Specials%t|Apply Bone Envelopes to Vertex Groups %x1|Apply Bone Heat Weights to Vertex Groups %x2");
+// XXX nr= pupmenu("Specials%t|Apply Bone Envelopes to Vertex Groups %x1|Apply Bone Heat Weights to Vertex Groups %x2");
// XXX if(nr==1 || nr==2)
// XXX pose_adds_vgroups(ob, (nr == 2));
diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c
index 3f5434352a7..f115642cf8e 100644
--- a/source/blender/editors/object/object_ops.c
+++ b/source/blender/editors/object/object_ops.c
@@ -231,6 +231,7 @@ void ED_operatormacros_object(void)
ot= WM_operatortype_append_macro("OBJECT_OT_duplicate_move", "Duplicate Objects", OPTYPE_UNDO|OPTYPE_REGISTER);
if(ot) {
+ ot->description = "Duplicate selected objects and move them";
WM_operatortype_macro_define(ot, "OBJECT_OT_duplicate");
otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
RNA_enum_set(otmacro->ptr, "proportional", PROP_EDIT_OFF);
@@ -239,6 +240,7 @@ void ED_operatormacros_object(void)
/* grr, should be able to pass options on... */
ot= WM_operatortype_append_macro("OBJECT_OT_duplicate_move_linked", "Duplicate Linked", OPTYPE_UNDO|OPTYPE_REGISTER);
if(ot) {
+ ot->description = "Duplicate selected objects and move them";
otmacro= WM_operatortype_macro_define(ot, "OBJECT_OT_duplicate");
RNA_boolean_set(otmacro->ptr, "linked", 1);
otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
@@ -248,6 +250,7 @@ void ED_operatormacros_object(void)
/* XXX */
ot= WM_operatortype_append_macro("OBJECT_OT_add_named_cursor", "Add named object at cursor", OPTYPE_UNDO|OPTYPE_REGISTER);
if(ot) {
+ ot->description = "Add named object at cursor";
RNA_def_string(ot->srna, "name", "Cube", 24, "Name", "Object name to add");
WM_operatortype_macro_define(ot, "VIEW3D_OT_cursor3d");
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index 8c7ffb33984..5aff7edd6d0 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -957,10 +957,8 @@ static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, in
wasChange = FALSE;
dm = dm_deform_recalc(scene, ob);
dm->getVert(dm, index, &m);
- oldPos[0] = m.co[0];
- oldPos[1] = m.co[1];
- oldPos[2] = m.co[2];
- distToStart = norm[0]*oldPos[0] + norm[1]*oldPos[1] + norm[2]*oldPos[2] + d;
+ copy_v3_v3(oldPos, m.co);
+ distToStart = dot_v3v3(norm, oldPos) + d;
if(distToBe == originalDistToBe) {
distToBe += distToStart - distToStart*strength;
@@ -1125,18 +1123,14 @@ static void vgroup_fix(Scene *scene, Object *ob, float distToBe, float strength,
if(count >= 3) {
float d /*, dist */ /* UNUSED */, mag;
- float coord[3] = {0};
- float norm[3] = {0};
+ float coord[3];
+ float norm[3];
getSingleCoordinate(p, count, coord);
dm->getVert(dm, i, &m);
- norm[0] = m.co[0]-coord[0];
- norm[1] = m.co[1]-coord[1];
- norm[2] = m.co[2]-coord[2];
- mag = sqrt(norm[0]*norm[0] + norm[1]*norm[1] + norm[2]*norm[2]);
- if(mag) {// zeros fix
- mul_v3_fl(norm, 1.0f/mag);
-
- d = -norm[0]*coord[0] -norm[1]*coord[1] -norm[2]*coord[2];
+ sub_v3_v3v3(norm, m.co, coord);
+ mag= normalize_v3(norm);
+ if(mag) { /* zeros fix */
+ d = -dot_v3v3(norm, coord);
/* dist = (norm[0]*m.co[0] + norm[1]*m.co[1] + norm[2]*m.co[2] + d); */ /* UNUSED */
moveCloserToDistanceFromPlane(scene, ob, me, i, norm, coord, d, distToBe, strength, cp);
}
@@ -2367,7 +2361,7 @@ void OBJECT_OT_vertex_group_fix(wmOperatorType *ot)
/* identifiers */
ot->name= "Fix Vertex Group Deform";
ot->idname= "OBJECT_OT_vertex_group_fix";
- ot->description= "Modify the position of selected vertices by changing only their respective groups' weights (this tool may be slow for many vertices).";
+ ot->description= "Modify the position of selected vertices by changing only their respective groups' weights (this tool may be slow for many vertices)";
/* api callbacks */
ot->poll= vertex_group_poll;
@@ -2375,9 +2369,9 @@ void OBJECT_OT_vertex_group_fix(wmOperatorType *ot)
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
- RNA_def_float(ot->srna, "dist", 0.0f, -FLT_MAX, FLT_MAX, "Distance", "The distance to move to.", -10.0f, 10.0f);
- RNA_def_float(ot->srna, "strength", 1.f, -2.0f, FLT_MAX, "Strength", "The distance moved can be changed by this multiplier.", -2.0f, 2.0f);
- RNA_def_float(ot->srna, "accuracy", 1.0f, 0.05f, FLT_MAX, "Change Sensitivity", "Changes the amount weights are altered with each iteration: lower values are slower.", 0.05f, 1.f);
+ RNA_def_float(ot->srna, "dist", 0.0f, -FLT_MAX, FLT_MAX, "Distance", "The distance to move to", -10.0f, 10.0f);
+ RNA_def_float(ot->srna, "strength", 1.f, -2.0f, FLT_MAX, "Strength", "The distance moved can be changed by this multiplier", -2.0f, 2.0f);
+ RNA_def_float(ot->srna, "accuracy", 1.0f, 0.05f, FLT_MAX, "Change Sensitivity", "Changes the amount weights are altered with each iteration: lower values are slower", 0.05f, 1.f);
}
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 7595a6a7683..512fa781fc2 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -503,13 +503,11 @@ static float integrate_overlap(Brush* br)
int i;
int m= 10;
float g = 1.0f/m;
- float overlap;
float max;
- overlap= 0;
max= 0;
for(i= 0; i < m; i++) {
- overlap = overlapped_curve(br, i*g);
+ float overlap= overlapped_curve(br, i*g);
if (overlap > max)
max = overlap;
diff --git a/source/blender/editors/space_action/action_draw.c b/source/blender/editors/space_action/action_draw.c
index f541423e69d..619e76e9e50 100644
--- a/source/blender/editors/space_action/action_draw.c
+++ b/source/blender/editors/space_action/action_draw.c
@@ -189,7 +189,7 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
/* if in NLA there's a strip active, map the view */
if (ac->datatype == ANIMCONT_ACTION) {
- adt= ANIM_nla_mapping_get(ac, NULL);
+ /* adt= ANIM_nla_mapping_get(ac, NULL); */ /* UNUSED */
/* start and end of action itself */
calc_action_range(ac->data, &act_start, &act_end, 0);
diff --git a/source/blender/editors/space_action/action_ops.c b/source/blender/editors/space_action/action_ops.c
index 491d436741e..c3af3521918 100644
--- a/source/blender/editors/space_action/action_ops.c
+++ b/source/blender/editors/space_action/action_ops.c
@@ -94,6 +94,7 @@ void ED_operatormacros_action(void)
ot= WM_operatortype_append_macro("ACTION_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
if (ot) {
+ ot->description= "Make a copy of all selected keyframes and move them";
WM_operatortype_macro_define(ot, "ACTION_OT_duplicate");
otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_transform");
RNA_enum_set(otmacro->ptr, "mode", TFM_TIME_DUPLICATE);
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index e61d7693d19..fd52c3c4199 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -749,7 +749,9 @@ int file_exec(bContext *C, wmOperator *exec_op)
file_sfile_to_operator(op, sfile, filepath);
- fsmenu_insert_entry(fsmenu_get(), FS_CATEGORY_RECENT, sfile->params->dir,0, 1);
+ if (BLI_exist(sfile->params->dir))
+ fsmenu_insert_entry(fsmenu_get(), FS_CATEGORY_RECENT, sfile->params->dir, 0, 1);
+
BLI_make_file_string(G.main->name, filepath, BLI_get_folder_create(BLENDER_USER_CONFIG, NULL), BLENDER_BOOKMARK_FILE);
fsmenu_write_file(fsmenu_get(), filepath);
WM_event_fileselect_event(C, op, EVT_FILESELECT_EXEC);
diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c
index 46918407447..fb148a73ed2 100644
--- a/source/blender/editors/space_graph/graph_ops.c
+++ b/source/blender/editors/space_graph/graph_ops.c
@@ -277,6 +277,7 @@ void ED_operatormacros_graph(void)
ot= WM_operatortype_append_macro("GRAPH_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
if (ot) {
+ ot->description= "Make a copy of all selected keyframes and move them";
WM_operatortype_macro_define(ot, "GRAPH_OT_duplicate");
otmacro= WM_operatortype_macro_define(ot, "TRANSFORM_OT_transform");
RNA_enum_set(otmacro->ptr, "mode", TFM_TIME_DUPLICATE);
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 7cb8351cd12..916e59eae9c 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -1805,7 +1805,7 @@ void NODE_OT_link_viewer(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Link to Viewer Node";
- ot->description = "Link to Viewer Node";
+ ot->description = "Link to viewer node";
ot->idname= "NODE_OT_link_viewer";
/* api callbacks */
@@ -2275,7 +2275,7 @@ void NODE_OT_duplicate(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Duplicate Nodes";
- ot->description = "Duplicate the nodes";
+ ot->description = "Duplicate selected nodes";
ot->idname= "NODE_OT_duplicate";
/* api callbacks */
@@ -2903,12 +2903,13 @@ static int node_read_fullsamplelayers_exec(bContext *C, wmOperator *UNUSED(op))
Render *re= RE_NewRender(curscene->id.name);
WM_cursor_wait(1);
-
RE_MergeFullSample(re, bmain, curscene, snode->nodetree);
- snode_notify(C, snode);
- snode_dag_update(C, snode);
-
WM_cursor_wait(0);
+
+ /* note we are careful to send the right notifier, as otherwise the
+ compositor would reexecute and overwrite the full sample result */
+ WM_event_add_notifier(C, NC_SCENE|ND_COMPO_RESULT, NULL);
+
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/space_node/node_header.c b/source/blender/editors/space_node/node_header.c
index 996e05afdef..205dd6bb639 100644
--- a/source/blender/editors/space_node/node_header.c
+++ b/source/blender/editors/space_node/node_header.c
@@ -93,7 +93,7 @@ static void do_node_add(bContext *C, bNodeTemplate *ntemp)
else node->flag &= ~NODE_TEST;
}
- node= node_add_node(snode, bmain, scene, ntemp, snode->mx, snode->my);
+ /* node= */ node_add_node(snode, bmain, scene, ntemp, snode->mx, snode->my);
/* select previous selection before autoconnect */
for(node= snode->edittree->nodes.first; node; node= node->next) {
diff --git a/source/blender/editors/space_node/node_ops.c b/source/blender/editors/space_node/node_ops.c
index 153d703ddf6..87f98f2bb8d 100644
--- a/source/blender/editors/space_node/node_ops.c
+++ b/source/blender/editors/space_node/node_ops.c
@@ -106,19 +106,22 @@ void ED_operatormacros_node(void)
wmOperatorTypeMacro *mot;
ot= WM_operatortype_append_macro("NODE_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
+ ot->description = "Duplicate selected nodes and move them";
WM_operatortype_macro_define(ot, "NODE_OT_duplicate");
WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
/* modified operator call for duplicating with input links */
ot= WM_operatortype_append_macro("NODE_OT_duplicate_move_keep_inputs", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
+ ot->description = "Duplicate selected nodes keeping input links and move them";
mot = WM_operatortype_macro_define(ot, "NODE_OT_duplicate");
RNA_boolean_set(mot->ptr, "keep_inputs", 1);
WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
ot= WM_operatortype_append_macro("NODE_OT_select_link_viewer", "Link Viewer", OPTYPE_UNDO);
+ ot->description = "Select node and link it to a viewer node";
WM_operatortype_macro_define(ot, "NODE_OT_select");
WM_operatortype_macro_define(ot, "NODE_OT_link_viewer");
- }
+}
void node_keymap(struct wmKeyConfig *keyconf)
{
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index 0990afa4fe6..9c4581a43da 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -178,6 +178,9 @@ static void node_area_listener(ScrArea *sa, wmNotifier *wmn)
case ND_FRAME:
ED_area_tag_refresh(sa);
break;
+ case ND_COMPO_RESULT:
+ ED_area_tag_redraw(sa);
+ break;
case ND_TRANSFORM_DONE:
if(type==NTREE_COMPOSIT) {
if(snode->flag & SNODE_AUTO_RENDER) {
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index 9fe0ed0543f..dda103b971b 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -1544,8 +1544,9 @@ void outliner_build_tree(Main *mainvar, Scene *scene, SpaceOops *soops)
while(seq) {
op= need_add_seq_dup(seq);
- if(op==1)
- ten= outliner_add_element(soops, &soops->tree, (void*)seq, NULL, TSE_SEQUENCE, 0);
+ if(op==1) {
+ /* ten= */ outliner_add_element(soops, &soops->tree, (void*)seq, NULL, TSE_SEQUENCE, 0);
+ }
else if(op==0) {
ten= outliner_add_element(soops, &soops->tree, (void*)seq, NULL, TSE_SEQUENCE_DUP, 0);
outliner_add_seq_dup(soops, seq, ten, 0);
@@ -1582,7 +1583,7 @@ void outliner_build_tree(Main *mainvar, Scene *scene, SpaceOops *soops)
wmKeyMap *km;
for(km= wm->defaultconf->keymaps.first; km; km= km->next) {
- ten= outliner_add_element(soops, &soops->tree, (void*)km, NULL, TSE_KEYMAP, 0);
+ /* ten= */ outliner_add_element(soops, &soops->tree, (void*)km, NULL, TSE_KEYMAP, 0);
}
}
else {
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c
index 685b15aed50..4c617115a3d 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -508,7 +508,7 @@ void wrap_offset(SpaceText *st, ARegion *ar, TextLine *linein, int cursin, int *
{
Text *text;
TextLine *linep;
- int i, j, start, end, chars, max, chop;
+ int i, j, start, end, max, chop;
char ch;
*offl= *offc= 0;
@@ -546,9 +546,9 @@ void wrap_offset(SpaceText *st, ARegion *ar, TextLine *linein, int cursin, int *
start= 0;
end= max;
chop= 1;
- chars= 0;
*offc= 0;
for(i=0, j=0; linep->line[j]!='\0'; j++) {
+ int chars;
/* Mimic replacement of tabs */
ch= linep->line[j];
@@ -557,8 +557,9 @@ void wrap_offset(SpaceText *st, ARegion *ar, TextLine *linein, int cursin, int *
if(linep==linein && i<cursin) cursin += chars-1;
ch= ' ';
}
- else
+ else {
chars= 1;
+ }
while(chars--) {
if(i-start>=max) {
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 40bd604692a..b224f99819b 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -5197,6 +5197,7 @@ static void drawspiral(const float cent[3], float rad, float tmat[][4], int star
const float tot_inv= (1.0f / (float)CIRCLE_RESOL);
int a;
char inverse= FALSE;
+ float x, y, fac;
if (start < 0) {
inverse = TRUE;
@@ -5206,38 +5207,56 @@ static void drawspiral(const float cent[3], float rad, float tmat[][4], int star
mul_v3_v3fl(vx, tmat[0], rad);
mul_v3_v3fl(vy, tmat[1], rad);
- copy_v3_v3(vec, cent);
+ glBegin(GL_LINE_STRIP);
if (inverse==0) {
+ copy_v3_v3(vec, cent);
+ glVertex3fv(vec);
+
for(a=0; a<CIRCLE_RESOL; a++) {
- if (a+start>31)
+ if (a+start>=CIRCLE_RESOL)
start=-a + 1;
- glBegin(GL_LINES);
- glVertex3fv(vec);
- vec[0]= cent[0] + sinval[a+start] * (vx[0] * (float)a * tot_inv) + cosval[a+start] * (vy[0] * (float)a * tot_inv);
- vec[1]= cent[1] + sinval[a+start] * (vx[1] * (float)a * tot_inv) + cosval[a+start] * (vy[1] * (float)a * tot_inv);
- vec[2]= cent[2] + sinval[a+start] * (vx[2] * (float)a * tot_inv) + cosval[a+start] * (vy[2] * (float)a * tot_inv);
+
+ fac= (float)a * tot_inv;
+ x= sinval[a+start] * fac;
+ y= cosval[a+start] * fac;
+
+ vec[0]= cent[0] + (x * vx[0] + y * vy[0]);
+ vec[1]= cent[1] + (x * vx[1] + y * vy[1]);
+ vec[2]= cent[2] + (x * vx[2] + y * vy[2]);
+
glVertex3fv(vec);
- glEnd();
}
}
else {
- a=0;
- vec[0]= cent[0] + sinval[a+start] * (vx[0] * (float)(-a+31) * tot_inv) + cosval[a+start] * (vy[0] * (float)(-a+31) * tot_inv);
- vec[1]= cent[1] + sinval[a+start] * (vx[1] * (float)(-a+31) * tot_inv) + cosval[a+start] * (vy[1] * (float)(-a+31) * tot_inv);
- vec[2]= cent[2] + sinval[a+start] * (vx[2] * (float)(-a+31) * tot_inv) + cosval[a+start] * (vy[2] * (float)(-a+31) * tot_inv);
+ a= 0;
+
+ fac= (float)(CIRCLE_RESOL-1) * tot_inv;
+ x= sinval[start] * fac;
+ y= cosval[start] * fac;
+
+ vec[0]= cent[0] + (x * vx[0] + y * vy[0]);
+ vec[1]= cent[1] + (x * vx[1] + y * vy[1]);
+ vec[2]= cent[2] + (x * vx[2] + y * vy[2]);
+
+ glVertex3fv(vec);
+
for(a=0; a<CIRCLE_RESOL; a++) {
- if (a+start>31)
+ if (a+start>=CIRCLE_RESOL)
start=-a + 1;
- glBegin(GL_LINES);
- glVertex3fv(vec);
- vec[0]= cent[0] + sinval[a+start] * (vx[0] * (float)(-a+31) * tot_inv) + cosval[a+start] * (vy[0] * (float)(-a+31) * tot_inv);
- vec[1]= cent[1] + sinval[a+start] * (vx[1] * (float)(-a+31) * tot_inv) + cosval[a+start] * (vy[1] * (float)(-a+31) * tot_inv);
- vec[2]= cent[2] + sinval[a+start] * (vx[2] * (float)(-a+31) * tot_inv) + cosval[a+start] * (vy[2] * (float)(-a+31) * tot_inv);
+
+ fac= (float)(-a+(CIRCLE_RESOL-1)) * tot_inv;
+ x= sinval[a+start] * fac;
+ y= cosval[a+start] * fac;
+
+ vec[0]= cent[0] + (x * vx[0] + y * vy[0]);
+ vec[1]= cent[1] + (x * vx[1] + y * vy[1]);
+ vec[2]= cent[2] + (x * vx[2] + y * vy[2]);
glVertex3fv(vec);
- glEnd();
}
}
+
+ glEnd();
}
/* draws a circle on x-z plane given the scaling of the circle, assuming that
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index eccaecaad2a..b0a77843421 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -286,13 +286,13 @@ static char *view3d_modeselect_pup(Scene *scene)
{
Object *ob= OBACT;
static char string[256];
- const char *title= N_("Mode: %%t");
+ const char *title= N_("Mode: %t");
char *str = string;
if(U.transopts&USER_TR_IFACE)
title= BLF_gettext(title);
- sprintf(str, title);
+ BLI_strncpy(str, title, sizeof(string));
str += modeselect_addmode(str, N_("Object Mode"), OB_MODE_OBJECT, ICON_OBJECT_DATA);
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index e0d3cd59ede..cda0dbe922d 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -3300,6 +3300,11 @@ int Trackball(TransInfo *t, const int UNUSED(mval[2]))
void initTranslation(TransInfo *t)
{
+ if (t->spacetype == SPACE_ACTION) {
+ /* this space uses time translate */
+ t->state = TRANS_CANCEL;
+ }
+
t->mode = TFM_TRANSLATION;
t->transform = Translation;
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index ed98a179d05..10502609358 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -1816,7 +1816,7 @@ void flushTransParticles(TransInfo *t)
/* ********************* mesh ****************** */
/* proportional distance based on connectivity */
-#define THRESHOLD 0.0001f
+#define THRESHOLDFACTOR (1.0f-0.0001f)
/*I did this wrong, it should be a breadth-first search
but instead it's a depth-first search, fudged
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index 1579a05eac3..f7746816c38 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -1311,7 +1311,7 @@ static void weld_align_uv(bContext *C, int tool)
int itmpl, jtmpl;
EditVert *eve;
int pass; /* first 2 passes find endpoints, 3rd pass moves middle points, 4th pass is fail-on-face-selected */
- EditFace *startefa, *endefa;
+ EditFace *startefa, *endefa= NULL; /* endefa shouldnt need to be initialized but just incase */
/* pass 3 variables */
float startx, starty, firstm, firstb, midx, midy;
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index 40186c5a187..c3cbcb61622 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -1091,6 +1091,9 @@ static void do_material_tex(GPUShadeInput *shi)
float ima_x, ima_y;
float hScale = 0.1f; // compatibility adjustment factor for all bumpspace types
float hScaleTex = 13.0f; // factor for scaling texspace bumps
+
+ float imag_tspace_dimension_x = 1024.0f; // only used for texture space variant
+ float aspect = 1.0f;
GPUNodeLink *surf_pos = GPU_builtin(GPU_VIEW_POSITION);
GPUNodeLink *vR1, *vR2;
@@ -1154,6 +1157,7 @@ static void do_material_tex(GPUShadeInput *shi)
if(ibuf) {
ima_x= ibuf->x;
ima_y= ibuf->y;
+ aspect = ((float) ima_y) / ima_x;
}
}
@@ -1174,10 +1178,11 @@ static void do_material_tex(GPUShadeInput *shi)
if( mtex->texflag & MTEX_BUMP_TEXTURESPACE ) {
-
+ float imag_tspace_dimension_y = aspect*imag_tspace_dimension_x;
GPU_link( mat, "mtex_bump_apply_texspace",
fDet, dBs, dBt, vR1, vR2,
- GPU_image(tex->ima, &tex->iuser), texco, GPU_uniform(&ima_x), GPU_uniform(&ima_y), vNacc,
+ GPU_image(tex->ima, &tex->iuser), texco,
+ GPU_uniform(&imag_tspace_dimension_x), GPU_uniform(&imag_tspace_dimension_y), vNacc,
&vNacc, &shi->vn );
} else
GPU_link( mat, "mtex_bump_apply",
diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c
index 0759d97e69f..b87b46ca464 100644
--- a/source/blender/imbuf/intern/jpeg.c
+++ b/source/blender/imbuf/intern/jpeg.c
@@ -255,12 +255,12 @@ static void memory_source(j_decompress_ptr cinfo, unsigned char *buffer, size_t
static boolean
handle_app1 (j_decompress_ptr cinfo)
{
- INT32 length, i;
+ INT32 length; /* initialized by the macro */
+ INT32 i;
char neogeo[128];
INPUT_VARS(cinfo);
-
- length = 0;
+
INPUT_2BYTES(cinfo, length, return FALSE);
length -= 2;
diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c
index 434e613359d..718f70cea1e 100644
--- a/source/blender/makesrna/intern/rna_action.c
+++ b/source/blender/makesrna/intern/rna_action.c
@@ -613,7 +613,7 @@ static void rna_def_action(BlenderRNA *brna)
prop= RNA_def_property(srna, "id_root", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "idroot");
RNA_def_property_enum_items(prop, id_type_items);
- RNA_def_property_ui_text(prop, "ID Root Type", "Type of ID-block that action can be used on. DO NOT CHANGE UNLESS YOU KNOW WHAT YOU'RE DOING");
+ RNA_def_property_ui_text(prop, "ID Root Type", "Type of ID-block that action can be used on - DO NOT CHANGE UNLESS YOU KNOW WHAT YOU'RE DOING");
/* API calls */
RNA_api_action(srna);
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c
index 43cf1fae931..d828139a6d5 100644
--- a/source/blender/makesrna/intern/rna_actuator.c
+++ b/source/blender/makesrna/intern/rna_actuator.c
@@ -861,7 +861,7 @@ static void rna_def_camera_actuator(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "CameraActuator", "Actuator");
- RNA_def_struct_ui_text(srna, "Camera Actuator", "Actuator to...");
+ RNA_def_struct_ui_text(srna, "Camera Actuator", "");
RNA_def_struct_sdna_from(srna, "bCameraActuator", "data");
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
@@ -1387,7 +1387,7 @@ static void rna_def_scene_actuator(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "SceneActuator", "Actuator");
- RNA_def_struct_ui_text(srna, "Scene Actuator", "Actuator to...");
+ RNA_def_struct_ui_text(srna, "Scene Actuator", "");
RNA_def_struct_sdna_from(srna, "bSceneActuator", "data");
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
@@ -1445,7 +1445,7 @@ static void rna_def_random_actuator(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "RandomActuator", "Actuator");
- RNA_def_struct_ui_text(srna, "Random Actuator", "Actuator to...");
+ RNA_def_struct_ui_text(srna, "Random Actuator", "");
RNA_def_struct_sdna_from(srna, "bRandomActuator", "data");
prop= RNA_def_property(srna, "seed", PROP_INT, PROP_NONE);
@@ -1562,7 +1562,7 @@ static void rna_def_message_actuator(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "MessageActuator", "Actuator");
- RNA_def_struct_ui_text(srna, "Message Actuator", "Actuator to...");
+ RNA_def_struct_ui_text(srna, "Message Actuator", "");
RNA_def_struct_sdna_from(srna, "bMessageActuator", "data");
prop= RNA_def_property(srna, "to_property", PROP_STRING, PROP_NONE);
@@ -1877,7 +1877,7 @@ static void rna_def_armature_actuator(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "ArmatureActuator", "Actuator");
- RNA_def_struct_ui_text(srna, "Armature Actuator", "Actuator to...");
+ RNA_def_struct_ui_text(srna, "Armature Actuator", "");
RNA_def_struct_sdna_from(srna, "bArmatureActuator", "data");
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 8af65b97ffc..63b3aed4a3b 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -58,6 +58,21 @@ BlenderDefRNA DefRNA = {NULL, {NULL, NULL}, {NULL, NULL}, NULL, 0, 0, 0, 1};
#define MAX2(x,y) ((x)>(y)? (x): (y))
#endif
+/* pedantic check for '.', do this since its a hassle for translators */
+#ifndef NDEBUG
+# define DESCR_CHECK(description, id1, id2) \
+ if(description && (description)[0]) { \
+ int i = strlen(description); \
+ if((description)[i - 1] == '.') { \
+ fprintf(stderr, "%s: '%s' '%s' description ends with a '.' !\n", \
+ __func__, id1 ? id1 : "", id2 ? id2 : ""); \
+ } \
+ } \
+
+#else
+# define DESCR_CHECK(description, id1, id2)
+#endif
+
void rna_addtail(ListBase *listbase, void *vlink)
{
Link *link= vlink;
@@ -847,6 +862,8 @@ void RNA_def_struct_identifier(StructRNA *srna, const char *identifier)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
{
+ DESCR_CHECK(description, srna->identifier, NULL);
+
srna->name= name;
srna->description= description;
}
@@ -1109,6 +1126,8 @@ void RNA_def_property_multi_array(PropertyRNA *prop, int dimension, const int le
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
{
+ DESCR_CHECK(description, prop->identifier, NULL);
+
prop->name= name;
prop->description= description;
}
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index 673e768e71e..6ed2147ce1b 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -377,10 +377,10 @@ static void rna_def_material_mtex(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_mapping_items[] = {
- {MTEX_FLAT, "FLAT", 0, "Flat", "Maps X and Y coordinates directly"},
- {MTEX_CUBE, "CUBE", 0, "Cube", "Maps using the normal vector"},
- {MTEX_TUBE, "TUBE", 0, "Tube", "Maps with Z as central axis"},
- {MTEX_SPHERE, "SPHERE", 0, "Sphere", "Maps with Z as central axis"},
+ {MTEX_FLAT, "FLAT", 0, "Flat", "Map X and Y coordinates directly"},
+ {MTEX_CUBE, "CUBE", 0, "Cube", "Map using the normal vector"},
+ {MTEX_TUBE, "TUBE", 0, "Tube", "Map with Z as central axis"},
+ {MTEX_SPHERE, "SPHERE", 0, "Sphere", "Map with Z as central axis"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_x_mapping_items[] = {
@@ -456,7 +456,7 @@ static void rna_def_material_mtex(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_from_original", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_OB_DUPLI_ORIG);
RNA_def_property_ui_text(prop, "From Original",
- "Dupli's derive their object coordinates from the original objects transformation");
+ "Dupli's derive their object coordinates from the original object's transformation");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_map_color_diffuse", PROP_BOOLEAN, PROP_NONE);
@@ -555,7 +555,7 @@ static void rna_def_material_mtex(BlenderRNA *brna)
prop= RNA_def_property(srna, "normal_map_space", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "normapspace");
RNA_def_property_enum_items(prop, prop_normal_map_space_items);
- RNA_def_property_ui_text(prop, "Normal Map Space", "Sets space of normal map image");
+ RNA_def_property_ui_text(prop, "Normal Map Space", "Set space of normal map image");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "normal_factor", PROP_FLOAT, PROP_NONE);
@@ -871,7 +871,7 @@ static void rna_def_material_colors(StructRNA *srna)
prop= RNA_def_property(srna, "specular_ramp_blend", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "rampblend_spec");
RNA_def_property_enum_items(prop, ramp_blend_items);
- RNA_def_property_ui_text(prop, "Diffuse Ramp Blend", "Blending method of the ramp and the specular color");
+ RNA_def_property_ui_text(prop, "Specular Ramp Blend", "Blending method of the ramp and the specular color");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "diffuse_ramp_input", PROP_ENUM, PROP_NONE);
@@ -981,7 +981,7 @@ static void rna_def_material_raymirror(BlenderRNA *brna)
prop= RNA_def_property(srna, "reflect_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "ray_mirror");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Reflectivity", "Sets the amount mirror reflection for raytrace");
+ RNA_def_property_ui_text(prop, "Reflectivity", "Amount of mirror reflection for raytrace");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "fresnel", PROP_FLOAT, PROP_NONE);
@@ -1060,7 +1060,7 @@ static void rna_def_material_raytra(BlenderRNA *brna)
prop= RNA_def_property(srna, "ior", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ang");
RNA_def_property_range(prop, 0.25f, 4.0f);
- RNA_def_property_ui_text(prop, "IOR", "Sets angular index of refraction for raytraced refraction");
+ RNA_def_property_ui_text(prop, "IOR", "Angular index of refraction for raytraced refraction");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "fresnel", PROP_FLOAT, PROP_NONE);
@@ -1233,7 +1233,7 @@ static void rna_def_material_volume(BlenderRNA *brna)
RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1 ,3);
RNA_def_property_ui_text(prop, "Scattering",
"Amount of light that gets scattered out by the volume - "
- "the more out-scattering, the shallower the light will penetrate ");
+ "the more out-scattering, the shallower the light will penetrate");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "transmission_color", PROP_FLOAT, PROP_COLOR);
@@ -1292,118 +1292,118 @@ static void rna_def_material_halo(BlenderRNA *brna)
prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "hasize");
RNA_def_property_range(prop, 0.0f, 100.0f);
- RNA_def_property_ui_text(prop, "Size", "Sets the dimension of the halo");
+ RNA_def_property_ui_text(prop, "Size", "Dimension of the halo");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "hardness", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "har");
RNA_def_property_range(prop, 0, 127);
- RNA_def_property_ui_text(prop, "Hardness", "Sets the hardness of the halo");
+ RNA_def_property_ui_text(prop, "Hardness", "Hardness of the halo");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "add", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "add");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Add", "Sets the strength of the add effect");
+ RNA_def_property_ui_text(prop, "Add", "Strength of the add effect");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "ring_count", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ringc");
RNA_def_property_range(prop, 0, 24);
- RNA_def_property_ui_text(prop, "Rings", "Sets the number of rings rendered over the halo");
+ RNA_def_property_ui_text(prop, "Rings", "Number of rings rendered over the halo");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "line_count", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "linec");
RNA_def_property_range(prop, 0, 250);
- RNA_def_property_ui_text(prop, "Line Number", "Sets the number of star shaped lines rendered over the halo");
+ RNA_def_property_ui_text(prop, "Line Number", "Number of star shaped lines rendered over the halo");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "star_tip_count", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "starc");
RNA_def_property_range(prop, 3, 50);
- RNA_def_property_ui_text(prop, "Star Tips", "Sets the number of points on the star shaped halo");
+ RNA_def_property_ui_text(prop, "Star Tips", "Number of points on the star shaped halo");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "seed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "seed1");
RNA_def_property_range(prop, 0, 255);
- RNA_def_property_ui_text(prop, "Seed", "Randomizes ring dimension and line location");
+ RNA_def_property_ui_text(prop, "Seed", "Randomize ring dimension and line location");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_flare_mode", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_FLARE); /* use bitflags */
- RNA_def_property_ui_text(prop, "Flare", "Renders halo as a lens flare");
+ RNA_def_property_ui_text(prop, "Flare", "Render halo as a lens flare");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "flare_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "flaresize");
RNA_def_property_range(prop, 0.1f, 25.0f);
- RNA_def_property_ui_text(prop, "Flare Size", "Sets the factor by which the flare is larger than the halo");
+ RNA_def_property_ui_text(prop, "Flare Size", "Factor by which the flare is larger than the halo");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "flare_subflare_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "subsize");
RNA_def_property_range(prop, 0.1f, 25.0f);
- RNA_def_property_ui_text(prop, "Flare Subsize", "Sets the dimension of the sub-flares, dots and circles");
+ RNA_def_property_ui_text(prop, "Flare Subsize", "Dimension of the sub-flares, dots and circles");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "flare_boost", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "flareboost");
RNA_def_property_range(prop, 0.1f, 10.0f);
- RNA_def_property_ui_text(prop, "Flare Boost", "Gives the flare extra strength");
+ RNA_def_property_ui_text(prop, "Flare Boost", "Give the flare extra strength");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "flare_seed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "seed2");
RNA_def_property_range(prop, 0, 255);
- RNA_def_property_ui_text(prop, "Flare Seed", "Specifies an offset in the flare seed table");
+ RNA_def_property_ui_text(prop, "Flare Seed", "Offset in the flare seed table");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "flare_subflare_count", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "flarec");
RNA_def_property_range(prop, 1, 32);
- RNA_def_property_ui_text(prop, "Flares Sub", "Sets the number of sub-flares");
+ RNA_def_property_ui_text(prop, "Flares Sub", "Number of sub-flares");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_ring", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_RINGS);
- RNA_def_property_ui_text(prop, "Rings", "Renders rings over halo");
+ RNA_def_property_ui_text(prop, "Rings", "Render rings over halo");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_lines", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_LINES);
- RNA_def_property_ui_text(prop, "Lines", "Renders star shaped lines over halo");
+ RNA_def_property_ui_text(prop, "Lines", "Render star shaped lines over halo");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_star", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_STAR);
- RNA_def_property_ui_text(prop, "Star", "Renders halo as a star");
+ RNA_def_property_ui_text(prop, "Star", "Render halo as a star");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_texture", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALOTEX);
- RNA_def_property_ui_text(prop, "Texture", "Gives halo a texture");
+ RNA_def_property_ui_text(prop, "Texture", "Give halo a texture");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_vertex_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALOPUNO);
- RNA_def_property_ui_text(prop, "Vertex Normal", "Uses the vertex normal to specify the dimension of the halo");
+ RNA_def_property_ui_text(prop, "Vertex Normal", "Use the vertex normal to specify the dimension of the halo");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_extreme_alpha", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_XALPHA);
- RNA_def_property_ui_text(prop, "Extreme Alpha", "Uses extreme alpha");
+ RNA_def_property_ui_text(prop, "Extreme Alpha", "Use extreme alpha");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_shaded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_SHADE);
- RNA_def_property_ui_text(prop, "Shaded", "Lets halo receive light and shadows from external objects");
+ RNA_def_property_ui_text(prop, "Shaded", "Let halo receive light and shadows from external objects");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_soft", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_HALO_SOFT);
- RNA_def_property_ui_text(prop, "Soft", "Softens the edges of halos at intersections with other geometry");
+ RNA_def_property_ui_text(prop, "Soft", "Soften the edges of halos at intersections with other geometry");
RNA_def_property_update(prop, 0, "rna_Material_update");
}
@@ -1457,7 +1457,7 @@ static void rna_def_material_sss(BlenderRNA *brna)
prop= RNA_def_property(srna, "texture_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "sss_texfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Texture Factor", "Texture scatting blend factor");
+ RNA_def_property_ui_text(prop, "Texture Factor", "Texture scattering blend factor");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "front", PROP_FLOAT, PROP_NONE);
@@ -1594,7 +1594,7 @@ static void rna_def_material_strand(BlenderRNA *brna)
prop= RNA_def_property(srna, "shape", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "strand_ease");
RNA_def_property_range(prop, -0.9, 0.9);
- RNA_def_property_ui_text(prop, "Shape", "Positive values make strands rounder, negative makes strands spiky");
+ RNA_def_property_ui_text(prop, "Shape", "Positive values make strands rounder, negative ones make strands spiky");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "width_fade", PROP_FLOAT, PROP_NONE);
@@ -1659,7 +1659,7 @@ void RNA_def_material(BlenderRNA *brna)
static EnumPropertyItem prop_type_items[] = {
{MA_TYPE_SURFACE, "SURFACE", 0, "Surface", "Render object as a surface"},
- {MA_TYPE_WIRE, "WIRE", 0, "Wire", "Render the edges of faces as wires (not supported in ray tracing)"},
+ {MA_TYPE_WIRE, "WIRE", 0, "Wire", "Render the edges of faces as wires (not supported in raytracing)"},
{MA_TYPE_VOLUME, "VOLUME", 0, "Volume", "Render object as a volume"},
{MA_TYPE_HALO, "HALO", 0, "Halo", "Render object as halo particles"},
{0, NULL, 0, NULL, NULL}};
@@ -1688,7 +1688,7 @@ void RNA_def_material(BlenderRNA *brna)
srna= RNA_def_struct(brna, "Material", "ID");
RNA_def_struct_ui_text(srna, "Material",
- "Material datablock to defined the appearance of geometric objects for rendering");
+ "Material datablock to define the appearance of geometric objects for rendering");
RNA_def_struct_ui_icon(srna, ICON_MATERIAL_DATA);
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
@@ -1785,17 +1785,17 @@ void RNA_def_material(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_raytrace", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_TRACEBLE);
RNA_def_property_ui_text(prop, "Traceable",
- "Include this material and geometry that uses it in ray tracing calculations");
+ "Include this material and geometry that uses it in raytracing calculations");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_shadows", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_SHADOW);
- RNA_def_property_ui_text(prop, "Shadows", "Allows this material to receive shadows");
+ RNA_def_property_ui_text(prop, "Shadows", "Allow this material to receive shadows");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_shadeless", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_SHLESS);
- RNA_def_property_ui_text(prop, "Shadeless", "Makes this material insensitive to light or shadow");
+ RNA_def_property_ui_text(prop, "Shadeless", "Make this material insensitive to light or shadow");
RNA_def_property_update(prop, 0, "rna_Material_draw_update");
prop= RNA_def_property(srna, "use_vertex_color_light", PROP_BOOLEAN, PROP_NONE);
@@ -1806,30 +1806,30 @@ void RNA_def_material(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_vertex_color_paint", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_VERTEXCOLP);
RNA_def_property_ui_text(prop, "Vertex Color Paint",
- "Replaces object base color with vertex colors (multiplies with "
+ "Replace object base color with vertex colors (multiply with "
"'texture face' face assigned textures)");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "invert_z", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_ZINV);
- RNA_def_property_ui_text(prop, "Invert Z Depth", "Renders material's faces with an inverted Z buffer (scanline only)");
+ RNA_def_property_ui_text(prop, "Invert Z Depth", "Render material's faces with an inverted Z buffer (scanline only)");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "offset_z", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "zoffs");
- RNA_def_property_ui_text(prop, "Z Offset", "Gives faces an artificial offset in the Z buffer for Z transparency");
+ RNA_def_property_ui_text(prop, "Z Offset", "Give faces an artificial offset in the Z buffer for Z transparency");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_sky", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_ENV);
RNA_def_property_ui_text(prop, "Sky",
- "Renders this material with zero alpha, with sky background in place (scanline only)");
+ "Render this material with zero alpha, with sky background in place (scanline only)");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_only_shadow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_ONLYSHADOW);
RNA_def_property_ui_text(prop, "Only Shadow",
- "Renders shadows as the material's alpha value, making materials "
+ "Render shadows as the material's alpha value, making the material "
"transparent except for shadowed areas");
RNA_def_property_update(prop, 0, "rna_Material_update");
@@ -1842,19 +1842,19 @@ void RNA_def_material(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_face_texture", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_FACETEXTURE);
RNA_def_property_ui_text(prop, "Face Textures",
- "Replaces the object's base color with color from face assigned image textures");
+ "Replace the object's base color with color from face assigned image textures");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_face_texture_alpha", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_FACETEXTURE_ALPHA);
RNA_def_property_ui_text(prop, "Face Textures Alpha",
- "Replaces the object's base alpha value with alpha from face assigned image textures");
+ "Replace the object's base alpha value with alpha from face assigned image textures");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_cast_shadows_only", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_ONLYCAST);
RNA_def_property_ui_text(prop, "Cast Shadows Only",
- "Makes objects with this material appear invisible, only casting shadows (not rendered)");
+ "Make objects with this material appear invisible (not rendered), only casting shadows");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_mist", PROP_BOOLEAN, PROP_NONE);
@@ -1871,7 +1871,7 @@ void RNA_def_material(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_ray_shadow_bias", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_RAYBIAS);
RNA_def_property_ui_text(prop, "Ray Shadow Bias",
- "Prevents raytraced shadow errors on surfaces with smooth shaded normals (terminator problem)");
+ "Prevent raytraced shadow errors on surfaces with smooth shaded normals (terminator problem)");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_full_oversampling", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index 816a7ba9cd4..85ad6b231aa 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -84,7 +84,7 @@ static void api_ui_item_common(FunctionRNA *func)
{
PropertyRNA *prop;
- prop= RNA_def_string_translate(func, "text", "", 0, "", "Override automatic text of the item");
+ RNA_def_string_translate(func, "text", "", 0, "", "Override automatic text of the item");
prop= RNA_def_property(func, "icon", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, icon_items);
diff --git a/source/blender/modifiers/intern/MOD_navmesh.c b/source/blender/modifiers/intern/MOD_navmesh.c
index cf4e01ad516..946a0948fee 100644
--- a/source/blender/modifiers/intern/MOD_navmesh.c
+++ b/source/blender/modifiers/intern/MOD_navmesh.c
@@ -25,6 +25,12 @@
* ***** END GPL LICENSE BLOCK *****
*
*/
+
+/** \file blender/modifiers/intern/MOD_navmesh.c
+ * \ingroup modifiers
+ */
+
+
#include <math.h>
#include "DNA_mesh_types.h"
diff --git a/source/blender/modifiers/intern/MOD_solidify.c b/source/blender/modifiers/intern/MOD_solidify.c
index a56fe7aa960..07394298666 100644
--- a/source/blender/modifiers/intern/MOD_solidify.c
+++ b/source/blender/modifiers/intern/MOD_solidify.c
@@ -193,6 +193,7 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
return dataMask;
}
+
static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
DerivedMesh *dm,
int UNUSED(useRenderParams),
@@ -531,6 +532,8 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
}
if(smd->flag & MOD_SOLIDIFY_RIM) {
+ int *origindex;
+
/* bugger, need to re-calculate the normals for the new edge faces.
* This could be done in many ways, but probably the quickest way is to calculate the average normals for side faces only.
* Then blend them with the normals of the edge verts.
@@ -550,12 +553,15 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
const unsigned char crease_inner= smd->crease_inner * 255.0f;
/* add faces & edges */
+ origindex= result->getEdgeDataArray(result, CD_ORIGINDEX);
ed= medge + (numEdges * 2);
for(i=0; i<newEdges; i++, ed++) {
ed->v1= new_vert_arr[i];
ed->v2= new_vert_arr[i] + numVerts;
ed->flag |= ME_EDGEDRAW;
+ origindex[numEdges * 2 + i]= ORIGINDEX_NONE;
+
if(crease_rim)
ed->crease= crease_rim;
}
@@ -564,6 +570,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
edge_origIndex = CustomData_get_layer(&result->edgeData, CD_ORIGINDEX);
mp= mpoly + (numFaces * 2);
+ origindex= result->getTessFaceDataArray(result, CD_ORIGINDEX);
ml = mloop + (numLoops * 2);
j = 0;
for(i=0; i<newFaces; i++, mp++) {
@@ -652,13 +659,13 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
edge_origIndex[ml[j-3].e] = ORIGINDEX_NONE;
edge_origIndex[ml[j-1].e] = ORIGINDEX_NONE;
}
-
if(crease_outer) {
/* crease += crease_outer; without wrapping */
unsigned char *cr= (unsigned char *)&(medge[eidx].crease);
int tcr= *cr + crease_outer;
*cr= tcr > 255 ? 255 : tcr;
}
+
if(crease_inner) {
/* crease += crease_inner; without wrapping */
unsigned char *cr= (unsigned char *)&(medge[numEdges + eidx].crease);
@@ -672,6 +679,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
add_v3_v3(edge_vert_nos[ed->v1], nor);
add_v3_v3(edge_vert_nos[ed->v2], nor);
#endif
+ origindex[numFaces * 2 + i]= ORIGINDEX_NONE;
}
#ifdef SOLIDIFY_SIDE_NORMALS
diff --git a/source/blender/modifiers/intern/MOD_warp.c b/source/blender/modifiers/intern/MOD_warp.c
index 8eb1bace229..270198737a2 100644
--- a/source/blender/modifiers/intern/MOD_warp.c
+++ b/source/blender/modifiers/intern/MOD_warp.c
@@ -23,6 +23,10 @@
*
*/
+/** \file blender/modifiers/intern/MOD_warp.c
+ * \ingroup modifiers
+ */
+
#include <string.h>
#include "MEM_guardedalloc.h"
diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.c b/source/blender/modifiers/intern/MOD_weightvg_util.c
index 128e888ca90..2c94c4d1505 100644
--- a/source/blender/modifiers/intern/MOD_weightvg_util.c
+++ b/source/blender/modifiers/intern/MOD_weightvg_util.c
@@ -26,11 +26,8 @@
*
*/
-/*
- * XXX I'd like to make modified weights visible in WeightPaint mode,
- * but couldn't figure a way to do this...
- * Maybe this will need changes in mesh_calc_modifiers (DerivedMesh.c)?
- * Or the WeightPaint mode code itself?
+/** \file blender/modifiers/intern/MOD_weightvg_util.c
+ * \ingroup modifiers
*/
#include "BLI_math.h"
diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.h b/source/blender/modifiers/intern/MOD_weightvg_util.h
index a327bdf969b..ed558e412c5 100644
--- a/source/blender/modifiers/intern/MOD_weightvg_util.h
+++ b/source/blender/modifiers/intern/MOD_weightvg_util.h
@@ -26,7 +26,7 @@
*
*/
-/** \file blender/modifiers/intern/MOD_util.h
+/** \file blender/modifiers/intern/MOD_weightvg_util.h
* \ingroup modifiers
*/
diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.c b/source/blender/modifiers/intern/MOD_weightvgedit.c
index 8e609ad5929..a860747972c 100644
--- a/source/blender/modifiers/intern/MOD_weightvgedit.c
+++ b/source/blender/modifiers/intern/MOD_weightvgedit.c
@@ -26,11 +26,8 @@
*
*/
-/*
- * XXX I'd like to make modified weights visible in WeightPaint mode,
- * but couldn't figure a way to do this...
- * Maybe this will need changes in mesh_calc_modifiers (DerivedMesh.c)?
- * Or the WeightPaint mode code itself?
+/** \file blender/modifiers/intern/MOD_weightvgedit.c
+ * \ingroup modifiers
*/
#include "BLI_utildefines.h"
diff --git a/source/blender/modifiers/intern/MOD_weightvgmix.c b/source/blender/modifiers/intern/MOD_weightvgmix.c
index f30a2deb576..d7365d13d7c 100644
--- a/source/blender/modifiers/intern/MOD_weightvgmix.c
+++ b/source/blender/modifiers/intern/MOD_weightvgmix.c
@@ -26,11 +26,8 @@
*
*/
-/*
- * XXX I'd like to make modified weights visible in WeightPaint mode,
- * but couldn't figure a way to do this...
- * Maybe this will need changes in mesh_calc_modifiers (DerivedMesh.c)?
- * Or the WeightPaint mode code itself?
+/** \file blender/modifiers/intern/MOD_weightvgmix.c
+ * \ingroup modifiers
*/
#include "BLI_utildefines.h"
diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c
index 6242c6d0f5e..385ecb48f10 100644
--- a/source/blender/modifiers/intern/MOD_weightvgproximity.c
+++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c
@@ -26,11 +26,8 @@
*
*/
-/*
- * XXX I'd like to make modified weights visible in WeightPaint mode,
- * but couldn't figure a way to do this...
- * Maybe this will need changes in mesh_calc_modifiers (DerivedMesh.c)?
- * Or the WeightPaint mode code itself?
+/** \file blender/modifiers/intern/MOD_weightvgproximity.c
+ * \ingroup modifiers
*/
#include "BLI_editVert.h"
diff --git a/source/blender/nodes/composite/nodes/node_composite_lummaMatte.c b/source/blender/nodes/composite/nodes/node_composite_lummaMatte.c
index cac2a386801..f7028fbeafd 100644
--- a/source/blender/nodes/composite/nodes/node_composite_lummaMatte.c
+++ b/source/blender/nodes/composite/nodes/node_composite_lummaMatte.c
@@ -52,8 +52,6 @@ static void do_luma_matte(bNode *node, float *out, float *in)
NodeChroma *c=(NodeChroma *)node->storage;
float alpha;
- alpha=0.0;
-
/* test range*/
if(in[0]>c->t1) {
alpha=1.0;
diff --git a/source/blender/python/SConscript b/source/blender/python/SConscript
index 5cc3f3bedc4..f00d49fe8dd 100644
--- a/source/blender/python/SConscript
+++ b/source/blender/python/SConscript
@@ -17,9 +17,6 @@ defs = []
if is_debug:
defs.append('_DEBUG')
-if env['WITH_BF_INTERNATIONAL']:
- defs.append('INTERNATIONAL')
-
sources = env.Glob('generic/*.c')
env.BlenderLib( libname = 'bf_python_ext', sources = Split(sources), includes = Split(incs), defines = defs, libtype = ['core','player'], priority = [363,165]) # ketsji is 360
@@ -43,5 +40,8 @@ if env['WITH_BF_PYTHON_SAFETY']:
if env['BF_BUILDINFO']:
defs.append('BUILD_DATE')
+if env['WITH_BF_INTERNATIONAL']:
+ defs.append('INTERNATIONAL')
+
sources = env.Glob('intern/*.c')
env.BlenderLib( libname = 'bf_python', sources = Split(sources), includes = Split(incs), defines = defs, libtype = ['core'], priority = [361])
diff --git a/source/blender/python/generic/CMakeLists.txt b/source/blender/python/generic/CMakeLists.txt
index 0a49036c15d..847a0d19a7f 100644
--- a/source/blender/python/generic/CMakeLists.txt
+++ b/source/blender/python/generic/CMakeLists.txt
@@ -48,8 +48,4 @@ set(SRC
py_capi_utils.h
)
-if(WITH_INTERNATIONAL)
- add_definitions(-DINTERNATIONAL)
-endif()
-
blender_add_lib(bf_python_ext "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/python/generic/blf_py_api.c b/source/blender/python/generic/blf_py_api.c
index 87e4a301eff..b16efdf5a3d 100644
--- a/source/blender/python/generic/blf_py_api.c
+++ b/source/blender/python/generic/blf_py_api.c
@@ -31,15 +31,9 @@
#include "blf_py_api.h"
#include "../../blenfont/BLF_api.h"
-#include "../../blenfont/BLF_translation.h"
#include "BLI_utildefines.h"
-#ifdef INTERNATIONAL
-#include "DNA_userdef_types.h" /* is it bad level? */
-#endif
-
-
PyDoc_STRVAR(py_blf_position_doc,
".. function:: position(fontid, x, y, z)\n"
"\n"
@@ -371,33 +365,24 @@ static PyObject *py_blf_load(PyObject *UNUSED(self), PyObject *args)
return PyLong_FromLong(BLF_load(filename));
}
-PyDoc_STRVAR(py_blf_gettext_doc,
-".. function:: gettext(msgid)\n"
+PyDoc_STRVAR(py_blf_unload_doc,
+".. function:: unload(filename)\n"
"\n"
-" Get a msg in local language.\n"
+" Unload an existing font.\n"
"\n"
-" :arg msgid: the source string.\n"
-" :type msgid: string\n"
-" :return: the localized string.\n"
-" :rtype: string\n"
+" :arg filename: the filename of the font.\n"
+" :type filename: string\n"
);
-static PyObject *py_blf_gettext(PyObject *UNUSED(self), PyObject *value)
+static PyObject *py_blf_unload(PyObject *UNUSED(self), PyObject *args)
{
-#ifdef INTERNATIONAL
- if ((U.transopts & USER_DOTRANSLATE) && (U.transopts & USER_TR_IFACE)) {
- const char *msgid= _PyUnicode_AsString(value);
- if(msgid == NULL) {
- PyErr_SetString(PyExc_TypeError, "blf.gettext expects a single string argument");
- return NULL;
- }
-
- return PyUnicode_FromString(BLF_gettext(msgid));
- }
- else
-#endif /* INTERNATIONAL */
- {
- return Py_INCREF(value), value;
- }
+ char* filename;
+
+ if (!PyArg_ParseTuple(args, "s:blf.unload", &filename))
+ return NULL;
+
+ BLF_unload(filename);
+
+ Py_RETURN_NONE;
}
/*----------------------------MODULE INIT-------------------------*/
@@ -415,7 +400,7 @@ static PyMethodDef BLF_methods[] = {
{"shadow_offset", (PyCFunction) py_blf_shadow_offset, METH_VARARGS, py_blf_shadow_offset_doc},
{"size", (PyCFunction) py_blf_size, METH_VARARGS, py_blf_size_doc},
{"load", (PyCFunction) py_blf_load, METH_VARARGS, py_blf_load_doc},
- {"gettext", (PyCFunction) py_blf_gettext, METH_O, py_blf_gettext_doc},
+ {"unload", (PyCFunction) py_blf_unload, METH_VARARGS, py_blf_unload_doc},
{NULL, NULL, 0, NULL}
};
diff --git a/source/blender/render/intern/source/pixelshading.c b/source/blender/render/intern/source/pixelshading.c
index 5c5162d268b..93038984115 100644
--- a/source/blender/render/intern/source/pixelshading.c
+++ b/source/blender/render/intern/source/pixelshading.c
@@ -226,8 +226,7 @@ static void render_lighting_halo(HaloRen *har, float col_r[3])
}
/* shadow */
- if(i> -0.41f) { /* heuristic valua! */
- shadfac= 1.0;
+ if(i> -0.41f) { /* heuristic valua! */
if(lar->shb) {
shadfac = testshadowbuf(&R, lar->shb, rco, dco, dco, inp, 0.0f);
if(shadfac==0.0f) continue;
diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c
index 641fec90cf3..8d953ccc73d 100644
--- a/source/blender/render/intern/source/render_texture.c
+++ b/source/blender/render/intern/source/render_texture.c
@@ -747,7 +747,7 @@ static int plugintex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex
{
PluginTex *pit;
int rgbnor=0;
- float result[ 8 ];
+ float result[8]= {0.0f};
texres->tin= 0.0;
@@ -1906,6 +1906,8 @@ static int ntap_bump_compute(NTapBump *ntap_bump, ShadeInput *shi, MTex *mtex, T
const int fromrgb = ((tex->type == TEX_IMAGE) || ((tex->flag & TEX_COLORBAND)!=0));
float Hscale = Tnor*mtex->norfac;
int dimx=512, dimy=512;
+ const int imag_tspace_dimension_x = 1024; // only used for texture space variant
+ float aspect = 1.0f;
// 2 channels for 2D texture and 3 for 3D textures.
const int nr_channels = (mtex->texco == TEXCO_UV)? 2 : 3;
@@ -1938,6 +1940,7 @@ static int ntap_bump_compute(NTapBump *ntap_bump, ShadeInput *shi, MTex *mtex, T
if (ibuf) {
dimx = ibuf->x;
dimy = ibuf->y;
+ aspect = ((float) dimy) / dimx;
}
}
@@ -2111,12 +2114,13 @@ static int ntap_bump_compute(NTapBump *ntap_bump, ShadeInput *shi, MTex *mtex, T
if(tex->ima) {
// crazy hack solution that gives results similar to normal mapping - part 2
float vec[2];
+ const float imag_tspace_dimension_y = aspect*imag_tspace_dimension_x;
- vec[0] = dimx*dxt[0];
- vec[1] = dimy*dxt[1];
+ vec[0] = imag_tspace_dimension_x*dxt[0];
+ vec[1] = imag_tspace_dimension_y*dxt[1];
dHdx *= 1.0f/len_v2(vec);
- vec[0] = dimx*dyt[0];
- vec[1] = dimy*dyt[1];
+ vec[0] = imag_tspace_dimension_x*dyt[0];
+ vec[1] = imag_tspace_dimension_y*dyt[1];
dHdy *= 1.0f/len_v2(vec);
}
}
diff --git a/source/blender/render/intern/source/shadeinput.c b/source/blender/render/intern/source/shadeinput.c
index d8231c7e7d4..956a3d4de7c 100644
--- a/source/blender/render/intern/source/shadeinput.c
+++ b/source/blender/render/intern/source/shadeinput.c
@@ -1368,7 +1368,7 @@ void shade_samples_do_AO(ShadeSample *ssamp)
if(((shi->passflag & SCE_PASS_COMBINED) && (shi->combinedflag & (SCE_PASS_AO|SCE_PASS_ENVIRONMENT|SCE_PASS_INDIRECT)))
|| (shi->passflag & (SCE_PASS_AO|SCE_PASS_ENVIRONMENT|SCE_PASS_INDIRECT)))
- for(sample=0, shi= ssamp->shi; sample<ssamp->tot; shi++, sample++)
+ for(sample=0; sample<ssamp->tot; shi++, sample++)
if(!(shi->mode & MA_SHLESS))
ambient_occlusion(shi); /* stores in shi->ao[] */
}
diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c
index 41d12c6065e..c808d930e7c 100644
--- a/source/blender/render/intern/source/shadeoutput.c
+++ b/source/blender/render/intern/source/shadeoutput.c
@@ -726,7 +726,7 @@ static float Toon_Diff( float *n, float *l, float *UNUSED(v), float size, float
/* in latter case, only last multiplication uses 'nl' */
static float OrenNayar_Diff(float nl, float *n, float *l, float *v, float rough )
{
- float i/*, nh*/, nv, vh, realnl, h[3];
+ float i/*, nh*/, nv /*, vh */, realnl, h[3];
float a, b, t, A, B;
float Lit_A, View_A, Lit_B[3], View_B[3];
@@ -745,8 +745,8 @@ static float OrenNayar_Diff(float nl, float *n, float *l, float *v, float rough
if(realnl<=0.0f) return 0.0f;
if(nl<0.0f) return 0.0f; /* value from area light */
- vh= v[0]*h[0]+v[1]*h[1]+v[2]*h[2]; /* Dot product between view vector and halfway vector */
- if(vh<=0.0f) vh= 0.0f;
+ /* vh= v[0]*h[0]+v[1]*h[1]+v[2]*h[2]; */ /* Dot product between view vector and halfway vector */
+ /* if(vh<=0.0f) vh= 0.0f; */
Lit_A = saacos(realnl);
View_A = saacos( nv );
diff --git a/source/blender/render/intern/source/voxeldata.c b/source/blender/render/intern/source/voxeldata.c
index b63ece80119..464cbf72326 100644
--- a/source/blender/render/intern/source/voxeldata.c
+++ b/source/blender/render/intern/source/voxeldata.c
@@ -389,7 +389,7 @@ int voxeldatatex(struct Tex *tex, const float texvec[3], struct TexResult *texre
VoxelData *vd = tex->vd;
float co[3], offset[3] = {0.5, 0.5, 0.5};
- if ((!vd) || (vd->dataset==NULL)) {
+ if (vd->dataset==NULL) {
texres->tin = 0.0f;
return 0;
}
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 75fec6ed705..dad43b4fe69 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -1917,7 +1917,7 @@ void wm_event_do_handlers(bContext *C)
/* store last event for this window */
/* mousemove and timer events don't overwrite last type */
- if (event->type != MOUSEMOVE && !ISTIMER(event->type)) {
+ if (!ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE) && !ISTIMER(event->type)) {
if (wm_action_not_handled(action)) {
if (win->eventstate->prevtype == event->type) {
/* set click time on first click (press -> release) */
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 320dc2ecdda..68cd95c1b99 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -1962,7 +1962,7 @@ static void WM_OT_save_as_mainfile(wmOperatorType *ot)
WM_operator_properties_filesel(ot, FOLDERFILE|BLENDERFILE, FILE_BLENDER, FILE_SAVE, WM_FILESEL_FILEPATH);
RNA_def_boolean(ot->srna, "compress", 0, "Compress", "Write compressed .blend file");
RNA_def_boolean(ot->srna, "relative_remap", 1, "Remap Relative", "Remap relative paths when saving in a different directory");
- RNA_def_boolean(ot->srna, "copy", 0, "Save Copy", "Save a copy of the actual working state but does not make saved file active.");
+ RNA_def_boolean(ot->srna, "copy", 0, "Save Copy", "Save a copy of the actual working state but does not make saved file active");
}
/* *************** save file directly ******** */
@@ -3279,12 +3279,12 @@ static void WM_OT_radial_control(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
/* all paths relative to the context */
- RNA_def_string(ot->srna, "data_path", "", 0, "Data Path", "Path of property to be set by the radial control.");
- RNA_def_string(ot->srna, "rotation_path", "", 0, "Rotation Path", "Path of property used to rotate the texture display.");
- RNA_def_string(ot->srna, "color_path", "", 0, "Color Path", "Path of property used to set the color of the control.");
- RNA_def_string(ot->srna, "fill_color_path", "", 0, "Fill Color Path", "Path of property used to set the fill color of the control.");
- RNA_def_string(ot->srna, "zoom_path", "", 0, "Zoom Path", "Path of property used to set the zoom level for the control.");
- RNA_def_string(ot->srna, "image_id", "", 0, "Image ID", "Path of ID that is used to generate an image for the control.");
+ RNA_def_string(ot->srna, "data_path", "", 0, "Data Path", "Path of property to be set by the radial control");
+ RNA_def_string(ot->srna, "rotation_path", "", 0, "Rotation Path", "Path of property used to rotate the texture display");
+ RNA_def_string(ot->srna, "color_path", "", 0, "Color Path", "Path of property used to set the color of the control");
+ RNA_def_string(ot->srna, "fill_color_path", "", 0, "Fill Color Path", "Path of property used to set the fill color of the control");
+ RNA_def_string(ot->srna, "zoom_path", "", 0, "Zoom Path", "Path of property used to set the zoom level for the control");
+ RNA_def_string(ot->srna, "image_id", "", 0, "Image ID", "Path of ID that is used to generate an image for the control");
}
/* ************************** timer for testing ***************** */
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index d9ca275c819..405960d0795 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -111,14 +111,12 @@ static void wm_window_check_position(rcti *rect)
#endif
if(rect->xmin < 0) {
- d= rect->xmin;
- rect->xmax -= d;
- rect->xmin -= d;
+ rect->xmax -= rect->xmin;
+ rect->xmin = 0;
}
if(rect->ymin < 0) {
- d= rect->ymin;
- rect->ymax -= d;
- rect->ymin -= d;
+ rect->ymax -= rect->ymin;
+ rect->ymin = 0;
}
if(rect->xmax > width) {
d= rect->xmax - width;