correct indentation and some whitespace edits (no functional changes)
This commit is contained in:
parent
094c9799f9
commit
e84c0980a3
|
@ -395,7 +395,7 @@ void AUD_FFMPEGReader::read(int& length, bool& eos, sample_t* buffer)
|
|||
{
|
||||
data_size = AUD_MIN(pkgbuf_pos, left * sample_size);
|
||||
m_convert((data_t*) buf, (data_t*) m_pkgbuf.getBuffer(),
|
||||
data_size / AUD_FORMAT_SIZE(m_specs.format));
|
||||
data_size / AUD_FORMAT_SIZE(m_specs.format));
|
||||
buf += data_size / AUD_FORMAT_SIZE(m_specs.format);
|
||||
left -= data_size/sample_size;
|
||||
}
|
||||
|
|
|
@ -73,5 +73,5 @@ void AUD_ConverterReader::read(int& length, bool& eos, sample_t* buffer)
|
|||
m_reader->read(length, eos, m_buffer.getBuffer());
|
||||
|
||||
m_convert((data_t*)buffer, (data_t*)m_buffer.getBuffer(),
|
||||
length * specs.channels);
|
||||
length * specs.channels);
|
||||
}
|
||||
|
|
|
@ -167,39 +167,41 @@ void BOP_Face2Face(BOP_Mesh *mesh, BOP_Faces *facesA, BOP_Faces *facesB)
|
|||
MT_Point3 p2 = mesh->getVertex(faceA->getVertex(1))->getPoint();
|
||||
MT_Point3 p3 = mesh->getVertex(faceA->getVertex(2))->getPoint();
|
||||
|
||||
/* get (or create) bounding box for face A */
|
||||
/* get (or create) bounding box for face A */
|
||||
if( faceA->getBBox() == NULL )
|
||||
faceA->setBBox(p1,p2,p3);
|
||||
faceA->setBBox(p1,p2,p3);
|
||||
BOP_BBox *boxA = faceA->getBBox();
|
||||
|
||||
/* start checking B faces with the previously stored split index */
|
||||
|
||||
for(unsigned int idxFaceB=faceA->getSplit();
|
||||
idxFaceB<facesB->size() && (faceA->getTAG() != BROKEN) && (faceA->getTAG() != PHANTOM);) {
|
||||
idxFaceB<facesB->size() && (faceA->getTAG() != BROKEN) && (faceA->getTAG() != PHANTOM);) {
|
||||
BOP_Face *faceB = (*facesB)[idxFaceB];
|
||||
faceA->setSplit(idxFaceB);
|
||||
if ((faceB->getTAG() != BROKEN) && (faceB->getTAG() != PHANTOM)) {
|
||||
|
||||
/* get (or create) bounding box for face B */
|
||||
if( faceB->getBBox() == NULL )
|
||||
faceB->setBBox(mesh->getVertex(faceB->getVertex(0))->getPoint(),
|
||||
mesh->getVertex(faceB->getVertex(1))->getPoint(),
|
||||
mesh->getVertex(faceB->getVertex(2))->getPoint());
|
||||
BOP_BBox *boxB = faceB->getBBox();
|
||||
/* get (or create) bounding box for face B */
|
||||
if( faceB->getBBox() == NULL ) {
|
||||
faceB->setBBox(mesh->getVertex(faceB->getVertex(0))->getPoint(),
|
||||
mesh->getVertex(faceB->getVertex(1))->getPoint(),
|
||||
mesh->getVertex(faceB->getVertex(2))->getPoint());
|
||||
}
|
||||
BOP_BBox *boxB = faceB->getBBox();
|
||||
|
||||
if (boxA->intersect(*boxB)) {
|
||||
MT_Plane3 planeB = faceB->getPlane();
|
||||
if (BOP_containsPoint(planeB,p1) &&
|
||||
BOP_containsPoint(planeB,p2) &&
|
||||
BOP_containsPoint(planeB,p3)) {
|
||||
if (BOP_orientation(planeB,planeA)>0) {
|
||||
BOP_intersectCoplanarFaces(mesh,facesB,faceA,faceB,false);
|
||||
}
|
||||
}
|
||||
else {
|
||||
BOP_intersectNonCoplanarFaces(mesh,facesA,facesB,faceA,faceB);
|
||||
}
|
||||
}
|
||||
if (boxA->intersect(*boxB)) {
|
||||
MT_Plane3 planeB = faceB->getPlane();
|
||||
if (BOP_containsPoint(planeB,p1) &&
|
||||
BOP_containsPoint(planeB,p2) &&
|
||||
BOP_containsPoint(planeB,p3))
|
||||
{
|
||||
if (BOP_orientation(planeB,planeA)>0) {
|
||||
BOP_intersectCoplanarFaces(mesh,facesB,faceA,faceB,false);
|
||||
}
|
||||
}
|
||||
else {
|
||||
BOP_intersectNonCoplanarFaces(mesh,facesA,facesB,faceA,faceB);
|
||||
}
|
||||
}
|
||||
}
|
||||
idxFaceB++;
|
||||
}
|
||||
|
@ -656,16 +658,16 @@ void BOP_mergeSort(MT_Point3 *points, unsigned int *face, unsigned int &size, bo
|
|||
* @param invert indicates if faceA has priority over faceB
|
||||
* @param segmemts array of the output x-segments
|
||||
*/
|
||||
void BOP_createXS(BOP_Mesh* mesh,
|
||||
BOP_Face* faceA,
|
||||
BOP_Face* faceB,
|
||||
BOP_Segment sA,
|
||||
BOP_Segment sB,
|
||||
bool invert,
|
||||
BOP_Segment* segments) {
|
||||
BOP_createXS(mesh, faceA, faceB, faceA->getPlane(), faceB->getPlane(),
|
||||
sA, sB, invert, segments);
|
||||
}
|
||||
void BOP_createXS(BOP_Mesh* mesh,
|
||||
BOP_Face* faceA,
|
||||
BOP_Face* faceB,
|
||||
BOP_Segment sA,
|
||||
BOP_Segment sB,
|
||||
bool invert,
|
||||
BOP_Segment* segments) {
|
||||
BOP_createXS(mesh, faceA, faceB, faceA->getPlane(), faceB->getPlane(),
|
||||
sA, sB, invert, segments);
|
||||
}
|
||||
|
||||
/**
|
||||
* Computes the x-segment of two segments (the shared interval). The segments needs to have sA.m_cfg1 > 0 && sB.m_cfg1 > 0 .
|
||||
|
@ -1169,7 +1171,7 @@ BOP_Face *BOP_getOppositeFace(BOP_Mesh* mesh,
|
|||
void BOP_removeOverlappedFaces(BOP_Mesh *mesh, BOP_Faces *facesA, BOP_Faces *facesB)
|
||||
{
|
||||
for(unsigned int i=0;i<facesA->size();i++) {
|
||||
BOP_Face *faceI = (*facesA)[i];
|
||||
BOP_Face *faceI = (*facesA)[i];
|
||||
if (faceI->getTAG()==BROKEN) continue;
|
||||
bool overlapped = false;
|
||||
MT_Point3 p1 = mesh->getVertex(faceI->getVertex(0))->getPoint();
|
||||
|
@ -1178,21 +1180,23 @@ void BOP_removeOverlappedFaces(BOP_Mesh *mesh, BOP_Faces *facesA, BOP_Faces *f
|
|||
for(unsigned int j=0;j<facesB->size();) {
|
||||
BOP_Face *faceJ = (*facesB)[j];
|
||||
if (faceJ->getTAG()!=BROKEN) {
|
||||
MT_Plane3 planeJ = faceJ->getPlane();
|
||||
if (BOP_containsPoint(planeJ,p1) && BOP_containsPoint(planeJ,p2)
|
||||
&& BOP_containsPoint(planeJ,p3)) {
|
||||
MT_Point3 q1 = mesh->getVertex(faceJ->getVertex(0))->getPoint();
|
||||
MT_Point3 q2 = mesh->getVertex(faceJ->getVertex(1))->getPoint();
|
||||
MT_Point3 q3 = mesh->getVertex(faceJ->getVertex(2))->getPoint();
|
||||
if (BOP_overlap(MT_Vector3(planeJ.x(),planeJ.y(),planeJ.z()),
|
||||
p1,p2,p3,q1,q2,q3)) {
|
||||
facesB->erase(facesB->begin()+j,facesB->begin()+(j+1));
|
||||
faceJ->setTAG(BROKEN);
|
||||
overlapped = true;
|
||||
}
|
||||
else j++;
|
||||
}
|
||||
else j++;
|
||||
MT_Plane3 planeJ = faceJ->getPlane();
|
||||
if (BOP_containsPoint(planeJ,p1) && BOP_containsPoint(planeJ,p2)
|
||||
&& BOP_containsPoint(planeJ,p3))
|
||||
{
|
||||
MT_Point3 q1 = mesh->getVertex(faceJ->getVertex(0))->getPoint();
|
||||
MT_Point3 q2 = mesh->getVertex(faceJ->getVertex(1))->getPoint();
|
||||
MT_Point3 q3 = mesh->getVertex(faceJ->getVertex(2))->getPoint();
|
||||
if (BOP_overlap(MT_Vector3(planeJ.x(),planeJ.y(),planeJ.z()),
|
||||
p1,p2,p3,q1,q2,q3))
|
||||
{
|
||||
facesB->erase(facesB->begin()+j,facesB->begin()+(j+1));
|
||||
faceJ->setTAG(BROKEN);
|
||||
overlapped = true;
|
||||
}
|
||||
else j++;
|
||||
}
|
||||
else j++;
|
||||
}else j++;
|
||||
}
|
||||
if (overlapped) faceI->setTAG(OVERLAPPED);
|
||||
|
|
|
@ -46,23 +46,23 @@
|
|||
#endif
|
||||
|
||||
BoolOpState BOP_intersectionBoolOp(BOP_Mesh* meshC,
|
||||
BOP_Faces* facesA,
|
||||
BOP_Faces* facesB,
|
||||
bool invertMeshA,
|
||||
bool invertMeshB);
|
||||
BOP_Faces* facesA,
|
||||
BOP_Faces* facesB,
|
||||
bool invertMeshA,
|
||||
bool invertMeshB);
|
||||
BOP_Face3* BOP_createFace(BOP_Mesh* mesh,
|
||||
BOP_Index vertex1,
|
||||
BOP_Index vertex2,
|
||||
BOP_Index vertex3,
|
||||
BOP_Index origFace);
|
||||
BOP_Index vertex1,
|
||||
BOP_Index vertex2,
|
||||
BOP_Index vertex3,
|
||||
BOP_Index origFace);
|
||||
void BOP_addMesh(BOP_Mesh* mesh,
|
||||
BOP_Faces* meshFacesId,
|
||||
CSG_FaceIteratorDescriptor& face_it,
|
||||
CSG_VertexIteratorDescriptor& vertex_it,
|
||||
bool invert);
|
||||
BOP_Faces* meshFacesId,
|
||||
CSG_FaceIteratorDescriptor& face_it,
|
||||
CSG_VertexIteratorDescriptor& vertex_it,
|
||||
bool invert);
|
||||
BSP_CSGMesh* BOP_newEmptyMesh();
|
||||
BSP_CSGMesh* BOP_exportMesh(BOP_Mesh* inputMesh,
|
||||
bool invert);
|
||||
bool invert);
|
||||
void BOP_meshFilter(BOP_Mesh* meshC, BOP_Faces* faces, BOP_BSPTree* bsp);
|
||||
void BOP_simplifiedMeshFilter(BOP_Mesh* meshC, BOP_Faces* faces, BOP_BSPTree* bsp, bool inverted);
|
||||
void BOP_meshClassify(BOP_Mesh* meshC, BOP_Faces* faces, BOP_BSPTree* bsp);
|
||||
|
|
|
@ -788,20 +788,20 @@ BOP_Index BOP_Mesh::replaceVertexIndex(BOP_Index oldIndex, BOP_Index newIndex)
|
|||
|
||||
bool BOP_Mesh::isClosedMesh()
|
||||
{
|
||||
for(unsigned int i=0; i<m_edges.size(); i++) {
|
||||
BOP_Edge *edge = m_edges[i];
|
||||
BOP_Indexs faces = edge->getFaces();
|
||||
unsigned int count = 0;
|
||||
const BOP_IT_Indexs facesEnd = faces.end();
|
||||
for(BOP_IT_Indexs it = faces.begin();it!=facesEnd;it++) {
|
||||
if (m_faces[*it]->getTAG()!=BROKEN)
|
||||
count++;
|
||||
}
|
||||
for(unsigned int i=0; i<m_edges.size(); i++) {
|
||||
BOP_Edge *edge = m_edges[i];
|
||||
BOP_Indexs faces = edge->getFaces();
|
||||
unsigned int count = 0;
|
||||
const BOP_IT_Indexs facesEnd = faces.end();
|
||||
for(BOP_IT_Indexs it = faces.begin();it!=facesEnd;it++) {
|
||||
if (m_faces[*it]->getTAG()!=BROKEN)
|
||||
count++;
|
||||
}
|
||||
|
||||
if ((count%2)!=0) return false;
|
||||
}
|
||||
if ((count%2)!=0) return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -91,14 +91,14 @@ CSG_PerformBooleanOperation(
|
|||
|
||||
switch( op_type ) {
|
||||
case e_csg_union:
|
||||
boolType = BOP_UNION;
|
||||
break;
|
||||
boolType = BOP_UNION;
|
||||
break;
|
||||
case e_csg_difference:
|
||||
boolType = BOP_DIFFERENCE;
|
||||
break;
|
||||
boolType = BOP_DIFFERENCE;
|
||||
break;
|
||||
default:
|
||||
boolType = BOP_INTERSECTION;
|
||||
break;
|
||||
boolType = BOP_INTERSECTION;
|
||||
break;
|
||||
}
|
||||
|
||||
BoolOpState boolOpResult;
|
||||
|
|
|
@ -229,13 +229,13 @@ private:
|
|||
Parent(
|
||||
unsigned int i
|
||||
) {
|
||||
return (i-1) >> 1;
|
||||
return (i-1) >> 1;
|
||||
}
|
||||
int
|
||||
Left(
|
||||
int i
|
||||
) {
|
||||
return (i<<1)+1;
|
||||
return (i<<1)+1;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -152,8 +152,8 @@ CollapseEdge(
|
|||
|
||||
// assign new vertex position
|
||||
|
||||
v0.pos = new_vertex;
|
||||
v1.pos = new_vertex;
|
||||
v0.pos = new_vertex;
|
||||
v1.pos = new_vertex;
|
||||
|
||||
// sum the quadrics of v0 and v1
|
||||
q0 = sum;
|
||||
|
|
|
@ -252,7 +252,7 @@ public:
|
|||
* @return Indication of success.
|
||||
*/
|
||||
virtual GHOST_TSuccess beginFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window,
|
||||
const bool stereoVisual, const GHOST_TUns16 numOfAASamples=0) = 0;
|
||||
const bool stereoVisual) = 0;
|
||||
|
||||
/**
|
||||
* Ends full screen mode.
|
||||
|
@ -358,7 +358,7 @@ public:
|
|||
* @return Returns "unsinged char" from X11 XA_CUT_BUFFER0 buffer
|
||||
*
|
||||
*/
|
||||
virtual GHOST_TUns8* getClipboard(bool selection) const = 0;
|
||||
virtual GHOST_TUns8* getClipboard(bool selection) const = 0;
|
||||
|
||||
/**
|
||||
* Put data to the Clipboard
|
||||
|
|
|
@ -86,12 +86,12 @@ public:
|
|||
* Determine the directory of the current binary
|
||||
* @return Unsigned char string pointing to the binary dir
|
||||
*/
|
||||
virtual const GHOST_TUns8* getBinaryDir() const = 0;
|
||||
virtual const GHOST_TUns8* getBinaryDir() const = 0;
|
||||
|
||||
/**
|
||||
* Add the file to the operating system most recently used files
|
||||
*/
|
||||
virtual void addToSystemRecentFiles(const char* filename) const = 0;
|
||||
/**
|
||||
* Add the file to the operating system most recently used files
|
||||
*/
|
||||
virtual void addToSystemRecentFiles(const char* filename) const = 0;
|
||||
|
||||
private:
|
||||
/** The one and only system paths*/
|
||||
|
|
|
@ -88,7 +88,7 @@ GHOST_TSuccess GHOST_DisplayManagerCarbon::getDisplaySetting(GHOST_TUns8 display
|
|||
displayModes = ::CGDisplayAvailableModes(d);
|
||||
//CFIndex numModes = ::CFArrayGetCount(displayModes);/*unused*/
|
||||
//GHOST_TInt32 numSettings = (GHOST_TInt32)numModes; /*unused*/
|
||||
CFDictionaryRef displayModeValues = (CFDictionaryRef)::CFArrayGetValueAtIndex(displayModes, index);
|
||||
CFDictionaryRef displayModeValues = (CFDictionaryRef)::CFArrayGetValueAtIndex(displayModes, index);
|
||||
|
||||
setting.xPixels = getValue(displayModeValues, kCGDisplayWidth);
|
||||
setting.yPixels = getValue(displayModeValues, kCGDisplayHeight);
|
||||
|
|
|
@ -141,7 +141,7 @@ public:
|
|||
* @return Indication of success.
|
||||
*/
|
||||
virtual GHOST_TSuccess beginFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window,
|
||||
const bool stereoVisual, const GHOST_TUns16 numOfAASamples=0);
|
||||
const bool stereoVisual);
|
||||
|
||||
/**
|
||||
* Ends full screen mode.
|
||||
|
@ -276,7 +276,7 @@ public:
|
|||
* @return Returns the clipboard data
|
||||
*
|
||||
*/
|
||||
virtual GHOST_TUns8* getClipboard(bool selection) const = 0;
|
||||
virtual GHOST_TUns8* getClipboard(bool selection) const = 0;
|
||||
|
||||
/**
|
||||
* Put data to the Clipboard
|
||||
|
@ -305,7 +305,7 @@ protected:
|
|||
* @return Indication of success.
|
||||
*/
|
||||
virtual GHOST_TSuccess createFullScreenWindow(GHOST_Window** window,
|
||||
const bool stereoVisual, const GHOST_TUns16 numOfAASamples=0);
|
||||
const bool stereoVisual);
|
||||
|
||||
/** The display manager (platform dependant). */
|
||||
GHOST_DisplayManager* m_displayManager;
|
||||
|
|
|
@ -875,24 +875,25 @@ bool GHOST_SystemCocoa::processEvents(bool waitForEvent)
|
|||
/*do {
|
||||
GHOST_TimerManager* timerMgr = getTimerManager();
|
||||
|
||||
if (waitForEvent) {
|
||||
GHOST_TUns64 next = timerMgr->nextFireTime();
|
||||
double timeOut;
|
||||
|
||||
if (next == GHOST_kFireTimeNever) {
|
||||
timeOut = kEventDurationForever;
|
||||
} else {
|
||||
timeOut = (double)(next - getMilliSeconds())/1000.0;
|
||||
if (timeOut < 0.0)
|
||||
timeOut = 0.0;
|
||||
}
|
||||
|
||||
::ReceiveNextEvent(0, NULL, timeOut, false, &event);
|
||||
}
|
||||
|
||||
if (timerMgr->fireTimers(getMilliSeconds())) {
|
||||
anyProcessed = true;
|
||||
}*/
|
||||
if (waitForEvent) {
|
||||
GHOST_TUns64 next = timerMgr->nextFireTime();
|
||||
double timeOut;
|
||||
|
||||
if (next == GHOST_kFireTimeNever) {
|
||||
timeOut = kEventDurationForever;
|
||||
} else {
|
||||
timeOut = (double)(next - getMilliSeconds())/1000.0;
|
||||
if (timeOut < 0.0)
|
||||
timeOut = 0.0;
|
||||
}
|
||||
|
||||
::ReceiveNextEvent(0, NULL, timeOut, false, &event);
|
||||
}
|
||||
|
||||
if (timerMgr->fireTimers(getMilliSeconds())) {
|
||||
anyProcessed = true;
|
||||
}
|
||||
*/
|
||||
|
||||
do {
|
||||
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
|
||||
|
|
|
@ -68,12 +68,12 @@ public:
|
|||
* Determine the directory of the current binary
|
||||
* @return Unsigned char string pointing to the binary dir
|
||||
*/
|
||||
virtual const GHOST_TUns8* getBinaryDir() const = 0;
|
||||
virtual const GHOST_TUns8* getBinaryDir() const = 0;
|
||||
|
||||
/**
|
||||
* Add the file to the operating system most recently used files
|
||||
*/
|
||||
virtual void addToSystemRecentFiles(const char* filename) const = 0;
|
||||
/**
|
||||
* Add the file to the operating system most recently used files
|
||||
*/
|
||||
virtual void addToSystemRecentFiles(const char* filename) const = 0;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -70,12 +70,12 @@ public:
|
|||
* Determine the directory of the current binary
|
||||
* @return Unsigned char string pointing to the binary dir
|
||||
*/
|
||||
virtual const GHOST_TUns8* getBinaryDir() const;
|
||||
virtual const GHOST_TUns8* getBinaryDir() const;
|
||||
|
||||
/**
|
||||
* Add the file to the operating system most recently used files
|
||||
*/
|
||||
void addToSystemRecentFiles(const char* filename) const;
|
||||
/**
|
||||
* Add the file to the operating system most recently used files
|
||||
*/
|
||||
void addToSystemRecentFiles(const char* filename) const;
|
||||
};
|
||||
|
||||
#endif // _GHOST_SYSTEM_COCOA_H_
|
||||
|
|
|
@ -74,18 +74,18 @@ public:
|
|||
* If needed, it will create the base directory.
|
||||
* @return Unsigned char string pointing to user dir (eg ~/).
|
||||
*/
|
||||
const GHOST_TUns8* getUserDir() const;
|
||||
const GHOST_TUns8* getUserDir() const;
|
||||
|
||||
/**
|
||||
* Determine the directory of the current binary
|
||||
* @return Unsigned char string pointing to the binary dir
|
||||
*/
|
||||
const GHOST_TUns8* getBinaryDir() const;
|
||||
/**
|
||||
* Determine the directory of the current binary
|
||||
* @return Unsigned char string pointing to the binary dir
|
||||
*/
|
||||
const GHOST_TUns8* getBinaryDir() const;
|
||||
|
||||
/**
|
||||
* Add the file to the operating system most recently used files
|
||||
*/
|
||||
void addToSystemRecentFiles(const char* filename) const;
|
||||
/**
|
||||
* Add the file to the operating system most recently used files
|
||||
*/
|
||||
void addToSystemRecentFiles(const char* filename) const;
|
||||
};
|
||||
|
||||
#endif // _GHOST_SYSTEM_PATHS_WIN32_H_
|
||||
|
|
|
@ -68,12 +68,12 @@ public:
|
|||
* Determine the directory of the current binary
|
||||
* @return Unsigned char string pointing to the binary dir
|
||||
*/
|
||||
const GHOST_TUns8* getBinaryDir() const;
|
||||
const GHOST_TUns8* getBinaryDir() const;
|
||||
|
||||
/**
|
||||
* Add the file to the operating system most recently used files
|
||||
*/
|
||||
void addToSystemRecentFiles(const char* filename) const;
|
||||
/**
|
||||
* Add the file to the operating system most recently used files
|
||||
*/
|
||||
void addToSystemRecentFiles(const char* filename) const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -304,14 +304,15 @@ static void SleepTillEvent(Display *display, GHOST_TInt64 maxSleep) {
|
|||
FD_SET(fd, &fds);
|
||||
|
||||
if (maxSleep == -1) {
|
||||
select(fd + 1, &fds, NULL, NULL, NULL);
|
||||
} else {
|
||||
select(fd + 1, &fds, NULL, NULL, NULL);
|
||||
}
|
||||
else {
|
||||
timeval tv;
|
||||
|
||||
tv.tv_sec = maxSleep/1000;
|
||||
tv.tv_usec = (maxSleep - tv.tv_sec*1000)*1000;
|
||||
|
||||
select(fd + 1, &fds, NULL, NULL, &tv);
|
||||
select(fd + 1, &fds, NULL, NULL, &tv);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -218,8 +218,8 @@ public:
|
|||
|
||||
/* Helped function for get data from the clipboard. */
|
||||
void getClipboard_xcout(XEvent evt, Atom sel, Atom target,
|
||||
unsigned char **txt, unsigned long *len,
|
||||
unsigned int *context) const;
|
||||
unsigned char **txt, unsigned long *len,
|
||||
unsigned int *context) const;
|
||||
|
||||
/**
|
||||
* Returns unsinged char from CUT_BUFFER0
|
||||
|
|
|
@ -1046,9 +1046,9 @@ GHOST_TSuccess GHOST_WindowWin32::setWindowCursorGrab(GHOST_TGrabCursorMode mode
|
|||
/* use to generate a mouse move event, otherwise the last event
|
||||
* blender gets can be outside the screen causing menus not to show
|
||||
* properly unless the user moves the mouse */
|
||||
GHOST_TInt32 pos[2];
|
||||
m_system->getCursorPosition(pos[0], pos[1]);
|
||||
m_system->setCursorPosition(pos[0], pos[1]);
|
||||
GHOST_TInt32 pos[2];
|
||||
m_system->getCursorPosition(pos[0], pos[1]);
|
||||
m_system->setCursorPosition(pos[0], pos[1]);
|
||||
}
|
||||
|
||||
/* Almost works without but important otherwise the mouse GHOST location can be incorrect on exit */
|
||||
|
|
|
@ -689,7 +689,7 @@ int main(int /*argc*/, char** /*argv*/)
|
|||
//DWORD keyValue;
|
||||
// lresult = regkey.Open(HKEY_LOCAL_MACHINE, "SOFTWARE\\NVIDIA Corporation\\Global\\Stereo3D\\StereoEnable");
|
||||
lresult = regkey.Open(HKEY_LOCAL_MACHINE, "SOFTWARE\\NVIDIA Corporation\\Global\\Stereo3D\\StereoEnable",
|
||||
KEY_ALL_ACCESS );
|
||||
KEY_ALL_ACCESS);
|
||||
|
||||
if(lresult == ERROR_SUCCESS)
|
||||
printf("Succesfully opened key\n");
|
||||
|
|
|
@ -115,7 +115,7 @@ private:
|
|||
|
||||
T * data;
|
||||
int refcount;
|
||||
typename std::list<MEM_CacheLimiterHandle<T> *,
|
||||
typename std::list<MEM_CacheLimiterHandle<T> *,
|
||||
MEM_Allocator<MEM_CacheLimiterHandle<T> *> >::iterator me;
|
||||
MEM_CacheLimiter<T> * parent;
|
||||
};
|
||||
|
@ -160,7 +160,8 @@ public:
|
|||
}
|
||||
|
||||
for (iterator it = queue.begin();
|
||||
it != queue.end() && mem_in_use > max;) {
|
||||
it != queue.end() && mem_in_use > max;)
|
||||
{
|
||||
iterator jt = it;
|
||||
++it;
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ struct my_data {
|
|||
};
|
||||
|
||||
void plugin_seq_doit(Cast *, float, float, int, int,
|
||||
ImBuf *, ImBuf *, ImBuf *, ImBuf *);
|
||||
ImBuf *, ImBuf *, ImBuf *, ImBuf *);
|
||||
|
||||
int plugin_seq_getversion(void) { return B_PLUGIN_VERSION;}
|
||||
|
||||
|
|
|
@ -117,13 +117,13 @@ void plugin_seq_doit(Cast *cast, float facf0, float facf1, int width,
|
|||
src1= (unsigned char *) ibuf1->rect;
|
||||
|
||||
make_gamma_table(cast->setup_m, cast->gain_m, cast->gamma_m,
|
||||
gamma_table_m);
|
||||
gamma_table_m);
|
||||
make_gamma_table(cast->setup_r, cast->gain_r, cast->gamma_r,
|
||||
gamma_table_r);
|
||||
gamma_table_r);
|
||||
make_gamma_table(cast->setup_g, cast->gain_g, cast->gamma_g,
|
||||
gamma_table_g);
|
||||
gamma_table_g);
|
||||
make_gamma_table(cast->setup_b, cast->gain_b, cast->gamma_b,
|
||||
gamma_table_b);
|
||||
gamma_table_b);
|
||||
|
||||
for (y = 0; y < height; y++) {
|
||||
for (x = 0; x < width; x++) {
|
||||
|
|
|
@ -731,9 +731,9 @@ AviError AVI_open_compress (char *name, AviMovie *movie, int streams, ...) {
|
|||
movie->header->fcc = FCC("avih");
|
||||
movie->header->size = 56;
|
||||
movie->header->MicroSecPerFrame = 66667;
|
||||
movie->header->MaxBytesPerSec = 0;
|
||||
movie->header->PaddingGranularity = 0;
|
||||
movie->header->Flags = AVIF_HASINDEX | AVIF_MUSTUSEINDEX;
|
||||
movie->header->MaxBytesPerSec = 0;
|
||||
movie->header->PaddingGranularity = 0;
|
||||
movie->header->Flags = AVIF_HASINDEX | AVIF_MUSTUSEINDEX;
|
||||
movie->header->TotalFrames = 0;
|
||||
movie->header->InitialFrames = 0;
|
||||
movie->header->Streams = streams;
|
||||
|
|
|
@ -347,7 +347,7 @@ void DM_init_funcs(DerivedMesh *dm);
|
|||
* sets up the custom data layers)
|
||||
*/
|
||||
void DM_init(DerivedMesh *dm, DerivedMeshType type,
|
||||
int numVerts, int numEdges, int numFaces);
|
||||
int numVerts, int numEdges, int numFaces);
|
||||
|
||||
/* utility function to initialise a DerivedMesh for the desired number
|
||||
* of vertices, edges and faces, with a layer setup copied from source
|
||||
|
|
|
@ -44,19 +44,19 @@ struct bmFont;
|
|||
void printfGlyph(struct bmGlyph * glyph);
|
||||
void calcAlpha(struct ImBuf * ibuf);
|
||||
void readBitmapFontVersion0(struct ImBuf * ibuf,
|
||||
unsigned char * rect,
|
||||
int step);
|
||||
unsigned char * rect,
|
||||
int step);
|
||||
void detectBitmapFont(struct ImBuf *ibuf);
|
||||
int locateGlyph(struct bmFont *bmfont, unsigned short unicode);
|
||||
void matrixGlyph(struct ImBuf * ibuf, unsigned short unicode,
|
||||
float *centerx, float *centery,
|
||||
float *sizex, float *sizey,
|
||||
float *transx, float *transy,
|
||||
float *movex, float *movey, float *advance);
|
||||
float *centerx, float *centery,
|
||||
float *sizex, float *sizey,
|
||||
float *transx, float *transy,
|
||||
float *movex, float *movey, float *advance);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ void initElbeemMesh(struct Scene *scene, struct Object *ob,
|
|||
|
||||
/* bounding box & memory estimate */
|
||||
void fluid_get_bb(struct MVert *mvert, int totvert, float obmat[][4],
|
||||
float start[3], float size[3]);
|
||||
float start[3], float size[3]);
|
||||
|
||||
void fluid_estimate_memory(struct Object *ob, struct FluidsimSettings *fss, char *value);
|
||||
|
||||
|
|
|
@ -128,9 +128,9 @@ typedef struct IndexNode {
|
|||
int index;
|
||||
} IndexNode;
|
||||
void create_vert_face_map(ListBase **map, IndexNode **mem, const struct MFace *mface,
|
||||
const int totvert, const int totface);
|
||||
const int totvert, const int totface);
|
||||
void create_vert_edge_map(ListBase **map, IndexNode **mem, const struct MEdge *medge,
|
||||
const int totvert, const int totedge);
|
||||
const int totvert, const int totedge);
|
||||
|
||||
/* Partial Mesh Visibility */
|
||||
struct PartialVisibility *mesh_pmv_copy(struct PartialVisibility *);
|
||||
|
|
|
@ -91,7 +91,7 @@ typedef struct SculptSession {
|
|||
unsigned int texcache_side, *texcache, texcache_actual;
|
||||
|
||||
/* Layer brush persistence between strokes */
|
||||
float (*layer_co)[3]; /* Copy of the mesh vertices' locations */
|
||||
float (*layer_co)[3]; /* Copy of the mesh vertices' locations */
|
||||
|
||||
struct SculptStroke *stroke;
|
||||
struct StrokeCache *cache;
|
||||
|
|
|
@ -198,8 +198,8 @@ int input_have_to_preprocess(
|
|||
SeqRenderData context, struct Sequence * seq, float cfra);
|
||||
|
||||
void seq_proxy_rebuild(struct Main * bmain,
|
||||
struct Scene *scene, struct Sequence * seq,
|
||||
short *stop, short *do_update, float *progress);
|
||||
struct Scene *scene, struct Sequence * seq,
|
||||
short *stop, short *do_update, float *progress);
|
||||
|
||||
|
||||
/* **********************************************************************
|
||||
|
|
|
@ -333,7 +333,7 @@ void brush_reset_sculpt(Brush *br)
|
|||
/* enable this to see any non-default
|
||||
settings used by a brush:
|
||||
|
||||
brush_debug_print_state(br);
|
||||
brush_debug_print_state(br);
|
||||
*/
|
||||
|
||||
brush_set_defaults(br);
|
||||
|
|
|
@ -231,7 +231,7 @@ static struct PBVH *cdDM_getPBVH(Object *ob, DerivedMesh *dm)
|
|||
cddm->pbvh = BLI_pbvh_new();
|
||||
cddm->pbvh_draw = can_pbvh_draw(ob, dm);
|
||||
BLI_pbvh_build_mesh(cddm->pbvh, me->mface, me->mvert,
|
||||
me->totface, me->totvert);
|
||||
me->totface, me->totvert);
|
||||
|
||||
if(ss->modifiers_active && ob->derivedDeform) {
|
||||
DerivedMesh *deformdm= ob->derivedDeform;
|
||||
|
|
|
@ -60,9 +60,9 @@ double tval( void )
|
|||
}
|
||||
#else
|
||||
#include <sys/time.h>
|
||||
static struct timeval _tstart, _tend;
|
||||
static struct timezone tz;
|
||||
void tstart ( void )
|
||||
static struct timeval _tstart, _tend;
|
||||
static struct timezone tz;
|
||||
void tstart ( void )
|
||||
{
|
||||
gettimeofday ( &_tstart, &tz );
|
||||
}
|
||||
|
|
|
@ -67,8 +67,8 @@
|
|||
|
||||
/* local */
|
||||
static int cu_isectLL(float *v1, float *v2, float *v3, float *v4,
|
||||
short cox, short coy,
|
||||
float *labda, float *mu, float *vec);
|
||||
short cox, short coy,
|
||||
float *labda, float *mu, float *vec);
|
||||
|
||||
void unlink_curve(Curve *cu)
|
||||
{
|
||||
|
|
|
@ -90,7 +90,7 @@ typedef struct LayerTypeInfo {
|
|||
* count gives the number of elements in sources
|
||||
*/
|
||||
void (*interp)(void **sources, float *weights, float *sub_weights,
|
||||
int count, void *dest);
|
||||
int count, void *dest);
|
||||
|
||||
/* a function to swap the data in corners of the element */
|
||||
void (*swap)(void *data, const int *corner_indices);
|
||||
|
|
|
@ -1148,8 +1148,8 @@ void graph_bfs(void)
|
|||
set_node_xy(node, node->BFS_dist*DEPSX*2, pos[node->BFS_dist]*DEPSY*2);
|
||||
node->color = DAG_BLACK;
|
||||
/*
|
||||
fprintf(stderr,"BFS node : %20s %i %5.0f %5.0f\n",((ID *) node->ob)->name,node->BFS_dist, node->x, node->y);
|
||||
*/
|
||||
fprintf(stderr,"BFS node : %20s %i %5.0f %5.0f\n",((ID *) node->ob)->name,node->BFS_dist, node->x, node->y);
|
||||
*/
|
||||
}
|
||||
}
|
||||
queue_delete(nqueue);
|
||||
|
@ -1208,8 +1208,8 @@ int pre_and_post_source_BFS(DagForest *dag, short mask, DagNode *source, graph_a
|
|||
post_func(node->ob,data);
|
||||
node->color = DAG_BLACK;
|
||||
/*
|
||||
fprintf(stderr,"BFS node : %20s %i %5.0f %5.0f\n",((ID *) node->ob)->name,node->BFS_dist, node->x, node->y);
|
||||
*/
|
||||
fprintf(stderr,"BFS node : %20s %i %5.0f %5.0f\n",((ID *) node->ob)->name,node->BFS_dist, node->x, node->y);
|
||||
*/
|
||||
}
|
||||
}
|
||||
queue_delete(nqueue);
|
||||
|
@ -1325,7 +1325,7 @@ DagNodeQueue * graph_dfs(void)
|
|||
set_node_xy(node, node->DFS_dist*DEPSX*2, pos[node->DFS_dist]*DEPSY*2);
|
||||
|
||||
/*
|
||||
fprintf(stderr,"DFS node : %20s %i %i %i %i\n",((ID *) node->ob)->name,node->BFS_dist, node->DFS_dist, node->DFS_dvtm, node->DFS_fntm );
|
||||
fprintf(stderr,"DFS node : %20s %i %i %i %i\n",((ID *) node->ob)->name,node->BFS_dist, node->DFS_dist, node->DFS_dvtm, node->DFS_fntm );
|
||||
*/
|
||||
push_stack(retqueue,node);
|
||||
|
||||
|
@ -1574,7 +1574,7 @@ int is_acyclic( DagForest *dag) {
|
|||
|
||||
void set_node_xy(DagNode *node, float x, float y)
|
||||
{
|
||||
node->x = x;
|
||||
node->x = x;
|
||||
node->y = y;
|
||||
}
|
||||
|
||||
|
|
|
@ -79,9 +79,9 @@ double itval(void)
|
|||
// #include <pmmintrin.h>
|
||||
// #include <pthread.h>
|
||||
|
||||
static struct timeval _itstart, _itend;
|
||||
static struct timezone itz;
|
||||
void itstart(void)
|
||||
static struct timeval _itstart, _itend;
|
||||
static struct timezone itz;
|
||||
void itstart(void)
|
||||
{
|
||||
gettimeofday(&_itstart, &itz);
|
||||
}
|
||||
|
|
|
@ -671,10 +671,10 @@ static ID *alloc_libblock_notest(short type)
|
|||
break;
|
||||
case ID_PA:
|
||||
id = MEM_callocN(sizeof(ParticleSettings), "ParticleSettings");
|
||||
break;
|
||||
break;
|
||||
case ID_WM:
|
||||
id = MEM_callocN(sizeof(wmWindowManager), "Window manager");
|
||||
break;
|
||||
break;
|
||||
case ID_GD:
|
||||
id = MEM_callocN(sizeof(bGPdata), "Grease Pencil");
|
||||
break;
|
||||
|
|
|
@ -776,7 +776,7 @@ void *new_pgn_element(int size)
|
|||
if(cur) {
|
||||
if(size+offs < blocksize) {
|
||||
adr= (void *) (cur->data+offs);
|
||||
offs+= size;
|
||||
offs+= size;
|
||||
return adr;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1147,10 +1147,10 @@ static MultiresFace *find_old_face(ListBase *map, MultiresFace *faces, int v1, i
|
|||
IndexNode *n1;
|
||||
int v[4], i, j;
|
||||
|
||||
v[0]= v1;
|
||||
v[1]= v2;
|
||||
v[2]= v3;
|
||||
v[3]= v4;
|
||||
v[0]= v1;
|
||||
v[1]= v2;
|
||||
v[2]= v3;
|
||||
v[3]= v4;
|
||||
|
||||
for(n1 = map[v1].first; n1; n1 = n1->next) {
|
||||
int fnd[4] = {0, 0, 0, 0};
|
||||
|
|
|
@ -961,8 +961,8 @@ void ntreeSetOutput(bNodeTree *ntree)
|
|||
|
||||
/* we need a check for which output node should be tagged like this, below an exception */
|
||||
if(node->type==CMP_NODE_OUTPUT_FILE)
|
||||
continue;
|
||||
|
||||
continue;
|
||||
|
||||
/* there is more types having output class, each one is checked */
|
||||
for(tnode= ntree->nodes.first; tnode; tnode= tnode->next) {
|
||||
if(tnode->typeinfo->nclass==NODE_CLASS_OUTPUT) {
|
||||
|
|
|
@ -1127,7 +1127,7 @@ static PTCacheFile *ptcache_file_open(PTCacheID *pid, int mode, int cfra)
|
|||
if (!BLI_exists(filename)) {
|
||||
return NULL;
|
||||
}
|
||||
fp = fopen(filename, "rb");
|
||||
fp = fopen(filename, "rb");
|
||||
} else if (mode==PTCACHE_FILE_WRITE) {
|
||||
BLI_make_existing_file(filename); /* will create the dir if needs be, same as //textures is created */
|
||||
fp = fopen(filename, "wb");
|
||||
|
|
|
@ -2144,7 +2144,7 @@ static struct ImBuf * do_transform_effect(
|
|||
struct ImBuf * out = prepare_effect_imbufs(context,ibuf1, ibuf2, ibuf3);
|
||||
|
||||
do_transform(context.scene, seq, facf0,
|
||||
context.rectx, context.recty, ibuf1, out);
|
||||
context.rectx, context.recty, ibuf1, out);
|
||||
|
||||
return out;
|
||||
}
|
||||
|
@ -2541,7 +2541,7 @@ static void RVIsolateHighlights_byte (unsigned char* in, unsigned char* out,
|
|||
|
||||
for(y=0;y< height;y++) {
|
||||
for (x=0;x< width;x++) {
|
||||
index= (x+y*width)*4;
|
||||
index= (x+y*width)*4;
|
||||
|
||||
/* Isolate the intensity */
|
||||
intensity=(in[index+GlowR]+in[index+GlowG]+in[index+GlowB]-threshold);
|
||||
|
@ -2570,7 +2570,7 @@ static void RVIsolateHighlights_float (float* in, float* out,
|
|||
|
||||
for(y=0;y< height;y++) {
|
||||
for (x=0;x< width;x++) {
|
||||
index= (x+y*width)*4;
|
||||
index= (x+y*width)*4;
|
||||
|
||||
/* Isolate the intensity */
|
||||
intensity=(in[index+GlowR]+in[index+GlowG]+in[index+GlowB]-threshold);
|
||||
|
|
|
@ -1160,13 +1160,13 @@ static void seq_open_anim_file(Sequence * seq)
|
|||
return;
|
||||
}
|
||||
|
||||
BLI_join_dirfile(name, sizeof(name),
|
||||
seq->strip->dir, seq->strip->stripdata->name);
|
||||
BLI_join_dirfile(name, sizeof(name),
|
||||
seq->strip->dir, seq->strip->stripdata->name);
|
||||
BLI_path_abs(name, G.main->name);
|
||||
|
||||
seq->anim = openanim(name, IB_rect |
|
||||
((seq->flag & SEQ_FILTERY) ?
|
||||
IB_animdeinterlace : 0), seq->streamindex);
|
||||
((seq->flag & SEQ_FILTERY) ?
|
||||
IB_animdeinterlace : 0), seq->streamindex);
|
||||
|
||||
if (seq->anim == NULL) {
|
||||
return;
|
||||
|
@ -1211,8 +1211,8 @@ static int seq_proxy_get_fname(SeqRenderData context, Sequence * seq, int cfra,
|
|||
}
|
||||
|
||||
if (seq->flag & SEQ_USE_PROXY_CUSTOM_FILE) {
|
||||
BLI_join_dirfile(name, PROXY_MAXFILE,
|
||||
dir, seq->strip->proxy->file);
|
||||
BLI_join_dirfile(name, PROXY_MAXFILE,
|
||||
dir, seq->strip->proxy->file);
|
||||
BLI_path_abs(name, G.main->name);
|
||||
|
||||
return TRUE;
|
||||
|
@ -1227,14 +1227,13 @@ static int seq_proxy_get_fname(SeqRenderData context, Sequence * seq, int cfra,
|
|||
|
||||
if (seq->type == SEQ_IMAGE) {
|
||||
BLI_snprintf(name, PROXY_MAXFILE, "%s/images/%d/%s_proxy", dir,
|
||||
context.preview_render_size,
|
||||
give_stripelem(seq, cfra)->name);
|
||||
context.preview_render_size,
|
||||
give_stripelem(seq, cfra)->name);
|
||||
frameno = 1;
|
||||
} else {
|
||||
frameno = (int) give_stripelem_index(seq, cfra)
|
||||
+ seq->anim_startofs;
|
||||
frameno = (int) give_stripelem_index(seq, cfra) + seq->anim_startofs;
|
||||
BLI_snprintf(name, PROXY_MAXFILE, "%s/proxy_misc/%d/####", dir,
|
||||
context.preview_render_size);
|
||||
context.preview_render_size);
|
||||
}
|
||||
|
||||
BLI_path_abs(name, G.main->name);
|
||||
|
@ -1504,7 +1503,7 @@ static void color_balance_byte_byte(Sequence * seq, ImBuf* ibuf, float mul)
|
|||
|
||||
for (c = 0; c < 3; c++) {
|
||||
make_cb_table_byte(cb.lift[c], cb.gain[c], cb.gamma[c],
|
||||
cb_tab[c], mul);
|
||||
cb_tab[c], mul);
|
||||
}
|
||||
|
||||
while (p < e) {
|
||||
|
@ -1847,14 +1846,14 @@ static ImBuf* seq_render_effect_strip_impl(
|
|||
|
||||
switch (early_out) {
|
||||
case EARLY_NO_INPUT:
|
||||
out = sh.execute(context, seq, cfra, fac, facf,
|
||||
NULL, NULL, NULL);
|
||||
out = sh.execute(context, seq, cfra, fac, facf,
|
||||
NULL, NULL, NULL);
|
||||
break;
|
||||
case EARLY_DO_EFFECT:
|
||||
for(i=0; i<3; i++) {
|
||||
if(input[i])
|
||||
ibuf[i] = seq_render_strip(
|
||||
context, input[i], cfra);
|
||||
context, input[i], cfra);
|
||||
}
|
||||
|
||||
if (ibuf[0] && ibuf[1]) {
|
||||
|
@ -2909,7 +2908,7 @@ int seq_single_check(Sequence *seq)
|
|||
return (seq->len==1 && (
|
||||
seq->type == SEQ_IMAGE
|
||||
|| ((seq->type & SEQ_EFFECT) &&
|
||||
get_sequence_effect_num_inputs(seq->type) == 0)));
|
||||
get_sequence_effect_num_inputs(seq->type) == 0)));
|
||||
}
|
||||
|
||||
/* check if the selected seq's reference unselected seq's */
|
||||
|
|
|
@ -561,7 +561,7 @@ static void ccd_build_deflector_hash(Scene *scene, Object *vertexowner, GHash *h
|
|||
}/*--- only with deflecting set */
|
||||
|
||||
}/* mesh && layer*/
|
||||
base = base->next;
|
||||
base = base->next;
|
||||
} /* while (base) */
|
||||
}
|
||||
|
||||
|
@ -589,7 +589,7 @@ static void ccd_update_deflector_hash(Scene *scene, Object *vertexowner, GHash *
|
|||
}/*--- only with deflecting set */
|
||||
|
||||
}/* mesh && layer*/
|
||||
base = base->next;
|
||||
base = base->next;
|
||||
} /* while (base) */
|
||||
}
|
||||
|
||||
|
@ -3356,7 +3356,7 @@ static void mesh_to_softbody(Scene *scene, Object *ob)
|
|||
build_bps_springlist(ob); /* yes we need to do it again*/
|
||||
}
|
||||
springs_from_mesh(ob); /* write the 'rest'-length of the springs */
|
||||
if (ob->softflag & OB_SB_SELF) {calculate_collision_balls(ob);}
|
||||
if (ob->softflag & OB_SB_SELF) {calculate_collision_balls(ob);}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -343,8 +343,8 @@ static AVFrame* generate_video_frame(uint8_t* pixels, ReportList *reports)
|
|||
|
||||
if (c->pix_fmt != PIX_FMT_BGR32) {
|
||||
sws_scale(img_convert_ctx, (const uint8_t * const*) rgb_frame->data,
|
||||
rgb_frame->linesize, 0, c->height,
|
||||
current_frame->data, current_frame->linesize);
|
||||
rgb_frame->linesize, 0, c->height,
|
||||
current_frame->data, current_frame->linesize);
|
||||
delete_picture(rgb_frame);
|
||||
}
|
||||
return current_frame;
|
||||
|
|
|
@ -63,7 +63,7 @@ extern "C" {
|
|||
/* Match STRING against the filename pattern PATTERN,
|
||||
returning zero if it matches, FNM_NOMATCH if not. */
|
||||
extern int fnmatch __P ((const char *__pattern, const char *__string,
|
||||
int __flags));
|
||||
int __flags));
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@ void BLI_pbvh_search_gather(PBVH *bvh,
|
|||
hit first */
|
||||
|
||||
void BLI_pbvh_raycast(PBVH *bvh, BLI_pbvh_HitOccludedCallback cb, void *data,
|
||||
float ray_start[3], float ray_normal[3], int original);
|
||||
float ray_start[3], float ray_normal[3], int original);
|
||||
int BLI_pbvh_node_raycast(PBVH *bvh, PBVHNode *node, float (*origco)[3],
|
||||
float ray_start[3], float ray_normal[3], float *dist);
|
||||
|
||||
|
|
|
@ -47,13 +47,13 @@ typedef struct VFontData {
|
|||
// float resol[MAX_VF_CHARS];
|
||||
// float width[MAX_VF_CHARS];
|
||||
// float *points[MAX_VF_CHARS];
|
||||
char name[128];
|
||||
char name[128];
|
||||
} VFontData;
|
||||
|
||||
typedef struct VChar {
|
||||
struct VChar *next, *prev;
|
||||
ListBase nurbsbase;
|
||||
intptr_t index;
|
||||
ListBase nurbsbase;
|
||||
intptr_t index;
|
||||
float resol;
|
||||
float width;
|
||||
float *points;
|
||||
|
|
|
@ -62,8 +62,10 @@ struct Heap {
|
|||
#define HEAP_COMPARE(a, b) (a->value < b->value)
|
||||
#define HEAP_EQUALS(a, b) (a->value == b->value)
|
||||
#define HEAP_SWAP(heap, i, j) \
|
||||
{ SWAP(int, heap->tree[i]->index, heap->tree[j]->index); \
|
||||
SWAP(HeapNode*, heap->tree[i], heap->tree[j]); }
|
||||
{ \
|
||||
SWAP(int, heap->tree[i]->index, heap->tree[j]->index); \
|
||||
SWAP(HeapNode*, heap->tree[i], heap->tree[j]); \
|
||||
}
|
||||
|
||||
/***/
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ void BLI_edgehash_insert(EdgeHash *eh, int v0, int v1, void *val) {
|
|||
v1 ^= v0;
|
||||
v0 ^= v1;
|
||||
}
|
||||
hash = EDGEHASH(v0,v1)%eh->nbuckets;
|
||||
hash = EDGEHASH(v0,v1)%eh->nbuckets;
|
||||
|
||||
e->v0 = v0;
|
||||
e->v1 = v1;
|
||||
|
|
|
@ -507,13 +507,13 @@ static void build_sub(PBVH *bvh, int node_index, BB *cb, BBC *prim_bbc,
|
|||
bvh->nodes[node_index].orig_vb= bvh->nodes[node_index].vb;
|
||||
|
||||
end = partition_indices(bvh->prim_indices, offset, offset + count - 1,
|
||||
axis,
|
||||
(cb->bmax[axis] + cb->bmin[axis]) * 0.5f,
|
||||
prim_bbc);
|
||||
axis,
|
||||
(cb->bmax[axis] + cb->bmin[axis]) * 0.5f,
|
||||
prim_bbc);
|
||||
check_partitioning(bvh->prim_indices, offset, offset + count - 1,
|
||||
axis,
|
||||
(cb->bmax[axis] + cb->bmin[axis]) * 0.5f,
|
||||
prim_bbc, end);
|
||||
axis,
|
||||
(cb->bmax[axis] + cb->bmin[axis]) * 0.5f,
|
||||
prim_bbc, end);
|
||||
|
||||
build_sub(bvh, bvh->nodes[node_index].children_offset, NULL,
|
||||
prim_bbc, offset, end - offset);
|
||||
|
|
|
@ -165,7 +165,7 @@ static void *new_mem_element(int size)
|
|||
if(cur) {
|
||||
if(size+offs < blocksize) {
|
||||
adr= (void *) (cur->data+offs);
|
||||
offs+= size;
|
||||
offs+= size;
|
||||
return adr;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1554,14 +1554,14 @@ static void IDP_DirectLinkProperty(IDProperty *prop, int switch_endian, FileData
|
|||
IDP_DirectLinkIDPArray(prop, switch_endian, fd);
|
||||
break;
|
||||
case IDP_DOUBLE:
|
||||
/*erg, stupid doubles. since I'm storing them
|
||||
in the same field as int val; val2 in the
|
||||
IDPropertyData struct, they have to deal with
|
||||
endianness specifically
|
||||
|
||||
in theory, val and val2 would've already been swapped
|
||||
if switch_endian is true, so we have to first unswap
|
||||
them then reswap them as a single 64-bit entity.
|
||||
/* erg, stupid doubles. since I'm storing them
|
||||
* in the same field as int val; val2 in the
|
||||
* IDPropertyData struct, they have to deal with
|
||||
* endianness specifically
|
||||
|
||||
* in theory, val and val2 would've already been swapped
|
||||
* if switch_endian is true, so we have to first unswap
|
||||
* them then reswap them as a single 64-bit entity.
|
||||
*/
|
||||
|
||||
if (switch_endian) {
|
||||
|
@ -3567,8 +3567,8 @@ static void lib_link_mtface(FileData *fd, Mesh *me, MTFace *mtface, int totface)
|
|||
int i;
|
||||
|
||||
/* Add pseudo-references (not fake users!) to images used by texface. A
|
||||
little bogus; it would be better if each mesh consistently added one ref
|
||||
to each image it used. - z0r */
|
||||
* little bogus; it would be better if each mesh consistently added one ref
|
||||
* to each image it used. - z0r */
|
||||
for (i=0; i<totface; i++, tf++) {
|
||||
tf->tpage= newlibadr(fd, me->id.lib, tf->tpage);
|
||||
if(tf->tpage && tf->tpage->id.us==0)
|
||||
|
@ -3769,7 +3769,7 @@ static void direct_link_mesh(FileData *fd, Mesh *mesh)
|
|||
}
|
||||
|
||||
/* if multires is present but has no valid vertex data,
|
||||
there's no way to recover it; silently remove multires */
|
||||
* there's no way to recover it; silently remove multires */
|
||||
if(mesh->mr && !mesh->mr->verts) {
|
||||
multires_free(mesh->mr);
|
||||
mesh->mr = NULL;
|
||||
|
@ -8844,7 +8844,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
|||
|
||||
/* make sure old cameras have title safe on */
|
||||
if (!(cam->flag & CAM_SHOWTITLESAFE))
|
||||
cam->flag |= CAM_SHOWTITLESAFE;
|
||||
cam->flag |= CAM_SHOWTITLESAFE;
|
||||
|
||||
/* set an appropriate camera passepartout alpha */
|
||||
if (!(cam->passepartalpha)) cam->passepartalpha = 0.2f;
|
||||
|
@ -9141,7 +9141,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
|||
|
||||
for(group= main->group.first; group; group= group->id.next)
|
||||
if(group->layer==0)
|
||||
group->layer= (1<<20)-1;
|
||||
group->layer= (1<<20)-1;
|
||||
|
||||
/* History fix (python?), shape key adrcode numbers have to be sorted */
|
||||
sort_shape_fix(main);
|
||||
|
|
|
@ -267,7 +267,7 @@ void ArmatureExporter::export_controller(Object* ob, Object *ob_arm)
|
|||
std::string controller_id = get_controller_id(ob_arm, ob);
|
||||
|
||||
openSkin(controller_id, controller_name,
|
||||
COLLADABU::URI(COLLADABU::Utils::EMPTY_STRING, get_geometry_id(ob)));
|
||||
COLLADABU::URI(COLLADABU::Utils::EMPTY_STRING, get_geometry_id(ob)));
|
||||
|
||||
add_bind_shape_mat(ob);
|
||||
|
||||
|
|
|
@ -112,8 +112,7 @@ void ArmatureImporter::create_unskinned_bone( COLLADAFW::Node *node, EditBone *p
|
|||
bone->roll=angle;
|
||||
// set head
|
||||
copy_v3_v3(bone->head, mat[3]);
|
||||
|
||||
|
||||
|
||||
// set tail, don't set it to head because 0-length bones are not allowed
|
||||
float vec[3] = {0.0f, 0.5f, 0.0f};
|
||||
add_v3_v3v3(bone->tail, bone->head, vec);
|
||||
|
@ -427,7 +426,7 @@ void ArmatureImporter::create_armature_bones( )
|
|||
TODO:
|
||||
check if bones have already been created for a given joint
|
||||
*/
|
||||
leaf_bone_length = FLT_MAX;
|
||||
leaf_bone_length = FLT_MAX;
|
||||
create_unskinned_bone(*ri, NULL, (*ri)->getChildNodes().getCount(), NULL, ob_arm);
|
||||
|
||||
fix_leaf_bones();
|
||||
|
@ -593,17 +592,16 @@ void ArmatureImporter::set_pose ( Object * ob_arm , COLLADAFW::Node * root_node
|
|||
}
|
||||
else {
|
||||
copy_m4_m4(mat, obmat);
|
||||
float invObmat[4][4];
|
||||
invert_m4_m4(invObmat, ob_arm->obmat);
|
||||
mul_m4_m4m4(pchan->pose_mat, mat, invObmat);
|
||||
|
||||
float invObmat[4][4];
|
||||
invert_m4_m4(invObmat, ob_arm->obmat);
|
||||
mul_m4_m4m4(pchan->pose_mat, mat, invObmat);
|
||||
}
|
||||
|
||||
mat4_to_axis_angle(ax,&angle,mat);
|
||||
pchan->bone->roll = angle;
|
||||
|
||||
|
||||
COLLADAFW::NodePointerArray& children = root_node->getChildNodes();
|
||||
mat4_to_axis_angle(ax,&angle,mat);
|
||||
pchan->bone->roll = angle;
|
||||
|
||||
|
||||
COLLADAFW::NodePointerArray& children = root_node->getChildNodes();
|
||||
for (unsigned int i = 0; i < children.getCount(); i++) {
|
||||
set_pose(ob_arm, children[i], bone_name, mat);
|
||||
}
|
||||
|
@ -762,8 +760,8 @@ Object *ArmatureImporter::get_armature_for_joint(COLLADAFW::Node *node)
|
|||
if (skin.uses_joint_or_descendant(node))
|
||||
return skin.get_armature();
|
||||
}
|
||||
|
||||
std::map<COLLADAFW::UniqueId, Object*>::iterator arm;
|
||||
|
||||
std::map<COLLADAFW::UniqueId, Object*>::iterator arm;
|
||||
for (arm = unskinned_armature_map.begin(); arm != unskinned_armature_map.end(); arm++) {
|
||||
if(arm->first == node->getUniqueId() )
|
||||
return arm->second;
|
||||
|
|
|
@ -107,7 +107,7 @@ private:
|
|||
float parent_mat[][4], bArmature *arm);
|
||||
|
||||
void create_unskinned_bone(COLLADAFW::Node *node, EditBone *parent, int totchild,
|
||||
float parent_mat[][4], Object * ob_arm);
|
||||
float parent_mat[][4], Object * ob_arm);
|
||||
|
||||
void add_leaf_bone(float mat[][4], EditBone *bone, COLLADAFW::Node * node);
|
||||
|
||||
|
|
|
@ -4108,7 +4108,7 @@ void ARMATURE_OT_select_hierarchy(wmOperatorType *ot)
|
|||
|
||||
/* props */
|
||||
RNA_def_enum(ot->srna, "direction", direction_items,
|
||||
BONE_SELECT_PARENT, "Direction", "");
|
||||
BONE_SELECT_PARENT, "Direction", "");
|
||||
RNA_def_boolean(ot->srna, "extend", 0, "Add to Selection", "");
|
||||
}
|
||||
|
||||
|
@ -5207,9 +5207,9 @@ static int pose_hide_exec(bContext *C, wmOperator *op)
|
|||
bArmature *arm= ob->data;
|
||||
|
||||
if(RNA_boolean_get(op->ptr, "unselected"))
|
||||
bone_looper(ob, arm->bonebase.first, NULL, hide_unselected_pose_bone_cb);
|
||||
bone_looper(ob, arm->bonebase.first, NULL, hide_unselected_pose_bone_cb);
|
||||
else
|
||||
bone_looper(ob, arm->bonebase.first, NULL, hide_selected_pose_bone_cb);
|
||||
bone_looper(ob, arm->bonebase.first, NULL, hide_selected_pose_bone_cb);
|
||||
|
||||
/* note, notifier might evolve */
|
||||
WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, ob);
|
||||
|
|
|
@ -2287,8 +2287,8 @@ static void retargetArctoArcAggresive(bContext *C, RigGraph *rigg, RigArc *iarc,
|
|||
|
||||
/* set joints to best position */
|
||||
for (edge = iarc->edges.first, i = 0;
|
||||
edge;
|
||||
edge = edge->next, i++)
|
||||
edge;
|
||||
edge = edge->next, i++)
|
||||
{
|
||||
float *no = NULL;
|
||||
if (i < nb_joints)
|
||||
|
|
|
@ -42,7 +42,7 @@ extern const char ED_lorem[];
|
|||
enum { DEL_ALL, DEL_NEXT_CHAR, DEL_PREV_CHAR, DEL_SELECTION, DEL_NEXT_SEL, DEL_PREV_SEL };
|
||||
enum { CASE_LOWER, CASE_UPPER };
|
||||
enum { LINE_BEGIN, LINE_END, PREV_CHAR, NEXT_CHAR, PREV_WORD, NEXT_WORD,
|
||||
PREV_LINE, NEXT_LINE, PREV_PAGE, NEXT_PAGE };
|
||||
PREV_LINE, NEXT_LINE, PREV_PAGE, NEXT_PAGE };
|
||||
|
||||
void FONT_OT_text_insert(struct wmOperatorType *ot);
|
||||
void FONT_OT_line_break(struct wmOperatorType *ot);
|
||||
|
|
|
@ -688,8 +688,8 @@ static void key_to_bezt(float *key, BezTriple *basebezt, BezTriple *bezt)
|
|||
|
||||
static void bezt_to_key(BezTriple *bezt, float *key)
|
||||
{
|
||||
memcpy(key, bezt->vec, sizeof(float) * 9);
|
||||
key[9] = bezt->alfa;
|
||||
memcpy(key, bezt->vec, sizeof(float) * 9);
|
||||
key[9] = bezt->alfa;
|
||||
}
|
||||
|
||||
static void calc_keyHandles(ListBase *nurb, float *key)
|
||||
|
|
|
@ -40,7 +40,7 @@ struct wmWindowManager;
|
|||
/* sculpt.c */
|
||||
void ED_operatortypes_sculpt(void);
|
||||
void sculpt_get_redraw_planes(float planes[4][4], struct ARegion *ar,
|
||||
struct RegionView3D *rv3d, struct Object *ob);
|
||||
struct RegionView3D *rv3d, struct Object *ob);
|
||||
void ED_sculpt_force_update(struct bContext *C);
|
||||
|
||||
/* paint_ops.c */
|
||||
|
|
|
@ -727,7 +727,7 @@ void uiTemplateDopeSheetFilter(uiLayout *layout, struct bContext *C, struct Poin
|
|||
void uiTemplateID(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname,
|
||||
const char *newop, const char *openop, const char *unlinkop);
|
||||
void uiTemplateIDBrowse(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname,
|
||||
const char *newop, const char *openop, const char *unlinkop);
|
||||
const char *newop, const char *openop, const char *unlinkop);
|
||||
void uiTemplateIDPreview(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname,
|
||||
const char *newop, const char *openop, const char *unlinkop, int rows, int cols);
|
||||
void uiTemplateAnyID(uiLayout *layout, struct PointerRNA *ptr, const char *propname,
|
||||
|
@ -744,7 +744,7 @@ void uiTemplateVectorscope(uiLayout *layout, struct PointerRNA *ptr, const char
|
|||
void uiTemplateCurveMapping(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int type, int levels, int brush);
|
||||
void uiTemplateColorWheel(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int value_slider, int lock, int lock_luminosity, int cubic);
|
||||
void uiTemplateLayers(uiLayout *layout, struct PointerRNA *ptr, const char *propname,
|
||||
PointerRNA *used_ptr, const char *used_propname, int active_layer);
|
||||
PointerRNA *used_ptr, const char *used_propname, int active_layer);
|
||||
void uiTemplateImage(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, struct PointerRNA *userptr, int compact);
|
||||
void uiTemplateImageLayers(uiLayout *layout, struct bContext *C, struct Image *ima, struct ImageUser *iuser);
|
||||
void uiTemplateRunningJobs(uiLayout *layout, struct bContext *C);
|
||||
|
|
|
@ -274,7 +274,7 @@ void ui_bounds_block(uiBlock *block)
|
|||
if(bt->x1 < block->minx) block->minx= bt->x1;
|
||||
if(bt->y1 < block->miny) block->miny= bt->y1;
|
||||
|
||||
if(bt->x2 > block->maxx) block->maxx= bt->x2;
|
||||
if(bt->x2 > block->maxx) block->maxx= bt->x2;
|
||||
if(bt->y2 > block->maxy) block->maxy= bt->y2;
|
||||
|
||||
bt= bt->next;
|
||||
|
@ -363,7 +363,7 @@ static void ui_popup_bounds_block(const bContext *C, uiBlock *block, int bounds_
|
|||
oldheight= oldheight > 0 ? oldheight : MAX2(1, height);
|
||||
|
||||
/* offset block based on mouse position, user offset is scaled
|
||||
along in case we resized the block in ui_text_bounds_block */
|
||||
* along in case we resized the block in ui_text_bounds_block */
|
||||
startx= window->eventstate->x + block->minx + (block->mx*width)/oldwidth;
|
||||
starty= window->eventstate->y + block->miny + (block->my*height)/oldheight;
|
||||
|
||||
|
@ -633,7 +633,7 @@ static int ui_but_update_from_old_block(const bContext *C, uiBlock *block, uiBut
|
|||
}
|
||||
|
||||
/* copy hardmin for list rows to prevent 'sticking' highlight to mouse position
|
||||
when scrolling without moving mouse (see [#28432]) */
|
||||
* when scrolling without moving mouse (see [#28432]) */
|
||||
if(ELEM(oldbut->type, ROW, LISTROW))
|
||||
oldbut->hardmax= but->hardmax;
|
||||
|
||||
|
@ -659,7 +659,7 @@ static int ui_but_update_from_old_block(const bContext *C, uiBlock *block, uiBut
|
|||
}
|
||||
|
||||
/* needed for temporarily rename buttons, such as in outliner or fileselect,
|
||||
they should keep calling uiDefButs to keep them alive */
|
||||
* they should keep calling uiDefButs to keep them alive */
|
||||
/* returns 0 when button removed */
|
||||
int uiButActiveOnly(const bContext *C, uiBlock *block, uiBut *but)
|
||||
{
|
||||
|
@ -1890,8 +1890,8 @@ static void ui_free_but(const bContext *C, uiBut *but)
|
|||
if(but->func_argN) MEM_freeN(but->func_argN);
|
||||
if(but->active) {
|
||||
/* XXX solve later, buttons should be free-able without context ideally,
|
||||
however they may have open tooltips or popup windows, which need to
|
||||
be closed using a context pointer */
|
||||
* however they may have open tooltips or popup windows, which need to
|
||||
* be closed using a context pointer */
|
||||
if(C)
|
||||
ui_button_active_free(C, but);
|
||||
else
|
||||
|
@ -2424,14 +2424,13 @@ void ui_block_do_align(uiBlock *block)
|
|||
}
|
||||
|
||||
/*
|
||||
ui_def_but is the function that draws many button types
|
||||
* ui_def_but is the function that draws many button types
|
||||
|
||||
for float buttons:
|
||||
"a1" Click Step (how much to change the value each click)
|
||||
"a2" Number of decimal point values to display. 0 defaults to 3 (0.000) 1,2,3, and a maximum of 4,
|
||||
all greater values will be clamped to 4.
|
||||
|
||||
*/
|
||||
* for float buttons:
|
||||
* "a1" Click Step (how much to change the value each click)
|
||||
* "a2" Number of decimal point values to display. 0 defaults to 3 (0.000)
|
||||
* 1,2,3, and a maximum of 4, all greater values will be clamped to 4.
|
||||
*/
|
||||
static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, void *poin, float min, float max, float a1, float a2, const char *tip)
|
||||
{
|
||||
uiBut *but;
|
||||
|
|
|
@ -1326,9 +1326,9 @@ static void ui_draw_but_curve_grid(rcti *rect, float zoomx, float zoomy, float o
|
|||
|
||||
static void glColor3ubvShade(unsigned char *col, int shade)
|
||||
{
|
||||
glColor3ub(col[0]-shade>0?col[0]-shade:0,
|
||||
col[1]-shade>0?col[1]-shade:0,
|
||||
col[2]-shade>0?col[2]-shade:0);
|
||||
glColor3ub(col[0]-shade>0?col[0]-shade:0,
|
||||
col[1]-shade>0?col[1]-shade:0,
|
||||
col[2]-shade>0?col[2]-shade:0);
|
||||
}
|
||||
|
||||
void ui_draw_but_CURVE(ARegion *ar, uiBut *but, uiWidgetColors *wcol, rcti *rect)
|
||||
|
|
|
@ -525,9 +525,9 @@ void EM_set_flag_all(EditMesh *em, int flag)
|
|||
|
||||
void EM_set_flag_all_selectmode(EditMesh *em, int flag)
|
||||
{
|
||||
EditVert *eve;
|
||||
EditEdge *eed;
|
||||
EditFace *efa;
|
||||
EditVert *eve;
|
||||
EditEdge *eed;
|
||||
EditFace *efa;
|
||||
|
||||
int selvert= 0, seledge= 0, selface= 0;
|
||||
|
||||
|
|
|
@ -1312,7 +1312,7 @@ void MESH_OT_select_similar(wmOperatorType *ot)
|
|||
|
||||
int mesh_layers_menu_charlen(CustomData *data, int type)
|
||||
{
|
||||
int i, len = 0;
|
||||
int i, len = 0;
|
||||
/* see if there is a duplicate */
|
||||
for(i=0; i<data->totlayer; i++) {
|
||||
if((&data->layers[i])->type == type) {
|
||||
|
|
|
@ -1651,7 +1651,7 @@ static void fill_quad_single(EditMesh *em, EditFace *efa, struct GHash *gh, int
|
|||
facecopy(em, efa,hold);
|
||||
if(i+1 != (vertsize-1)/2) {
|
||||
if(seltype == SUBDIV_SELECT_INNER) {
|
||||
hold->e3->f2 |= EDGEINNER;
|
||||
hold->e3->f2 |= EDGEINNER;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1720,7 +1720,7 @@ static void fill_tri_single(EditMesh *em, EditFace *efa, struct GHash *gh, int n
|
|||
hold = addfacelist(em, verts[i],verts[i+1],v[op],NULL,NULL,NULL);
|
||||
if(i+1 != vertsize-1) {
|
||||
if(seltype == SUBDIV_SELECT_INNER) {
|
||||
hold->e2->f2 |= EDGEINNER;
|
||||
hold->e2->f2 |= EDGEINNER;
|
||||
}
|
||||
}
|
||||
facecopy(em, efa,hold);
|
||||
|
@ -2369,7 +2369,7 @@ static void fill_quad_quadruple(EditMesh *em, EditFace *efa, struct GHash *gh, i
|
|||
}
|
||||
// Clean up our dynamic multi-dim array
|
||||
for(i=0;i<numcuts+2;i++) {
|
||||
MEM_freeN(innerverts[i]);
|
||||
MEM_freeN(innerverts[i]);
|
||||
}
|
||||
MEM_freeN(innerverts);
|
||||
}
|
||||
|
|
|
@ -282,7 +282,7 @@ int ED_mesh_color_remove(bContext *C, Object *ob, Mesh *me)
|
|||
CustomDataLayer *cdl;
|
||||
int index;
|
||||
|
||||
index= CustomData_get_active_layer_index(data, CD_MCOL);
|
||||
index= CustomData_get_active_layer_index(data, CD_MCOL);
|
||||
cdl= (index == -1)? NULL: &data->layers[index];
|
||||
|
||||
if(!cdl)
|
||||
|
@ -301,7 +301,7 @@ int ED_mesh_color_remove_named(bContext *C, Object *ob, Mesh *me, const char *na
|
|||
CustomDataLayer *cdl;
|
||||
int index;
|
||||
|
||||
index= CustomData_get_named_layer_index(data, CD_MCOL, name);
|
||||
index= CustomData_get_named_layer_index(data, CD_MCOL, name);
|
||||
cdl= (index == -1)? NULL: &data->layers[index];
|
||||
|
||||
if(!cdl)
|
||||
|
|
|
@ -475,7 +475,7 @@ void ED_object_enter_editmode(bContext *C, int flag)
|
|||
else if(ob->type==OB_FONT) {
|
||||
scene->obedit= ob; // XXX for context
|
||||
ok= 1;
|
||||
make_editText(ob);
|
||||
make_editText(ob);
|
||||
|
||||
WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_EDITMODE_TEXT, scene);
|
||||
}
|
||||
|
@ -536,9 +536,9 @@ static int editmode_toggle_poll(bContext *C)
|
|||
return 0;
|
||||
|
||||
return (ob->type == OB_MESH || ob->type == OB_ARMATURE ||
|
||||
ob->type == OB_FONT || ob->type == OB_MBALL ||
|
||||
ob->type == OB_LATTICE || ob->type == OB_SURF ||
|
||||
ob->type == OB_CURVE);
|
||||
ob->type == OB_FONT || ob->type == OB_MBALL ||
|
||||
ob->type == OB_LATTICE || ob->type == OB_SURF ||
|
||||
ob->type == OB_CURVE);
|
||||
}
|
||||
|
||||
void OBJECT_OT_editmode_toggle(wmOperatorType *ot)
|
||||
|
|
|
@ -465,8 +465,8 @@ static void add_hook_object(Main *bmain, Scene *scene, Object *obedit, Object *o
|
|||
|
||||
invert_m4_m4(ob->imat, ob->obmat);
|
||||
/* apparently this call goes from right to left... */
|
||||
mul_serie_m4(hmd->parentinv, ob->imat, obedit->obmat, NULL,
|
||||
NULL, NULL, NULL, NULL, NULL);
|
||||
mul_serie_m4(hmd->parentinv, ob->imat, obedit->obmat, NULL,
|
||||
NULL, NULL, NULL, NULL, NULL);
|
||||
|
||||
DAG_scene_sort(bmain, scene);
|
||||
}
|
||||
|
|
|
@ -296,8 +296,8 @@ static int object_select_linked_exec(bContext *C, wmOperator *op)
|
|||
}
|
||||
else if(nr==5) {
|
||||
if(base->object->dup_group==ob->dup_group) {
|
||||
base->flag |= SELECT;
|
||||
changed = 1;
|
||||
base->flag |= SELECT;
|
||||
changed = 1;
|
||||
}
|
||||
}
|
||||
else if(nr==6) {
|
||||
|
|
|
@ -423,15 +423,15 @@ static void paint_draw_alpha_overlay(Sculpt *sd, Brush *brush,
|
|||
/* save lots of GL state
|
||||
TODO: check on whether all of these are needed? */
|
||||
glPushAttrib(GL_COLOR_BUFFER_BIT|
|
||||
GL_CURRENT_BIT|
|
||||
GL_DEPTH_BUFFER_BIT|
|
||||
GL_ENABLE_BIT|
|
||||
GL_LINE_BIT|
|
||||
GL_POLYGON_BIT|
|
||||
GL_STENCIL_BUFFER_BIT|
|
||||
GL_TRANSFORM_BIT|
|
||||
GL_VIEWPORT_BIT|
|
||||
GL_TEXTURE_BIT);
|
||||
GL_CURRENT_BIT|
|
||||
GL_DEPTH_BUFFER_BIT|
|
||||
GL_ENABLE_BIT|
|
||||
GL_LINE_BIT|
|
||||
GL_POLYGON_BIT|
|
||||
GL_STENCIL_BUFFER_BIT|
|
||||
GL_TRANSFORM_BIT|
|
||||
GL_VIEWPORT_BIT|
|
||||
GL_TEXTURE_BIT);
|
||||
|
||||
if(load_tex(sd, brush, vc)) {
|
||||
glEnable(GL_BLEND);
|
||||
|
@ -484,9 +484,9 @@ static void paint_draw_alpha_overlay(Sculpt *sd, Brush *brush,
|
|||
|
||||
/* set quad color */
|
||||
glColor4f(U.sculpt_paint_overlay_col[0],
|
||||
U.sculpt_paint_overlay_col[1],
|
||||
U.sculpt_paint_overlay_col[2],
|
||||
brush->texture_overlay_alpha / 100.0f);
|
||||
U.sculpt_paint_overlay_col[1],
|
||||
U.sculpt_paint_overlay_col[2],
|
||||
brush->texture_overlay_alpha / 100.0f);
|
||||
|
||||
/* draw textured quad */
|
||||
glBegin(GL_QUADS);
|
||||
|
@ -619,7 +619,7 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused))
|
|||
visual_strength = 1;
|
||||
|
||||
outline_alpha = ((paint->flags & PAINT_SHOW_BRUSH_ON_SURFACE) ?
|
||||
min_alpha + (visual_strength*(max_alpha-min_alpha)) : 0.50f);
|
||||
min_alpha + (visual_strength*(max_alpha-min_alpha)) : 0.50f);
|
||||
|
||||
if(sd->draw_anchored) {
|
||||
final_radius = sd->anchored_size;
|
||||
|
|
|
@ -2450,7 +2450,7 @@ static void sculpt_combine_proxies(Sculpt *sd, Object *ob)
|
|||
if(!ELEM(brush->sculpt_tool, SCULPT_TOOL_SMOOTH, SCULPT_TOOL_LAYER)) {
|
||||
/* these brushes start from original coordinates */
|
||||
const int use_orco = (ELEM3(brush->sculpt_tool, SCULPT_TOOL_GRAB,
|
||||
SCULPT_TOOL_ROTATE, SCULPT_TOOL_THUMB));
|
||||
SCULPT_TOOL_ROTATE, SCULPT_TOOL_THUMB));
|
||||
|
||||
#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
|
||||
for (n= 0; n < totnode; n++) {
|
||||
|
@ -2972,7 +2972,7 @@ static void sculpt_update_brush_delta(Sculpt *sd, Object *ob, Brush *brush)
|
|||
|
||||
if(cache->first_time) {
|
||||
copy_v3_v3(cache->orig_grab_location,
|
||||
cache->true_location);
|
||||
cache->true_location);
|
||||
}
|
||||
else if(tool == SCULPT_TOOL_SNAKE_HOOK)
|
||||
add_v3_v3(cache->true_location, cache->grab_delta);
|
||||
|
@ -3246,7 +3246,7 @@ int sculpt_stroke_get_location(bContext *C, struct PaintStroke *stroke, float ou
|
|||
srd.hit = 0;
|
||||
srd.original = (cache)? cache->original: 0;
|
||||
BLI_pbvh_raycast(ss->pbvh, sculpt_raycast_cb, &srd,
|
||||
ray_start, ray_normal, srd.original);
|
||||
ray_start, ray_normal, srd.original);
|
||||
|
||||
copy_v3_v3(out, ray_normal);
|
||||
mul_v3_fl(out, srd.dist);
|
||||
|
@ -3506,9 +3506,9 @@ static int sculpt_brush_stroke_invoke(bContext *C, wmOperator *op, wmEvent *even
|
|||
return OPERATOR_CANCELLED;
|
||||
|
||||
stroke = paint_stroke_new(C, sculpt_stroke_get_location,
|
||||
sculpt_stroke_test_start,
|
||||
sculpt_stroke_update_step,
|
||||
sculpt_stroke_done, event->type);
|
||||
sculpt_stroke_test_start,
|
||||
sculpt_stroke_update_step,
|
||||
sculpt_stroke_done, event->type);
|
||||
|
||||
op->customdata = stroke;
|
||||
|
||||
|
|
|
@ -177,17 +177,17 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
|
|||
uiBlockSetFunc(block, file_draw_check_cb, NULL, NULL);
|
||||
|
||||
but = uiDefButTextO(block, TEX, "FILE_OT_directory", 0, "",
|
||||
min_x, line1_y, line1_w-chan_offs, btn_h,
|
||||
params->dir, 0.0, (float)FILE_MAX, 0, 0,
|
||||
TIP_("File path"));
|
||||
min_x, line1_y, line1_w-chan_offs, btn_h,
|
||||
params->dir, 0.0, (float)FILE_MAX, 0, 0,
|
||||
TIP_("File path"));
|
||||
uiButSetCompleteFunc(but, autocomplete_directory, NULL);
|
||||
uiButSetFlag(but, UI_BUT_NO_UTF8);
|
||||
|
||||
if((params->flag & FILE_DIRSEL_ONLY) == 0) {
|
||||
but = uiDefBut(block, TEX, B_FS_FILENAME, "",
|
||||
min_x, line2_y, line2_w-chan_offs, btn_h,
|
||||
params->file, 0.0, (float)FILE_MAXFILE, 0, 0,
|
||||
TIP_(overwrite_alert ?N_("File name, overwrite existing") : N_("File name")));
|
||||
min_x, line2_y, line2_w-chan_offs, btn_h,
|
||||
params->file, 0.0, (float)FILE_MAXFILE, 0, 0,
|
||||
TIP_(overwrite_alert ?N_("File name, overwrite existing") : N_("File name")));
|
||||
uiButSetCompleteFunc(but, autocomplete_file, NULL);
|
||||
uiButSetFlag(but, UI_BUT_NO_UTF8);
|
||||
|
||||
|
@ -205,16 +205,16 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
|
|||
if (fnumbuttons && (params->flag & FILE_DIRSEL_ONLY) == 0) {
|
||||
uiBlockBeginAlign(block);
|
||||
but = uiDefIconButO(block, BUT, "FILE_OT_filenum", 0, ICON_ZOOMOUT,
|
||||
min_x + line2_w + separator - chan_offs, line2_y,
|
||||
btn_fn_w, btn_h,
|
||||
TIP_("Decrement the filename number"));
|
||||
RNA_int_set(uiButGetOperatorPtrRNA(but), "increment", -1);
|
||||
|
||||
min_x + line2_w + separator - chan_offs, line2_y,
|
||||
btn_fn_w, btn_h,
|
||||
TIP_("Decrement the filename number"));
|
||||
RNA_int_set(uiButGetOperatorPtrRNA(but), "increment", -1);
|
||||
|
||||
but = uiDefIconButO(block, BUT, "FILE_OT_filenum", 0, ICON_ZOOMIN,
|
||||
min_x + line2_w + separator + btn_fn_w - chan_offs, line2_y,
|
||||
btn_fn_w, btn_h,
|
||||
TIP_("Increment the filename number"));
|
||||
RNA_int_set(uiButGetOperatorPtrRNA(but), "increment", 1);
|
||||
min_x + line2_w + separator + btn_fn_w - chan_offs, line2_y,
|
||||
btn_fn_w, btn_h,
|
||||
TIP_("Increment the filename number"));
|
||||
RNA_int_set(uiButGetOperatorPtrRNA(but), "increment", 1);
|
||||
uiBlockEndAlign(block);
|
||||
}
|
||||
|
||||
|
@ -235,7 +235,7 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
|
|||
|
||||
|
||||
static void draw_tile(int sx, int sy, int width, int height, int colorid, int shade)
|
||||
{
|
||||
{
|
||||
UI_ThemeColorShade(colorid, shade);
|
||||
uiSetRoundBox(UI_CNR_ALL);
|
||||
uiRoundBox((float)sx, (float)(sy - height), (float)(sx + width), (float)sy, 5.0f);
|
||||
|
|
|
@ -2335,7 +2335,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
|
|||
str= "Edit Object %t|Add Object %x0|End Object %x1|Replace Mesh %x2|Track to %x3|Dynamics %x4";
|
||||
uiDefButS(block, MENU, B_REDR, str, xco+40, yco-24, (width-80), 19, &eoa->type, 0.0, 0.0, 0, 0, "");
|
||||
|
||||
yco-= ysize;
|
||||
yco-= ysize;
|
||||
|
||||
break;
|
||||
|
||||
|
@ -2472,9 +2472,9 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
|
|||
}
|
||||
str= "Constraint Type %t|Location %x0|Distance %x1|Orientation %x2|Force field %x3";
|
||||
but = uiDefButS(block, MENU, B_REDR, str, xco+40, yco-23, (width-80), 19, &coa->type, 0.0, 0.0, 0, 0, "");
|
||||
yco-= ysize;
|
||||
yco-= ysize;
|
||||
break;
|
||||
|
||||
|
||||
case ACT_SCENE:
|
||||
sca= act->data;
|
||||
|
||||
|
|
|
@ -340,8 +340,9 @@ static void node_buts_normal(uiLayout *layout, bContext *UNUSED(C), PointerRNA *
|
|||
uiBut *bt;
|
||||
|
||||
bt= uiDefButF(block, BUT_NORMAL, B_NODE_EXEC, "",
|
||||
(short)butr->xmin, (short)butr->xmin, butr->xmax-butr->xmin, butr->xmax-butr->xmin,
|
||||
nor, 0.0f, 1.0f, 0, 0, "");
|
||||
(short)butr->xmin, (short)butr->xmin,
|
||||
butr->xmax-butr->xmin, butr->xmax-butr->xmin,
|
||||
nor, 0.0f, 1.0f, 0, 0, "");
|
||||
uiButSetFunc(bt, node_normal_cb, ntree, node);
|
||||
}
|
||||
#if 0 // not used in 2.5x yet
|
||||
|
@ -627,9 +628,9 @@ static void draw_group_socket_name(SpaceNode *snode, bNode *gnode, bNodeSocket *
|
|||
uiButSetFunc(bt, update_group_output_cb, snode, ngroup);
|
||||
}
|
||||
else {
|
||||
uiDefBut(gnode->block, LABEL, 0, sock->name,
|
||||
sock->locx+xoffset, sock->locy+1+yoffset, 72, NODE_DY,
|
||||
NULL, 0, 31, 0, 0, "");
|
||||
uiDefBut(gnode->block, LABEL, 0, sock->name,
|
||||
sock->locx+xoffset, sock->locy+1+yoffset, 72, NODE_DY,
|
||||
NULL, 0, 31, 0, 0, "");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -585,8 +585,8 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
|
|||
UI_ThemeColor(color_id);
|
||||
|
||||
if(node->flag & NODE_MUTED)
|
||||
UI_ThemeColorBlend(color_id, TH_REDALERT, 0.5f);
|
||||
|
||||
UI_ThemeColorBlend(color_id, TH_REDALERT, 0.5f);
|
||||
|
||||
uiSetRoundBox(UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT);
|
||||
uiRoundBox(rct->xmin, rct->ymax-NODE_DY, rct->xmax, rct->ymax, BASIS_RAD);
|
||||
|
||||
|
@ -758,7 +758,7 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b
|
|||
/* body */
|
||||
UI_ThemeColor(color_id);
|
||||
if(node->flag & NODE_MUTED)
|
||||
UI_ThemeColorBlend(color_id, TH_REDALERT, 0.5f);
|
||||
UI_ThemeColorBlend(color_id, TH_REDALERT, 0.5f);
|
||||
uiRoundBox(rct->xmin, rct->ymin, rct->xmax, rct->ymax, hiddenrad);
|
||||
|
||||
/* outline active and selected emphasis */
|
||||
|
|
|
@ -170,7 +170,7 @@ static void proxy_startjob(void *pjv, short *stop, short *do_update, float *prog
|
|||
BLI_mutex_unlock(&pj->queue_lock);
|
||||
|
||||
seq_proxy_rebuild(pj->main, pj->scene, seq,
|
||||
stop, do_update, progress);
|
||||
stop, do_update, progress);
|
||||
seq_free_sequence_recurse(pj->scene, seq);
|
||||
}
|
||||
|
||||
|
@ -195,7 +195,7 @@ static void seq_proxy_build_job(const bContext *C, Sequence * seq)
|
|||
seq = seq_dupli_recursive(scene, scene, seq, 0);
|
||||
|
||||
steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C),
|
||||
sa, "Building Proxies", WM_JOB_PROGRESS);
|
||||
sa, "Building Proxies", WM_JOB_PROGRESS);
|
||||
|
||||
pj = WM_jobs_get_customdata(steve);
|
||||
|
||||
|
@ -209,9 +209,9 @@ static void seq_proxy_build_job(const bContext *C, Sequence * seq)
|
|||
|
||||
WM_jobs_customdata(steve, pj, proxy_freejob);
|
||||
WM_jobs_timer(steve, 0.1, NC_SCENE|ND_SEQUENCER,
|
||||
NC_SCENE|ND_SEQUENCER);
|
||||
WM_jobs_callbacks(steve, proxy_startjob, NULL, NULL,
|
||||
proxy_endjob);
|
||||
NC_SCENE|ND_SEQUENCER);
|
||||
WM_jobs_callbacks(steve, proxy_startjob, NULL, NULL,
|
||||
proxy_endjob);
|
||||
}
|
||||
|
||||
BLI_mutex_lock(&pj->queue_lock);
|
||||
|
@ -250,9 +250,9 @@ static void UNUSED_FUNCTION(change_plugin_seq)(Scene *scene, char *str) /* calle
|
|||
sh.free(last_seq);
|
||||
sh.init_plugin(last_seq, str);
|
||||
|
||||
last_seq->machine = MAX3(last_seq->seq1->machine,
|
||||
last_seq->seq2->machine,
|
||||
last_seq->seq3->machine);
|
||||
last_seq->machine = MAX3(last_seq->seq1->machine,
|
||||
last_seq->seq2->machine,
|
||||
last_seq->seq3->machine);
|
||||
|
||||
if( seq_test_overlap(ed->seqbasep, last_seq) ) shuffle_seq(ed->seqbasep, last_seq, scene);
|
||||
|
||||
|
|
|
@ -184,7 +184,7 @@ void sequencer_keymap(wmKeyConfig *keyconf)
|
|||
regular number keys */
|
||||
{
|
||||
int keys[] = { ONEKEY, TWOKEY, THREEKEY, FOURKEY, FIVEKEY,
|
||||
SIXKEY, SEVENKEY, EIGHTKEY, NINEKEY, ZEROKEY };
|
||||
SIXKEY, SEVENKEY, EIGHTKEY, NINEKEY, ZEROKEY };
|
||||
int i;
|
||||
|
||||
for (i = 1; i <= 10; i++) {
|
||||
|
|
|
@ -105,7 +105,7 @@ int text_get_total_lines(struct SpaceText *st, struct ARegion *ar);
|
|||
|
||||
/* text_ops.c */
|
||||
enum { LINE_BEGIN, LINE_END, FILE_TOP, FILE_BOTTOM, PREV_CHAR, NEXT_CHAR,
|
||||
PREV_WORD, NEXT_WORD, PREV_LINE, NEXT_LINE, PREV_PAGE, NEXT_PAGE };
|
||||
PREV_WORD, NEXT_WORD, PREV_LINE, NEXT_LINE, PREV_PAGE, NEXT_PAGE };
|
||||
enum { DEL_NEXT_CHAR, DEL_PREV_CHAR, DEL_NEXT_WORD, DEL_PREV_WORD };
|
||||
|
||||
void TEXT_OT_new(struct wmOperatorType *ot);
|
||||
|
|
|
@ -448,7 +448,7 @@ static void drawfloor(Scene *scene, View3D *v3d, const char **grid_unit)
|
|||
if(usys) {
|
||||
int i= bUnit_GetBaseUnit(usys);
|
||||
*grid_unit= bUnit_GetNameDisplay(usys, i);
|
||||
grid_scale = (grid_scale * (float)bUnit_GetScaler(usys, i)) / scene->unit.scale_length;
|
||||
grid_scale = (grid_scale * (float)bUnit_GetScaler(usys, i)) / scene->unit.scale_length;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1267,11 +1267,24 @@ static void backdrawview3d(Scene *scene, ARegion *ar, View3D *v3d)
|
|||
BLI_assert(ar->regiontype == RGN_TYPE_WINDOW);
|
||||
|
||||
if(base && (base->object->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT) ||
|
||||
paint_facesel_test(base->object)));
|
||||
paint_facesel_test(base->object)))
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
else if((base && (base->object->mode & OB_MODE_TEXTURE_PAINT)) &&
|
||||
scene->toolsettings && (scene->toolsettings->imapaint.flag & IMAGEPAINT_PROJECT_DISABLE));
|
||||
else if((base && (base->object->mode & OB_MODE_PARTICLE_EDIT)) && v3d->drawtype>OB_WIRE && (v3d->flag & V3D_ZBUF_SELECT));
|
||||
else if(scene->obedit && v3d->drawtype>OB_WIRE && (v3d->flag & V3D_ZBUF_SELECT));
|
||||
scene->toolsettings && (scene->toolsettings->imapaint.flag & IMAGEPAINT_PROJECT_DISABLE))
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
else if((base && (base->object->mode & OB_MODE_PARTICLE_EDIT)) &&
|
||||
v3d->drawtype > OB_WIRE && (v3d->flag & V3D_ZBUF_SELECT))
|
||||
{
|
||||
/* do nothing */
|
||||
}
|
||||
else if(scene->obedit && v3d->drawtype>OB_WIRE &&
|
||||
(v3d->flag & V3D_ZBUF_SELECT)) {
|
||||
/* do nothing */
|
||||
}
|
||||
else {
|
||||
v3d->flag &= ~V3D_INVALID_BACKBUF;
|
||||
return;
|
||||
|
|
|
@ -977,7 +977,7 @@ void VIEW3D_OT_snap_cursor_to_center(wmOperatorType *ot)
|
|||
ot->poll= ED_operator_view3d_active;
|
||||
|
||||
/* flags */
|
||||
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
|
||||
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
|
||||
}
|
||||
|
||||
/* **************************************************** */
|
||||
|
|
|
@ -1256,7 +1256,7 @@ static void createTransArmatureVerts(TransInfo *t)
|
|||
static void createTransMBallVerts(TransInfo *t)
|
||||
{
|
||||
MetaBall *mb = (MetaBall*)t->obedit->data;
|
||||
MetaElem *ml;
|
||||
MetaElem *ml;
|
||||
TransData *td;
|
||||
TransDataExtension *tx;
|
||||
float mtx[3][3], smtx[3][3];
|
||||
|
|
|
@ -792,7 +792,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
|
|||
float mat[4][4];
|
||||
|
||||
/* Rotation of MetaElem is stored in quat */
|
||||
quat_to_mat4( mat,ml_sel->quat);
|
||||
quat_to_mat4( mat,ml_sel->quat);
|
||||
|
||||
copy_v3_v3(normal, mat[2]);
|
||||
|
||||
|
|
|
@ -468,11 +468,11 @@ void GPU_drawobject_free(DerivedMesh *dm)
|
|||
}
|
||||
|
||||
typedef void (*GPUBufferCopyFunc)(DerivedMesh *dm, float *varray, int *index,
|
||||
int *mat_orig_to_new, void *user_data);
|
||||
int *mat_orig_to_new, void *user_data);
|
||||
|
||||
static GPUBuffer *gpu_buffer_setup(DerivedMesh *dm, GPUDrawObject *object,
|
||||
int vector_size, int size, GLenum target,
|
||||
void *user, GPUBufferCopyFunc copy_f)
|
||||
int vector_size, int size, GLenum target,
|
||||
void *user, GPUBufferCopyFunc copy_f)
|
||||
{
|
||||
GPUBufferPool *pool;
|
||||
GPUBuffer *buffer;
|
||||
|
@ -546,8 +546,8 @@ static GPUBuffer *gpu_buffer_setup(DerivedMesh *dm, GPUDrawObject *object,
|
|||
while(uploaded == GL_FALSE) {
|
||||
(*copy_f)(dm, varray, cur_index_per_mat, mat_orig_to_new, user);
|
||||
/* glUnmapBuffer returns GL_FALSE if
|
||||
the data store is corrupted; retry
|
||||
in that case */
|
||||
* the data store is corrupted; retry
|
||||
* in that case */
|
||||
uploaded = glUnmapBufferARB(target);
|
||||
}
|
||||
}
|
||||
|
@ -924,8 +924,8 @@ static GPUBuffer *gpu_buffer_setup_type(DerivedMesh *dm, GPUBufferType type)
|
|||
}
|
||||
|
||||
buf = gpu_buffer_setup(dm, dm->drawObject, ts->vector_size,
|
||||
gpu_buffer_size_from_type(dm, type),
|
||||
ts->gl_buffer_type, user_data, ts->copy);
|
||||
gpu_buffer_size_from_type(dm, type),
|
||||
ts->gl_buffer_type, user_data, ts->copy);
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
@ -1144,8 +1144,8 @@ void GPU_buffer_unbind(void)
|
|||
}
|
||||
}
|
||||
GLStates &= !(GPU_BUFFER_VERTEX_STATE | GPU_BUFFER_NORMAL_STATE |
|
||||
GPU_BUFFER_TEXCOORD_STATE | GPU_BUFFER_COLOR_STATE |
|
||||
GPU_BUFFER_ELEMENT_STATE);
|
||||
GPU_BUFFER_TEXCOORD_STATE | GPU_BUFFER_COLOR_STATE |
|
||||
GPU_BUFFER_ELEMENT_STATE);
|
||||
|
||||
for(i = 0; i < MAX_GPU_ATTRIB_DATA; i++) {
|
||||
if(attribData[i].index != -1) {
|
||||
|
@ -1310,8 +1310,8 @@ void GPU_update_mesh_buffers(GPU_Buffers *buffers_v, MVert *mvert,
|
|||
/* Build VBO */
|
||||
glBindBufferARB(GL_ARRAY_BUFFER_ARB, buffers->vert_buf);
|
||||
glBufferDataARB(GL_ARRAY_BUFFER_ARB,
|
||||
sizeof(VertexBufferFormat) * totvert,
|
||||
NULL, GL_STATIC_DRAW_ARB);
|
||||
sizeof(VertexBufferFormat) * totvert,
|
||||
NULL, GL_STATIC_DRAW_ARB);
|
||||
vert_data = glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
|
||||
|
||||
if(vert_data) {
|
||||
|
@ -1359,7 +1359,7 @@ GPU_Buffers *GPU_build_mesh_buffers(GHash *map, MVert *mvert, MFace *mface,
|
|||
/* Generate index buffer object */
|
||||
glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, buffers->index_buf);
|
||||
glBufferDataARB(GL_ELEMENT_ARRAY_BUFFER_ARB,
|
||||
sizeof(unsigned short) * tottri * 3, NULL, GL_STATIC_DRAW_ARB);
|
||||
sizeof(unsigned short) * tottri * 3, NULL, GL_STATIC_DRAW_ARB);
|
||||
|
||||
/* Fill the triangle buffer */
|
||||
tri_data = glMapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
|
||||
|
@ -1429,8 +1429,8 @@ void GPU_update_grid_buffers(GPU_Buffers *buffers_v, DMGridData **grids,
|
|||
if(buffers->vert_buf) {
|
||||
glBindBufferARB(GL_ARRAY_BUFFER_ARB, buffers->vert_buf);
|
||||
glBufferDataARB(GL_ARRAY_BUFFER_ARB,
|
||||
sizeof(DMGridData) * totvert,
|
||||
NULL, GL_STATIC_DRAW_ARB);
|
||||
sizeof(DMGridData) * totvert,
|
||||
NULL, GL_STATIC_DRAW_ARB);
|
||||
vert_data = glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB);
|
||||
if(vert_data) {
|
||||
for(i = 0; i < totgrid; ++i) {
|
||||
|
|
|
@ -909,7 +909,7 @@ static void gpu_node_input_socket(GPUNode *node, GPUNodeStack *sock)
|
|||
gpu_node_input_link(node, sock->link, sock->type);
|
||||
}
|
||||
else {
|
||||
link = GPU_node_link_create(0);
|
||||
link = GPU_node_link_create(0);
|
||||
link->ptr1 = sock->vec;
|
||||
gpu_node_input_link(node, link, sock->type);
|
||||
}
|
||||
|
|
|
@ -596,7 +596,7 @@ static void gpu_verify_repeat(Image *ima)
|
|||
{
|
||||
/* set either clamp or repeat in X/Y */
|
||||
if (ima->tpageflag & IMA_CLAMP_U)
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
else
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
|
||||
|
||||
|
@ -809,11 +809,11 @@ void GPU_free_smoke(SmokeModifierData *smd)
|
|||
if(smd->type & MOD_SMOKE_TYPE_DOMAIN && smd->domain)
|
||||
{
|
||||
if(smd->domain->tex)
|
||||
GPU_texture_free(smd->domain->tex);
|
||||
GPU_texture_free(smd->domain->tex);
|
||||
smd->domain->tex = NULL;
|
||||
|
||||
if(smd->domain->tex_shadow)
|
||||
GPU_texture_free(smd->domain->tex_shadow);
|
||||
GPU_texture_free(smd->domain->tex_shadow);
|
||||
smd->domain->tex_shadow = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1208,7 +1208,7 @@ GPUPixelBuffer *gpu_pixelbuffer_create(int x, int y, int halffloat, int numbuffe
|
|||
pb->numbuffers = numbuffers;
|
||||
pb->halffloat = halffloat;
|
||||
|
||||
glGenBuffersARB(pb->numbuffers, pb->bindcode);
|
||||
glGenBuffersARB(pb->numbuffers, pb->bindcode);
|
||||
|
||||
if (!pb->bindcode[0]) {
|
||||
fprintf(stderr, "GPUPixelBuffer allocation failed\n");
|
||||
|
|
|
@ -214,14 +214,14 @@ typedef enum IMB_Proxy_Size {
|
|||
void IMB_anim_set_index_dir(struct anim * anim, const char * dir);
|
||||
|
||||
int IMB_anim_index_get_frame_index(struct anim * anim, IMB_Timecode_Type tc,
|
||||
int position);
|
||||
int position);
|
||||
|
||||
/* will rebuild all used indices and proxies at once */
|
||||
void IMB_anim_index_rebuild(struct anim * anim,
|
||||
IMB_Timecode_Type build_tcs,
|
||||
IMB_Proxy_Size build_preview_sizes,
|
||||
int build_quality,
|
||||
short *stop, short *do_update, float *progress);
|
||||
IMB_Timecode_Type build_tcs,
|
||||
IMB_Proxy_Size build_preview_sizes,
|
||||
int build_quality,
|
||||
short *stop, short *do_update, float *progress);
|
||||
|
||||
/**
|
||||
* Return the length (in frames) of the given @a anim.
|
||||
|
@ -234,7 +234,7 @@ int IMB_anim_get_duration(struct anim *anim, IMB_Timecode_Type tc);
|
|||
* and frs_sec and frs_sec_base untouched if none available!)
|
||||
*/
|
||||
int IMB_anim_get_fps(struct anim * anim,
|
||||
short * frs_sec, float * frs_sec_base);
|
||||
short * frs_sec, float * frs_sec_base);
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
|
@ -78,24 +78,26 @@ typedef struct anim_index_builder {
|
|||
void * private_data;
|
||||
|
||||
void (*delete_priv_data)(struct anim_index_builder * idx);
|
||||
void (*proc_frame)(struct anim_index_builder * idx,
|
||||
unsigned char * buffer,
|
||||
int data_size,
|
||||
struct anim_index_entry * entry);
|
||||
void (*proc_frame)(struct anim_index_builder * idx,
|
||||
unsigned char * buffer,
|
||||
int data_size,
|
||||
struct anim_index_entry * entry);
|
||||
} anim_index_builder;
|
||||
|
||||
anim_index_builder * IMB_index_builder_create(const char * name);
|
||||
void IMB_index_builder_add_entry(anim_index_builder * fp,
|
||||
int frameno, unsigned long long seek_pos,
|
||||
unsigned long long seek_pos_dts,
|
||||
unsigned long long pts);
|
||||
void IMB_index_builder_add_entry(
|
||||
anim_index_builder * fp,
|
||||
int frameno, unsigned long long seek_pos,
|
||||
unsigned long long seek_pos_dts,
|
||||
unsigned long long pts);
|
||||
|
||||
void IMB_index_builder_proc_frame(anim_index_builder * fp,
|
||||
unsigned char * buffer,
|
||||
int data_size,
|
||||
int frameno, unsigned long long seek_pos,
|
||||
unsigned long long seek_pos_dts,
|
||||
unsigned long long pts);
|
||||
void IMB_index_builder_proc_frame(
|
||||
anim_index_builder * fp,
|
||||
unsigned char * buffer,
|
||||
int data_size,
|
||||
int frameno, unsigned long long seek_pos,
|
||||
unsigned long long seek_pos_dts,
|
||||
unsigned long long pts);
|
||||
|
||||
void IMB_index_builder_finish(anim_index_builder * fp, int rollback);
|
||||
|
||||
|
@ -111,7 +113,7 @@ unsigned long long IMB_indexer_get_pts(struct anim_index * idx,
|
|||
int IMB_indexer_get_duration(struct anim_index * idx);
|
||||
|
||||
int IMB_indexer_can_scan(struct anim_index * idx,
|
||||
int old_frame_index, int new_frame_index);
|
||||
int old_frame_index, int new_frame_index);
|
||||
|
||||
void IMB_indexer_close(struct anim_index * idx);
|
||||
|
||||
|
|
|
@ -530,12 +530,12 @@ static int startffmpeg(struct anim * anim) {
|
|||
}
|
||||
|
||||
if (anim->ib_flags & IB_animdeinterlace) {
|
||||
avpicture_fill((AVPicture*) anim->pFrameDeinterlaced,
|
||||
MEM_callocN(avpicture_get_size(
|
||||
anim->pCodecCtx->pix_fmt,
|
||||
anim->x, anim->y),
|
||||
"ffmpeg deinterlace"),
|
||||
anim->pCodecCtx->pix_fmt, anim->x, anim->y);
|
||||
avpicture_fill((AVPicture*) anim->pFrameDeinterlaced,
|
||||
MEM_callocN(avpicture_get_size(
|
||||
anim->pCodecCtx->pix_fmt,
|
||||
anim->x, anim->y),
|
||||
"ffmpeg deinterlace"),
|
||||
anim->pCodecCtx->pix_fmt, anim->x, anim->y);
|
||||
}
|
||||
|
||||
if (pCodecCtx->has_b_frames) {
|
||||
|
@ -627,9 +627,9 @@ static void ffmpeg_postprocess(struct anim * anim)
|
|||
}
|
||||
}
|
||||
|
||||
avpicture_fill((AVPicture*) anim->pFrameRGB,
|
||||
(unsigned char*) ibuf->rect,
|
||||
PIX_FMT_RGBA, anim->x, anim->y);
|
||||
avpicture_fill((AVPicture*) anim->pFrameRGB,
|
||||
(unsigned char*) ibuf->rect,
|
||||
PIX_FMT_RGBA, anim->x, anim->y);
|
||||
|
||||
if (ENDIAN_ORDER == B_ENDIAN) {
|
||||
int * dstStride = anim->pFrameRGB->linesize;
|
||||
|
@ -641,12 +641,12 @@ static void ffmpeg_postprocess(struct anim * anim)
|
|||
unsigned char* top;
|
||||
|
||||
sws_scale(anim->img_convert_ctx,
|
||||
(const uint8_t * const *)input->data,
|
||||
input->linesize,
|
||||
0,
|
||||
anim->pCodecCtx->height,
|
||||
dst2,
|
||||
dstStride2);
|
||||
(const uint8_t * const *)input->data,
|
||||
input->linesize,
|
||||
0,
|
||||
anim->pCodecCtx->height,
|
||||
dst2,
|
||||
dstStride2);
|
||||
|
||||
/* workaround: sws_scale bug
|
||||
sets alpha = 0 and compensate
|
||||
|
@ -691,12 +691,12 @@ static void ffmpeg_postprocess(struct anim * anim)
|
|||
unsigned char* r;
|
||||
|
||||
sws_scale(anim->img_convert_ctx,
|
||||
(const uint8_t * const *)input->data,
|
||||
input->linesize,
|
||||
0,
|
||||
anim->pCodecCtx->height,
|
||||
dst2,
|
||||
dstStride2);
|
||||
(const uint8_t * const *)input->data,
|
||||
input->linesize,
|
||||
0,
|
||||
anim->pCodecCtx->height,
|
||||
dst2,
|
||||
dstStride2);
|
||||
|
||||
r = (unsigned char*) ibuf->rect;
|
||||
|
||||
|
@ -1024,10 +1024,10 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position,
|
|||
}
|
||||
|
||||
if (ret < 0) {
|
||||
av_log(anim->pFormatCtx, AV_LOG_ERROR,
|
||||
av_log(anim->pFormatCtx, AV_LOG_ERROR,
|
||||
"FETCH: "
|
||||
"error while seeking to DTS = %lld "
|
||||
"(frameno = %d, PTS = %lld): errcode = %d\n",
|
||||
"(frameno = %d, PTS = %lld): errcode = %d\n",
|
||||
pos, position, (long long int)pts_to_search, ret);
|
||||
}
|
||||
|
||||
|
@ -1125,7 +1125,7 @@ static ImBuf * redcode_fetchibuf(struct anim * anim, int position) {
|
|||
}
|
||||
|
||||
ibuf = IMB_allocImBuf(raw_frame->width * 2,
|
||||
raw_frame->height * 2, 32, IB_rectfloat);
|
||||
raw_frame->height * 2, 32, IB_rectfloat);
|
||||
|
||||
redcode_decode_video_float(raw_frame, ibuf->rect_float, 1);
|
||||
|
||||
|
|
|
@ -48,12 +48,12 @@ static char magic[] = "BlenMIdx";
|
|||
static char temp_ext [] = "_part";
|
||||
|
||||
static int proxy_sizes[] = { IMB_PROXY_25, IMB_PROXY_50, IMB_PROXY_75,
|
||||
IMB_PROXY_100 };
|
||||
IMB_PROXY_100 };
|
||||
static float proxy_fac[] = { 0.25, 0.50, 0.75, 1.00 };
|
||||
|
||||
#ifdef WITH_FFMPEG
|
||||
static int tc_types[] = { IMB_TC_RECORD_RUN, IMB_TC_FREE_RUN,
|
||||
IMB_TC_INTERPOLATED_REC_DATE_FREE_RUN };
|
||||
IMB_TC_INTERPOLATED_REC_DATE_FREE_RUN };
|
||||
#endif
|
||||
|
||||
#define INDEX_FILE_VERSION 1
|
||||
|
@ -73,9 +73,9 @@ extern void IMB_indexer_dv_new(anim_index_builder * idx);
|
|||
anim_index_builder * IMB_index_builder_create(const char * name)
|
||||
{
|
||||
|
||||
anim_index_builder * rv
|
||||
= MEM_callocN( sizeof(struct anim_index_builder),
|
||||
"index builder");
|
||||
anim_index_builder * rv
|
||||
= MEM_callocN( sizeof(struct anim_index_builder),
|
||||
"index builder");
|
||||
|
||||
fprintf(stderr, "Starting work on index: %s\n", name);
|
||||
|
||||
|
@ -197,13 +197,13 @@ struct anim_index * IMB_indexer_open(const char * name)
|
|||
* idx->num_entries, "anim_index_entries");
|
||||
|
||||
for (i = 0; i < idx->num_entries; i++) {
|
||||
fread(&idx->entries[i].frameno,
|
||||
fread(&idx->entries[i].frameno,
|
||||
sizeof(int), 1, fp);
|
||||
fread(&idx->entries[i].seek_pos,
|
||||
fread(&idx->entries[i].seek_pos,
|
||||
sizeof(unsigned long long), 1, fp);
|
||||
fread(&idx->entries[i].seek_pos_dts,
|
||||
fread(&idx->entries[i].seek_pos_dts,
|
||||
sizeof(unsigned long long), 1, fp);
|
||||
fread(&idx->entries[i].pts,
|
||||
fread(&idx->entries[i].pts,
|
||||
sizeof(unsigned long long), 1, fp);
|
||||
}
|
||||
|
||||
|
@ -392,7 +392,7 @@ static void get_proxy_filename(struct anim * anim, IMB_Proxy_Size preview_size,
|
|||
get_index_dir(anim, index_dir);
|
||||
|
||||
BLI_join_dirfile(fname, FILE_MAXFILE + FILE_MAXDIR, index_dir,
|
||||
temp ? proxy_temp_name : proxy_name);
|
||||
temp ? proxy_temp_name : proxy_name);
|
||||
}
|
||||
|
||||
static void get_tc_filename(struct anim * anim, IMB_Timecode_Type tc,
|
||||
|
@ -418,7 +418,7 @@ static void get_tc_filename(struct anim * anim, IMB_Timecode_Type tc,
|
|||
get_index_dir(anim, index_dir);
|
||||
|
||||
BLI_join_dirfile(fname, FILE_MAXFILE + FILE_MAXDIR,
|
||||
index_dir, index_name);
|
||||
index_dir, index_name);
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
|
@ -533,15 +533,16 @@ static struct proxy_output_ctx * alloc_proxy_output_ffmpeg(
|
|||
|
||||
rv->orig_height = st->codec->height;
|
||||
|
||||
if (st->codec->width != width || st->codec->height != height
|
||||
|| st->codec->pix_fmt != rv->c->pix_fmt) {
|
||||
if (st->codec->width != width || st->codec->height != height ||
|
||||
st->codec->pix_fmt != rv->c->pix_fmt)
|
||||
{
|
||||
rv->frame = avcodec_alloc_frame();
|
||||
avpicture_fill((AVPicture*) rv->frame,
|
||||
MEM_mallocN(avpicture_get_size(
|
||||
rv->c->pix_fmt,
|
||||
round_up(width, 16), height),
|
||||
"alloc proxy output frame"),
|
||||
rv->c->pix_fmt, round_up(width, 16), height);
|
||||
avpicture_fill((AVPicture*) rv->frame,
|
||||
MEM_mallocN(avpicture_get_size(
|
||||
rv->c->pix_fmt,
|
||||
round_up(width, 16), height),
|
||||
"alloc proxy output frame"),
|
||||
rv->c->pix_fmt, round_up(width, 16), height);
|
||||
|
||||
rv->sws_ctx = sws_getContext(
|
||||
st->codec->width,
|
||||
|
@ -567,12 +568,13 @@ static int add_to_proxy_output_ffmpeg(
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (ctx->sws_ctx && frame &&
|
||||
(frame->data[0] || frame->data[1] ||
|
||||
frame->data[2] || frame->data[3])) {
|
||||
if ( ctx->sws_ctx && frame &&
|
||||
(frame->data[0] || frame->data[1] ||
|
||||
frame->data[2] || frame->data[3]))
|
||||
{
|
||||
sws_scale(ctx->sws_ctx, (const uint8_t * const*) frame->data,
|
||||
frame->linesize, 0, ctx->orig_height,
|
||||
ctx->frame->data, ctx->frame->linesize);
|
||||
frame->linesize, 0, ctx->orig_height,
|
||||
ctx->frame->data, ctx->frame->linesize);
|
||||
}
|
||||
|
||||
frame = ctx->sws_ctx ? (frame ? ctx->frame : 0) : frame;
|
||||
|
@ -664,13 +666,13 @@ static void free_proxy_output_ffmpeg(struct proxy_output_ctx * ctx,
|
|||
}
|
||||
|
||||
get_proxy_filename(ctx->anim, ctx->proxy_size,
|
||||
fname_tmp, TRUE);
|
||||
fname_tmp, TRUE);
|
||||
|
||||
if (rollback) {
|
||||
unlink(fname_tmp);
|
||||
} else {
|
||||
get_proxy_filename(ctx->anim, ctx->proxy_size,
|
||||
fname, FALSE);
|
||||
fname, FALSE);
|
||||
rename(fname_tmp, fname);
|
||||
}
|
||||
|
||||
|
|
|
@ -219,14 +219,13 @@ static void memory_source(j_decompress_ptr cinfo, unsigned char *buffer, size_t
|
|||
* Note we do *not* do INPUT_SYNC before calling fill_input_buffer,
|
||||
* but we must reload the local copies after a successful fill.
|
||||
*/
|
||||
#define MAKE_BYTE_AVAIL(cinfo,action) \
|
||||
if (bytes_in_buffer == 0) { \
|
||||
if (! (*datasrc->fill_input_buffer) (cinfo)) \
|
||||
{ action; } \
|
||||
INPUT_RELOAD(cinfo); \
|
||||
#define MAKE_BYTE_AVAIL(cinfo, action) \
|
||||
if (bytes_in_buffer == 0) { \
|
||||
if (! (*datasrc->fill_input_buffer) (cinfo)) \
|
||||
{ action; } \
|
||||
INPUT_RELOAD(cinfo); \
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Read a byte into variable V.
|
||||
* If must suspend, take the specified action (typically "return FALSE").
|
||||
|
|
|
@ -190,10 +190,11 @@ int imb_savepng(struct ImBuf *ibuf, const char *name, int flags)
|
|||
ibuf->encodedsize = 0;
|
||||
|
||||
png_set_write_fn(png_ptr,
|
||||
(png_voidp) ibuf,
|
||||
WriteData,
|
||||
Flush);
|
||||
} else {
|
||||
(png_voidp) ibuf,
|
||||
WriteData,
|
||||
Flush);
|
||||
}
|
||||
else {
|
||||
fp = fopen(name, "wb");
|
||||
if (!fp) {
|
||||
png_destroy_write_struct(&png_ptr, &info_ptr);
|
||||
|
@ -218,14 +219,14 @@ int imb_savepng(struct ImBuf *ibuf, const char *name, int flags)
|
|||
|
||||
// png image settings
|
||||
png_set_IHDR(png_ptr,
|
||||
info_ptr,
|
||||
ibuf->x,
|
||||
ibuf->y,
|
||||
8,
|
||||
color_type,
|
||||
PNG_INTERLACE_NONE,
|
||||
PNG_COMPRESSION_TYPE_DEFAULT,
|
||||
PNG_FILTER_TYPE_DEFAULT);
|
||||
info_ptr,
|
||||
ibuf->x,
|
||||
ibuf->y,
|
||||
8,
|
||||
color_type,
|
||||
PNG_INTERLACE_NONE,
|
||||
PNG_COMPRESSION_TYPE_DEFAULT,
|
||||
PNG_FILTER_TYPE_DEFAULT);
|
||||
|
||||
/* image text info */
|
||||
if (ibuf->metadata) {
|
||||
|
|
|
@ -539,7 +539,7 @@ static void shrink_picture_byte(
|
|||
*dst++ = (val= (dst_line1[x].a * f) >> 15) > 255 ? 255: val;
|
||||
}
|
||||
memset(dst_line1, 0, dst_width *
|
||||
sizeof(struct scale_outpix_byte));
|
||||
sizeof(struct scale_outpix_byte));
|
||||
temp = dst_line1;
|
||||
dst_line1 = dst_line2;
|
||||
dst_line2 = temp;
|
||||
|
@ -740,7 +740,7 @@ static void shrink_picture_float(
|
|||
*dst++ = dst_line1[x].a * f;
|
||||
}
|
||||
memset(dst_line1, 0, dst_width *
|
||||
sizeof(struct scale_outpix_float));
|
||||
sizeof(struct scale_outpix_float));
|
||||
temp = dst_line1;
|
||||
dst_line1 = dst_line2;
|
||||
dst_line2 = temp;
|
||||
|
@ -803,21 +803,21 @@ static int q_scale_linear_interpolation(
|
|||
}
|
||||
|
||||
if (ibuf->rect) {
|
||||
unsigned char * newrect =
|
||||
MEM_mallocN(newx * newy * sizeof(int), "q_scale rect");
|
||||
unsigned char * newrect =
|
||||
MEM_mallocN(newx * newy * sizeof(int), "q_scale rect");
|
||||
q_scale_byte((unsigned char *)ibuf->rect, newrect, ibuf->x, ibuf->y,
|
||||
newx, newy);
|
||||
newx, newy);
|
||||
|
||||
imb_freerectImBuf(ibuf);
|
||||
ibuf->mall |= IB_rect;
|
||||
ibuf->rect = (unsigned int *) newrect;
|
||||
}
|
||||
if (ibuf->rect_float) {
|
||||
float * newrect =
|
||||
MEM_mallocN(newx * newy * 4 *sizeof(float),
|
||||
"q_scale rectfloat");
|
||||
float * newrect =
|
||||
MEM_mallocN(newx * newy * 4 *sizeof(float),
|
||||
"q_scale rectfloat");
|
||||
q_scale_float(ibuf->rect_float, newrect, ibuf->x, ibuf->y,
|
||||
newx, newy);
|
||||
newx, newy);
|
||||
imb_freerectfloatImBuf(ibuf);
|
||||
ibuf->mall |= IB_rectfloat;
|
||||
ibuf->rect_float = newrect;
|
||||
|
|
|
@ -64,7 +64,7 @@ static ImBuf *loadblend_thumb(gzFile gzfile)
|
|||
else
|
||||
return NULL;
|
||||
|
||||
sizeof_bhead = 16 + pointer_size;
|
||||
sizeof_bhead = 16 + pointer_size;
|
||||
|
||||
if(buf[8]=='V')
|
||||
endian= B_ENDIAN; /* big: PPC */
|
||||
|
|
|
@ -58,8 +58,8 @@ typedef struct IDProperty {
|
|||
IDPropertyData data; /* note, alignment for 64 bits */
|
||||
int len; /* array length, also (this is important!) string length + 1.
|
||||
the idea is to be able to reuse array realloc functions on strings.*/
|
||||
/*totallen is total length of allocated array/string, including a buffer.
|
||||
Note that the buffering is mild; the code comes from python's list implementation.*/
|
||||
/* totallen is total length of allocated array/string, including a buffer.
|
||||
* Note that the buffering is mild; the code comes from python's list implementation.*/
|
||||
int totallen; /*strings and arrays are both buffered, though the buffer isn't
|
||||
saved.*/
|
||||
} IDProperty;
|
||||
|
|
|
@ -296,9 +296,9 @@ typedef struct SoftBody {
|
|||
/* springs */
|
||||
float inspring; /* softbody inner springs */
|
||||
float infrict; /* softbody inner springs friction */
|
||||
char namedVG_Spring_K[32]; /* along with it introduce Spring_K painting
|
||||
starting to fix old bug .. nastyness that VG are indexes
|
||||
rather find them by name tag to find it -> jow20090613 */
|
||||
char namedVG_Spring_K[32]; /* along with it introduce Spring_K painting
|
||||
starting to fix old bug .. nastyness that VG are indexes
|
||||
rather find them by name tag to find it -> jow20090613 */
|
||||
|
||||
/* baking */
|
||||
int sfra, efra;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue