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
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/blender/editors
parent74e21161e327a0f91ecef0f8dd1bce65c9e2ef4b (diff)
parenta7891da84bfad1f0cd0f3fc825e7f4dedf469a00 (diff)
svn merge ^/trunk/blender -r40432:40491
Diffstat (limited to 'source/blender/editors')
-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
24 files changed, 121 insertions, 72 deletions
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;