BSP_CSGMesh_VertexIt * v_it = new BSP_CSGMesh_VertexIt;
v_it->mesh = mesh;
- if( output->num_elements > 0 )
+ if ( output->num_elements > 0 )
v_it->pos = &mesh->VertexSet()[0];
output->it = v_it;
-};
+}
/**
#include "CTR_List.h"
-CTR_Link::
-CTR_Link(
-) :
+CTR_Link::CTR_Link() :
m_next(0),
m_prev(0)
{
}
-CTR_Link::
-CTR_Link(
- CTR_Link *next,
- CTR_Link *prev
-) :
+CTR_Link::CTR_Link(CTR_Link *next, CTR_Link *prev) :
m_next(next),
m_prev(prev)
{
}
- CTR_Link *
-CTR_Link::
-getNext(
-) const {
+CTR_Link *
+CTR_Link::getNext() const
+{
return m_next;
}
- CTR_Link *
-CTR_Link::
-getPrev(
-) const {
+CTR_Link *
+CTR_Link::getPrev() const
+{
return m_prev;
}
- bool
-CTR_Link::
-isHead(
-) const {
+bool
+CTR_Link::isHead() const
+{
return m_prev == 0;
}
- bool
-CTR_Link::
-isTail(
-) const {
+bool
+CTR_Link::isTail() const
+{
return m_next == 0;
}
- void
-CTR_Link::
-insertBefore(
- CTR_Link *link
-) {
- m_next = link;
- m_prev = link->m_prev;
- m_next->m_prev = this;
- m_prev->m_next = this;
+void
+CTR_Link::insertBefore(CTR_Link *link)
+{
+ m_next = link;
+ m_prev = link->m_prev;
+ m_next->m_prev = this;
+ m_prev->m_next = this;
}
- void
-CTR_Link::
-insertAfter(
- CTR_Link *link
-) {
- m_next = link->m_next;
- m_prev = link;
- m_next->m_prev = this;
- m_prev->m_next = this;
+void
+CTR_Link::insertAfter(CTR_Link *link)
+{
+ m_next = link->m_next;
+ m_prev = link;
+ m_next->m_prev = this;
+ m_prev->m_next = this;
}
- void
-CTR_Link::
-remove(
-) {
- m_next->m_prev = m_prev;
- m_prev->m_next = m_next;
+void
+CTR_Link::remove()
+{
+ m_next->m_prev = m_prev;
+ m_prev->m_next = m_next;
}
-CTR_List::
-CTR_List(
-) :
+CTR_List::CTR_List() :
m_head(&m_tail, 0),
m_tail(0, &m_head)
{
}
- CTR_Link *
-CTR_List::
-getHead(
-) const {
+CTR_Link *
+CTR_List:: getHead() const
+{
return m_head.getNext();
}
- CTR_Link *
-CTR_List::
-getTail(
-) const {
+CTR_Link *
+CTR_List::getTail() const
+{
return m_tail.getPrev();
}
- void
-CTR_List::
-addHead(
- CTR_Link *link
-) {
+void
+CTR_List::addHead(CTR_Link *link)
+{
link->insertAfter(&m_head);
}
- void
-CTR_List::
-addTail(
- CTR_Link *link
-) {
+void
+CTR_List::addTail(CTR_Link *link)
+{
link->insertBefore(&m_tail);
}
GHOST_TSuccess getNumDisplaySettings( GHOST_TUns8 display, GHOST_TInt32& numSettings ) const{ return GHOST_kFailure; }
GHOST_TSuccess getDisplaySetting( GHOST_TUns8 display, GHOST_TInt32 index, GHOST_DisplaySetting& setting ) const { return GHOST_kFailure; }
GHOST_TSuccess getCurrentDisplaySetting( GHOST_TUns8 display, GHOST_DisplaySetting& setting ) const { return getDisplaySetting(display,GHOST_TInt32(0),setting); }
- GHOST_TSuccess setCurrentDisplaySetting( GHOST_TUns8 display, const GHOST_DisplaySetting& setting ){ return GHOST_kSuccess; }
+ GHOST_TSuccess setCurrentDisplaySetting( GHOST_TUns8 display, const GHOST_DisplaySetting& setting ) { return GHOST_kSuccess; }
private:
GHOST_SystemNULL * m_system;
}
protected:
- GHOST_TSuccess installDrawingContext( GHOST_TDrawingContextType type ){ return GHOST_kSuccess; }
- GHOST_TSuccess removeDrawingContext( ){ return GHOST_kSuccess; }
- GHOST_TSuccess setWindowCursorGrab( GHOST_TGrabCursorMode mode ){ return GHOST_kSuccess; }
- GHOST_TSuccess setWindowCursorShape( GHOST_TStandardCursor shape ){ return GHOST_kSuccess; }
+ GHOST_TSuccess installDrawingContext( GHOST_TDrawingContextType type ) { return GHOST_kSuccess; }
+ GHOST_TSuccess removeDrawingContext( ) { return GHOST_kSuccess; }
+ GHOST_TSuccess setWindowCursorGrab( GHOST_TGrabCursorMode mode ) { return GHOST_kSuccess; }
+ GHOST_TSuccess setWindowCursorShape( GHOST_TStandardCursor shape ) { return GHOST_kSuccess; }
GHOST_TSuccess setWindowCustomCursorShape( GHOST_TUns8 bitmap[16][2], GHOST_TUns8 mask[16][2], int hotX, int hotY ) { return GHOST_kSuccess; }
- GHOST_TSuccess setWindowCustomCursorShape( GHOST_TUns8 *bitmap, GHOST_TUns8 *mask, int sizex, int sizey, int hotX, int hotY, int fg_color, int bg_color ){ return GHOST_kSuccess; }
+ GHOST_TSuccess setWindowCustomCursorShape( GHOST_TUns8 *bitmap, GHOST_TUns8 *mask, int sizex, int sizey, int hotX, int hotY, int fg_color, int bg_color ) { return GHOST_kSuccess; }
bool getValid( ) const { return true; }
- void setTitle( const STR_String& title ){ /* nothing */ }
+ void setTitle( const STR_String& title ) { /* nothing */ }
void getTitle( STR_String& title ) const { title= "untitled"; }
void getWindowBounds( GHOST_Rect& bounds ) const { getClientBounds(bounds); }
void getClientBounds( GHOST_Rect& bounds ) const { /* nothing */ }
- GHOST_TSuccess setClientWidth( GHOST_TUns32 width ){ return GHOST_kFailure; }
- GHOST_TSuccess setClientHeight( GHOST_TUns32 height ){ return GHOST_kFailure; }
- GHOST_TSuccess setClientSize( GHOST_TUns32 width, GHOST_TUns32 height ){ return GHOST_kFailure; }
+ GHOST_TSuccess setClientWidth( GHOST_TUns32 width ) { return GHOST_kFailure; }
+ GHOST_TSuccess setClientHeight( GHOST_TUns32 height ) { return GHOST_kFailure; }
+ GHOST_TSuccess setClientSize( GHOST_TUns32 width, GHOST_TUns32 height ) { return GHOST_kFailure; }
void screenToClient( GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY ) const { outX = inX; outY = inY; }
void clientToScreen( GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY ) const { outX = inX; outY = inY; }
- GHOST_TSuccess swapBuffers( ){ return GHOST_kFailure; }
- GHOST_TSuccess activateDrawingContext( ){ return GHOST_kFailure; }
- ~GHOST_WindowNULL( ){ /* nothing */ }
- GHOST_TSuccess setWindowCursorVisibility( bool visible ){ return GHOST_kSuccess; }
+ GHOST_TSuccess swapBuffers( ) { return GHOST_kFailure; }
+ GHOST_TSuccess activateDrawingContext( ) { return GHOST_kFailure; }
+ ~GHOST_WindowNULL( ) { /* nothing */ }
+ GHOST_TSuccess setWindowCursorVisibility( bool visible ) { return GHOST_kSuccess; }
GHOST_TSuccess setState(GHOST_TWindowState state) { return GHOST_kSuccess; }
GHOST_TWindowState getState() const { return GHOST_kWindowStateNormal; }
GHOST_TSuccess invalidate() { return GHOST_kSuccess; }
char *eventtype_to_string(GHOST_TEventType type)
{
- switch(type) {
+ switch (type) {
case GHOST_kEventCursorMove: return "CursorMove";
case GHOST_kEventButtonDown: return "ButtonDown";
case GHOST_kEventButtonUp: return "ButtonUp";
}
// __p is not permitted to be a null pointer.
- void deallocate(pointer __p, size_type){
+ void deallocate(pointer __p, size_type) {
MEM_freeN(__p);
}
*
* static
* MEM_RefCountPtr<RcUsefullClass>
- * New(...){
+ * New(...) {
* return MEM_RefCountPtr<RcUsefullClass> output(
* new UsefullClass(...)
* );
MEM_SmartPtr(
const MEM_SmartPtr &rhs
- ){
+ ) {
m_val = rhs.Release();
}
{
const int verts = pContext->m_pInterface->m_getNumVerticesOfFace(pContext, f);
if (verts==3) ++iNrTrianglesIn;
- else if(verts==4) iNrTrianglesIn += 2;
+ else if (verts==4) iNrTrianglesIn += 2;
}
if (iNrTrianglesIn<=0) return TFALSE;
const SVec3 vP = GetPosition(pContext, index);
if (vMin.x > vP.x) vMin.x = vP.x;
- else if(vMax.x < vP.x) vMax.x = vP.x;
+ else if (vMax.x < vP.x) vMax.x = vP.x;
if (vMin.y > vP.y) vMin.y = vP.y;
- else if(vMax.y < vP.y) vMax.y = vP.y;
+ else if (vMax.y < vP.y) vMax.y = vP.y;
if (vMin.z > vP.z) vMin.z = vP.z;
- else if(vMax.z < vP.z) vMax.z = vP.z;
+ else if (vMax.z < vP.z) vMax.z = vP.z;
}
vDim = vsub(vMax,vMin);
iChannel=1;
fMin = vMin.y, fMax=vMax.y;
}
- else if(vDim.z>vDim.x)
+ else if (vDim.z>vDim.x)
{
iChannel=2;
fMin = vMin.z, fMax=vMax.z;
for (l=(iL_in+1); l<=iR_in; l++)
for (c=0; c<3; c++)
if (fvMin[c]>pTmpVert[l].vert[c]) fvMin[c]=pTmpVert[l].vert[c];
- else if(fvMax[c]<pTmpVert[l].vert[c]) fvMax[c]=pTmpVert[l].vert[c];
+ else if (fvMax[c]<pTmpVert[l].vert[c]) fvMax[c]=pTmpVert[l].vert[c];
dx = fvMax[0]-fvMin[0];
dy = fvMax[1]-fvMin[1];
channel = 0;
if (dy>dx && dy>dz) channel=1;
- else if(dz>dx) channel=2;
+ else if (dz>dx) channel=2;
fSep = 0.5f*(fvMax[channel]+fvMin[channel]);
const SVec3 vT2 = GetTexCoord(pContext, index2);
i2rec=i2;
- //if(vP==vP2 && vN==vN2 && vT==vT2)
+ //if (vP==vP2 && vN==vN2 && vT==vT2)
if (vP.x==vP2.x && vP.y==vP2.y && vP.z==vP2.z &&
vN.x==vN2.x && vN.y==vN2.y && vN.z==vN2.z &&
vT.x==vT2.x && vT.y==vT2.y && vT.z==vT2.z)
tbool bQuadDiagIs_02;
if (distSQ_02<distSQ_13)
bQuadDiagIs_02 = TTRUE;
- else if(distSQ_13<distSQ_02)
+ else if (distSQ_13<distSQ_02)
bQuadDiagIs_02 = TFALSE;
else
{
//printf("found quad with bad mapping\n");
tbool bChooseOrientFirstTri = TFALSE;
if ((pTriInfos[t+1].iFlag&GROUP_WITH_ANY)!=0) bChooseOrientFirstTri = TTRUE;
- else if( CalcTexArea(pContext, &piTriListIn[t*3+0]) >= CalcTexArea(pContext, &piTriListIn[(t+1)*3+0]) )
+ else if ( CalcTexArea(pContext, &piTriListIn[t*3+0]) >= CalcTexArea(pContext, &piTriListIn[(t+1)*3+0]) )
bChooseOrientFirstTri = TTRUE;
// force match
const int * pVerts = &piTriListIn[3*iMyTriIndex+0];
int i=-1;
if (pVerts[0]==iVertRep) i=0;
- else if(pVerts[1]==iVertRep) i=1;
- else if(pVerts[2]==iVertRep) i=2;
+ else if (pVerts[1]==iVertRep) i=1;
+ else if (pVerts[2]==iVertRep) i=2;
assert(i>=0 && i<3);
// early out
if (pMyTriInfo->AssignedGroup[i] == pGroup) return TTRUE;
- else if(pMyTriInfo->AssignedGroup[i]!=NULL) return TFALSE;
+ else if (pMyTriInfo->AssignedGroup[i]!=NULL) return TFALSE;
if ((pMyTriInfo->iFlag&GROUP_WITH_ANY)!=0)
{
// first to group with a group-with-anything triangle
tbool bFound;
SVec3 n, vOs, vOt;
if (pTriInfos[f].AssignedGroup[0]==pGroup) index=0;
- else if(pTriInfos[f].AssignedGroup[1]==pGroup) index=1;
- else if(pTriInfos[f].AssignedGroup[2]==pGroup) index=2;
+ else if (pTriInfos[f].AssignedGroup[1]==pGroup) index=1;
+ else if (pTriInfos[f].AssignedGroup[2]==pGroup) index=2;
assert(index>=0 && index<3);
iVertIndex = piTriListIn[f*3+index];
float fCos, fAngle, fMagS, fMagT;
int i=-1, index=-1, i0=-1, i1=-1, i2=-1;
if (piTriListIn[3*f+0]==iVertexRepresentitive) i=0;
- else if(piTriListIn[3*f+1]==iVertexRepresentitive) i=1;
- else if(piTriListIn[3*f+2]==iVertexRepresentitive) i=2;
+ else if (piTriListIn[3*f+1]==iVertexRepresentitive) i=1;
+ else if (piTriListIn[3*f+2]==iVertexRepresentitive) i=2;
assert(i>=0 && i<3);
// project
v2 = vsub(p2,p1);
// project
- v1 = vsub(v1, vscale(vdot(n,v1),n)); if( VNotZero(v1) ) v1 = Normalize(v1);
- v2 = vsub(v2, vscale(vdot(n,v2),n)); if( VNotZero(v2) ) v2 = Normalize(v2);
+ v1 = vsub(v1, vscale(vdot(n,v1),n)); if ( VNotZero(v1) ) v1 = Normalize(v1);
+ v2 = vsub(v2, vscale(vdot(n,v2),n)); if ( VNotZero(v2) ) v2 = Normalize(v2);
// weight contribution by the angle
// between the two edge vectors
SEdge sTmp;
const int iElems = iRight-iLeft+1;
if (iElems<2) return;
- else if(iElems==2)
+ else if (iElems==2)
{
if (pSortBuffer[iLeft].array[channel] > pSortBuffer[iRight].array[channel])
{
int iFlag = (1<<pV[0]) | (1<<pV[1]) | (1<<pV[2]);
int iMissingIndex = 0;
if ((iFlag&2)==0) iMissingIndex=1;
- else if((iFlag&4)==0) iMissingIndex=2;
- else if((iFlag&8)==0) iMissingIndex=3;
+ else if ((iFlag&4)==0) iMissingIndex=2;
+ else if ((iFlag&8)==0) iMissingIndex=3;
iOrgF = pTriInfos[t].iOrgFaceNumber;
vDstP = GetPosition(pContext, MakeIndex(iOrgF, iMissingIndex));
if ((y_curr >= 0) && (y_curr < ctx->rb.sizey)) {
/* draw the pixels. */
- for (; cpxl <= mpxl; *cpxl++ = 1.0f);
+ for (; cpxl <= mpxl; *cpxl++ = 1.0f);
}
}
return 0;
}
- for (i = 0; (u = string16[i]); i++) {
+ for (i = 0; (u = string16[i]); i++) {
if (u < 0x0080) {
count += 1;
}
force[2] += (BLI_frand()-0.5f) * part->brownfac;
}
- if(part->flag & PART_ROT_DYN && epoint.ave)
+ if (part->flag & PART_ROT_DYN && epoint.ave)
copy_v3_v3(pa->state.ave, epoint.ave);
}
/* gathers all forces that effect particles and calculates a new state for the particle */
fprintf(stderr, "Closing ffmpeg...\n");
-/* if (audio_stream) { SEE UPPER
- write_audio_frames();
- }*/
+#if 0
+ if (audio_stream) { /* SEE UPPER */
+ write_audio_frames();
+ }
+#endif
#ifdef WITH_AUDASPACE
if (audio_mixdown_device) {
else {
h = (r - g) / d + 4.0f;
}
- }
- h /= 6.0f;
+ }
+ h /= 6.0f;
*lh = h;
*ls = s;
}
static float inverse_srgb_companding(float v)
{
- if (v > 0.04045f) {
- return powf((v + 0.055f) / 1.055f, 2.4);
- }
- else {
- return v / 12.92f;
- }
+ if (v > 0.04045f) {
+ return powf((v + 0.055f) / 1.055f, 2.4);
+ }
+ else {
+ return v / 12.92f;
+ }
}
void rgb_to_xyz(float r, float g, float b, float *x, float *y, float *z)
{
- r = inverse_srgb_companding(r) * 100.0f;
- g = inverse_srgb_companding(g) * 100.0f;
- b = inverse_srgb_companding(b) * 100.0f;
+ r = inverse_srgb_companding(r) * 100.0f;
+ g = inverse_srgb_companding(g) * 100.0f;
+ b = inverse_srgb_companding(b) * 100.0f;
- *x = r * 0.4124 + g * 0.3576 + b * 0.1805;
- *y = r * 0.2126 + g * 0.7152 + b * 0.0722;
- *z = r * 0.0193 + g * 0.1192 + b * 0.9505;
+ *x = r * 0.4124 + g * 0.3576 + b * 0.1805;
+ *y = r * 0.2126 + g * 0.7152 + b * 0.0722;
+ *z = r * 0.0193 + g * 0.1192 + b * 0.9505;
}
static float xyz_to_lab_component(float v)
int BLI_str_utf8_size(const char *p)
{
int mask = 0, len;
- unsigned char c = (unsigned char) *p;
+ unsigned char c = (unsigned char) *p;
- UTF8_COMPUTE (c, mask, len);
+ UTF8_COMPUTE (c, mask, len);
(void)mask; /* quiet warning */
mask = main->mask.first;
while (mask) {
- if(mask->id.flag & LIB_NEEDLINK) {
+ if (mask->id.flag & LIB_NEEDLINK) {
MaskLayer *masklay;
if (mask->adt)
bool is_joint = node->getType() == COLLADAFW::Node::JOINT;
COLLADAFW::Node *root = root_map.find(node->getUniqueId()) == root_map.end() ? node : root_map[node->getUniqueId()];
- Object *ob = is_joint ? armature_importer->get_armature_for_joint(root) : object_map.find(node->getUniqueId())->second;
+ Object *ob = is_joint ? armature_importer->get_armature_for_joint(root) : object_map.find(node->getUniqueId())->second;
if (!ob) {
fprintf(stderr, "cannot find Object for Node with id=\"%s\"\n", node->getOriginalId().c_str());
return;
{
ImBuf *stackbuf = getImBuf();
- resolution[0] = 0;
- resolution[1] = 0;
+ resolution[0] = 0;
+ resolution[1] = 0;
if (stackbuf) {
resolution[0] = stackbuf->x;
static void panels_collapse_all(ScrArea *sa, ARegion *ar)
{
- Panel *pa;
- int flag = ((panel_aligned(sa, ar)==BUT_HORIZONTAL)? PNL_CLOSEDX: PNL_CLOSEDY);
+ Panel *pa;
+ int flag = ((panel_aligned(sa, ar)==BUT_HORIZONTAL) ? PNL_CLOSEDX : PNL_CLOSEDY);
- for (pa= ar->panels.first; pa; pa= pa->next) {
- if (pa->type && !(pa->type->flag & PNL_NO_HEADER))
- pa->flag = flag;
- }
+ for (pa= ar->panels.first; pa; pa= pa->next) {
+ if (pa->type && !(pa->type->flag & PNL_NO_HEADER)) {
+ pa->flag = flag;
+ }
+ }
}
scopes->track_preview_height = (scopes->track_preview_height <= UI_UNIT_Y)?UI_UNIT_Y : scopes->track_preview_height;
uiDefBut(block, TRACKPREVIEW, 0, "", rect.xmin, rect.ymin, rect.xmax - rect.xmin,
- scopes->track_preview_height, scopes, 0, 0, 0, 0, "");
+ scopes->track_preview_height, scopes, 0, 0, 0, 0, "");
}
/********************* Marker Template ************************/
*aspy *= (float)h;
#endif
- if(*aspx < *aspy) {
+ if (*aspx < *aspy) {
*aspy= *aspy / *aspx;
*aspx= 1.0f;
}
*aspx *= (float)w;
*aspy *= (float)h;
- if(*aspx < *aspy) {
+ if (*aspx < *aspy) {
*aspy= *aspy / *aspx;
*aspx= 1.0f;
}
{
sc->mask = mask;
- if(sc->mask && sc->mask->id.us==0)
+ if (sc->mask && sc->mask->id.us==0) {
sc->clip->id.us = 1;
+ }
- if(C)
+ if (C) {
WM_event_add_notifier(C, NC_MASK|NA_SELECTED, mask);
+ }
}
}
break;
case NC_MASK:
- switch(wmn->data) {
+ switch (wmn->data) {
case ND_SELECT:
case ND_DATA:
case ND_DRAW:
ED_area_tag_redraw(sa);
break;
}
- switch(wmn->action) {
+ switch (wmn->action) {
case NA_SELECTED:
clip_scopes_tag_refresh(sa);
ED_area_tag_redraw(sa);
/* Grease Pencil */
clip_draw_grease_pencil((bContext *)C, 1);
- if(sc->mode == SC_MODE_MASKEDIT) {
+ if (sc->mode == SC_MODE_MASKEDIT) {
int x, y;
int width, height;
float zoomx, zoomy, aspx, aspy;
/* for proportional editmode only */
case ND_TOOLSETTINGS:
/* TODO - should do this when in mask mode only but no datas available */
- // if(sc->mode == SC_MODE_MASKEDIT)
+ // if (sc->mode == SC_MODE_MASKEDIT)
{
ED_region_tag_redraw(ar);
}
glDisable(GL_BLEND);
/* outline active and selected emphasis */
- if( node->flag & (NODE_ACTIVE|SELECT) ) {
+ if (node->flag & (NODE_ACTIVE | SELECT)) {
glEnable(GL_BLEND);
glEnable( GL_LINE_SMOOTH );
/* using different shades of TH_TEXT_HI for the empasis, like triangle */
/* only draw input socket. as they all are placed on the same position.
* highlight also if node itself is selected, since we don't display the node body separately!
*/
- for(sock= node->inputs.first; sock; sock= sock->next) {
+ for (sock= node->inputs.first; sock; sock= sock->next) {
node_socket_circle_draw(ntree, sock, socket_size, (sock->flag & SELECT) || (node->flag & SELECT));
}
float coord_array[LINK_RESOL+1][2];
int i, b;
- if(node_link_bezier_points(NULL, NULL, link, coord_array, LINK_RESOL)) {
+ if (node_link_bezier_points(NULL, NULL, link, coord_array, LINK_RESOL)) {
- for(i=0; i<tot-1; i++)
- for(b=0; b<LINK_RESOL; b++)
- if(isect_line_line_v2(mcoords[i], mcoords[i+1], coord_array[b], coord_array[b+1]) > 0) {
+ for (i=0; i<tot-1; i++)
+ for (b=0; b<LINK_RESOL; b++)
+ if (isect_line_line_v2(mcoords[i], mcoords[i+1], coord_array[b], coord_array[b+1]) > 0) {
result[0] = (mcoords[i][0]+mcoords[i+1][0])/2.0f;
result[1] = (mcoords[i][1]+mcoords[i+1][1])/2.0f;
return 1;
UI_view2d_region_to_view(&ar->v2d, (short)loc[0], (short)loc[1],
&mcoords[i][0], &mcoords[i][1]);
i++;
- if(i>= 256) break;
+ if (i>= 256) break;
}
RNA_END;
- if(i>1) {
+ if (i>1) {
bNodeLink *link;
float insertPoint[2];
ED_preview_kill_jobs(C);
- for(link= snode->edittree->links.first; link; link=link->next) {
- if(add_reroute_intersect_check(link, mcoords, i, insertPoint)) {
+ for (link= snode->edittree->links.first; link; link=link->next) {
+ if (add_reroute_intersect_check(link, mcoords, i, insertPoint)) {
bNodeTemplate ntemp;
bNode *rerouteNode;
{
bNode *node;
- for(node=ntree->nodes.last; node; node=node->prev) {
+ for (node=ntree->nodes.last; node; node=node->prev) {
if (node->typeinfo->tweak_area_func) {
if (node->typeinfo->tweak_area_func(node, mx, my))
return node;
invy = 1.0f/aspy;
/* flush to 2d vector from internally used 3d vector */
- for(a=0, td = t->data2d, tdm = t->customData; a<t->total; a++, td++, tdm++) {
+ for (a=0, td = t->data2d, tdm = t->customData; a<t->total; a++, td++, tdm++) {
td->loc2d[0]= td->loc[0]*invx;
td->loc2d[1]= td->loc[1]*invy;
GPU_link(mat, "mtex_value_invert", shadfac, &shadfac);
GPU_link(mat, "mix_mult", shadfac, rgb, GPU_uniform(lamp->shadow_color), &rgb);
GPU_link(mat, "mtex_value_invert", shadfac, &shadfac);
- add_to_diffuse(mat, ma, shi, is, rgb, &shr->diff);
+ add_to_diffuse(mat, ma, shi, is, rgb, &shr->diff);
}
}
int i;
for (i = 0; i < 16; i++)
{
- if (m_color[i].a != 0) c = m_color[i];
+ if (m_color[i].a != 0) c = m_color[i];
}
Color32 mask(0xFF, 0xFF, 0xFF, 0x00);
return df;
}
-#define SET_VERTS(a, b, c, d) \
- v[0] = mf->v##a; uv[0] = a - 1; \
- v[1] = mf->v##b; uv[1] = b - 1; \
- v[2] = mf->v##c; uv[2] = c - 1; \
- v[3] = mf->v##d; uv[3] = d - 1; \
- (void)0
+#define SET_VERTS(a, b, c, d) { \
+ v[0] = mf->v##a; uv[0] = a - 1; \
+ v[1] = mf->v##b; uv[1] = b - 1; \
+ v[2] = mf->v##c; uv[2] = c - 1; \
+ v[3] = mf->v##d; uv[3] = d - 1; \
+ } (void)0
#define GET_ES(v1, v2) edgecut_get(eh, v1, v2)
#define INT_UV(uvf, c0, c1) interp_v2_v2v2(uvf, mf->uv[c0], mf->uv[c1], 0.5f)
if (ofs_orig != 0.0f) {
scalar_short = scalar_short_vgroup = ofs_orig / 32767.0f;
- mv = mvert + (((ofs_new >= ofs_orig) == do_flip) ? 0 : numVerts); /* as above but swapped, intentional use 'ofs_new' */
+ mv = mvert + (((ofs_new >= ofs_orig) == do_flip) ? 0 : numVerts); /* as above but swapped */
dv = dvert;
for (i = 0; i < numVerts; i++, mv++) {
if (dv) {
ret.first = ret.last = NULL;
/* Security check! */
- if(!ntree)
+ if (!ntree)
return ret;
link = MEM_callocN(sizeof(bNodeLink), "internal node link");
};
PyDoc_STRVAR(bpy_lib_load_doc,
- ".. method:: load(filepath, link=False, relative=False)\n"
- "\n"
- " Returns a context manager which exposes 2 library objects on entering.\n"
- " Each object has attributes matching bpy.data which are lists of strings to be linked.\n"
- "\n"
- " :arg filepath: The path to a blend file.\n"
- " :type filepath: string\n"
- " :arg link: When False reference to the original file is lost.\n"
- " :type link: bool\n"
- " :arg relative: When True the path is stored relative to the open blend file.\n"
- " :type relative: bool\n"
- );
+".. method:: load(filepath, link=False, relative=False)\n"
+"\n"
+" Returns a context manager which exposes 2 library objects on entering.\n"
+" Each object has attributes matching bpy.data which are lists of strings to be linked.\n"
+"\n"
+" :arg filepath: The path to a blend file.\n"
+" :type filepath: string\n"
+" :arg link: When False reference to the original file is lost.\n"
+" :type link: bool\n"
+" :arg relative: When True the path is stored relative to the open blend file.\n"
+" :type relative: bool\n"
+);
static PyObject *bpy_lib_load(PyObject *UNUSED(self), PyObject *args, PyObject *kwds)
{
static const char *kwlist[] = {"filepath", "link", "relative", NULL};
/* Options panel */
selected = RNA_boolean_get(op->ptr, "selected");
apply_modifiers = RNA_boolean_get(op->ptr, "apply_modifiers");
- include_bone_children = RNA_boolean_get(op->ptr, "include_bone_children");
- use_object_instantiation = RNA_boolean_get(op->ptr, "use_object_instantiation");
+ include_bone_children = RNA_boolean_get(op->ptr, "include_bone_children");
+ use_object_instantiation = RNA_boolean_get(op->ptr, "use_object_instantiation");
second_life = RNA_boolean_get(op->ptr, "second_life");
/* get editmode results */
!ConvertPythonToGameObject(pyother, &other, false, "scene.addObject(object, other, time): KX_Scene (second argument)") )
return NULL;
- if (!m_inactivelist->SearchValue(ob)) {
- PyErr_Format(PyExc_ValueError, "scene.addObject(object, other, time): KX_Scene (second argument): object does not belong to scene");
- return NULL;
- }
+ if (!m_inactivelist->SearchValue(ob)) {
+ PyErr_Format(PyExc_ValueError, "scene.addObject(object, other, time): KX_Scene (second argument): object does not belong to scene");
+ return NULL;
+ }
SCA_IObject* replica = AddReplicaObject((SCA_IObject*)ob, other, time);
// release here because AddReplicaObject AddRef's