Cleanup: format disabled code

This commit is contained in:
Campbell Barton 2023-08-09 10:47:43 +10:00
parent faaac97239
commit 1a675d0c47
52 changed files with 265 additions and 250 deletions

View File

@ -225,12 +225,14 @@ void BKE_fluid_reallocate_copy_fluid(FluidDomainSettings *fds,
/* Skip if trying to copy from old boundary cell. */
if (xo < bwidth || yo < bwidth || zo < bwidth || xo >= o_res[0] - bwidth ||
yo >= o_res[1] - bwidth || zo >= o_res[2] - bwidth) {
yo >= o_res[1] - bwidth || zo >= o_res[2] - bwidth)
{
continue;
}
/* Skip if trying to copy into new boundary cell. */
if (xn < bwidth || yn < bwidth || zn < bwidth || xn >= n_res[0] - bwidth ||
yn >= n_res[1] - bwidth || zn >= n_res[2] - bwidth) {
yn >= n_res[1] - bwidth || zn >= n_res[2] - bwidth)
{
continue;
}
# endif

View File

@ -4360,8 +4360,8 @@ static void particles_fluid_step(ParticleSimulationData *sim,
return;
}
# if 0
/* Debugging: Print type of particle system and current particles. */
printf("system type is %d and particle type is %d\n", part->type, flagActivePart);
/* Debugging: Print type of particle system and current particles. */
printf("system type is %d and particle type is %d\n", part->type, flagActivePart);
# endif
/* Type of particle must match current particle system type
@ -4379,8 +4379,8 @@ printf("system type is %d and particle type is %d\n", part->type, flagActivePart
continue;
}
# if 0
/* Debugging: Print type of particle system and current particles. */
printf("system type is %d and particle type is %d\n", part->type, flagActivePart);
/* Debugging: Print type of particle system and current particles. */
printf("system type is %d and particle type is %d\n", part->type, flagActivePart);
# endif
/* Particle system has allocated 'tottypepart' particles - so break early before exceeded.
*/
@ -4438,16 +4438,22 @@ printf("system type is %d and particle type is %d\n", part->type, flagActivePart
mul_v3_v3(tmp, ob->scale);
add_v3_v3(pa->state.co, tmp);
# if 0
/* Debugging: Print particle coordinates. */
printf("pa->state.co[0]: %f, pa->state.co[1]: %f, pa->state.co[2]: %f\n", pa->state.co[0], pa->state.co[1], pa->state.co[2]);
/* Debugging: Print particle coordinates. */
printf("pa->state.co[0]: %f, pa->state.co[1]: %f, pa->state.co[2]: %f\n",
pa->state.co[0],
pa->state.co[1],
pa->state.co[2]);
# endif
/* Set particle velocity. */
const float velParticle[3] = {velX, velY, velZ};
copy_v3_v3(pa->state.vel, velParticle);
mul_v3_fl(pa->state.vel, fds->dx);
# if 0
/* Debugging: Print particle velocity. */
printf("pa->state.vel[0]: %f, pa->state.vel[1]: %f, pa->state.vel[2]: %f\n", pa->state.vel[0], pa->state.vel[1], pa->state.vel[2]);
/* Debugging: Print particle velocity. */
printf("pa->state.vel[0]: %f, pa->state.vel[1]: %f, pa->state.vel[2]: %f\n",
pa->state.vel[0],
pa->state.vel[1],
pa->state.vel[2]);
# endif
/* Set default angular velocity and particle rotation. */
zero_v3(pa->state.ave);
@ -4463,8 +4469,8 @@ printf("pa->state.vel[0]: %f, pa->state.vel[1]: %f, pa->state.vel[2]: %f\n", pa-
}
}
# if 0
/* Debugging: Print number of active particles. */
printf("active parts: %d\n", activeParts);
/* Debugging: Print number of active particles. */
printf("active parts: %d\n", activeParts);
# endif
totpart = psys->totpart = part->totpart = activeParts;

View File

@ -2275,7 +2275,8 @@ static void softbody_calc_forces(
/* check conditions for various options */
do_deflector = query_external_colliders(depsgraph, sb->collision_group);
#if 0
do_selfcollision=((ob->softflag & OB_SB_EDGES) && (sb->bspring)&& (ob->softflag & OB_SB_SELF));
do_selfcollision = ((ob->softflag & OB_SB_EDGES) && (sb->bspring) &&
(ob->softflag & OB_SB_SELF));
#endif
do_springcollision = do_deflector && (ob->softflag & OB_SB_EDGES) &&
(ob->softflag & OB_SB_EDGECOLL);

View File

@ -458,71 +458,38 @@ void BKE_sound_exit_once()
# if 0
bSound *BKE_sound_new_buffer(Main *bmain, bSound *source)
{
bSound *sound = nullptr;
bSound *sound = nullptr;
char name[MAX_ID_NAME + 5];
BLI_string_join(name, sizeof(name), "buf_", source->id.name);
sound = BKE_libblock_alloc(bmain, ID_SO, name);
sound->child_sound = source;
sound->type = SOUND_TYPE_BUFFER;
char name[MAX_ID_NAME + 5];
BLI_string_join(name, sizeof(name), "buf_", source->id.name);
sound_load(bmain, sound);
sound = BKE_libblock_alloc(bmain, ID_SO, name);
sound->child_sound = source;
sound->type = SOUND_TYPE_BUFFER;
sound_load(bmain, sound);
return sound;
return sound;
}
bSound *BKE_sound_new_limiter(Main *bmain, bSound *source, float start, float end)
{
bSound *sound = nullptr;
bSound *sound = nullptr;
char name[MAX_ID_NAME + 5];
BLI_string_join(name, sizeof(name), "lim_", source->id.name);
sound = BKE_libblock_alloc(bmain, ID_SO, name);
sound->child_sound = source;
sound->start = start;
sound->end = end;
sound->type = SOUND_TYPE_LIMITER;
char name[MAX_ID_NAME + 5];
BLI_string_join(name, sizeof(name), "lim_", source->id.name);
sound_load(bmain, sound);
sound = BKE_libblock_alloc(bmain, ID_SO, name);
sound->child_sound = source;
sound->start = start;
sound->end = end;
sound->type = SOUND_TYPE_LIMITER;
sound_load(bmain, sound);
return sound;
return sound;
}
# endif
@ -572,8 +539,8 @@ static void sound_load_audio(Main *bmain, bSound *sound, bool free_waveform)
/* XXX unused currently */
# if 0
switch (sound->type) {
case SOUND_TYPE_FILE:
switch (sound->type) {
case SOUND_TYPE_FILE:
# endif
{
char fullpath[FILE_MAX];
@ -596,16 +563,18 @@ case SOUND_TYPE_FILE:
}
/* XXX unused currently */
# if 0
break;
}
case SOUND_TYPE_BUFFER: if (sound->child_sound && sound->child_sound->handle) {
sound->handle = AUD_bufferSound(sound->child_sound->handle);
}
break;
case SOUND_TYPE_LIMITER: if (sound->child_sound && sound->child_sound->handle) {
sound->handle = AUD_limitSound(sound->child_sound, sound->start, sound->end);
}
break;
break;
}
case SOUND_TYPE_BUFFER:
if (sound->child_sound && sound->child_sound->handle) {
sound->handle = AUD_bufferSound(sound->child_sound->handle);
}
break;
case SOUND_TYPE_LIMITER:
if (sound->child_sound && sound->child_sound->handle) {
sound->handle = AUD_limitSound(sound->child_sound, sound->start, sound->end);
}
break;
}
# endif
if (sound->flags & SOUND_FLAGS_MONO) {

View File

@ -795,14 +795,15 @@ void dist_squared_to_projected_aabb_precalc(struct DistProjectedAABBPrecalc *pre
float projmat_trans[4][4];
transpose_m4_m4(projmat_trans, projmat);
if (!isect_plane_plane_plane_v3(
projmat_trans[0], projmat_trans[1], projmat_trans[3], precalc->ray_origin)) {
projmat_trans[0], projmat_trans[1], projmat_trans[3], precalc->ray_origin))
{
/* Orthographic projection. */
isect_plane_plane_v3(px, py, precalc->ray_origin, precalc->ray_direction);
}
else {
/* Perspective projection. */
cross_v3_v3v3(precalc->ray_direction, py, px);
//normalize_v3(precalc->ray_direction);
// normalize_v3(precalc->ray_direction);
}
#else
if (!isect_plane_plane_v3(px, py, precalc->ray_origin, precalc->ray_direction)) {
@ -1870,7 +1871,7 @@ bool isect_ray_tri_watertight_v3(const float ray_origin[3],
* otherwise we won't match any of the other intersect functions here...
* which would be confusing. */
#if 0
|| (sign_T > *r_lambda * xor_signmask(det, sign_mask))
|| (sign_T > *r_lambda * xor_signmask(det, sign_mask))
#endif
)
{

View File

@ -386,11 +386,13 @@ void dof_gather_accumulate_sample_pair(DofGatherData pair_data[2],
/* TODO(@fclem): Promote to parameter? dither with Noise? */
const float mirroring_min_distance = 15.0;
if (pair_data[0].coc < mirroring_threshold &&
(pair_data[1].coc - mirroring_min_distance) > pair_data[0].coc) {
(pair_data[1].coc - mirroring_min_distance) > pair_data[0].coc)
{
pair_data[1].coc = pair_data[0].coc;
}
else if (pair_data[1].coc < mirroring_threshold &&
(pair_data[0].coc - mirroring_min_distance) > pair_data[1].coc) {
(pair_data[0].coc - mirroring_min_distance) > pair_data[1].coc)
{
pair_data[0].coc = pair_data[1].coc;
}
#endif

View File

@ -148,11 +148,13 @@ void dof_gather_accumulate_sample_pair(DofGatherData pair_data[2],
/* TODO(fclem) Promote to parameter? dither with Noise? */
const float mirroring_min_distance = 15.0;
if (pair_data[0].coc < mirroring_threshold &&
(pair_data[1].coc - mirroring_min_distance) > pair_data[0].coc) {
(pair_data[1].coc - mirroring_min_distance) > pair_data[0].coc)
{
pair_data[1].coc = pair_data[0].coc;
}
else if (pair_data[1].coc < mirroring_threshold &&
(pair_data[0].coc - mirroring_min_distance) > pair_data[1].coc) {
(pair_data[0].coc - mirroring_min_distance) > pair_data[1].coc)
{
pair_data[0].coc = pair_data[1].coc;
}
#endif

View File

@ -157,7 +157,8 @@ vec3 volume_shadow(LightData ld, vec3 ray_wpos, vec3 L, float l_dist)
# if 0 /* TODO use shadow maps instead. */
vec3 shadow = vec3(1.0);
for (float s = 1.0; s < VOLUMETRIC_SHADOW_MAX_STEP && s <= volumes_info_buf.shadow_steps; s += 1.0) {
for (float s = 1.0; s < VOLUMETRIC_SHADOW_MAX_STEP && s <= volumes_info_buf.shadow_steps;
s += 1.0) {
vec3 pos = ray_wpos + L * s;
vec3 s_extinction = volume_participating_media_extinction(pos, volume_extinction);
shadow *= exp(-s_extinction * dd);

View File

@ -2834,7 +2834,8 @@ void DRW_draw_select_id(Depsgraph *depsgraph, ARegion *region, View3D *v3d, cons
drw_engines_cache_finish();
drw_task_graph_deinit();
#if 0 /* This is a workaround to a nasty bug that seems to be a nasty driver bug. (See #69377) */
#if 0 /* This is a workaround to a nasty bug that seems to be a nasty driver bug. (See \
#69377) */
DRW_render_instance_buffer_finish();
#else
DST.buffer_finish_called = true;

View File

@ -166,9 +166,9 @@ static void dial_geom_draw(const float color[4],
imm_draw_circle_partial_wire_3d(
pos, 0.0f, 0.0f, 0.0f, 1.0f, DIAL_RESOLUTION, -arc_partial_deg / 2, arc_partial_deg);
# if 0
if (arc_inner_factor != 0.0f) {
BLI_assert(0);
}
if (arc_inner_factor != 0.0f) {
BLI_assert(0);
}
# endif
}
}

View File

@ -2469,9 +2469,9 @@ static int annotation_draw_modal(bContext *C, wmOperator *op, const wmEvent *eve
* Problem is that the stroke is converted to 3D only after it is finished.
* This approach should work better in tools that immediately apply in 3D space. */
#if 0
if (event->type == NDOF_MOTION) {
return OPERATOR_PASS_THROUGH;
}
if (event->type == NDOF_MOTION) {
return OPERATOR_PASS_THROUGH;
}
#endif
if (p->status == GP_STATUS_IDLING) {

View File

@ -172,5 +172,5 @@ void free_gpcopybuf();
void copy_gpdata();
void paste_gpdata();
void mirror_masklayer_frames( MaskLayer *mask_layer, short mode);
void mirror_masklayer_frames(MaskLayer *mask_layer, short mode);
#endif

View File

@ -756,9 +756,9 @@ void UI_popup_block_ex(bContext *C,
void *arg,
wmOperator *op);
#if 0 /* UNUSED */
void uiPupBlockOperator( bContext *C,
void uiPupBlockOperator(bContext *C,
uiBlockCreateFunc func,
wmOperator *op,
wmOperator *op,
wmOperatorCallContext opcontext);
#endif

View File

@ -1871,9 +1871,9 @@ static bool ui_selectcontext_begin(bContext *C, uiBut *but, uiSelectContextStore
}
/* ignored for now */
# if 0
else if (rna_type == PROP_BOOLEAN) {
other->val_b = RNA_property_boolean_get_index(&lptr, lprop, index);
}
else if (rna_type == PROP_BOOLEAN) {
other->val_b = RNA_property_boolean_get_index(&lptr, lprop, index);
}
# endif
}
else {
@ -1885,12 +1885,12 @@ static bool ui_selectcontext_begin(bContext *C, uiBut *but, uiSelectContextStore
}
/* ignored for now */
# if 0
else if (rna_type == PROP_BOOLEAN) {
other->val_b = RNA_property_boolean_get(&lptr, lprop);
}
else if (rna_type == PROP_ENUM) {
other->val_i = RNA_property_enum_get(&lptr, lprop);
}
else if (rna_type == PROP_BOOLEAN) {
other->val_b = RNA_property_boolean_get(&lptr, lprop);
}
else if (rna_type == PROP_ENUM) {
other->val_i = RNA_property_enum_get(&lptr, lprop);
}
# endif
}
}

View File

@ -3536,12 +3536,12 @@ static void filelist_readjob_main_recursive(Main *bmain, FileList *filelist)
# if 0 /* XXX TODO: show the selection status of the objects. */
if (!filelist->has_func) { /* F4 DATA BROWSE */
if (idcode == ID_OB) {
if ( ((Object *)id)->flag & SELECT) {
if (((Object *)id)->flag & SELECT) {
files->entry->selflag |= FILE_SEL_SELECTED;
}
}
else if (idcode == ID_SCE) {
if ( ((Scene *)id)->r.scemode & R_BG_RENDER) {
if (((Scene *)id)->r.scemode & R_BG_RENDER) {
files->entry->selflag |= FILE_SEL_SELECTED;
}
}

View File

@ -1337,7 +1337,8 @@ void transform_convert_mesh_crazyspace_detect(TransInfo *t,
* correction with \a quats, relative to the coordinates after
* the modifiers that support deform matrices \a defcos. */
#if 0 /* TODO(@ideasman42): fix crazy-space & extrude so it can be enabled for general use. */
#if 0 /* TODO(@ideasman42): fix crazy-space & extrude so it can be enabled for general use. \
*/
if ((totleft > 0) || (totleft == -1))
#else
if (totleft > 0)

View File

@ -647,8 +647,8 @@ void Controller::ComputeSteerableViewMap()
ViewMap::fedges_container &fedges = _ViewMap->FEdges();
LineRep *fRep;
NodeShape *ns;
for (ViewMap::fedges_container::iterator f = fedges.begin(), fend = fedges.end(); f != fend;
++f) {
for (ViewMap::fedges_container::iterator f = fedges.begin(), fend = fedges.end(); f != fend; ++f)
{
if ((*f)->viewedge()->qi() != 0) {
continue;
}
@ -676,7 +676,7 @@ void Controller::ComputeSteerableViewMap()
offscreenBuffer.AddNode(ng[i]);
# if 0
img[i] = new GrayImage(_pView->width(), _pView->height());
offscreenBuffer.readPixels(0,0,_pView->width(), _pView->height(), img[i]->getArray());
offscreenBuffer.readPixels(0, 0, _pView->width(), _pView->height(), img[i]->getArray());
# endif
pm = offscreenBuffer.renderPixmap(_pView->width(), _pView->height());
@ -685,7 +685,7 @@ void Controller::ComputeSteerableViewMap()
cout << "BuildViewMap Warning: couldn't render the steerable ViewMap" << endl;
}
}
//pm.save(QString("steerable") + QString::number(i) + QString(".bmp"), "BMP");
// pm.save(QString("steerable") + QString::number(i) + QString(".bmp"), "BMP");
// FIXME!! Lost of time !
qimg = pm.toImage();
// FIXME !! again!

View File

@ -135,7 +135,9 @@ int BlenderFileLoader::countClippedFaces(float v1[3], float v2[3], float v3[3],
if (G.debug & G_DEBUG_FREESTYLE) {
printf("%d %s\n",
i,
(clip[i] == NOT_CLIPPED) ? "not" : (clip[i] == CLIPPED_BY_NEAR) ? "near" : "far");
(clip[i] == NOT_CLIPPED) ? "not" :
(clip[i] == CLIPPED_BY_NEAR) ? "near" :
"far");
}
#endif
sum += clip[i];

View File

@ -391,7 +391,7 @@ void Canvas::loadMap(const char *iFileName, const char *iMapName, uint iNbLevels
#if 0
GrayImage blur(w, h);
GaussianFilter gf(4.0f);
//int bound = gf.getBound();
// int bound = gf.getBound();
for (y = 0; y < h; ++y) {
for (x = 0; x < w; ++x) {
int c = gf.getSmoothedPixel<GrayImage>(&tmp, x, y);

View File

@ -453,7 +453,7 @@ float CurvePoint::local_depth_variance() const
real CurvePoint::local_average_density(float sigma) const
{
//return local_average_density<CurvePoint >(this);
// return local_average_density<CurvePoint >(this);
return density_function<CurvePoint>(this);
}
@ -896,7 +896,7 @@ float Curve::local_depth_variance(int iCombination) const
# if 0
local_depth_variance_functor<Point> functor;
float result;
Evaluate<float, local_depth_variance_functor<Point> >(&functor, iCombination, result);
Evaluate<float, local_depth_variance_functor<Point>>(&functor, iCombination, result);
return result;
# endif
}
@ -907,7 +907,7 @@ real Curve::local_average_density(float sigma, int iCombination) const
# if 0
density_functor<Point> functor;
real result;
Evaluate<real, density_functor<Point> >(&functor, iCombination, result);
Evaluate<real, density_functor<Point>>(&functor, iCombination, result);
return result;
# endif
}
@ -971,12 +971,12 @@ void Curve::computeCurvatureAndOrientation()
(*v0)->setCurvatureFredo((*v2)->curvatureFredo());
(*v0)->setDirectionFredo((*v2)->point2d() - (*v0)->point2d());
//closed curve case one day...
// closed curve case one day...
//
return;
//numerical degeneracy verification... we'll see later
// numerical degeneracy verification... we'll see later
const_vertex_iterator vLastReliable = vertices_begin();
v = vertices_begin();
@ -1009,7 +1009,7 @@ void Curve::computeCurvatureAndOrientation()
cerr << "/";
}
else {
if (!isReliable) { //previous points were not reliable
if (!isReliable) { // previous points were not reliable
const_vertex_iterator vfix = vLastReliable;
++vfix;
for (; vfix != v; ++vfix) {

View File

@ -228,7 +228,8 @@ void Operators::bidirectionalChain(ViewEdgeIterator &it,
for (I1DContainer::iterator it_edge = _current_view_edges_set.begin();
it_edge != _current_view_edges_set.end();
++it_edge) {
++it_edge)
{
if (pred(**it_edge)) {
continue;
}
@ -280,7 +281,8 @@ void Operators::bidirectionalChain(ViewEdgeIterator &it, UnaryPredicate1D &pred)
for (I1DContainer::iterator it_edge = _current_view_edges_set.begin();
it_edge != _current_view_edges_set.end();
++it_edge) {
++it_edge)
{
if (pred(**it_edge) || pred_ts(**it_edge)) {
continue;
}

View File

@ -935,7 +935,7 @@ bool Stroke::occluders_empty() const
}
# if 0
inline const polygon3d& occludee() const
inline const polygon3d &occludee() const
{
return *(_FEdgeA->aFace());
}

View File

@ -754,7 +754,7 @@ StrokeRep::StrokeRep()
_textureId = ptm->getDefaultTextureId();
}
#if 0
_averageTextureAlpha = 0.5; //default value
_averageTextureAlpha = 0.5; // default value
if (_strokeType == OIL_STROKE) {
_averageTextureAlpha = 0.75;
}
@ -788,7 +788,7 @@ StrokeRep::StrokeRep(Stroke *iStroke)
}
#if 0
_averageTextureAlpha = 0.5; //default value
_averageTextureAlpha = 0.5; // default value
if (_strokeType == OIL_STROKE) {
_averageTextureAlpha = 0.75;
}

View File

@ -25,7 +25,7 @@ namespace Freestyle {
using namespace Geometry;
#if 0
//symbolic constant to call the appropriate renderers and textures
// symbolic constant to call the appropriate renderers and textures
# define NO_TEXTURE_WITH_BLEND_STROKE -2
# define NO_TEXTURE_STROKE -1
# define PSEUDO_CHARCOAL_STROKE 0

View File

@ -434,11 +434,12 @@ void FEdgeXDetector::ProcessRidgeFace(WXFace *iFace)
#if 0 // XXX fabs(flayer->dotP(i)) < threshold cannot be true
real threshold = 0;
//real threshold = _maxK1 - (_maxK1 - _meanK1) / 20.0;
// real threshold = _maxK1 - (_maxK1 - _meanK1) / 20.0;
if (flayer->nPosDotP() != numVertices) {
if ((fabs(flayer->dotP(0)) < threshold) && (fabs(flayer->dotP(1)) < threshold) &&
(fabs(flayer->dotP(2)) < threshold)) {
(fabs(flayer->dotP(2)) < threshold))
{
flayer->ReplaceDotP(0, 0);
flayer->ReplaceDotP(1, 0);
flayer->ReplaceDotP(2, 0);
@ -451,7 +452,8 @@ void FEdgeXDetector::ProcessRidgeFace(WXFace *iFace)
void FEdgeXDetector::ProcessRidgeFace(WXFace *iFace)
{
// RIDGE LAYER
// Compute the RidgeFunction, that is the derivative of the ppal curvature along e1 at each vertex of the face
// Compute the RidgeFunction, that is the derivative of the ppal curvature along e1 at each
// vertex of the face
WVertex *v;
Vec3r v1v2;
real t;
@ -519,17 +521,18 @@ void FEdgeXDetector::ProcessRidgeFace(WXFace *iFace)
}
}
// Once we have K1 along the ppal direction compute the derivative : K1b - K1a put it in DotP
//real d = fabs(K1_b) - fabs(K1_a);
// real d = fabs(K1_b) - fabs(K1_a);
real d = 0;
real threshold = _meanK1 + (_maxK1 - _meanK1) / 7.0;
//real threshold = _meanK1;
//if ((fabs(K1_b) > threshold) || ((fabs(K1_a) > threshold)))
// real threshold = _meanK1;
// if ((fabs(K1_b) > threshold) || ((fabs(K1_a) > threshold)))
d = (K1_b) - (K1_a) / (Inter_b - Inter_a).norm();
faceLayer->PushDotP(d);
//faceLayer->PushDotP(layer_info->vec_curvature_info[i]->K1);
// faceLayer->PushDotP(layer_info->vec_curvature_info[i]->K1);
}
// Make the values relevant by checking whether all principal directions have the "same" direction:
// Make the values relevant by checking whether all principal directions have the "same"
// direction:
Vec3r e0((layer_info->vec_curvature_info[0]->K1 * layer_info->vec_curvature_info[0]->e1));
e0.normalize();
Vec3r e1((layer_info->vec_curvature_info[1]->K1 * layer_info->vec_curvature_info[1]->e1));
@ -548,7 +551,9 @@ void FEdgeXDetector::ProcessRidgeFace(WXFace *iFace)
# if 0 // remove the weakest values;
real minDiff = (_maxK1 - _minK1) / 10.0;
real minDiff = _meanK1;
if ((faceLayer->dotP(0) < minDiff) && (faceLayer->dotP(1) < minDiff) && (faceLayer->dotP(2) < minDiff)) {
if ((faceLayer->dotP(0) < minDiff) && (faceLayer->dotP(1) < minDiff) &&
(faceLayer->dotP(2) < minDiff))
{
faceLayer->ReplaceDotP(0, 0);
faceLayer->ReplaceDotP(1, 0);
faceLayer->ReplaceDotP(2, 0);
@ -586,7 +591,8 @@ void FEdgeXDetector::ProcessSuggestiveContourFace(WXFace *iFace)
real threshold = _meanKr;
if (faceLayer->nPosDotP() != numVertices) {
if ((fabs(faceLayer->dotP(0)) < threshold) && (fabs(faceLayer->dotP(1)) < threshold) &&
(fabs(faceLayer->dotP(2)) < threshold)) {
(fabs(faceLayer->dotP(2)) < threshold))
{
faceLayer->ReplaceDotP(0, 0);
faceLayer->ReplaceDotP(1, 0);
faceLayer->ReplaceDotP(2, 0);

View File

@ -900,9 +900,7 @@ class FEdge : public Interface1D {
inline float local_average_depth(int iCombination = 0) const;
inline float local_depth_variance(int iCombination = 0) const;
inline real local_average_density(float sigma = 2.3f, int iCombination = 0) const;
inline Vec3r shaded_color(int iCombination = 0) const
{
}
inline Vec3r shaded_color(int iCombination = 0) const {}
#endif
int viewedge_nature() const;

View File

@ -282,7 +282,7 @@ void SteerableViewMap::saveSteerableViewMap() const
if (c > 255) {
c = 255;
}
//int c = int(_imagesPyramids[i]->pixel(x, y, j));
// int c = int(_imagesPyramids[i]->pixel(x, y, j));
qtmp.setPixel(x, y, qRgb(c, c, c));
}
}

View File

@ -2075,9 +2075,10 @@ int ViewMapBuilder::ComputeRayCastingVisibility(FEdge *fe,
SilhouetteGeomEngine::retrieveViewport(viewport);
if ((A.x() < viewport[0]) || (A.x() > viewport[2]) || (A.y() < viewport[1]) ||
(A.y() > viewport[3]) || (B.x() < viewport[0]) || (B.x() > viewport[2]) ||
(B.y() < viewport[1]) || (B.y() > viewport[3])) {
(B.y() < viewport[1]) || (B.y() > viewport[3]))
{
cerr << "Warning: point is out of the grid for fedge " << fe->getId() << endl;
//return 0;
// return 0;
}
#endif
@ -2259,7 +2260,8 @@ void ViewMapBuilder::ComputeIntersections(ViewMap *ioViewMap,
ViewMap::viewvertices_container &vvertices = ioViewMap->ViewVertices();
for (ViewMap::viewvertices_container::iterator vv = vvertices.begin(), vvend = vvertices.end();
vv != vvend;
++vv) {
++vv)
{
if ((*vv)->getNature() == Nature::T_VERTEX) {
TVertex *tvertex = (TVertex *)(*vv);
cout << "TVertex " << tvertex->getId() << " has :" << endl;
@ -2349,7 +2351,8 @@ void ViewMapBuilder::ComputeSweepLineIntersections(ViewMap *ioViewMap, real epsi
ViewMap::fedges_container &fedges = ioViewMap->FEdges();
for (ViewMap::fedges_container::const_iterator f = fedges.begin(), end = fedges.end();
f != end;
++f) {
++f)
{
cout << (*f)->aMaterialIndex() << "-" << (*f)->bMaterialIndex() << endl;
}
}
@ -2489,8 +2492,8 @@ void ViewMapBuilder::ComputeSweepLineIntersections(ViewMap *ioViewMap, real epsi
printf("tb %.12e\n", tb);
printf("a1 %e, %e -- a2 %e, %e\n", a1[0], a1[1], a2[0], a2[1]);
printf("b1 %e, %e -- b2 %e, %e\n", b1[0], b1[1], b2[0], b2[1]);
//printf("line([%e, %e], [%e, %e]);\n", a1[0], a2[0], a1[1], a2[1]);
//printf("line([%e, %e], [%e, %e]);\n", b1[0], b2[0], b1[1], b2[1]);
// printf("line([%e, %e], [%e, %e]);\n", a1[0], a2[0], a1[1], a2[1]);
// printf("line([%e, %e], [%e, %e]);\n", b1[0], b2[0], b1[1], b2[1]);
if ((Ta < -epsilon) || (Ta > 1 + epsilon)) {
printf("Ta %.12e\n", Ta);
}

View File

@ -1240,7 +1240,8 @@ class WShape {
Vec3f v;
for (vector<WVertex *>::iterator wv = _VertexList.begin(), wvend = _VertexList.end();
wv != wvend;
wv++) {
wv++)
{
for (uint i = 0; i < 3; i++) {
v = (*wv)->GetVertex();
if (v[i] < _min[i]) {

View File

@ -187,8 +187,8 @@ WXSmoothEdge *WXFaceLayer::BuildSmoothEdge()
for (int i = 0; i < numberOfEdges(); i++) {
WSFace *bface = (WSFace *)GetBordingFace(i);
if (bface) {
if ((front()) ^
(bface->front())) { // fA->front XOR fB->front (true if one is 0 and the other is 1)
if ((front()) ^ (bface->front()))
{ // fA->front XOR fB->front (true if one is 0 and the other is 1)
// that means that the edge i of the face is a silhouette edge
// CHECK FIRST WHETHER THE EXACTSILHOUETTEEDGE HAS
// NOT YET BEEN BUILT ON THE OTHER FACE (1 is enough).
@ -296,7 +296,8 @@ WFace *WXShape::MakeFace(vector<WVertex *> &iVertexList,
Vec3f center;
for (vector<WVertex *>::iterator wv = iVertexList.begin(), wvend = iVertexList.end();
wv != wvend;
++wv) {
++wv)
{
center += (*wv)->GetVertex();
}
center /= float(iVertexList.size());

View File

@ -374,10 +374,10 @@ virtual void AnimationImporter::change_eul_to_quat(Object *ob, bAction *act)
SNPRINTF(rna_path, "%s.rotation_quaternion", joint_path);
FCurve *quatcu[4] = {
create_fcurve(0, rna_path),
create_fcurve(1, rna_path),
create_fcurve(2, rna_path),
create_fcurve(3, rna_path),
create_fcurve(0, rna_path),
create_fcurve(1, rna_path),
create_fcurve(2, rna_path),
create_fcurve(3, rna_path),
};
bPoseChannel *chan = BKE_pose_channel_find_name(ob->pose, grp->name);
@ -398,9 +398,9 @@ virtual void AnimationImporter::change_eul_to_quat(Object *ob, bAction *act)
float frame = cu->bezt[j].vec[1][0];
float eul[3] = {
eulcu[0] ? evaluate_fcurve(eulcu[0], frame) : 0.0f,
eulcu[1] ? evaluate_fcurve(eulcu[1], frame) : 0.0f,
eulcu[2] ? evaluate_fcurve(eulcu[2], frame) : 0.0f,
eulcu[0] ? evaluate_fcurve(eulcu[0], frame) : 0.0f,
eulcu[1] ? evaluate_fcurve(eulcu[1], frame) : 0.0f,
eulcu[2] ? evaluate_fcurve(eulcu[2], frame) : 0.0f,
};
/* make eul relative to bone rest pose */
@ -929,7 +929,7 @@ void AnimationImporter::apply_matrix_curves(Object *ob,
BLI_addtail(curves, newcu[i]);
}
#if 0
fcurve_is_used(newcu[i]); /* never added to unused */
fcurve_is_used(newcu[i]); /* never added to unused */
#endif
}
@ -1368,7 +1368,7 @@ void AnimationImporter::add_bone_animation_sampled(Object *ob,
for (int i = 0; i < totcu; i++) {
add_bone_fcurve(ob, node, newcu[i]);
#if 0
fcurve_is_used(newcu[i]); /* never added to unused */
fcurve_is_used(newcu[i]); /* never added to unused */
#endif
}

View File

@ -246,7 +246,7 @@ void EffectsExporter::operator()(Material *ma, Object *ob)
/* store pointers so they can be used later when we create <texture>s */
samp_surf[b] = &samplers[a];
//samp_surf[b][1] = &surfaces[a];
// samp_surf[b][1] = &surfaces[a];
im_samp_map[key] = b;
b++;
@ -266,7 +266,7 @@ void EffectsExporter::operator()(Material *ma, Object *ob)
int i = im_samp_map[key];
std::string uvname = strlen(t->uvname) ? t->uvname : active_uv;
COLLADASW::Sampler *sampler = (COLLADASW::Sampler *)
samp_surf[i]; /* possibly uninitialized memory ... */
samp_surf[i]; /* possibly uninitialized memory ... */
writeTextures(ep, key, sampler, t, ima, uvname);
}
#endif

View File

@ -975,11 +975,11 @@ static void rna_ID_update_tag(ID *id, Main *bmain, ReportList *reports, int flag
{
/* XXX, new function for this! */
# if 0
if (ob->type == OB_FONT) {
Curve *cu = ob->data;
freedisplist(&cu->disp);
BKE_vfont_to_curve(bmain, sce, ob, FO_EDIT, nullptr);
}
if (ob->type == OB_FONT) {
Curve *cu = ob->data;
freedisplist(&cu->disp);
BKE_vfont_to_curve(bmain, sce, ob, FO_EDIT, nullptr);
}
# endif
if (flag == 0) {
@ -999,8 +999,9 @@ BKE_vfont_to_curve(bmain, sce, ob, FO_EDIT, nullptr);
break;
/* Could add particle updates later */
# if 0
case ID_PA: allow_flag = OB_RECALC_ALL | PSYS_RECALC;
break;
case ID_PA:
allow_flag = OB_RECALC_ALL | PSYS_RECALC;
break;
# endif
case ID_AC:
allow_flag = ID_RECALC_ANIMATION;
@ -1555,11 +1556,11 @@ static void rna_def_ID_properties(BlenderRNA *brna)
/* never tested, maybe its useful to have this? */
# if 0
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_flag(prop, PROP_IDPROPERTY);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Name", "Unique name used in the code and scripting");
RNA_def_struct_name_property(srna, prop);
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_flag(prop, PROP_IDPROPERTY);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Name", "Unique name used in the code and scripting");
RNA_def_struct_name_property(srna, prop);
# endif
/* IDP_ID */

View File

@ -171,7 +171,8 @@ static void rna_GPencil_update(Main * /*bmain*/, Scene * /*scene*/, PointerRNA *
# if 0
/* In case a property on a layer changed, tag it with a light update. */
if (ptr->type == &RNA_GPencilLayer) {
BKE_gpencil_tag_light_update((bGPdata *)(ptr->owner_id), (bGPDlayer *)(ptr->data), nullptr, nullptr);
BKE_gpencil_tag_light_update(
(bGPdata *)(ptr->owner_id), (bGPDlayer *)(ptr->data), nullptr, nullptr);
}
# endif
DEG_id_tag_update(ptr->owner_id, ID_RECALC_GEOMETRY);

View File

@ -849,7 +849,8 @@ void RNA_api_main(StructRNA * /*srna*/)
* for now they are all in collections bpy.data.images.new(...) */
func = RNA_def_function(srna, "add_image", "rna_Main_add_image");
RNA_def_function_ui_description(func, "Add a new image");
parm = RNA_def_string_file_path(func, "filepath", nullptr, 0, "", "File path to load image from");
parm = RNA_def_string_file_path(
func, "filepath", nullptr, 0, "", "File path to load image from");
RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_REQUIRED);
parm = RNA_def_pointer(func, "image", "Image", "", "New image");
RNA_def_function_return(func, parm);

View File

@ -2543,7 +2543,8 @@ static void rna_def_object_modifiers(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Active EditBone", "Armatures active edit bone");
// RNA_def_property_update(prop, 0, "rna_Armature_act_editbone_update");
RNA_def_property_pointer_funcs(prop, nullptr, "rna_Armature_act_edit_bone_set", nullptr, nullptr);
RNA_def_property_pointer_funcs(
prop, nullptr, "rna_Armature_act_edit_bone_set", nullptr, nullptr);
/* TODO: redraw. */
// RNA_def_property_collection_active(prop, prop_act);
@ -3391,8 +3392,16 @@ static void rna_def_object(BlenderRNA *brna)
prop, "Constraints", "Constraints affecting the transformation of the object");
RNA_def_property_override_funcs(prop, nullptr, nullptr, "rna_Object_constraints_override_apply");
# if 0
RNA_def_property_collection_funcs(
prop, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, "constraints__add", "constraints__remove");
RNA_def_property_collection_funcs(prop,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
nullptr,
"constraints__add",
"constraints__remove");
# endif
rna_def_object_constraints(brna, prop);

View File

@ -966,7 +966,7 @@ static void rna_PartSettings_start_set(PointerRNA *ptr, float value)
}
# if 0
if (settings->type==PART_REACTOR && value < 1.0)
if (settings->type == PART_REACTOR && value < 1.0)
value = 1.0;
else
# endif

View File

@ -1898,8 +1898,8 @@ void rna_property_override_diff_default(Main *bmain, RNAPropertyOverrideDiffCont
* Maybe behind a eRNAOverrideMatch flag? */
# if 0
rnadiff_ctx.comparison = len_str_a < len_str_b ? -1 :
len_str_a > len_str_b ? 1 :
strcmp(value_a, value_b);
len_str_a > len_str_b ? 1 :
strcmp(value_a, value_b);
# endif
rnadiff_ctx.comparison = strcmp(value_a, value_b);

View File

@ -705,7 +705,8 @@ static void rna_Sequence_name_set(PointerRNA *ptr, const char *value)
/* Don't rename everywhere because these are per scene. */
# if 0
BKE_animdata_fix_paths_rename_all(nullptr, "sequence_editor.sequences_all", oldname, seq->name + 2);
BKE_animdata_fix_paths_rename_all(
nullptr, "sequence_editor.sequences_all", oldname, seq->name + 2);
# endif
adt = BKE_animdata_from_id(&scene->id);
if (adt) {
@ -980,10 +981,10 @@ static void rna_SoundSequence_filename_set(PointerRNA *ptr, const char *value)
{
Sequence *seq = (Sequence *)(ptr->data);
BLI_path_split_dir_file(value,
seq->strip->dirpath,
sizeof(seq->strip->dirpath),
seq->strip->stripdata->name,
sizeof(seq->strip->stripdata->name));
seq->strip->dirpath,
sizeof(seq->strip->dirpath),
seq->strip->stripdata->name,
sizeof(seq->strip->stripdata->name));
}
static void rna_SequenceElement_filename_set(PointerRNA *ptr, const char *value)

View File

@ -1344,22 +1344,22 @@ static void rna_UILayout_enabled_set(PointerRNA *ptr, bool value)
# if 0
static int rna_UILayout_red_alert_get(PointerRNA *ptr)
{
return uiLayoutGetRedAlert(static_cast< uiLayout*>(ptr->data));
return uiLayoutGetRedAlert(static_cast<uiLayout *>(ptr->data));
}
static void rna_UILayout_red_alert_set(PointerRNA *ptr, bool value)
{
uiLayoutSetRedAlert(static_cast< uiLayout*>(ptr->data), value);
uiLayoutSetRedAlert(static_cast<uiLayout *>(ptr->data), value);
}
static bool rna_UILayout_keep_aspect_get(PointerRNA *ptr)
{
return uiLayoutGetKeepAspect(static_cast< uiLayout*>(ptr->data));
return uiLayoutGetKeepAspect(static_cast<uiLayout *>(ptr->data));
}
static void rna_UILayout_keep_aspect_set(PointerRNA *ptr, int value)
{
uiLayoutSetKeepAspect(static_cast< uiLayout*>(ptr->data), value);
uiLayoutSetKeepAspect(static_cast<uiLayout *>(ptr->data), value);
}
# endif

View File

@ -706,8 +706,8 @@ static int rna_XrSessionSettings_icon_from_show_object_viewport_get(PointerRNA *
return rna_object_type_visibility_icon_get_common(
xr->session_settings.object_type_exclude_viewport,
# if 0
/* For the future when selection in VR is reliably supported. */
&xr->session_settings.object_type_exclude_select
/* For the future when selection in VR is reliably supported. */
&xr->session_settings.object_type_exclude_select
# else
nullptr
# endif

View File

@ -857,41 +857,34 @@ static void pyc_exception_buffer_handle_system_exit(PyObject *error_type,
/* returns the exception string as a new PyUnicode object, depends on external traceback module */
# if 0
/* this version uses traceback module but somehow fails on UI errors */
PyObject *PyC_ExceptionBuffer()
{
PyObject *traceback_mod = nullptr;
PyObject *format_tb_func = nullptr;
PyObject *ret = nullptr;
PyObject *traceback_mod = nullptr;
PyObject *format_tb_func = nullptr;
PyObject *ret = nullptr;
if (!(traceback_mod = PyImport_ImportModule("traceback"))) {
goto error_cleanup;
}
else if (!(format_tb_func = PyObject_GetAttrString(traceback_mod, "format_exc"))) {
goto error_cleanup;
}
if (!(traceback_mod = PyImport_ImportModule("traceback"))) {
goto error_cleanup;
}
else if (!(format_tb_func = PyObject_GetAttrString(traceback_mod, "format_exc"))) {
goto error_cleanup;
}
ret = PyObject_CallObject(format_tb_func, nullptr);
if (ret == Py_None) {
Py_DECREF(ret);
ret = nullptr;
}
ret = PyObject_CallObject(format_tb_func, nullptr);
if (ret == Py_None) {
Py_DECREF(ret);
ret = nullptr;
}
error_cleanup:
/* could not import the module so print the error and close */
Py_XDECREF(traceback_mod);
Py_XDECREF(format_tb_func);
/* could not import the module so print the error and close */
Py_XDECREF(traceback_mod);
Py_XDECREF(format_tb_func);
return ret;
return ret;
}
# else /* verbose, non-threadsafe version */
PyObject *PyC_ExceptionBuffer()

View File

@ -152,8 +152,8 @@ static void _build_translations_cache(PyObject *py_messages, const char *locale)
PyObject *lang_dict;
# if 0
PyObject_Print(uuid_dict, stdout, 0);
printf("\n");
PyObject_Print(uuid_dict, stdout, 0);
printf("\n");
# endif
/* Try to get first complete locale, then language+country,

View File

@ -770,8 +770,8 @@ float BPY_driver_exec(PathResolvedRNA *anim_rna,
#endif /* USE_BYTECODE_WHITELIST */
#if 0 /* slow, with this can avoid all Py_CompileString above. */
/* execute expression to get a value */
retval = PyRun_String(expr, Py_eval_input, bpy_pydriver_Dict, driver_vars);
/* execute expression to get a value */
retval = PyRun_String(expr, Py_eval_input, bpy_pydriver_Dict, driver_vars);
#else
/* Evaluate the compiled expression. */
if (expr_code) {

View File

@ -6583,9 +6583,12 @@ static PyObject *pyrna_func_call(BPy_FunctionRNA *self, PyObject *args, PyObject
#ifdef DEBUG_STRING_FREE
# if 0
if (PyList_GET_SIZE(string_free_ls)) {
printf("%.200s.%.200s(): has %d strings\n", RNA_struct_identifier(self_ptr->type), RNA_function_identifier(self_func), int(PyList_GET_SIZE(string_free_ls)));
}
if (PyList_GET_SIZE(string_free_ls)) {
printf("%.200s.%.200s(): has %d strings\n",
RNA_struct_identifier(self_ptr->type),
RNA_function_identifier(self_func),
int(PyList_GET_SIZE(string_free_ls)));
}
# endif
Py_DECREF(string_free_ls);
# undef DEBUG_STRING_FREE
@ -8559,8 +8562,8 @@ static int bpy_class_call(bContext *C, PointerRNA *ptr, FunctionRNA *func, Param
/* 'almost' all the time calling the class isn't needed.
* We could just do... */
# if 0
py_class_instance = py_srna;
Py_INCREF(py_class_instance);
py_class_instance = py_srna;
Py_INCREF(py_class_instance);
# endif
/*
* This would work fine, but means __init__ functions wouldn't run.

View File

@ -1088,9 +1088,12 @@ static void build_permutation_table(ushort permutation[],
* every entry must appear exactly once
*/
# if 0
for (i = 0; i < number_of_rays; i++) temp_permutation[i] = 0;
for (i = 0; i < number_of_rays; i++) ++temp_permutation[permutation[i]];
for (i = 0; i < number_of_rays; i++) BLI_assert(temp_permutation[i] == 1);
for (i = 0; i < number_of_rays; i++)
temp_permutation[i] = 0;
for (i = 0; i < number_of_rays; i++)
++temp_permutation[permutation[i]];
for (i = 0; i < number_of_rays; i++)
BLI_assert(temp_permutation[i] == 1);
# endif
}

View File

@ -106,13 +106,9 @@ EIGEN_DONT_INLINE void constrained_conjugate_gradient(const MatrixType &mat,
#if 0 /* unused */
template<typename MatrixType> struct MatrixFilter {
MatrixFilter() : m_cmat(NULL)
{
}
MatrixFilter() : m_cmat(NULL) {}
MatrixFilter(const MatrixType &cmat) : m_cmat(&cmat)
{
}
MatrixFilter(const MatrixType &cmat) : m_cmat(&cmat) {}
void setMatrix(const MatrixType &cmat)
{

View File

@ -1032,23 +1032,21 @@ static void cloth_continuum_step(ClothModifierData *clmd, float dt)
madd_v3_v3fl(x, b, float(j) / float(size - 1));
zero_v3(v);
SIM_hair_volume_grid_interpolate(grid, x, &gdensity, gvel, gvel_smooth, nullptr, nullptr);
SIM_hair_volume_grid_interpolate(
grid, x, &gdensity, gvel, gvel_smooth, nullptr, nullptr);
# if 0
BKE_sim_debug_data_add_circle(
clmd->debug_data, x, gdensity, 0.7, 0.3, 1,
"grid density", i, j, 3111);
clmd->debug_data, x, gdensity, 0.7, 0.3, 1, "grid density", i, j, 3111);
# endif
if (!is_zero_v3(gvel) || !is_zero_v3(gvel_smooth)) {
float dvel[3];
sub_v3_v3v3(dvel, gvel_smooth, gvel);
# if 0
BKE_sim_debug_data_add_vector(
clmd->debug_data, x, gvel, 0.4, 0, 1,
"grid velocity", i, j, 3112);
clmd->debug_data, x, gvel, 0.4, 0, 1, "grid velocity", i, j, 3112);
BKE_sim_debug_data_add_vector(
clmd->debug_data, x, gvel_smooth, 0.6, 1, 1,
"grid velocity", i, j, 3113);
clmd->debug_data, x, gvel_smooth, 0.6, 1, 1, "grid velocity", i, j, 3113);
# endif
BKE_sim_debug_data_add_vector(
clmd->debug_data, x, dvel, 0.4, 1, 0.7, "grid velocity", i, j, 3114);
@ -1058,15 +1056,23 @@ static void cloth_continuum_step(ClothModifierData *clmd, float dt)
float col1[3] = {0.0, 1.0, 0.0};
float col[3];
interp_v3_v3v3(col, col0, col1,
interp_v3_v3v3(col,
col0,
col1,
CLAMPIS(gdensity * clmd->sim_parms->density_strength, 0.0, 1.0));
# if 0
BKE_sim_debug_data_add_circle(
clmd->debug_data, x, gdensity * clmd->sim_parms->density_strength, 0, 1, 0.4,
"grid velocity", i, j, 3115);
BKE_sim_debug_data_add_circle(clmd->debug_data,
x,
gdensity * clmd->sim_parms->density_strength,
0,
1,
0.4,
"grid velocity",
i,
j,
3115);
BKE_sim_debug_data_add_dot(
clmd->debug_data, x, col[0], col[1], col[2],
"grid velocity", i, j, 3115);
clmd->debug_data, x, col[0], col[1], col[2], "grid velocity", i, j, 3115);
# endif
BKE_sim_debug_data_add_circle(
clmd->debug_data, x, 0.01f, col[0], col[1], col[2], "grid velocity", i, j, 3115);

View File

@ -1723,7 +1723,8 @@ BLI_INLINE bool spring_length(Implicit_Data *data,
# if 0
if (length > L) {
if ((clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED) &&
(((length - L) * 100.0f / L) > clmd->sim_parms->maxspringlen)) {
(((length - L) * 100.0f / L) > clmd->sim_parms->maxspringlen))
{
/* cut spring! */
s->flags |= CSPRING_FLAG_DEACTIVATE;
return false;

View File

@ -944,7 +944,8 @@ BLI_INLINE bool spring_length(Implicit_Data *data,
# if 0
if (length > L) {
if ((clmd->sim_parms->flags & CSIMSETT_FLAG_TEARING_ENABLED) &&
(((length - L) * 100.0f / L) > clmd->sim_parms->maxspringlen)) {
(((length - L) * 100.0f / L) > clmd->sim_parms->maxspringlen))
{
/* cut spring! */
s->flags |= CSPRING_FLAG_DEACTIVATE;
return false;

View File

@ -1029,7 +1029,7 @@ static void wm_draw_window_onscreen(bContext *C, wmWindow *win, int view)
* Actually this is only a problem when resizing the window.
* If it becomes a problem we should clear only when window size changes. */
#if 0
GPU_clear_color(0, 0, 0, 0);
GPU_clear_color(0, 0, 0, 0);
#endif
/* Blit non-overlapping area regions. */

View File

@ -348,7 +348,7 @@ static const char *wm_context_member_from_ptr(bContext *C, const PointerRNA *ptr
for (link = lb.first; link; link = link->next) {
const char *identifier = link->data;
PointerRNA ctx_item_ptr = {{0}};
/* CTX_data_pointer_get(C, identifier); */ /* XXX, this isn't working. */
// CTX_data_pointer_get(C, identifier); /* XXX, this isn't working. */
if (ctx_item_ptr.type == nullptr) {
continue;