style cleanup, use { on newline after function definition.
spelling 'impliment' -> 'implement'
This commit is contained in:
@@ -875,27 +875,6 @@ static int vergedgesort(const void *v1, const void *v2)
|
||||
}
|
||||
|
||||
|
||||
/* TODO: remove after bmesh merge */
|
||||
#if 0
|
||||
|
||||
static void mfaces_strip_loose(MFace *mface, int *totface)
|
||||
{
|
||||
int a,b;
|
||||
|
||||
for (a=b=0; a<*totface; a++) {
|
||||
if (mface[a].v3) {
|
||||
if (a!=b) {
|
||||
memcpy(&mface[b],&mface[a],sizeof(mface[b]));
|
||||
}
|
||||
b++;
|
||||
}
|
||||
}
|
||||
|
||||
*totface= b;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* Create edges based on known verts and faces */
|
||||
static void make_edges_mdata(MVert *UNUSED(allvert), MFace *allface, MLoop *allloop,
|
||||
MPoly *allpoly, int UNUSED(totvert), int totface, int UNUSED(totloop), int totpoly,
|
||||
|
||||
@@ -2386,10 +2386,12 @@ static void sph_density_accum_cb(void *userdata, int index, float squared_dist)
|
||||
pfr->density += q*q;
|
||||
pfr->near_density += q*q*q;
|
||||
}
|
||||
|
||||
/*
|
||||
* Find the Courant number for an SPH particle (used for adaptive time step).
|
||||
*/
|
||||
static void sph_particle_courant(SPHData *sphdata, SPHRangeData *pfr) {
|
||||
static void sph_particle_courant(SPHData *sphdata, SPHRangeData *pfr)
|
||||
{
|
||||
ParticleData *pa, *npa;
|
||||
int i;
|
||||
float flow[3], offset[3], dist;
|
||||
@@ -2533,7 +2535,8 @@ static void sph_force_cb(void *sphdata_v, ParticleKey *state, float *force, floa
|
||||
sphdata->pass++;
|
||||
}
|
||||
|
||||
static void sph_solver_init(ParticleSimulationData *sim, SPHData *sphdata) {
|
||||
static void sph_solver_init(ParticleSimulationData *sim, SPHData *sphdata)
|
||||
{
|
||||
ParticleTarget *pt;
|
||||
int i;
|
||||
|
||||
@@ -2556,13 +2559,17 @@ static void sph_solver_init(ParticleSimulationData *sim, SPHData *sphdata) {
|
||||
sphdata->force_cb = sph_force_cb;
|
||||
sphdata->density_cb = sph_density_accum_cb;
|
||||
}
|
||||
static void sph_solver_finalise(SPHData *sphdata) {
|
||||
|
||||
static void sph_solver_finalise(SPHData *sphdata)
|
||||
{
|
||||
if (sphdata->eh) {
|
||||
BLI_edgehash_free(sphdata->eh, NULL);
|
||||
sphdata->eh = NULL;
|
||||
}
|
||||
}
|
||||
static void sph_integrate(ParticleSimulationData *sim, ParticleData *pa, float dfra, SPHData *sphdata){
|
||||
|
||||
static void sph_integrate(ParticleSimulationData *sim, ParticleData *pa, float dfra, SPHData *sphdata)
|
||||
{
|
||||
ParticleSettings *part = sim->psys->part;
|
||||
// float timestep = psys_get_timestep(sim); // UNUSED
|
||||
float pa_mass = part->mass * (part->flag & PART_SIZEMASS ? pa->size : 1.f);
|
||||
|
||||
@@ -81,29 +81,38 @@ static int ccgDM_use_grid_pbvh(CCGDerivedMesh *ccgdm);
|
||||
|
||||
///
|
||||
|
||||
static void *arena_alloc(CCGAllocatorHDL a, int numBytes) {
|
||||
static void *arena_alloc(CCGAllocatorHDL a, int numBytes)
|
||||
{
|
||||
return BLI_memarena_alloc(a, numBytes);
|
||||
}
|
||||
static void *arena_realloc(CCGAllocatorHDL a, void *ptr, int newSize, int oldSize) {
|
||||
|
||||
static void *arena_realloc(CCGAllocatorHDL a, void *ptr, int newSize, int oldSize)
|
||||
{
|
||||
void *p2 = BLI_memarena_alloc(a, newSize);
|
||||
if (ptr) {
|
||||
memcpy(p2, ptr, oldSize);
|
||||
}
|
||||
return p2;
|
||||
}
|
||||
static void arena_free(CCGAllocatorHDL UNUSED(a), void *UNUSED(ptr)) {
|
||||
|
||||
static void arena_free(CCGAllocatorHDL UNUSED(a), void *UNUSED(ptr))
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
static void arena_release(CCGAllocatorHDL a) {
|
||||
|
||||
static void arena_release(CCGAllocatorHDL a)
|
||||
{
|
||||
BLI_memarena_free(a);
|
||||
}
|
||||
|
||||
typedef enum {
|
||||
CCG_USE_AGING = 1,
|
||||
CCG_USE_ARENA = 2,
|
||||
CCG_CALC_NORMALS = 4,
|
||||
CCG_CALC_NORMALS = 4
|
||||
} CCGFlags;
|
||||
|
||||
static CCGSubSurf *_getSubSurf(CCGSubSurf *prevSS, int subdivLevels, CCGFlags flags) {
|
||||
static CCGSubSurf *_getSubSurf(CCGSubSurf *prevSS, int subdivLevels, CCGFlags flags)
|
||||
{
|
||||
CCGMeshIFC ifc;
|
||||
CCGSubSurf *ccgSS;
|
||||
int useAging = !!(flags & CCG_USE_AGING);
|
||||
@@ -159,7 +168,8 @@ static CCGSubSurf *_getSubSurf(CCGSubSurf *prevSS, int subdivLevels, CCGFlags fl
|
||||
return ccgSS;
|
||||
}
|
||||
|
||||
static int getEdgeIndex(CCGSubSurf *ss, CCGEdge *e, int x, int edgeSize) {
|
||||
static int getEdgeIndex(CCGSubSurf *ss, CCGEdge *e, int x, int edgeSize)
|
||||
{
|
||||
CCGVert *v0 = ccgSubSurf_getEdgeVert0(e);
|
||||
CCGVert *v1 = ccgSubSurf_getEdgeVert1(e);
|
||||
int v0idx = *((int*) ccgSubSurf_getVertUserData(ss, v0));
|
||||
@@ -174,7 +184,9 @@ static int getEdgeIndex(CCGSubSurf *ss, CCGEdge *e, int x, int edgeSize) {
|
||||
return edgeBase + x-1;
|
||||
}
|
||||
}
|
||||
static int getFaceIndex(CCGSubSurf *ss, CCGFace *f, int S, int x, int y, int edgeSize, int gridSize) {
|
||||
|
||||
static int getFaceIndex(CCGSubSurf *ss, CCGFace *f, int S, int x, int y, int edgeSize, int gridSize)
|
||||
{
|
||||
int faceBase = *((int*) ccgSubSurf_getFaceUserData(ss, f));
|
||||
int numVerts = ccgSubSurf_getFaceNumVerts(f);
|
||||
|
||||
@@ -211,7 +223,8 @@ static int getFaceIndex(CCGSubSurf *ss, CCGFace *f, int S, int x, int y, int edg
|
||||
}
|
||||
}
|
||||
|
||||
static void get_face_uv_map_vert(UvVertMap *vmap, struct MPoly *mp, struct MLoop *ml, int fi, CCGVertHDL *fverts) {
|
||||
static void get_face_uv_map_vert(UvVertMap *vmap, struct MPoly *mp, struct MLoop *ml, int fi, CCGVertHDL *fverts)
|
||||
{
|
||||
UvMapVert *v, *nv;
|
||||
int j, nverts= mp->totloop;
|
||||
|
||||
@@ -227,7 +240,8 @@ static void get_face_uv_map_vert(UvVertMap *vmap, struct MPoly *mp, struct MLoop
|
||||
}
|
||||
}
|
||||
|
||||
static int ss_sync_from_uv(CCGSubSurf *ss, CCGSubSurf *origss, DerivedMesh *dm, MLoopUV *mloopuv) {
|
||||
static int ss_sync_from_uv(CCGSubSurf *ss, CCGSubSurf *origss, DerivedMesh *dm, MLoopUV *mloopuv)
|
||||
{
|
||||
MPoly *mpoly = dm->getPolyArray(dm);
|
||||
MLoop *mloop = dm->getLoopArray(dm);
|
||||
MVert *mvert = dm->getVertArray(dm);
|
||||
@@ -587,19 +601,23 @@ static void ss_sync_from_derivedmesh(CCGSubSurf *ss, DerivedMesh *dm,
|
||||
|
||||
/***/
|
||||
|
||||
static int ccgDM_getVertMapIndex(CCGSubSurf *ss, CCGVert *v) {
|
||||
static int ccgDM_getVertMapIndex(CCGSubSurf *ss, CCGVert *v)
|
||||
{
|
||||
return ((int*) ccgSubSurf_getVertUserData(ss, v))[1];
|
||||
}
|
||||
|
||||
static int ccgDM_getEdgeMapIndex(CCGSubSurf *ss, CCGEdge *e) {
|
||||
static int ccgDM_getEdgeMapIndex(CCGSubSurf *ss, CCGEdge *e)
|
||||
{
|
||||
return ((int*) ccgSubSurf_getEdgeUserData(ss, e))[1];
|
||||
}
|
||||
|
||||
static int ccgDM_getFaceMapIndex(CCGSubSurf *ss, CCGFace *f) {
|
||||
static int ccgDM_getFaceMapIndex(CCGSubSurf *ss, CCGFace *f)
|
||||
{
|
||||
return ((int*) ccgSubSurf_getFaceUserData(ss, f))[1];
|
||||
}
|
||||
|
||||
static void ccgDM_getMinMax(DerivedMesh *dm, float min_r[3], float max_r[3]) {
|
||||
static void ccgDM_getMinMax(DerivedMesh *dm, float min_r[3], float max_r[3])
|
||||
{
|
||||
CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm;
|
||||
CCGSubSurf *ss = ccgdm->ss;
|
||||
CCGVertIterator *vi = ccgSubSurf_getVertIterator(ss);
|
||||
@@ -643,22 +661,30 @@ static void ccgDM_getMinMax(DerivedMesh *dm, float min_r[3], float max_r[3]) {
|
||||
ccgEdgeIterator_free(ei);
|
||||
ccgVertIterator_free(vi);
|
||||
}
|
||||
static int ccgDM_getNumVerts(DerivedMesh *dm) {
|
||||
|
||||
static int ccgDM_getNumVerts(DerivedMesh *dm)
|
||||
{
|
||||
CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm;
|
||||
|
||||
return ccgSubSurf_getNumFinalVerts(ccgdm->ss);
|
||||
}
|
||||
static int ccgDM_getNumEdges(DerivedMesh *dm) {
|
||||
|
||||
static int ccgDM_getNumEdges(DerivedMesh *dm)
|
||||
{
|
||||
CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm;
|
||||
|
||||
return ccgSubSurf_getNumFinalEdges(ccgdm->ss);
|
||||
}
|
||||
static int ccgDM_getNumTessFaces(DerivedMesh *dm) {
|
||||
|
||||
static int ccgDM_getNumTessFaces(DerivedMesh *dm)
|
||||
{
|
||||
CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm;
|
||||
|
||||
return ccgSubSurf_getNumFinalFaces(ccgdm->ss);
|
||||
}
|
||||
static int ccgDM_getNumLoops(DerivedMesh *dm) {
|
||||
|
||||
static int ccgDM_getNumLoops(DerivedMesh *dm)
|
||||
{
|
||||
CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm;
|
||||
|
||||
/* All subsurf faces are quads */
|
||||
@@ -1216,7 +1242,8 @@ static void ccgDM_copyFinalPolyArray(DerivedMesh *dm, MPoly *mface)
|
||||
}
|
||||
}
|
||||
|
||||
static void ccgdm_getVertCos(DerivedMesh *dm, float (*cos)[3]) {
|
||||
static void ccgdm_getVertCos(DerivedMesh *dm, float (*cos)[3])
|
||||
{
|
||||
CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm;
|
||||
CCGSubSurf *ss = ccgdm->ss;
|
||||
int edgeSize = ccgSubSurf_getEdgeSize(ss);
|
||||
@@ -1299,7 +1326,9 @@ static void ccgdm_getVertCos(DerivedMesh *dm, float (*cos)[3]) {
|
||||
MEM_freeN(edgeMap2);
|
||||
MEM_freeN(faceMap2);
|
||||
}
|
||||
static void ccgDM_foreachMappedVert(DerivedMesh *dm, void (*func)(void *userData, int index, float *co, float *no_f, short *no_s), void *userData) {
|
||||
|
||||
static void ccgDM_foreachMappedVert(DerivedMesh *dm, void (*func)(void *userData, int index, float *co, float *no_f, short *no_s), void *userData)
|
||||
{
|
||||
CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm;
|
||||
CCGVertIterator *vi = ccgSubSurf_getVertIterator(ccgdm->ss);
|
||||
|
||||
@@ -1314,7 +1343,9 @@ static void ccgDM_foreachMappedVert(DerivedMesh *dm, void (*func)(void *userData
|
||||
|
||||
ccgVertIterator_free(vi);
|
||||
}
|
||||
static void ccgDM_foreachMappedEdge(DerivedMesh *dm, void (*func)(void *userData, int index, float *v0co, float *v1co), void *userData) {
|
||||
|
||||
static void ccgDM_foreachMappedEdge(DerivedMesh *dm, void (*func)(void *userData, int index, float *v0co, float *v1co), void *userData)
|
||||
{
|
||||
CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm;
|
||||
CCGSubSurf *ss = ccgdm->ss;
|
||||
CCGEdgeIterator *ei = ccgSubSurf_getEdgeIterator(ss);
|
||||
@@ -1334,7 +1365,8 @@ static void ccgDM_foreachMappedEdge(DerivedMesh *dm, void (*func)(void *userData
|
||||
ccgEdgeIterator_free(ei);
|
||||
}
|
||||
|
||||
static void ccgDM_drawVerts(DerivedMesh *dm) {
|
||||
static void ccgDM_drawVerts(DerivedMesh *dm)
|
||||
{
|
||||
CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm;
|
||||
CCGSubSurf *ss = ccgdm->ss;
|
||||
int edgeSize = ccgSubSurf_getEdgeSize(ss);
|
||||
@@ -1394,7 +1426,8 @@ static void ccgdm_pbvh_update(CCGDerivedMesh *ccgdm)
|
||||
}
|
||||
}
|
||||
|
||||
static void ccgDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int UNUSED(drawAllEdges)) {
|
||||
static void ccgDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int UNUSED(drawAllEdges))
|
||||
{
|
||||
CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm;
|
||||
CCGSubSurf *ss = ccgdm->ss;
|
||||
int i, j, edgeSize = ccgSubSurf_getEdgeSize(ss);
|
||||
@@ -1463,7 +1496,9 @@ static void ccgDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int UNUSED(draw
|
||||
}
|
||||
}
|
||||
}
|
||||
static void ccgDM_drawLooseEdges(DerivedMesh *dm) {
|
||||
|
||||
static void ccgDM_drawLooseEdges(DerivedMesh *dm)
|
||||
{
|
||||
CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm;
|
||||
CCGSubSurf *ss = ccgdm->ss;
|
||||
int totedge = ccgSubSurf_getNumEdges(ss);
|
||||
@@ -1499,7 +1534,8 @@ static void ccgDM_glNormalFast(float *a, float *b, float *c, float *d)
|
||||
}
|
||||
|
||||
/* Only used by non-editmesh types */
|
||||
static void ccgDM_drawFacesSolid(DerivedMesh *dm, float (*partial_redraw_planes)[4], int fast, int (*setMaterial)(int, void *attribs)) {
|
||||
static void ccgDM_drawFacesSolid(DerivedMesh *dm, float (*partial_redraw_planes)[4], int fast, int (*setMaterial)(int, void *attribs))
|
||||
{
|
||||
CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm;
|
||||
CCGSubSurf *ss = ccgdm->ss;
|
||||
int gridSize = ccgSubSurf_getGridSize(ss);
|
||||
@@ -1733,12 +1769,14 @@ static void ccgDM_drawMappedFacesGLSL(DerivedMesh *dm,
|
||||
#undef PASSATTRIB
|
||||
}
|
||||
|
||||
static void ccgDM_drawFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, void *attribs)) {
|
||||
static void ccgDM_drawFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, void *attribs))
|
||||
{
|
||||
dm->drawMappedFacesGLSL(dm, setMaterial, NULL, NULL);
|
||||
}
|
||||
|
||||
/* Only used by non-editmesh types */
|
||||
static void ccgDM_drawMappedFacesMat(DerivedMesh *dm, void (*setMaterial)(void *userData, int, void *attribs), int (*setFace)(void *userData, int index), void *userData) {
|
||||
static void ccgDM_drawMappedFacesMat(DerivedMesh *dm, void (*setMaterial)(void *userData, int, void *attribs), int (*setFace)(void *userData, int index), void *userData)
|
||||
{
|
||||
CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm;
|
||||
CCGSubSurf *ss = ccgdm->ss;
|
||||
GPUVertexAttribs gattribs;
|
||||
@@ -1883,7 +1921,8 @@ static void ccgDM_drawMappedFacesMat(DerivedMesh *dm, void (*setMaterial)(void *
|
||||
}
|
||||
|
||||
|
||||
static void ccgDM_drawFacesColored(DerivedMesh *dm, int UNUSED(useTwoSided), unsigned char *col1, unsigned char *col2) {
|
||||
static void ccgDM_drawFacesColored(DerivedMesh *dm, int UNUSED(useTwoSided), unsigned char *col1, unsigned char *col2)
|
||||
{
|
||||
CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm;
|
||||
CCGSubSurf *ss = ccgdm->ss;
|
||||
int gridSize = ccgSubSurf_getGridSize(ss);
|
||||
@@ -2271,7 +2310,9 @@ static void ccgDM_drawMappedFaces(DerivedMesh *dm,
|
||||
}
|
||||
}
|
||||
}
|
||||
static void ccgDM_drawMappedEdges(DerivedMesh *dm, int (*setDrawOptions)(void *userData, int index), void *userData) {
|
||||
|
||||
static void ccgDM_drawMappedEdges(DerivedMesh *dm, int (*setDrawOptions)(void *userData, int index), void *userData)
|
||||
{
|
||||
CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm;
|
||||
CCGSubSurf *ss = ccgdm->ss;
|
||||
CCGEdgeIterator *ei = ccgSubSurf_getEdgeIterator(ss);
|
||||
@@ -2301,7 +2342,9 @@ static void ccgDM_drawMappedEdges(DerivedMesh *dm, int (*setDrawOptions)(void *u
|
||||
|
||||
ccgEdgeIterator_free(ei);
|
||||
}
|
||||
static void ccgDM_drawMappedEdgesInterp(DerivedMesh *dm, int (*setDrawOptions)(void *userData, int index), void (*setDrawInterpOptions)(void *userData, int index, float t), void *userData) {
|
||||
|
||||
static void ccgDM_drawMappedEdgesInterp(DerivedMesh *dm, int (*setDrawOptions)(void *userData, int index), void (*setDrawInterpOptions)(void *userData, int index, float t), void *userData)
|
||||
{
|
||||
CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm;
|
||||
CCGSubSurf *ss = ccgdm->ss;
|
||||
CCGEdgeIterator *ei = ccgSubSurf_getEdgeIterator(ss);
|
||||
@@ -2332,7 +2375,9 @@ static void ccgDM_drawMappedEdgesInterp(DerivedMesh *dm, int (*setDrawOptions)(v
|
||||
|
||||
ccgEdgeIterator_free(ei);
|
||||
}
|
||||
static void ccgDM_foreachMappedFaceCenter(DerivedMesh *dm, void (*func)(void *userData, int index, float *co, float *no), void *userData) {
|
||||
|
||||
static void ccgDM_foreachMappedFaceCenter(DerivedMesh *dm, void (*func)(void *userData, int index, float *co, float *no), void *userData)
|
||||
{
|
||||
CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm;
|
||||
CCGSubSurf *ss = ccgdm->ss;
|
||||
CCGFaceIterator *fi = ccgSubSurf_getFaceIterator(ss);
|
||||
@@ -2352,7 +2397,8 @@ static void ccgDM_foreachMappedFaceCenter(DerivedMesh *dm, void (*func)(void *us
|
||||
ccgFaceIterator_free(fi);
|
||||
}
|
||||
|
||||
static void ccgDM_release(DerivedMesh *dm) {
|
||||
static void ccgDM_release(DerivedMesh *dm)
|
||||
{
|
||||
CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm;
|
||||
|
||||
if (DM_release(dm)) {
|
||||
|
||||
@@ -91,7 +91,8 @@ BMFace *f;
|
||||
|
||||
BMW_init(&walker, bm, BMW_ISLAND, SOME_OP_FLAG);
|
||||
f = BMW_begin(&walker, some_start_face);
|
||||
for (; f; f=BMW_step(&walker)) {
|
||||
for (; f; f=BMW_step(&walker))
|
||||
{
|
||||
//do something with f
|
||||
}
|
||||
BMW_end(&walker);
|
||||
|
||||
@@ -498,7 +498,7 @@ BMEdge *BM_vert_collapse_faces(BMesh *bm, BMEdge *ke, BMVert *kv, float fac, con
|
||||
|
||||
BMEdge *BM_vert_collapse_edge(BMesh *bm, BMEdge *ke, BMVert *kv)
|
||||
{
|
||||
/* nice example implimentation but we want loops to have their customdata
|
||||
/* nice example implementation but we want loops to have their customdata
|
||||
* accounted for */
|
||||
#if 0
|
||||
BMEdge *ne = NULL;
|
||||
|
||||
@@ -51,7 +51,8 @@ int bmesh_verts_in_edge(BMVert *v1, BMVert *v2, BMEdge *e)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BMVert *bmesh_edge_getothervert(BMEdge *e, BMVert *v) {
|
||||
BMVert *bmesh_edge_getothervert(BMEdge *e, BMVert *v)
|
||||
{
|
||||
if (e->v1 == v) {
|
||||
return e->v2;
|
||||
}
|
||||
|
||||
@@ -460,12 +460,14 @@ void GeometryExporter::create_normals(std::vector<Normal> &nor, std::vector<Face
|
||||
}
|
||||
}
|
||||
|
||||
std::string GeometryExporter::getIdBySemantics(std::string geom_id, COLLADASW::InputSemantic::Semantics type, std::string other_suffix) {
|
||||
std::string GeometryExporter::getIdBySemantics(std::string geom_id, COLLADASW::InputSemantic::Semantics type, std::string other_suffix)
|
||||
{
|
||||
return geom_id + getSuffixBySemantic(type) + other_suffix;
|
||||
}
|
||||
|
||||
|
||||
COLLADASW::URI GeometryExporter::getUrlBySemantics(std::string geom_id, COLLADASW::InputSemantic::Semantics type, std::string other_suffix) {
|
||||
COLLADASW::URI GeometryExporter::getUrlBySemantics(std::string geom_id, COLLADASW::InputSemantic::Semantics type, std::string other_suffix)
|
||||
{
|
||||
|
||||
std::string id(getIdBySemantics(geom_id, type, other_suffix));
|
||||
return COLLADASW::URI(COLLADABU::Utils::EMPTY_STRING, id);
|
||||
|
||||
@@ -180,7 +180,8 @@ static void knife_project_v3(knifetool_opdata *kcd, const float co[3], float sco
|
||||
ED_view3d_project_float(kcd->ar, co, sco, kcd->projmat);
|
||||
}
|
||||
|
||||
static ListBase *knife_empty_list(knifetool_opdata *kcd) {
|
||||
static ListBase *knife_empty_list(knifetool_opdata *kcd)
|
||||
{
|
||||
ListBase *lst;
|
||||
|
||||
lst = BLI_memarena_alloc(kcd->arena, sizeof(ListBase));
|
||||
@@ -188,7 +189,8 @@ static ListBase *knife_empty_list(knifetool_opdata *kcd) {
|
||||
return lst;
|
||||
}
|
||||
|
||||
static void knife_append_list(knifetool_opdata *kcd, ListBase *lst, void *elem) {
|
||||
static void knife_append_list(knifetool_opdata *kcd, ListBase *lst, void *elem)
|
||||
{
|
||||
Ref *ref;
|
||||
|
||||
ref = BLI_mempool_calloc(kcd->refs);
|
||||
|
||||
@@ -148,15 +148,6 @@ void MESH_OT_select_next_loop(struct wmOperatorType *ot);
|
||||
|
||||
extern struct EnumPropertyItem *corner_type_items;
|
||||
|
||||
#if 0 /* REMOVE AFTER BMESH MERGE */
|
||||
|
||||
void join_triangles(EditMesh *em);
|
||||
int removedoublesflag(EditMesh *em, short flag, short automerge, float limit); /* return amount */
|
||||
void esubdivideflag(Object *obedit, EditMesh *em, int flag, float smooth, float fractal, int beautify, int numcuts, int corner_pattern, int seltype);
|
||||
int EdgeSlide(EditMesh *em, struct wmOperator *op, short immediate, float imperc);
|
||||
|
||||
#endif
|
||||
|
||||
void MESH_OT_merge(struct wmOperatorType *ot);
|
||||
void MESH_OT_subdivide(struct wmOperatorType *ot);
|
||||
void MESH_OT_remove_doubles(struct wmOperatorType *ot);
|
||||
|
||||
@@ -156,7 +156,9 @@ typedef struct Temp_UvData{
|
||||
|
||||
|
||||
|
||||
void HC_relaxation_iteration_uv(BMEditMesh *em, UvSculptData *sculptdata, float mouse_coord[2], float alpha, float radius, float aspectRatio) {
|
||||
void HC_relaxation_iteration_uv(BMEditMesh *em, UvSculptData *sculptdata, float mouse_coord[2],
|
||||
float alpha, float radius, float aspectRatio)
|
||||
{
|
||||
Temp_UVData *tmp_uvdata;
|
||||
float diff[2];
|
||||
int i;
|
||||
@@ -433,7 +435,8 @@ static void uv_sculpt_stroke_exit(bContext *C, wmOperator *op)
|
||||
op->customdata = NULL;
|
||||
}
|
||||
|
||||
static int get_uv_element_offset_from_face(UvElementMap *map, BMFace *efa, BMLoop *l, int island_index, int doIslands) {
|
||||
static int get_uv_element_offset_from_face(UvElementMap *map, BMFace *efa, BMLoop *l, int island_index, int doIslands)
|
||||
{
|
||||
UvElement *element = ED_get_uv_element(map, efa, l);
|
||||
if (!element || (doIslands && element->island != island_index)) {
|
||||
return -1;
|
||||
@@ -442,14 +445,16 @@ static int get_uv_element_offset_from_face(UvElementMap *map, BMFace *efa, BMLoo
|
||||
}
|
||||
|
||||
|
||||
static unsigned int uv_edge_hash(const void *key) {
|
||||
static unsigned int uv_edge_hash(const void *key)
|
||||
{
|
||||
UvEdge *edge = (UvEdge *)key;
|
||||
return
|
||||
BLI_ghashutil_inthash(SET_INT_IN_POINTER(edge->uv2)) +
|
||||
BLI_ghashutil_inthash(SET_INT_IN_POINTER(edge->uv1));
|
||||
}
|
||||
|
||||
static int uv_edge_compare(const void *a, const void *b) {
|
||||
static int uv_edge_compare(const void *a, const void *b)
|
||||
{
|
||||
UvEdge *edge1 = (UvEdge *)a;
|
||||
UvEdge *edge2 = (UvEdge *)b;
|
||||
|
||||
|
||||
@@ -580,7 +580,7 @@ static void flyEvent(FlyInfo *fly, wmEvent *event)
|
||||
fly->pan_view= FALSE;
|
||||
break;
|
||||
|
||||
/* impliment WASD keys */
|
||||
/* implement WASD keys */
|
||||
case FLY_MODAL_DIR_FORWARD:
|
||||
if (fly->speed < 0.0f) fly->speed= -fly->speed; /* flip speed rather than stopping, game like motion */
|
||||
else if (fly->axis==2) fly->speed += fly->grid; /* increse like mousewheel if were already
|
||||
|
||||
@@ -121,8 +121,8 @@ typedef struct TransCon {
|
||||
|
||||
typedef struct TransDataExtension {
|
||||
float drot[3]; /* Initial object drot */
|
||||
// float drotAngle; /* Initial object drotAngle, TODO: not yet implimented */
|
||||
// float drotAxis[3]; /* Initial object drotAxis, TODO: not yet implimented */
|
||||
// float drotAngle; /* Initial object drotAngle, TODO: not yet implemented */
|
||||
// float drotAxis[3]; /* Initial object drotAxis, TODO: not yet implemented */
|
||||
float dquat[4]; /* Initial object dquat */
|
||||
float dscale[3]; /* Initial object dscale */
|
||||
float *rot; /* Rotation of the data to transform (Faculative) */
|
||||
|
||||
@@ -4406,8 +4406,8 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob)
|
||||
|
||||
td->ext->irotAngle= ob->rotAngle;
|
||||
copy_v3_v3(td->ext->irotAxis, ob->rotAxis);
|
||||
// td->ext->drotAngle= ob->drotAngle; // XXX, not implimented
|
||||
// copy_v3_v3(td->ext->drotAxis, ob->drotAxis); // XXX, not implimented
|
||||
// td->ext->drotAngle= ob->drotAngle; // XXX, not implemented
|
||||
// copy_v3_v3(td->ext->drotAxis, ob->drotAxis); // XXX, not implemented
|
||||
}
|
||||
else {
|
||||
td->ext->rot= NULL;
|
||||
|
||||
@@ -293,7 +293,8 @@ int uvedit_face_visible_nolocal(Scene *scene, BMFace *efa)
|
||||
return (BM_elem_flag_test(efa, BM_ELEM_HIDDEN)==0 && BM_elem_flag_test(efa, BM_ELEM_SELECT));
|
||||
}
|
||||
|
||||
int uvedit_face_visible(Scene *scene, Image *ima, BMFace *efa, MTexPoly *tf) {
|
||||
int uvedit_face_visible(Scene *scene, Image *ima, BMFace *efa, MTexPoly *tf)
|
||||
{
|
||||
ToolSettings *ts= scene->toolsettings;
|
||||
|
||||
if(ts->uv_flag & UV_SHOW_SAME_IMAGE)
|
||||
|
||||
@@ -241,7 +241,8 @@ static void stitch_update_header(StitchState *stitch_state, bContext *C)
|
||||
}
|
||||
}
|
||||
|
||||
static int getNumOfIslandUvs(UvElementMap *elementMap, int island){
|
||||
static int getNumOfIslandUvs(UvElementMap *elementMap, int island)
|
||||
{
|
||||
if(island == elementMap->totalIslands-1){
|
||||
return elementMap->totalUVs - elementMap->islandIndices[island];
|
||||
}else{
|
||||
@@ -249,7 +250,8 @@ static int getNumOfIslandUvs(UvElementMap *elementMap, int island){
|
||||
}
|
||||
}
|
||||
|
||||
static void stitch_uv_rotate(float rotation, float medianPoint[2], float uv[2]){
|
||||
static void stitch_uv_rotate(float rotation, float medianPoint[2], float uv[2])
|
||||
{
|
||||
float uv_rotation_result[2];
|
||||
|
||||
uv[0] -= medianPoint[0];
|
||||
@@ -262,7 +264,8 @@ static void stitch_uv_rotate(float rotation, float medianPoint[2], float uv[2]){
|
||||
uv[1] = uv_rotation_result[1] + medianPoint[1];
|
||||
}
|
||||
|
||||
static int stitch_check_uvs_stitchable(UvElement *element, UvElement *element_iter, StitchState *state){
|
||||
static int stitch_check_uvs_stitchable(UvElement *element, UvElement *element_iter, StitchState *state)
|
||||
{
|
||||
float limit;
|
||||
int do_limit;
|
||||
|
||||
@@ -293,7 +296,8 @@ static int stitch_check_uvs_stitchable(UvElement *element, UvElement *element_it
|
||||
}
|
||||
|
||||
|
||||
static int stitch_check_uvs_state_stitchable(UvElement *element, UvElement *element_iter, StitchState *state){
|
||||
static int stitch_check_uvs_state_stitchable(UvElement *element, UvElement *element_iter, StitchState *state)
|
||||
{
|
||||
if((state->snap_islands && element->island == element_iter->island) ||
|
||||
(!state->midpoints && element->island == element_iter->island))
|
||||
return 0;
|
||||
@@ -303,7 +307,8 @@ static int stitch_check_uvs_state_stitchable(UvElement *element, UvElement *elem
|
||||
|
||||
|
||||
/* calculate snapping for islands */
|
||||
static void stitch_calculate_island_snapping(StitchState *state, PreviewPosition *preview_position, StitchPreviewer *preview, IslandStitchData *island_stitch_data, int final){
|
||||
static void stitch_calculate_island_snapping(StitchState *state, PreviewPosition *preview_position, StitchPreviewer *preview, IslandStitchData *island_stitch_data, int final)
|
||||
{
|
||||
int i;
|
||||
UvElement *element;
|
||||
|
||||
@@ -471,7 +476,8 @@ static void stitch_state_delete(StitchState *stitch_state)
|
||||
|
||||
|
||||
/* checks for remote uvs that may be stitched with a certain uv, flags them if stitchable. */
|
||||
static void determine_uv_stitchability(UvElement *element, StitchState *state, IslandStitchData *island_stitch_data){
|
||||
static void determine_uv_stitchability(UvElement *element, StitchState *state, IslandStitchData *island_stitch_data)
|
||||
{
|
||||
int vert_index;
|
||||
UvElement *element_iter;
|
||||
BMLoop *l;
|
||||
@@ -876,14 +882,16 @@ static int stitch_process_data(StitchState *state, Scene *scene, int final)
|
||||
}
|
||||
|
||||
/* Stitch hash initialisation functions */
|
||||
static unsigned int uv_edge_hash(const void *key){
|
||||
static unsigned int uv_edge_hash(const void *key)
|
||||
{
|
||||
UvEdge *edge = (UvEdge *)key;
|
||||
return
|
||||
BLI_ghashutil_inthash(SET_INT_IN_POINTER(edge->uv2)) +
|
||||
BLI_ghashutil_inthash(SET_INT_IN_POINTER(edge->uv1));
|
||||
}
|
||||
|
||||
static int uv_edge_compare(const void *a, const void *b){
|
||||
static int uv_edge_compare(const void *a, const void *b)
|
||||
{
|
||||
UvEdge *edge1 = (UvEdge *)a;
|
||||
UvEdge *edge2 = (UvEdge *)b;
|
||||
|
||||
@@ -1275,7 +1283,8 @@ static int stitch_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
}
|
||||
|
||||
static void stitch_select(bContext *C, Scene *scene, wmEvent *event, StitchState *stitch_state){
|
||||
static void stitch_select(bContext *C, Scene *scene, wmEvent *event, StitchState *stitch_state)
|
||||
{
|
||||
/* add uv under mouse to processed uv's */
|
||||
float co[2];
|
||||
NearestHit hit;
|
||||
|
||||
@@ -44,13 +44,15 @@
|
||||
#define DEFAULT_WHITE_POINT 685
|
||||
|
||||
void
|
||||
logImageSetVerbose(int verbosity) {
|
||||
logImageSetVerbose(int verbosity)
|
||||
{
|
||||
cineonSetVerbose(verbosity);
|
||||
dpxSetVerbose(verbosity);
|
||||
}
|
||||
|
||||
LogImageFile*
|
||||
logImageOpen(const char* filename, int cineon) {
|
||||
logImageOpen(const char* filename, int cineon)
|
||||
{
|
||||
if (cineon) {
|
||||
return cineonOpen(filename);
|
||||
} else {
|
||||
@@ -60,7 +62,8 @@ logImageOpen(const char* filename, int cineon) {
|
||||
}
|
||||
|
||||
LogImageFile*
|
||||
logImageOpenFromMem(unsigned char *buffer, unsigned int size, int cineon) {
|
||||
logImageOpenFromMem(unsigned char *buffer, unsigned int size, int cineon)
|
||||
{
|
||||
if (cineon) {
|
||||
return cineonOpenFromMem(buffer, size);
|
||||
} else {
|
||||
@@ -70,7 +73,8 @@ logImageOpenFromMem(unsigned char *buffer, unsigned int size, int cineon) {
|
||||
}
|
||||
|
||||
LogImageFile*
|
||||
logImageCreate(const char* filename, int cineon, int width, int height, int depth) {
|
||||
logImageCreate(const char* filename, int cineon, int width, int height, int depth)
|
||||
{
|
||||
if (cineon) {
|
||||
return cineonCreate(filename, width, height, depth);
|
||||
} else {
|
||||
@@ -80,7 +84,8 @@ logImageCreate(const char* filename, int cineon, int width, int height, int dept
|
||||
}
|
||||
|
||||
int
|
||||
logImageGetSize(const LogImageFile* logImage, int* width, int* height, int* depth) {
|
||||
logImageGetSize(const LogImageFile* logImage, int* width, int* height, int* depth)
|
||||
{
|
||||
*width = logImage->width;
|
||||
*height = logImage->height;
|
||||
*depth = logImage->depth;
|
||||
@@ -88,7 +93,8 @@ logImageGetSize(const LogImageFile* logImage, int* width, int* height, int* dept
|
||||
}
|
||||
|
||||
int
|
||||
logImageGetByteConversionDefaults(LogImageByteConversionParameters* params) {
|
||||
logImageGetByteConversionDefaults(LogImageByteConversionParameters* params)
|
||||
{
|
||||
params->gamma = DEFAULT_GAMMA;
|
||||
params->blackPoint = DEFAULT_BLACK_POINT;
|
||||
params->whitePoint = DEFAULT_WHITE_POINT;
|
||||
@@ -97,7 +103,8 @@ logImageGetByteConversionDefaults(LogImageByteConversionParameters* params) {
|
||||
}
|
||||
|
||||
int
|
||||
logImageGetByteConversion(const LogImageFile* logImage, LogImageByteConversionParameters* params) {
|
||||
logImageGetByteConversion(const LogImageFile* logImage, LogImageByteConversionParameters* params)
|
||||
{
|
||||
params->gamma = logImage->params.gamma;
|
||||
params->blackPoint = logImage->params.blackPoint;
|
||||
params->whitePoint = logImage->params.whitePoint;
|
||||
@@ -106,7 +113,8 @@ logImageGetByteConversion(const LogImageFile* logImage, LogImageByteConversionPa
|
||||
}
|
||||
|
||||
int
|
||||
logImageSetByteConversion(LogImageFile* logImage, const LogImageByteConversionParameters* params) {
|
||||
logImageSetByteConversion(LogImageFile* logImage, const LogImageByteConversionParameters* params)
|
||||
{
|
||||
if ((params->gamma >= MIN_GAMMA) &&
|
||||
(params->gamma <= MAX_GAMMA) &&
|
||||
(params->blackPoint >= 0) &&
|
||||
@@ -123,22 +131,26 @@ logImageSetByteConversion(LogImageFile* logImage, const LogImageByteConversionPa
|
||||
}
|
||||
|
||||
int
|
||||
logImageGetRowBytes(LogImageFile* logImage, unsigned short* row, int y) {
|
||||
logImageGetRowBytes(LogImageFile* logImage, unsigned short* row, int y)
|
||||
{
|
||||
return logImage->getRow(logImage, row, y);
|
||||
}
|
||||
|
||||
int
|
||||
logImageSetRowBytes(LogImageFile* logImage, const unsigned short* row, int y) {
|
||||
logImageSetRowBytes(LogImageFile* logImage, const unsigned short* row, int y)
|
||||
{
|
||||
return logImage->setRow(logImage, row, y);
|
||||
}
|
||||
|
||||
void
|
||||
logImageClose(LogImageFile* logImage) {
|
||||
logImageClose(LogImageFile* logImage)
|
||||
{
|
||||
logImage->close(logImage);
|
||||
}
|
||||
|
||||
void
|
||||
logImageDump(const char* filename) {
|
||||
logImageDump(const char* filename)
|
||||
{
|
||||
|
||||
U32 magic;
|
||||
|
||||
|
||||
@@ -743,7 +743,8 @@ void IMB_color_to_bw(ImBuf *ibuf)
|
||||
}
|
||||
}
|
||||
|
||||
void IMB_buffer_float_clamp(float *buf, int width, int height){
|
||||
void IMB_buffer_float_clamp(float *buf, int width, int height)
|
||||
{
|
||||
int i, total = width*height*4;
|
||||
for(i = 0; i < total; i++){
|
||||
buf[i] = MIN2(1.0, buf[i]);
|
||||
|
||||
@@ -1024,7 +1024,7 @@ typedef struct UnitSettings {
|
||||
/* Display/Editing unit options for each scene */
|
||||
float scale_length; /* maybe have other unit conversions? */
|
||||
char system; /* imperial, metric etc */
|
||||
char system_rotation; /* not implimented as a propper unit system yet */
|
||||
char system_rotation; /* not implemented as a propper unit system yet */
|
||||
short flag;
|
||||
} UnitSettings;
|
||||
|
||||
|
||||
@@ -42,7 +42,8 @@ static bNodeSocketTemplate cmp_node_doubleedgemask_out[]= {
|
||||
{ -1, 0, "" } // output socket array terminator
|
||||
};
|
||||
|
||||
static void do_adjacentKeepBorders(unsigned int t, unsigned int rw, unsigned int *limask, unsigned int *lomask, unsigned int *lres, float *res, unsigned int *rsize){
|
||||
static void do_adjacentKeepBorders(unsigned int t, unsigned int rw, unsigned int *limask, unsigned int *lomask, unsigned int *lres, float *res, unsigned int *rsize)
|
||||
{
|
||||
int x;
|
||||
unsigned int isz=0; // inner edge size
|
||||
unsigned int osz=0; // outer edge size
|
||||
@@ -189,7 +190,8 @@ static void do_adjacentKeepBorders(unsigned int t, unsigned int rw, unsigned int
|
||||
rsize[2]=gsz;
|
||||
}
|
||||
|
||||
static void do_adjacentBleedBorders(unsigned int t, unsigned int rw, unsigned int *limask, unsigned int *lomask, unsigned int *lres, float *res, unsigned int *rsize){
|
||||
static void do_adjacentBleedBorders(unsigned int t, unsigned int rw, unsigned int *limask, unsigned int *lomask, unsigned int *lres, float *res, unsigned int *rsize)
|
||||
{
|
||||
int x;
|
||||
unsigned int isz=0; // inner edge size
|
||||
unsigned int osz=0; // outer edge size
|
||||
@@ -375,7 +377,8 @@ static void do_adjacentBleedBorders(unsigned int t, unsigned int rw, unsigned in
|
||||
rsize[2]=gsz;
|
||||
}
|
||||
|
||||
static void do_allKeepBorders(unsigned int t, unsigned int rw, unsigned int *limask, unsigned int *lomask, unsigned int *lres, float *res, unsigned int *rsize){
|
||||
static void do_allKeepBorders(unsigned int t, unsigned int rw, unsigned int *limask, unsigned int *lomask, unsigned int *lres, float *res, unsigned int *rsize)
|
||||
{
|
||||
int x;
|
||||
unsigned int isz=0; // inner edge size
|
||||
unsigned int osz=0; // outer edge size
|
||||
@@ -514,7 +517,8 @@ static void do_allKeepBorders(unsigned int t, unsigned int rw, unsigned int *lim
|
||||
rsize[2]=gsz;
|
||||
}
|
||||
|
||||
static void do_allBleedBorders(unsigned int t, unsigned int rw, unsigned int *limask, unsigned int *lomask, unsigned int *lres, float *res, unsigned int *rsize){
|
||||
static void do_allBleedBorders(unsigned int t, unsigned int rw, unsigned int *limask, unsigned int *lomask, unsigned int *lres, float *res, unsigned int *rsize)
|
||||
{
|
||||
int x;
|
||||
unsigned int isz=0; // inner edge size
|
||||
unsigned int osz=0; // outer edge size
|
||||
@@ -692,7 +696,8 @@ static void do_allBleedBorders(unsigned int t, unsigned int rw, unsigned int *li
|
||||
rsize[2]=gsz;
|
||||
}
|
||||
|
||||
static void do_allEdgeDetection(unsigned int t, unsigned int rw, unsigned int *limask, unsigned int *lomask, unsigned int *lres, float *res, unsigned int *rsize, unsigned int in_isz, unsigned int in_osz, unsigned int in_gsz){
|
||||
static void do_allEdgeDetection(unsigned int t, unsigned int rw, unsigned int *limask, unsigned int *lomask, unsigned int *lres, float *res, unsigned int *rsize, unsigned int in_isz, unsigned int in_osz, unsigned int in_gsz)
|
||||
{
|
||||
int x; // x = pixel loop counter
|
||||
int a; // a = pixel loop counter
|
||||
int dx; // dx = delta x
|
||||
@@ -750,7 +755,8 @@ static void do_allEdgeDetection(unsigned int t, unsigned int rw, unsigned int *l
|
||||
rsize[2]=in_gsz;
|
||||
}
|
||||
|
||||
static void do_adjacentEdgeDetection(unsigned int t, unsigned int rw, unsigned int *limask, unsigned int *lomask, unsigned int *lres, float *res, unsigned int *rsize, unsigned int in_isz, unsigned int in_osz, unsigned int in_gsz){
|
||||
static void do_adjacentEdgeDetection(unsigned int t, unsigned int rw, unsigned int *limask, unsigned int *lomask, unsigned int *lres, float *res, unsigned int *rsize, unsigned int in_isz, unsigned int in_osz, unsigned int in_gsz)
|
||||
{
|
||||
int x; // x = pixel loop counter
|
||||
int a; // a = pixel loop counter
|
||||
int dx; // dx = delta x
|
||||
@@ -812,7 +818,8 @@ static void do_adjacentEdgeDetection(unsigned int t, unsigned int rw, unsigned i
|
||||
rsize[2]=in_gsz;
|
||||
}
|
||||
|
||||
static void do_createEdgeLocationBuffer(unsigned int t, unsigned int rw, unsigned int *lres, float *res, unsigned short *gbuf, unsigned int *innerEdgeOffset, unsigned int *outerEdgeOffset, unsigned int isz, unsigned int gsz){
|
||||
static void do_createEdgeLocationBuffer(unsigned int t, unsigned int rw, unsigned int *lres, float *res, unsigned short *gbuf, unsigned int *innerEdgeOffset, unsigned int *outerEdgeOffset, unsigned int isz, unsigned int gsz)
|
||||
{
|
||||
int x; // x = pixel loop counter
|
||||
int a; // a = temporary pixel index buffer loop counter
|
||||
unsigned int ud; // ud = unscaled edge distance
|
||||
@@ -920,7 +927,8 @@ static void do_createEdgeLocationBuffer(unsigned int t, unsigned int rw, unsigne
|
||||
|
||||
}
|
||||
|
||||
static void do_fillGradientBuffer(unsigned int rw, float *res, unsigned short *gbuf, unsigned int isz, unsigned int osz, unsigned int gsz, unsigned int innerEdgeOffset, unsigned int outerEdgeOffset){
|
||||
static void do_fillGradientBuffer(unsigned int rw, float *res, unsigned short *gbuf, unsigned int isz, unsigned int osz, unsigned int gsz, unsigned int innerEdgeOffset, unsigned int outerEdgeOffset)
|
||||
{
|
||||
int x; // x = pixel loop counter
|
||||
int a; // a = temporary pixel index buffer loop counter
|
||||
int fsz; // size of the frame
|
||||
@@ -1048,7 +1056,8 @@ static void do_fillGradientBuffer(unsigned int rw, float *res, unsigned short *g
|
||||
}
|
||||
|
||||
|
||||
static void node_composit_exec_doubleedgemask(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out) {
|
||||
static void node_composit_exec_doubleedgemask(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out)
|
||||
{
|
||||
|
||||
float *imask; // imask = pointer to inner mask pixel buffer
|
||||
float *omask; // omask = pointer to outer mask pixel buffer
|
||||
@@ -1172,7 +1181,8 @@ static void node_composit_exec_doubleedgemask(void *UNUSED(data), bNode *node, b
|
||||
}
|
||||
}
|
||||
|
||||
void register_node_type_cmp_doubleedgemask(bNodeTreeType *ttype) {
|
||||
void register_node_type_cmp_doubleedgemask(bNodeTreeType *ttype)
|
||||
{
|
||||
static bNodeType ntype; // allocate a node type data structure
|
||||
|
||||
node_type_base(ttype, &ntype, CMP_NODE_DOUBLEEDGEMASK, "Double Edge Mask", NODE_CLASS_MATTE, NODE_OPTIONS);
|
||||
|
||||
@@ -228,7 +228,7 @@ PyObject *PyC_Object_GetAttrStringArgs(PyObject *o, Py_ssize_t n, ...)
|
||||
|
||||
/* similar to PyErr_Format(),
|
||||
*
|
||||
* implimentation - we cant actually preprend the existing exception,
|
||||
* implementation - we cant actually preprend the existing exception,
|
||||
* because it could have _any_ argiments given to it, so instead we get its
|
||||
* __str__ output and raise our own exception including it.
|
||||
*/
|
||||
|
||||
@@ -6857,7 +6857,7 @@ static int bpy_class_call(bContext *C, PointerRNA *ptr, FunctionRNA *func, Param
|
||||
#if 1
|
||||
/* Skip the code below and call init directly on the allocated 'py_srna'
|
||||
* otherwise __init__() always needs to take a second self argument, see pyrna_struct_new().
|
||||
* Although this is annoying to have to impliment a part of pythons typeobject.c:type_call().
|
||||
* Although this is annoying to have to implement a part of pythons typeobject.c:type_call().
|
||||
*/
|
||||
if (py_class->tp_init) {
|
||||
#ifdef USE_PEDANTIC_WRITE
|
||||
|
||||
@@ -132,7 +132,8 @@ int quicktime_get_num_videocodecs()
|
||||
return qtVideoCodecCount;
|
||||
}
|
||||
|
||||
QuicktimeCodecTypeDesc* quicktime_get_videocodecType_desc(int indexValue) {
|
||||
QuicktimeCodecTypeDesc* quicktime_get_videocodecType_desc(int indexValue)
|
||||
{
|
||||
if ((indexValue>=0) && (indexValue < qtVideoCodecCount))
|
||||
return &qtVideoCodecList[indexValue];
|
||||
else
|
||||
@@ -176,7 +177,8 @@ int quicktime_get_num_audiocodecs()
|
||||
return qtAudioCodecCount;
|
||||
}
|
||||
|
||||
QuicktimeCodecTypeDesc* quicktime_get_audiocodecType_desc(int indexValue) {
|
||||
QuicktimeCodecTypeDesc* quicktime_get_audiocodecType_desc(int indexValue)
|
||||
{
|
||||
if ((indexValue>=0) && (indexValue < qtAudioCodecCount))
|
||||
return &qtAudioCodecList[indexValue];
|
||||
else
|
||||
|
||||
@@ -153,7 +153,8 @@ int quicktime_get_num_videocodecs()
|
||||
return qtVideoCodecCount;
|
||||
}
|
||||
|
||||
QuicktimeCodecTypeDesc* quicktime_get_videocodecType_desc(int indexValue) {
|
||||
QuicktimeCodecTypeDesc* quicktime_get_videocodecType_desc(int indexValue)
|
||||
{
|
||||
if ((indexValue>=0) && (indexValue < qtVideoCodecCount))
|
||||
return &qtVideoCodecList[indexValue];
|
||||
else
|
||||
|
||||
@@ -175,7 +175,8 @@ void BL_ActionActuator::ResetStartTime(float curtime)
|
||||
//SetLocalTime(curtime);
|
||||
}
|
||||
|
||||
CValue* BL_ActionActuator::GetReplica() {
|
||||
CValue* BL_ActionActuator::GetReplica()
|
||||
{
|
||||
BL_ActionActuator* replica = new BL_ActionActuator(*this);//m_float,GetName());
|
||||
replica->ProcessReplica();
|
||||
return replica;
|
||||
|
||||
@@ -2140,7 +2140,8 @@ KX_IPhysicsController* getPhId(CListValue* sumolist,STR_String busc){//not used
|
||||
|
||||
}
|
||||
|
||||
KX_GameObject* getGameOb(STR_String busc,CListValue* sumolist){
|
||||
KX_GameObject* getGameOb(STR_String busc,CListValue* sumolist)
|
||||
{
|
||||
|
||||
for (int j=0;j<sumolist->GetCount();j++)
|
||||
{
|
||||
|
||||
@@ -41,12 +41,14 @@ extern "C" {
|
||||
#include "BKE_fcurve.h"
|
||||
}
|
||||
|
||||
float BL_ScalarInterpolator::GetValue(float currentTime) const {
|
||||
float BL_ScalarInterpolator::GetValue(float currentTime) const
|
||||
{
|
||||
// XXX 2.4x IPO_GetFloatValue(m_blender_adt, m_channel, currentTime);
|
||||
return evaluate_fcurve(m_fcu, currentTime);
|
||||
}
|
||||
|
||||
BL_InterpolatorList::BL_InterpolatorList(bAction *action) {
|
||||
BL_InterpolatorList::BL_InterpolatorList(bAction *action)
|
||||
{
|
||||
if(action==NULL)
|
||||
return;
|
||||
|
||||
@@ -59,7 +61,8 @@ BL_InterpolatorList::BL_InterpolatorList(bAction *action) {
|
||||
}
|
||||
}
|
||||
|
||||
BL_InterpolatorList::~BL_InterpolatorList() {
|
||||
BL_InterpolatorList::~BL_InterpolatorList()
|
||||
{
|
||||
BL_InterpolatorList::iterator i;
|
||||
for (i = begin(); !(i == end()); ++i) {
|
||||
delete *i;
|
||||
|
||||
@@ -308,7 +308,8 @@ const STR_String & CIntValue::GetText()
|
||||
|
||||
|
||||
|
||||
CValue* CIntValue::GetReplica() {
|
||||
CValue* CIntValue::GetReplica()
|
||||
{
|
||||
CIntValue* replica = new CIntValue(*this);
|
||||
replica->ProcessReplica();
|
||||
replica->m_pstrRep = NULL;
|
||||
|
||||
@@ -71,7 +71,8 @@ const STR_String & CListValue::GetText()
|
||||
|
||||
|
||||
|
||||
CValue* CListValue::GetReplica() {
|
||||
CValue* CListValue::GetReplica()
|
||||
{
|
||||
CListValue* replica = new CListValue(*this);
|
||||
|
||||
replica->ProcessReplica();
|
||||
@@ -214,7 +215,7 @@ CValue* CListValue::Calc(VALUE_OPERATOR op,CValue *val)
|
||||
//assert(false); // todo: implement me!
|
||||
static int error_printed = 0;
|
||||
if (error_printed==0) {
|
||||
fprintf(stderr, "CValueList::Calc not yet implimented\n");
|
||||
fprintf(stderr, "CValueList::Calc not yet implemented\n");
|
||||
error_printed = 1;
|
||||
}
|
||||
return NULL;
|
||||
@@ -227,7 +228,7 @@ CValue* CListValue::CalcFinal(VALUE_DATA_TYPE dtype,
|
||||
//assert(false); // todo: implement me!
|
||||
static int error_printed = 0;
|
||||
if (error_printed==0) {
|
||||
fprintf(stderr, "CValueList::CalcFinal not yet implimented\n");
|
||||
fprintf(stderr, "CValueList::CalcFinal not yet implemented\n");
|
||||
error_printed = 1;
|
||||
}
|
||||
return NULL;
|
||||
|
||||
@@ -103,7 +103,8 @@ bool COperator1Expr::NeedsRecalculated()
|
||||
return m_lhs->NeedsRecalculated();
|
||||
}
|
||||
|
||||
CExpression* COperator1Expr::CheckLink(std::vector<CBrokenLinkInfo*>& brokenlinks) {
|
||||
CExpression* COperator1Expr::CheckLink(std::vector<CBrokenLinkInfo*>& brokenlinks)
|
||||
{
|
||||
|
||||
CExpression* newlhs = m_lhs->CheckLink(brokenlinks);
|
||||
|
||||
|
||||
@@ -197,7 +197,8 @@ bool COperator2Expr::NeedsRecalculated()
|
||||
|
||||
|
||||
|
||||
CExpression* COperator2Expr::CheckLink(std::vector<CBrokenLinkInfo*>& brokenlinks) {
|
||||
CExpression* COperator2Expr::CheckLink(std::vector<CBrokenLinkInfo*>& brokenlinks)
|
||||
{
|
||||
// if both children are 'dead', return NULL
|
||||
// if only one child is alive, return that child
|
||||
// if both childresn are alive, return this
|
||||
|
||||
@@ -47,7 +47,8 @@ CVectorValue::CVectorValue(float x,float y,float z, AllocationTYPE alloctype)
|
||||
m_vec[KX_Z] = m_transformedvec[KX_Z] = z;
|
||||
|
||||
}
|
||||
CVectorValue::CVectorValue(double vec[],const char *name,AllocationTYPE alloctype) {
|
||||
CVectorValue::CVectorValue(double vec[],const char *name,AllocationTYPE alloctype)
|
||||
{
|
||||
|
||||
SetCustomFlag1(false);//FancyOutput=false;
|
||||
|
||||
@@ -64,7 +65,8 @@ CVectorValue::CVectorValue(double vec[],const char *name,AllocationTYPE alloctyp
|
||||
SetName(name);
|
||||
}
|
||||
|
||||
CVectorValue::CVectorValue(double vec[],AllocationTYPE alloctype) {
|
||||
CVectorValue::CVectorValue(double vec[],AllocationTYPE alloctype)
|
||||
{
|
||||
|
||||
SetCustomFlag1(false);//FancyOutput=false;
|
||||
|
||||
@@ -201,7 +203,8 @@ const STR_String & CVectorValue::GetText()
|
||||
return gstrVectorStr;
|
||||
}
|
||||
|
||||
CValue* CVectorValue::GetReplica() {
|
||||
CValue* CVectorValue::GetReplica()
|
||||
{
|
||||
CVectorValue* replica = new CVectorValue(*this);
|
||||
replica->ProcessReplica();
|
||||
return replica;
|
||||
|
||||
@@ -303,7 +303,8 @@ PyAttributeDef SCA_JoystickSensor::Attributes[] = {
|
||||
const char SCA_JoystickSensor::GetButtonActiveList_doc[] =
|
||||
"getButtonActiveList\n"
|
||||
"\tReturns a list containing the indices of the button currently pressed.\n";
|
||||
PyObject* SCA_JoystickSensor::PyGetButtonActiveList( ) {
|
||||
PyObject* SCA_JoystickSensor::PyGetButtonActiveList( )
|
||||
{
|
||||
SCA_Joystick *joy = ((SCA_JoystickManager *)m_eventmgr)->GetJoystickDevice(m_joyindex);
|
||||
PyObject *ls = PyList_New(0);
|
||||
PyObject *value;
|
||||
@@ -325,7 +326,8 @@ PyObject* SCA_JoystickSensor::PyGetButtonActiveList( ) {
|
||||
const char SCA_JoystickSensor::GetButtonStatus_doc[] =
|
||||
"getButtonStatus(buttonIndex)\n"
|
||||
"\tReturns a bool of the current pressed state of the specified button.\n";
|
||||
PyObject* SCA_JoystickSensor::PyGetButtonStatus( PyObject* args ) {
|
||||
PyObject* SCA_JoystickSensor::PyGetButtonStatus( PyObject* args )
|
||||
{
|
||||
SCA_Joystick *joy = ((SCA_JoystickManager *)m_eventmgr)->GetJoystickDevice(m_joyindex);
|
||||
int index;
|
||||
|
||||
|
||||
@@ -183,7 +183,8 @@ isValid(
|
||||
|
||||
SCA_PropertyActuator::
|
||||
|
||||
GetReplica() {
|
||||
GetReplica()
|
||||
{
|
||||
|
||||
SCA_PropertyActuator* replica = new SCA_PropertyActuator(*this);
|
||||
|
||||
|
||||
@@ -54,14 +54,16 @@
|
||||
#define TEMPERING_SHIFT_T(y) (y << 15)
|
||||
#define TEMPERING_SHIFT_L(y) (y >> 18)
|
||||
|
||||
SCA_RandomNumberGenerator::SCA_RandomNumberGenerator(long seed) {
|
||||
SCA_RandomNumberGenerator::SCA_RandomNumberGenerator(long seed)
|
||||
{
|
||||
// int mti = N + 1; /*unused*/
|
||||
m_seed = seed;
|
||||
m_refcount = 1;
|
||||
SetStartVector();
|
||||
}
|
||||
|
||||
SCA_RandomNumberGenerator::~SCA_RandomNumberGenerator() {
|
||||
SCA_RandomNumberGenerator::~SCA_RandomNumberGenerator()
|
||||
{
|
||||
/* intentionally empty */
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +72,8 @@ KX_NetworkMessageSensor::~KX_NetworkMessageSensor()
|
||||
{
|
||||
}
|
||||
|
||||
CValue* KX_NetworkMessageSensor::GetReplica() {
|
||||
CValue* KX_NetworkMessageSensor::GetReplica()
|
||||
{
|
||||
// This is the standard sensor implementation of GetReplica
|
||||
// There may be more network message sensor specific stuff to do here.
|
||||
CValue* replica = new KX_NetworkMessageSensor(*this);
|
||||
|
||||
@@ -104,7 +104,8 @@ KX_FontObject::~KX_FontObject()
|
||||
//it's handled in KX_Scene::NewRemoveObject
|
||||
}
|
||||
|
||||
CValue* KX_FontObject::GetReplica() {
|
||||
CValue* KX_FontObject::GetReplica()
|
||||
{
|
||||
KX_FontObject* replica = new KX_FontObject(*this);
|
||||
replica->ProcessReplica();
|
||||
return replica;
|
||||
@@ -116,7 +117,8 @@ void KX_FontObject::ProcessReplica()
|
||||
KX_GetActiveScene()->AddFont(this);
|
||||
}
|
||||
|
||||
int GetFontId (VFont *font) {
|
||||
int GetFontId (VFont *font)
|
||||
{
|
||||
PackedFile *packedfile=NULL;
|
||||
int fontid = -1;
|
||||
|
||||
|
||||
@@ -34,7 +34,8 @@
|
||||
#include "MT_Matrix3x3.h"
|
||||
#include "KX_IScalarInterpolator.h"
|
||||
|
||||
void KX_OrientationInterpolator::Execute(float currentTime) const {
|
||||
void KX_OrientationInterpolator::Execute(float currentTime) const
|
||||
{
|
||||
MT_Vector3 eul(m_ipos[0]->GetValue(currentTime),
|
||||
m_ipos[1]->GetValue(currentTime),
|
||||
m_ipos[2]->GetValue(currentTime));
|
||||
|
||||
@@ -34,7 +34,8 @@
|
||||
#include "MT_Point3.h"
|
||||
#include "KX_IScalarInterpolator.h"
|
||||
|
||||
void KX_PositionInterpolator::Execute(float currentTime) const {
|
||||
void KX_PositionInterpolator::Execute(float currentTime) const
|
||||
{
|
||||
m_target.setValue(m_ipos[0]->GetValue(currentTime),
|
||||
m_ipos[1]->GetValue(currentTime),
|
||||
m_ipos[2]->GetValue(currentTime));
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "KX_ScalarInterpolator.h"
|
||||
#include "KX_IScalarInterpolator.h"
|
||||
|
||||
void KX_ScalarInterpolator::Execute(float currentTime) const {
|
||||
void KX_ScalarInterpolator::Execute(float currentTime) const
|
||||
{
|
||||
*m_target = m_ipo->GetValue(currentTime);
|
||||
}
|
||||
|
||||
@@ -34,7 +34,8 @@
|
||||
#include "MT_Vector3.h"
|
||||
#include "KX_IScalarInterpolator.h"
|
||||
|
||||
void KX_ScalingInterpolator::Execute(float currentTime) const {
|
||||
void KX_ScalingInterpolator::Execute(float currentTime) const
|
||||
{
|
||||
m_target.setValue(m_ipos[0]->GetValue(currentTime),
|
||||
m_ipos[1]->GetValue(currentTime),
|
||||
m_ipos[2]->GetValue(currentTime));
|
||||
|
||||
@@ -144,7 +144,8 @@ void NG_NetworkScene::RemoveAllObjects()
|
||||
/**
|
||||
* get a single network object given its name
|
||||
*/
|
||||
NG_NetworkObject* NG_NetworkScene::FindNetworkObject(const STR_String& objname) {
|
||||
NG_NetworkObject* NG_NetworkScene::FindNetworkObject(const STR_String& objname)
|
||||
{
|
||||
NG_NetworkObject *nwobj = NULL;
|
||||
if (! m_networkdevice->IsOnline()) return nwobj;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user