[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39372] branches/soc-2011-onion: smooth brush
Antony Riakiotakis
kalast at gmail.com
Sat Aug 13 23:39:21 CEST 2011
Revision: 39372
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39372
Author: psy-fi
Date: 2011-08-13 21:39:20 +0000 (Sat, 13 Aug 2011)
Log Message:
-----------
smooth brush
============
-Rename uv_smooth related variables to uv_paint, since this is what this will be.
-intoroduce RNA variable to toolsettings for uv tool specific options.
Modified Paths:
--------------
branches/soc-2011-onion/release/scripts/startup/bl_ui/space_image.py
branches/soc-2011-onion/source/blender/blenkernel/intern/paint.c
branches/soc-2011-onion/source/blender/blenkernel/intern/scene.c
branches/soc-2011-onion/source/blender/blenloader/intern/readfile.c
branches/soc-2011-onion/source/blender/blenloader/intern/writefile.c
branches/soc-2011-onion/source/blender/editors/include/ED_image.h
branches/soc-2011-onion/source/blender/editors/object/object_edit.c
branches/soc-2011-onion/source/blender/editors/screen/screen_ops.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_image.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_uv.c
branches/soc-2011-onion/source/blender/editors/space_image/image_ops.c
branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_draw.c
branches/soc-2011-onion/source/blender/makesdna/DNA_scene_types.h
branches/soc-2011-onion/source/blender/makesrna/intern/rna_scene.c
branches/soc-2011-onion/source/blenderplayer/bad_level_call_stubs/stubs.c
Modified: branches/soc-2011-onion/release/scripts/startup/bl_ui/space_image.py
===================================================================
--- branches/soc-2011-onion/release/scripts/startup/bl_ui/space_image.py 2011-08-13 21:10:29 UTC (rev 39371)
+++ branches/soc-2011-onion/release/scripts/startup/bl_ui/space_image.py 2011-08-13 21:39:20 UTC (rev 39372)
@@ -290,7 +290,7 @@
layout.menu("IMAGE_MT_uvs_showhide")
layout.separator()
- layout.prop(toolsettings, "use_smooth_brush")
+ layout.prop(toolsettings, "use_uv_paint")
layout.separator()
Modified: branches/soc-2011-onion/source/blender/blenkernel/intern/paint.c
===================================================================
--- branches/soc-2011-onion/source/blender/blenkernel/intern/paint.c 2011-08-13 21:10:29 UTC (rev 39371)
+++ branches/soc-2011-onion/source/blender/blenkernel/intern/paint.c 2011-08-13 21:39:20 UTC (rev 39372)
@@ -72,7 +72,7 @@
case OB_MODE_TEXTURE_PAINT:
return &ts->imapaint.paint;
case OB_MODE_EDIT:
- return &ts->uvsmooth->paint;
+ return &ts->uvpaint->paint;
}
}
Modified: branches/soc-2011-onion/source/blender/blenkernel/intern/scene.c
===================================================================
--- branches/soc-2011-onion/source/blender/blenkernel/intern/scene.c 2011-08-13 21:10:29 UTC (rev 39371)
+++ branches/soc-2011-onion/source/blender/blenkernel/intern/scene.c 2011-08-13 21:39:20 UTC (rev 39372)
@@ -304,9 +304,9 @@
free_paint(&sce->toolsettings->sculpt->paint);
MEM_freeN(sce->toolsettings->sculpt);
}
- if(sce->toolsettings->uvsmooth) {
- free_paint(&sce->toolsettings->uvsmooth->paint);
- MEM_freeN(sce->toolsettings->uvsmooth);
+ if(sce->toolsettings->uvpaint) {
+ free_paint(&sce->toolsettings->uvpaint->paint);
+ MEM_freeN(sce->toolsettings->uvpaint);
}
free_paint(&sce->toolsettings->imapaint.paint);
Modified: branches/soc-2011-onion/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/soc-2011-onion/source/blender/blenloader/intern/readfile.c 2011-08-13 21:10:29 UTC (rev 39371)
+++ branches/soc-2011-onion/source/blender/blenloader/intern/readfile.c 2011-08-13 21:39:20 UTC (rev 39372)
@@ -4464,7 +4464,7 @@
link_paint(fd, sce, &ts->vpaint->paint);
link_paint(fd, sce, &ts->wpaint->paint);
link_paint(fd, sce, &ts->imapaint.paint);
- link_paint(fd, sce, &ts->uvsmooth->paint);
+ link_paint(fd, sce, &ts->uvpaint->paint);
if(ts->paint_overlay.img) {
ts->paint_overlay.img=
@@ -4596,7 +4596,7 @@
direct_link_paint(fd, (Paint**)&sce->toolsettings->sculpt);
direct_link_paint(fd, (Paint**)&sce->toolsettings->vpaint);
direct_link_paint(fd, (Paint**)&sce->toolsettings->wpaint);
- direct_link_paint(fd, (Paint**)&sce->toolsettings->uvsmooth);
+ direct_link_paint(fd, (Paint**)&sce->toolsettings->uvpaint);
if (sce->toolsettings->sculpt)
sce->toolsettings->sculpt->paint.cache= NULL;
@@ -4607,8 +4607,8 @@
if (sce->toolsettings->wpaint)
sce->toolsettings->wpaint->paint.cache= NULL;
- if (sce->toolsettings->uvsmooth)
- sce->toolsettings->uvsmooth->paint.cache= NULL;
+ if (sce->toolsettings->uvpaint)
+ sce->toolsettings->uvpaint->paint.cache= NULL;
sce->toolsettings->imapaint.paint.cache= NULL;
Modified: branches/soc-2011-onion/source/blender/blenloader/intern/writefile.c
===================================================================
--- branches/soc-2011-onion/source/blender/blenloader/intern/writefile.c 2011-08-13 21:10:29 UTC (rev 39371)
+++ branches/soc-2011-onion/source/blender/blenloader/intern/writefile.c 2011-08-13 21:39:20 UTC (rev 39372)
@@ -1924,8 +1924,8 @@
if(tos->sculpt) {
writestruct(wd, DATA, "Sculpt", 1, tos->sculpt);
}
- if(tos->uvsmooth) {
- writestruct(wd, DATA, "UvSmooth", 1, tos->uvsmooth);
+ if(tos->uvpaint) {
+ writestruct(wd, DATA, "UvSmooth", 1, tos->uvpaint);
}
// write_paint(wd, &tos->imapaint.paint);
Modified: branches/soc-2011-onion/source/blender/editors/include/ED_image.h
===================================================================
--- branches/soc-2011-onion/source/blender/editors/include/ED_image.h 2011-08-13 21:10:29 UTC (rev 39371)
+++ branches/soc-2011-onion/source/blender/editors/include/ED_image.h 2011-08-13 21:39:20 UTC (rev 39372)
@@ -55,7 +55,7 @@
void ED_space_image_uv_aspect(struct SpaceImage *sima, float *aspx, float *aspy);
void ED_space_image_paint_update(struct wmWindowManager *wm, struct ToolSettings *settings);
-void ED_space_image_uv_smooth_update(struct wmWindowManager *wm, struct ToolSettings *settings);
+void ED_space_image_uv_paint_update(struct wmWindowManager *wm, struct ToolSettings *settings);
void ED_image_size(struct Image *ima, int *width, int *height);
void ED_image_aspect(struct Image *ima, float *aspx, float *aspy);
Modified: branches/soc-2011-onion/source/blender/editors/object/object_edit.c
===================================================================
--- branches/soc-2011-onion/source/blender/editors/object/object_edit.c 2011-08-13 21:10:29 UTC (rev 39371)
+++ branches/soc-2011-onion/source/blender/editors/object/object_edit.c 2011-08-13 21:39:20 UTC (rev 39372)
@@ -522,7 +522,7 @@
else
ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR); /* had EM_DO_UNDO but op flag calls undo too [#24685] */
- ED_space_image_uv_smooth_update(CTX_wm_manager(C), toolsettings);
+ ED_space_image_uv_paint_update(CTX_wm_manager(C), toolsettings);
return OPERATOR_FINISHED;
}
Modified: branches/soc-2011-onion/source/blender/editors/screen/screen_ops.c
===================================================================
--- branches/soc-2011-onion/source/blender/editors/screen/screen_ops.c 2011-08-13 21:10:29 UTC (rev 39371)
+++ branches/soc-2011-onion/source/blender/editors/screen/screen_ops.c 2011-08-13 21:39:20 UTC (rev 39372)
@@ -369,7 +369,7 @@
SpaceImage *sima= CTX_wm_space_image(C);
ToolSettings *toolsettings = CTX_data_scene(C)->toolsettings;
Object *obedit= CTX_data_edit_object(C);
- return ED_space_image_show_uvedit(sima, obedit) && !(toolsettings->use_uv_smooth);
+ return ED_space_image_show_uvedit(sima, obedit) && !(toolsettings->use_uv_paint);
}
Modified: branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_image.c
===================================================================
--- branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_image.c 2011-08-13 21:10:29 UTC (rev 39371)
+++ branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_image.c 2011-08-13 21:39:20 UTC (rev 39372)
@@ -4513,9 +4513,9 @@
Scene *scene= CTX_data_scene(C);
ToolSettings *settings= scene->toolsettings;
- if(!settings->uvsmooth)
+ if(!settings->uvpaint)
return NULL;
- return paint_brush(&settings->uvsmooth->paint);
+ return paint_brush(&settings->uvpaint->paint);
}
static int image_paint_poll(const bContext *C)
@@ -4542,7 +4542,7 @@
return 0;
}
-static int uv_smooth_brush_poll(const bContext *C)
+static int uv_paint_brush_poll(const bContext *C)
{
EditMesh *em;
int ret;
@@ -4559,7 +4559,7 @@
if(ret && sima) {
ARegion *ar= CTX_wm_region(C);
- if((toolsettings->use_uv_smooth) && ar->regiontype==RGN_TYPE_WINDOW)
+ if((toolsettings->use_uv_paint) && ar->regiontype==RGN_TYPE_WINDOW)
return 1;
}
@@ -5101,34 +5101,34 @@
}
-void ED_space_image_uv_smooth_update(wmWindowManager *wm, ToolSettings *settings)
+void ED_space_image_uv_paint_update(wmWindowManager *wm, ToolSettings *settings)
{
- if(!settings->uvsmooth){
- settings->uvsmooth = MEM_callocN(sizeof(*settings->uvsmooth), "UV Smooth paint");
+ if(!settings->uvpaint){
+ settings->uvpaint = MEM_callocN(sizeof(*settings->uvpaint), "UV Smooth paint");
}
paint_mode_init(
wm,
- &(settings->uvsmooth->paint),
+ &(settings->uvpaint->paint),
OB_MODE_TEXTURE_PAINT,
- uv_smooth_brush_poll,
+ uv_paint_brush_poll,
brush_drawcursor,
NULL);
- if(settings->use_uv_smooth){
- if(!settings->uvsmooth){
- settings->uvsmooth = MEM_callocN(sizeof(*settings->uvsmooth), "UV Smooth paint");
+ if(settings->use_uv_paint){
+ if(!settings->uvpaint){
+ settings->uvpaint = MEM_callocN(sizeof(*settings->uvpaint), "UV Smooth paint");
}
paint_mode_init(
wm,
- &(settings->uvsmooth->paint),
+ &(settings->uvpaint->paint),
OB_MODE_TEXTURE_PAINT,
- uv_smooth_brush_poll,
+ uv_paint_brush_poll,
brush_drawcursor,
NULL);
- settings->uvsmooth->paint.flags |= PAINT_SHOW_BRUSH;
+ settings->uvpaint->paint.flags |= PAINT_SHOW_BRUSH;
}
else {
- settings->uvsmooth->paint.flags &= ~PAINT_SHOW_BRUSH;
+ settings->uvpaint->paint.flags &= ~PAINT_SHOW_BRUSH;
}
}
/************************ grab clone operator ************************/
@@ -5459,7 +5459,7 @@
int uv_smooth_poll(bContext *C)
{
- return uv_smooth_brush_poll(C);
+ return uv_paint_brush_poll(C);
}
int facemask_paint_poll(bContext *C)
Modified: branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_uv.c
===================================================================
--- branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_uv.c 2011-08-13 21:10:29 UTC (rev 39371)
+++ branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_uv.c 2011-08-13 21:39:20 UTC (rev 39372)
@@ -456,7 +456,7 @@
GHashIterator* ghi;
MTFace *mt;
- data->uvpaint = &ts->uvsmooth->paint;
+ data->uvpaint = &ts->uvpaint->paint;
data->elementMap = EM_make_uv_element_map(em, 0, 0);
if(!data->elementMap){
uv_smooth_stroke_exit(C, op);
Modified: branches/soc-2011-onion/source/blender/editors/space_image/image_ops.c
===================================================================
--- branches/soc-2011-onion/source/blender/editors/space_image/image_ops.c 2011-08-13 21:10:29 UTC (rev 39371)
+++ branches/soc-2011-onion/source/blender/editors/space_image/image_ops.c 2011-08-13 21:39:20 UTC (rev 39372)
@@ -177,7 +177,7 @@
SpaceImage *sima= CTX_wm_space_image(C);
ToolSettings *toolsettings = CTX_data_scene(C)->toolsettings;
- if(sima && !toolsettings->uvsmooth)
+ if(sima && !toolsettings->uvpaint)
return 1;
return 0;
@@ -190,7 +190,7 @@
ToolSettings *toolsettings = CTX_data_scene(C)->toolsettings;
if(obedit){
- if(ED_space_image_show_uvedit(sima, obedit) && (toolsettings->use_uv_smooth))
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list