Cleanup: avoid line breaks from trailing comments
This commit is contained in:
parent
91b8e57d65
commit
e927ce8acb
|
@ -1818,8 +1818,9 @@ void BKE_curve_bevel_make(Object *ob, ListBase *disp)
|
|||
fp[3] = fp[4] = 0.0;
|
||||
fp[5] = cu->ext1;
|
||||
}
|
||||
else if ((cu->flag & (CU_FRONT | CU_BACK)) == 0 &&
|
||||
cu->ext1 == 0.0f) { /* we make a full round bevel in that case */
|
||||
else if ((cu->flag & (CU_FRONT | CU_BACK)) == 0 && cu->ext1 == 0.0f) {
|
||||
/* We make a full round bevel in that case. */
|
||||
|
||||
nr = 4 + 2 * cu->bevresol;
|
||||
|
||||
dl = MEM_callocN(sizeof(DispList), "makebevelcurve p1");
|
||||
|
@ -4742,8 +4743,8 @@ bool BKE_nurb_check_valid_u(const Nurb *nu)
|
|||
if (nu->pntsu < nu->orderu) {
|
||||
return false;
|
||||
}
|
||||
if (((nu->flagu & CU_NURB_CYCLIC) == 0) &&
|
||||
(nu->flagu & CU_NURB_BEZIER)) { /* Bezier U Endpoints */
|
||||
if (((nu->flagu & CU_NURB_CYCLIC) == 0) && (nu->flagu & CU_NURB_BEZIER)) {
|
||||
/* Bezier U Endpoints */
|
||||
if (nu->orderu == 4) {
|
||||
if (nu->pntsu < 5) {
|
||||
return false; /* bezier with 4 orderu needs 5 points */
|
||||
|
@ -4769,8 +4770,8 @@ bool BKE_nurb_check_valid_v(const Nurb *nu)
|
|||
if (nu->pntsv < nu->orderv) {
|
||||
return false;
|
||||
}
|
||||
if (((nu->flagv & CU_NURB_CYCLIC) == 0) &&
|
||||
(nu->flagv & CU_NURB_BEZIER)) { /* Bezier V Endpoints */
|
||||
if (((nu->flagv & CU_NURB_CYCLIC) == 0) && (nu->flagv & CU_NURB_BEZIER)) {
|
||||
/* Bezier V Endpoints */
|
||||
if (nu->orderv == 4) {
|
||||
if (nu->pntsv < 5) {
|
||||
return false; /* bezier with 4 orderu needs 5 points */
|
||||
|
|
|
@ -558,8 +558,9 @@ void BKE_mesh_copy_data(Main *bmain, Mesh *me_dst, const Mesh *me_src, const int
|
|||
/* XXX WHAT? Why? Comment, please! And pretty sure this is not valid for regular Mesh copying? */
|
||||
me_dst->runtime.is_original = false;
|
||||
|
||||
const bool do_tessface = ((me_src->totface != 0) &&
|
||||
(me_src->totpoly == 0)); /* only do tessface if we have no polys */
|
||||
/* Only do tessface if we have no polys. */
|
||||
const bool do_tessface = ((me_src->totface != 0) && (me_src->totpoly == 0));
|
||||
|
||||
CustomData_MeshMasks mask = CD_MASK_MESH;
|
||||
|
||||
if (me_src->id.tag & LIB_TAG_NO_MAIN) {
|
||||
|
|
|
@ -1402,9 +1402,9 @@ static void emit_from_particles(Object *flow_ob,
|
|||
Scene *scene,
|
||||
float dt)
|
||||
{
|
||||
/* Is particle system selected. */
|
||||
if (sfs && sfs->psys && sfs->psys->part &&
|
||||
ELEM(sfs->psys->part->type, PART_EMITTER, PART_FLUID)) // is particle system selected
|
||||
{
|
||||
ELEM(sfs->psys->part->type, PART_EMITTER, PART_FLUID)) {
|
||||
ParticleSimulationData sim;
|
||||
ParticleSystem *psys = sfs->psys;
|
||||
float *particle_pos;
|
||||
|
|
|
@ -1712,22 +1712,26 @@ BlendThumbnail *BLO_thumbnail_from_file(const char *filepath)
|
|||
/** \name Old/New Pointer Map
|
||||
* \{ */
|
||||
|
||||
static void *newdataadr(FileData *fd, const void *adr) /* only direct databocks */
|
||||
/* only direct databocks */
|
||||
static void *newdataadr(FileData *fd, const void *adr)
|
||||
{
|
||||
return oldnewmap_lookup_and_inc(fd->datamap, adr, true);
|
||||
}
|
||||
|
||||
static void *newdataadr_no_us(FileData *fd, const void *adr) /* only direct databocks */
|
||||
/* only direct databocks */
|
||||
static void *newdataadr_no_us(FileData *fd, const void *adr)
|
||||
{
|
||||
return oldnewmap_lookup_and_inc(fd->datamap, adr, false);
|
||||
}
|
||||
|
||||
static void *newglobadr(FileData *fd, const void *adr) /* direct data-locks with global linking */
|
||||
/* direct datablocks with global linking */
|
||||
static void *newglobadr(FileData *fd, const void *adr)
|
||||
{
|
||||
return oldnewmap_lookup_and_inc(fd->globmap, adr, true);
|
||||
}
|
||||
|
||||
static void *newimaadr(FileData *fd, const void *adr) /* used to restore image data after undo */
|
||||
/* used to restore image data after undo */
|
||||
static void *newimaadr(FileData *fd, const void *adr)
|
||||
{
|
||||
if (fd->imamap && adr) {
|
||||
return oldnewmap_lookup_and_inc(fd->imamap, adr, true);
|
||||
|
@ -1735,7 +1739,8 @@ static void *newimaadr(FileData *fd, const void *adr) /* used to restore image d
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static void *newsceadr(FileData *fd, const void *adr) /* used to restore scene data after undo */
|
||||
/* used to restore scene data after undo */
|
||||
static void *newsceadr(FileData *fd, const void *adr)
|
||||
{
|
||||
if (fd->scenemap && adr) {
|
||||
return oldnewmap_lookup_and_inc(fd->scenemap, adr, true);
|
||||
|
@ -1743,8 +1748,8 @@ static void *newsceadr(FileData *fd, const void *adr) /* used to restore scene d
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static void *newmclipadr(FileData *fd,
|
||||
const void *adr) /* used to restore movie clip data after undo */
|
||||
/* used to restore movie clip data after undo */
|
||||
static void *newmclipadr(FileData *fd, const void *adr)
|
||||
{
|
||||
if (fd->movieclipmap && adr) {
|
||||
return oldnewmap_lookup_and_inc(fd->movieclipmap, adr, true);
|
||||
|
@ -1752,7 +1757,8 @@ static void *newmclipadr(FileData *fd,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static void *newsoundadr(FileData *fd, const void *adr) /* used to restore sound data after undo */
|
||||
/* used to restore sound data after undo */
|
||||
static void *newsoundadr(FileData *fd, const void *adr)
|
||||
{
|
||||
if (fd->soundmap && adr) {
|
||||
return oldnewmap_lookup_and_inc(fd->soundmap, adr, true);
|
||||
|
@ -1760,8 +1766,8 @@ static void *newsoundadr(FileData *fd, const void *adr) /* used to restore sound
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static void *newpackedadr(FileData *fd,
|
||||
const void *adr) /* used to restore packed data after undo */
|
||||
/* used to restore packed data after undo */
|
||||
static void *newpackedadr(FileData *fd, const void *adr)
|
||||
{
|
||||
if (fd->packedmap && adr) {
|
||||
return oldnewmap_lookup_and_inc(fd->packedmap, adr, true);
|
||||
|
@ -1770,19 +1776,20 @@ static void *newpackedadr(FileData *fd,
|
|||
return oldnewmap_lookup_and_inc(fd->datamap, adr, true);
|
||||
}
|
||||
|
||||
static void *newlibadr(FileData *fd, const void *lib, const void *adr) /* only lib data */
|
||||
/* only lib data */
|
||||
static void *newlibadr(FileData *fd, const void *lib, const void *adr)
|
||||
{
|
||||
return oldnewmap_liblookup(fd->libmap, adr, lib);
|
||||
}
|
||||
|
||||
void *blo_do_versions_newlibadr(FileData *fd, const void *lib, const void *adr) /* only lib data */
|
||||
/* only lib data */
|
||||
void *blo_do_versions_newlibadr(FileData *fd, const void *lib, const void *adr)
|
||||
{
|
||||
return newlibadr(fd, lib, adr);
|
||||
}
|
||||
|
||||
static void *newlibadr_us(FileData *fd,
|
||||
const void *lib,
|
||||
const void *adr) /* increases user number */
|
||||
/* increases user number */
|
||||
static void *newlibadr_us(FileData *fd, const void *lib, const void *adr)
|
||||
{
|
||||
ID *id = newlibadr(fd, lib, adr);
|
||||
|
||||
|
@ -1791,16 +1798,14 @@ static void *newlibadr_us(FileData *fd,
|
|||
return id;
|
||||
}
|
||||
|
||||
void *blo_do_versions_newlibadr_us(FileData *fd,
|
||||
const void *lib,
|
||||
const void *adr) /* increases user number */
|
||||
/* increases user number */
|
||||
void *blo_do_versions_newlibadr_us(FileData *fd, const void *lib, const void *adr)
|
||||
{
|
||||
return newlibadr_us(fd, lib, adr);
|
||||
}
|
||||
|
||||
static void *newlibadr_real_us(FileData *fd,
|
||||
const void *lib,
|
||||
const void *adr) /* ensures real user */
|
||||
/* ensures real user */
|
||||
static void *newlibadr_real_us(FileData *fd, const void *lib, const void *adr)
|
||||
{
|
||||
ID *id = newlibadr(fd, lib, adr);
|
||||
|
||||
|
|
|
@ -553,10 +553,8 @@ static void writestruct_id(
|
|||
writestruct_at_address_id(wd, filecode, structname, nr, adr, adr);
|
||||
}
|
||||
|
||||
static void writedata(WriteData *wd,
|
||||
int filecode,
|
||||
int len,
|
||||
const void *adr) /* do not use for structs */
|
||||
/* do not use for structs */
|
||||
static void writedata(WriteData *wd, int filecode, int len, const void *adr)
|
||||
{
|
||||
BHead bh;
|
||||
|
||||
|
|
|
@ -545,7 +545,8 @@ static int update_reports_display_invoke(bContext *C, wmOperator *UNUSED(op), co
|
|||
|
||||
/* escape if not our timer */
|
||||
if ((reports->reporttimer == NULL) || (reports->reporttimer != event->customdata) ||
|
||||
((report = BKE_reports_last_displayable(reports)) == NULL) /* may have been deleted */
|
||||
((report = BKE_reports_last_displayable(reports)) == NULL)
|
||||
/* may have been deleted */
|
||||
) {
|
||||
return OPERATOR_PASS_THROUGH;
|
||||
}
|
||||
|
|
|
@ -566,13 +566,8 @@ static void initSnappingMode(TransInfo *t)
|
|||
/* Edit mode */
|
||||
if (t->tsnap.applySnap != NULL && // A snapping function actually exist
|
||||
((obedit_type != -1) &&
|
||||
ELEM(obedit_type,
|
||||
OB_MESH,
|
||||
OB_ARMATURE,
|
||||
OB_CURVE,
|
||||
OB_LATTICE,
|
||||
OB_MBALL))) // Temporary limited to edit mode meshes, armature, curves, metaballs
|
||||
{
|
||||
/* Temporary limited to edit mode meshes, armature, curves, metaballs. */
|
||||
ELEM(obedit_type, OB_MESH, OB_ARMATURE, OB_CURVE, OB_LATTICE, OB_MBALL))) {
|
||||
/* Exclude editmesh if using proportional edit */
|
||||
if ((obedit_type == OB_MESH) && (t->flag & T_PROP_EDIT)) {
|
||||
t->tsnap.modeSelect = SNAP_NOT_ACTIVE;
|
||||
|
|
|
@ -428,8 +428,8 @@ static PyObject *FrsMaterial_shininess_get(BPy_FrsMaterial *self, void *UNUSED(c
|
|||
static int FrsMaterial_shininess_set(BPy_FrsMaterial *self, PyObject *value, void *UNUSED(closure))
|
||||
{
|
||||
float scalar;
|
||||
if ((scalar = PyFloat_AsDouble(value)) == -1.0f &&
|
||||
PyErr_Occurred()) { /* parsed item not a number */
|
||||
if ((scalar = PyFloat_AsDouble(value)) == -1.0f && PyErr_Occurred()) {
|
||||
/* parsed item not a number */
|
||||
PyErr_SetString(PyExc_TypeError, "value must be a number");
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -577,8 +577,8 @@ static int StrokeAttribute_alpha_set(BPy_StrokeAttribute *self,
|
|||
void *UNUSED(closure))
|
||||
{
|
||||
float scalar;
|
||||
if ((scalar = PyFloat_AsDouble(value)) == -1.0f &&
|
||||
PyErr_Occurred()) { /* parsed item not a number */
|
||||
if ((scalar = PyFloat_AsDouble(value)) == -1.0f && PyErr_Occurred()) {
|
||||
/* parsed item not a number */
|
||||
PyErr_SetString(PyExc_TypeError, "value must be a number");
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -282,8 +282,8 @@ static int StrokeVertex_curvilinear_abscissa_set(BPy_StrokeVertex *self,
|
|||
void *UNUSED(closure))
|
||||
{
|
||||
float scalar;
|
||||
if ((scalar = PyFloat_AsDouble(value)) == -1.0f &&
|
||||
PyErr_Occurred()) { /* parsed item not a number */
|
||||
if ((scalar = PyFloat_AsDouble(value)) == -1.0f && PyErr_Occurred()) {
|
||||
/* parsed item not a number */
|
||||
PyErr_SetString(PyExc_TypeError, "value must be a number");
|
||||
return -1;
|
||||
}
|
||||
|
@ -328,8 +328,8 @@ static int StrokeVertex_stroke_length_set(BPy_StrokeVertex *self,
|
|||
void *UNUSED(closure))
|
||||
{
|
||||
float scalar;
|
||||
if ((scalar = PyFloat_AsDouble(value)) == -1.0f &&
|
||||
PyErr_Occurred()) { /* parsed item not a number */
|
||||
if ((scalar = PyFloat_AsDouble(value)) == -1.0f && PyErr_Occurred()) {
|
||||
/* parsed item not a number */
|
||||
PyErr_SetString(PyExc_TypeError, "value must be a number");
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -435,8 +435,8 @@ static PyObject *Stroke_length_2d_get(BPy_Stroke *self, void *UNUSED(closure))
|
|||
static int Stroke_length_2d_set(BPy_Stroke *self, PyObject *value, void *UNUSED(closure))
|
||||
{
|
||||
float scalar;
|
||||
if ((scalar = PyFloat_AsDouble(value)) == -1.0f &&
|
||||
PyErr_Occurred()) { /* parsed item not a number */
|
||||
if ((scalar = PyFloat_AsDouble(value)) == -1.0f && PyErr_Occurred()) {
|
||||
/* parsed item not a number */
|
||||
PyErr_SetString(PyExc_TypeError, "value must be a number");
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -969,8 +969,8 @@ int IMB_exr_begin_read(void *handle, const char *filename, int *width, int *heig
|
|||
ExrHandle *data = (ExrHandle *)handle;
|
||||
ExrChannel *echan;
|
||||
|
||||
if (BLI_exists(filename) &&
|
||||
BLI_file_size(filename) > 32) { /* 32 is arbitrary, but zero length files crashes exr */
|
||||
/* 32 is arbitrary, but zero length files crashes exr. */
|
||||
if (BLI_exists(filename) && BLI_file_size(filename) > 32) {
|
||||
/* avoid crash/abort when we don't have permission to write here */
|
||||
try {
|
||||
data->ifile_stream = new IFileStream(filename);
|
||||
|
@ -1957,8 +1957,8 @@ struct ImBuf *imb_load_openexr(const unsigned char *mem,
|
|||
}
|
||||
}
|
||||
|
||||
if (is_multi &&
|
||||
((flags & IB_thumbnail) == 0)) { /* only enters with IB_multilayer flag set */
|
||||
/* Only enters with IB_multilayer flag set. */
|
||||
if (is_multi && ((flags & IB_thumbnail) == 0)) {
|
||||
/* constructs channels for reading, allocates memory in channels */
|
||||
ExrHandle *handle = imb_exr_begin_read_mem(*membuf, *file, width, height);
|
||||
if (handle) {
|
||||
|
|
|
@ -1870,8 +1870,8 @@ int rna_property_override_diff_default(Main *bmain,
|
|||
# undef RNA_PATH_FREE
|
||||
}
|
||||
|
||||
equals = equals && !(iter_a.valid || iter_b.valid) &&
|
||||
!abort; /* Not same number of items in both collections... */
|
||||
/* Not same number of items in both collections. */
|
||||
equals = equals && !(iter_a.valid || iter_b.valid) && !abort;
|
||||
RNA_property_collection_end(&iter_a);
|
||||
RNA_property_collection_end(&iter_b);
|
||||
|
||||
|
|
|
@ -200,8 +200,8 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes
|
|||
updateFaceCount(ctx, dmd, bm->totface);
|
||||
|
||||
result = BKE_mesh_from_bmesh_for_eval_nomain(bm, NULL);
|
||||
BLI_assert(bm->vtoolflagpool == NULL && bm->etoolflagpool == NULL &&
|
||||
bm->ftoolflagpool == NULL); /* make sure we never alloc'd these */
|
||||
/* make sure we never alloc'd these */
|
||||
BLI_assert(bm->vtoolflagpool == NULL && bm->etoolflagpool == NULL && bm->ftoolflagpool == NULL);
|
||||
BLI_assert(bm->vtable == NULL && bm->etable == NULL && bm->ftable == NULL);
|
||||
|
||||
BM_mesh_free(bm);
|
||||
|
|
|
@ -64,9 +64,8 @@ static void node_shader_exec_math(void *UNUSED(data),
|
|||
break;
|
||||
}
|
||||
case NODE_MATH_SIN: {
|
||||
if (in[0]->hasinput ||
|
||||
!in[1]->hasinput) /* This one only takes one input, so we've got to choose. */
|
||||
{
|
||||
/* This one only takes one input, so we've got to choose. */
|
||||
if (in[0]->hasinput || !in[1]->hasinput) {
|
||||
r = sinf(a);
|
||||
}
|
||||
else {
|
||||
|
@ -75,9 +74,8 @@ static void node_shader_exec_math(void *UNUSED(data),
|
|||
break;
|
||||
}
|
||||
case NODE_MATH_COS: {
|
||||
if (in[0]->hasinput ||
|
||||
!in[1]->hasinput) /* This one only takes one input, so we've got to choose. */
|
||||
{
|
||||
/* This one only takes one input, so we've got to choose. */
|
||||
if (in[0]->hasinput || !in[1]->hasinput) {
|
||||
r = cosf(a);
|
||||
}
|
||||
else {
|
||||
|
@ -86,9 +84,8 @@ static void node_shader_exec_math(void *UNUSED(data),
|
|||
break;
|
||||
}
|
||||
case NODE_MATH_TAN: {
|
||||
if (in[0]->hasinput ||
|
||||
!in[1]->hasinput) /* This one only takes one input, so we've got to choose. */
|
||||
{
|
||||
/* This one only takes one input, so we've got to choose. */
|
||||
if (in[0]->hasinput || !in[1]->hasinput) {
|
||||
r = tanf(a);
|
||||
}
|
||||
else {
|
||||
|
@ -97,8 +94,8 @@ static void node_shader_exec_math(void *UNUSED(data),
|
|||
break;
|
||||
}
|
||||
case NODE_MATH_ASIN: {
|
||||
if (in[0]->hasinput ||
|
||||
!in[1]->hasinput) { /* This one only takes one input, so we've got to choose. */
|
||||
/* This one only takes one input, so we've got to choose. */
|
||||
if (in[0]->hasinput || !in[1]->hasinput) {
|
||||
/* Can't do the impossible... */
|
||||
if (a <= 1 && a >= -1) {
|
||||
r = asinf(a);
|
||||
|
@ -119,8 +116,8 @@ static void node_shader_exec_math(void *UNUSED(data),
|
|||
break;
|
||||
}
|
||||
case NODE_MATH_ACOS: {
|
||||
if (in[0]->hasinput ||
|
||||
!in[1]->hasinput) { /* This one only takes one input, so we've got to choose. */
|
||||
/* This one only takes one input, so we've got to choose. */
|
||||
if (in[0]->hasinput || !in[1]->hasinput) {
|
||||
/* Can't do the impossible... */
|
||||
if (a <= 1 && a >= -1) {
|
||||
r = acosf(a);
|
||||
|
@ -141,9 +138,8 @@ static void node_shader_exec_math(void *UNUSED(data),
|
|||
break;
|
||||
}
|
||||
case NODE_MATH_ATAN: {
|
||||
if (in[0]->hasinput ||
|
||||
!in[1]->hasinput) /* This one only takes one input, so we've got to choose. */
|
||||
{
|
||||
/* This one only takes one input, so we've got to choose. */
|
||||
if (in[0]->hasinput || !in[1]->hasinput) {
|
||||
r = atan(a);
|
||||
}
|
||||
else {
|
||||
|
@ -200,9 +196,8 @@ static void node_shader_exec_math(void *UNUSED(data),
|
|||
break;
|
||||
}
|
||||
case NODE_MATH_ROUND: {
|
||||
if (in[0]->hasinput ||
|
||||
!in[1]->hasinput) /* This one only takes one input, so we've got to choose. */
|
||||
{
|
||||
/* This one only takes one input, so we've got to choose. */
|
||||
if (in[0]->hasinput || !in[1]->hasinput) {
|
||||
r = (a < 0) ? (int)(a - 0.5f) : (int)(a + 0.5f);
|
||||
}
|
||||
else {
|
||||
|
@ -246,9 +241,8 @@ static void node_shader_exec_math(void *UNUSED(data),
|
|||
break;
|
||||
}
|
||||
case NODE_MATH_FLOOR: {
|
||||
if (in[0]->hasinput ||
|
||||
!in[1]->hasinput) /* This one only takes one input, so we've got to choose. */
|
||||
{
|
||||
/* This one only takes one input, so we've got to choose. */
|
||||
if (in[0]->hasinput || !in[1]->hasinput) {
|
||||
r = floorf(a);
|
||||
}
|
||||
else {
|
||||
|
@ -257,9 +251,8 @@ static void node_shader_exec_math(void *UNUSED(data),
|
|||
break;
|
||||
}
|
||||
case NODE_MATH_CEIL: {
|
||||
if (in[0]->hasinput ||
|
||||
!in[1]->hasinput) /* This one only takes one input, so we've got to choose. */
|
||||
{
|
||||
/* This one only takes one input, so we've got to choose. */
|
||||
if (in[0]->hasinput || !in[1]->hasinput) {
|
||||
r = ceilf(a);
|
||||
}
|
||||
else {
|
||||
|
@ -268,9 +261,8 @@ static void node_shader_exec_math(void *UNUSED(data),
|
|||
break;
|
||||
}
|
||||
case NODE_MATH_FRACT: {
|
||||
if (in[0]->hasinput ||
|
||||
!in[1]->hasinput) /* This one only takes one input, so we've got to choose. */
|
||||
{
|
||||
/* This one only takes one input, so we've got to choose. */
|
||||
if (in[0]->hasinput || !in[1]->hasinput) {
|
||||
r = a - floorf(a);
|
||||
}
|
||||
else {
|
||||
|
@ -279,9 +271,8 @@ static void node_shader_exec_math(void *UNUSED(data),
|
|||
break;
|
||||
}
|
||||
case NODE_MATH_SQRT: {
|
||||
if (in[0]->hasinput ||
|
||||
!in[1]->hasinput) /* This one only takes one input, so we've got to choose. */
|
||||
{
|
||||
/* This one only takes one input, so we've got to choose. */
|
||||
if (in[0]->hasinput || !in[1]->hasinput) {
|
||||
if (a > 0) {
|
||||
r = sqrt(a);
|
||||
}
|
||||
|
|
|
@ -78,8 +78,8 @@ static void node_shader_exec_vect_math(void *UNUSED(data),
|
|||
out[1]->vec[0] = normalize_v3(out[0]->vec);
|
||||
}
|
||||
else if (node->custom1 == 5) { /* Normalize */
|
||||
if (in[0]->hasinput ||
|
||||
!in[1]->hasinput) { /* This one only takes one input, so we've got to choose. */
|
||||
/* This one only takes one input, so we've got to choose. */
|
||||
if (in[0]->hasinput || !in[1]->hasinput) {
|
||||
out[0]->vec[0] = vec1[0];
|
||||
out[0]->vec[1] = vec1[1];
|
||||
out[0]->vec[2] = vec1[2];
|
||||
|
|
|
@ -1415,8 +1415,8 @@ static int vector_ass_item_internal(VectorObject *self, int i, PyObject *value,
|
|||
return -1;
|
||||
}
|
||||
|
||||
if ((scalar = PyFloat_AsDouble(value)) == -1.0f &&
|
||||
PyErr_Occurred()) { /* parsed item not a number */
|
||||
if ((scalar = PyFloat_AsDouble(value)) == -1.0f && PyErr_Occurred()) {
|
||||
/* parsed item not a number */
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"vector[index] = x: "
|
||||
"assigned value not a number");
|
||||
|
@ -1950,8 +1950,8 @@ static PyObject *Vector_div(PyObject *v1, PyObject *v2)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if ((scalar = PyFloat_AsDouble(v2)) == -1.0f &&
|
||||
PyErr_Occurred()) { /* parsed item not a number */
|
||||
if ((scalar = PyFloat_AsDouble(v2)) == -1.0f && PyErr_Occurred()) {
|
||||
/* parsed item not a number */
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"Vector division: "
|
||||
"Vector must be divided by a float");
|
||||
|
@ -1989,8 +1989,8 @@ static PyObject *Vector_idiv(PyObject *v1, PyObject *v2)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if ((scalar = PyFloat_AsDouble(v2)) == -1.0f &&
|
||||
PyErr_Occurred()) { /* parsed item not a number */
|
||||
if ((scalar = PyFloat_AsDouble(v2)) == -1.0f && PyErr_Occurred()) {
|
||||
/* parsed item not a number */
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"Vector division: "
|
||||
"Vector must be divided by a float");
|
||||
|
|
Loading…
Reference in New Issue