diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-09-19 18:20:15 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-09-19 18:20:15 +0400 |
commit | 153e4cad4be9455e47b823745c9fa6cbe0305e52 (patch) | |
tree | cdfd2179f0ad043256ddac4a23ccec088f3a89a5 /source/blender/editors/sculpt_paint | |
parent | e9b967d05b366783a93d92d6935e970c1ea42edd (diff) | |
parent | 5c7b5c0b51f57ad19b79eac78e3e4afb263b23cc (diff) |
Cycles: svn merge -r40266:40358 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Diffstat (limited to 'source/blender/editors/sculpt_paint')
4 files changed, 46 insertions, 17 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index e42fa4c5236..2e5dfe8ab8c 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -755,7 +755,7 @@ static int project_paint_PickColor(const ProjPaintState *ps, float pt[2], float * 1 : occluded 2 : occluded with w[3] weights set (need to know in some cases) */ -static int project_paint_occlude_ptv(float pt[3], float v1[3], float v2[3], float v3[3], float w[3], int is_ortho) +static int project_paint_occlude_ptv(float pt[3], float v1[4], float v2[4], float v3[4], float w[3], int is_ortho) { /* if all are behind us, return false */ if(v1[2] > pt[2] && v2[2] > pt[2] && v3[2] > pt[2]) @@ -5220,7 +5220,7 @@ void PAINT_OT_grab_clone(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING; /* properties */ - RNA_def_float_vector(ot->srna, "delta", 2, NULL, -FLT_MAX, FLT_MAX, "Delta", "Delta offset of clone image in 0.0..1.0 coordinates.", -1.0f, 1.0f); + RNA_def_float_vector(ot->srna, "delta", 2, NULL, -FLT_MAX, FLT_MAX, "Delta", "Delta offset of clone image in 0.0..1.0 coordinates", -1.0f, 1.0f); } /******************** sample color operator ********************/ @@ -5301,7 +5301,7 @@ void PAINT_OT_sample_color(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_int_vector(ot->srna, "location", 2, NULL, 0, INT_MAX, "Location", "Cursor location in region coordinates.", 0, 16384); + RNA_def_int_vector(ot->srna, "location", 2, NULL, 0, INT_MAX, "Location", "Cursor location in region coordinates", 0, 16384); } /******************** set clone cursor operator ********************/ @@ -5351,7 +5351,7 @@ void PAINT_OT_clone_cursor_set(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - RNA_def_float_vector(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", "Cursor location in world space coordinates.", -10000.0f, 10000.0f); + RNA_def_float_vector(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", "Cursor location in world space coordinates", -10000.0f, 10000.0f); } /******************** texture paint toggle operator ********************/ @@ -5376,14 +5376,14 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; if (object_data_is_libdata(ob)) { - BKE_report(op->reports, RPT_ERROR, "Can't edit external libdata."); + BKE_report(op->reports, RPT_ERROR, "Can't edit external libdata"); return OPERATOR_CANCELLED; } me= get_mesh(ob); if(!(ob->mode & OB_MODE_TEXTURE_PAINT) && !me) { - BKE_report(op->reports, RPT_ERROR, "Can only enter texture paint mode for mesh objects."); + BKE_report(op->reports, RPT_ERROR, "Can only enter texture paint mode for mesh objects"); return OPERATOR_CANCELLED; } @@ -5464,12 +5464,12 @@ static int texture_paint_camera_project_exec(bContext *C, wmOperator *op) project_state_init(C, OBACT, &ps); if(ps.ob==NULL || ps.ob->type != OB_MESH) { - BKE_report(op->reports, RPT_ERROR, "No active mesh object."); + BKE_report(op->reports, RPT_ERROR, "No active mesh object"); return OPERATOR_CANCELLED; } if(image==NULL) { - BKE_report(op->reports, RPT_ERROR, "Image could not be found."); + BKE_report(op->reports, RPT_ERROR, "Image could not be found"); return OPERATOR_CANCELLED; } @@ -5477,7 +5477,7 @@ static int texture_paint_camera_project_exec(bContext *C, wmOperator *op) ps.reproject_ibuf= BKE_image_get_ibuf(image, NULL); if(ps.reproject_ibuf==NULL || ps.reproject_ibuf->rect==NULL) { - BKE_report(op->reports, RPT_ERROR, "Image data could not be found."); + BKE_report(op->reports, RPT_ERROR, "Image data could not be found"); return OPERATOR_CANCELLED; } @@ -5488,7 +5488,7 @@ static int texture_paint_camera_project_exec(bContext *C, wmOperator *op) /* type check to make sure its ok */ if(view_data->len != PROJ_VIEW_DATA_SIZE || view_data->subtype != IDP_FLOAT) { - BKE_report(op->reports, RPT_ERROR, "Image project data invalid."); + BKE_report(op->reports, RPT_ERROR, "Image project data invalid"); return OPERATOR_CANCELLED; } } @@ -5501,7 +5501,7 @@ static int texture_paint_camera_project_exec(bContext *C, wmOperator *op) ps.source= PROJ_SRC_IMAGE_CAM; if(scene->camera==NULL) { - BKE_report(op->reports, RPT_ERROR, "No active camera set."); + BKE_report(op->reports, RPT_ERROR, "No active camera set"); return OPERATOR_CANCELLED; } } diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index 73a6e4fad20..767001ff163 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -447,9 +447,9 @@ static void paint_draw_alpha_overlay(Sculpt *sd, Brush *brush, if(brush->mtex.brush_map_mode == MTEX_MAP_MODE_FIXED) { /* brush rotation */ glTranslatef(0.5, 0.5, 0); - glRotatef((double)((brush->flag & BRUSH_RAKE) ? - sd->last_angle : sd->special_rotation) * (180.0/M_PI), - 0.0, 0.0, 1.0); + glRotatef((double)RAD2DEGF((brush->flag & BRUSH_RAKE) ? + sd->last_angle : sd->special_rotation), + 0.0, 0.0, 1.0); glTranslatef(-0.5f, -0.5f, 0); /* scale based on tablet pressure */ diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index 09f5c32bea0..33b8a7ca686 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -1,3 +1,32 @@ +/* + * $Id: + * + * ***** BEGIN GPL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL LICENSE BLOCK ***** + */ + /** \file blender/editors/sculpt_paint/paint_utils.c * \ingroup edsculpt */ @@ -399,7 +428,7 @@ void PAINT_OT_face_select_hide(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected objects."); + RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected objects"); } static int face_select_reveal_exec(bContext *C, wmOperator *UNUSED(op)) @@ -421,5 +450,5 @@ void PAINT_OT_face_select_reveal(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; - RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected objects."); + RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected objects"); } diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 3da19ba7346..b2aa1be3b9f 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -1971,6 +1971,6 @@ void PAINT_OT_weight_from_bones(wmOperatorType *ot) ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO; /* properties */ - ot->prop= RNA_def_enum(ot->srna, "type", type_items, 0, "Type", "Method to use for assigning weights."); + ot->prop= RNA_def_enum(ot->srna, "type", type_items, 0, "Type", "Method to use for assigning weights"); } |