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>2012-03-03 20:31:46 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-03 20:31:46 +0400
commita2c182e9233333fc3b8ff40d352113ec95e7e30c (patch)
tree37a9e08f4e6c4bf794aa0c8c15af875299db4a1b /source/blender/editors/object
parent86cec98f9e1523ed41b67ef998174289dbae9b83 (diff)
style cleanup - use aligned * prefixed blocks for descriptive comments (was already used a lot and part of proposed style guide).
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_add.c16
-rw-r--r--source/blender/editors/object/object_bake.c37
-rw-r--r--source/blender/editors/object/object_group.c4
-rw-r--r--source/blender/editors/object/object_hook.c4
-rw-r--r--source/blender/editors/object/object_modifier.c26
-rw-r--r--source/blender/editors/object/object_relations.c2
-rw-r--r--source/blender/editors/object/object_select.c2
-rw-r--r--source/blender/editors/object/object_transform.c6
-rw-r--r--source/blender/editors/object/object_vgroup.c46
9 files changed, 70 insertions, 73 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 29526825736..0c12d701616 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -278,7 +278,7 @@ int ED_object_add_generic_get_opts(bContext *C, wmOperator *op, float *loc,
}
/* in local view we additionally add local view layers,
- not part of operator properties */
+ * not part of operator properties */
if(v3d && v3d->localvd)
*layer |= v3d->lay;
@@ -1073,8 +1073,8 @@ static void make_object_duplilist_real(bContext *C, Scene *scene, Base *base,
Base *basen;
Object *ob= copy_object(dob->ob);
/* font duplis can have a totcol without material, we get them from parent
- * should be implemented better...
- */
+ * should be implemented better...
+ */
if(ob->mat==NULL) ob->totcol= 0;
basen= MEM_dupallocN(base);
@@ -1600,10 +1600,10 @@ void OBJECT_OT_convert(wmOperatorType *ot)
/**************************** Duplicate ************************/
/*
- dupflag: a flag made from constants declared in DNA_userdef_types.h
- The flag tells adduplicate() weather to copy data linked to the object, or to reference the existing data.
- U.dupflag for default operations or you can construct a flag as python does
- if the dupflag is 0 then no data will be copied (linked duplicate) */
+ * dupflag: a flag made from constants declared in DNA_userdef_types.h
+ * The flag tells adduplicate() weather to copy data linked to the object, or to reference the existing data.
+ * U.dupflag for default operations or you can construct a flag as python does
+ * if the dupflag is 0 then no data will be copied (linked duplicate) */
/* used below, assumes id.new is correct */
/* leaves selection of base/object unaltered */
@@ -1878,7 +1878,7 @@ static int duplicate_exec(bContext *C, wmOperator *op)
Base *basen= object_add_duplicate_internal(bmain, scene, base, dupflag);
/* note that this is safe to do with this context iterator,
- the list is made in advance */
+ * the list is made in advance */
ED_base_object_select(base, BA_DESELECT);
if (basen == NULL) {
diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c
index 340a6df8bf6..f1fbf27312a 100644
--- a/source/blender/editors/object/object_bake.c
+++ b/source/blender/editors/object/object_bake.c
@@ -30,11 +30,6 @@
* \ingroup edobj
*/
-
-/*
- meshtools.c: no editmode (violated already :), tools operating on meshes
-*/
-
#include <string.h>
#include "MEM_guardedalloc.h"
@@ -86,7 +81,7 @@
/* ****************** multires BAKING ********************** */
/* holder of per-object data needed for bake job
- needed to make job totally thread-safe */
+ * needed to make job totally thread-safe */
typedef struct MultiresBakerJobData {
struct MultiresBakerJobData *next, *prev;
DerivedMesh *lores_dm, *hires_dm;
@@ -239,11 +234,11 @@ static void flush_pixel(const MResolvePixelData *data, const int x, const int y)
w= 1-u-v;
/* the sign is the same at all face vertices for any non degenerate face.
- Just in case we clamp the interpolated value though. */
+ * Just in case we clamp the interpolated value though. */
sign= (tang0[3]*u + tang1[3]*v + tang2[3]*w)<0 ? (-1.0f) : 1.0f;
/* this sequence of math is designed specifically as is with great care
- to be compatible with our shader. Please don't change without good reason. */
+ * to be compatible with our shader. Please don't change without good reason. */
for(r= 0; r<3; r++) {
from_tang[0][r]= tang0[r]*u + tang1[r]*v + tang2[r]*w;
from_tang[2][r]= no0[r]*u + no1[r]*v + no2[r]*w;
@@ -413,7 +408,7 @@ static void do_multires_bake(MultiresBakeRender *bkr, Image* ima, MPassKnownData
data.face_index= f;
/* might support other forms of diagonal splits later on such as
- split by shortest diagonal.*/
+ * split by shortest diagonal.*/
verts[0][0]=0;
verts[1][0]=1;
verts[2][0]=2;
@@ -475,7 +470,7 @@ static void interp_barycentric_tri_data(float data[3][3], float u, float v, floa
}
/* mode = 0: interpolate normals,
- mode = 1: interpolate coord */
+ * mode = 1: interpolate coord */
static void interp_bilinear_grid(DMGridData *grid, int grid_size, float crn_x, float crn_y, int mode, float res[3])
{
int x0, x1, y0, y1;
@@ -552,7 +547,7 @@ static void get_ccgdm_data(DerivedMesh *lodm, DerivedMesh *hidm, const int *orig
}
/* mode = 0: interpolate normals,
- mode = 1: interpolate coord */
+ * mode = 1: interpolate coord */
static void interp_bilinear_mface(DerivedMesh *dm, MFace *mface, const float u, const float v, const int mode, float res[3])
{
float data[4][3];
@@ -573,7 +568,7 @@ static void interp_bilinear_mface(DerivedMesh *dm, MFace *mface, const float u,
}
/* mode = 0: interpolate normals,
- mode = 1: interpolate coord */
+ * mode = 1: interpolate coord */
static void interp_barycentric_mface(DerivedMesh *dm, MFace *mface, const float u, const float v, const int mode, float res[3])
{
float data[3][3];
@@ -691,11 +686,11 @@ static void free_heights_data(void *bake_data)
}
/* MultiresBake callback for heights baking
- general idea:
- - find coord of point with specified UV in hi-res mesh (let's call it p1)
- - find coord of point and normal with specified UV in lo-res mesh (or subdivided lo-res
- mesh to make texture smoother) let's call this point p0 and n.
- - height wound be dot(n, p1-p0) */
+ * general idea:
+ * - find coord of point with specified UV in hi-res mesh (let's call it p1)
+ * - find coord of point and normal with specified UV in lo-res mesh (or subdivided lo-res
+ * mesh to make texture smoother) let's call this point p0 and n.
+ * - height wound be dot(n, p1-p0) */
static void apply_heights_callback(DerivedMesh *lores_dm, DerivedMesh *hires_dm, const void *bake_data,
const int face_index, const int lvl, const float st[2],
float UNUSED(tangmat[3][3]), const int x, const int y)
@@ -759,10 +754,10 @@ static void apply_heights_callback(DerivedMesh *lores_dm, DerivedMesh *hires_dm,
}
/* MultiresBake callback for normals' baking
- general idea:
- - find coord and normal of point with specified UV in hi-res mesh
- - multiply it by tangmat
- - vector in color space would be norm(vec) /2 + (0.5, 0.5, 0.5) */
+ * general idea:
+ * - find coord and normal of point with specified UV in hi-res mesh
+ * - multiply it by tangmat
+ * - vector in color space would be norm(vec) /2 + (0.5, 0.5, 0.5) */
static void apply_tangmat_callback(DerivedMesh *lores_dm, DerivedMesh *hires_dm, const void *bake_data,
const int face_index, const int lvl, const float st[2],
float tangmat[3][3], const int x, const int y)
diff --git a/source/blender/editors/object/object_group.c b/source/blender/editors/object/object_group.c
index 1b8c0fd0840..d5dfbda8696 100644
--- a/source/blender/editors/object/object_group.c
+++ b/source/blender/editors/object/object_group.c
@@ -70,7 +70,7 @@ static int objects_add_active_exec(bContext *C, wmOperator *op)
if(!ob) return OPERATOR_CANCELLED;
/* linking to same group requires its own loop so we can avoid
- looking up the active objects groups each time */
+ * looking up the active objects groups each time */
for(group= bmain->group.first; group; group=group->id.next) {
if(object_in_group(ob, group)) {
@@ -117,7 +117,7 @@ static int objects_remove_active_exec(bContext *C, wmOperator *op)
if(!ob) return OPERATOR_CANCELLED;
/* linking to same group requires its own loop so we can avoid
- looking up the active objects groups each time */
+ * looking up the active objects groups each time */
for(group= bmain->group.first; group; group=group->id.next) {
if(object_in_group(ob, group)) {
diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c
index 8b5a9ae6c9b..eb128ad3025 100644
--- a/source/blender/editors/object/object_hook.c
+++ b/source/blender/editors/object/object_hook.c
@@ -613,7 +613,7 @@ void OBJECT_OT_hook_remove(wmOperatorType *ot)
/* flags */
/* this operator removes modifier which isn't stored in local undo stack,
- so redoing it from redo panel gives totally weird results */
+ * so redoing it from redo panel gives totally weird results */
ot->flag= /*OPTYPE_REGISTER|*/OPTYPE_UNDO;
/* properties */
@@ -802,7 +802,7 @@ void OBJECT_OT_hook_assign(wmOperatorType *ot)
/* flags */
/* this operator changes data stored in modifier which doesn't get pushed to undo stack,
- so redoing it from redo panel gives totally weird results */
+ * so redoing it from redo panel gives totally weird results */
ot->flag= /*OPTYPE_REGISTER|*/OPTYPE_UNDO;
/* properties */
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index c5d81969098..bda373dd441 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -217,7 +217,7 @@ static int object_modifier_remove(Object *ob, ModifierData *md, int *sort_depsgr
if(me->edit_btmesh) {
BMEditMesh *em= me->edit_btmesh;
/* CustomData_external_remove is used here only to mark layer as non-external
- for further free-ing, so zero element count looks safer than em->totface */
+ * for further free-ing, so zero element count looks safer than em->totface */
CustomData_external_remove(&em->bm->ldata, &me->id, CD_MDISPS, 0);
BM_data_layer_free(em->bm, &em->bm->ldata, CD_MDISPS);
} else {
@@ -447,15 +447,15 @@ static int modifier_apply_shape(ReportList *reports, Scene *scene, Object *ob, M
}
/*
- It should be ridiculously easy to extract the original verts that we want
- and form the shape data. We can probably use the CD KEYINDEX layer (or
- whatever I ended up calling it, too tired to check now), though this would
- by necassity have to make some potentially ugly assumptions about the order
- of the mesh data :-/ you can probably assume in 99% of cases that the first
- element of a given index is the original, and any subsequent duplicates are
- copies/interpolates, but that's an assumption that would need to be tested
- and then predominantly stated in comments in a half dozen headers.
- */
+ * It should be ridiculously easy to extract the original verts that we want
+ * and form the shape data. We can probably use the CD KEYINDEX layer (or
+ * whatever I ended up calling it, too tired to check now), though this would
+ * by necassity have to make some potentially ugly assumptions about the order
+ * of the mesh data :-/ you can probably assume in 99% of cases that the first
+ * element of a given index is the original, and any subsequent duplicates are
+ * copies/interpolates, but that's an assumption that would need to be tested
+ * and then predominantly stated in comments in a half dozen headers.
+ */
if (ob->type==OB_MESH) {
DerivedMesh *dm;
@@ -1654,7 +1654,7 @@ static int ocean_bake_exec(bContext *C, wmOperator *op)
/* precalculate time variable before baking */
for (f=omd->bakestart; f<=omd->bakeend; f++) {
/* from physics_fluid.c:
-
+ *
* XXX: This can't be used due to an anim sys optimization that ignores recalc object animation,
* leaving it for the depgraph (this ignores object animation such as modifier properties though... :/ )
* --> BKE_animsys_evaluate_all_animation(G.main, eval_time);
@@ -1680,7 +1680,7 @@ static int ocean_bake_exec(bContext *C, wmOperator *op)
ocean = BKE_add_ocean();
init_ocean_modifier_bake(ocean, omd);
- /*
+#if 0
BKE_bake_ocean(ocean, och);
omd->oceancache = och;
@@ -1690,7 +1690,7 @@ static int ocean_bake_exec(bContext *C, wmOperator *op)
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
- */
+#endif
/* job stuff */
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 2281d7a26d8..2945075b9de 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -134,7 +134,7 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op)
em= me->edit_btmesh;
/* derivedMesh might be needed for solving parenting,
- so re-create it here */
+ * so re-create it here */
makeDerivedMesh(scene, obedit, em, CD_MASK_BAREMESH, 0);
BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
index 69372ac1a90..4377aad0c42 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -123,7 +123,7 @@ void ED_base_object_activate(bContext *C, Base *base)
static int objects_selectable_poll(bContext *C)
{
/* we don't check for linked scenes here, selection is
- still allowed then for inspection of scene */
+ * still allowed then for inspection of scene */
Object *obact= CTX_data_active_object(C);
if(CTX_data_edit_object(C))
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index 45db21749a5..be41f08df8e 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -815,8 +815,10 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
bArmature *arm = ob->data;
if(ID_REAL_USERS(arm) > 1) {
- /*BKE_report(op->reports, RPT_ERROR, "Can't apply to a multi user armature");
- return;*/
+#if 0
+ BKE_report(op->reports, RPT_ERROR, "Can't apply to a multi user armature");
+ return;
+#endif
tot_multiuser_arm_error++;
}
else {
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index f610d758243..b545598f240 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -815,8 +815,8 @@ static int* getSurroundingVerts(Mesh *me, int vert, int *count)
}
/* get a single point in space by averaging a point cloud (vectors of size 3)
-coord is the place the average is stored, points is the point cloud, count is the number of points in the cloud
-*/
+ * coord is the place the average is stored, points is the point cloud, count is the number of points in the cloud
+ */
static void getSingleCoordinate(MVert *points, int count, float coord[3])
{
int i;
@@ -828,9 +828,9 @@ static void getSingleCoordinate(MVert *points, int count, float coord[3])
}
/* given a plane and a start and end position,
-compute the amount of vertical distance relative to the plane and store it in dists,
-then get the horizontal and vertical change and store them in changes
-*/
+ * compute the amount of vertical distance relative to the plane and store it in dists,
+ * then get the horizontal and vertical change and store them in changes
+ */
static void getVerticalAndHorizontalChange(const float norm[3], float d, const float coord[3],
const float start[3], float distToStart,
float *end, float (*changes)[2], float *dists, int index)
@@ -865,21 +865,21 @@ static void dm_deform_clear(DerivedMesh *dm, Object *ob)
}
}
-// recalculate the deformation
+/* recalculate the deformation */
static DerivedMesh* dm_deform_recalc(Scene *scene, Object *ob)
{
return mesh_get_derived_deform(scene, ob, CD_MASK_BAREMESH);
}
/* by changing nonzero weights, try to move a vertex in me->mverts with index 'index' to
-distToBe distance away from the provided plane strength can change distToBe so that it moves
-towards distToBe by that percentage cp changes how much the weights are adjusted
-to check the distance
-
-index is the index of the vertex being moved
-norm and d are the plane's properties for the equation: ax + by + cz + d = 0
-coord is a point on the plane
-*/
+ * distToBe distance away from the provided plane strength can change distToBe so that it moves
+ * towards distToBe by that percentage cp changes how much the weights are adjusted
+ * to check the distance
+ *
+ * index is the index of the vertex being moved
+ * norm and d are the plane's properties for the equation: ax + by + cz + d = 0
+ * coord is a point on the plane
+ */
static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, int index, float norm[3],
float coord[3], float d, float distToBe, float strength, float cp)
{
@@ -1049,7 +1049,7 @@ static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, in
}
/* this is used to try to smooth a surface by only adjusting the nonzero weights of a vertex
-but it could be used to raise or lower an existing 'bump.' */
+ * but it could be used to raise or lower an existing 'bump.' */
static void vgroup_fix(Scene *scene, Object *ob, float distToBe, float strength, float cp)
{
int i;
@@ -2115,8 +2115,8 @@ void OBJECT_OT_vertex_group_remove(wmOperatorType *ot)
/* flags */
/* redo operator will fail in this case because vertex groups aren't stored
- in local edit mode stack and toggling "all" property will lead to
- all groups deleted without way to restore them (see [#29527], sergey) */
+ * in local edit mode stack and toggling "all" property will lead to
+ * all groups deleted without way to restore them (see [#29527], sergey) */
ot->flag= /*OPTYPE_REGISTER|*/OPTYPE_UNDO;
/* properties */
@@ -2150,8 +2150,8 @@ void OBJECT_OT_vertex_group_assign(wmOperatorType *ot)
/* flags */
/* redo operator will fail in this case because vertex group assignment
- isn't stored in local edit mode stack and toggling "new" property will
- lead to creating plenty of new veretx groups (see [#29527], sergey) */
+ * isn't stored in local edit mode stack and toggling "new" property will
+ * lead to creating plenty of new veretx groups (see [#29527], sergey) */
ot->flag= /*OPTYPE_REGISTER|*/OPTYPE_UNDO;
/* properties */
@@ -2192,8 +2192,8 @@ void OBJECT_OT_vertex_group_remove_from(wmOperatorType *ot)
/* flags */
/* redo operator will fail in this case because vertex groups ssignment
- isn't stored in local edit mode stack and toggling "all" property will lead to
- removing vertices from all groups (see [#29527], sergey) */
+ * isn't stored in local edit mode stack and toggling "all" property will lead to
+ * removing vertices from all groups (see [#29527], sergey) */
ot->flag= /*OPTYPE_REGISTER|*/OPTYPE_UNDO;
/* properties */
@@ -2733,8 +2733,8 @@ void OBJECT_OT_vertex_group_set_active(wmOperatorType *ot)
ot->prop= prop;
}
-/*creates the name_array parameter for vgroup_do_remap, call this before fiddling
- with the order of vgroups then call vgroup_do_remap after*/
+/* creates the name_array parameter for vgroup_do_remap, call this before fiddling
+ * with the order of vgroups then call vgroup_do_remap after*/
static char *vgroup_init_remap(Object *ob)
{
bDeformGroup *def;