[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [27388] branches/render25/source/blender/ editors/sculpt_paint/paint_image.c: re-project paint failed on no-camera when a camera wasnt needed.
Campbell Barton
ideasman42 at gmail.com
Wed Mar 10 16:11:27 CET 2010
Revision: 27388
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=27388
Author: campbellbarton
Date: 2010-03-10 16:11:24 +0100 (Wed, 10 Mar 2010)
Log Message:
-----------
re-project paint failed on no-camera when a camera wasnt needed.
Modified Paths:
--------------
branches/render25/source/blender/editors/sculpt_paint/paint_image.c
Modified: branches/render25/source/blender/editors/sculpt_paint/paint_image.c
===================================================================
--- branches/render25/source/blender/editors/sculpt_paint/paint_image.c 2010-03-10 15:00:11 UTC (rev 27387)
+++ branches/render25/source/blender/editors/sculpt_paint/paint_image.c 2010-03-10 15:11:24 UTC (rev 27388)
@@ -5374,11 +5374,6 @@
return OPERATOR_CANCELLED;
}
- if(scene->camera==NULL) {
- BKE_report(op->reports, RPT_ERROR, "No active camera set.");
- return OPERATOR_CANCELLED;
- }
-
if(image==NULL) {
BKE_report(op->reports, RPT_ERROR, "Image could not be found.");
return OPERATOR_CANCELLED;
@@ -5392,15 +5387,8 @@
return OPERATOR_CANCELLED;
}
- /* override */
- ps.is_texbrush= 0;
- ps.is_airbrush= 1;
- orig_brush_size= ps.brush->size;
- ps.brush->size= 32; /* cover the whole image */
+ idgroup= IDP_GetProperties(&image->id, 0);
- ps.tool= PAINT_TOOL_DRAW; /* so pixels are initialized with minimal info */
-
- idgroup= IDP_GetProperties(&image->id, 0);
if(idgroup) {
view_data= IDP_GetPropertyFromGroup(idgroup, PROJ_VIEW_DATA_ID);
@@ -5411,15 +5399,27 @@
}
}
-
if(view_data) {
/* image has stored view projection info */
ps.source= PROJ_SRC_IMAGE_VIEW;
}
else {
ps.source= PROJ_SRC_IMAGE_CAM;
+
+ if(scene->camera==NULL) {
+ BKE_report(op->reports, RPT_ERROR, "No active camera set.");
+ return OPERATOR_CANCELLED;
+ }
}
+ /* override */
+ ps.is_texbrush= 0;
+ ps.is_airbrush= 1;
+ orig_brush_size= ps.brush->size;
+ ps.brush->size= 32; /* cover the whole image */
+
+ ps.tool= PAINT_TOOL_DRAW; /* so pixels are initialized with minimal info */
+
scene->toolsettings->imapaint.flag |= IMAGEPAINT_DRAWING;
undo_paint_push_begin(UNDO_PAINT_IMAGE, "Image Paint",
More information about the Bf-blender-cvs
mailing list