[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40334] branches/soc-2011-radish/source/ blender: Split do_weight_paint_vertex() to isolate the simple case.
Jason Hays
jason_hays22 at mymail.eku.edu
Sun Sep 18 19:10:29 CEST 2011
Revision: 40334
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40334
Author: jason_hays22
Date: 2011-09-18 17:10:28 +0000 (Sun, 18 Sep 2011)
Log Message:
-----------
Split do_weight_paint_vertex() to isolate the simple case.
Added a tool-tip to the "fix deforms" op.
Removed code markers:
"Radish"
Modified Paths:
--------------
branches/soc-2011-radish/source/blender/blenkernel/BKE_paint.h
branches/soc-2011-radish/source/blender/blenkernel/intern/DerivedMesh.c
branches/soc-2011-radish/source/blender/blenkernel/intern/armature.c
branches/soc-2011-radish/source/blender/blenkernel/intern/paint.c
branches/soc-2011-radish/source/blender/blenkernel/intern/particle.c
branches/soc-2011-radish/source/blender/editors/armature/editarmature.c
branches/soc-2011-radish/source/blender/editors/armature/meshlaplacian.c
branches/soc-2011-radish/source/blender/editors/include/ED_mesh.h
branches/soc-2011-radish/source/blender/editors/include/ED_view3d.h
branches/soc-2011-radish/source/blender/editors/interface/interface_handlers.c
branches/soc-2011-radish/source/blender/editors/interface/interface_templates.c
branches/soc-2011-radish/source/blender/editors/mesh/editmesh.c
branches/soc-2011-radish/source/blender/editors/mesh/editmesh_mods.c
branches/soc-2011-radish/source/blender/editors/object/object_intern.h
branches/soc-2011-radish/source/blender/editors/object/object_ops.c
branches/soc-2011-radish/source/blender/editors/object/object_vgroup.c
branches/soc-2011-radish/source/blender/editors/sculpt_paint/paint_image.c
branches/soc-2011-radish/source/blender/editors/sculpt_paint/paint_intern.h
branches/soc-2011-radish/source/blender/editors/sculpt_paint/paint_ops.c
branches/soc-2011-radish/source/blender/editors/sculpt_paint/paint_utils.c
branches/soc-2011-radish/source/blender/editors/sculpt_paint/paint_vertex.c
branches/soc-2011-radish/source/blender/editors/space_view3d/drawobject.c
branches/soc-2011-radish/source/blender/editors/space_view3d/space_view3d.c
branches/soc-2011-radish/source/blender/editors/space_view3d/view3d_header.c
branches/soc-2011-radish/source/blender/editors/space_view3d/view3d_select.c
branches/soc-2011-radish/source/blender/imbuf/intern/md5.c
branches/soc-2011-radish/source/blender/makesdna/DNA_mesh_types.h
branches/soc-2011-radish/source/blender/makesdna/DNA_object_types.h
branches/soc-2011-radish/source/blender/makesdna/DNA_scene_types.h
branches/soc-2011-radish/source/blender/makesrna/intern/rna_mesh.c
branches/soc-2011-radish/source/blender/makesrna/intern/rna_object.c
branches/soc-2011-radish/source/blender/makesrna/intern/rna_scene.c
Modified: branches/soc-2011-radish/source/blender/blenkernel/BKE_paint.h
===================================================================
--- branches/soc-2011-radish/source/blender/blenkernel/BKE_paint.h 2011-09-18 15:37:36 UTC (rev 40333)
+++ branches/soc-2011-radish/source/blender/blenkernel/BKE_paint.h 2011-09-18 17:10:28 UTC (rev 40334)
@@ -59,7 +59,7 @@
* Texture paint could be removed since selected faces are not used
* however hiding faces is useful */
int paint_facesel_test(struct Object *ob);
-/* Radish */
+
int paint_vertsel_test(struct Object *ob);
/* Session data (mode-specific) */
Modified: branches/soc-2011-radish/source/blender/blenkernel/intern/DerivedMesh.c
===================================================================
--- branches/soc-2011-radish/source/blender/blenkernel/intern/DerivedMesh.c 2011-09-18 15:37:36 UTC (rev 40333)
+++ branches/soc-2011-radish/source/blender/blenkernel/intern/DerivedMesh.c 2011-09-18 17:10:28 UTC (rev 40334)
@@ -40,7 +40,7 @@
#include "DNA_cloth_types.h"
#include "DNA_key_types.h"
#include "DNA_meshdata_types.h"
-/* Radish */
+
#include "DNA_armature_types.h"
#include "DNA_object_types.h"
@@ -1689,12 +1689,12 @@
float colf[4], input = 0.0f;
int i;
- /* Radish */
+
int make_black= FALSE;
if (me->dvert) {
if ((selected > 1) && (draw_flag & CALC_WP_MULTIPAINT)) {
- /* Radish */
+
int was_a_nonzero= FALSE;
for (i=0; i<me->dvert[vert].totweight; i++) {
/* in multipaint, get the average if auto normalize is inactive
@@ -1761,7 +1761,7 @@
unsigned char *wtcol;
int i;
- /* Radish */
+
int defbase_len = BLI_countlist(&ob->defbase);
char *defbase_sel = MEM_mallocN(defbase_len * sizeof(char), __func__);
int selected = get_selected_defgroups(ob, defbase_sel, defbase_len);
@@ -1777,7 +1777,7 @@
if (mf->v4)
calc_weightpaint_vert_color(ob, coba, mf->v4, &wtcol[(i*4 + 3)*4], defbase_sel, selected, unselected, draw_flag);
}
- /* Radish */
+
MEM_freeN(defbase_sel);
CustomData_add_layer(&dm->faceData, CD_WEIGHT_MCOL, CD_ASSIGN, wtcol, dm->numFaceData);
@@ -1807,7 +1807,7 @@
int has_multires = mmd != NULL, multires_applied = 0;
int sculpt_mode = ob->mode & OB_MODE_SCULPT && ob->sculpt;
- /* Radish */
+
int draw_flag= ((scene->toolsettings->multipaint ? CALC_WP_MULTIPAINT : 0) |
(scene->toolsettings->auto_normalize ? CALC_WP_AUTO_NORMALIZE : 0));
@@ -1990,7 +1990,7 @@
}
if((dataMask & CD_MASK_WEIGHT_MCOL) && (ob->mode & OB_MODE_WEIGHT_PAINT))
- add_weight_mcol_dm(ob, dm, draw_flag); /* Radish */
+ add_weight_mcol_dm(ob, dm, draw_flag);
/* Constructive modifiers need to have an origindex
* otherwise they wont have anywhere to copy the data from.
@@ -2102,7 +2102,7 @@
CDDM_calc_normals(finaldm);
if((dataMask & CD_MASK_WEIGHT_MCOL) && (ob->mode & OB_MODE_WEIGHT_PAINT))
- add_weight_mcol_dm(ob, finaldm, draw_flag);/* Radish */
+ add_weight_mcol_dm(ob, finaldm, draw_flag);
} else if(dm) {
finaldm = dm;
} else {
@@ -2114,7 +2114,7 @@
}
if((dataMask & CD_MASK_WEIGHT_MCOL) && (ob->mode & OB_MODE_WEIGHT_PAINT))
- add_weight_mcol_dm(ob, finaldm, draw_flag);/* Radish */
+ add_weight_mcol_dm(ob, finaldm, draw_flag);
}
/* add an orco layer if needed */
@@ -2387,7 +2387,7 @@
static void mesh_build_data(Scene *scene, Object *ob, CustomDataMask dataMask)
{
Object *obact = scene->basact?scene->basact->object:NULL;
- int editing = paint_facesel_test(ob) || paint_vertsel_test(ob);/* Radish: paint_vertsel_test */
+ int editing = paint_facesel_test(ob) || paint_vertsel_test(ob);/* paint_vertsel_test */
/* weight paint and face select need original indices because of selection buffer drawing */
int needMapping = (ob==obact) && (editing || (ob->mode & (OB_MODE_WEIGHT_PAINT|OB_MODE_VERTEX_PAINT)));
Modified: branches/soc-2011-radish/source/blender/blenkernel/intern/armature.c
===================================================================
--- branches/soc-2011-radish/source/blender/blenkernel/intern/armature.c 2011-09-18 15:37:36 UTC (rev 40333)
+++ branches/soc-2011-radish/source/blender/blenkernel/intern/armature.c 2011-09-18 17:10:28 UTC (rev 40334)
@@ -2465,7 +2465,7 @@
}
}
-/* Radish */
+
/* Returns total selected vgroups */
int get_selected_defgroups(Object *ob, char *dg_selection, int defbase_len)
{
Modified: branches/soc-2011-radish/source/blender/blenkernel/intern/paint.c
===================================================================
--- branches/soc-2011-radish/source/blender/blenkernel/intern/paint.c 2011-09-18 15:37:36 UTC (rev 40333)
+++ branches/soc-2011-radish/source/blender/blenkernel/intern/paint.c 2011-09-18 17:10:28 UTC (rev 40334)
@@ -96,7 +96,7 @@
{
return (ob && ob->type==OB_MESH && ob->data && (((Mesh *)ob->data)->editflag & ME_EDIT_PAINT_MASK) && (ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT)));
}
-/* Radish */
+
int paint_vertsel_test(Object *ob)
{
return (ob && ob->type==OB_MESH && ob->data && (((Mesh *)ob->data)->editflag & ME_EDIT_VERT_SEL) && (ob->mode & OB_MODE_WEIGHT_PAINT));
Modified: branches/soc-2011-radish/source/blender/blenkernel/intern/particle.c
===================================================================
--- branches/soc-2011-radish/source/blender/blenkernel/intern/particle.c 2011-09-18 15:37:36 UTC (rev 40333)
+++ branches/soc-2011-radish/source/blender/blenkernel/intern/particle.c 2011-09-18 17:10:28 UTC (rev 40334)
@@ -2870,7 +2870,7 @@
PARTICLE_P;
float birthtime = 0.0, dietime = 0.0;
- float t, time = 0.0, dfra = 1.0 /* , frs_sec = sim->scene->r.frs_sec*/ /*UNUSED*/;
+ float t, time = 0.0, dfra = 1.0 /* frs_sec = sim->scene->r.frs_sec*/ /*UNUSED*/;
float col[4] = {0.5f, 0.5f, 0.5f, 1.0f};
float prev_tangent[3] = {0.0f, 0.0f, 0.0f}, hairmat[4][4];
float rotmat[3][3];
Modified: branches/soc-2011-radish/source/blender/editors/armature/editarmature.c
===================================================================
--- branches/soc-2011-radish/source/blender/editors/armature/editarmature.c 2011-09-18 15:37:36 UTC (rev 40333)
+++ branches/soc-2011-radish/source/blender/editors/armature/editarmature.c 2011-09-18 17:10:28 UTC (rev 40334)
@@ -5066,7 +5066,7 @@
static int pose_de_select_all_exec(bContext *C, wmOperator *op)
{
int action = RNA_enum_get(op->ptr, "action");
- //Radish
+
Object *ob = NULL;
Scene *scene= CTX_data_scene(C);
int multipaint = scene->toolsettings->multipaint;
@@ -5099,7 +5099,7 @@
CTX_DATA_END;
WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, NULL);
- /* Radish */
+
if(multipaint) {
ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
Modified: branches/soc-2011-radish/source/blender/editors/armature/meshlaplacian.c
===================================================================
--- branches/soc-2011-radish/source/blender/editors/armature/meshlaplacian.c 2011-09-18 15:37:36 UTC (rev 40333)
+++ branches/soc-2011-radish/source/blender/editors/armature/meshlaplacian.c 2011-09-18 17:10:28 UTC (rev 40334)
@@ -657,7 +657,7 @@
int *vertsflipped = NULL, *mask= NULL;
int a, totface, j, bbone, firstsegment, lastsegment;
- /* Radish */
+
MVert *mv = me->mvert;
int use_vert_sel= FALSE;
@@ -670,7 +670,7 @@
for(totface=0, a=0, mface=me->mface; a<me->totface; a++, mface++) {
totface++;
if(mface->v4) totface++;
- /* Radish (added selectedVerts content for vertex mask, they used to just equal 1) */
+ /* (added selectedVerts content for vertex mask, they used to just equal 1) */
if(mask && ((mface->flag & ME_FACE_SEL) || use_vert_sel)) {
mask[mface->v1]= use_vert_sel ? ((mv+mface->v1)->flag & 1): 1;
mask[mface->v2]= use_vert_sel ? ((mv+mface->v2)->flag & 1): 1;
Modified: branches/soc-2011-radish/source/blender/editors/include/ED_mesh.h
===================================================================
--- branches/soc-2011-radish/source/blender/editors/include/ED_mesh.h 2011-09-18 15:37:36 UTC (rev 40333)
+++ branches/soc-2011-radish/source/blender/editors/include/ED_mesh.h 2011-09-18 17:10:28 UTC (rev 40334)
@@ -122,7 +122,7 @@
int EM_vertColorCheck(struct EditMesh *em);
void undo_push_mesh(struct bContext *C, const char *name);
-/* Radish */
+
void paintvert_flush_flags(struct Object *ob);
void paintvert_deselect_all_visible(struct Object *ob, int action, short flush_flags);
Modified: branches/soc-2011-radish/source/blender/editors/include/ED_view3d.h
===================================================================
--- branches/soc-2011-radish/source/blender/editors/include/ED_view3d.h 2011-09-18 15:37:36 UTC (rev 40333)
+++ branches/soc-2011-radish/source/blender/editors/include/ED_view3d.h 2011-09-18 17:10:28 UTC (rev 40334)
@@ -216,7 +216,7 @@
void ED_view3d_calc_camera_border(struct Scene *scene, struct ARegion *ar, struct View3D *v3d, struct RegionView3D *rv3d, struct rctf *viewborder_r, short do_shift);
/* drawobject.c iterators */
-/* Radish */
+
void mesh_obmode_foreachScreenVert(struct ViewContext *vc, void (*func)(void *userData, struct MVert *mv, int x, int y, int index), void *userData, int clipVerts);
void mesh_foreachScreenVert(struct ViewContext *vc, void (*func)(void *userData, struct EditVert *eve, int x, int y, int index), void *userData, int clipVerts);
Modified: branches/soc-2011-radish/source/blender/editors/interface/interface_handlers.c
===================================================================
--- branches/soc-2011-radish/source/blender/editors/interface/interface_handlers.c 2011-09-18 15:37:36 UTC (rev 40333)
+++ branches/soc-2011-radish/source/blender/editors/interface/interface_handlers.c 2011-09-18 17:10:28 UTC (rev 40334)
@@ -3778,7 +3778,7 @@
Scopes *scopes = (Scopes *)but->poin;
/* rcti rect; */
int changed= 1;
- float /* dx, */ dy /* , yfac=1.f */; /* UNUSED */
+ float /* dx, */ dy /* yfac=1.f */; /* UNUSED */
/* rect.xmin= but->x1; rect.xmax= but->x2; */
/* rect.ymin= but->y1; rect.ymax= but->y2; */
Modified: branches/soc-2011-radish/source/blender/editors/interface/interface_templates.c
===================================================================
--- branches/soc-2011-radish/source/blender/editors/interface/interface_templates.c 2011-09-18 15:37:36 UTC (rev 40333)
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list