code cleanup: header cleanup and remove some duplicate defines.
This commit is contained in:
@@ -191,11 +191,11 @@ struct DerivedMesh {
|
|||||||
* and freed on the next ->release(). consider using getVert/Edge/Face if
|
* and freed on the next ->release(). consider using getVert/Edge/Face if
|
||||||
* you are only interested in a few verts/edges/faces.
|
* you are only interested in a few verts/edges/faces.
|
||||||
*/
|
*/
|
||||||
struct MVert *(*getVertArray)(DerivedMesh *dm);
|
struct MVert *(*getVertArray)(DerivedMesh * dm);
|
||||||
struct MEdge *(*getEdgeArray)(DerivedMesh *dm);
|
struct MEdge *(*getEdgeArray)(DerivedMesh * dm);
|
||||||
struct MFace *(*getTessFaceArray)(DerivedMesh *dm);
|
struct MFace *(*getTessFaceArray)(DerivedMesh * dm);
|
||||||
struct MLoop *(*getLoopArray)(DerivedMesh *dm);
|
struct MLoop *(*getLoopArray)(DerivedMesh * dm);
|
||||||
struct MPoly *(*getPolyArray)(DerivedMesh *dm);
|
struct MPoly *(*getPolyArray)(DerivedMesh * dm);
|
||||||
|
|
||||||
/* copy all verts/edges/faces from the derived mesh into
|
/* copy all verts/edges/faces from the derived mesh into
|
||||||
* *{vert/edge/face}_r (must point to a buffer large enough)
|
* *{vert/edge/face}_r (must point to a buffer large enough)
|
||||||
@@ -209,35 +209,35 @@ struct DerivedMesh {
|
|||||||
/* return a copy of all verts/edges/faces from the derived mesh
|
/* return a copy of all verts/edges/faces from the derived mesh
|
||||||
* it is the caller's responsibility to free the returned pointer
|
* it is the caller's responsibility to free the returned pointer
|
||||||
*/
|
*/
|
||||||
struct MVert *(*dupVertArray)(DerivedMesh *dm);
|
struct MVert *(*dupVertArray)(DerivedMesh * dm);
|
||||||
struct MEdge *(*dupEdgeArray)(DerivedMesh *dm);
|
struct MEdge *(*dupEdgeArray)(DerivedMesh * dm);
|
||||||
struct MFace *(*dupTessFaceArray)(DerivedMesh *dm);
|
struct MFace *(*dupTessFaceArray)(DerivedMesh * dm);
|
||||||
struct MLoop *(*dupLoopArray)(DerivedMesh *dm);
|
struct MLoop *(*dupLoopArray)(DerivedMesh * dm);
|
||||||
struct MPoly *(*dupPolyArray)(DerivedMesh *dm);
|
struct MPoly *(*dupPolyArray)(DerivedMesh * dm);
|
||||||
|
|
||||||
/* return a pointer to a single element of vert/edge/face custom data
|
/* return a pointer to a single element of vert/edge/face custom data
|
||||||
* from the derived mesh (this gives a pointer to the actual data, not
|
* from the derived mesh (this gives a pointer to the actual data, not
|
||||||
* a copy)
|
* a copy)
|
||||||
*/
|
*/
|
||||||
void *(*getVertData)(DerivedMesh *dm, int index, int type);
|
void *(*getVertData)(DerivedMesh * dm, int index, int type);
|
||||||
void *(*getEdgeData)(DerivedMesh *dm, int index, int type);
|
void *(*getEdgeData)(DerivedMesh * dm, int index, int type);
|
||||||
void *(*getTessFaceData)(DerivedMesh *dm, int index, int type);
|
void *(*getTessFaceData)(DerivedMesh * dm, int index, int type);
|
||||||
|
|
||||||
/* return a pointer to the entire array of vert/edge/face custom data
|
/* return a pointer to the entire array of vert/edge/face custom data
|
||||||
* from the derived mesh (this gives a pointer to the actual data, not
|
* from the derived mesh (this gives a pointer to the actual data, not
|
||||||
* a copy)
|
* a copy)
|
||||||
*/
|
*/
|
||||||
void *(*getVertDataArray)(DerivedMesh *dm, int type);
|
void *(*getVertDataArray)(DerivedMesh * dm, int type);
|
||||||
void *(*getEdgeDataArray)(DerivedMesh *dm, int type);
|
void *(*getEdgeDataArray)(DerivedMesh * dm, int type);
|
||||||
void *(*getTessFaceDataArray)(DerivedMesh *dm, int type);
|
void *(*getTessFaceDataArray)(DerivedMesh * dm, int type);
|
||||||
|
|
||||||
/* retrieves the base CustomData structures for
|
/* retrieves the base CustomData structures for
|
||||||
* verts/edges/tessfaces/loops/facdes*/
|
* verts/edges/tessfaces/loops/facdes*/
|
||||||
CustomData *(*getVertDataLayout)(DerivedMesh *dm);
|
CustomData *(*getVertDataLayout)(DerivedMesh * dm);
|
||||||
CustomData *(*getEdgeDataLayout)(DerivedMesh *dm);
|
CustomData *(*getEdgeDataLayout)(DerivedMesh * dm);
|
||||||
CustomData *(*getTessFaceDataLayout)(DerivedMesh *dm);
|
CustomData *(*getTessFaceDataLayout)(DerivedMesh * dm);
|
||||||
CustomData *(*getLoopDataLayout)(DerivedMesh *dm);
|
CustomData *(*getLoopDataLayout)(DerivedMesh * dm);
|
||||||
CustomData *(*getPolyDataLayout)(DerivedMesh *dm);
|
CustomData *(*getPolyDataLayout)(DerivedMesh * dm);
|
||||||
|
|
||||||
/*copies all customdata for an element source into dst at index dest*/
|
/*copies all customdata for an element source into dst at index dest*/
|
||||||
void (*copyFromVertCData)(DerivedMesh *dm, int source, CustomData *dst, int dest);
|
void (*copyFromVertCData)(DerivedMesh *dm, int source, CustomData *dst, int dest);
|
||||||
@@ -247,12 +247,12 @@ struct DerivedMesh {
|
|||||||
/* optional grid access for subsurf */
|
/* optional grid access for subsurf */
|
||||||
int (*getNumGrids)(DerivedMesh *dm);
|
int (*getNumGrids)(DerivedMesh *dm);
|
||||||
int (*getGridSize)(DerivedMesh *dm);
|
int (*getGridSize)(DerivedMesh *dm);
|
||||||
struct CCGElem **(*getGridData)(DerivedMesh *dm);
|
struct CCGElem **(*getGridData)(DerivedMesh * dm);
|
||||||
DMGridAdjacency *(*getGridAdjacency)(DerivedMesh *dm);
|
DMGridAdjacency *(*getGridAdjacency)(DerivedMesh * dm);
|
||||||
int *(*getGridOffset)(DerivedMesh *dm);
|
int *(*getGridOffset)(DerivedMesh * dm);
|
||||||
void (*getGridKey)(DerivedMesh *dm, struct CCGKey *key);
|
void (*getGridKey)(DerivedMesh *dm, struct CCGKey *key);
|
||||||
DMFlagMat *(*getGridFlagMats)(DerivedMesh *dm);
|
DMFlagMat *(*getGridFlagMats)(DerivedMesh * dm);
|
||||||
unsigned int **(*getGridHidden)(DerivedMesh *dm);
|
unsigned int **(*getGridHidden)(DerivedMesh * dm);
|
||||||
|
|
||||||
|
|
||||||
/* Iterate over each mapped vertex in the derived mesh, calling the
|
/* Iterate over each mapped vertex in the derived mesh, calling the
|
||||||
@@ -335,15 +335,15 @@ struct DerivedMesh {
|
|||||||
* Also called for *final* editmode DerivedMeshes
|
* Also called for *final* editmode DerivedMeshes
|
||||||
*/
|
*/
|
||||||
void (*drawFacesSolid)(DerivedMesh *dm, float (*partial_redraw_planes)[4],
|
void (*drawFacesSolid)(DerivedMesh *dm, float (*partial_redraw_planes)[4],
|
||||||
int fast, DMSetMaterial setMaterial);
|
int fast, DMSetMaterial setMaterial);
|
||||||
|
|
||||||
/* Draw all faces using MTFace
|
/* Draw all faces using MTFace
|
||||||
* o Drawing options too complicated to enumerate, look at code.
|
* o Drawing options too complicated to enumerate, look at code.
|
||||||
*/
|
*/
|
||||||
void (*drawFacesTex)(DerivedMesh *dm,
|
void (*drawFacesTex)(DerivedMesh *dm,
|
||||||
DMSetDrawOptionsTex setDrawOptions,
|
DMSetDrawOptionsTex setDrawOptions,
|
||||||
DMCompareDrawOptions compareDrawOptions,
|
DMCompareDrawOptions compareDrawOptions,
|
||||||
void *userData);
|
void *userData);
|
||||||
|
|
||||||
/* Draw all faces with GLSL materials
|
/* Draw all faces with GLSL materials
|
||||||
* o setMaterial is called for every different material nr
|
* o setMaterial is called for every different material nr
|
||||||
@@ -365,19 +365,19 @@ struct DerivedMesh {
|
|||||||
* smooth shaded.
|
* smooth shaded.
|
||||||
*/
|
*/
|
||||||
void (*drawMappedFaces)(DerivedMesh *dm,
|
void (*drawMappedFaces)(DerivedMesh *dm,
|
||||||
DMSetDrawOptions setDrawOptions,
|
DMSetDrawOptions setDrawOptions,
|
||||||
DMSetMaterial setMaterial,
|
DMSetMaterial setMaterial,
|
||||||
DMCompareDrawOptions compareDrawOptions,
|
DMCompareDrawOptions compareDrawOptions,
|
||||||
void *userData,
|
void *userData,
|
||||||
DMDrawFlag flag);
|
DMDrawFlag flag);
|
||||||
|
|
||||||
/* Draw mapped faces using MTFace
|
/* Draw mapped faces using MTFace
|
||||||
* o Drawing options too complicated to enumerate, look at code.
|
* o Drawing options too complicated to enumerate, look at code.
|
||||||
*/
|
*/
|
||||||
void (*drawMappedFacesTex)(DerivedMesh *dm,
|
void (*drawMappedFacesTex)(DerivedMesh *dm,
|
||||||
DMSetDrawOptions setDrawOptions,
|
DMSetDrawOptions setDrawOptions,
|
||||||
DMCompareDrawOptions compareDrawOptions,
|
DMCompareDrawOptions compareDrawOptions,
|
||||||
void *userData);
|
void *userData);
|
||||||
|
|
||||||
/* Draw mapped faces with GLSL materials
|
/* Draw mapped faces with GLSL materials
|
||||||
* o setMaterial is called for every different material nr
|
* o setMaterial is called for every different material nr
|
||||||
@@ -385,17 +385,17 @@ struct DerivedMesh {
|
|||||||
* o Only if setMaterial and setDrawOptions return true
|
* o Only if setMaterial and setDrawOptions return true
|
||||||
*/
|
*/
|
||||||
void (*drawMappedFacesGLSL)(DerivedMesh *dm,
|
void (*drawMappedFacesGLSL)(DerivedMesh *dm,
|
||||||
DMSetMaterial setMaterial,
|
DMSetMaterial setMaterial,
|
||||||
DMSetDrawOptions setDrawOptions,
|
DMSetDrawOptions setDrawOptions,
|
||||||
void *userData);
|
void *userData);
|
||||||
|
|
||||||
/* Draw mapped edges as lines
|
/* Draw mapped edges as lines
|
||||||
* o Only if !setDrawOptions or setDrawOptions(userData, mapped-edge)
|
* o Only if !setDrawOptions or setDrawOptions(userData, mapped-edge)
|
||||||
* returns true
|
* returns true
|
||||||
*/
|
*/
|
||||||
void (*drawMappedEdges)(DerivedMesh *dm,
|
void (*drawMappedEdges)(DerivedMesh *dm,
|
||||||
DMSetDrawOptions setDrawOptions,
|
DMSetDrawOptions setDrawOptions,
|
||||||
void *userData);
|
void *userData);
|
||||||
|
|
||||||
/* Draw mapped edges as lines with interpolation values
|
/* Draw mapped edges as lines with interpolation values
|
||||||
* o Only if !setDrawOptions or
|
* o Only if !setDrawOptions or
|
||||||
@@ -405,17 +405,17 @@ struct DerivedMesh {
|
|||||||
* NOTE: This routine is optional!
|
* NOTE: This routine is optional!
|
||||||
*/
|
*/
|
||||||
void (*drawMappedEdgesInterp)(DerivedMesh *dm,
|
void (*drawMappedEdgesInterp)(DerivedMesh *dm,
|
||||||
DMSetDrawOptions setDrawOptions,
|
DMSetDrawOptions setDrawOptions,
|
||||||
DMSetDrawInterpOptions setDrawInterpOptions,
|
DMSetDrawInterpOptions setDrawInterpOptions,
|
||||||
void *userData);
|
void *userData);
|
||||||
|
|
||||||
/* Draw all faces with materials
|
/* Draw all faces with materials
|
||||||
* o setMaterial is called for every different material nr
|
* o setMaterial is called for every different material nr
|
||||||
* o setFace is called to verify if a face must be hidden
|
* o setFace is called to verify if a face must be hidden
|
||||||
*/
|
*/
|
||||||
void (*drawMappedFacesMat)(DerivedMesh *dm,
|
void (*drawMappedFacesMat)(DerivedMesh *dm,
|
||||||
void (*setMaterial)(void *userData, int, void *attribs),
|
void (*setMaterial)(void *userData, int, void *attribs),
|
||||||
int (*setFace)(void *userData, int index), void *userData);
|
int (*setFace)(void *userData, int index), void *userData);
|
||||||
|
|
||||||
/* Release reference to the DerivedMesh. This function decides internally
|
/* Release reference to the DerivedMesh. This function decides internally
|
||||||
* if the DerivedMesh will be freed, or cached for later use. */
|
* if the DerivedMesh will be freed, or cached for later use. */
|
||||||
@@ -438,9 +438,9 @@ void DM_init(DerivedMesh *dm, DerivedMeshType type, int numVerts, int numEdges,
|
|||||||
* of vertices, edges and faces, with a layer setup copied from source
|
* of vertices, edges and faces, with a layer setup copied from source
|
||||||
*/
|
*/
|
||||||
void DM_from_template(DerivedMesh *dm, DerivedMesh *source,
|
void DM_from_template(DerivedMesh *dm, DerivedMesh *source,
|
||||||
DerivedMeshType type,
|
DerivedMeshType type,
|
||||||
int numVerts, int numEdges, int numFaces,
|
int numVerts, int numEdges, int numFaces,
|
||||||
int numLoops, int numPolys);
|
int numLoops, int numPolys);
|
||||||
|
|
||||||
/* utility function to release a DerivedMesh's layers
|
/* utility function to release a DerivedMesh's layers
|
||||||
* returns 1 if DerivedMesh has to be released by the backend, 0 otherwise
|
* returns 1 if DerivedMesh has to be released by the backend, 0 otherwise
|
||||||
@@ -518,15 +518,15 @@ void DM_set_tessface_data(struct DerivedMesh *dm, int index, int type, void *dat
|
|||||||
* these copy all layers for which the CD_FLAG_NOCOPY flag is not set
|
* these copy all layers for which the CD_FLAG_NOCOPY flag is not set
|
||||||
*/
|
*/
|
||||||
void DM_copy_vert_data(struct DerivedMesh *source, struct DerivedMesh *dest,
|
void DM_copy_vert_data(struct DerivedMesh *source, struct DerivedMesh *dest,
|
||||||
int source_index, int dest_index, int count);
|
|
||||||
void DM_copy_edge_data(struct DerivedMesh *source, struct DerivedMesh *dest,
|
|
||||||
int source_index, int dest_index, int count);
|
|
||||||
void DM_copy_tessface_data(struct DerivedMesh *source, struct DerivedMesh *dest,
|
|
||||||
int source_index, int dest_index, int count);
|
int source_index, int dest_index, int count);
|
||||||
|
void DM_copy_edge_data(struct DerivedMesh *source, struct DerivedMesh *dest,
|
||||||
|
int source_index, int dest_index, int count);
|
||||||
|
void DM_copy_tessface_data(struct DerivedMesh *source, struct DerivedMesh *dest,
|
||||||
|
int source_index, int dest_index, int count);
|
||||||
void DM_copy_loop_data(struct DerivedMesh *source, struct DerivedMesh *dest,
|
void DM_copy_loop_data(struct DerivedMesh *source, struct DerivedMesh *dest,
|
||||||
int source_index, int dest_index, int count);
|
int source_index, int dest_index, int count);
|
||||||
void DM_copy_poly_data(struct DerivedMesh *source, struct DerivedMesh *dest,
|
void DM_copy_poly_data(struct DerivedMesh *source, struct DerivedMesh *dest,
|
||||||
int source_index, int dest_index, int count);
|
int source_index, int dest_index, int count);
|
||||||
|
|
||||||
/* custom data free functions
|
/* custom data free functions
|
||||||
* free count elements, starting at index
|
* free count elements, starting at index
|
||||||
@@ -550,8 +550,8 @@ void DM_update_tessface_data(DerivedMesh *dm);
|
|||||||
* indexed by dest_index in the dest mesh
|
* indexed by dest_index in the dest mesh
|
||||||
*/
|
*/
|
||||||
void DM_interp_vert_data(struct DerivedMesh *source, struct DerivedMesh *dest,
|
void DM_interp_vert_data(struct DerivedMesh *source, struct DerivedMesh *dest,
|
||||||
int *src_indices, float *weights,
|
int *src_indices, float *weights,
|
||||||
int count, int dest_index);
|
int count, int dest_index);
|
||||||
|
|
||||||
/* interpolates edge data from the edges indexed by src_indices in the
|
/* interpolates edge data from the edges indexed by src_indices in the
|
||||||
* source mesh using the given weights and stores the result in the edge indexed
|
* source mesh using the given weights and stores the result in the edge indexed
|
||||||
@@ -562,9 +562,9 @@ void DM_interp_vert_data(struct DerivedMesh *source, struct DerivedMesh *dest,
|
|||||||
*/
|
*/
|
||||||
typedef float EdgeVertWeight[SUB_ELEMS_EDGE][SUB_ELEMS_EDGE];
|
typedef float EdgeVertWeight[SUB_ELEMS_EDGE][SUB_ELEMS_EDGE];
|
||||||
void DM_interp_edge_data(struct DerivedMesh *source, struct DerivedMesh *dest,
|
void DM_interp_edge_data(struct DerivedMesh *source, struct DerivedMesh *dest,
|
||||||
int *src_indices,
|
int *src_indices,
|
||||||
float *weights, EdgeVertWeight *vert_weights,
|
float *weights, EdgeVertWeight *vert_weights,
|
||||||
int count, int dest_index);
|
int count, int dest_index);
|
||||||
|
|
||||||
/* interpolates face data from the faces indexed by src_indices in the
|
/* interpolates face data from the faces indexed by src_indices in the
|
||||||
* source mesh using the given weights and stores the result in the face indexed
|
* source mesh using the given weights and stores the result in the face indexed
|
||||||
@@ -575,9 +575,9 @@ void DM_interp_edge_data(struct DerivedMesh *source, struct DerivedMesh *dest,
|
|||||||
*/
|
*/
|
||||||
typedef float FaceVertWeight[SUB_ELEMS_FACE][SUB_ELEMS_FACE];
|
typedef float FaceVertWeight[SUB_ELEMS_FACE][SUB_ELEMS_FACE];
|
||||||
void DM_interp_tessface_data(struct DerivedMesh *source, struct DerivedMesh *dest,
|
void DM_interp_tessface_data(struct DerivedMesh *source, struct DerivedMesh *dest,
|
||||||
int *src_indices,
|
int *src_indices,
|
||||||
float *weights, FaceVertWeight *vert_weights,
|
float *weights, FaceVertWeight *vert_weights,
|
||||||
int count, int dest_index);
|
int count, int dest_index);
|
||||||
|
|
||||||
void DM_swap_tessface_data(struct DerivedMesh *dm, int index, const int *corner_indices);
|
void DM_swap_tessface_data(struct DerivedMesh *dm, int index, const int *corner_indices);
|
||||||
|
|
||||||
@@ -597,54 +597,54 @@ void vDM_ColorBand_store(struct ColorBand *coba);
|
|||||||
* In use now by vertex/weight paint and particles */
|
* In use now by vertex/weight paint and particles */
|
||||||
float *mesh_get_mapped_verts_nors(struct Scene *scene, struct Object *ob);
|
float *mesh_get_mapped_verts_nors(struct Scene *scene, struct Object *ob);
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
DerivedMesh *mesh_get_derived_final(struct Scene *scene, struct Object *ob,
|
DerivedMesh *mesh_get_derived_final(struct Scene *scene, struct Object *ob,
|
||||||
CustomDataMask dataMask);
|
CustomDataMask dataMask);
|
||||||
DerivedMesh *mesh_get_derived_deform(struct Scene *scene, struct Object *ob,
|
DerivedMesh *mesh_get_derived_deform(struct Scene *scene, struct Object *ob,
|
||||||
CustomDataMask dataMask);
|
CustomDataMask dataMask);
|
||||||
|
|
||||||
DerivedMesh *mesh_create_derived_for_modifier(struct Scene *scene, struct Object *ob,
|
DerivedMesh *mesh_create_derived_for_modifier(struct Scene *scene, struct Object *ob,
|
||||||
struct ModifierData *md, int build_shapekey_layers);
|
struct ModifierData *md, int build_shapekey_layers);
|
||||||
|
|
||||||
DerivedMesh *mesh_create_derived_render(struct Scene *scene, struct Object *ob,
|
DerivedMesh *mesh_create_derived_render(struct Scene *scene, struct Object *ob,
|
||||||
CustomDataMask dataMask);
|
CustomDataMask dataMask);
|
||||||
|
|
||||||
DerivedMesh *getEditDerivedBMesh(struct BMEditMesh *em, struct Object *ob,
|
DerivedMesh *getEditDerivedBMesh(struct BMEditMesh *em, struct Object *ob,
|
||||||
float (*vertexCos)[3]);
|
float (*vertexCos)[3]);
|
||||||
|
|
||||||
DerivedMesh *mesh_create_derived_index_render(struct Scene *scene, struct Object *ob, CustomDataMask dataMask, int index);
|
DerivedMesh *mesh_create_derived_index_render(struct Scene *scene, struct Object *ob, CustomDataMask dataMask, int index);
|
||||||
|
|
||||||
/* same as above but wont use render settings */
|
/* same as above but wont use render settings */
|
||||||
DerivedMesh *mesh_create_derived(struct Mesh *me, struct Object *ob, float (*vertCos)[3]);
|
DerivedMesh *mesh_create_derived(struct Mesh *me, struct Object *ob, float (*vertCos)[3]);
|
||||||
DerivedMesh *mesh_create_derived_view(struct Scene *scene, struct Object *ob,
|
DerivedMesh *mesh_create_derived_view(struct Scene *scene, struct Object *ob,
|
||||||
CustomDataMask dataMask);
|
CustomDataMask dataMask);
|
||||||
DerivedMesh *mesh_create_derived_no_deform(struct Scene *scene, struct Object *ob,
|
DerivedMesh *mesh_create_derived_no_deform(struct Scene *scene, struct Object *ob,
|
||||||
float (*vertCos)[3],
|
float (*vertCos)[3],
|
||||||
CustomDataMask dataMask);
|
CustomDataMask dataMask);
|
||||||
DerivedMesh *mesh_create_derived_no_deform_render(struct Scene *scene, struct Object *ob,
|
DerivedMesh *mesh_create_derived_no_deform_render(struct Scene *scene, struct Object *ob,
|
||||||
float (*vertCos)[3],
|
float (*vertCos)[3],
|
||||||
CustomDataMask dataMask);
|
CustomDataMask dataMask);
|
||||||
/* for gameengine */
|
/* for gameengine */
|
||||||
DerivedMesh *mesh_create_derived_no_virtual(struct Scene *scene, struct Object *ob, float (*vertCos)[3],
|
DerivedMesh *mesh_create_derived_no_virtual(struct Scene *scene, struct Object *ob, float (*vertCos)[3],
|
||||||
CustomDataMask dataMask);
|
CustomDataMask dataMask);
|
||||||
DerivedMesh *mesh_create_derived_physics(struct Scene *scene, struct Object *ob, float (*vertCos)[3],
|
DerivedMesh *mesh_create_derived_physics(struct Scene *scene, struct Object *ob, float (*vertCos)[3],
|
||||||
CustomDataMask dataMask);
|
CustomDataMask dataMask);
|
||||||
|
|
||||||
DerivedMesh *editbmesh_get_derived_base(struct Object *, struct BMEditMesh *em);
|
DerivedMesh *editbmesh_get_derived_base(struct Object *, struct BMEditMesh *em);
|
||||||
DerivedMesh *editbmesh_get_derived_cage(struct Scene *scene, struct Object *,
|
DerivedMesh *editbmesh_get_derived_cage(struct Scene *scene, struct Object *,
|
||||||
struct BMEditMesh *em, CustomDataMask dataMask);
|
struct BMEditMesh *em, CustomDataMask dataMask);
|
||||||
DerivedMesh *editbmesh_get_derived_cage_and_final(struct Scene *scene, struct Object *,
|
DerivedMesh *editbmesh_get_derived_cage_and_final(struct Scene *scene, struct Object *,
|
||||||
struct BMEditMesh *em, DerivedMesh **final_r,
|
struct BMEditMesh *em, DerivedMesh **final_r,
|
||||||
CustomDataMask dataMask);
|
CustomDataMask dataMask);
|
||||||
float (*editbmesh_get_vertex_cos(struct BMEditMesh *em, int *numVerts_r))[3];
|
float (*editbmesh_get_vertex_cos(struct BMEditMesh *em, int *numVerts_r))[3];
|
||||||
int editbmesh_modifier_is_enabled(struct Scene *scene, struct ModifierData *md, DerivedMesh *dm);
|
int editbmesh_modifier_is_enabled(struct Scene *scene, struct ModifierData *md, DerivedMesh *dm);
|
||||||
void makeDerivedMesh(struct Scene *scene, struct Object *ob, struct BMEditMesh *em,
|
void makeDerivedMesh(struct Scene *scene, struct Object *ob, struct BMEditMesh *em,
|
||||||
CustomDataMask dataMask, int build_shapekey_layers);
|
CustomDataMask dataMask, int build_shapekey_layers);
|
||||||
|
|
||||||
/* returns an array of deform matrices for crazyspace correction, and the
|
/* returns an array of deform matrices for crazyspace correction, and the
|
||||||
* number of modifiers left */
|
* number of modifiers left */
|
||||||
int editbmesh_get_first_deform_matrices(struct Scene *, struct Object *, struct BMEditMesh *em,
|
int editbmesh_get_first_deform_matrices(struct Scene *, struct Object *, struct BMEditMesh *em,
|
||||||
float (**deformmats)[3][3], float (**deformcos)[3]);
|
float (**deformmats)[3][3], float (**deformcos)[3]);
|
||||||
|
|
||||||
void weight_to_rgb(float r_rgb[3], const float weight);
|
void weight_to_rgb(float r_rgb[3], const float weight);
|
||||||
/* Update the weight MCOL preview layer.
|
/* Update the weight MCOL preview layer.
|
||||||
@@ -684,7 +684,7 @@ typedef struct DMVertexAttribs {
|
|||||||
} DMVertexAttribs;
|
} DMVertexAttribs;
|
||||||
|
|
||||||
void DM_vertex_attributes_from_gpu(DerivedMesh *dm,
|
void DM_vertex_attributes_from_gpu(DerivedMesh *dm,
|
||||||
struct GPUVertexAttribs *gattribs, DMVertexAttribs *attribs);
|
struct GPUVertexAttribs *gattribs, DMVertexAttribs *attribs);
|
||||||
|
|
||||||
void DM_add_tangent_layer(DerivedMesh *dm);
|
void DM_add_tangent_layer(DerivedMesh *dm);
|
||||||
void DM_calc_auto_bump_scale(DerivedMesh *dm);
|
void DM_calc_auto_bump_scale(DerivedMesh *dm);
|
||||||
|
@@ -71,24 +71,24 @@ void BKE_action_make_local(struct bAction *act);
|
|||||||
/* Action API ----------------- */
|
/* Action API ----------------- */
|
||||||
|
|
||||||
/* types of transforms applied to the given item
|
/* types of transforms applied to the given item
|
||||||
* - these are the return falgs for action_get_item_transforms()
|
* - these are the return falgs for action_get_item_transforms()
|
||||||
*/
|
*/
|
||||||
typedef enum eAction_TransformFlags {
|
typedef enum eAction_TransformFlags {
|
||||||
/* location */
|
/* location */
|
||||||
ACT_TRANS_LOC = (1<<0),
|
ACT_TRANS_LOC = (1 << 0),
|
||||||
/* rotation */
|
/* rotation */
|
||||||
ACT_TRANS_ROT = (1<<1),
|
ACT_TRANS_ROT = (1 << 1),
|
||||||
/* scaling */
|
/* scaling */
|
||||||
ACT_TRANS_SCALE = (1<<2),
|
ACT_TRANS_SCALE = (1 << 2),
|
||||||
|
|
||||||
/* strictly not a transform, but custom properties are also
|
/* strictly not a transform, but custom properties are also
|
||||||
* quite often used in modern rigs
|
* quite often used in modern rigs
|
||||||
*/
|
*/
|
||||||
ACT_TRANS_PROP = (1<<3),
|
ACT_TRANS_PROP = (1 << 3),
|
||||||
|
|
||||||
/* all flags */
|
/* all flags */
|
||||||
ACT_TRANS_ONLY = (ACT_TRANS_LOC|ACT_TRANS_ROT|ACT_TRANS_SCALE),
|
ACT_TRANS_ONLY = (ACT_TRANS_LOC | ACT_TRANS_ROT | ACT_TRANS_SCALE),
|
||||||
ACT_TRANS_ALL = (ACT_TRANS_ONLY|ACT_TRANS_PROP)
|
ACT_TRANS_ALL = (ACT_TRANS_ONLY | ACT_TRANS_PROP)
|
||||||
} eAction_TransformFlags;
|
} eAction_TransformFlags;
|
||||||
|
|
||||||
/* Return flags indicating which transforms the given object/posechannel has
|
/* Return flags indicating which transforms the given object/posechannel has
|
||||||
@@ -182,7 +182,7 @@ struct bPoseChannel *BKE_pose_channel_active(struct Object *ob);
|
|||||||
* already exists in this pose - if not a new one is
|
* already exists in this pose - if not a new one is
|
||||||
* allocated and initialized.
|
* allocated and initialized.
|
||||||
*/
|
*/
|
||||||
struct bPoseChannel *BKE_pose_channel_verify(struct bPose* pose, const char* name);
|
struct bPoseChannel *BKE_pose_channel_verify(struct bPose *pose, const char *name);
|
||||||
|
|
||||||
/* Copy the data from the action-pose (src) into the pose */
|
/* Copy the data from the action-pose (src) into the pose */
|
||||||
void extract_pose_from_pose(struct bPose *pose, const struct bPose *src);
|
void extract_pose_from_pose(struct bPose *pose, const struct bPose *src);
|
||||||
|
@@ -46,28 +46,26 @@ struct Mesh;
|
|||||||
struct PoseTree;
|
struct PoseTree;
|
||||||
struct ListBase;
|
struct ListBase;
|
||||||
|
|
||||||
typedef struct PoseTarget
|
typedef struct PoseTarget {
|
||||||
{
|
|
||||||
struct PoseTarget *next, *prev;
|
struct PoseTarget *next, *prev;
|
||||||
|
|
||||||
struct bConstraint *con; /* the constrait of this target */
|
struct bConstraint *con; /* the constrait of this target */
|
||||||
int tip; /* index of tip pchan in PoseTree */
|
int tip; /* index of tip pchan in PoseTree */
|
||||||
} PoseTarget;
|
} PoseTarget;
|
||||||
|
|
||||||
typedef struct PoseTree
|
typedef struct PoseTree {
|
||||||
{
|
|
||||||
struct PoseTree *next, *prev;
|
struct PoseTree *next, *prev;
|
||||||
|
|
||||||
int type; /* type of IK that this serves (CONSTRAINT_TYPE_KINEMATIC or ..._SPLINEIK) */
|
int type; /* type of IK that this serves (CONSTRAINT_TYPE_KINEMATIC or ..._SPLINEIK) */
|
||||||
int totchannel; /* number of pose channels */
|
int totchannel; /* number of pose channels */
|
||||||
|
|
||||||
struct ListBase targets; /* list of targets of the tree */
|
struct ListBase targets; /* list of targets of the tree */
|
||||||
struct bPoseChannel **pchan; /* array of pose channels */
|
struct bPoseChannel **pchan; /* array of pose channels */
|
||||||
int *parent; /* and their parents */
|
int *parent; /* and their parents */
|
||||||
|
|
||||||
float (*basis_change)[3][3]; /* basis change result from solver */
|
float (*basis_change)[3][3]; /* basis change result from solver */
|
||||||
int iterations; /* iterations from the constraint */
|
int iterations; /* iterations from the constraint */
|
||||||
int stretch; /* disable stretching */
|
int stretch; /* disable stretching */
|
||||||
} PoseTree;
|
} PoseTree;
|
||||||
|
|
||||||
/* Core armature functionality */
|
/* Core armature functionality */
|
||||||
@@ -77,7 +75,7 @@ extern "C" {
|
|||||||
|
|
||||||
struct bArmature *BKE_armature_add(const char *name);
|
struct bArmature *BKE_armature_add(const char *name);
|
||||||
struct bArmature *BKE_armature_from_object(struct Object *ob);
|
struct bArmature *BKE_armature_from_object(struct Object *ob);
|
||||||
void BKE_armature_bonelist_free (struct ListBase *lb);
|
void BKE_armature_bonelist_free(struct ListBase *lb);
|
||||||
void BKE_armature_free(struct bArmature *arm);
|
void BKE_armature_free(struct bArmature *arm);
|
||||||
void BKE_armature_make_local(struct bArmature *arm);
|
void BKE_armature_make_local(struct bArmature *arm);
|
||||||
struct bArmature *BKE_armature_copy(struct bArmature *arm);
|
struct bArmature *BKE_armature_copy(struct bArmature *arm);
|
||||||
@@ -85,9 +83,9 @@ struct bArmature *BKE_armature_copy(struct bArmature *arm);
|
|||||||
/* Bounding box. */
|
/* Bounding box. */
|
||||||
struct BoundBox *BKE_armature_boundbox_get(struct Object *ob);
|
struct BoundBox *BKE_armature_boundbox_get(struct Object *ob);
|
||||||
|
|
||||||
int bone_autoside_name (char name[64], int strip_number, short axis, float head, float tail);
|
int bone_autoside_name(char name[64], int strip_number, short axis, float head, float tail);
|
||||||
|
|
||||||
struct Bone *BKE_armature_find_bone_name (struct bArmature *arm, const char *name);
|
struct Bone *BKE_armature_find_bone_name(struct bArmature *arm, const char *name);
|
||||||
|
|
||||||
float distfactor_to_bone(const float vec[3], const float b1[3], const float b2[3], float r1, float r2, float rdist);
|
float distfactor_to_bone(const float vec[3], const float b1[3], const float b2[3], float r1, float r2, float rdist);
|
||||||
|
|
||||||
@@ -99,7 +97,7 @@ void BKE_pose_where_is_bone(struct Scene *scene, struct Object *ob, struct bPose
|
|||||||
void BKE_pose_where_is_bone_tail(struct bPoseChannel *pchan);
|
void BKE_pose_where_is_bone_tail(struct bPoseChannel *pchan);
|
||||||
|
|
||||||
/* get_objectspace_bone_matrix has to be removed still */
|
/* get_objectspace_bone_matrix has to be removed still */
|
||||||
void get_objectspace_bone_matrix (struct Bone* bone, float M_accumulatedMatrix[][4], int root, int posed);
|
void get_objectspace_bone_matrix(struct Bone *bone, float M_accumulatedMatrix[][4], int root, int posed);
|
||||||
void vec_roll_to_mat3(const float vec[3], const float roll, float mat[][3]);
|
void vec_roll_to_mat3(const float vec[3], const float roll, float mat[][3]);
|
||||||
void mat3_to_vec_roll(float mat[][3], float *vec, float *roll);
|
void mat3_to_vec_roll(float mat[][3], float *vec, float *roll);
|
||||||
|
|
||||||
|
@@ -41,17 +41,17 @@ extern "C" {
|
|||||||
/* these lines are grep'd, watch out for our not-so-awesome regex
|
/* these lines are grep'd, watch out for our not-so-awesome regex
|
||||||
* and keep comment above the defines.
|
* and keep comment above the defines.
|
||||||
* Use STRINGIFY() rather than defining with quotes */
|
* Use STRINGIFY() rather than defining with quotes */
|
||||||
#define BLENDER_VERSION 263
|
#define BLENDER_VERSION 263
|
||||||
#define BLENDER_SUBVERSION 5
|
#define BLENDER_SUBVERSION 5
|
||||||
|
|
||||||
#define BLENDER_MINVERSION 250
|
#define BLENDER_MINVERSION 250
|
||||||
#define BLENDER_MINSUBVERSION 0
|
#define BLENDER_MINSUBVERSION 0
|
||||||
|
|
||||||
/* used by packaging tools */
|
/* used by packaging tools */
|
||||||
/* can be left blank, otherwise a,b,c... etc with no quotes */
|
/* can be left blank, otherwise a,b,c... etc with no quotes */
|
||||||
#define BLENDER_VERSION_CHAR
|
#define BLENDER_VERSION_CHAR
|
||||||
/* alpha/beta/rc/release, docs use this */
|
/* alpha/beta/rc/release, docs use this */
|
||||||
#define BLENDER_VERSION_CYCLE alpha
|
#define BLENDER_VERSION_CYCLE alpha
|
||||||
|
|
||||||
extern char versionstr[]; /* from blender.c */
|
extern char versionstr[]; /* from blender.c */
|
||||||
|
|
||||||
@@ -64,11 +64,11 @@ struct Main;
|
|||||||
|
|
||||||
int BKE_read_file(struct bContext *C, const char *filepath, struct ReportList *reports);
|
int BKE_read_file(struct bContext *C, const char *filepath, struct ReportList *reports);
|
||||||
|
|
||||||
#define BKE_READ_FILE_FAIL 0 /* no load */
|
#define BKE_READ_FILE_FAIL 0 /* no load */
|
||||||
#define BKE_READ_FILE_OK 1 /* OK */
|
#define BKE_READ_FILE_OK 1 /* OK */
|
||||||
#define BKE_READ_FILE_OK_USERPREFS 2 /* OK, and with new user settings */
|
#define BKE_READ_FILE_OK_USERPREFS 2 /* OK, and with new user settings */
|
||||||
|
|
||||||
int BKE_read_file_from_memory(struct bContext *C, char* filebuf, int filelength, struct ReportList *reports);
|
int BKE_read_file_from_memory(struct bContext *C, char *filebuf, int filelength, struct ReportList *reports);
|
||||||
int BKE_read_file_from_memfile(struct bContext *C, struct MemFile *memfile, struct ReportList *reports);
|
int BKE_read_file_from_memfile(struct bContext *C, struct MemFile *memfile, struct ReportList *reports);
|
||||||
|
|
||||||
void free_blender(void);
|
void free_blender(void);
|
||||||
|
@@ -42,28 +42,28 @@
|
|||||||
|
|
||||||
/* bevel tool defines */
|
/* bevel tool defines */
|
||||||
/* element flags */
|
/* element flags */
|
||||||
#define BME_BEVEL_ORIG 1
|
#define BME_BEVEL_ORIG 1
|
||||||
#define BME_BEVEL_BEVEL (1<<1)
|
#define BME_BEVEL_BEVEL (1 << 1)
|
||||||
#define BME_BEVEL_NONMAN (1<<2)
|
#define BME_BEVEL_NONMAN (1 << 2)
|
||||||
#define BME_BEVEL_WIRE (1<<3)
|
#define BME_BEVEL_WIRE (1 << 3)
|
||||||
|
|
||||||
/* tool options */
|
/* tool options */
|
||||||
#define BME_BEVEL_SELECT 1
|
#define BME_BEVEL_SELECT 1
|
||||||
#define BME_BEVEL_VERT (1<<1)
|
#define BME_BEVEL_VERT (1 << 1)
|
||||||
#define BME_BEVEL_RADIUS (1<<2)
|
#define BME_BEVEL_RADIUS (1 << 2)
|
||||||
#define BME_BEVEL_ANGLE (1<<3)
|
#define BME_BEVEL_ANGLE (1 << 3)
|
||||||
#define BME_BEVEL_WEIGHT (1<<4)
|
#define BME_BEVEL_WEIGHT (1 << 4)
|
||||||
//~ #define BME_BEVEL_EWEIGHT (1<<4)
|
//~ #define BME_BEVEL_EWEIGHT (1<<4)
|
||||||
//~ #define BME_BEVEL_VWEIGHT (1<<5)
|
//~ #define BME_BEVEL_VWEIGHT (1<<5)
|
||||||
#define BME_BEVEL_PERCENT (1<<6)
|
#define BME_BEVEL_PERCENT (1 << 6)
|
||||||
#define BME_BEVEL_EMIN (1<<7)
|
#define BME_BEVEL_EMIN (1 << 7)
|
||||||
#define BME_BEVEL_EMAX (1<<8)
|
#define BME_BEVEL_EMAX (1 << 8)
|
||||||
#define BME_BEVEL_RUNNING (1<<9)
|
#define BME_BEVEL_RUNNING (1 << 9)
|
||||||
#define BME_BEVEL_RES (1<<10)
|
#define BME_BEVEL_RES (1 << 10)
|
||||||
|
|
||||||
#define BME_BEVEL_EVEN (1<<11) /* this is a new setting not related to old (trunk bmesh bevel code) but adding
|
#define BME_BEVEL_EVEN (1 << 11) /* this is a new setting not related to old (trunk bmesh bevel code) but adding
|
||||||
* here because they are mixed - campbell */
|
* here because they are mixed - campbell */
|
||||||
#define BME_BEVEL_DIST (1<<12) /* same as above */
|
#define BME_BEVEL_DIST (1 << 12) /* same as above */
|
||||||
|
|
||||||
typedef struct BME_TransData {
|
typedef struct BME_TransData {
|
||||||
struct BMesh *bm; /* the bmesh the vert belongs to */
|
struct BMesh *bm; /* the bmesh the vert belongs to */
|
||||||
@@ -74,11 +74,11 @@ typedef struct BME_TransData {
|
|||||||
void *loc; /* a pointer to the data to transform (likely the vert's cos) */
|
void *loc; /* a pointer to the data to transform (likely the vert's cos) */
|
||||||
float factor; /* primary scaling factor; also accumulates number of weighted edges for beveling tool */
|
float factor; /* primary scaling factor; also accumulates number of weighted edges for beveling tool */
|
||||||
float weight; /* another scaling factor; used primarily for propogating vertex weights to transforms; */
|
float weight; /* another scaling factor; used primarily for propogating vertex weights to transforms; */
|
||||||
/* weight is also used across recursive bevels to help with the math */
|
/* weight is also used across recursive bevels to help with the math */
|
||||||
float maxfactor; /* the unscaled, original factor (used only by "edge verts" in recursive beveling) */
|
float maxfactor; /* the unscaled, original factor (used only by "edge verts" in recursive beveling) */
|
||||||
float *max; /* the maximum distance this vert can be transformed; negative is infinite
|
float *max; /* the maximum distance this vert can be transformed; negative is infinite
|
||||||
* it points to the "parent" maxfactor (where maxfactor makes little sense)
|
* it points to the "parent" maxfactor (where maxfactor makes little sense)
|
||||||
* where the max limit is stored (limits are stored per-corner) */
|
* where the max limit is stored (limits are stored per-corner) */
|
||||||
} BME_TransData;
|
} BME_TransData;
|
||||||
|
|
||||||
typedef struct BME_TransData_Head {
|
typedef struct BME_TransData_Head {
|
||||||
|
@@ -41,14 +41,14 @@ struct bmGlyph;
|
|||||||
struct ImBuf;
|
struct ImBuf;
|
||||||
struct bmFont;
|
struct bmFont;
|
||||||
|
|
||||||
void printfGlyph(struct bmGlyph * glyph);
|
void printfGlyph(struct bmGlyph *glyph);
|
||||||
void calcAlpha(struct ImBuf * ibuf);
|
void calcAlpha(struct ImBuf *ibuf);
|
||||||
void readBitmapFontVersion0(struct ImBuf * ibuf,
|
void readBitmapFontVersion0(struct ImBuf *ibuf,
|
||||||
unsigned char * rect,
|
unsigned char *rect,
|
||||||
int step);
|
int step);
|
||||||
void detectBitmapFont(struct ImBuf *ibuf);
|
void detectBitmapFont(struct ImBuf *ibuf);
|
||||||
int locateGlyph(struct bmFont *bmfont, unsigned short unicode);
|
int locateGlyph(struct bmFont *bmfont, unsigned short unicode);
|
||||||
void matrixGlyph(struct ImBuf * ibuf, unsigned short unicode,
|
void matrixGlyph(struct ImBuf *ibuf, unsigned short unicode,
|
||||||
float *centerx, float *centery,
|
float *centerx, float *centery,
|
||||||
float *sizex, float *sizey,
|
float *sizex, float *sizey,
|
||||||
float *transx, float *transy,
|
float *transx, float *transy,
|
||||||
|
@@ -53,12 +53,9 @@ typedef struct CSG_MeshDescriptor {
|
|||||||
} CSG_MeshDescriptor;
|
} CSG_MeshDescriptor;
|
||||||
|
|
||||||
|
|
||||||
extern
|
extern int
|
||||||
int
|
CSG_LoadBlenderMesh(struct Object *obj,
|
||||||
CSG_LoadBlenderMesh(
|
CSG_MeshDescriptor *output);
|
||||||
struct Object * obj,
|
|
||||||
CSG_MeshDescriptor *output
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destroy the contents of a mesh descriptor.
|
* Destroy the contents of a mesh descriptor.
|
||||||
@@ -67,11 +64,8 @@ CSG_LoadBlenderMesh(
|
|||||||
* internal memory in the desriptor.
|
* internal memory in the desriptor.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern
|
extern void
|
||||||
void
|
CSG_DestroyMeshDescriptor(CSG_MeshDescriptor *mesh);
|
||||||
CSG_DestroyMeshDescriptor(
|
|
||||||
CSG_MeshDescriptor *mesh
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Perform a boolean operation between 2 meshes and return the
|
* Perform a boolean operation between 2 meshes and return the
|
||||||
@@ -82,14 +76,11 @@ CSG_DestroyMeshDescriptor(
|
|||||||
* 3 = difference.
|
* 3 = difference.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern
|
extern int
|
||||||
int
|
CSG_PerformOp(CSG_MeshDescriptor *mesh1,
|
||||||
CSG_PerformOp(
|
CSG_MeshDescriptor *mesh2,
|
||||||
CSG_MeshDescriptor *mesh1,
|
int op_type,
|
||||||
CSG_MeshDescriptor *mesh2,
|
CSG_MeshDescriptor *output);
|
||||||
int op_type,
|
|
||||||
CSG_MeshDescriptor *output
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -97,23 +88,17 @@ CSG_PerformOp(
|
|||||||
* Add a mesh to blender as a new object.
|
* Add a mesh to blender as a new object.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern
|
extern int
|
||||||
int
|
CSG_AddMeshToBlender(CSG_MeshDescriptor *mesh);
|
||||||
CSG_AddMeshToBlender(
|
|
||||||
CSG_MeshDescriptor *mesh
|
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test functionality.
|
* Test functionality.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern
|
extern int
|
||||||
int
|
NewBooleanMeshTest(struct Base *base,
|
||||||
NewBooleanMeshTest(
|
struct Base *base_select,
|
||||||
struct Base * base,
|
int op_type);
|
||||||
struct Base * base_select,
|
|
||||||
int op_type
|
|
||||||
);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -59,17 +59,17 @@ int BKE_brush_clone_image_delete(struct Brush *brush);
|
|||||||
|
|
||||||
/* jitter */
|
/* jitter */
|
||||||
void BKE_brush_jitter_pos(const struct Scene *scene, struct Brush *brush,
|
void BKE_brush_jitter_pos(const struct Scene *scene, struct Brush *brush,
|
||||||
const float pos[2], float jitterpos[2]);
|
const float pos[2], float jitterpos[2]);
|
||||||
|
|
||||||
/* brush curve */
|
/* brush curve */
|
||||||
void BKE_brush_curve_preset(struct Brush *b, /*enum CurveMappingPreset*/int preset);
|
void BKE_brush_curve_preset(struct Brush *b, /*enum CurveMappingPreset*/ int preset);
|
||||||
float BKE_brush_curve_strength_clamp(struct Brush *br, float p, const float len);
|
float BKE_brush_curve_strength_clamp(struct Brush *br, float p, const float len);
|
||||||
float BKE_brush_curve_strength(struct Brush *br, float p, const float len); /* used for sculpt */
|
float BKE_brush_curve_strength(struct Brush *br, float p, const float len); /* used for sculpt */
|
||||||
|
|
||||||
/* sampling */
|
/* sampling */
|
||||||
void BKE_brush_sample_tex(const struct Scene *scene, struct Brush *brush, const float xy[2], float rgba[4], const int thread);
|
void BKE_brush_sample_tex(const struct Scene *scene, struct Brush *brush, const float xy[2], float rgba[4], const int thread);
|
||||||
void BKE_brush_imbuf_new(const struct Scene *scene, struct Brush *brush, short flt, short texfalloff, int size,
|
void BKE_brush_imbuf_new(const struct Scene *scene, struct Brush *brush, short flt, short texfalloff, int size,
|
||||||
struct ImBuf **imbuf, int use_color_correction);
|
struct ImBuf **imbuf, int use_color_correction);
|
||||||
|
|
||||||
/* painting */
|
/* painting */
|
||||||
struct BrushPainter;
|
struct BrushPainter;
|
||||||
@@ -78,9 +78,9 @@ typedef int (*BrushFunc)(void *user, struct ImBuf *ibuf, const float lastpos[2],
|
|||||||
|
|
||||||
BrushPainter *BKE_brush_painter_new(struct Scene *scene, struct Brush *brush);
|
BrushPainter *BKE_brush_painter_new(struct Scene *scene, struct Brush *brush);
|
||||||
void BKE_brush_painter_require_imbuf(BrushPainter *painter, short flt,
|
void BKE_brush_painter_require_imbuf(BrushPainter *painter, short flt,
|
||||||
short texonly, int size);
|
short texonly, int size);
|
||||||
int BKE_brush_painter_paint(BrushPainter *painter, BrushFunc func, const float pos[2],
|
int BKE_brush_painter_paint(BrushPainter *painter, BrushFunc func, const float pos[2],
|
||||||
double time, float pressure, void *user, int use_color_correction);
|
double time, float pressure, void *user, int use_color_correction);
|
||||||
void BKE_brush_painter_break_stroke(BrushPainter *painter);
|
void BKE_brush_painter_break_stroke(BrushPainter *painter);
|
||||||
void BKE_brush_painter_free(BrushPainter *painter);
|
void BKE_brush_painter_free(BrushPainter *painter);
|
||||||
|
|
||||||
@@ -108,13 +108,13 @@ int BKE_brush_use_size_pressure(const struct Scene *scene, struct Brush *brush)
|
|||||||
|
|
||||||
/* scale unprojected radius to reflect a change in the brush's 2D size */
|
/* scale unprojected radius to reflect a change in the brush's 2D size */
|
||||||
void BKE_brush_scale_unprojected_radius(float *unprojected_radius,
|
void BKE_brush_scale_unprojected_radius(float *unprojected_radius,
|
||||||
int new_brush_size,
|
int new_brush_size,
|
||||||
int old_brush_size);
|
int old_brush_size);
|
||||||
|
|
||||||
/* scale brush size to reflect a change in the brush's unprojected radius */
|
/* scale brush size to reflect a change in the brush's unprojected radius */
|
||||||
void BKE_brush_scale_size(int *BKE_brush_size_get,
|
void BKE_brush_scale_size(int *BKE_brush_size_get,
|
||||||
float new_unprojected_radius,
|
float new_unprojected_radius,
|
||||||
float old_unprojected_radius);
|
float old_unprojected_radius);
|
||||||
|
|
||||||
/* debugging only */
|
/* debugging only */
|
||||||
void BKE_brush_debug_print_state(struct Brush *br);
|
void BKE_brush_debug_print_state(struct Brush *br);
|
||||||
|
@@ -38,7 +38,7 @@ struct BulletSoftBody;
|
|||||||
extern struct BulletSoftBody *bsbNew(void);
|
extern struct BulletSoftBody *bsbNew(void);
|
||||||
|
|
||||||
/* frees internal data and softbody itself */
|
/* frees internal data and softbody itself */
|
||||||
extern void bsbFree(struct BulletSoftBody *sb);
|
extern void bsbFree(struct BulletSoftBody *sb);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -44,20 +44,19 @@ struct MFace;
|
|||||||
/*
|
/*
|
||||||
* struct that kepts basic information about a BVHTree build from a mesh
|
* struct that kepts basic information about a BVHTree build from a mesh
|
||||||
*/
|
*/
|
||||||
typedef struct BVHTreeFromMesh
|
typedef struct BVHTreeFromMesh {
|
||||||
{
|
|
||||||
struct BVHTree *tree;
|
struct BVHTree *tree;
|
||||||
|
|
||||||
/* default callbacks to bvh nearest and raycast */
|
/* default callbacks to bvh nearest and raycast */
|
||||||
BVHTree_NearestPointCallback nearest_callback;
|
BVHTree_NearestPointCallback nearest_callback;
|
||||||
BVHTree_RayCastCallback raycast_callback;
|
BVHTree_RayCastCallback raycast_callback;
|
||||||
|
|
||||||
/* Mesh represented on this BVHTree */
|
/* Mesh represented on this BVHTree */
|
||||||
struct DerivedMesh *mesh;
|
struct DerivedMesh *mesh;
|
||||||
|
|
||||||
/* Vertex array, so that callbacks have instante access to data */
|
/* Vertex array, so that callbacks have instante access to data */
|
||||||
struct MVert *vert;
|
struct MVert *vert;
|
||||||
struct MEdge *edge; /* only used for BVHTreeFromMeshEdges */
|
struct MEdge *edge; /* only used for BVHTreeFromMeshEdges */
|
||||||
struct MFace *face;
|
struct MFace *face;
|
||||||
|
|
||||||
/* radius for raycast */
|
/* radius for raycast */
|
||||||
@@ -65,7 +64,7 @@ typedef struct BVHTreeFromMesh
|
|||||||
|
|
||||||
/* Private data */
|
/* Private data */
|
||||||
int cached;
|
int cached;
|
||||||
void *em_evil; /* var only for snapping */
|
void *em_evil; /* var only for snapping */
|
||||||
|
|
||||||
} BVHTreeFromMesh;
|
} BVHTreeFromMesh;
|
||||||
|
|
||||||
@@ -80,7 +79,7 @@ typedef struct BVHTreeFromMesh
|
|||||||
*
|
*
|
||||||
* free_bvhtree_from_mesh should be called when the tree is no longer needed.
|
* free_bvhtree_from_mesh should be called when the tree is no longer needed.
|
||||||
*/
|
*/
|
||||||
BVHTree* bvhtree_from_mesh_verts(struct BVHTreeFromMesh *data, struct DerivedMesh *mesh, float epsilon, int tree_type, int axis);
|
BVHTree *bvhtree_from_mesh_verts(struct BVHTreeFromMesh *data, struct DerivedMesh *mesh, float epsilon, int tree_type, int axis);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Builds a bvh tree where nodes are the faces of the given mesh.
|
* Builds a bvh tree where nodes are the faces of the given mesh.
|
||||||
@@ -96,9 +95,9 @@ BVHTree* bvhtree_from_mesh_verts(struct BVHTreeFromMesh *data, struct DerivedMes
|
|||||||
*
|
*
|
||||||
* free_bvhtree_from_mesh should be called when the tree is no longer needed.
|
* free_bvhtree_from_mesh should be called when the tree is no longer needed.
|
||||||
*/
|
*/
|
||||||
BVHTree* bvhtree_from_mesh_faces(struct BVHTreeFromMesh *data, struct DerivedMesh *mesh, float epsilon, int tree_type, int axis);
|
BVHTree *bvhtree_from_mesh_faces(struct BVHTreeFromMesh *data, struct DerivedMesh *mesh, float epsilon, int tree_type, int axis);
|
||||||
|
|
||||||
BVHTree* bvhtree_from_mesh_edges(struct BVHTreeFromMesh *data, struct DerivedMesh *mesh, float epsilon, int tree_type, int axis);
|
BVHTree *bvhtree_from_mesh_edges(struct BVHTreeFromMesh *data, struct DerivedMesh *mesh, float epsilon, int tree_type, int axis);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Frees data allocated by a call to bvhtree_from_mesh_*.
|
* Frees data allocated by a call to bvhtree_from_mesh_*.
|
||||||
@@ -116,11 +115,11 @@ float nearest_point_in_tri_surface(const float v0[3], const float v1[3], const f
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
//Using local coordinates
|
//Using local coordinates
|
||||||
#define BVHTREE_FROM_FACES 0
|
#define BVHTREE_FROM_FACES 0
|
||||||
#define BVHTREE_FROM_VERTICES 1
|
#define BVHTREE_FROM_VERTICES 1
|
||||||
#define BVHTREE_FROM_EDGES 2
|
#define BVHTREE_FROM_EDGES 2
|
||||||
|
|
||||||
typedef struct LinkNode* BVHCache;
|
typedef struct LinkNode *BVHCache;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -112,13 +112,12 @@ void BKE_camera_params_compute_matrix(CameraParams *params);
|
|||||||
/* Camera View Frame */
|
/* Camera View Frame */
|
||||||
|
|
||||||
void BKE_camera_view_frame_ex(struct Scene *scene, struct Camera *camera, float drawsize, const short do_clip, const float scale[3],
|
void BKE_camera_view_frame_ex(struct Scene *scene, struct Camera *camera, float drawsize, const short do_clip, const float scale[3],
|
||||||
float r_asp[2], float r_shift[2], float *r_drawsize, float r_vec[4][3]);
|
float r_asp[2], float r_shift[2], float *r_drawsize, float r_vec[4][3]);
|
||||||
|
|
||||||
void BKE_camera_view_frame(struct Scene *scene, struct Camera *camera, float r_vec[4][3]);
|
void BKE_camera_view_frame(struct Scene *scene, struct Camera *camera, float r_vec[4][3]);
|
||||||
|
|
||||||
int BKE_camera_view_frame_fit_to_scene(
|
int BKE_camera_view_frame_fit_to_scene(struct Scene *scene, struct View3D *v3d, struct Object *camera_ob,
|
||||||
struct Scene *scene, struct View3D *v3d, struct Object *camera_ob,
|
float r_co[3]);
|
||||||
float r_co[3]);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@@ -43,7 +43,7 @@ struct CCGSubSurf;
|
|||||||
this reason, CCGElem is presented as an opaque pointer, and
|
this reason, CCGElem is presented as an opaque pointer, and
|
||||||
elements should always be accompanied by a CCGKey, which provides
|
elements should always be accompanied by a CCGKey, which provides
|
||||||
the necessary offsets to access components of a CCGElem.
|
the necessary offsets to access components of a CCGElem.
|
||||||
*/
|
*/
|
||||||
typedef struct CCGElem CCGElem;
|
typedef struct CCGElem CCGElem;
|
||||||
|
|
||||||
typedef struct CCGKey {
|
typedef struct CCGKey {
|
||||||
@@ -104,24 +104,24 @@ BLI_INLINE CCGElem *CCG_elem_next(const CCGKey *key, CCGElem *elem);
|
|||||||
|
|
||||||
BLI_INLINE float *CCG_elem_co(const CCGKey *UNUSED(key), CCGElem *elem)
|
BLI_INLINE float *CCG_elem_co(const CCGKey *UNUSED(key), CCGElem *elem)
|
||||||
{
|
{
|
||||||
return (float*)elem;
|
return (float *)elem;
|
||||||
}
|
}
|
||||||
|
|
||||||
BLI_INLINE float *CCG_elem_no(const CCGKey *key, CCGElem *elem)
|
BLI_INLINE float *CCG_elem_no(const CCGKey *key, CCGElem *elem)
|
||||||
{
|
{
|
||||||
BLI_assert(key->has_normals);
|
BLI_assert(key->has_normals);
|
||||||
return (float*)((char*)elem + key->normal_offset);
|
return (float *)((char *)elem + key->normal_offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
BLI_INLINE float *CCG_elem_mask(const CCGKey *key, CCGElem *elem)
|
BLI_INLINE float *CCG_elem_mask(const CCGKey *key, CCGElem *elem)
|
||||||
{
|
{
|
||||||
BLI_assert(key->has_mask);
|
BLI_assert(key->has_mask);
|
||||||
return (float*)((char*)elem + (key->mask_offset));
|
return (float *)((char *)elem + (key->mask_offset));
|
||||||
}
|
}
|
||||||
|
|
||||||
BLI_INLINE CCGElem *CCG_elem_offset(const CCGKey *key, CCGElem *elem, int offset)
|
BLI_INLINE CCGElem *CCG_elem_offset(const CCGKey *key, CCGElem *elem, int offset)
|
||||||
{
|
{
|
||||||
return (CCGElem*)(((char*)elem) + key->elem_size * offset);
|
return (CCGElem *)(((char *)elem) + key->elem_size * offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
BLI_INLINE CCGElem *CCG_grid_elem(const CCGKey *key, CCGElem *elem, int x, int y)
|
BLI_INLINE CCGElem *CCG_grid_elem(const CCGKey *key, CCGElem *elem, int x, int y)
|
||||||
|
@@ -79,11 +79,11 @@ struct DerivedMesh *CDDM_copy_from_tessface(struct DerivedMesh *dm);
|
|||||||
* elements are initialized to all zeros
|
* elements are initialized to all zeros
|
||||||
*/
|
*/
|
||||||
struct DerivedMesh *CDDM_from_template(struct DerivedMesh *source,
|
struct DerivedMesh *CDDM_from_template(struct DerivedMesh *source,
|
||||||
int numVerts, int numEdges, int numFaces,
|
int numVerts, int numEdges, int numFaces,
|
||||||
int numLoops, int numPolys);
|
int numLoops, int numPolys);
|
||||||
|
|
||||||
/*converts mfaces to mpolys. note things may break if there are not valid
|
/* converts mfaces to mpolys. note things may break if there are not valid
|
||||||
*medges surrounding each mface.
|
* medges surrounding each mface.
|
||||||
*/
|
*/
|
||||||
void CDDM_tessfaces_to_faces(struct DerivedMesh *dm);
|
void CDDM_tessfaces_to_faces(struct DerivedMesh *dm);
|
||||||
|
|
||||||
|
@@ -61,10 +61,10 @@ struct LinkNode;
|
|||||||
/* COLLISION FLAGS */
|
/* COLLISION FLAGS */
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
COLLISION_IN_FUTURE = (1 << 1),
|
COLLISION_IN_FUTURE = (1 << 1),
|
||||||
#ifdef WITH_ELTOPO
|
#ifdef WITH_ELTOPO
|
||||||
COLLISION_USE_COLLFACE = (1 << 2),
|
COLLISION_USE_COLLFACE = (1 << 2),
|
||||||
COLLISION_IS_EDGES = (1 << 3),
|
COLLISION_IS_EDGES = (1 << 3),
|
||||||
#endif
|
#endif
|
||||||
} COLLISION_FLAGS;
|
} COLLISION_FLAGS;
|
||||||
|
|
||||||
@@ -73,8 +73,7 @@ typedef enum
|
|||||||
// used for collisions in collision.c
|
// used for collisions in collision.c
|
||||||
////////////////////////////////////////
|
////////////////////////////////////////
|
||||||
/* used for collisions in collision.c */
|
/* used for collisions in collision.c */
|
||||||
typedef struct CollPair
|
typedef struct CollPair {
|
||||||
{
|
|
||||||
unsigned int face1; // cloth face
|
unsigned int face1; // cloth face
|
||||||
unsigned int face2; // object face
|
unsigned int face2; // object face
|
||||||
double distance; // magnitude of vector
|
double distance; // magnitude of vector
|
||||||
@@ -95,8 +94,7 @@ typedef struct CollPair
|
|||||||
CollPair;
|
CollPair;
|
||||||
|
|
||||||
/* used for collisions in collision.c */
|
/* used for collisions in collision.c */
|
||||||
typedef struct EdgeCollPair
|
typedef struct EdgeCollPair {
|
||||||
{
|
|
||||||
unsigned int p11, p12, p21, p22;
|
unsigned int p11, p12, p21, p22;
|
||||||
float normal[3];
|
float normal[3];
|
||||||
float vector[3];
|
float vector[3];
|
||||||
@@ -107,8 +105,7 @@ typedef struct EdgeCollPair
|
|||||||
EdgeCollPair;
|
EdgeCollPair;
|
||||||
|
|
||||||
/* used for collisions in collision.c */
|
/* used for collisions in collision.c */
|
||||||
typedef struct FaceCollPair
|
typedef struct FaceCollPair {
|
||||||
{
|
|
||||||
unsigned int p11, p12, p13, p21;
|
unsigned int p11, p12, p13, p21;
|
||||||
float normal[3];
|
float normal[3];
|
||||||
float vector[3];
|
float vector[3];
|
||||||
@@ -130,8 +127,8 @@ FaceCollPair;
|
|||||||
// used in modifier.c from collision.c
|
// used in modifier.c from collision.c
|
||||||
/////////////////////////////////////////////////
|
/////////////////////////////////////////////////
|
||||||
|
|
||||||
BVHTree *bvhtree_build_from_mvert(struct MFace *mfaces, unsigned int numfaces, struct MVert *x, unsigned int numverts, float epsilon );
|
BVHTree *bvhtree_build_from_mvert(struct MFace *mfaces, unsigned int numfaces, struct MVert *x, unsigned int numverts, float epsilon);
|
||||||
void bvhtree_update_from_mvert(BVHTree * bvhtree, struct MFace *faces, int numfaces, struct MVert *x, struct MVert *xnew, int numverts, int moving );
|
void bvhtree_update_from_mvert(BVHTree *bvhtree, struct MFace *faces, int numfaces, struct MVert *x, struct MVert *xnew, int numverts, int moving);
|
||||||
|
|
||||||
/////////////////////////////////////////////////
|
/////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@@ -39,42 +39,42 @@ struct rctf;
|
|||||||
|
|
||||||
#if defined _WIN32
|
#if defined _WIN32
|
||||||
# define DO_INLINE __inline
|
# define DO_INLINE __inline
|
||||||
#elif defined (__sun) || defined (__sun__)
|
#elif defined(__sun) || defined(__sun__)
|
||||||
# define DO_INLINE
|
# define DO_INLINE
|
||||||
#else
|
#else
|
||||||
# define DO_INLINE static inline
|
# define DO_INLINE static inline
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct CurveMapping *curvemapping_add(int tot, float minx, float miny, float maxx, float maxy);
|
struct CurveMapping *curvemapping_add(int tot, float minx, float miny, float maxx, float maxy);
|
||||||
void curvemapping_free(struct CurveMapping *cumap);
|
void curvemapping_free(struct CurveMapping *cumap);
|
||||||
struct CurveMapping *curvemapping_copy(struct CurveMapping *cumap);
|
struct CurveMapping *curvemapping_copy(struct CurveMapping *cumap);
|
||||||
void curvemapping_set_black_white(struct CurveMapping *cumap, const float black[3], const float white[3]);
|
void curvemapping_set_black_white(struct CurveMapping *cumap, const float black[3], const float white[3]);
|
||||||
|
|
||||||
#define CURVEMAP_SLOPE_NEGATIVE 0
|
#define CURVEMAP_SLOPE_NEGATIVE 0
|
||||||
#define CURVEMAP_SLOPE_POSITIVE 1
|
#define CURVEMAP_SLOPE_POSITIVE 1
|
||||||
void curvemap_reset(struct CurveMap *cuma, struct rctf *clipr, int preset, int slope);
|
void curvemap_reset(struct CurveMap *cuma, struct rctf *clipr, int preset, int slope);
|
||||||
void curvemap_remove(struct CurveMap *cuma, int flag);
|
void curvemap_remove(struct CurveMap *cuma, int flag);
|
||||||
void curvemap_insert(struct CurveMap *cuma, float x, float y);
|
void curvemap_insert(struct CurveMap *cuma, float x, float y);
|
||||||
void curvemap_sethandle(struct CurveMap *cuma, int type);
|
void curvemap_sethandle(struct CurveMap *cuma, int type);
|
||||||
|
|
||||||
void curvemapping_changed(struct CurveMapping *cumap, int rem_doubles);
|
void curvemapping_changed(struct CurveMapping *cumap, int rem_doubles);
|
||||||
|
|
||||||
/* single curve, no table check */
|
|
||||||
float curvemap_evaluateF(struct CurveMap *cuma, float value);
|
|
||||||
/* single curve, with table check */
|
|
||||||
float curvemapping_evaluateF(struct CurveMapping *cumap, int cur, float value);
|
|
||||||
void curvemapping_evaluate3F(struct CurveMapping *cumap, float vecout[3], const float vecin[3]);
|
|
||||||
void curvemapping_evaluateRGBF(struct CurveMapping *cumap, float vecout[3], const float vecin[3]);
|
|
||||||
void curvemapping_evaluate_premulRGBF(struct CurveMapping *cumap, float vecout[3], const float vecin[3]);
|
|
||||||
void curvemapping_do_ibuf(struct CurveMapping *cumap, struct ImBuf *ibuf);
|
|
||||||
void curvemapping_premultiply(struct CurveMapping *cumap, int restore);
|
|
||||||
int curvemapping_RGBA_does_something(struct CurveMapping *cumap);
|
|
||||||
void curvemapping_initialize(struct CurveMapping *cumap);
|
|
||||||
void curvemapping_table_RGBA(struct CurveMapping *cumap, float **array, int *size);
|
|
||||||
|
|
||||||
void scopes_update(struct Scopes *scopes, struct ImBuf *ibuf, int use_color_management);
|
/* single curve, no table check */
|
||||||
void scopes_free(struct Scopes *scopes);
|
float curvemap_evaluateF(struct CurveMap *cuma, float value);
|
||||||
void scopes_new(struct Scopes *scopes);
|
/* single curve, with table check */
|
||||||
|
float curvemapping_evaluateF(struct CurveMapping *cumap, int cur, float value);
|
||||||
|
void curvemapping_evaluate3F(struct CurveMapping *cumap, float vecout[3], const float vecin[3]);
|
||||||
|
void curvemapping_evaluateRGBF(struct CurveMapping *cumap, float vecout[3], const float vecin[3]);
|
||||||
|
void curvemapping_evaluate_premulRGBF(struct CurveMapping *cumap, float vecout[3], const float vecin[3]);
|
||||||
|
void curvemapping_do_ibuf(struct CurveMapping *cumap, struct ImBuf *ibuf);
|
||||||
|
void curvemapping_premultiply(struct CurveMapping *cumap, int restore);
|
||||||
|
int curvemapping_RGBA_does_something(struct CurveMapping *cumap);
|
||||||
|
void curvemapping_initialize(struct CurveMapping *cumap);
|
||||||
|
void curvemapping_table_RGBA(struct CurveMapping *cumap, float **array, int *size);
|
||||||
|
|
||||||
|
void scopes_update(struct Scopes *scopes, struct ImBuf *ibuf, int use_color_management);
|
||||||
|
void scopes_free(struct Scopes *scopes);
|
||||||
|
void scopes_new(struct Scopes *scopes);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -48,15 +48,15 @@ extern "C" {
|
|||||||
|
|
||||||
/* special struct for use in constraint evaluation */
|
/* special struct for use in constraint evaluation */
|
||||||
typedef struct bConstraintOb {
|
typedef struct bConstraintOb {
|
||||||
struct Scene *scene; /* for system time, part of deglobalization, code nicer later with local time (ton) */
|
struct Scene *scene; /* for system time, part of deglobalization, code nicer later with local time (ton) */
|
||||||
struct Object *ob; /* if pchan, then armature that it comes from, otherwise constraint owner */
|
struct Object *ob; /* if pchan, then armature that it comes from, otherwise constraint owner */
|
||||||
struct bPoseChannel *pchan; /* pose channel that owns the constraints being evaluated */
|
struct bPoseChannel *pchan; /* pose channel that owns the constraints being evaluated */
|
||||||
|
|
||||||
float matrix[4][4]; /* matrix where constraints are accumulated + solved */
|
float matrix[4][4]; /* matrix where constraints are accumulated + solved */
|
||||||
float startmat[4][4]; /* original matrix (before constraint solving) */
|
float startmat[4][4]; /* original matrix (before constraint solving) */
|
||||||
|
|
||||||
short type; /* type of owner */
|
short type; /* type of owner */
|
||||||
short rotOrder; /* rotation order for constraint owner (as defined in eEulerRotationOrders in BLI_math.h) */
|
short rotOrder; /* rotation order for constraint owner (as defined in eEulerRotationOrders in BLI_math.h) */
|
||||||
} bConstraintOb;
|
} bConstraintOb;
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------------- */
|
/* ---------------------------------------------------------------------------- */
|
||||||
@@ -79,31 +79,31 @@ typedef void (*ConstraintIDFunc)(struct bConstraint *con, struct ID **idpoin, sh
|
|||||||
*/
|
*/
|
||||||
typedef struct bConstraintTypeInfo {
|
typedef struct bConstraintTypeInfo {
|
||||||
/* admin/ident */
|
/* admin/ident */
|
||||||
short type; /* CONSTRAINT_TYPE_### */
|
short type; /* CONSTRAINT_TYPE_### */
|
||||||
short size; /* size in bytes of the struct */
|
short size; /* size in bytes of the struct */
|
||||||
char name[32]; /* name of constraint in interface */
|
char name[32]; /* name of constraint in interface */
|
||||||
char structName[32]; /* name of struct for SDNA */
|
char structName[32]; /* name of struct for SDNA */
|
||||||
|
|
||||||
/* data management function pointers - special handling */
|
/* data management function pointers - special handling */
|
||||||
/* free any data that is allocated separately (optional) */
|
/* free any data that is allocated separately (optional) */
|
||||||
void (*free_data)(struct bConstraint *con);
|
void (*free_data)(struct bConstraint *con);
|
||||||
/* run the provided callback function on all the ID-blocks linked to the constraint */
|
/* run the provided callback function on all the ID-blocks linked to the constraint */
|
||||||
void (*id_looper)(struct bConstraint *con, ConstraintIDFunc func, void *userdata);
|
void (*id_looper)(struct bConstraint *con, ConstraintIDFunc func, void *userdata);
|
||||||
/* copy any special data that is allocated separately (optional) */
|
/* copy any special data that is allocated separately (optional) */
|
||||||
void (*copy_data)(struct bConstraint *con, struct bConstraint *src);
|
void (*copy_data)(struct bConstraint *con, struct bConstraint *src);
|
||||||
/* set settings for data that will be used for bConstraint.data (memory already allocated using MEM_callocN) */
|
/* set settings for data that will be used for bConstraint.data (memory already allocated using MEM_callocN) */
|
||||||
void (*new_data)(void *cdata);
|
void (*new_data)(void *cdata);
|
||||||
|
|
||||||
/* target handling function pointers */
|
/* target handling function pointers */
|
||||||
/* for multi-target constraints: return that list; otherwise make a temporary list (returns number of targets) */
|
/* for multi-target constraints: return that list; otherwise make a temporary list (returns number of targets) */
|
||||||
int (*get_constraint_targets)(struct bConstraint *con, struct ListBase *list);
|
int (*get_constraint_targets)(struct bConstraint *con, struct ListBase *list);
|
||||||
/* for single-target constraints only: flush data back to source data, and the free memory used */
|
/* for single-target constraints only: flush data back to source data, and the free memory used */
|
||||||
void (*flush_constraint_targets)(struct bConstraint *con, struct ListBase *list, short nocopy);
|
void (*flush_constraint_targets)(struct bConstraint *con, struct ListBase *list, short nocopy);
|
||||||
|
|
||||||
/* evaluation */
|
/* evaluation */
|
||||||
/* set the ct->matrix for the given constraint target (at the given ctime) */
|
/* set the ct->matrix for the given constraint target (at the given ctime) */
|
||||||
void (*get_target_matrix)(struct bConstraint *con, struct bConstraintOb *cob, struct bConstraintTarget *ct, float ctime);
|
void (*get_target_matrix)(struct bConstraint *con, struct bConstraintOb *cob, struct bConstraintTarget *ct, float ctime);
|
||||||
/* evaluate the constraint for the given time */
|
/* evaluate the constraint for the given time */
|
||||||
void (*evaluate_constraint)(struct bConstraint *con, struct bConstraintOb *cob, struct ListBase *targets);
|
void (*evaluate_constraint)(struct bConstraint *con, struct bConstraintOb *cob, struct ListBase *targets);
|
||||||
} bConstraintTypeInfo;
|
} bConstraintTypeInfo;
|
||||||
|
|
||||||
|
@@ -72,7 +72,7 @@ struct bContextDataResult;
|
|||||||
typedef struct bContextDataResult bContextDataResult;
|
typedef struct bContextDataResult bContextDataResult;
|
||||||
|
|
||||||
typedef int (*bContextDataCallback)(const bContext *C,
|
typedef int (*bContextDataCallback)(const bContext *C,
|
||||||
const char *member, bContextDataResult *result);
|
const char *member, bContextDataResult *result);
|
||||||
|
|
||||||
typedef struct bContextStoreEntry {
|
typedef struct bContextStoreEntry {
|
||||||
struct bContextStoreEntry *next, *prev;
|
struct bContextStoreEntry *next, *prev;
|
||||||
@@ -223,7 +223,7 @@ void CTX_data_list_add(bContextDataResult *result, void *data);
|
|||||||
BLI_freelistN(&ctx_data_list); \
|
BLI_freelistN(&ctx_data_list); \
|
||||||
}
|
}
|
||||||
|
|
||||||
int ctx_data_list_count(const bContext *C, int (*func)(const bContext*, ListBase*));
|
int ctx_data_list_count(const bContext *C, int (*func)(const bContext *, ListBase *));
|
||||||
|
|
||||||
#define CTX_DATA_COUNT(C, member) \
|
#define CTX_DATA_COUNT(C, member) \
|
||||||
ctx_data_list_count(C, CTX_data_##member)
|
ctx_data_list_count(C, CTX_data_##member)
|
||||||
|
@@ -43,15 +43,15 @@ struct Nurb;
|
|||||||
struct Object;
|
struct Object;
|
||||||
struct Scene;
|
struct Scene;
|
||||||
|
|
||||||
#define KNOTSU(nu) ( (nu)->orderu+ (nu)->pntsu+ (((nu)->flagu & CU_NURB_CYCLIC) ? ((nu)->orderu-1) : 0) )
|
#define KNOTSU(nu) ( (nu)->orderu + (nu)->pntsu + (((nu)->flagu & CU_NURB_CYCLIC) ? ((nu)->orderu - 1) : 0) )
|
||||||
#define KNOTSV(nu) ( (nu)->orderv+ (nu)->pntsv+ (((nu)->flagv & CU_NURB_CYCLIC) ? ((nu)->orderv-1) : 0) )
|
#define KNOTSV(nu) ( (nu)->orderv + (nu)->pntsv + (((nu)->flagv & CU_NURB_CYCLIC) ? ((nu)->orderv - 1) : 0) )
|
||||||
|
|
||||||
/* Non cyclic nurbs have 1 less segment */
|
/* Non cyclic nurbs have 1 less segment */
|
||||||
#define SEGMENTSU(nu) ( ((nu)->flagu & CU_NURB_CYCLIC) ? (nu)->pntsu : (nu)->pntsu-1 )
|
#define SEGMENTSU(nu) ( ((nu)->flagu & CU_NURB_CYCLIC) ? (nu)->pntsu : (nu)->pntsu - 1)
|
||||||
#define SEGMENTSV(nu) ( ((nu)->flagv & CU_NURB_CYCLIC) ? (nu)->pntsv : (nu)->pntsv-1 )
|
#define SEGMENTSV(nu) ( ((nu)->flagv & CU_NURB_CYCLIC) ? (nu)->pntsv : (nu)->pntsv - 1)
|
||||||
|
|
||||||
#define CU_DO_TILT(cu, nu) (((nu->flag & CU_2D) && (cu->flag & CU_3D)==0) ? 0 : 1)
|
#define CU_DO_TILT(cu, nu) (((nu->flag & CU_2D) && (cu->flag & CU_3D) == 0) ? 0 : 1)
|
||||||
#define CU_DO_RADIUS(cu, nu) ((CU_DO_TILT(cu, nu) || ((cu)->flag & CU_PATH_RADIUS) || (cu)->bevobj || (cu)->ext1!=0.0f || (cu)->ext2!=0.0f) ? 1:0)
|
#define CU_DO_RADIUS(cu, nu) ((CU_DO_TILT(cu, nu) || ((cu)->flag & CU_PATH_RADIUS) || (cu)->bevobj || (cu)->ext1 != 0.0f || (cu)->ext2 != 0.0f) ? 1 : 0)
|
||||||
|
|
||||||
/* ** Curve ** */
|
/* ** Curve ** */
|
||||||
void BKE_curve_unlink(struct Curve *cu);
|
void BKE_curve_unlink(struct Curve *cu);
|
||||||
|
@@ -47,7 +47,7 @@ struct CustomDataLayer;
|
|||||||
typedef uint64_t CustomDataMask;
|
typedef uint64_t CustomDataMask;
|
||||||
|
|
||||||
/*a data type large enough to hold 1 element from any customdata layer type*/
|
/*a data type large enough to hold 1 element from any customdata layer type*/
|
||||||
typedef struct {unsigned char data[64];} CDBlockBytes;
|
typedef struct {unsigned char data[64]; } CDBlockBytes;
|
||||||
|
|
||||||
extern const CustomDataMask CD_MASK_BAREMESH;
|
extern const CustomDataMask CD_MASK_BAREMESH;
|
||||||
extern const CustomDataMask CD_MASK_MESH;
|
extern const CustomDataMask CD_MASK_MESH;
|
||||||
@@ -97,7 +97,7 @@ void CustomData_data_add(int type, void *data1, void *data2);
|
|||||||
* mask is a bitfield where (mask & (1 << (layer type))) indicates
|
* mask is a bitfield where (mask & (1 << (layer type))) indicates
|
||||||
* if a layer should be copied or not. alloctype must be one of the above. */
|
* if a layer should be copied or not. alloctype must be one of the above. */
|
||||||
void CustomData_copy(const struct CustomData *source, struct CustomData *dest,
|
void CustomData_copy(const struct CustomData *source, struct CustomData *dest,
|
||||||
CustomDataMask mask, int alloctype, int totelem);
|
CustomDataMask mask, int alloctype, int totelem);
|
||||||
|
|
||||||
/* BMESH_TODO, not really a public function but readfile.c needs it */
|
/* BMESH_TODO, not really a public function but readfile.c needs it */
|
||||||
void CustomData_update_typemap(struct CustomData *data);
|
void CustomData_update_typemap(struct CustomData *data);
|
||||||
@@ -105,7 +105,7 @@ void CustomData_update_typemap(struct CustomData *data);
|
|||||||
/* same as the above, except that this will preserve existing layers, and only
|
/* same as the above, except that this will preserve existing layers, and only
|
||||||
* add the layers that were not there yet */
|
* add the layers that were not there yet */
|
||||||
void CustomData_merge(const struct CustomData *source, struct CustomData *dest,
|
void CustomData_merge(const struct CustomData *source, struct CustomData *dest,
|
||||||
CustomDataMask mask, int alloctype, int totelem);
|
CustomDataMask mask, int alloctype, int totelem);
|
||||||
|
|
||||||
/* bmesh version of CustomData_merge; merges the layouts of source and dest,
|
/* bmesh version of CustomData_merge; merges the layouts of source and dest,
|
||||||
* then goes through the mesh and makes sure all the customdata blocks are
|
* then goes through the mesh and makes sure all the customdata blocks are
|
||||||
@@ -128,10 +128,10 @@ void CustomData_free_temporary(struct CustomData *data, int totelem);
|
|||||||
* in editmode, use EDBM_data_layer_add instead of this function
|
* in editmode, use EDBM_data_layer_add instead of this function
|
||||||
*/
|
*/
|
||||||
void *CustomData_add_layer(struct CustomData *data, int type, int alloctype,
|
void *CustomData_add_layer(struct CustomData *data, int type, int alloctype,
|
||||||
void *layer, int totelem);
|
void *layer, int totelem);
|
||||||
/*same as above but accepts a name */
|
/*same as above but accepts a name */
|
||||||
void *CustomData_add_layer_named(struct CustomData *data, int type, int alloctype,
|
void *CustomData_add_layer_named(struct CustomData *data, int type, int alloctype,
|
||||||
void *layer, int totelem, const char *name);
|
void *layer, int totelem, const char *name);
|
||||||
|
|
||||||
/* frees the active or first data layer with the give type.
|
/* frees the active or first data layer with the give type.
|
||||||
* returns 1 on succes, 0 if no layer with the given type is found
|
* returns 1 on succes, 0 if no layer with the given type is found
|
||||||
@@ -160,7 +160,7 @@ int CustomData_number_of_layers(const struct CustomData *data, int type);
|
|||||||
* returns the layer data */
|
* returns the layer data */
|
||||||
void *CustomData_duplicate_referenced_layer(struct CustomData *data, const int type, const int totelem);
|
void *CustomData_duplicate_referenced_layer(struct CustomData *data, const int type, const int totelem);
|
||||||
void *CustomData_duplicate_referenced_layer_named(struct CustomData *data,
|
void *CustomData_duplicate_referenced_layer_named(struct CustomData *data,
|
||||||
const int type, const char *name, const int totelem);
|
const int type, const char *name, const int totelem);
|
||||||
int CustomData_is_referenced_layer(struct CustomData *data, int type);
|
int CustomData_is_referenced_layer(struct CustomData *data, int type);
|
||||||
|
|
||||||
/* set the CD_FLAG_NOCOPY flag in custom data layers where the mask is
|
/* set the CD_FLAG_NOCOPY flag in custom data layers where the mask is
|
||||||
@@ -168,7 +168,7 @@ int CustomData_is_referenced_layer(struct CustomData *data, int type);
|
|||||||
* will be copied
|
* will be copied
|
||||||
*/
|
*/
|
||||||
void CustomData_set_only_copy(const struct CustomData *data,
|
void CustomData_set_only_copy(const struct CustomData *data,
|
||||||
CustomDataMask mask);
|
CustomDataMask mask);
|
||||||
|
|
||||||
/* copies data from one CustomData object to another
|
/* copies data from one CustomData object to another
|
||||||
* objects need not be compatible, each source layer is copied to the
|
* objects need not be compatible, each source layer is copied to the
|
||||||
@@ -176,8 +176,8 @@ void CustomData_set_only_copy(const struct CustomData *data,
|
|||||||
* return 1 on success, 0 on failure
|
* return 1 on success, 0 on failure
|
||||||
*/
|
*/
|
||||||
void CustomData_copy_data(const struct CustomData *source,
|
void CustomData_copy_data(const struct CustomData *source,
|
||||||
struct CustomData *dest, int source_index,
|
struct CustomData *dest, int source_index,
|
||||||
int dest_index, int count);
|
int dest_index, int count);
|
||||||
void CustomData_copy_elements(int type, void *source, void *dest, int count);
|
void CustomData_copy_elements(int type, void *source, void *dest, int count);
|
||||||
void CustomData_bmesh_copy_data(const struct CustomData *source,
|
void CustomData_bmesh_copy_data(const struct CustomData *source,
|
||||||
struct CustomData *dest, void *src_block,
|
struct CustomData *dest, void *src_block,
|
||||||
@@ -203,11 +203,11 @@ void CustomData_free_elem(struct CustomData *data, int index, int count);
|
|||||||
* returns 1 on success, 0 on failure
|
* returns 1 on success, 0 on failure
|
||||||
*/
|
*/
|
||||||
void CustomData_interp(const struct CustomData *source, struct CustomData *dest,
|
void CustomData_interp(const struct CustomData *source, struct CustomData *dest,
|
||||||
int *src_indices, float *weights, float *sub_weights,
|
int *src_indices, float *weights, float *sub_weights,
|
||||||
int count, int dest_index);
|
int count, int dest_index);
|
||||||
void CustomData_bmesh_interp(struct CustomData *data, void **src_blocks,
|
void CustomData_bmesh_interp(struct CustomData *data, void **src_blocks,
|
||||||
float *weights, float *sub_weights, int count,
|
float *weights, float *sub_weights, int count,
|
||||||
void *dest_block);
|
void *dest_block);
|
||||||
|
|
||||||
|
|
||||||
/* swaps the data in the element corners, to new corners with indices as
|
/* swaps the data in the element corners, to new corners with indices as
|
||||||
@@ -235,7 +235,7 @@ int CustomData_set_layer_name(const struct CustomData *data, int type, int n, co
|
|||||||
void *CustomData_get_layer(const struct CustomData *data, int type);
|
void *CustomData_get_layer(const struct CustomData *data, int type);
|
||||||
void *CustomData_get_layer_n(const struct CustomData *data, int type, int n);
|
void *CustomData_get_layer_n(const struct CustomData *data, int type, int n);
|
||||||
void *CustomData_get_layer_named(const struct CustomData *data, int type,
|
void *CustomData_get_layer_named(const struct CustomData *data, int type,
|
||||||
const char *name);
|
const char *name);
|
||||||
|
|
||||||
int CustomData_get_layer_index(const struct CustomData *data, int type);
|
int CustomData_get_layer_index(const struct CustomData *data, int type);
|
||||||
int CustomData_get_layer_index_n(const struct CustomData *data, int type, int n);
|
int CustomData_get_layer_index_n(const struct CustomData *data, int type, int n);
|
||||||
@@ -254,18 +254,18 @@ int CustomData_get_stencil_layer(const struct CustomData *data, int type);
|
|||||||
* no effect if there is no layer of type
|
* no effect if there is no layer of type
|
||||||
*/
|
*/
|
||||||
void CustomData_set(const struct CustomData *data, int index, int type,
|
void CustomData_set(const struct CustomData *data, int index, int type,
|
||||||
void *source);
|
void *source);
|
||||||
|
|
||||||
void CustomData_bmesh_set(const struct CustomData *data, void *block, int type,
|
void CustomData_bmesh_set(const struct CustomData *data, void *block, int type,
|
||||||
void *source);
|
void *source);
|
||||||
|
|
||||||
void CustomData_bmesh_set_n(struct CustomData *data, void *block, int type, int n,
|
void CustomData_bmesh_set_n(struct CustomData *data, void *block, int type, int n,
|
||||||
void *source);
|
void *source);
|
||||||
/*sets the data of the block at physical layer n. no real type checking
|
/*sets the data of the block at physical layer n. no real type checking
|
||||||
*is performed.
|
*is performed.
|
||||||
*/
|
*/
|
||||||
void CustomData_bmesh_set_layer_n(struct CustomData *data, void *block, int n,
|
void CustomData_bmesh_set_layer_n(struct CustomData *data, void *block, int n,
|
||||||
void *source);
|
void *source);
|
||||||
|
|
||||||
/* set the pointer of to the first layer of type. the old data is not freed.
|
/* set the pointer of to the first layer of type. the old data is not freed.
|
||||||
* returns the value of ptr if the layer is found, NULL otherwise
|
* returns the value of ptr if the layer is found, NULL otherwise
|
||||||
@@ -294,9 +294,9 @@ void CustomData_bmesh_free_block(struct CustomData *data, void **block);
|
|||||||
/* copy custom data to/from layers as in mesh/derivedmesh, to editmesh
|
/* copy custom data to/from layers as in mesh/derivedmesh, to editmesh
|
||||||
* blocks of data. the CustomData's must not be compatible */
|
* blocks of data. the CustomData's must not be compatible */
|
||||||
void CustomData_to_bmesh_block(const struct CustomData *source,
|
void CustomData_to_bmesh_block(const struct CustomData *source,
|
||||||
struct CustomData *dest, int src_index, void **dest_block);
|
struct CustomData *dest, int src_index, void **dest_block);
|
||||||
void CustomData_from_bmesh_block(const struct CustomData *source,
|
void CustomData_from_bmesh_block(const struct CustomData *source,
|
||||||
struct CustomData *dest, void *src_block, int dest_index);
|
struct CustomData *dest, void *src_block, int dest_index);
|
||||||
|
|
||||||
|
|
||||||
/* query info over types */
|
/* query info over types */
|
||||||
@@ -326,17 +326,17 @@ void CustomData_bmesh_init_pool(struct CustomData *data, int totelem, const char
|
|||||||
/* External file storage */
|
/* External file storage */
|
||||||
|
|
||||||
void CustomData_external_add(struct CustomData *data,
|
void CustomData_external_add(struct CustomData *data,
|
||||||
struct ID *id, int type, int totelem, const char *filename);
|
struct ID *id, int type, int totelem, const char *filename);
|
||||||
void CustomData_external_remove(struct CustomData *data,
|
void CustomData_external_remove(struct CustomData *data,
|
||||||
struct ID *id, int type, int totelem);
|
struct ID *id, int type, int totelem);
|
||||||
int CustomData_external_test(struct CustomData *data, int type);
|
int CustomData_external_test(struct CustomData *data, int type);
|
||||||
|
|
||||||
void CustomData_external_write(struct CustomData *data,
|
void CustomData_external_write(struct CustomData *data,
|
||||||
struct ID *id, CustomDataMask mask, int totelem, int free);
|
struct ID *id, CustomDataMask mask, int totelem, int free);
|
||||||
void CustomData_external_read(struct CustomData *data,
|
void CustomData_external_read(struct CustomData *data,
|
||||||
struct ID *id, CustomDataMask mask, int totelem);
|
struct ID *id, CustomDataMask mask, int totelem);
|
||||||
void CustomData_external_reload(struct CustomData *data,
|
void CustomData_external_reload(struct CustomData *data,
|
||||||
struct ID *id, CustomDataMask mask, int totelem);
|
struct ID *id, CustomDataMask mask, int totelem);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@@ -25,10 +25,10 @@
|
|||||||
* \ingroup bke
|
* \ingroup bke
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define CDF_TYPE_IMAGE 0
|
#define CDF_TYPE_IMAGE 0
|
||||||
#define CDF_TYPE_MESH 1
|
#define CDF_TYPE_MESH 1
|
||||||
|
|
||||||
#define CDF_LAYER_NAME_MAX 64
|
#define CDF_LAYER_NAME_MAX 64
|
||||||
|
|
||||||
typedef struct CDataFile CDataFile;
|
typedef struct CDataFile CDataFile;
|
||||||
typedef struct CDataFileLayer CDataFileLayer;
|
typedef struct CDataFileLayer CDataFileLayer;
|
||||||
|
@@ -40,17 +40,17 @@ struct ListBase;
|
|||||||
struct bDeformGroup;
|
struct bDeformGroup;
|
||||||
struct MDeformVert;
|
struct MDeformVert;
|
||||||
|
|
||||||
void defgroup_copy_list(struct ListBase *lb1, struct ListBase *lb2);
|
void defgroup_copy_list(struct ListBase *lb1, struct ListBase *lb2);
|
||||||
struct bDeformGroup *defgroup_duplicate(struct bDeformGroup *ingroup);
|
struct bDeformGroup *defgroup_duplicate(struct bDeformGroup *ingroup);
|
||||||
struct bDeformGroup *defgroup_find_name(struct Object *ob, const char *name);
|
struct bDeformGroup *defgroup_find_name(struct Object *ob, const char *name);
|
||||||
int *defgroup_flip_map(struct Object *ob, int *flip_map_len, int use_default);
|
int *defgroup_flip_map(struct Object *ob, int *flip_map_len, int use_default);
|
||||||
int *defgroup_flip_map_single(struct Object *ob, int *flip_map_len, int use_default, int defgroup);
|
int *defgroup_flip_map_single(struct Object *ob, int *flip_map_len, int use_default, int defgroup);
|
||||||
int defgroup_flip_index(struct Object *ob, int index, int use_default);
|
int defgroup_flip_index(struct Object *ob, int index, int use_default);
|
||||||
int defgroup_name_index(struct Object *ob, const char *name);
|
int defgroup_name_index(struct Object *ob, const char *name);
|
||||||
void defgroup_unique_name(struct bDeformGroup *dg, struct Object *ob);
|
void defgroup_unique_name(struct bDeformGroup *dg, struct Object *ob);
|
||||||
|
|
||||||
struct MDeformWeight *defvert_find_index(const struct MDeformVert *dv, const int defgroup);
|
struct MDeformWeight *defvert_find_index(const struct MDeformVert *dv, const int defgroup);
|
||||||
struct MDeformWeight *defvert_verify_index(struct MDeformVert *dv, const int defgroup);
|
struct MDeformWeight *defvert_verify_index(struct MDeformVert *dv, const int defgroup);
|
||||||
void defvert_add_index_notest(struct MDeformVert *dv, int defgroup, const float weight);
|
void defvert_add_index_notest(struct MDeformVert *dv, int defgroup, const float weight);
|
||||||
void defvert_remove_group(struct MDeformVert *dvert, struct MDeformWeight *dw);
|
void defvert_remove_group(struct MDeformVert *dvert, struct MDeformWeight *dw);
|
||||||
void defvert_clear(struct MDeformVert *dvert);
|
void defvert_clear(struct MDeformVert *dvert);
|
||||||
@@ -63,7 +63,7 @@ void defvert_copy_index(struct MDeformVert *dvert_dst, const struct MDeformVert
|
|||||||
void defvert_sync(struct MDeformVert *dvert_dst, const struct MDeformVert *dvert_src, int use_verify);
|
void defvert_sync(struct MDeformVert *dvert_dst, const struct MDeformVert *dvert_src, int use_verify);
|
||||||
void defvert_sync_mapped(struct MDeformVert *dvert_dst, const struct MDeformVert *dvert_src,
|
void defvert_sync_mapped(struct MDeformVert *dvert_dst, const struct MDeformVert *dvert_src,
|
||||||
const int *flip_map, const int flip_map_len, const int use_verify);
|
const int *flip_map, const int flip_map_len, const int use_verify);
|
||||||
void defvert_remap (struct MDeformVert *dvert, int *map, const int map_len);
|
void defvert_remap(struct MDeformVert *dvert, int *map, const int map_len);
|
||||||
void defvert_flip(struct MDeformVert *dvert, const int *flip_map, const int flip_map_len);
|
void defvert_flip(struct MDeformVert *dvert, const int *flip_map, const int flip_map_len);
|
||||||
void defvert_flip_merged(struct MDeformVert *dvert, const int *flip_map, const int flip_map_len);
|
void defvert_flip_merged(struct MDeformVert *dvert, const int *flip_map, const int flip_map_len);
|
||||||
void defvert_normalize(struct MDeformVert *dvert);
|
void defvert_normalize(struct MDeformVert *dvert);
|
||||||
|
@@ -46,37 +46,37 @@ struct GHash;
|
|||||||
|
|
||||||
/* **** DAG relation types *** */
|
/* **** DAG relation types *** */
|
||||||
|
|
||||||
/* scene link to object */
|
/* scene link to object */
|
||||||
#define DAG_RL_SCENE (1<<0)
|
#define DAG_RL_SCENE (1 << 0)
|
||||||
/* object link to data */
|
/* object link to data */
|
||||||
#define DAG_RL_DATA (1<<1)
|
#define DAG_RL_DATA (1 << 1)
|
||||||
|
|
||||||
/* object changes object (parent, track, constraints) */
|
/* object changes object (parent, track, constraints) */
|
||||||
#define DAG_RL_OB_OB (1<<2)
|
#define DAG_RL_OB_OB (1 << 2)
|
||||||
/* object changes obdata (hooks, constraints) */
|
/* object changes obdata (hooks, constraints) */
|
||||||
#define DAG_RL_OB_DATA (1<<3)
|
#define DAG_RL_OB_DATA (1 << 3)
|
||||||
/* data changes object (vertex parent) */
|
/* data changes object (vertex parent) */
|
||||||
#define DAG_RL_DATA_OB (1<<4)
|
#define DAG_RL_DATA_OB (1 << 4)
|
||||||
/* data changes data (deformers) */
|
/* data changes data (deformers) */
|
||||||
#define DAG_RL_DATA_DATA (1<<5)
|
#define DAG_RL_DATA_DATA (1 << 5)
|
||||||
|
|
||||||
#define DAG_NO_RELATION (1<<6)
|
#define DAG_NO_RELATION (1 << 6)
|
||||||
|
|
||||||
#define DAG_RL_ALL_BUT_DATA (DAG_RL_SCENE|DAG_RL_OB_OB|DAG_RL_OB_DATA|DAG_RL_DATA_OB|DAG_RL_DATA_DATA)
|
#define DAG_RL_ALL_BUT_DATA (DAG_RL_SCENE | DAG_RL_OB_OB | DAG_RL_OB_DATA | DAG_RL_DATA_OB | DAG_RL_DATA_DATA)
|
||||||
#define DAG_RL_ALL (DAG_RL_ALL_BUT_DATA|DAG_RL_DATA)
|
#define DAG_RL_ALL (DAG_RL_ALL_BUT_DATA | DAG_RL_DATA)
|
||||||
|
|
||||||
|
|
||||||
typedef void (*graph_action_func)(void * ob, void **data);
|
typedef void (*graph_action_func)(void *ob, void **data);
|
||||||
|
|
||||||
// queues are returned by all BFS & DFS queries
|
// queues are returned by all BFS & DFS queries
|
||||||
// opaque type
|
// opaque type
|
||||||
void *pop_ob_queue(struct DagNodeQueue *queue);
|
void *pop_ob_queue(struct DagNodeQueue *queue);
|
||||||
int queue_count(struct DagNodeQueue *queue);
|
int queue_count(struct DagNodeQueue *queue);
|
||||||
void queue_delete(struct DagNodeQueue *queue);
|
void queue_delete(struct DagNodeQueue *queue);
|
||||||
|
|
||||||
// queries
|
// queries
|
||||||
struct DagForest *build_dag(struct Main *bmain, struct Scene *sce, short mask);
|
struct DagForest *build_dag(struct Main *bmain, struct Scene *sce, short mask);
|
||||||
void free_forest(struct DagForest *Dag);
|
void free_forest(struct DagForest *Dag);
|
||||||
|
|
||||||
// note :
|
// note :
|
||||||
// the meanings of the 2 returning values is a bit different :
|
// the meanings of the 2 returning values is a bit different :
|
||||||
@@ -88,49 +88,49 @@ int pre_and_post_DFS(struct DagForest *dag, short mask, graph_action_func pre_fu
|
|||||||
int pre_and_post_source_BFS(struct DagForest *dag, short mask, struct DagNode *source, graph_action_func pre_func, graph_action_func post_func, void **data);
|
int pre_and_post_source_BFS(struct DagForest *dag, short mask, struct DagNode *source, graph_action_func pre_func, graph_action_func post_func, void **data);
|
||||||
int pre_and_post_source_DFS(struct DagForest *dag, short mask, struct DagNode *source, graph_action_func pre_func, graph_action_func post_func, void **data);
|
int pre_and_post_source_DFS(struct DagForest *dag, short mask, struct DagNode *source, graph_action_func pre_func, graph_action_func post_func, void **data);
|
||||||
|
|
||||||
struct DagNodeQueue *get_obparents(struct DagForest *dag, void *ob);
|
struct DagNodeQueue *get_obparents(struct DagForest *dag, void *ob);
|
||||||
struct DagNodeQueue *get_first_ancestors(struct DagForest *dag, void *ob);
|
struct DagNodeQueue *get_first_ancestors(struct DagForest *dag, void *ob);
|
||||||
struct DagNodeQueue *get_all_childs(struct DagForest *dag, void *ob); //
|
struct DagNodeQueue *get_all_childs(struct DagForest *dag, void *ob);
|
||||||
short are_obs_related(struct DagForest *dag, void *ob1, void *ob2);
|
short are_obs_related(struct DagForest *dag, void *ob1, void *ob2);
|
||||||
int is_acyclic(struct DagForest *dag); //
|
int is_acyclic(struct DagForest *dag);
|
||||||
//int get_cycles(struct DagForest *dag, struct DagNodeQueue **queues, int *count); //
|
//int get_cycles(struct DagForest *dag, struct DagNodeQueue **queues, int *count); //
|
||||||
|
|
||||||
/* ********** API *************** */
|
/* ********** API *************** */
|
||||||
/* Note that the DAG never executes changes in Objects, only sets flags in Objects */
|
/* Note that the DAG never executes changes in Objects, only sets flags in Objects */
|
||||||
|
|
||||||
/* (re)-create dependency graph for scene */
|
/* (re)-create dependency graph for scene */
|
||||||
void DAG_scene_sort(struct Main *bmain, struct Scene *sce);
|
void DAG_scene_sort(struct Main *bmain, struct Scene *sce);
|
||||||
|
|
||||||
/* flag all objects that need recalc because they're animated */
|
/* flag all objects that need recalc because they're animated */
|
||||||
void DAG_scene_update_flags(struct Main *bmain, struct Scene *sce, unsigned int lay, const short do_time);
|
void DAG_scene_update_flags(struct Main *bmain, struct Scene *sce, unsigned int lay, const short do_time);
|
||||||
/* flushes all recalc flags in objects down the dependency tree */
|
/* flushes all recalc flags in objects down the dependency tree */
|
||||||
void DAG_scene_flush_update(struct Main *bmain, struct Scene *sce, unsigned int lay, const short do_time);
|
void DAG_scene_flush_update(struct Main *bmain, struct Scene *sce, unsigned int lay, const short do_time);
|
||||||
/* tag objects for update on file load */
|
/* tag objects for update on file load */
|
||||||
void DAG_on_visible_update(struct Main *bmain, const short do_time);
|
void DAG_on_visible_update(struct Main *bmain, const short do_time);
|
||||||
|
|
||||||
/* when setting manual RECALC flags, call this afterwards */
|
/* when setting manual RECALC flags, call this afterwards */
|
||||||
void DAG_ids_flush_update(struct Main *bmain, int time);
|
void DAG_ids_flush_update(struct Main *bmain, int time);
|
||||||
|
|
||||||
/* tag datablock to get updated for the next redraw */
|
/* tag datablock to get updated for the next redraw */
|
||||||
void DAG_id_tag_update(struct ID *id, short flag);
|
void DAG_id_tag_update(struct ID *id, short flag);
|
||||||
/* flush all tagged updates */
|
/* flush all tagged updates */
|
||||||
void DAG_ids_flush_tagged(struct Main *bmain);
|
void DAG_ids_flush_tagged(struct Main *bmain);
|
||||||
/* check and clear ID recalc flags */
|
/* check and clear ID recalc flags */
|
||||||
void DAG_ids_check_recalc(struct Main *bmain, struct Scene *scene, int time);
|
void DAG_ids_check_recalc(struct Main *bmain, struct Scene *scene, int time);
|
||||||
void DAG_ids_clear_recalc(struct Main *bmain);
|
void DAG_ids_clear_recalc(struct Main *bmain);
|
||||||
/* test if any of this id type is tagged for update */
|
/* test if any of this id type is tagged for update */
|
||||||
void DAG_id_type_tag(struct Main *bmain, short idtype);
|
void DAG_id_type_tag(struct Main *bmain, short idtype);
|
||||||
int DAG_id_type_tagged(struct Main *bmain, short idtype);
|
int DAG_id_type_tagged(struct Main *bmain, short idtype);
|
||||||
|
|
||||||
/* (re)-create dependency graph for armature pose */
|
/* (re)-create dependency graph for armature pose */
|
||||||
void DAG_pose_sort(struct Object *ob);
|
void DAG_pose_sort(struct Object *ob);
|
||||||
|
|
||||||
/* callback for editors module to do updates */
|
/* callback for editors module to do updates */
|
||||||
void DAG_editors_update_cb(void (*id_func)(struct Main *bmain, struct ID *id),
|
void DAG_editors_update_cb(void (*id_func)(struct Main *bmain, struct ID *id),
|
||||||
void (*scene_func)(struct Main *bmain, struct Scene *scene, int updated));
|
void (*scene_func)(struct Main *bmain, struct Scene *scene, int updated));
|
||||||
|
|
||||||
/* debugging */
|
/* debugging */
|
||||||
void DAG_print_dependencies(struct Main *bmain, struct Scene *scene, struct Object *ob);
|
void DAG_print_dependencies(struct Main *bmain, struct Scene *scene, struct Object *ob);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@@ -42,13 +42,13 @@
|
|||||||
#define DL_INDEX3 4
|
#define DL_INDEX3 4
|
||||||
#define DL_INDEX4 5
|
#define DL_INDEX4 5
|
||||||
#define DL_VERTCOL 6
|
#define DL_VERTCOL 6
|
||||||
#define DL_VERTS 7
|
#define DL_VERTS 7
|
||||||
|
|
||||||
/* dl->flag */
|
/* dl->flag */
|
||||||
#define DL_CYCL_U 1
|
#define DL_CYCL_U 1
|
||||||
#define DL_CYCL_V 2
|
#define DL_CYCL_V 2
|
||||||
#define DL_FRONT_CURVE 4
|
#define DL_FRONT_CURVE 4
|
||||||
#define DL_BACK_CURVE 8
|
#define DL_BACK_CURVE 8
|
||||||
|
|
||||||
|
|
||||||
/* prototypes */
|
/* prototypes */
|
||||||
@@ -73,7 +73,7 @@ typedef struct DispList {
|
|||||||
int *index;
|
int *index;
|
||||||
unsigned int *col1, *col2;
|
unsigned int *col1, *col2;
|
||||||
int charidx;
|
int charidx;
|
||||||
int totindex; /* indexed array drawing surfaces */
|
int totindex; /* indexed array drawing surfaces */
|
||||||
|
|
||||||
unsigned int *bevelSplitFlag;
|
unsigned int *bevelSplitFlag;
|
||||||
} DispList;
|
} DispList;
|
||||||
|
@@ -64,7 +64,7 @@ typedef struct PaintWavePoint {
|
|||||||
} PaintWavePoint;
|
} PaintWavePoint;
|
||||||
|
|
||||||
struct DerivedMesh *dynamicPaint_Modifier_do(struct DynamicPaintModifierData *pmd, struct Scene *scene, struct Object *ob, struct DerivedMesh *dm);
|
struct DerivedMesh *dynamicPaint_Modifier_do(struct DynamicPaintModifierData *pmd, struct Scene *scene, struct Object *ob, struct DerivedMesh *dm);
|
||||||
void dynamicPaint_Modifier_free (struct DynamicPaintModifierData *pmd);
|
void dynamicPaint_Modifier_free(struct DynamicPaintModifierData *pmd);
|
||||||
void dynamicPaint_Modifier_copy(struct DynamicPaintModifierData *pmd, struct DynamicPaintModifierData *tsmd);
|
void dynamicPaint_Modifier_copy(struct DynamicPaintModifierData *pmd, struct DynamicPaintModifierData *tsmd);
|
||||||
|
|
||||||
int dynamicPaint_createType(struct DynamicPaintModifierData *pmd, int type, struct Scene *scene);
|
int dynamicPaint_createType(struct DynamicPaintModifierData *pmd, int type, struct Scene *scene);
|
||||||
@@ -87,7 +87,7 @@ struct DynamicPaintSurface *get_activeSurface(struct DynamicPaintCanvasSettings
|
|||||||
/* image sequence baking */
|
/* image sequence baking */
|
||||||
int dynamicPaint_createUVSurface(struct DynamicPaintSurface *surface);
|
int dynamicPaint_createUVSurface(struct DynamicPaintSurface *surface);
|
||||||
int dynamicPaint_calculateFrame(struct DynamicPaintSurface *surface, struct Scene *scene, struct Object *cObject, int frame);
|
int dynamicPaint_calculateFrame(struct DynamicPaintSurface *surface, struct Scene *scene, struct Object *cObject, int frame);
|
||||||
void dynamicPaint_outputSurfaceImage(struct DynamicPaintSurface *surface, char* filename, short output_layer);
|
void dynamicPaint_outputSurfaceImage(struct DynamicPaintSurface *surface, char *filename, short output_layer);
|
||||||
|
|
||||||
/* PaintPoint state */
|
/* PaintPoint state */
|
||||||
#define DPAINT_PAINT_NONE -1
|
#define DPAINT_PAINT_NONE -1
|
||||||
|
@@ -52,7 +52,7 @@ struct PartDeflect *object_add_collision_fields(int type);
|
|||||||
typedef struct EffectedPoint {
|
typedef struct EffectedPoint {
|
||||||
float *loc;
|
float *loc;
|
||||||
float *vel;
|
float *vel;
|
||||||
float *ave; /* angular velocity for particles with dynamic rotation */
|
float *ave; /* angular velocity for particles with dynamic rotation */
|
||||||
float *rot; /* rotation quaternion for particles with dynamic rotation */
|
float *rot; /* rotation quaternion for particles with dynamic rotation */
|
||||||
float vel_to_frame;
|
float vel_to_frame;
|
||||||
float vel_to_sec;
|
float vel_to_sec;
|
||||||
@@ -63,7 +63,7 @@ typedef struct EffectedPoint {
|
|||||||
unsigned int flag;
|
unsigned int flag;
|
||||||
int index;
|
int index;
|
||||||
|
|
||||||
struct ParticleSystem *psys; /* particle system the point belongs to */
|
struct ParticleSystem *psys; /* particle system the point belongs to */
|
||||||
} EffectedPoint;
|
} EffectedPoint;
|
||||||
|
|
||||||
typedef struct GuideEffectorData {
|
typedef struct GuideEffectorData {
|
||||||
@@ -86,7 +86,7 @@ typedef struct EffectorData {
|
|||||||
/* only for vortex effector with surface falloff */
|
/* only for vortex effector with surface falloff */
|
||||||
float nor2[3], vec_to_point2[3];
|
float nor2[3], vec_to_point2[3];
|
||||||
|
|
||||||
int *index; /* point index */
|
int *index; /* point index */
|
||||||
} EffectorData;
|
} EffectorData;
|
||||||
|
|
||||||
/* used for calculating the effector force */
|
/* used for calculating the effector force */
|
||||||
@@ -109,10 +109,10 @@ typedef struct EffectorCache {
|
|||||||
int flag;
|
int flag;
|
||||||
} EffectorCache;
|
} EffectorCache;
|
||||||
|
|
||||||
void free_partdeflect(struct PartDeflect *pd);
|
void free_partdeflect(struct PartDeflect *pd);
|
||||||
struct ListBase *pdInitEffectors(struct Scene *scene, struct Object *ob_src, struct ParticleSystem *psys_src, struct EffectorWeights *weights);
|
struct ListBase *pdInitEffectors(struct Scene *scene, struct Object *ob_src, struct ParticleSystem *psys_src, struct EffectorWeights *weights);
|
||||||
void pdEndEffectors(struct ListBase **effectors);
|
void pdEndEffectors(struct ListBase **effectors);
|
||||||
void pdDoEffectors(struct ListBase *effectors, struct ListBase *colliders, struct EffectorWeights *weights, struct EffectedPoint *point, float *force, float *impulse);
|
void pdDoEffectors(struct ListBase *effectors, struct ListBase *colliders, struct EffectorWeights *weights, struct EffectedPoint *point, float *force, float *impulse);
|
||||||
|
|
||||||
void pd_point_from_particle(struct ParticleSimulationData *sim, struct ParticleData *pa, struct ParticleKey *state, struct EffectedPoint *point);
|
void pd_point_from_particle(struct ParticleSimulationData *sim, struct ParticleData *pa, struct ParticleKey *state, struct EffectedPoint *point);
|
||||||
void pd_point_from_loc(struct Scene *scene, float *loc, float *vel, int index, struct EffectedPoint *point);
|
void pd_point_from_loc(struct Scene *scene, float *loc, float *vel, int index, struct EffectedPoint *point);
|
||||||
@@ -120,7 +120,7 @@ void pd_point_from_soft(struct Scene *scene, float *loc, float *vel, int index,
|
|||||||
|
|
||||||
/* needed for boids */
|
/* needed for boids */
|
||||||
float effector_falloff(struct EffectorCache *eff, struct EffectorData *efd, struct EffectedPoint *point, struct EffectorWeights *weights);
|
float effector_falloff(struct EffectorCache *eff, struct EffectorData *efd, struct EffectedPoint *point, struct EffectorWeights *weights);
|
||||||
int closest_point_on_surface(SurfaceModifierData *surmd, const float co[3], float surface_co[3], float surface_nor[3], float surface_vel[3]);
|
int closest_point_on_surface(SurfaceModifierData * surmd, const float co[3], float surface_co[3], float surface_nor[3], float surface_vel[3]);
|
||||||
int get_effector_data(struct EffectorCache *eff, struct EffectorData *efd, struct EffectedPoint *point, int real_velocity);
|
int get_effector_data(struct EffectorCache *eff, struct EffectorData *efd, struct EffectedPoint *point, int real_velocity);
|
||||||
|
|
||||||
/* required for particle_system.c */
|
/* required for particle_system.c */
|
||||||
@@ -128,12 +128,12 @@ int get_effector_data(struct EffectorCache *eff, struct EffectorData *efd, struc
|
|||||||
//float effector_falloff(struct EffectorData *eff, struct EffectorPoint *point, struct EffectorWeights *weights);
|
//float effector_falloff(struct EffectorData *eff, struct EffectorPoint *point, struct EffectorWeights *weights);
|
||||||
|
|
||||||
/* EffectedPoint->flag */
|
/* EffectedPoint->flag */
|
||||||
#define PE_WIND_AS_SPEED 1
|
#define PE_WIND_AS_SPEED 1
|
||||||
#define PE_DYNAMIC_ROTATION 2
|
#define PE_DYNAMIC_ROTATION 2
|
||||||
#define PE_USE_NORMAL_DATA 4
|
#define PE_USE_NORMAL_DATA 4
|
||||||
|
|
||||||
/* EffectorData->flag */
|
/* EffectorData->flag */
|
||||||
#define PE_VELOCITY_TO_IMPULSE 1
|
#define PE_VELOCITY_TO_IMPULSE 1
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -70,15 +70,15 @@ void bezt_add_to_cfra_elem(ListBase *lb, struct BezTriple *bezt);
|
|||||||
/* convenience looper over ALL driver targets for a given variable (even the unused ones) */
|
/* convenience looper over ALL driver targets for a given variable (even the unused ones) */
|
||||||
#define DRIVER_TARGETS_LOOPER(dvar) \
|
#define DRIVER_TARGETS_LOOPER(dvar) \
|
||||||
{ \
|
{ \
|
||||||
DriverTarget *dtar= &dvar->targets[0]; \
|
DriverTarget *dtar = &dvar->targets[0]; \
|
||||||
int tarIndex= 0; \
|
int tarIndex = 0; \
|
||||||
for (; tarIndex < MAX_DRIVER_TARGETS; tarIndex++, dtar++)
|
for (; tarIndex < MAX_DRIVER_TARGETS; tarIndex++, dtar++)
|
||||||
|
|
||||||
/* convenience looper over USED driver targets only */
|
/* convenience looper over USED driver targets only */
|
||||||
#define DRIVER_TARGETS_USED_LOOPER(dvar) \
|
#define DRIVER_TARGETS_USED_LOOPER(dvar) \
|
||||||
{ \
|
{ \
|
||||||
DriverTarget *dtar= &dvar->targets[0]; \
|
DriverTarget *dtar = &dvar->targets[0]; \
|
||||||
int tarIndex= 0; \
|
int tarIndex = 0; \
|
||||||
for (; tarIndex < dvar->num_targets; tarIndex++, dtar++)
|
for (; tarIndex < dvar->num_targets; tarIndex++, dtar++)
|
||||||
|
|
||||||
/* tidy up for driver targets loopers */
|
/* tidy up for driver targets loopers */
|
||||||
@@ -94,7 +94,7 @@ void driver_free_variable(struct ChannelDriver *driver, struct DriverVar *dvar);
|
|||||||
void driver_change_variable_type(struct DriverVar *dvar, int type);
|
void driver_change_variable_type(struct DriverVar *dvar, int type);
|
||||||
struct DriverVar *driver_add_new_variable(struct ChannelDriver *driver);
|
struct DriverVar *driver_add_new_variable(struct ChannelDriver *driver);
|
||||||
|
|
||||||
float driver_get_variable_value (struct ChannelDriver *driver, struct DriverVar *dvar);
|
float driver_get_variable_value(struct ChannelDriver *driver, struct DriverVar *dvar);
|
||||||
|
|
||||||
/* ************** F-Curve Modifiers *************** */
|
/* ************** F-Curve Modifiers *************** */
|
||||||
|
|
||||||
@@ -111,52 +111,52 @@ float driver_get_variable_value (struct ChannelDriver *driver, struct DriverVar
|
|||||||
*/
|
*/
|
||||||
typedef struct FModifierTypeInfo {
|
typedef struct FModifierTypeInfo {
|
||||||
/* admin/ident */
|
/* admin/ident */
|
||||||
short type; /* FMODIFIER_TYPE_### */
|
short type; /* FMODIFIER_TYPE_### */
|
||||||
short size; /* size in bytes of the struct */
|
short size; /* size in bytes of the struct */
|
||||||
short acttype; /* eFMI_Action_Types */
|
short acttype; /* eFMI_Action_Types */
|
||||||
short requires; /* eFMI_Requirement_Flags */
|
short requires; /* eFMI_Requirement_Flags */
|
||||||
char name[64]; /* name of modifier in interface */
|
char name[64]; /* name of modifier in interface */
|
||||||
char structName[64]; /* name of struct for SDNA */
|
char structName[64]; /* name of struct for SDNA */
|
||||||
|
|
||||||
/* data management function pointers - special handling */
|
/* data management function pointers - special handling */
|
||||||
/* free any data that is allocated separately (optional) */
|
/* free any data that is allocated separately (optional) */
|
||||||
void (*free_data)(struct FModifier *fcm);
|
void (*free_data)(struct FModifier *fcm);
|
||||||
/* copy any special data that is allocated separately (optional) */
|
/* copy any special data that is allocated separately (optional) */
|
||||||
void (*copy_data)(struct FModifier *fcm, struct FModifier *src);
|
void (*copy_data)(struct FModifier *fcm, struct FModifier *src);
|
||||||
/* set settings for data that will be used for FCuModifier.data (memory already allocated using MEM_callocN) */
|
/* set settings for data that will be used for FCuModifier.data (memory already allocated using MEM_callocN) */
|
||||||
void (*new_data)(void *mdata);
|
void (*new_data)(void *mdata);
|
||||||
/* verifies that the modifier settings are valid */
|
/* verifies that the modifier settings are valid */
|
||||||
void (*verify_data)(struct FModifier *fcm);
|
void (*verify_data)(struct FModifier *fcm);
|
||||||
|
|
||||||
/* evaluation */
|
/* evaluation */
|
||||||
/* evaluate time that the modifier requires the F-Curve to be evaluated at */
|
/* evaluate time that the modifier requires the F-Curve to be evaluated at */
|
||||||
float (*evaluate_modifier_time)(struct FCurve *fcu, struct FModifier *fcm, float cvalue, float evaltime);
|
float (*evaluate_modifier_time)(struct FCurve *fcu, struct FModifier *fcm, float cvalue, float evaltime);
|
||||||
/* evaluate the modifier for the given time and 'accumulated' value */
|
/* evaluate the modifier for the given time and 'accumulated' value */
|
||||||
void (*evaluate_modifier)(struct FCurve *fcu, struct FModifier *fcm, float *cvalue, float evaltime);
|
void (*evaluate_modifier)(struct FCurve *fcu, struct FModifier *fcm, float *cvalue, float evaltime);
|
||||||
} FModifierTypeInfo;
|
} FModifierTypeInfo;
|
||||||
|
|
||||||
/* Values which describe the behavior of a FModifier Type */
|
/* Values which describe the behavior of a FModifier Type */
|
||||||
typedef enum eFMI_Action_Types {
|
typedef enum eFMI_Action_Types {
|
||||||
/* modifier only modifies values outside of data range */
|
/* modifier only modifies values outside of data range */
|
||||||
FMI_TYPE_EXTRAPOLATION = 0,
|
FMI_TYPE_EXTRAPOLATION = 0,
|
||||||
/* modifier leaves data-points alone, but adjusts the interpolation between and around them */
|
/* modifier leaves data-points alone, but adjusts the interpolation between and around them */
|
||||||
FMI_TYPE_INTERPOLATION,
|
FMI_TYPE_INTERPOLATION,
|
||||||
/* modifier only modifies the values of points (but times stay the same) */
|
/* modifier only modifies the values of points (but times stay the same) */
|
||||||
FMI_TYPE_REPLACE_VALUES,
|
FMI_TYPE_REPLACE_VALUES,
|
||||||
/* modifier generates a curve regardless of what came before */
|
/* modifier generates a curve regardless of what came before */
|
||||||
FMI_TYPE_GENERATE_CURVE
|
FMI_TYPE_GENERATE_CURVE
|
||||||
} eFMI_Action_Types;
|
} eFMI_Action_Types;
|
||||||
|
|
||||||
/* Flags for the requirements of a FModifier Type */
|
/* Flags for the requirements of a FModifier Type */
|
||||||
typedef enum eFMI_Requirement_Flags {
|
typedef enum eFMI_Requirement_Flags {
|
||||||
/* modifier requires original data-points (kindof beats the purpose of a modifier stack?) */
|
/* modifier requires original data-points (kindof beats the purpose of a modifier stack?) */
|
||||||
FMI_REQUIRES_ORIGINAL_DATA = (1<<0),
|
FMI_REQUIRES_ORIGINAL_DATA = (1 << 0),
|
||||||
/* modifier doesn't require on any preceding data (i.e. it will generate a curve).
|
/* modifier doesn't require on any preceding data (i.e. it will generate a curve).
|
||||||
* Use in conjunction with FMI_TYPE_GENRATE_CURVE
|
* Use in conjunction with FMI_TYPE_GENRATE_CURVE
|
||||||
*/
|
*/
|
||||||
FMI_REQUIRES_NOTHING = (1<<1),
|
FMI_REQUIRES_NOTHING = (1 << 1),
|
||||||
/* refer to modifier instance */
|
/* refer to modifier instance */
|
||||||
FMI_REQUIRES_RUNTIME_CHECK = (1<<2)
|
FMI_REQUIRES_RUNTIME_CHECK = (1 << 2)
|
||||||
} eFMI_Requirement_Flags;
|
} eFMI_Requirement_Flags;
|
||||||
|
|
||||||
/* Function Prototypes for FModifierTypeInfo's */
|
/* Function Prototypes for FModifierTypeInfo's */
|
||||||
@@ -194,7 +194,7 @@ void copy_fcurves(ListBase *dst, ListBase *src);
|
|||||||
/* find matching F-Curve in the given list of F-Curves */
|
/* find matching F-Curve in the given list of F-Curves */
|
||||||
struct FCurve *list_find_fcurve(ListBase *list, const char rna_path[], const int array_index);
|
struct FCurve *list_find_fcurve(ListBase *list, const char rna_path[], const int array_index);
|
||||||
|
|
||||||
struct FCurve *iter_step_fcurve (struct FCurve *fcu_iter, const char rna_path[]);
|
struct FCurve *iter_step_fcurve(struct FCurve *fcu_iter, const char rna_path[]);
|
||||||
|
|
||||||
/* high level function to get an fcurve from C without having the rna */
|
/* high level function to get an fcurve from C without having the rna */
|
||||||
struct FCurve *id_data_find_fcurve(ID *id, void *data, struct StructRNA *type, const char *prop_name, int index, char *driven);
|
struct FCurve *id_data_find_fcurve(ID *id, void *data, struct StructRNA *type, const char *prop_name, int index, char *driven);
|
||||||
|
@@ -42,9 +42,9 @@ struct MVert;
|
|||||||
/* old interface */
|
/* old interface */
|
||||||
|
|
||||||
void initElbeemMesh(struct Scene *scene, struct Object *ob,
|
void initElbeemMesh(struct Scene *scene, struct Object *ob,
|
||||||
int *numVertices, float **vertices,
|
int *numVertices, float **vertices,
|
||||||
int *numTriangles, int **triangles,
|
int *numTriangles, int **triangles,
|
||||||
int useGlobalCoords, int modifierIndex);
|
int useGlobalCoords, int modifierIndex);
|
||||||
|
|
||||||
/* bounding box & memory estimate */
|
/* bounding box & memory estimate */
|
||||||
void fluid_get_bb(struct MVert *mvert, int totvert, float obmat[][4],
|
void fluid_get_bb(struct MVert *mvert, int totvert, float obmat[][4],
|
||||||
|
@@ -64,8 +64,8 @@ typedef struct Global {
|
|||||||
short afbreek, moving, file_loaded;
|
short afbreek, moving, file_loaded;
|
||||||
char background;
|
char background;
|
||||||
char factory_startup;
|
char factory_startup;
|
||||||
short winpos, displaymode; /* used to be in Render */
|
short winpos, displaymode; /* used to be in Render */
|
||||||
short rendering; /* to indicate render is busy, prevent renderwindow events etc */
|
short rendering; /* to indicate render is busy, prevent renderwindow events etc */
|
||||||
|
|
||||||
short rt;
|
short rt;
|
||||||
int f;
|
int f;
|
||||||
@@ -75,7 +75,7 @@ typedef struct Global {
|
|||||||
struct BME_Glob *editBMesh;
|
struct BME_Glob *editBMesh;
|
||||||
|
|
||||||
/* Frank's variables */
|
/* Frank's variables */
|
||||||
int save_over;
|
int save_over;
|
||||||
|
|
||||||
/* Rob's variables (keep here for WM recode) */
|
/* Rob's variables (keep here for WM recode) */
|
||||||
int have_quicktime;
|
int have_quicktime;
|
||||||
@@ -96,12 +96,12 @@ typedef struct Global {
|
|||||||
/* **************** GLOBAL ********************* */
|
/* **************** GLOBAL ********************* */
|
||||||
|
|
||||||
/* G.f */
|
/* G.f */
|
||||||
#define G_RENDER_OGL (1 << 0)
|
#define G_RENDER_OGL (1 << 0)
|
||||||
#define G_SWAP_EXCHANGE (1 << 1)
|
#define G_SWAP_EXCHANGE (1 << 1)
|
||||||
/* also uses G_FILE_AUTOPLAY */
|
/* also uses G_FILE_AUTOPLAY */
|
||||||
/* #define G_RENDER_SHADOW (1 << 3) */ /* temp flag, removed */
|
/* #define G_RENDER_SHADOW (1 << 3) */ /* temp flag, removed */
|
||||||
#define G_BACKBUFSEL (1 << 4)
|
#define G_BACKBUFSEL (1 << 4)
|
||||||
#define G_PICKSEL (1 << 5)
|
#define G_PICKSEL (1 << 5)
|
||||||
|
|
||||||
/* #define G_FACESELECT (1 << 8) use (mesh->editflag & ME_EDIT_PAINT_MASK) */
|
/* #define G_FACESELECT (1 << 8) use (mesh->editflag & ME_EDIT_PAINT_MASK) */
|
||||||
|
|
||||||
@@ -109,7 +109,7 @@ typedef struct Global {
|
|||||||
#define G_SCRIPT_OVERRIDE_PREF (1 << 14) /* when this flag is set ignore the userprefs */
|
#define G_SCRIPT_OVERRIDE_PREF (1 << 14) /* when this flag is set ignore the userprefs */
|
||||||
|
|
||||||
/* #define G_NOFROZEN (1 << 17) also removed */
|
/* #define G_NOFROZEN (1 << 17) also removed */
|
||||||
/* #define G_GREASEPENCIL (1 << 17) also removed */
|
/* #define G_GREASEPENCIL (1 << 17) also removed */
|
||||||
|
|
||||||
/* #define G_AUTOMATKEYS (1 << 30) also removed */
|
/* #define G_AUTOMATKEYS (1 << 30) also removed */
|
||||||
|
|
||||||
@@ -130,39 +130,39 @@ enum {
|
|||||||
#define G_AUTOPACK (1 << 0)
|
#define G_AUTOPACK (1 << 0)
|
||||||
#define G_FILE_COMPRESS (1 << 1)
|
#define G_FILE_COMPRESS (1 << 1)
|
||||||
#define G_FILE_AUTOPLAY (1 << 2)
|
#define G_FILE_AUTOPLAY (1 << 2)
|
||||||
#define G_FILE_ENABLE_ALL_FRAMES (1 << 3) /* deprecated */
|
#define G_FILE_ENABLE_ALL_FRAMES (1 << 3) /* deprecated */
|
||||||
#define G_FILE_SHOW_DEBUG_PROPS (1 << 4) /* deprecated */
|
#define G_FILE_SHOW_DEBUG_PROPS (1 << 4) /* deprecated */
|
||||||
#define G_FILE_SHOW_FRAMERATE (1 << 5) /* deprecated */
|
#define G_FILE_SHOW_FRAMERATE (1 << 5) /* deprecated */
|
||||||
/* #define G_FILE_SHOW_PROFILE (1 << 6) */ /* deprecated */
|
/* #define G_FILE_SHOW_PROFILE (1 << 6) */ /* deprecated */
|
||||||
#define G_FILE_LOCK (1 << 7)
|
#define G_FILE_LOCK (1 << 7)
|
||||||
#define G_FILE_SIGN (1 << 8)
|
#define G_FILE_SIGN (1 << 8)
|
||||||
/* #define G_FILE_PUBLISH (1 << 9) */ /* deprecated */
|
/* #define G_FILE_PUBLISH (1 << 9) */ /* deprecated */
|
||||||
#define G_FILE_NO_UI (1 << 10)
|
#define G_FILE_NO_UI (1 << 10)
|
||||||
/* #define G_FILE_GAME_TO_IPO (1 << 11) */ /* deprecated */
|
/* #define G_FILE_GAME_TO_IPO (1 << 11) */ /* deprecated */
|
||||||
#define G_FILE_GAME_MAT (1 << 12) /* deprecated */
|
#define G_FILE_GAME_MAT (1 << 12) /* deprecated */
|
||||||
/* #define G_FILE_DISPLAY_LISTS (1 << 13) */ /* deprecated */
|
/* #define G_FILE_DISPLAY_LISTS (1 << 13) */ /* deprecated */
|
||||||
#define G_FILE_SHOW_PHYSICS (1 << 14) /* deprecated */
|
#define G_FILE_SHOW_PHYSICS (1 << 14) /* deprecated */
|
||||||
#define G_FILE_GAME_MAT_GLSL (1 << 15) /* deprecated */
|
#define G_FILE_GAME_MAT_GLSL (1 << 15) /* deprecated */
|
||||||
/* #define G_FILE_GLSL_NO_LIGHTS (1 << 16) */ /* deprecated */
|
/* #define G_FILE_GLSL_NO_LIGHTS (1 << 16) */ /* deprecated */
|
||||||
#define G_FILE_GLSL_NO_SHADERS (1 << 17) /* deprecated */
|
#define G_FILE_GLSL_NO_SHADERS (1 << 17) /* deprecated */
|
||||||
#define G_FILE_GLSL_NO_SHADOWS (1 << 18) /* deprecated */
|
#define G_FILE_GLSL_NO_SHADOWS (1 << 18) /* deprecated */
|
||||||
#define G_FILE_GLSL_NO_RAMPS (1 << 19) /* deprecated */
|
#define G_FILE_GLSL_NO_RAMPS (1 << 19) /* deprecated */
|
||||||
#define G_FILE_GLSL_NO_NODES (1 << 20) /* deprecated */
|
#define G_FILE_GLSL_NO_NODES (1 << 20) /* deprecated */
|
||||||
#define G_FILE_GLSL_NO_EXTRA_TEX (1 << 21) /* deprecated */
|
#define G_FILE_GLSL_NO_EXTRA_TEX (1 << 21) /* deprecated */
|
||||||
#define G_FILE_IGNORE_DEPRECATION_WARNINGS (1 << 22) /* deprecated */
|
#define G_FILE_IGNORE_DEPRECATION_WARNINGS (1 << 22) /* deprecated */
|
||||||
#define G_FILE_RECOVER (1 << 23)
|
#define G_FILE_RECOVER (1 << 23)
|
||||||
#define G_FILE_RELATIVE_REMAP (1 << 24)
|
#define G_FILE_RELATIVE_REMAP (1 << 24)
|
||||||
#define G_FILE_HISTORY (1 << 25)
|
#define G_FILE_HISTORY (1 << 25)
|
||||||
#define G_FILE_MESH_COMPAT (1 << 26) /* BMesh option to save as older mesh format */
|
#define G_FILE_MESH_COMPAT (1 << 26) /* BMesh option to save as older mesh format */
|
||||||
|
|
||||||
/* G.windowstate */
|
/* G.windowstate */
|
||||||
#define G_WINDOWSTATE_USERDEF 0
|
#define G_WINDOWSTATE_USERDEF 0
|
||||||
#define G_WINDOWSTATE_BORDER 1
|
#define G_WINDOWSTATE_BORDER 1
|
||||||
#define G_WINDOWSTATE_FULLSCREEN 2
|
#define G_WINDOWSTATE_FULLSCREEN 2
|
||||||
|
|
||||||
/* ENDIAN_ORDER: indicates what endianness the platform where the file was
|
/* ENDIAN_ORDER: indicates what endianness the platform where the file was
|
||||||
* written had. */
|
* written had. */
|
||||||
#if !defined( __BIG_ENDIAN__ ) && !defined( __LITTLE_ENDIAN__ )
|
#if !defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)
|
||||||
# error Either __BIG_ENDIAN__ or __LITTLE_ENDIAN__ must be defined.
|
# error Either __BIG_ENDIAN__ or __LITTLE_ENDIAN__ must be defined.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -171,8 +171,8 @@ enum {
|
|||||||
# error "Mingw requires GCC 4.6 minimum"
|
# error "Mingw requires GCC 4.6 minimum"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define L_ENDIAN 1
|
#define L_ENDIAN 1
|
||||||
#define B_ENDIAN 0
|
#define B_ENDIAN 0
|
||||||
|
|
||||||
#ifdef __BIG_ENDIAN__
|
#ifdef __BIG_ENDIAN__
|
||||||
# define ENDIAN_ORDER B_ENDIAN
|
# define ENDIAN_ORDER B_ENDIAN
|
||||||
@@ -181,10 +181,10 @@ enum {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* G.moving, signals drawing in (3d) window to denote transform */
|
/* G.moving, signals drawing in (3d) window to denote transform */
|
||||||
#define G_TRANSFORM_OBJ 1
|
#define G_TRANSFORM_OBJ 1
|
||||||
#define G_TRANSFORM_EDIT 2
|
#define G_TRANSFORM_EDIT 2
|
||||||
#define G_TRANSFORM_MANIP 4
|
#define G_TRANSFORM_MANIP 4
|
||||||
#define G_TRANSFORM_PARTICLE 8
|
#define G_TRANSFORM_PARTICLE 8
|
||||||
|
|
||||||
/* G.special1 */
|
/* G.special1 */
|
||||||
|
|
||||||
|
@@ -40,21 +40,21 @@ struct Object;
|
|||||||
struct bAction;
|
struct bAction;
|
||||||
struct Scene;
|
struct Scene;
|
||||||
|
|
||||||
void BKE_group_free(struct Group *group);
|
void BKE_group_free(struct Group *group);
|
||||||
void BKE_group_unlink(struct Group *group);
|
void BKE_group_unlink(struct Group *group);
|
||||||
struct Group *add_group(const char *name);
|
struct Group *add_group(const char *name);
|
||||||
struct Group *BKE_group_copy(struct Group *group);
|
struct Group *BKE_group_copy(struct Group *group);
|
||||||
int add_to_group(struct Group *group, struct Object *ob, struct Scene *scene, struct Base *base);
|
int add_to_group(struct Group *group, struct Object *ob, struct Scene *scene, struct Base *base);
|
||||||
int rem_from_group(struct Group *group, struct Object *ob, struct Scene *scene, struct Base *base);
|
int rem_from_group(struct Group *group, struct Object *ob, struct Scene *scene, struct Base *base);
|
||||||
struct Group *find_group(struct Object *ob, struct Group *group);
|
struct Group *find_group(struct Object *ob, struct Group *group);
|
||||||
int object_in_group(struct Object *ob, struct Group *group);
|
int object_in_group(struct Object *ob, struct Group *group);
|
||||||
int group_is_animated(struct Object *parent, struct Group *group);
|
int group_is_animated(struct Object *parent, struct Group *group);
|
||||||
|
|
||||||
void group_tag_recalc(struct Group *group);
|
void group_tag_recalc(struct Group *group);
|
||||||
void group_handle_recalc_and_update(struct Scene *scene, struct Object *parent, struct Group *group);
|
void group_handle_recalc_and_update(struct Scene *scene, struct Object *parent, struct Group *group);
|
||||||
#if 0 /* UNUSED */
|
#if 0 /* UNUSED */
|
||||||
struct Object *group_get_member_with_action(struct Group *group, struct bAction *act);
|
struct Object *group_get_member_with_action(struct Group *group, struct bAction *act);
|
||||||
void group_relink_nla_objects(struct Object *ob);
|
void group_relink_nla_objects(struct Object *ob);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -36,10 +36,9 @@
|
|||||||
* Resizable Icons for Blender
|
* Resizable Icons for Blender
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef void (*DrawInfoFreeFP) (void *drawinfo);
|
typedef void (*DrawInfoFreeFP)(void *drawinfo);
|
||||||
|
|
||||||
struct Icon
|
struct Icon {
|
||||||
{
|
|
||||||
void *drawinfo;
|
void *drawinfo;
|
||||||
void *obj;
|
void *obj;
|
||||||
short type;
|
short type;
|
||||||
@@ -54,17 +53,17 @@ struct ID;
|
|||||||
void BKE_icons_init(int first_dyn_id);
|
void BKE_icons_init(int first_dyn_id);
|
||||||
|
|
||||||
/* return icon id for library object or create new icon if not found */
|
/* return icon id for library object or create new icon if not found */
|
||||||
int BKE_icon_getid(struct ID* id);
|
int BKE_icon_getid(struct ID *id);
|
||||||
|
|
||||||
/* retrieve icon for id */
|
/* retrieve icon for id */
|
||||||
struct Icon* BKE_icon_get(int icon_id);
|
struct Icon *BKE_icon_get(int icon_id);
|
||||||
|
|
||||||
/* set icon for id if not already defined */
|
/* set icon for id if not already defined */
|
||||||
/* used for inserting the internal icons */
|
/* used for inserting the internal icons */
|
||||||
void BKE_icon_set(int icon_id, struct Icon* icon);
|
void BKE_icon_set(int icon_id, struct Icon *icon);
|
||||||
|
|
||||||
/* remove icon and free date if library object becomes invalid */
|
/* remove icon and free date if library object becomes invalid */
|
||||||
void BKE_icon_delete(struct ID* id);
|
void BKE_icon_delete(struct ID *id);
|
||||||
|
|
||||||
/* report changes - icon needs to be recalculated */
|
/* report changes - icon needs to be recalculated */
|
||||||
void BKE_icon_changed(int icon_id);
|
void BKE_icon_changed(int icon_id);
|
||||||
@@ -82,12 +81,12 @@ void BKE_previewimg_free(struct PreviewImage **prv);
|
|||||||
void BKE_previewimg_free_id(struct ID *id);
|
void BKE_previewimg_free_id(struct ID *id);
|
||||||
|
|
||||||
/* create a new preview image */
|
/* create a new preview image */
|
||||||
struct PreviewImage* BKE_previewimg_create(void);
|
struct PreviewImage *BKE_previewimg_create(void);
|
||||||
|
|
||||||
/* create a copy of the preview image */
|
/* create a copy of the preview image */
|
||||||
struct PreviewImage* BKE_previewimg_copy(struct PreviewImage *prv);
|
struct PreviewImage *BKE_previewimg_copy(struct PreviewImage *prv);
|
||||||
|
|
||||||
/* retrieve existing or create new preview image */
|
/* retrieve existing or create new preview image */
|
||||||
struct PreviewImage* BKE_previewimg_get(struct ID *id);
|
struct PreviewImage *BKE_previewimg_get(struct ID *id);
|
||||||
|
|
||||||
#endif /* __BKE_ICONS_H__ */
|
#endif /* __BKE_ICONS_H__ */
|
||||||
|
@@ -77,8 +77,8 @@ void IDP_ResizeArray(struct IDProperty *prop, int newlen);
|
|||||||
void IDP_FreeArray(struct IDProperty *prop);
|
void IDP_FreeArray(struct IDProperty *prop);
|
||||||
|
|
||||||
/* ---------- String Type ------------ */
|
/* ---------- String Type ------------ */
|
||||||
IDProperty *IDP_NewString(const char *st, const char *name, int maxlen);/* maxlen excludes '\0' */
|
IDProperty *IDP_NewString(const char *st, const char *name, int maxlen); /* maxlen excludes '\0' */
|
||||||
void IDP_AssignString(struct IDProperty *prop, const char *st, int maxlen); /* maxlen excludes '\0' */
|
void IDP_AssignString(struct IDProperty *prop, const char *st, int maxlen); /* maxlen excludes '\0' */
|
||||||
void IDP_ConcatStringC(struct IDProperty *prop, const char *st);
|
void IDP_ConcatStringC(struct IDProperty *prop, const char *st);
|
||||||
void IDP_ConcatString(struct IDProperty *str1, struct IDProperty *append);
|
void IDP_ConcatString(struct IDProperty *str1, struct IDProperty *append);
|
||||||
void IDP_FreeString(struct IDProperty *prop);
|
void IDP_FreeString(struct IDProperty *prop);
|
||||||
@@ -122,7 +122,7 @@ int IDP_AddToGroup(struct IDProperty *group, struct IDProperty *prop);
|
|||||||
/** this is the same as IDP_AddToGroup, only you pass an item
|
/** this is the same as IDP_AddToGroup, only you pass an item
|
||||||
* in the group list to be inserted after. */
|
* in the group list to be inserted after. */
|
||||||
int IDP_InsertToGroup(struct IDProperty *group, struct IDProperty *previous,
|
int IDP_InsertToGroup(struct IDProperty *group, struct IDProperty *previous,
|
||||||
struct IDProperty *pnew);
|
struct IDProperty *pnew);
|
||||||
|
|
||||||
/** \note this does not free the property!!
|
/** \note this does not free the property!!
|
||||||
*
|
*
|
||||||
@@ -201,10 +201,10 @@ void IDP_FreeProperty(struct IDProperty *prop);
|
|||||||
void IDP_UnlinkProperty(struct IDProperty *prop);
|
void IDP_UnlinkProperty(struct IDProperty *prop);
|
||||||
|
|
||||||
#define IDP_Int(prop) ((prop)->data.val)
|
#define IDP_Int(prop) ((prop)->data.val)
|
||||||
#define IDP_Float(prop) (*(float*)&(prop)->data.val)
|
#define IDP_Float(prop) (*(float *)&(prop)->data.val)
|
||||||
#define IDP_String(prop) ((char*)(prop)->data.pointer)
|
#define IDP_String(prop) ((char *)(prop)->data.pointer)
|
||||||
#define IDP_Array(prop) ((prop)->data.pointer)
|
#define IDP_Array(prop) ((prop)->data.pointer)
|
||||||
#define IDP_IDPArray(prop) ((IDProperty*)(prop)->data.pointer)
|
#define IDP_IDPArray(prop) ((IDProperty *)(prop)->data.pointer)
|
||||||
#define IDP_Double(prop) (*(double*)&(prop)->data.val)
|
#define IDP_Double(prop) (*(double *)&(prop)->data.val)
|
||||||
|
|
||||||
#endif /* __BKE_IDPROP_H__ */
|
#endif /* __BKE_IDPROP_H__ */
|
||||||
|
@@ -46,25 +46,25 @@ struct Object;
|
|||||||
struct ImageFormatData;
|
struct ImageFormatData;
|
||||||
|
|
||||||
/* call from library */
|
/* call from library */
|
||||||
void BKE_image_free(struct Image *me);
|
void BKE_image_free(struct Image *me);
|
||||||
|
|
||||||
void BKE_imbuf_stamp_info(struct Scene *scene, struct Object *camera, struct ImBuf *ibuf);
|
void BKE_imbuf_stamp_info(struct Scene *scene, struct Object *camera, struct ImBuf *ibuf);
|
||||||
void BKE_stamp_buf(struct Scene *scene, struct Object *camera, unsigned char *rect, float *rectf, int width, int height, int channels);
|
void BKE_stamp_buf(struct Scene *scene, struct Object *camera, unsigned char *rect, float *rectf, int width, int height, int channels);
|
||||||
int BKE_imbuf_alpha_test(struct ImBuf *ibuf);
|
int BKE_imbuf_alpha_test(struct ImBuf *ibuf);
|
||||||
int BKE_imbuf_write_stamp(struct Scene *scene, struct Object *camera, struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf);
|
int BKE_imbuf_write_stamp(struct Scene *scene, struct Object *camera, struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf);
|
||||||
int BKE_imbuf_write(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf);
|
int BKE_imbuf_write(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf);
|
||||||
int BKE_imbuf_write_as(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf, const short is_copy);
|
int BKE_imbuf_write_as(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf, const short is_copy);
|
||||||
void BKE_makepicstring(char *string, const char *base, const char *relbase, int frame, const char imtype, const short use_ext, const short use_frames);
|
void BKE_makepicstring(char *string, const char *base, const char *relbase, int frame, const char imtype, const short use_ext, const short use_frames);
|
||||||
int BKE_add_image_extension(char *string, const char imtype);
|
int BKE_add_image_extension(char *string, const char imtype);
|
||||||
char BKE_ftype_to_imtype(const int ftype);
|
char BKE_ftype_to_imtype(const int ftype);
|
||||||
int BKE_imtype_to_ftype(const char imtype);
|
int BKE_imtype_to_ftype(const char imtype);
|
||||||
|
|
||||||
int BKE_imtype_is_movie(const char imtype);
|
int BKE_imtype_is_movie(const char imtype);
|
||||||
int BKE_imtype_supports_zbuf(const char imtype);
|
int BKE_imtype_supports_zbuf(const char imtype);
|
||||||
int BKE_imtype_supports_compress(const char imtype);
|
int BKE_imtype_supports_compress(const char imtype);
|
||||||
int BKE_imtype_supports_quality(const char imtype);
|
int BKE_imtype_supports_quality(const char imtype);
|
||||||
char BKE_imtype_valid_channels(const char imtype);
|
char BKE_imtype_valid_channels(const char imtype);
|
||||||
char BKE_imtype_valid_depths(const char imtype);
|
char BKE_imtype_valid_depths(const char imtype);
|
||||||
|
|
||||||
char BKE_imtype_from_arg(const char *arg);
|
char BKE_imtype_from_arg(const char *arg);
|
||||||
|
|
||||||
@@ -72,12 +72,12 @@ void BKE_imformat_defaults(struct ImageFormatData *im_format);
|
|||||||
|
|
||||||
struct anim *openanim(const char *name, int flags, int streamindex);
|
struct anim *openanim(const char *name, int flags, int streamindex);
|
||||||
|
|
||||||
void BKE_image_de_interlace(struct Image *ima, int odd);
|
void BKE_image_de_interlace(struct Image *ima, int odd);
|
||||||
|
|
||||||
void BKE_image_make_local(struct Image *ima);
|
void BKE_image_make_local(struct Image *ima);
|
||||||
|
|
||||||
void BKE_image_tag_time(struct Image *ima);
|
void BKE_image_tag_time(struct Image *ima);
|
||||||
void free_old_images(void);
|
void free_old_images(void);
|
||||||
|
|
||||||
/* ********************************** NEW IMAGE API *********************** */
|
/* ********************************** NEW IMAGE API *********************** */
|
||||||
|
|
||||||
@@ -88,34 +88,34 @@ struct RenderPass;
|
|||||||
struct RenderResult;
|
struct RenderResult;
|
||||||
|
|
||||||
/* ima->source; where image comes from */
|
/* ima->source; where image comes from */
|
||||||
#define IMA_SRC_CHECK 0
|
#define IMA_SRC_CHECK 0
|
||||||
#define IMA_SRC_FILE 1
|
#define IMA_SRC_FILE 1
|
||||||
#define IMA_SRC_SEQUENCE 2
|
#define IMA_SRC_SEQUENCE 2
|
||||||
#define IMA_SRC_MOVIE 3
|
#define IMA_SRC_MOVIE 3
|
||||||
#define IMA_SRC_GENERATED 4
|
#define IMA_SRC_GENERATED 4
|
||||||
#define IMA_SRC_VIEWER 5
|
#define IMA_SRC_VIEWER 5
|
||||||
|
|
||||||
/* ima->type, how to handle/generate it */
|
/* ima->type, how to handle/generate it */
|
||||||
#define IMA_TYPE_IMAGE 0
|
#define IMA_TYPE_IMAGE 0
|
||||||
#define IMA_TYPE_MULTILAYER 1
|
#define IMA_TYPE_MULTILAYER 1
|
||||||
/* generated */
|
/* generated */
|
||||||
#define IMA_TYPE_UV_TEST 2
|
#define IMA_TYPE_UV_TEST 2
|
||||||
/* viewers */
|
/* viewers */
|
||||||
#define IMA_TYPE_R_RESULT 4
|
#define IMA_TYPE_R_RESULT 4
|
||||||
#define IMA_TYPE_COMPOSITE 5
|
#define IMA_TYPE_COMPOSITE 5
|
||||||
|
|
||||||
/* ima->ok */
|
/* ima->ok */
|
||||||
#define IMA_OK 1
|
#define IMA_OK 1
|
||||||
#define IMA_OK_LOADED 2
|
#define IMA_OK_LOADED 2
|
||||||
|
|
||||||
/* signals */
|
/* signals */
|
||||||
/* reload only frees, doesn't read until image_get_ibuf() called */
|
/* reload only frees, doesn't read until image_get_ibuf() called */
|
||||||
#define IMA_SIGNAL_RELOAD 0
|
#define IMA_SIGNAL_RELOAD 0
|
||||||
#define IMA_SIGNAL_FREE 1
|
#define IMA_SIGNAL_FREE 1
|
||||||
/* source changes, from image to sequence or movie, etc */
|
/* source changes, from image to sequence or movie, etc */
|
||||||
#define IMA_SIGNAL_SRC_CHANGE 5
|
#define IMA_SIGNAL_SRC_CHANGE 5
|
||||||
/* image-user gets a new image, check settings */
|
/* image-user gets a new image, check settings */
|
||||||
#define IMA_SIGNAL_USER_NEW_IMAGE 6
|
#define IMA_SIGNAL_USER_NEW_IMAGE 6
|
||||||
|
|
||||||
#define IMA_CHAN_FLAG_BW 1
|
#define IMA_CHAN_FLAG_BW 1
|
||||||
#define IMA_CHAN_FLAG_RGB 2
|
#define IMA_CHAN_FLAG_RGB 2
|
||||||
@@ -164,10 +164,10 @@ void BKE_image_release_renderresult(struct Scene *scene, struct Image *ima);
|
|||||||
void BKE_image_backup_render(struct Scene *scene, struct Image *ima);
|
void BKE_image_backup_render(struct Scene *scene, struct Image *ima);
|
||||||
|
|
||||||
/* goes over all textures that use images */
|
/* goes over all textures that use images */
|
||||||
void BKE_image_free_all_textures(void);
|
void BKE_image_free_all_textures(void);
|
||||||
|
|
||||||
/* does one image! */
|
/* does one image! */
|
||||||
void BKE_image_free_anim_ibufs(struct Image *ima, int except_frame);
|
void BKE_image_free_anim_ibufs(struct Image *ima, int except_frame);
|
||||||
|
|
||||||
/* does all images with type MOVIE or SEQUENCE */
|
/* does all images with type MOVIE or SEQUENCE */
|
||||||
void BKE_image_all_free_anim_ibufs(int except_frame);
|
void BKE_image_all_free_anim_ibufs(int except_frame);
|
||||||
|
@@ -63,7 +63,7 @@ float *do_ob_key(struct Scene *scene, struct Object *ob);
|
|||||||
|
|
||||||
struct Key *ob_get_key(struct Object *ob);
|
struct Key *ob_get_key(struct Object *ob);
|
||||||
struct KeyBlock *add_keyblock(struct Key *key, const char *name);
|
struct KeyBlock *add_keyblock(struct Key *key, const char *name);
|
||||||
struct KeyBlock *add_keyblock_ctime(struct Key *key, const char * name, const short do_force);
|
struct KeyBlock *add_keyblock_ctime(struct Key *key, const char *name, const short do_force);
|
||||||
struct KeyBlock *ob_get_keyblock(struct Object *ob);
|
struct KeyBlock *ob_get_keyblock(struct Object *ob);
|
||||||
struct KeyBlock *ob_get_reference_keyblock(struct Object *ob);
|
struct KeyBlock *ob_get_reference_keyblock(struct Object *ob);
|
||||||
struct KeyBlock *key_get_keyblock(struct Key *key, int index);
|
struct KeyBlock *key_get_keyblock(struct Key *key, int index);
|
||||||
|
@@ -73,7 +73,7 @@ float (*BKE_lattice_vertexcos_get(struct Object *ob, int *numVerts_r))[3];
|
|||||||
void BKE_lattice_vertexcos_apply(struct Object *ob, float (*vertexCos)[3]);
|
void BKE_lattice_vertexcos_apply(struct Object *ob, float (*vertexCos)[3]);
|
||||||
void BKE_lattice_modifiers_calc(struct Scene *scene, struct Object *ob);
|
void BKE_lattice_modifiers_calc(struct Scene *scene, struct Object *ob);
|
||||||
|
|
||||||
struct MDeformVert* BKE_lattice_deform_verts_get(struct Object *lattice);
|
struct MDeformVert *BKE_lattice_deform_verts_get(struct Object *lattice);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -66,7 +66,7 @@ void id_clear_lib_data(struct Main *bmain, struct ID *id);
|
|||||||
|
|
||||||
struct ListBase *which_libbase(struct Main *mainlib, short type);
|
struct ListBase *which_libbase(struct Main *mainlib, short type);
|
||||||
|
|
||||||
#define MAX_LIBARRAY 40
|
#define MAX_LIBARRAY 40
|
||||||
int set_listbasepointers(struct Main *main, struct ListBase **lb);
|
int set_listbasepointers(struct Main *main, struct ListBase **lb);
|
||||||
|
|
||||||
void BKE_libblock_free(struct ListBase *lb, void *idv);
|
void BKE_libblock_free(struct ListBase *lb, void *idv);
|
||||||
@@ -86,7 +86,7 @@ struct ID *BKE_libblock_find_name(const short type, const char *name);
|
|||||||
void clear_id_newpoins(void);
|
void clear_id_newpoins(void);
|
||||||
|
|
||||||
void IDnames_to_pupstring(const char **str, const char *title, const char *extraops,
|
void IDnames_to_pupstring(const char **str, const char *title, const char *extraops,
|
||||||
struct ListBase *lb, struct ID* link, short *nr);
|
struct ListBase *lb, struct ID *link, short *nr);
|
||||||
void IMAnames_to_pupstring(const char **str, const char *title, const char *extraops,
|
void IMAnames_to_pupstring(const char **str, const char *title, const char *extraops,
|
||||||
struct ListBase *lb, struct ID *link, short *nr);
|
struct ListBase *lb, struct ID *link, short *nr);
|
||||||
|
|
||||||
|
@@ -53,7 +53,7 @@ typedef struct Main {
|
|||||||
char name[1024]; /* 1024 = FILE_MAX */
|
char name[1024]; /* 1024 = FILE_MAX */
|
||||||
short versionfile, subversionfile;
|
short versionfile, subversionfile;
|
||||||
short minversionfile, minsubversionfile;
|
short minversionfile, minsubversionfile;
|
||||||
int revision; /* svn revision of binary that saved file */
|
int revision; /* svn revision of binary that saved file */
|
||||||
|
|
||||||
struct Library *curlib;
|
struct Library *curlib;
|
||||||
ListBase scene;
|
ListBase scene;
|
||||||
@@ -68,7 +68,7 @@ typedef struct Main {
|
|||||||
ListBase latt;
|
ListBase latt;
|
||||||
ListBase lamp;
|
ListBase lamp;
|
||||||
ListBase camera;
|
ListBase camera;
|
||||||
ListBase ipo; // XXX depreceated
|
ListBase ipo; // XXX depreceated
|
||||||
ListBase key;
|
ListBase key;
|
||||||
ListBase world;
|
ListBase world;
|
||||||
ListBase screen;
|
ListBase screen;
|
||||||
|
@@ -90,7 +90,7 @@ void end_render_materials(struct Main *);
|
|||||||
|
|
||||||
int material_in_material(struct Material *parmat, struct Material *mat);
|
int material_in_material(struct Material *parmat, struct Material *mat);
|
||||||
|
|
||||||
void ramp_blend(int type, float r_col[3], const float fac, const float col[3]);
|
void ramp_blend(int type, float r_col[3], const float fac, const float col[3]);
|
||||||
|
|
||||||
/* copy/paste */
|
/* copy/paste */
|
||||||
void clear_matcopybuf(void);
|
void clear_matcopybuf(void);
|
||||||
@@ -106,4 +106,3 @@ int do_version_tface(struct Main *main, int fileload);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -164,14 +164,14 @@ void BKE_mesh_strip_loose_faces(struct Mesh *me); /* Needed for compatibility (s
|
|||||||
void BKE_mesh_strip_loose_polysloops(struct Mesh *me);
|
void BKE_mesh_strip_loose_polysloops(struct Mesh *me);
|
||||||
void BKE_mesh_strip_loose_edges(struct Mesh *me);
|
void BKE_mesh_strip_loose_edges(struct Mesh *me);
|
||||||
|
|
||||||
/* Calculate vertex and face normals, face normals are returned in *faceNors_r if non-NULL
|
/* Calculate vertex and face normals, face normals are returned in *faceNors_r if non-NULL
|
||||||
* and vertex normals are stored in actual mverts.
|
* and vertex normals are stored in actual mverts.
|
||||||
*/
|
*/
|
||||||
void BKE_mesh_calc_normals_mapping(
|
void BKE_mesh_calc_normals_mapping(
|
||||||
struct MVert *mverts, int numVerts,
|
struct MVert *mverts, int numVerts,
|
||||||
struct MLoop *mloop, struct MPoly *mpolys, int numLoops, int numPolys, float (*polyNors_r)[3],
|
struct MLoop *mloop, struct MPoly *mpolys, int numLoops, int numPolys, float (*polyNors_r)[3],
|
||||||
struct MFace *mfaces, int numFaces, int *origIndexFace, float (*faceNors_r)[3]);
|
struct MFace *mfaces, int numFaces, int *origIndexFace, float (*faceNors_r)[3]);
|
||||||
/* extended version of 'BKE_mesh_calc_normals' with option not to calc vertex normals */
|
/* extended version of 'BKE_mesh_calc_normals' with option not to calc vertex normals */
|
||||||
void BKE_mesh_calc_normals_mapping_ex(
|
void BKE_mesh_calc_normals_mapping_ex(
|
||||||
struct MVert *mverts, int numVerts,
|
struct MVert *mverts, int numVerts,
|
||||||
struct MLoop *mloop, struct MPoly *mpolys, int numLoops, int numPolys, float (*polyNors_r)[3],
|
struct MLoop *mloop, struct MPoly *mpolys, int numLoops, int numPolys, float (*polyNors_r)[3],
|
||||||
@@ -183,15 +183,15 @@ void BKE_mesh_calc_normals(
|
|||||||
struct MLoop *mloop, struct MPoly *mpolys,
|
struct MLoop *mloop, struct MPoly *mpolys,
|
||||||
int numLoops, int numPolys, float (*polyNors_r)[3]);
|
int numLoops, int numPolys, float (*polyNors_r)[3]);
|
||||||
|
|
||||||
/* Return a newly MEM_malloc'd array of all the mesh vertex locations
|
/* Return a newly MEM_malloc'd array of all the mesh vertex locations
|
||||||
* (_numVerts_r_ may be NULL) */
|
* (_numVerts_r_ may be NULL) */
|
||||||
float (*mesh_getVertexCos(struct Mesh *me, int *numVerts_r))[3];
|
float (*mesh_getVertexCos(struct Mesh *me, int *numVerts_r))[3];
|
||||||
|
|
||||||
/* map from uv vertex to face (for select linked, stitch, uv suburf) */
|
/* map from uv vertex to face (for select linked, stitch, uv suburf) */
|
||||||
|
|
||||||
/* UvVertMap */
|
/* UvVertMap */
|
||||||
|
|
||||||
#define STD_UV_CONNECT_LIMIT 0.0001f
|
#define STD_UV_CONNECT_LIMIT 0.0001f
|
||||||
|
|
||||||
typedef struct UvVertMap {
|
typedef struct UvVertMap {
|
||||||
struct UvMapVert **vert;
|
struct UvMapVert **vert;
|
||||||
@@ -271,9 +271,9 @@ void create_vert_edge_map(struct ListBase **map, IndexNode **mem, const struct M
|
|||||||
|
|
||||||
/* vertex level transformations & checks (no derived mesh) */
|
/* vertex level transformations & checks (no derived mesh) */
|
||||||
|
|
||||||
int BKE_mesh_minmax(struct Mesh *me, float r_min[3], float r_max[3]);
|
int BKE_mesh_minmax(struct Mesh *me, float r_min[3], float r_max[3]);
|
||||||
int BKE_mesh_center_median(struct Mesh *me, float cent[3]);
|
int BKE_mesh_center_median(struct Mesh *me, float cent[3]);
|
||||||
int BKE_mesh_center_bounds(struct Mesh *me, float cent[3]);
|
int BKE_mesh_center_bounds(struct Mesh *me, float cent[3]);
|
||||||
void BKE_mesh_translate(struct Mesh *me, float offset[3], int do_keys);
|
void BKE_mesh_translate(struct Mesh *me, float offset[3], int do_keys);
|
||||||
|
|
||||||
/* mesh_validate.c */
|
/* mesh_validate.c */
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
* \ingroup bke
|
* \ingroup bke
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "DNA_modifier_types.h" /* needed for all enum typdefs */
|
#include "DNA_modifier_types.h" /* needed for all enum typdefs */
|
||||||
#include "BKE_customdata.h"
|
#include "BKE_customdata.h"
|
||||||
|
|
||||||
struct ID;
|
struct ID;
|
||||||
@@ -73,10 +73,10 @@ typedef enum {
|
|||||||
} ModifierTypeType;
|
} ModifierTypeType;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
eModifierTypeFlag_AcceptsMesh = (1<<0),
|
eModifierTypeFlag_AcceptsMesh = (1 << 0),
|
||||||
eModifierTypeFlag_AcceptsCVs = (1<<1),
|
eModifierTypeFlag_AcceptsCVs = (1 << 1),
|
||||||
eModifierTypeFlag_SupportsMapping = (1<<2),
|
eModifierTypeFlag_SupportsMapping = (1 << 2),
|
||||||
eModifierTypeFlag_SupportsEditmode = (1<<3),
|
eModifierTypeFlag_SupportsEditmode = (1 << 3),
|
||||||
|
|
||||||
/* For modifiers that support editmode this determines if the
|
/* For modifiers that support editmode this determines if the
|
||||||
* modifier should be enabled by default in editmode. This should
|
* modifier should be enabled by default in editmode. This should
|
||||||
@@ -84,25 +84,25 @@ typedef enum {
|
|||||||
* also generally used in editmode, otherwise let the user enable
|
* also generally used in editmode, otherwise let the user enable
|
||||||
* it by hand.
|
* it by hand.
|
||||||
*/
|
*/
|
||||||
eModifierTypeFlag_EnableInEditmode = (1<<4),
|
eModifierTypeFlag_EnableInEditmode = (1 << 4),
|
||||||
|
|
||||||
/* For modifiers that require original data and so cannot
|
/* For modifiers that require original data and so cannot
|
||||||
* be placed after any non-deformative modifier.
|
* be placed after any non-deformative modifier.
|
||||||
*/
|
*/
|
||||||
eModifierTypeFlag_RequiresOriginalData = (1<<5),
|
eModifierTypeFlag_RequiresOriginalData = (1 << 5),
|
||||||
|
|
||||||
/* For modifiers that support pointcache, so we can check to see if it has files we need to deal with
|
/* For modifiers that support pointcache, so we can check to see if it has files we need to deal with
|
||||||
*/
|
*/
|
||||||
eModifierTypeFlag_UsesPointCache = (1<<6),
|
eModifierTypeFlag_UsesPointCache = (1 << 6),
|
||||||
|
|
||||||
/* For physics modifiers, max one per type */
|
/* For physics modifiers, max one per type */
|
||||||
eModifierTypeFlag_Single = (1<<7),
|
eModifierTypeFlag_Single = (1 << 7),
|
||||||
|
|
||||||
/* Some modifier can't be added manually by user */
|
/* Some modifier can't be added manually by user */
|
||||||
eModifierTypeFlag_NoUserAdd = (1<<8),
|
eModifierTypeFlag_NoUserAdd = (1 << 8),
|
||||||
|
|
||||||
/* For modifiers that use CD_PREVIEW_MCOL for preview. */
|
/* For modifiers that use CD_PREVIEW_MCOL for preview. */
|
||||||
eModifierTypeFlag_UsesPreview = (1<<9)
|
eModifierTypeFlag_UsesPreview = (1 << 9)
|
||||||
} ModifierTypeFlag;
|
} ModifierTypeFlag;
|
||||||
|
|
||||||
typedef void (*ObjectWalkFunc)(void *userData, struct Object *ob, struct Object **obpoin);
|
typedef void (*ObjectWalkFunc)(void *userData, struct Object *ob, struct Object **obpoin);
|
||||||
@@ -146,28 +146,25 @@ typedef struct ModifierTypeInfo {
|
|||||||
* and otherwise the ob argument.
|
* and otherwise the ob argument.
|
||||||
*/
|
*/
|
||||||
void (*deformVerts)(struct ModifierData *md, struct Object *ob,
|
void (*deformVerts)(struct ModifierData *md, struct Object *ob,
|
||||||
struct DerivedMesh *derivedData,
|
struct DerivedMesh *derivedData,
|
||||||
float (*vertexCos)[3], int numVerts,
|
float (*vertexCos)[3], int numVerts,
|
||||||
ModifierApplyFlag flag);
|
ModifierApplyFlag flag);
|
||||||
|
|
||||||
/* Like deformMatricesEM but called from object mode (for supporting modifiers in sculpt mode) */
|
/* Like deformMatricesEM but called from object mode (for supporting modifiers in sculpt mode) */
|
||||||
void (*deformMatrices)(
|
void (*deformMatrices)(struct ModifierData *md, struct Object *ob,
|
||||||
struct ModifierData *md, struct Object *ob,
|
struct DerivedMesh *derivedData,
|
||||||
struct DerivedMesh *derivedData,
|
float (*vertexCos)[3], float (*defMats)[3][3], int numVerts);
|
||||||
float (*vertexCos)[3], float (*defMats)[3][3], int numVerts);
|
|
||||||
|
|
||||||
/* Like deformVerts but called during editmode (for supporting modifiers)
|
/* Like deformVerts but called during editmode (for supporting modifiers)
|
||||||
*/
|
*/
|
||||||
void (*deformVertsEM)(
|
void (*deformVertsEM)(struct ModifierData *md, struct Object *ob,
|
||||||
struct ModifierData *md, struct Object *ob,
|
struct BMEditMesh *editData, struct DerivedMesh *derivedData,
|
||||||
struct BMEditMesh *editData, struct DerivedMesh *derivedData,
|
float (*vertexCos)[3], int numVerts);
|
||||||
float (*vertexCos)[3], int numVerts);
|
|
||||||
|
|
||||||
/* Set deform matrix per vertex for crazyspace correction */
|
/* Set deform matrix per vertex for crazyspace correction */
|
||||||
void (*deformMatricesEM)(
|
void (*deformMatricesEM)(struct ModifierData *md, struct Object *ob,
|
||||||
struct ModifierData *md, struct Object *ob,
|
struct BMEditMesh *editData, struct DerivedMesh *derivedData,
|
||||||
struct BMEditMesh *editData, struct DerivedMesh *derivedData,
|
float (*vertexCos)[3], float (*defMats)[3][3], int numVerts);
|
||||||
float (*vertexCos)[3], float (*defMats)[3][3], int numVerts);
|
|
||||||
|
|
||||||
/********************* Non-deform modifier functions *********************/
|
/********************* Non-deform modifier functions *********************/
|
||||||
|
|
||||||
@@ -190,10 +187,9 @@ typedef struct ModifierTypeInfo {
|
|||||||
* The modifier may reuse the derivedData argument (i.e. return it in
|
* The modifier may reuse the derivedData argument (i.e. return it in
|
||||||
* modified form), but must not release it.
|
* modified form), but must not release it.
|
||||||
*/
|
*/
|
||||||
struct DerivedMesh *(*applyModifier)(
|
struct DerivedMesh *(*applyModifier)(struct ModifierData *md, struct Object *ob,
|
||||||
struct ModifierData *md, struct Object *ob,
|
struct DerivedMesh *derivedData,
|
||||||
struct DerivedMesh *derivedData,
|
ModifierApplyFlag flag);
|
||||||
ModifierApplyFlag flag);
|
|
||||||
|
|
||||||
/* Like applyModifier but called during editmode (for supporting
|
/* Like applyModifier but called during editmode (for supporting
|
||||||
* modifiers).
|
* modifiers).
|
||||||
@@ -202,10 +198,9 @@ typedef struct ModifierTypeInfo {
|
|||||||
* are expected from editmode objects. The same qualifications regarding
|
* are expected from editmode objects. The same qualifications regarding
|
||||||
* derivedData apply as for applyModifier.
|
* derivedData apply as for applyModifier.
|
||||||
*/
|
*/
|
||||||
struct DerivedMesh *(*applyModifierEM)(
|
struct DerivedMesh *(*applyModifierEM)(struct ModifierData *md, struct Object *ob,
|
||||||
struct ModifierData *md, struct Object *ob,
|
struct BMEditMesh *editData,
|
||||||
struct BMEditMesh *editData,
|
struct DerivedMesh *derivedData);
|
||||||
struct DerivedMesh *derivedData);
|
|
||||||
|
|
||||||
|
|
||||||
/********************* Optional functions *********************/
|
/********************* Optional functions *********************/
|
||||||
@@ -258,7 +253,7 @@ typedef struct ModifierTypeInfo {
|
|||||||
* This function is optional.
|
* This function is optional.
|
||||||
*/
|
*/
|
||||||
void (*updateDepgraph)(struct ModifierData *md, struct DagForest *forest, struct Scene *scene,
|
void (*updateDepgraph)(struct ModifierData *md, struct DagForest *forest, struct Scene *scene,
|
||||||
struct Object *ob, struct DagNode *obNode);
|
struct Object *ob, struct DagNode *obNode);
|
||||||
|
|
||||||
/* Should return true if the modifier needs to be recalculated on time
|
/* Should return true if the modifier needs to be recalculated on time
|
||||||
* changes.
|
* changes.
|
||||||
@@ -285,7 +280,7 @@ typedef struct ModifierTypeInfo {
|
|||||||
* This function is optional.
|
* This function is optional.
|
||||||
*/
|
*/
|
||||||
void (*foreachObjectLink)(struct ModifierData *md, struct Object *ob,
|
void (*foreachObjectLink)(struct ModifierData *md, struct Object *ob,
|
||||||
ObjectWalkFunc walk, void *userData);
|
ObjectWalkFunc walk, void *userData);
|
||||||
|
|
||||||
/* Should call the given walk function with a pointer to each ID
|
/* Should call the given walk function with a pointer to each ID
|
||||||
* pointer (i.e. each datablock pointer) that the modifier data
|
* pointer (i.e. each datablock pointer) that the modifier data
|
||||||
@@ -296,7 +291,7 @@ typedef struct ModifierTypeInfo {
|
|||||||
* will be used.
|
* will be used.
|
||||||
*/
|
*/
|
||||||
void (*foreachIDLink)(struct ModifierData *md, struct Object *ob,
|
void (*foreachIDLink)(struct ModifierData *md, struct Object *ob,
|
||||||
IDWalkFunc walk, void *userData);
|
IDWalkFunc walk, void *userData);
|
||||||
|
|
||||||
/* Should call the given walk function for each texture that the
|
/* Should call the given walk function for each texture that the
|
||||||
* modifier data stores. This is used for finding all textures in
|
* modifier data stores. This is used for finding all textures in
|
||||||
@@ -306,10 +301,10 @@ typedef struct ModifierTypeInfo {
|
|||||||
* assumed the modifier has no textures.
|
* assumed the modifier has no textures.
|
||||||
*/
|
*/
|
||||||
void (*foreachTexLink)(struct ModifierData *md, struct Object *ob,
|
void (*foreachTexLink)(struct ModifierData *md, struct Object *ob,
|
||||||
TexWalkFunc walk, void *userData);
|
TexWalkFunc walk, void *userData);
|
||||||
} ModifierTypeInfo;
|
} ModifierTypeInfo;
|
||||||
|
|
||||||
ModifierTypeInfo *modifierType_getInfo (ModifierType type);
|
ModifierTypeInfo *modifierType_getInfo(ModifierType type);
|
||||||
|
|
||||||
/* Modifier utility calls, do call through type pointer and return
|
/* Modifier utility calls, do call through type pointer and return
|
||||||
* default values if pointer is optional.
|
* default values if pointer is optional.
|
||||||
@@ -317,38 +312,38 @@ ModifierTypeInfo *modifierType_getInfo (ModifierType type);
|
|||||||
struct ModifierData *modifier_new(int type);
|
struct ModifierData *modifier_new(int type);
|
||||||
void modifier_free(struct ModifierData *md);
|
void modifier_free(struct ModifierData *md);
|
||||||
|
|
||||||
void modifier_unique_name(struct ListBase *modifiers, struct ModifierData *md);
|
void modifier_unique_name(struct ListBase *modifiers, struct ModifierData *md);
|
||||||
|
|
||||||
void modifier_copyData(struct ModifierData *md, struct ModifierData *target);
|
void modifier_copyData(struct ModifierData *md, struct ModifierData *target);
|
||||||
int modifier_dependsOnTime(struct ModifierData *md);
|
int modifier_dependsOnTime(struct ModifierData *md);
|
||||||
int modifier_supportsMapping(struct ModifierData *md);
|
int modifier_supportsMapping(struct ModifierData *md);
|
||||||
int modifier_couldBeCage(struct Scene *scene, struct ModifierData *md);
|
int modifier_couldBeCage(struct Scene *scene, struct ModifierData *md);
|
||||||
int modifier_isCorrectableDeformed(struct ModifierData *md);
|
int modifier_isCorrectableDeformed(struct ModifierData *md);
|
||||||
int modifier_sameTopology(ModifierData *md);
|
int modifier_sameTopology(ModifierData *md);
|
||||||
int modifier_nonGeometrical(ModifierData *md);
|
int modifier_nonGeometrical(ModifierData *md);
|
||||||
int modifier_isEnabled(struct Scene *scene, struct ModifierData *md, int required_mode);
|
int modifier_isEnabled(struct Scene *scene, struct ModifierData *md, int required_mode);
|
||||||
void modifier_setError(struct ModifierData *md, const char *format, ...)
|
void modifier_setError(struct ModifierData *md, const char *format, ...)
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
__attribute__ ((format (printf, 2, 3)))
|
__attribute__ ((format(printf, 2, 3)))
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
int modifier_isPreview(struct ModifierData *md);
|
int modifier_isPreview(struct ModifierData *md);
|
||||||
|
|
||||||
void modifiers_foreachObjectLink(struct Object *ob,
|
void modifiers_foreachObjectLink(struct Object *ob,
|
||||||
ObjectWalkFunc walk,
|
ObjectWalkFunc walk,
|
||||||
void *userData);
|
void *userData);
|
||||||
void modifiers_foreachIDLink(struct Object *ob,
|
void modifiers_foreachIDLink(struct Object *ob,
|
||||||
IDWalkFunc walk,
|
IDWalkFunc walk,
|
||||||
void *userData);
|
void *userData);
|
||||||
void modifiers_foreachTexLink(struct Object *ob,
|
void modifiers_foreachTexLink(struct Object *ob,
|
||||||
TexWalkFunc walk,
|
TexWalkFunc walk,
|
||||||
void *userData);
|
void *userData);
|
||||||
|
|
||||||
struct ModifierData *modifiers_findByType(struct Object *ob, ModifierType type);
|
struct ModifierData *modifiers_findByType(struct Object *ob, ModifierType type);
|
||||||
struct ModifierData *modifiers_findByName(struct Object *ob, const char *name);
|
struct ModifierData *modifiers_findByName(struct Object *ob, const char *name);
|
||||||
void modifiers_clearErrors(struct Object *ob);
|
void modifiers_clearErrors(struct Object *ob);
|
||||||
int modifiers_getCageIndex(struct Scene *scene, struct Object *ob,
|
int modifiers_getCageIndex(struct Scene *scene, struct Object *ob,
|
||||||
int *lastPossibleCageIndex_r, int virtual_);
|
int *lastPossibleCageIndex_r, int virtual_);
|
||||||
|
|
||||||
int modifiers_isSoftbodyEnabled(struct Object *ob);
|
int modifiers_isSoftbodyEnabled(struct Object *ob);
|
||||||
int modifiers_isClothEnabled(struct Object *ob);
|
int modifiers_isClothEnabled(struct Object *ob);
|
||||||
@@ -374,10 +369,10 @@ typedef struct CDMaskLink {
|
|||||||
* end of the stack.
|
* end of the stack.
|
||||||
*/
|
*/
|
||||||
struct CDMaskLink *modifiers_calcDataMasks(struct Scene *scene,
|
struct CDMaskLink *modifiers_calcDataMasks(struct Scene *scene,
|
||||||
struct Object *ob,
|
struct Object *ob,
|
||||||
struct ModifierData *md,
|
struct ModifierData *md,
|
||||||
CustomDataMask dataMask,
|
CustomDataMask dataMask,
|
||||||
int required_mode);
|
int required_mode);
|
||||||
struct ModifierData *modifiers_getLastPreview(struct Scene *scene,
|
struct ModifierData *modifiers_getLastPreview(struct Scene *scene,
|
||||||
struct ModifierData *md,
|
struct ModifierData *md,
|
||||||
int required_mode);
|
int required_mode);
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* along with this program; if not, write to the Free Software Foundation,
|
* along with this program; if not, write to the Free Software Foundation,
|
||||||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*
|
*
|
||||||
* The Original Code is Copyright (C) 2011 Blender Foundation.
|
* The Original Code is Copyright (C) 2011 Blender Foundation.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Contributor(s): Blender Foundation,
|
* Contributor(s): Blender Foundation,
|
||||||
@@ -64,12 +64,12 @@ void BKE_movieclip_build_proxy_frame(struct MovieClip *clip, int clip_flag, stru
|
|||||||
int cfra, int *build_sizes, int build_count, int undistorted);
|
int cfra, int *build_sizes, int build_count, int undistorted);
|
||||||
|
|
||||||
/* cacheing flags */
|
/* cacheing flags */
|
||||||
#define MOVIECLIP_CACHE_SKIP (1<<0)
|
#define MOVIECLIP_CACHE_SKIP (1 << 0)
|
||||||
|
|
||||||
/* postprocessing flags */
|
/* postprocessing flags */
|
||||||
#define MOVIECLIP_DISABLE_RED (1<<0)
|
#define MOVIECLIP_DISABLE_RED (1 << 0)
|
||||||
#define MOVIECLIP_DISABLE_GREEN (1<<1)
|
#define MOVIECLIP_DISABLE_GREEN (1 << 1)
|
||||||
#define MOVIECLIP_DISABLE_BLUE (1<<2)
|
#define MOVIECLIP_DISABLE_BLUE (1 << 2)
|
||||||
#define MOVIECLIP_PREVIEW_GRAYSCALE (1<<3)
|
#define MOVIECLIP_PREVIEW_GRAYSCALE (1 << 3)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -32,32 +32,32 @@ struct DerivedMesh;
|
|||||||
|
|
||||||
/* navmesh_conversion.c */
|
/* navmesh_conversion.c */
|
||||||
int buildNavMeshDataByDerivedMesh(struct DerivedMesh *dm, int *vertsPerPoly,
|
int buildNavMeshDataByDerivedMesh(struct DerivedMesh *dm, int *vertsPerPoly,
|
||||||
int *nverts, float **verts,
|
int *nverts, float **verts,
|
||||||
int *ndtris, unsigned short **dtris,
|
int *ndtris, unsigned short **dtris,
|
||||||
int *npolys, unsigned short **dmeshes,
|
int *npolys, unsigned short **dmeshes,
|
||||||
unsigned short **polys, int **dtrisToPolysMap,
|
unsigned short **polys, int **dtrisToPolysMap,
|
||||||
int **dtrisToTrisMap, int **trisToFacesMap);
|
int **dtrisToTrisMap, int **trisToFacesMap);
|
||||||
|
|
||||||
int buildRawVertIndicesData(struct DerivedMesh* dm, int *nverts, float **verts,
|
int buildRawVertIndicesData(struct DerivedMesh *dm, int *nverts, float **verts,
|
||||||
int *ntris, unsigned short **tris, int **trisToFacesMap,
|
int *ntris, unsigned short **tris, int **trisToFacesMap,
|
||||||
int **recastData);
|
int **recastData);
|
||||||
|
|
||||||
int buildNavMeshData(const int nverts, const float* verts,
|
int buildNavMeshData(const int nverts, const float *verts,
|
||||||
const int ntris, const unsigned short *tris,
|
const int ntris, const unsigned short *tris,
|
||||||
const int* recastData, const int* trisToFacesMap,
|
const int *recastData, const int *trisToFacesMap,
|
||||||
int *ndtris, unsigned short **dtris,
|
int *ndtris, unsigned short **dtris,
|
||||||
int *npolys, unsigned short **dmeshes, unsigned short **polys,
|
int *npolys, unsigned short **dmeshes, unsigned short **polys,
|
||||||
int *vertsPerPoly, int **dtrisToPolysMap, int **dtrisToTrisMap);
|
int *vertsPerPoly, int **dtrisToPolysMap, int **dtrisToTrisMap);
|
||||||
|
|
||||||
int buildPolygonsByDetailedMeshes(const int vertsPerPoly, const int npolys,
|
int buildPolygonsByDetailedMeshes(const int vertsPerPoly, const int npolys,
|
||||||
unsigned short* polys, const unsigned short* dmeshes,
|
unsigned short *polys, const unsigned short *dmeshes,
|
||||||
const float* verts, const unsigned short* dtris,
|
const float *verts, const unsigned short *dtris,
|
||||||
const int* dtrisToPolysMap);
|
const int *dtrisToPolysMap);
|
||||||
|
|
||||||
int polyNumVerts(const unsigned short* p, const int vertsPerPoly);
|
int polyNumVerts(const unsigned short *p, const int vertsPerPoly);
|
||||||
int polyIsConvex(const unsigned short* p, const int vertsPerPoly, const float* verts);
|
int polyIsConvex(const unsigned short *p, const int vertsPerPoly, const float *verts);
|
||||||
int polyFindVertex(const unsigned short* p, const int vertsPerPoly, unsigned short vertexIdx);
|
int polyFindVertex(const unsigned short *p, const int vertsPerPoly, unsigned short vertexIdx);
|
||||||
float distPointToSegmentSq(const float* point, const float* a, const float* b);
|
float distPointToSegmentSq(const float *point, const float *a, const float *b);
|
||||||
|
|
||||||
|
|
||||||
#endif //NAVMESH_CONVERSION_H
|
#endif //NAVMESH_CONVERSION_H
|
||||||
|
@@ -115,13 +115,13 @@ void BKE_nla_tweakmode_exit(struct AnimData *adt);
|
|||||||
|
|
||||||
/* time mapping conversion modes */
|
/* time mapping conversion modes */
|
||||||
enum {
|
enum {
|
||||||
/* convert from global time to strip time - for evaluation */
|
/* convert from global time to strip time - for evaluation */
|
||||||
NLATIME_CONVERT_EVAL = 0,
|
NLATIME_CONVERT_EVAL = 0,
|
||||||
/* convert from global time to strip time - for editing corrections */
|
/* convert from global time to strip time - for editing corrections */
|
||||||
// XXX old 0 invert
|
// XXX old 0 invert
|
||||||
NLATIME_CONVERT_UNMAP,
|
NLATIME_CONVERT_UNMAP,
|
||||||
/* convert from strip time to global time */
|
/* convert from strip time to global time */
|
||||||
// xxx old 1 invert
|
// xxx old 1 invert
|
||||||
NLATIME_CONVERT_MAP,
|
NLATIME_CONVERT_MAP,
|
||||||
} eNlaTime_ConvertModes;
|
} eNlaTime_ConvertModes;
|
||||||
|
|
||||||
|
@@ -101,25 +101,23 @@ void BKE_object_where_is_calc_mat4(struct Scene *scene, struct Object *ob, float
|
|||||||
|
|
||||||
/* possibly belong in own moduke? */
|
/* possibly belong in own moduke? */
|
||||||
struct BoundBox *BKE_boundbox_alloc_unit(void);
|
struct BoundBox *BKE_boundbox_alloc_unit(void);
|
||||||
void BKE_boundbox_init_from_minmax(struct BoundBox *bb, float min[3], float max[3]);
|
void BKE_boundbox_init_from_minmax(struct BoundBox *bb, float min[3], float max[3]);
|
||||||
int BKE_boundbox_ray_hit_check(struct BoundBox *bb, float ray_start[3], float ray_normal[3]);
|
int BKE_boundbox_ray_hit_check(struct BoundBox *bb, float ray_start[3], float ray_normal[3]);
|
||||||
|
|
||||||
struct BoundBox *BKE_object_boundbox_get(struct Object *ob);
|
struct BoundBox *BKE_object_boundbox_get(struct Object *ob);
|
||||||
void BKE_object_dimensions_get(struct Object *ob, float vec[3]);
|
void BKE_object_dimensions_get(struct Object *ob, float vec[3]);
|
||||||
void BKE_object_dimensions_set(struct Object *ob, const float *value);
|
void BKE_object_dimensions_set(struct Object *ob, const float *value);
|
||||||
void BKE_object_boundbox_flag(struct Object *ob, int flag, int set);
|
void BKE_object_boundbox_flag(struct Object *ob, int flag, int set);
|
||||||
void BKE_object_minmax(struct Object *ob, float r_min[3], float r_max[3]);
|
void BKE_object_minmax(struct Object *ob, float r_min[3], float r_max[3]);
|
||||||
int BKE_object_minmax_dupli(struct Scene *scene, struct Object *ob, float r_min[3], float r_max[3]);
|
int BKE_object_minmax_dupli(struct Scene *scene, struct Object *ob, float r_min[3], float r_max[3]);
|
||||||
|
|
||||||
/* sometimes min-max isn't enough, we need to loop over each point */
|
/* sometimes min-max isn't enough, we need to loop over each point */
|
||||||
void BKE_object_foreach_display_point(
|
void BKE_object_foreach_display_point(struct Object *ob, float obmat[4][4],
|
||||||
struct Object *ob, float obmat[4][4],
|
void (*func_cb)(const float[3], void *), void *user_data);
|
||||||
void (*func_cb)(const float[3], void *), void *user_data);
|
void BKE_scene_foreach_display_point(struct Scene *scene,
|
||||||
void BKE_scene_foreach_display_point(
|
struct View3D *v3d,
|
||||||
struct Scene *scene,
|
const short flag,
|
||||||
struct View3D *v3d,
|
void (*func_cb)(const float[3], void *), void *user_data);
|
||||||
const short flag,
|
|
||||||
void (*func_cb)(const float[3], void *), void *user_data);
|
|
||||||
|
|
||||||
int BKE_object_parent_loop_check(const struct Object *parent, const struct Object *ob);
|
int BKE_object_parent_loop_check(const struct Object *parent, const struct Object *ob);
|
||||||
|
|
||||||
@@ -136,11 +134,11 @@ typedef struct ObjectTfmProtectedChannels {
|
|||||||
} ObjectTfmProtectedChannels;
|
} ObjectTfmProtectedChannels;
|
||||||
|
|
||||||
void BKE_object_tfm_protected_backup(const struct Object *ob,
|
void BKE_object_tfm_protected_backup(const struct Object *ob,
|
||||||
ObjectTfmProtectedChannels *obtfm);
|
ObjectTfmProtectedChannels *obtfm);
|
||||||
|
|
||||||
void BKE_object_tfm_protected_restore(struct Object *ob,
|
void BKE_object_tfm_protected_restore(struct Object *ob,
|
||||||
const ObjectTfmProtectedChannels *obtfm,
|
const ObjectTfmProtectedChannels *obtfm,
|
||||||
const short protectflag);
|
const short protectflag);
|
||||||
|
|
||||||
void BKE_object_handle_update(struct Scene *scene, struct Object *ob);
|
void BKE_object_handle_update(struct Scene *scene, struct Object *ob);
|
||||||
void BKE_object_sculpt_modifiers_changed(struct Object *ob);
|
void BKE_object_sculpt_modifiers_changed(struct Object *ob);
|
||||||
|
@@ -69,25 +69,25 @@ typedef struct OceanCache {
|
|||||||
} OceanCache;
|
} OceanCache;
|
||||||
|
|
||||||
|
|
||||||
#define OCEAN_NOT_CACHED 0
|
#define OCEAN_NOT_CACHED 0
|
||||||
#define OCEAN_CACHING 1
|
#define OCEAN_CACHING 1
|
||||||
#define OCEAN_CACHED 2
|
#define OCEAN_CACHED 2
|
||||||
|
|
||||||
struct Ocean *BKE_add_ocean(void);
|
struct Ocean *BKE_add_ocean(void);
|
||||||
void BKE_free_ocean_data(struct Ocean *oc);
|
void BKE_free_ocean_data(struct Ocean *oc);
|
||||||
void BKE_free_ocean(struct Ocean *oc);
|
void BKE_free_ocean(struct Ocean *oc);
|
||||||
|
|
||||||
void BKE_init_ocean(struct Ocean* o, int M, int N, float Lx, float Lz, float V, float l, float A, float w, float damp,
|
void BKE_init_ocean(struct Ocean *o, int M, int N, float Lx, float Lz, float V, float l, float A, float w, float damp,
|
||||||
float alignment, float depth, float time, short do_height_field, short do_chop, short do_normals, short do_jacobian, int seed);
|
float alignment, float depth, float time, short do_height_field, short do_chop, short do_normals, short do_jacobian, int seed);
|
||||||
void BKE_simulate_ocean(struct Ocean *o, float t, float scale, float chop_amount);
|
void BKE_simulate_ocean(struct Ocean *o, float t, float scale, float chop_amount);
|
||||||
|
|
||||||
/* sampling the ocean surface */
|
/* sampling the ocean surface */
|
||||||
float BKE_ocean_jminus_to_foam(float jminus, float coverage);
|
float BKE_ocean_jminus_to_foam(float jminus, float coverage);
|
||||||
void BKE_ocean_eval_uv(struct Ocean * oc, struct OceanResult *ocr, float u, float v);
|
void BKE_ocean_eval_uv(struct Ocean *oc, struct OceanResult *ocr, float u, float v);
|
||||||
void BKE_ocean_eval_uv_catrom(struct Ocean * oc, struct OceanResult *ocr, float u, float v);
|
void BKE_ocean_eval_uv_catrom(struct Ocean *oc, struct OceanResult *ocr, float u, float v);
|
||||||
void BKE_ocean_eval_xz(struct Ocean * oc, struct OceanResult *ocr, float x, float z);
|
void BKE_ocean_eval_xz(struct Ocean *oc, struct OceanResult *ocr, float x, float z);
|
||||||
void BKE_ocean_eval_xz_catrom(struct Ocean * oc, struct OceanResult *ocr, float x, float z);
|
void BKE_ocean_eval_xz_catrom(struct Ocean *oc, struct OceanResult *ocr, float x, float z);
|
||||||
void BKE_ocean_eval_ij(struct Ocean * oc, struct OceanResult *ocr, int i, int j);
|
void BKE_ocean_eval_ij(struct Ocean *oc, struct OceanResult *ocr, int i, int j);
|
||||||
|
|
||||||
|
|
||||||
/* ocean cache handling */
|
/* ocean cache handling */
|
||||||
|
@@ -32,8 +32,8 @@
|
|||||||
* \since March 2001
|
* \since March 2001
|
||||||
* \author nzc
|
* \author nzc
|
||||||
*/
|
*/
|
||||||
#define RET_OK 0
|
#define RET_OK 0
|
||||||
#define RET_ERROR 1
|
#define RET_ERROR 1
|
||||||
|
|
||||||
struct bSound;
|
struct bSound;
|
||||||
struct Image;
|
struct Image;
|
||||||
|
@@ -59,18 +59,18 @@ struct SurfaceModifierData;
|
|||||||
struct BVHTreeRay;
|
struct BVHTreeRay;
|
||||||
struct BVHTreeRayHit;
|
struct BVHTreeRayHit;
|
||||||
|
|
||||||
#define PARTICLE_P ParticleData *pa; int p
|
#define PARTICLE_P ParticleData * pa; int p
|
||||||
#define LOOP_PARTICLES for(p=0, pa=psys->particles; p<psys->totpart; p++, pa++)
|
#define LOOP_PARTICLES for (p = 0, pa = psys->particles; p < psys->totpart; p++, pa++)
|
||||||
#define LOOP_EXISTING_PARTICLES for(p=0, pa=psys->particles; p<psys->totpart; p++, pa++) if(!(pa->flag & PARS_UNEXIST))
|
#define LOOP_EXISTING_PARTICLES for (p = 0, pa = psys->particles; p < psys->totpart; p++, pa++) if (!(pa->flag & PARS_UNEXIST))
|
||||||
#define LOOP_SHOWN_PARTICLES for(p=0, pa=psys->particles; p<psys->totpart; p++, pa++) if(!(pa->flag & (PARS_UNEXIST|PARS_NO_DISP)))
|
#define LOOP_SHOWN_PARTICLES for (p = 0, pa = psys->particles; p < psys->totpart; p++, pa++) if (!(pa->flag & (PARS_UNEXIST | PARS_NO_DISP)))
|
||||||
/* OpenMP: Can only advance one variable within loop definition. */
|
/* OpenMP: Can only advance one variable within loop definition. */
|
||||||
#define LOOP_DYNAMIC_PARTICLES for(p=0; p<psys->totpart; p++ ) if((pa=psys->particles+p)->state.time > 0.0f)
|
#define LOOP_DYNAMIC_PARTICLES for (p = 0; p < psys->totpart; p++) if ((pa = psys->particles + p)->state.time > 0.0f)
|
||||||
|
|
||||||
#define PSYS_FRAND_COUNT 1024
|
#define PSYS_FRAND_COUNT 1024
|
||||||
#define PSYS_FRAND(seed) psys->frand[(seed) % PSYS_FRAND_COUNT]
|
#define PSYS_FRAND(seed) psys->frand[(seed) % PSYS_FRAND_COUNT]
|
||||||
|
|
||||||
/* fast but sure way to get the modifier*/
|
/* fast but sure way to get the modifier*/
|
||||||
#define PARTICLE_PSMD ParticleSystemModifierData *psmd = sim->psmd ? sim->psmd : psys_get_modifier(sim->ob, sim->psys)
|
#define PARTICLE_PSMD ParticleSystemModifierData * psmd = sim->psmd ? sim->psmd : psys_get_modifier(sim->ob, sim->psys)
|
||||||
|
|
||||||
/* common stuff that many particle functions need */
|
/* common stuff that many particle functions need */
|
||||||
typedef struct ParticleSimulationData {
|
typedef struct ParticleSimulationData {
|
||||||
@@ -86,11 +86,11 @@ typedef struct ParticleSimulationData {
|
|||||||
} ParticleSimulationData;
|
} ParticleSimulationData;
|
||||||
|
|
||||||
typedef struct ParticleTexture {
|
typedef struct ParticleTexture {
|
||||||
float ivel; /* used in reset */
|
float ivel; /* used in reset */
|
||||||
float time, life, exist, size; /* used in init */
|
float time, life, exist, size; /* used in init */
|
||||||
float damp, gravity, field; /* used in physics */
|
float damp, gravity, field; /* used in physics */
|
||||||
float length, clump, kink, effector;/* used in path caching */
|
float length, clump, kink, effector; /* used in path caching */
|
||||||
float rough1, rough2, roughe; /* used in path caching */
|
float rough1, rough2, roughe; /* used in path caching */
|
||||||
} ParticleTexture;
|
} ParticleTexture;
|
||||||
|
|
||||||
typedef struct ParticleSeam {
|
typedef struct ParticleSeam {
|
||||||
@@ -145,8 +145,7 @@ typedef struct ParticleThread {
|
|||||||
int num, tot;
|
int num, tot;
|
||||||
} ParticleThread;
|
} ParticleThread;
|
||||||
|
|
||||||
typedef struct ParticleBillboardData
|
typedef struct ParticleBillboardData {
|
||||||
{
|
|
||||||
struct Object *ob;
|
struct Object *ob;
|
||||||
float vec[3], vel[3];
|
float vec[3], vel[3];
|
||||||
float offset[2];
|
float offset[2];
|
||||||
@@ -159,8 +158,7 @@ typedef struct ParticleBillboardData
|
|||||||
short align, uv_split, anim, split_offset;
|
short align, uv_split, anim, split_offset;
|
||||||
} ParticleBillboardData;
|
} ParticleBillboardData;
|
||||||
|
|
||||||
typedef struct ParticleCollisionElement
|
typedef struct ParticleCollisionElement {
|
||||||
{
|
|
||||||
/* pointers to original data */
|
/* pointers to original data */
|
||||||
float *x[4], *v[4];
|
float *x[4], *v[4];
|
||||||
|
|
||||||
@@ -181,8 +179,7 @@ typedef struct ParticleCollisionElement
|
|||||||
} ParticleCollisionElement;
|
} ParticleCollisionElement;
|
||||||
|
|
||||||
/* container for moving data between deflet_particle and particle_intersect_face */
|
/* container for moving data between deflet_particle and particle_intersect_face */
|
||||||
typedef struct ParticleCollision
|
typedef struct ParticleCollision {
|
||||||
{
|
|
||||||
struct Object *current;
|
struct Object *current;
|
||||||
struct Object *hit;
|
struct Object *hit;
|
||||||
struct Object *prev;
|
struct Object *prev;
|
||||||
@@ -191,7 +188,7 @@ typedef struct ParticleCollision
|
|||||||
|
|
||||||
struct CollisionModifierData *md; // collision modifier for current object;
|
struct CollisionModifierData *md; // collision modifier for current object;
|
||||||
|
|
||||||
float f; // time factor of previous collision, needed for substracting face velocity
|
float f; // time factor of previous collision, needed for substracting face velocity
|
||||||
float fac1, fac2;
|
float fac1, fac2;
|
||||||
|
|
||||||
float cfra, old_cfra;
|
float cfra, old_cfra;
|
||||||
@@ -214,10 +211,10 @@ typedef struct ParticleCollision
|
|||||||
} ParticleCollision;
|
} ParticleCollision;
|
||||||
|
|
||||||
typedef struct ParticleDrawData {
|
typedef struct ParticleDrawData {
|
||||||
float *vdata, *vd; /* vertice data */
|
float *vdata, *vd; /* vertice data */
|
||||||
float *ndata, *nd; /* normal data */
|
float *ndata, *nd; /* normal data */
|
||||||
float *cdata, *cd; /* color data */
|
float *cdata, *cd; /* color data */
|
||||||
float *vedata, *ved; /* velocity data */
|
float *vedata, *ved; /* velocity data */
|
||||||
float *ma_col;
|
float *ma_col;
|
||||||
int tot_vec_size, flag;
|
int tot_vec_size, flag;
|
||||||
int totpoint, totve;
|
int totpoint, totve;
|
||||||
@@ -248,7 +245,7 @@ int psys_uses_gravity(struct ParticleSimulationData *sim);
|
|||||||
/* free */
|
/* free */
|
||||||
void BKE_particlesettings_free(struct ParticleSettings *part);
|
void BKE_particlesettings_free(struct ParticleSettings *part);
|
||||||
void psys_free_path_cache(struct ParticleSystem *psys, struct PTCacheEdit *edit);
|
void psys_free_path_cache(struct ParticleSystem *psys, struct PTCacheEdit *edit);
|
||||||
void psys_free(struct Object * ob, struct ParticleSystem * psys);
|
void psys_free(struct Object *ob, struct ParticleSystem *psys);
|
||||||
|
|
||||||
void psys_render_set(struct Object *ob, struct ParticleSystem *psys, float viewmat[][4], float winmat[][4], int winx, int winy, int timeoffset);
|
void psys_render_set(struct Object *ob, struct ParticleSystem *psys, float viewmat[][4], float winmat[][4], int winx, int winy, int timeoffset);
|
||||||
void psys_render_restore(struct Object *ob, struct ParticleSystem *psys);
|
void psys_render_restore(struct Object *ob, struct ParticleSystem *psys);
|
||||||
@@ -291,7 +288,7 @@ void psys_get_dupli_path_transform(struct ParticleSimulationData *sim, struct Pa
|
|||||||
ParticleThread *psys_threads_create(struct ParticleSimulationData *sim);
|
ParticleThread *psys_threads_create(struct ParticleSimulationData *sim);
|
||||||
void psys_threads_free(ParticleThread *threads);
|
void psys_threads_free(ParticleThread *threads);
|
||||||
|
|
||||||
void psys_make_billboard(ParticleBillboardData *bb, float xvec[3], float yvec[3], float zvec[3], float center[3]);
|
void psys_make_billboard(ParticleBillboardData * bb, float xvec[3], float yvec[3], float zvec[3], float center[3]);
|
||||||
void psys_apply_hair_lattice(struct Scene *scene, struct Object *ob, struct ParticleSystem *psys);
|
void psys_apply_hair_lattice(struct Scene *scene, struct Object *ob, struct ParticleSystem *psys);
|
||||||
|
|
||||||
/* particle_system.c */
|
/* particle_system.c */
|
||||||
@@ -346,13 +343,13 @@ int psys_particle_dm_face_lookup(struct Object *ob, struct DerivedMesh *dm, int
|
|||||||
void reset_particle(struct ParticleSimulationData *sim, struct ParticleData *pa, float dtime, float cfra);
|
void reset_particle(struct ParticleSimulationData *sim, struct ParticleData *pa, float dtime, float cfra);
|
||||||
|
|
||||||
/* psys_reset */
|
/* psys_reset */
|
||||||
#define PSYS_RESET_ALL 1
|
#define PSYS_RESET_ALL 1
|
||||||
#define PSYS_RESET_DEPSGRAPH 2
|
#define PSYS_RESET_DEPSGRAPH 2
|
||||||
/* #define PSYS_RESET_CHILDREN 3 */ /*UNUSED*/
|
/* #define PSYS_RESET_CHILDREN 3 */ /*UNUSED*/
|
||||||
#define PSYS_RESET_CACHE_MISS 4
|
#define PSYS_RESET_CACHE_MISS 4
|
||||||
|
|
||||||
/* index_dmcache */
|
/* index_dmcache */
|
||||||
#define DMCACHE_NOTFOUND -1
|
#define DMCACHE_NOTFOUND -1
|
||||||
#define DMCACHE_ISCHILD -2
|
#define DMCACHE_ISCHILD -2
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -34,11 +34,11 @@
|
|||||||
|
|
||||||
struct ImBuf;
|
struct ImBuf;
|
||||||
|
|
||||||
typedef int (*TexDoitold)(int stype, void *cast, float *texvec, float *dxt, float *dyt);
|
typedef int (*TexDoitold)(int stype, void *cast, float *texvec, float *dxt, float *dyt);
|
||||||
typedef int (*TexDoit)(int stype, void *cast, float *texvec, float *dxt, float *dyt, float *result );
|
typedef int (*TexDoit)(int stype, void *cast, float *texvec, float *dxt, float *dyt, float *result);
|
||||||
typedef void (*SeqDoit)(void*, float, float, int, int,
|
typedef void (*SeqDoit)(void *, float, float, int, int,
|
||||||
struct ImBuf*, struct ImBuf*,
|
struct ImBuf *, struct ImBuf *,
|
||||||
struct ImBuf*, struct ImBuf*);
|
struct ImBuf *, struct ImBuf *);
|
||||||
|
|
||||||
typedef struct VarStruct {
|
typedef struct VarStruct {
|
||||||
int type;
|
int type;
|
||||||
|
@@ -40,15 +40,15 @@
|
|||||||
|
|
||||||
/* Point cache clearing option, for BKE_ptcache_id_clear, before
|
/* Point cache clearing option, for BKE_ptcache_id_clear, before
|
||||||
* and after are non inclusive (they wont remove the cfra) */
|
* and after are non inclusive (they wont remove the cfra) */
|
||||||
#define PTCACHE_CLEAR_ALL 0
|
#define PTCACHE_CLEAR_ALL 0
|
||||||
#define PTCACHE_CLEAR_FRAME 1
|
#define PTCACHE_CLEAR_FRAME 1
|
||||||
#define PTCACHE_CLEAR_BEFORE 2
|
#define PTCACHE_CLEAR_BEFORE 2
|
||||||
#define PTCACHE_CLEAR_AFTER 3
|
#define PTCACHE_CLEAR_AFTER 3
|
||||||
|
|
||||||
/* Point cache reset options */
|
/* Point cache reset options */
|
||||||
#define PTCACHE_RESET_DEPSGRAPH 0
|
#define PTCACHE_RESET_DEPSGRAPH 0
|
||||||
#define PTCACHE_RESET_BAKED 1
|
#define PTCACHE_RESET_BAKED 1
|
||||||
#define PTCACHE_RESET_OUTDATED 2
|
#define PTCACHE_RESET_OUTDATED 2
|
||||||
/* #define PTCACHE_RESET_FREE 3 */ /*UNUSED*/
|
/* #define PTCACHE_RESET_FREE 3 */ /*UNUSED*/
|
||||||
|
|
||||||
/* Add the blendfile name after blendcache_ */
|
/* Add the blendfile name after blendcache_ */
|
||||||
@@ -56,29 +56,29 @@
|
|||||||
#define PTCACHE_PATH "blendcache_"
|
#define PTCACHE_PATH "blendcache_"
|
||||||
|
|
||||||
/* File open options, for BKE_ptcache_file_open */
|
/* File open options, for BKE_ptcache_file_open */
|
||||||
#define PTCACHE_FILE_READ 0
|
#define PTCACHE_FILE_READ 0
|
||||||
#define PTCACHE_FILE_WRITE 1
|
#define PTCACHE_FILE_WRITE 1
|
||||||
#define PTCACHE_FILE_UPDATE 2
|
#define PTCACHE_FILE_UPDATE 2
|
||||||
|
|
||||||
/* PTCacheID types */
|
/* PTCacheID types */
|
||||||
#define PTCACHE_TYPE_SOFTBODY 0
|
#define PTCACHE_TYPE_SOFTBODY 0
|
||||||
#define PTCACHE_TYPE_PARTICLES 1
|
#define PTCACHE_TYPE_PARTICLES 1
|
||||||
#define PTCACHE_TYPE_CLOTH 2
|
#define PTCACHE_TYPE_CLOTH 2
|
||||||
#define PTCACHE_TYPE_SMOKE_DOMAIN 3
|
#define PTCACHE_TYPE_SMOKE_DOMAIN 3
|
||||||
#define PTCACHE_TYPE_SMOKE_HIGHRES 4
|
#define PTCACHE_TYPE_SMOKE_HIGHRES 4
|
||||||
#define PTCACHE_TYPE_DYNAMICPAINT 5
|
#define PTCACHE_TYPE_DYNAMICPAINT 5
|
||||||
|
|
||||||
/* high bits reserved for flags that need to be stored in file */
|
/* high bits reserved for flags that need to be stored in file */
|
||||||
#define PTCACHE_TYPEFLAG_COMPRESS (1<<16)
|
#define PTCACHE_TYPEFLAG_COMPRESS (1 << 16)
|
||||||
#define PTCACHE_TYPEFLAG_EXTRADATA (1<<17)
|
#define PTCACHE_TYPEFLAG_EXTRADATA (1 << 17)
|
||||||
|
|
||||||
#define PTCACHE_TYPEFLAG_TYPEMASK 0x0000FFFF
|
#define PTCACHE_TYPEFLAG_TYPEMASK 0x0000FFFF
|
||||||
#define PTCACHE_TYPEFLAG_FLAGMASK 0xFFFF0000
|
#define PTCACHE_TYPEFLAG_FLAGMASK 0xFFFF0000
|
||||||
|
|
||||||
/* PTCache read return code */
|
/* PTCache read return code */
|
||||||
#define PTCACHE_READ_EXACT 1
|
#define PTCACHE_READ_EXACT 1
|
||||||
#define PTCACHE_READ_INTERPOLATED 2
|
#define PTCACHE_READ_INTERPOLATED 2
|
||||||
#define PTCACHE_READ_OLD 3
|
#define PTCACHE_READ_OLD 3
|
||||||
|
|
||||||
/* Structs */
|
/* Structs */
|
||||||
struct ClothModifierData;
|
struct ClothModifierData;
|
||||||
@@ -115,7 +115,7 @@ typedef struct PTCacheFile {
|
|||||||
void *cur[BPHYS_TOT_DATA];
|
void *cur[BPHYS_TOT_DATA];
|
||||||
} PTCacheFile;
|
} PTCacheFile;
|
||||||
|
|
||||||
#define PTCACHE_VEL_PER_SEC 1
|
#define PTCACHE_VEL_PER_SEC 1
|
||||||
|
|
||||||
typedef struct PTCacheID {
|
typedef struct PTCacheID {
|
||||||
struct PTCacheID *next, *prev;
|
struct PTCacheID *next, *prev;
|
||||||
@@ -182,10 +182,10 @@ typedef struct PTCacheBaker {
|
|||||||
} PTCacheBaker;
|
} PTCacheBaker;
|
||||||
|
|
||||||
/* PTCacheEditKey->flag */
|
/* PTCacheEditKey->flag */
|
||||||
#define PEK_SELECT 1
|
#define PEK_SELECT 1
|
||||||
#define PEK_TAG 2
|
#define PEK_TAG 2
|
||||||
#define PEK_HIDE 4
|
#define PEK_HIDE 4
|
||||||
#define PEK_USE_WCO 8
|
#define PEK_USE_WCO 8
|
||||||
|
|
||||||
typedef struct PTCacheEditKey {
|
typedef struct PTCacheEditKey {
|
||||||
float *co;
|
float *co;
|
||||||
@@ -200,10 +200,10 @@ typedef struct PTCacheEditKey {
|
|||||||
} PTCacheEditKey;
|
} PTCacheEditKey;
|
||||||
|
|
||||||
/* PTCacheEditPoint->flag */
|
/* PTCacheEditPoint->flag */
|
||||||
#define PEP_TAG 1
|
#define PEP_TAG 1
|
||||||
#define PEP_EDIT_RECALC 2
|
#define PEP_EDIT_RECALC 2
|
||||||
#define PEP_TRANSFORM 4
|
#define PEP_TRANSFORM 4
|
||||||
#define PEP_HIDE 8
|
#define PEP_HIDE 8
|
||||||
|
|
||||||
typedef struct PTCacheEditPoint {
|
typedef struct PTCacheEditPoint {
|
||||||
struct PTCacheEditKey *keys;
|
struct PTCacheEditKey *keys;
|
||||||
@@ -242,7 +242,7 @@ typedef struct PTCacheEdit {
|
|||||||
float *emitter_cosnos; /* localspace face centers and normals (average of its verts), from the derived mesh */
|
float *emitter_cosnos; /* localspace face centers and normals (average of its verts), from the derived mesh */
|
||||||
int *mirror_cache;
|
int *mirror_cache;
|
||||||
|
|
||||||
struct ParticleCacheKey **pathcache; /* path cache (runtime) */
|
struct ParticleCacheKey **pathcache; /* path cache (runtime) */
|
||||||
ListBase pathcachebufs;
|
ListBase pathcachebufs;
|
||||||
|
|
||||||
int totpoint, totframes, totcached, edited;
|
int totpoint, totframes, totcached, edited;
|
||||||
@@ -267,18 +267,18 @@ void BKE_ptcache_ids_from_object(struct ListBase *lb, struct Object *ob, struct
|
|||||||
void BKE_ptcache_remove(void);
|
void BKE_ptcache_remove(void);
|
||||||
|
|
||||||
/************ ID specific functions ************************/
|
/************ ID specific functions ************************/
|
||||||
void BKE_ptcache_id_clear(PTCacheID *id, int mode, unsigned int cfra);
|
void BKE_ptcache_id_clear(PTCacheID *id, int mode, unsigned int cfra);
|
||||||
int BKE_ptcache_id_exist(PTCacheID *id, int cfra);
|
int BKE_ptcache_id_exist(PTCacheID *id, int cfra);
|
||||||
int BKE_ptcache_id_reset(struct Scene *scene, PTCacheID *id, int mode);
|
int BKE_ptcache_id_reset(struct Scene *scene, PTCacheID *id, int mode);
|
||||||
void BKE_ptcache_id_time(PTCacheID *pid, struct Scene *scene, float cfra, int *startframe, int *endframe, float *timescale);
|
void BKE_ptcache_id_time(PTCacheID *pid, struct Scene *scene, float cfra, int *startframe, int *endframe, float *timescale);
|
||||||
int BKE_ptcache_object_reset(struct Scene *scene, struct Object *ob, int mode);
|
int BKE_ptcache_object_reset(struct Scene *scene, struct Object *ob, int mode);
|
||||||
|
|
||||||
void BKE_ptcache_update_info(PTCacheID *pid);
|
void BKE_ptcache_update_info(PTCacheID *pid);
|
||||||
|
|
||||||
/*********** General cache reading/writing ******************/
|
/*********** General cache reading/writing ******************/
|
||||||
|
|
||||||
/* Size of cache data type. */
|
/* Size of cache data type. */
|
||||||
int BKE_ptcache_data_size(int data_type);
|
int BKE_ptcache_data_size(int data_type);
|
||||||
|
|
||||||
/* Is point with indes in memory cache */
|
/* Is point with indes in memory cache */
|
||||||
int BKE_ptcache_mem_index_find(struct PTCacheMem *pm, unsigned int index);
|
int BKE_ptcache_mem_index_find(struct PTCacheMem *pm, unsigned int index);
|
||||||
@@ -289,10 +289,10 @@ void BKE_ptcache_mem_pointers_incr(struct PTCacheMem *pm);
|
|||||||
int BKE_ptcache_mem_pointers_seek(int point_index, struct PTCacheMem *pm);
|
int BKE_ptcache_mem_pointers_seek(int point_index, struct PTCacheMem *pm);
|
||||||
|
|
||||||
/* Main cache reading call. */
|
/* Main cache reading call. */
|
||||||
int BKE_ptcache_read(PTCacheID *pid, float cfra);
|
int BKE_ptcache_read(PTCacheID *pid, float cfra);
|
||||||
|
|
||||||
/* Main cache writing call. */
|
/* Main cache writing call. */
|
||||||
int BKE_ptcache_write(PTCacheID *pid, unsigned int cfra);
|
int BKE_ptcache_write(PTCacheID *pid, unsigned int cfra);
|
||||||
|
|
||||||
/****************** Continue physics ***************/
|
/****************** Continue physics ***************/
|
||||||
void BKE_ptcache_set_continue_physics(struct Main *bmain, struct Scene *scene, int enable);
|
void BKE_ptcache_set_continue_physics(struct Main *bmain, struct Scene *scene, int enable);
|
||||||
@@ -311,7 +311,7 @@ struct PointCache *BKE_ptcache_copy_list(struct ListBase *ptcaches_new, struct L
|
|||||||
void BKE_ptcache_quick_cache_all(struct Main *bmain, struct Scene *scene);
|
void BKE_ptcache_quick_cache_all(struct Main *bmain, struct Scene *scene);
|
||||||
|
|
||||||
/* Bake cache or simulate to current frame with settings defined in the baker. */
|
/* Bake cache or simulate to current frame with settings defined in the baker. */
|
||||||
void BKE_ptcache_bake(struct PTCacheBaker* baker);
|
void BKE_ptcache_bake(struct PTCacheBaker *baker);
|
||||||
|
|
||||||
/* Convert disk cache to memory cache. */
|
/* Convert disk cache to memory cache. */
|
||||||
void BKE_ptcache_disk_to_mem(struct PTCacheID *pid);
|
void BKE_ptcache_disk_to_mem(struct PTCacheID *pid);
|
||||||
|
@@ -49,14 +49,14 @@ void BKE_reports_clear(ReportList *reports);
|
|||||||
void BKE_report(ReportList *reports, ReportType type, const char *message);
|
void BKE_report(ReportList *reports, ReportType type, const char *message);
|
||||||
void BKE_reportf(ReportList *reports, ReportType type, const char *format, ...)
|
void BKE_reportf(ReportList *reports, ReportType type, const char *format, ...)
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
__attribute__ ((format (printf, 3, 4)))
|
__attribute__ ((format(printf, 3, 4)))
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
void BKE_reports_prepend(ReportList *reports, const char *prepend);
|
void BKE_reports_prepend(ReportList *reports, const char *prepend);
|
||||||
void BKE_reports_prependf(ReportList *reports, const char *prepend, ...)
|
void BKE_reports_prependf(ReportList *reports, const char *prepend, ...)
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
__attribute__ ((format (printf, 2, 3)))
|
__attribute__ ((format(printf, 2, 3)))
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@@ -49,13 +49,13 @@ struct Scene;
|
|||||||
struct Text;
|
struct Text;
|
||||||
struct Text;
|
struct Text;
|
||||||
|
|
||||||
#define SCE_COPY_NEW 0
|
#define SCE_COPY_NEW 0
|
||||||
#define SCE_COPY_EMPTY 1
|
#define SCE_COPY_EMPTY 1
|
||||||
#define SCE_COPY_LINK_OB 2
|
#define SCE_COPY_LINK_OB 2
|
||||||
#define SCE_COPY_LINK_DATA 3
|
#define SCE_COPY_LINK_DATA 3
|
||||||
#define SCE_COPY_FULL 4
|
#define SCE_COPY_FULL 4
|
||||||
|
|
||||||
#define SETLOOPER(_sce_basis, _sce_iter, _base) _sce_iter= _sce_basis, _base= _setlooper_base_step(&_sce_iter, NULL); _base; _base= _setlooper_base_step(&_sce_iter, _base)
|
#define SETLOOPER(_sce_basis, _sce_iter, _base) _sce_iter = _sce_basis, _base = _setlooper_base_step(&_sce_iter, NULL); _base; _base = _setlooper_base_step(&_sce_iter, _base)
|
||||||
struct Base *_setlooper_base_step(struct Scene **sce_iter, struct Base *base);
|
struct Base *_setlooper_base_step(struct Scene **sce_iter, struct Base *base);
|
||||||
|
|
||||||
void free_avicodecdata(struct AviCodecData *acd);
|
void free_avicodecdata(struct AviCodecData *acd);
|
||||||
|
@@ -58,43 +58,43 @@ struct wmWindowManager;
|
|||||||
* ED_spacetypes_init() in editors/area/spacetypes.c */
|
* ED_spacetypes_init() in editors/area/spacetypes.c */
|
||||||
/* an editor in Blender is a combined ScrArea + SpaceType + SpaceData */
|
/* an editor in Blender is a combined ScrArea + SpaceType + SpaceData */
|
||||||
|
|
||||||
#define BKE_ST_MAXNAME 64
|
#define BKE_ST_MAXNAME 64
|
||||||
|
|
||||||
typedef struct SpaceType {
|
typedef struct SpaceType {
|
||||||
struct SpaceType *next, *prev;
|
struct SpaceType *next, *prev;
|
||||||
|
|
||||||
char name[BKE_ST_MAXNAME]; /* for menus */
|
char name[BKE_ST_MAXNAME]; /* for menus */
|
||||||
int spaceid; /* unique space identifier */
|
int spaceid; /* unique space identifier */
|
||||||
int iconid; /* icon lookup for menus */
|
int iconid; /* icon lookup for menus */
|
||||||
|
|
||||||
/* initial allocation, after this WM will call init() too */
|
/* initial allocation, after this WM will call init() too */
|
||||||
struct SpaceLink *(*new)(const struct bContext *C);
|
struct SpaceLink *(*new)(const struct bContext *C);
|
||||||
/* not free spacelink itself */
|
/* not free spacelink itself */
|
||||||
void (*free)(struct SpaceLink *);
|
void (*free)(struct SpaceLink *);
|
||||||
|
|
||||||
/* init is to cope with file load, screen (size) changes, check handlers */
|
/* init is to cope with file load, screen (size) changes, check handlers */
|
||||||
void (*init)(struct wmWindowManager *, struct ScrArea *);
|
void (*init)(struct wmWindowManager *, struct ScrArea *);
|
||||||
/* Listeners can react to bContext changes */
|
/* Listeners can react to bContext changes */
|
||||||
void (*listener)(struct ScrArea *, struct wmNotifier *);
|
void (*listener)(struct ScrArea *, struct wmNotifier *);
|
||||||
|
|
||||||
/* refresh context, called after filereads, ED_area_tag_refresh() */
|
/* refresh context, called after filereads, ED_area_tag_refresh() */
|
||||||
void (*refresh)(const struct bContext *, struct ScrArea *);
|
void (*refresh)(const struct bContext *, struct ScrArea *);
|
||||||
|
|
||||||
/* after a spacedata copy, an init should result in exact same situation */
|
/* after a spacedata copy, an init should result in exact same situation */
|
||||||
struct SpaceLink *(*duplicate)(struct SpaceLink *);
|
struct SpaceLink *(*duplicate)(struct SpaceLink *);
|
||||||
|
|
||||||
/* register operator types on startup */
|
/* register operator types on startup */
|
||||||
void (*operatortypes)(void);
|
void (*operatortypes)(void);
|
||||||
/* add default items to WM keymap */
|
/* add default items to WM keymap */
|
||||||
void (*keymap)(struct wmKeyConfig *);
|
void (*keymap)(struct wmKeyConfig *);
|
||||||
/* on startup, define dropboxes for spacetype+regions */
|
/* on startup, define dropboxes for spacetype+regions */
|
||||||
void (*dropboxes)(void);
|
void (*dropboxes)(void);
|
||||||
|
|
||||||
/* return context data */
|
/* return context data */
|
||||||
int (*context)(const struct bContext *, const char*, struct bContextDataResult *);
|
int (*context)(const struct bContext *, const char *, struct bContextDataResult *);
|
||||||
|
|
||||||
/* region type definitions */
|
/* region type definitions */
|
||||||
ListBase regiontypes;
|
ListBase regiontypes;
|
||||||
|
|
||||||
/* tool shelf definitions */
|
/* tool shelf definitions */
|
||||||
ListBase toolshelf;
|
ListBase toolshelf;
|
||||||
@@ -102,7 +102,7 @@ typedef struct SpaceType {
|
|||||||
/* read and write... */
|
/* read and write... */
|
||||||
|
|
||||||
/* default keymaps to add */
|
/* default keymaps to add */
|
||||||
int keymapflag;
|
int keymapflag;
|
||||||
|
|
||||||
} SpaceType;
|
} SpaceType;
|
||||||
|
|
||||||
@@ -111,33 +111,33 @@ typedef struct SpaceType {
|
|||||||
typedef struct ARegionType {
|
typedef struct ARegionType {
|
||||||
struct ARegionType *next, *prev;
|
struct ARegionType *next, *prev;
|
||||||
|
|
||||||
int regionid; /* unique identifier within this space, defines RGN_TYPE_xxxx */
|
int regionid; /* unique identifier within this space, defines RGN_TYPE_xxxx */
|
||||||
|
|
||||||
/* add handlers, stuff you only do once or on area/region type/size changes */
|
/* add handlers, stuff you only do once or on area/region type/size changes */
|
||||||
void (*init)(struct wmWindowManager *, struct ARegion *);
|
void (*init)(struct wmWindowManager *, struct ARegion *);
|
||||||
/* draw entirely, view changes should be handled here */
|
/* draw entirely, view changes should be handled here */
|
||||||
void (*draw)(const struct bContext *, struct ARegion *);
|
void (*draw)(const struct bContext *, struct ARegion *);
|
||||||
/* contextual changes should be handled here */
|
/* contextual changes should be handled here */
|
||||||
void (*listener)(struct ARegion *, struct wmNotifier *);
|
void (*listener)(struct ARegion *, struct wmNotifier *);
|
||||||
|
|
||||||
void (*free)(struct ARegion *);
|
void (*free)(struct ARegion *);
|
||||||
|
|
||||||
/* split region, copy data optionally */
|
/* split region, copy data optionally */
|
||||||
void *(*duplicate)(void *);
|
void *(*duplicate)(void *);
|
||||||
|
|
||||||
|
|
||||||
/* register operator types on startup */
|
/* register operator types on startup */
|
||||||
void (*operatortypes)(void);
|
void (*operatortypes)(void);
|
||||||
/* add own items to keymap */
|
/* add own items to keymap */
|
||||||
void (*keymap)(struct wmKeyConfig *);
|
void (*keymap)(struct wmKeyConfig *);
|
||||||
/* allows default cursor per region */
|
/* allows default cursor per region */
|
||||||
void (*cursor)(struct wmWindow *, struct ScrArea *, struct ARegion *ar);
|
void (*cursor)(struct wmWindow *, struct ScrArea *, struct ARegion *ar);
|
||||||
|
|
||||||
/* return context data */
|
/* return context data */
|
||||||
int (*context)(const struct bContext *, const char *, struct bContextDataResult *);
|
int (*context)(const struct bContext *, const char *, struct bContextDataResult *);
|
||||||
|
|
||||||
/* custom drawing callbacks */
|
/* custom drawing callbacks */
|
||||||
ListBase drawcalls;
|
ListBase drawcalls;
|
||||||
|
|
||||||
/* panels type definitions */
|
/* panels type definitions */
|
||||||
ListBase paneltypes;
|
ListBase paneltypes;
|
||||||
@@ -146,13 +146,13 @@ typedef struct ARegionType {
|
|||||||
ListBase headertypes;
|
ListBase headertypes;
|
||||||
|
|
||||||
/* hardcoded constraints, smaller than these values region is not visible */
|
/* hardcoded constraints, smaller than these values region is not visible */
|
||||||
int minsizex, minsizey;
|
int minsizex, minsizey;
|
||||||
/* when new region opens (region prefsizex/y are zero then */
|
/* when new region opens (region prefsizex/y are zero then */
|
||||||
int prefsizex, prefsizey;
|
int prefsizex, prefsizey;
|
||||||
/* default keymaps to add */
|
/* default keymaps to add */
|
||||||
int keymapflag;
|
int keymapflag;
|
||||||
/* return without drawing. lock is set by region definition, and copied to do_lock by render. can become flag */
|
/* return without drawing. lock is set by region definition, and copied to do_lock by render. can become flag */
|
||||||
short do_lock, lock;
|
short do_lock, lock;
|
||||||
} ARegionType;
|
} ARegionType;
|
||||||
|
|
||||||
/* panel types */
|
/* panel types */
|
||||||
@@ -160,20 +160,20 @@ typedef struct ARegionType {
|
|||||||
typedef struct PanelType {
|
typedef struct PanelType {
|
||||||
struct PanelType *next, *prev;
|
struct PanelType *next, *prev;
|
||||||
|
|
||||||
char idname[BKE_ST_MAXNAME]; /* unique name */
|
char idname[BKE_ST_MAXNAME]; /* unique name */
|
||||||
char label[BKE_ST_MAXNAME]; /* for panel header */
|
char label[BKE_ST_MAXNAME]; /* for panel header */
|
||||||
char context[BKE_ST_MAXNAME]; /* for buttons window */
|
char context[BKE_ST_MAXNAME]; /* for buttons window */
|
||||||
int space_type;
|
int space_type;
|
||||||
int region_type;
|
int region_type;
|
||||||
|
|
||||||
int flag;
|
int flag;
|
||||||
|
|
||||||
/* verify if the panel should draw or not */
|
/* verify if the panel should draw or not */
|
||||||
int (*poll)(const struct bContext *, struct PanelType *);
|
int (*poll)(const struct bContext *, struct PanelType *);
|
||||||
/* draw header (optional) */
|
/* draw header (optional) */
|
||||||
void (*draw_header)(const struct bContext *, struct Panel *);
|
void (*draw_header)(const struct bContext *, struct Panel *);
|
||||||
/* draw entirely, view changes should be handled here */
|
/* draw entirely, view changes should be handled here */
|
||||||
void (*draw)(const struct bContext *, struct Panel *);
|
void (*draw)(const struct bContext *, struct Panel *);
|
||||||
|
|
||||||
/* RNA integration */
|
/* RNA integration */
|
||||||
ExtensionRNA ext;
|
ExtensionRNA ext;
|
||||||
@@ -184,19 +184,19 @@ typedef struct PanelType {
|
|||||||
typedef struct HeaderType {
|
typedef struct HeaderType {
|
||||||
struct HeaderType *next, *prev;
|
struct HeaderType *next, *prev;
|
||||||
|
|
||||||
char idname[BKE_ST_MAXNAME]; /* unique name */
|
char idname[BKE_ST_MAXNAME]; /* unique name */
|
||||||
int space_type;
|
int space_type;
|
||||||
|
|
||||||
/* draw entirely, view changes should be handled here */
|
/* draw entirely, view changes should be handled here */
|
||||||
void (*draw)(const struct bContext *, struct Header *);
|
void (*draw)(const struct bContext *, struct Header *);
|
||||||
|
|
||||||
/* RNA integration */
|
/* RNA integration */
|
||||||
ExtensionRNA ext;
|
ExtensionRNA ext;
|
||||||
} HeaderType;
|
} HeaderType;
|
||||||
|
|
||||||
typedef struct Header {
|
typedef struct Header {
|
||||||
struct HeaderType *type; /* runtime */
|
struct HeaderType *type; /* runtime */
|
||||||
struct uiLayout *layout; /* runtime for drawing */
|
struct uiLayout *layout; /* runtime for drawing */
|
||||||
} Header;
|
} Header;
|
||||||
|
|
||||||
|
|
||||||
@@ -205,22 +205,22 @@ typedef struct Header {
|
|||||||
typedef struct MenuType {
|
typedef struct MenuType {
|
||||||
struct MenuType *next, *prev;
|
struct MenuType *next, *prev;
|
||||||
|
|
||||||
char idname[BKE_ST_MAXNAME]; /* unique name */
|
char idname[BKE_ST_MAXNAME]; /* unique name */
|
||||||
char label[BKE_ST_MAXNAME]; /* for button text */
|
char label[BKE_ST_MAXNAME]; /* for button text */
|
||||||
char *description;
|
char *description;
|
||||||
|
|
||||||
/* verify if the menu should draw or not */
|
/* verify if the menu should draw or not */
|
||||||
int (*poll)(const struct bContext *, struct MenuType *);
|
int (*poll)(const struct bContext *, struct MenuType *);
|
||||||
/* draw entirely, view changes should be handled here */
|
/* draw entirely, view changes should be handled here */
|
||||||
void (*draw)(const struct bContext *, struct Menu *);
|
void (*draw)(const struct bContext *, struct Menu *);
|
||||||
|
|
||||||
/* RNA integration */
|
/* RNA integration */
|
||||||
ExtensionRNA ext;
|
ExtensionRNA ext;
|
||||||
} MenuType;
|
} MenuType;
|
||||||
|
|
||||||
typedef struct Menu {
|
typedef struct Menu {
|
||||||
struct MenuType *type; /* runtime */
|
struct MenuType *type; /* runtime */
|
||||||
struct uiLayout *layout; /* runtime for drawing */
|
struct uiLayout *layout; /* runtime for drawing */
|
||||||
} Menu;
|
} Menu;
|
||||||
|
|
||||||
/* spacetypes */
|
/* spacetypes */
|
||||||
@@ -228,7 +228,7 @@ struct SpaceType *BKE_spacetype_from_id(int spaceid);
|
|||||||
struct ARegionType *BKE_regiontype_from_id(struct SpaceType *st, int regionid);
|
struct ARegionType *BKE_regiontype_from_id(struct SpaceType *st, int regionid);
|
||||||
const struct ListBase *BKE_spacetypes_list(void);
|
const struct ListBase *BKE_spacetypes_list(void);
|
||||||
void BKE_spacetype_register(struct SpaceType *st);
|
void BKE_spacetype_register(struct SpaceType *st);
|
||||||
void BKE_spacetypes_free(void); /* only for quitting blender */
|
void BKE_spacetypes_free(void); /* only for quitting blender */
|
||||||
|
|
||||||
/* spacedata */
|
/* spacedata */
|
||||||
void BKE_spacedata_freelist(ListBase *lb);
|
void BKE_spacedata_freelist(ListBase *lb);
|
||||||
@@ -237,8 +237,8 @@ void BKE_spacedata_draw_locks(int set);
|
|||||||
|
|
||||||
/* area/regions */
|
/* area/regions */
|
||||||
struct ARegion *BKE_area_region_copy(struct SpaceType *st, struct ARegion *ar);
|
struct ARegion *BKE_area_region_copy(struct SpaceType *st, struct ARegion *ar);
|
||||||
void BKE_area_region_free(struct SpaceType *st, struct ARegion *ar);
|
void BKE_area_region_free(struct SpaceType *st, struct ARegion *ar);
|
||||||
void BKE_screen_area_free(struct ScrArea *sa);
|
void BKE_screen_area_free(struct ScrArea *sa);
|
||||||
|
|
||||||
struct ARegion *BKE_area_find_region_type(struct ScrArea *sa, int type);
|
struct ARegion *BKE_area_find_region_type(struct ScrArea *sa, int type);
|
||||||
struct ScrArea *BKE_screen_find_big_area(struct bScreen *sc, const int spacetype, const short min);
|
struct ScrArea *BKE_screen_find_big_area(struct bScreen *sc, const int spacetype, const short min);
|
||||||
|
@@ -40,7 +40,7 @@ extern "C" {
|
|||||||
|
|
||||||
struct Script;
|
struct Script;
|
||||||
|
|
||||||
void free_script (struct Script *script);
|
void free_script(struct Script *script);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@@ -46,10 +46,10 @@ struct SeqIndexBuildContext;
|
|||||||
#define BUILD_SEQAR_COUNT_CURRENT 1
|
#define BUILD_SEQAR_COUNT_CURRENT 1
|
||||||
#define BUILD_SEQAR_COUNT_CHILDREN 2
|
#define BUILD_SEQAR_COUNT_CHILDREN 2
|
||||||
|
|
||||||
#define EARLY_NO_INPUT -1
|
#define EARLY_NO_INPUT -1
|
||||||
#define EARLY_DO_EFFECT 0
|
#define EARLY_DO_EFFECT 0
|
||||||
#define EARLY_USE_INPUT_1 1
|
#define EARLY_USE_INPUT_1 1
|
||||||
#define EARLY_USE_INPUT_2 2
|
#define EARLY_USE_INPUT_2 2
|
||||||
|
|
||||||
/* sequence iterator */
|
/* sequence iterator */
|
||||||
|
|
||||||
@@ -67,8 +67,8 @@ void seq_end(SeqIterator *iter);
|
|||||||
void seq_array(struct Editing *ed, struct Sequence ***seqarray, int *tot, int use_pointer);
|
void seq_array(struct Editing *ed, struct Sequence ***seqarray, int *tot, int use_pointer);
|
||||||
|
|
||||||
#define SEQP_BEGIN(ed, _seq) \
|
#define SEQP_BEGIN(ed, _seq) \
|
||||||
{ \
|
{ \
|
||||||
SeqIterator iter; \
|
SeqIterator iter; \
|
||||||
for (seq_begin(ed, &iter, 1); iter.valid; seq_next(&iter)) { \
|
for (seq_begin(ed, &iter, 1); iter.valid; seq_next(&iter)) { \
|
||||||
_seq = iter.seq;
|
_seq = iter.seq;
|
||||||
|
|
||||||
@@ -79,8 +79,8 @@ void seq_array(struct Editing *ed, struct Sequence ***seqarray, int *tot, int us
|
|||||||
_seq = iter.seq;
|
_seq = iter.seq;
|
||||||
|
|
||||||
#define SEQ_END \
|
#define SEQ_END \
|
||||||
} \
|
} \
|
||||||
seq_end(&iter); \
|
seq_end(&iter); \
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct SeqRenderData {
|
typedef struct SeqRenderData {
|
||||||
@@ -94,11 +94,11 @@ typedef struct SeqRenderData {
|
|||||||
} SeqRenderData;
|
} SeqRenderData;
|
||||||
|
|
||||||
SeqRenderData seq_new_render_data(
|
SeqRenderData seq_new_render_data(
|
||||||
struct Main * bmain, struct Scene * scene,
|
struct Main *bmain, struct Scene *scene,
|
||||||
int rectx, int recty, int preview_render_size);
|
int rectx, int recty, int preview_render_size);
|
||||||
|
|
||||||
int seq_cmp_render_data(const SeqRenderData * a, const SeqRenderData * b);
|
int seq_cmp_render_data(const SeqRenderData *a, const SeqRenderData *b);
|
||||||
unsigned int seq_hash_render_data(const SeqRenderData * a);
|
unsigned int seq_hash_render_data(const SeqRenderData *a);
|
||||||
|
|
||||||
/* Wipe effect */
|
/* Wipe effect */
|
||||||
enum {
|
enum {
|
||||||
@@ -138,22 +138,21 @@ struct SeqEffectHandle {
|
|||||||
int (*early_out)(struct Sequence *seq, float facf0, float facf1);
|
int (*early_out)(struct Sequence *seq, float facf0, float facf1);
|
||||||
|
|
||||||
/* stores the y-range of the effect IPO */
|
/* stores the y-range of the effect IPO */
|
||||||
void (*store_icu_yrange)(struct Sequence * seq, short adrcode, float *ymin, float *ymax);
|
void (*store_icu_yrange)(struct Sequence *seq, short adrcode, float *ymin, float *ymax);
|
||||||
|
|
||||||
/* stores the default facf0 and facf1 if no IPO is present */
|
/* stores the default facf0 and facf1 if no IPO is present */
|
||||||
void (*get_default_fac)(struct Sequence *seq, float cfra, float * facf0, float * facf1);
|
void (*get_default_fac)(struct Sequence *seq, float cfra, float *facf0, float *facf1);
|
||||||
|
|
||||||
/* execute the effect
|
/* execute the effect
|
||||||
* sequence effects are only required to either support
|
* sequence effects are only required to either support
|
||||||
* float-rects or byte-rects
|
* float-rects or byte-rects
|
||||||
* (mixed cases are handled one layer up...) */
|
* (mixed cases are handled one layer up...) */
|
||||||
|
|
||||||
struct ImBuf* (*execute)(
|
struct ImBuf * (*execute)(SeqRenderData context,
|
||||||
SeqRenderData context,
|
struct Sequence *seq, float cfra,
|
||||||
struct Sequence *seq, float cfra,
|
float facf0, float facf1,
|
||||||
float facf0, float facf1,
|
struct ImBuf *ibuf1, struct ImBuf *ibuf2,
|
||||||
struct ImBuf *ibuf1, struct ImBuf *ibuf2,
|
struct ImBuf *ibuf3);
|
||||||
struct ImBuf *ibuf3);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ********************* prototypes *************** */
|
/* ********************* prototypes *************** */
|
||||||
@@ -200,9 +199,9 @@ void seq_free_clipboard(void);
|
|||||||
const char *give_seqname(struct Sequence *seq);
|
const char *give_seqname(struct Sequence *seq);
|
||||||
void calc_sequence(struct Scene *scene, struct Sequence *seq);
|
void calc_sequence(struct Scene *scene, struct Sequence *seq);
|
||||||
void calc_sequence_disp(struct Scene *scene, struct Sequence *seq);
|
void calc_sequence_disp(struct Scene *scene, struct Sequence *seq);
|
||||||
void reload_sequence_new_file(struct Scene *scene, struct Sequence * seq, int lock_range);
|
void reload_sequence_new_file(struct Scene *scene, struct Sequence *seq, int lock_range);
|
||||||
void build_seqar_cb(struct ListBase *seqbase, struct Sequence ***seqar, int *totseq,
|
void build_seqar_cb(struct ListBase *seqbase, struct Sequence ***seqar, int *totseq,
|
||||||
int (*test_func)(struct Sequence * seq));
|
int (*test_func)(struct Sequence *seq));
|
||||||
int evaluate_seq_frame(struct Scene *scene, int cfra);
|
int evaluate_seq_frame(struct Scene *scene, int cfra);
|
||||||
struct StripElem *give_stripelem(struct Sequence *seq, int cfra);
|
struct StripElem *give_stripelem(struct Sequence *seq, int cfra);
|
||||||
|
|
||||||
@@ -211,7 +210,7 @@ void printf_strip(struct Sequence *seq); // debugging function (unused)
|
|||||||
void update_changed_seq_and_deps(struct Scene *scene, struct Sequence *changed_seq, int len_change, int ibuf_change);
|
void update_changed_seq_and_deps(struct Scene *scene, struct Sequence *changed_seq, int len_change, int ibuf_change);
|
||||||
|
|
||||||
int input_have_to_preprocess(
|
int input_have_to_preprocess(
|
||||||
SeqRenderData context, struct Sequence * seq, float cfra);
|
SeqRenderData context, struct Sequence *seq, float cfra);
|
||||||
|
|
||||||
struct SeqIndexBuildContext *seq_proxy_rebuild_context(struct Main *bmain, struct Scene *scene, struct Sequence *seq);
|
struct SeqIndexBuildContext *seq_proxy_rebuild_context(struct Main *bmain, struct Scene *scene, struct Sequence *seq);
|
||||||
void seq_proxy_rebuild(struct SeqIndexBuildContext *context,
|
void seq_proxy_rebuild(struct SeqIndexBuildContext *context,
|
||||||
@@ -236,18 +235,16 @@ void seq_stripelem_cache_destruct(void);
|
|||||||
void seq_stripelem_cache_cleanup(void);
|
void seq_stripelem_cache_cleanup(void);
|
||||||
|
|
||||||
/* returned ImBuf is properly refed and has to be freed */
|
/* returned ImBuf is properly refed and has to be freed */
|
||||||
struct ImBuf * seq_stripelem_cache_get(
|
struct ImBuf *seq_stripelem_cache_get(SeqRenderData context, struct Sequence *seq,
|
||||||
SeqRenderData context, struct Sequence * seq,
|
float cfra, seq_stripelem_ibuf_t type);
|
||||||
float cfra, seq_stripelem_ibuf_t type);
|
|
||||||
|
|
||||||
/* passed ImBuf is properly refed, so ownership is *not*
|
/* passed ImBuf is properly refed, so ownership is *not*
|
||||||
* transfered to the cache.
|
* transfered to the cache.
|
||||||
* you can pass the same ImBuf multiple times to the cache without problems.
|
* you can pass the same ImBuf multiple times to the cache without problems.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void seq_stripelem_cache_put(
|
void seq_stripelem_cache_put(SeqRenderData context, struct Sequence *seq,
|
||||||
SeqRenderData context, struct Sequence * seq,
|
float cfra, seq_stripelem_ibuf_t type, struct ImBuf *nval);
|
||||||
float cfra, seq_stripelem_ibuf_t type, struct ImBuf * nval);
|
|
||||||
|
|
||||||
/* **********************************************************************
|
/* **********************************************************************
|
||||||
* seqeffects.c
|
* seqeffects.c
|
||||||
@@ -278,29 +275,28 @@ int seq_tx_get_final_right(struct Sequence *seq, int metaclip);
|
|||||||
void seq_tx_set_final_left(struct Sequence *seq, int val);
|
void seq_tx_set_final_left(struct Sequence *seq, int val);
|
||||||
void seq_tx_set_final_right(struct Sequence *seq, int val);
|
void seq_tx_set_final_right(struct Sequence *seq, int val);
|
||||||
void seq_tx_handle_xlimits(struct Sequence *seq, int leftflag, int rightflag);
|
void seq_tx_handle_xlimits(struct Sequence *seq, int leftflag, int rightflag);
|
||||||
int seq_tx_test(struct Sequence * seq);
|
int seq_tx_test(struct Sequence *seq);
|
||||||
int seq_single_check(struct Sequence *seq);
|
int seq_single_check(struct Sequence *seq);
|
||||||
void seq_single_fix(struct Sequence *seq);
|
void seq_single_fix(struct Sequence *seq);
|
||||||
int seq_test_overlap(struct ListBase * seqbasep, struct Sequence *test);
|
int seq_test_overlap(struct ListBase *seqbasep, struct Sequence *test);
|
||||||
void seq_translate(struct Scene *scene, struct Sequence *seq, int delta);
|
void seq_translate(struct Scene *scene, struct Sequence *seq, int delta);
|
||||||
void seq_sound_init(struct Scene *scene, struct Sequence *seq);
|
void seq_sound_init(struct Scene *scene, struct Sequence *seq);
|
||||||
struct Sequence *seq_foreground_frame_get(struct Scene *scene, int frame);
|
struct Sequence *seq_foreground_frame_get(struct Scene *scene, int frame);
|
||||||
struct ListBase *seq_seqbase(struct ListBase *seqbase, struct Sequence *seq);
|
struct ListBase *seq_seqbase(struct ListBase *seqbase, struct Sequence *seq);
|
||||||
struct Sequence *seq_metastrip(
|
struct Sequence *seq_metastrip(ListBase *seqbase /* = ed->seqbase */,
|
||||||
ListBase * seqbase /* = ed->seqbase */,
|
struct Sequence *meta /* = NULL */, struct Sequence *seq);
|
||||||
struct Sequence * meta /* = NULL */, struct Sequence *seq);
|
|
||||||
|
|
||||||
void seq_offset_animdata(struct Scene *scene, struct Sequence *seq, int ofs);
|
void seq_offset_animdata(struct Scene *scene, struct Sequence *seq, int ofs);
|
||||||
void seq_dupe_animdata(struct Scene *scene, const char *name_src, const char *name_dst);
|
void seq_dupe_animdata(struct Scene *scene, const char *name_src, const char *name_dst);
|
||||||
int shuffle_seq(struct ListBase * seqbasep, struct Sequence *test, struct Scene *evil_scene);
|
int shuffle_seq(struct ListBase *seqbasep, struct Sequence *test, struct Scene *evil_scene);
|
||||||
int shuffle_seq_time(ListBase * seqbasep, struct Scene *evil_scene);
|
int shuffle_seq_time(ListBase *seqbasep, struct Scene *evil_scene);
|
||||||
int seqbase_isolated_sel_check(struct ListBase *seqbase);
|
int seqbase_isolated_sel_check(struct ListBase *seqbase);
|
||||||
void free_imbuf_seq(struct Scene *scene, struct ListBase * seqbasep, int check_mem_usage, int keep_file_handles);
|
void free_imbuf_seq(struct Scene *scene, struct ListBase *seqbasep, int check_mem_usage, int keep_file_handles);
|
||||||
struct Sequence *seq_dupli_recursive(struct Scene *scene, struct Scene *scene_to, struct Sequence * seq, int dupe_flag);
|
struct Sequence *seq_dupli_recursive(struct Scene *scene, struct Scene *scene_to, struct Sequence *seq, int dupe_flag);
|
||||||
int seq_swap(struct Sequence *seq_a, struct Sequence *seq_b, const char **error_str);
|
int seq_swap(struct Sequence *seq_a, struct Sequence *seq_b, const char **error_str);
|
||||||
|
|
||||||
void seq_update_sound_bounds_all(struct Scene *scene);
|
void seq_update_sound_bounds_all(struct Scene *scene);
|
||||||
void seq_update_sound_bounds(struct Scene* scene, struct Sequence *seq);
|
void seq_update_sound_bounds(struct Scene *scene, struct Sequence *seq);
|
||||||
void seq_update_muting(struct Editing *ed);
|
void seq_update_muting(struct Editing *ed);
|
||||||
void seq_update_sound(struct Scene *scene, struct bSound *sound);
|
void seq_update_sound(struct Scene *scene, struct bSound *sound);
|
||||||
void seqbase_unique_name_recursive(ListBase *seqbasep, struct Sequence *seq);
|
void seqbase_unique_name_recursive(ListBase *seqbasep, struct Sequence *seq);
|
||||||
@@ -315,27 +311,27 @@ typedef struct SeqLoadInfo {
|
|||||||
int start_frame;
|
int start_frame;
|
||||||
int end_frame;
|
int end_frame;
|
||||||
int channel;
|
int channel;
|
||||||
int flag; /* use sound, replace sel */
|
int flag; /* use sound, replace sel */
|
||||||
int type;
|
int type;
|
||||||
int tot_success;
|
int tot_success;
|
||||||
int tot_error;
|
int tot_error;
|
||||||
int len; /* only for image strips */
|
int len; /* only for image strips */
|
||||||
char path[512];
|
char path[512];
|
||||||
char name[64];
|
char name[64];
|
||||||
} SeqLoadInfo;
|
} SeqLoadInfo;
|
||||||
|
|
||||||
/* SeqLoadInfo.flag */
|
/* SeqLoadInfo.flag */
|
||||||
#define SEQ_LOAD_REPLACE_SEL (1<<0)
|
#define SEQ_LOAD_REPLACE_SEL (1 << 0)
|
||||||
#define SEQ_LOAD_FRAME_ADVANCE (1<<1)
|
#define SEQ_LOAD_FRAME_ADVANCE (1 << 1)
|
||||||
#define SEQ_LOAD_MOVIE_SOUND (1<<2)
|
#define SEQ_LOAD_MOVIE_SOUND (1 << 2)
|
||||||
#define SEQ_LOAD_SOUND_CACHE (1<<3)
|
#define SEQ_LOAD_SOUND_CACHE (1 << 3)
|
||||||
|
|
||||||
|
|
||||||
/* seq_dupli' flags */
|
/* seq_dupli' flags */
|
||||||
#define SEQ_DUPE_UNIQUE_NAME (1<<0)
|
#define SEQ_DUPE_UNIQUE_NAME (1 << 0)
|
||||||
#define SEQ_DUPE_CONTEXT (1<<1)
|
#define SEQ_DUPE_CONTEXT (1 << 1)
|
||||||
#define SEQ_DUPE_ANIM (1<<2)
|
#define SEQ_DUPE_ANIM (1 << 2)
|
||||||
#define SEQ_DUPE_ALL (1<<3) /* otherwise only selected are copied */
|
#define SEQ_DUPE_ALL (1 << 3) /* otherwise only selected are copied */
|
||||||
|
|
||||||
/* use as an api function */
|
/* use as an api function */
|
||||||
typedef struct Sequence *(*SeqLoadFunc)(struct bContext *, ListBase *, struct SeqLoadInfo *);
|
typedef struct Sequence *(*SeqLoadFunc)(struct bContext *, ListBase *, struct SeqLoadInfo *);
|
||||||
|
@@ -65,8 +65,7 @@ struct DerivedMesh *object_get_derived_final(struct Object *ob);
|
|||||||
*/
|
*/
|
||||||
struct Object;
|
struct Object;
|
||||||
|
|
||||||
typedef struct SpaceTransform
|
typedef struct SpaceTransform {
|
||||||
{
|
|
||||||
float local2target[4][4];
|
float local2target[4][4];
|
||||||
float target2local[4][4];
|
float target2local[4][4];
|
||||||
|
|
||||||
@@ -103,23 +102,22 @@ struct MDeformVert;
|
|||||||
struct BVHTree;
|
struct BVHTree;
|
||||||
|
|
||||||
|
|
||||||
typedef struct ShrinkwrapCalcData
|
typedef struct ShrinkwrapCalcData {
|
||||||
{
|
ShrinkwrapModifierData *smd; //shrinkwrap modifier data
|
||||||
ShrinkwrapModifierData *smd; //shrinkwrap modifier data
|
|
||||||
|
|
||||||
struct Object *ob; //object we are applying shrinkwrap to
|
struct Object *ob; //object we are applying shrinkwrap to
|
||||||
|
|
||||||
struct MVert *vert; //Array of verts being projected (to fetch normals or other data)
|
struct MVert *vert; //Array of verts being projected (to fetch normals or other data)
|
||||||
float (*vertexCos)[3]; //vertexs being shrinkwraped
|
float (*vertexCos)[3]; //vertexs being shrinkwraped
|
||||||
int numVerts;
|
int numVerts;
|
||||||
|
|
||||||
struct MDeformVert* dvert; //Pointer to mdeform array
|
struct MDeformVert *dvert; //Pointer to mdeform array
|
||||||
int vgroup; //Vertex group num
|
int vgroup; //Vertex group num
|
||||||
|
|
||||||
struct DerivedMesh *target; //mesh we are shrinking to
|
struct DerivedMesh *target; //mesh we are shrinking to
|
||||||
SpaceTransform local2target; //transform to move between local and target space
|
SpaceTransform local2target; //transform to move between local and target space
|
||||||
|
|
||||||
float keepDist; //Distance to keep above target surface (units are in local space)
|
float keepDist; //Distance to keep above target surface (units are in local space)
|
||||||
|
|
||||||
} ShrinkwrapCalcData;
|
} ShrinkwrapCalcData;
|
||||||
|
|
||||||
@@ -139,10 +137,10 @@ int normal_projection_project_vertex(char options, const float *vert, const floa
|
|||||||
/*
|
/*
|
||||||
* NULL initializers to local data
|
* NULL initializers to local data
|
||||||
*/
|
*/
|
||||||
#define NULL_ShrinkwrapCalcData {NULL, }
|
#define NULL_ShrinkwrapCalcData {NULL, }
|
||||||
#define NULL_BVHTreeFromMesh {NULL, }
|
#define NULL_BVHTreeFromMesh {NULL, }
|
||||||
#define NULL_BVHTreeRayHit {NULL, }
|
#define NULL_BVHTreeRayHit {NULL, }
|
||||||
#define NULL_BVHTreeNearest {0, }
|
#define NULL_BVHTreeNearest {0, }
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -38,8 +38,7 @@ typedef enum SK_PMode
|
|||||||
PT_PROJECT,
|
PT_PROJECT,
|
||||||
} SK_PMode;
|
} SK_PMode;
|
||||||
|
|
||||||
typedef struct SK_Point
|
typedef struct SK_Point {
|
||||||
{
|
|
||||||
float p[3];
|
float p[3];
|
||||||
short p2d[2];
|
short p2d[2];
|
||||||
float no[3];
|
float no[3];
|
||||||
@@ -48,8 +47,7 @@ typedef struct SK_Point
|
|||||||
SK_PMode mode;
|
SK_PMode mode;
|
||||||
} SK_Point;
|
} SK_Point;
|
||||||
|
|
||||||
typedef struct SK_Stroke
|
typedef struct SK_Stroke {
|
||||||
{
|
|
||||||
struct SK_Stroke *next, *prev;
|
struct SK_Stroke *next, *prev;
|
||||||
|
|
||||||
SK_Point *points;
|
SK_Point *points;
|
||||||
@@ -58,68 +56,64 @@ typedef struct SK_Stroke
|
|||||||
int selected;
|
int selected;
|
||||||
} SK_Stroke;
|
} SK_Stroke;
|
||||||
|
|
||||||
#define SK_OVERDRAW_LIMIT 5
|
#define SK_OVERDRAW_LIMIT 5
|
||||||
|
|
||||||
typedef struct SK_Overdraw
|
typedef struct SK_Overdraw {
|
||||||
{
|
|
||||||
SK_Stroke *target;
|
SK_Stroke *target;
|
||||||
int start, end;
|
int start, end;
|
||||||
int count;
|
int count;
|
||||||
} SK_Overdraw;
|
} SK_Overdraw;
|
||||||
|
|
||||||
#define SK_Stroke_BUFFER_INIT_SIZE 20
|
#define SK_Stroke_BUFFER_INIT_SIZE 20
|
||||||
|
|
||||||
typedef struct SK_DrawData
|
typedef struct SK_DrawData {
|
||||||
{
|
|
||||||
int mval[2];
|
int mval[2];
|
||||||
int previous_mval[2];
|
int previous_mval[2];
|
||||||
SK_PType type;
|
SK_PType type;
|
||||||
} SK_DrawData;
|
} SK_DrawData;
|
||||||
|
|
||||||
typedef struct SK_Intersection
|
typedef struct SK_Intersection {
|
||||||
{
|
|
||||||
struct SK_Intersection *next, *prev;
|
struct SK_Intersection *next, *prev;
|
||||||
SK_Stroke *stroke;
|
SK_Stroke *stroke;
|
||||||
int before;
|
int before;
|
||||||
int after;
|
int after;
|
||||||
int gesture_index;
|
int gesture_index;
|
||||||
float p[3];
|
float p[3];
|
||||||
float lambda; /* used for sorting intersection points */
|
float lambda; /* used for sorting intersection points */
|
||||||
} SK_Intersection;
|
} SK_Intersection;
|
||||||
|
|
||||||
typedef struct SK_Sketch
|
typedef struct SK_Sketch {
|
||||||
{
|
ListBase strokes;
|
||||||
ListBase strokes;
|
ListBase depth_peels;
|
||||||
ListBase depth_peels;
|
SK_Stroke *active_stroke;
|
||||||
SK_Stroke *active_stroke;
|
SK_Stroke *gesture;
|
||||||
SK_Stroke *gesture;
|
SK_Point next_point;
|
||||||
SK_Point next_point;
|
|
||||||
SK_Overdraw over;
|
SK_Overdraw over;
|
||||||
} SK_Sketch;
|
} SK_Sketch;
|
||||||
|
|
||||||
|
|
||||||
typedef struct SK_Gesture {
|
typedef struct SK_Gesture {
|
||||||
SK_Stroke *stk;
|
SK_Stroke *stk;
|
||||||
SK_Stroke *segments;
|
SK_Stroke *segments;
|
||||||
|
|
||||||
ListBase intersections;
|
ListBase intersections;
|
||||||
ListBase self_intersections;
|
ListBase self_intersections;
|
||||||
|
|
||||||
int nb_self_intersections;
|
int nb_self_intersections;
|
||||||
int nb_intersections;
|
int nb_intersections;
|
||||||
int nb_segments;
|
int nb_segments;
|
||||||
} SK_Gesture;
|
} SK_Gesture;
|
||||||
|
|
||||||
|
|
||||||
/************************************************/
|
/************************************************/
|
||||||
|
|
||||||
void freeSketch(SK_Sketch *sketch);
|
void freeSketch(SK_Sketch *sketch);
|
||||||
SK_Sketch* createSketch(void);
|
SK_Sketch *createSketch(void);
|
||||||
|
|
||||||
void sk_removeStroke(SK_Sketch *sketch, SK_Stroke *stk);
|
void sk_removeStroke(SK_Sketch *sketch, SK_Stroke *stk);
|
||||||
|
|
||||||
void sk_freeStroke(SK_Stroke *stk);
|
void sk_freeStroke(SK_Stroke *stk);
|
||||||
SK_Stroke* sk_createStroke(void);
|
SK_Stroke *sk_createStroke(void);
|
||||||
|
|
||||||
SK_Point *sk_lastStrokePoint(SK_Stroke *stk);
|
SK_Point *sk_lastStrokePoint(SK_Stroke *stk);
|
||||||
|
|
||||||
@@ -134,7 +128,7 @@ void sk_appendStrokePoint(SK_Stroke *stk, SK_Point *pt);
|
|||||||
void sk_insertStrokePoints(SK_Stroke *stk, SK_Point *pts, int len, int start, int end);
|
void sk_insertStrokePoints(SK_Stroke *stk, SK_Point *pts, int len, int start, int end);
|
||||||
|
|
||||||
void sk_trimStroke(SK_Stroke *stk, int start, int end);
|
void sk_trimStroke(SK_Stroke *stk, int start, int end);
|
||||||
void sk_straightenStroke(SK_Stroke *stk, int start, int end, float p_start[3], float p_end[3]);
|
void sk_straightenStroke(SK_Stroke * stk, int start, int end, float p_start[3], float p_end[3]);
|
||||||
void sk_polygonizeStroke(SK_Stroke *stk, int start, int end);
|
void sk_polygonizeStroke(SK_Stroke *stk, int start, int end);
|
||||||
void sk_flattenStroke(SK_Stroke *stk, int start, int end);
|
void sk_flattenStroke(SK_Stroke *stk, int start, int end);
|
||||||
void sk_reverseStroke(SK_Stroke *stk);
|
void sk_reverseStroke(SK_Stroke *stk);
|
||||||
|
@@ -33,11 +33,11 @@
|
|||||||
* \author Daniel Genrich
|
* \author Daniel Genrich
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typedef float (*bresenham_callback) (float *result, float *input, int res[3], int *pixel, float *tRay, float correct);
|
typedef float (*bresenham_callback)(float *result, float *input, int res[3], int *pixel, float *tRay, float correct);
|
||||||
|
|
||||||
void smokeModifier_do(struct SmokeModifierData *smd, struct Scene *scene, struct Object *ob, struct DerivedMesh *dm);
|
void smokeModifier_do(struct SmokeModifierData *smd, struct Scene *scene, struct Object *ob, struct DerivedMesh *dm);
|
||||||
|
|
||||||
void smokeModifier_free (struct SmokeModifierData *smd);
|
void smokeModifier_free(struct SmokeModifierData *smd);
|
||||||
void smokeModifier_reset(struct SmokeModifierData *smd);
|
void smokeModifier_reset(struct SmokeModifierData *smd);
|
||||||
void smokeModifier_reset_turbulence(struct SmokeModifierData *smd);
|
void smokeModifier_reset_turbulence(struct SmokeModifierData *smd);
|
||||||
void smokeModifier_createType(struct SmokeModifierData *smd);
|
void smokeModifier_createType(struct SmokeModifierData *smd);
|
||||||
|
@@ -50,25 +50,25 @@ typedef struct BodyPoint {
|
|||||||
} BodyPoint;
|
} BodyPoint;
|
||||||
|
|
||||||
/* allocates and initializes general main data */
|
/* allocates and initializes general main data */
|
||||||
extern struct SoftBody *sbNew(struct Scene *scene);
|
extern struct SoftBody *sbNew(struct Scene *scene);
|
||||||
|
|
||||||
/* frees internal data and softbody itself */
|
/* frees internal data and softbody itself */
|
||||||
extern void sbFree(struct SoftBody *sb);
|
extern void sbFree(struct SoftBody *sb);
|
||||||
|
|
||||||
/* frees simulation data to reset simulation */
|
/* frees simulation data to reset simulation */
|
||||||
extern void sbFreeSimulation(struct SoftBody *sb);
|
extern void sbFreeSimulation(struct SoftBody *sb);
|
||||||
|
|
||||||
/* do one simul step, reading and writing vertex locs from given array */
|
/* do one simul step, reading and writing vertex locs from given array */
|
||||||
extern void sbObjectStep(struct Scene *scene, struct Object *ob, float framnr, float (*vertexCos)[3], int numVerts);
|
extern void sbObjectStep(struct Scene *scene, struct Object *ob, float framnr, float (*vertexCos)[3], int numVerts);
|
||||||
|
|
||||||
/* makes totally fresh start situation, resets time */
|
/* makes totally fresh start situation, resets time */
|
||||||
extern void sbObjectToSoftbody(struct Object *ob);
|
extern void sbObjectToSoftbody(struct Object *ob);
|
||||||
|
|
||||||
/* links the softbody module to a 'test for Interrupt' function */
|
/* links the softbody module to a 'test for Interrupt' function */
|
||||||
/* pass NULL to unlink again */
|
/* pass NULL to unlink again */
|
||||||
extern void sbSetInterruptCallBack(int (*f)(void));
|
extern void sbSetInterruptCallBack(int (*f)(void));
|
||||||
|
|
||||||
extern void SB_estimate_transform(Object *ob, float lloc[3], float lrot[3][3], float lscale[3][3]);
|
extern void SB_estimate_transform(Object * ob, float lloc[3], float lrot[3][3], float lscale[3][3]);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -64,10 +64,10 @@ typedef enum {
|
|||||||
} SubsurfFlags;
|
} SubsurfFlags;
|
||||||
|
|
||||||
struct DerivedMesh *subsurf_make_derived_from_derived(
|
struct DerivedMesh *subsurf_make_derived_from_derived(
|
||||||
struct DerivedMesh *dm,
|
struct DerivedMesh *dm,
|
||||||
struct SubsurfModifierData *smd,
|
struct SubsurfModifierData *smd,
|
||||||
float (*vertCos)[3],
|
float (*vertCos)[3],
|
||||||
SubsurfFlags flags);
|
SubsurfFlags flags);
|
||||||
|
|
||||||
void subsurf_calculate_limit_positions(struct Mesh *me, float (*positions_r)[3]);
|
void subsurf_calculate_limit_positions(struct Mesh *me, float (*positions_r)[3]);
|
||||||
|
|
||||||
@@ -107,7 +107,7 @@ typedef struct CCGDerivedMesh {
|
|||||||
struct {int startVert; struct CCGVert *vert; } *vertMap;
|
struct {int startVert; struct CCGVert *vert; } *vertMap;
|
||||||
struct {int startVert; int startEdge; struct CCGEdge *edge; } *edgeMap;
|
struct {int startVert; int startEdge; struct CCGEdge *edge; } *edgeMap;
|
||||||
struct {int startVert; int startEdge;
|
struct {int startVert; int startEdge;
|
||||||
int startFace; struct CCGFace *face; } *faceMap;
|
int startFace; struct CCGFace *face; } *faceMap;
|
||||||
|
|
||||||
short *edgeFlags;
|
short *edgeFlags;
|
||||||
struct DMFlagMat *faceFlags;
|
struct DMFlagMat *faceFlags;
|
||||||
|
@@ -93,8 +93,8 @@ struct Tex *give_current_particle_texture(struct ParticleSettings *part);
|
|||||||
|
|
||||||
struct bNode *give_current_material_texture_node(struct Material *ma);
|
struct bNode *give_current_material_texture_node(struct Material *ma);
|
||||||
|
|
||||||
int give_active_mtex(struct ID *id, struct MTex ***mtex_ar, short *act);
|
int give_active_mtex(struct ID *id, struct MTex ***mtex_ar, short *act);
|
||||||
void set_active_mtex(struct ID *id, short act);
|
void set_active_mtex(struct ID *id, short act);
|
||||||
|
|
||||||
void set_current_brush_texture(struct Brush *br, struct Tex *tex);
|
void set_current_brush_texture(struct Brush *br, struct Tex *tex);
|
||||||
void set_current_world_texture(struct World *wo, struct Tex *tex);
|
void set_current_world_texture(struct World *wo, struct Tex *tex);
|
||||||
|
@@ -34,10 +34,10 @@ extern "C" {
|
|||||||
/* in all cases the value is assumed to be scaled by the user preference */
|
/* in all cases the value is assumed to be scaled by the user preference */
|
||||||
|
|
||||||
/* humanly readable representation of a value in units (used for button drawing) */
|
/* humanly readable representation of a value in units (used for button drawing) */
|
||||||
void bUnit_AsString(char *str, int len_max, double value, int prec, int system, int type, int split, int pad);
|
void bUnit_AsString(char *str, int len_max, double value, int prec, int system, int type, int split, int pad);
|
||||||
|
|
||||||
/* replace units with values, used before python button evaluation */
|
/* replace units with values, used before python button evaluation */
|
||||||
int bUnit_ReplaceString(char *str, int len_max, const char *str_prev, double scale_pref, int system, int type);
|
int bUnit_ReplaceString(char *str, int len_max, const char *str_prev, double scale_pref, int system, int type);
|
||||||
|
|
||||||
/* make string keyboard-friendly: 10µm --> 10um */
|
/* make string keyboard-friendly: 10µm --> 10um */
|
||||||
void bUnit_ToUnitAltName(char *str, int len_max, const char *orig_str, int system, int type);
|
void bUnit_ToUnitAltName(char *str, int len_max, const char *orig_str, int system, int type);
|
||||||
@@ -54,23 +54,23 @@ int bUnit_IsValid(int system, int type);
|
|||||||
/* loop over scales, coudl add names later */
|
/* loop over scales, coudl add names later */
|
||||||
//double bUnit_Iter(void **unit, char **name, int system, int type);
|
//double bUnit_Iter(void **unit, char **name, int system, int type);
|
||||||
|
|
||||||
void bUnit_GetSystem(void **usys_pt, int *len, int system, int type);
|
void bUnit_GetSystem(void **usys_pt, int *len, int system, int type);
|
||||||
int bUnit_GetBaseUnit(void *usys_pt);
|
int bUnit_GetBaseUnit(void *usys_pt);
|
||||||
const char* bUnit_GetName(void *usys_pt, int index);
|
const char *bUnit_GetName(void *usys_pt, int index);
|
||||||
const char* bUnit_GetNameDisplay(void *usys_pt, int index);
|
const char *bUnit_GetNameDisplay(void *usys_pt, int index);
|
||||||
double bUnit_GetScaler(void *usys_pt, int index);
|
double bUnit_GetScaler(void *usys_pt, int index);
|
||||||
|
|
||||||
/* aligned with PropertyUnit */
|
/* aligned with PropertyUnit */
|
||||||
#define B_UNIT_NONE 0
|
#define B_UNIT_NONE 0
|
||||||
#define B_UNIT_LENGTH 1
|
#define B_UNIT_LENGTH 1
|
||||||
#define B_UNIT_AREA 2
|
#define B_UNIT_AREA 2
|
||||||
#define B_UNIT_VOLUME 3
|
#define B_UNIT_VOLUME 3
|
||||||
#define B_UNIT_MASS 4
|
#define B_UNIT_MASS 4
|
||||||
#define B_UNIT_ROTATION 5
|
#define B_UNIT_ROTATION 5
|
||||||
#define B_UNIT_TIME 6
|
#define B_UNIT_TIME 6
|
||||||
#define B_UNIT_VELOCITY 7
|
#define B_UNIT_VELOCITY 7
|
||||||
#define B_UNIT_ACCELERATION 8
|
#define B_UNIT_ACCELERATION 8
|
||||||
#define B_UNIT_TYPE_TOT 9
|
#define B_UNIT_TYPE_TOT 9
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@@ -42,9 +42,9 @@ extern "C" {
|
|||||||
/* these values need to be hardcoded in structs, dna does not recognize defines */
|
/* these values need to be hardcoded in structs, dna does not recognize defines */
|
||||||
/* also defined in DNA_space_types.h */
|
/* also defined in DNA_space_types.h */
|
||||||
#ifndef FILE_MAXDIR
|
#ifndef FILE_MAXDIR
|
||||||
#define FILE_MAXDIR 768
|
#define FILE_MAXDIR 768
|
||||||
#define FILE_MAXFILE 256
|
#define FILE_MAXFILE 256
|
||||||
#define FILE_MAX 1024
|
#define FILE_MAX 1024
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* this weirdo pops up in two places ... */
|
/* this weirdo pops up in two places ... */
|
||||||
@@ -56,33 +56,31 @@ extern "C" {
|
|||||||
|
|
||||||
/* INTEGER CODES */
|
/* INTEGER CODES */
|
||||||
#ifdef __BIG_ENDIAN__
|
#ifdef __BIG_ENDIAN__
|
||||||
/* Big Endian */
|
/* Big Endian */
|
||||||
# define MAKE_ID(a,b,c,d) ( (int)(a)<<24 | (int)(b)<<16 | (c)<<8 | (d) )
|
# define MAKE_ID(a, b, c, d) ( (int)(a) << 24 | (int)(b) << 16 | (c) << 8 | (d) )
|
||||||
#else
|
#else
|
||||||
/* Little Endian */
|
/* Little Endian */
|
||||||
# define MAKE_ID(a,b,c,d) ( (int)(d)<<24 | (int)(c)<<16 | (b)<<8 | (a) )
|
# define MAKE_ID(a, b, c, d) ( (int)(d) << 24 | (int)(c) << 16 | (b) << 8 | (a) )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ID_NEW(a) if( (a) && (a)->id.newid ) (a)= (void *)(a)->id.newid
|
#define DATA MAKE_ID('D', 'A', 'T', 'A')
|
||||||
|
#define GLOB MAKE_ID('G', 'L', 'O', 'B')
|
||||||
|
|
||||||
#define DATA MAKE_ID('D','A','T','A')
|
#define DNA1 MAKE_ID('D', 'N', 'A', '1')
|
||||||
#define GLOB MAKE_ID('G','L','O','B')
|
#define TEST MAKE_ID('T', 'E', 'S', 'T') /* used as preview between 'REND' and 'GLOB' */
|
||||||
|
#define REND MAKE_ID('R', 'E', 'N', 'D')
|
||||||
|
#define USER MAKE_ID('U', 'S', 'E', 'R')
|
||||||
|
|
||||||
#define DNA1 MAKE_ID('D','N','A','1')
|
#define ENDB MAKE_ID('E', 'N', 'D', 'B')
|
||||||
#define TEST MAKE_ID('T','E','S','T') /* used as preview between 'REND' and 'GLOB' */
|
|
||||||
#define REND MAKE_ID('R','E','N','D')
|
|
||||||
#define USER MAKE_ID('U','S','E','R')
|
|
||||||
|
|
||||||
#define ENDB MAKE_ID('E','N','D','B')
|
|
||||||
|
|
||||||
/* Bit operations */
|
/* Bit operations */
|
||||||
#define BTST(a,b) ( ( (a) & 1<<(b) )!=0 )
|
#define BTST(a, b) ( ( (a) & 1 << (b) ) != 0)
|
||||||
#define BNTST(a,b) ( ( (a) & 1<<(b) )==0 )
|
#define BNTST(a, b) ( ( (a) & 1 << (b) ) == 0)
|
||||||
#define BTST2(a,b,c) ( BTST( (a), (b) ) || BTST( (a), (c) ) )
|
#define BTST2(a, b, c) (BTST( (a), (b) ) || BTST( (a), (c) ) )
|
||||||
#define BSET(a,b) ( (a) | 1<<(b) )
|
#define BSET(a, b) ( (a) | 1 << (b) )
|
||||||
#define BCLR(a,b) ( (a) & ~(1<<(b)) )
|
#define BCLR(a, b) ( (a) & ~(1 << (b)) )
|
||||||
/* bit-row */
|
/* bit-row */
|
||||||
#define BROW(min, max) (((max)>=31? 0xFFFFFFFF: (1<<(max+1))-1) - ((min)? ((1<<(min))-1):0) )
|
#define BROW(min, max) (((max) >= 31 ? 0xFFFFFFFF : (1 << (max + 1)) - 1) - ((min) ? ((1 << (min)) - 1) : 0) )
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@@ -38,12 +38,12 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define FFMPEG_MPEG1 0
|
#define FFMPEG_MPEG1 0
|
||||||
#define FFMPEG_MPEG2 1
|
#define FFMPEG_MPEG2 1
|
||||||
#define FFMPEG_MPEG4 2
|
#define FFMPEG_MPEG4 2
|
||||||
#define FFMPEG_AVI 3
|
#define FFMPEG_AVI 3
|
||||||
#define FFMPEG_MOV 4
|
#define FFMPEG_MOV 4
|
||||||
#define FFMPEG_DV 5
|
#define FFMPEG_DV 5
|
||||||
#define FFMPEG_H264 6
|
#define FFMPEG_H264 6
|
||||||
#define FFMPEG_XVID 7
|
#define FFMPEG_XVID 7
|
||||||
#define FFMPEG_FLV 8
|
#define FFMPEG_FLV 8
|
||||||
@@ -52,14 +52,14 @@ extern "C" {
|
|||||||
#define FFMPEG_WAV 11
|
#define FFMPEG_WAV 11
|
||||||
#define FFMPEG_MP3 12
|
#define FFMPEG_MP3 12
|
||||||
|
|
||||||
#define FFMPEG_PRESET_NONE 0
|
#define FFMPEG_PRESET_NONE 0
|
||||||
#define FFMPEG_PRESET_DVD 1
|
#define FFMPEG_PRESET_DVD 1
|
||||||
#define FFMPEG_PRESET_SVCD 2
|
#define FFMPEG_PRESET_SVCD 2
|
||||||
#define FFMPEG_PRESET_VCD 3
|
#define FFMPEG_PRESET_VCD 3
|
||||||
#define FFMPEG_PRESET_DV 4
|
#define FFMPEG_PRESET_DV 4
|
||||||
#define FFMPEG_PRESET_H264 5
|
#define FFMPEG_PRESET_H264 5
|
||||||
#define FFMPEG_PRESET_THEORA 6
|
#define FFMPEG_PRESET_THEORA 6
|
||||||
#define FFMPEG_PRESET_XVID 7
|
#define FFMPEG_PRESET_XVID 7
|
||||||
|
|
||||||
struct IDProperty;
|
struct IDProperty;
|
||||||
struct RenderData;
|
struct RenderData;
|
||||||
@@ -69,8 +69,8 @@ struct Scene;
|
|||||||
int BKE_ffmpeg_start(struct Scene *scene, struct RenderData *rd, int rectx, int recty, struct ReportList *reports);
|
int BKE_ffmpeg_start(struct Scene *scene, struct RenderData *rd, int rectx, int recty, struct ReportList *reports);
|
||||||
void BKE_ffmpeg_end(void);
|
void BKE_ffmpeg_end(void);
|
||||||
int BKE_ffmpeg_append(struct RenderData *rd, int start_frame, int frame, int *pixels,
|
int BKE_ffmpeg_append(struct RenderData *rd, int start_frame, int frame, int *pixels,
|
||||||
int rectx, int recty, struct ReportList *reports);
|
int rectx, int recty, struct ReportList *reports);
|
||||||
void BKE_ffmpeg_filepath_get(char* string, struct RenderData* rd);
|
void BKE_ffmpeg_filepath_get(char *string, struct RenderData *rd);
|
||||||
|
|
||||||
void BKE_ffmpeg_preset_set(struct RenderData *rd, int preset);
|
void BKE_ffmpeg_preset_set(struct RenderData *rd, int preset);
|
||||||
void BKE_ffmpeg_image_type_verify(struct RenderData *rd, struct ImageFormatData *imf);
|
void BKE_ffmpeg_image_type_verify(struct RenderData *rd, struct ImageFormatData *imf);
|
||||||
|
@@ -35,8 +35,8 @@
|
|||||||
#include "BKE_constraint.h"
|
#include "BKE_constraint.h"
|
||||||
|
|
||||||
|
|
||||||
#define DEPSX 5.0f
|
#define DEPSX 5.0f
|
||||||
#define DEPSY 1.8f
|
#define DEPSY 1.8f
|
||||||
|
|
||||||
#define DAGQUEUEALLOC 50
|
#define DAGQUEUEALLOC 50
|
||||||
|
|
||||||
@@ -48,33 +48,31 @@ enum {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct DagAdjList
|
typedef struct DagAdjList {
|
||||||
{
|
|
||||||
struct DagNode *node;
|
struct DagNode *node;
|
||||||
short type;
|
short type;
|
||||||
int count; // number of identical arcs
|
int count; /* number of identical arcs */
|
||||||
unsigned int lay; // for flushing redraw/rebuild events
|
unsigned int lay; // for flushing redraw/rebuild events
|
||||||
const char *name;
|
const char *name;
|
||||||
struct DagAdjList *next;
|
struct DagAdjList *next;
|
||||||
} DagAdjList;
|
} DagAdjList;
|
||||||
|
|
||||||
|
|
||||||
typedef struct DagNode
|
typedef struct DagNode {
|
||||||
{
|
|
||||||
int color;
|
int color;
|
||||||
short type;
|
short type;
|
||||||
float x, y, k;
|
float x, y, k;
|
||||||
void * ob;
|
void *ob;
|
||||||
void * first_ancestor;
|
void *first_ancestor;
|
||||||
int ancestor_count;
|
int ancestor_count;
|
||||||
unsigned int lay; // accumulated layers of its relations + itself
|
unsigned int lay; /* accumulated layers of its relations + itself */
|
||||||
unsigned int scelay; // layers due to being in scene
|
unsigned int scelay; /* layers due to being in scene */
|
||||||
uint64_t customdata_mask; // customdata mask
|
uint64_t customdata_mask; /* customdata mask */
|
||||||
int lasttime; // if lasttime != DagForest->time, this node was not evaluated yet for flushing
|
int lasttime; /* if lasttime != DagForest->time, this node was not evaluated yet for flushing */
|
||||||
int BFS_dist; // BFS distance
|
int BFS_dist; /* BFS distance */
|
||||||
int DFS_dist; // DFS distance
|
int DFS_dist; /* DFS distance */
|
||||||
int DFS_dvtm; // DFS discovery time
|
int DFS_dvtm; /* DFS discovery time */
|
||||||
int DFS_fntm; // DFS Finishing time
|
int DFS_fntm; /* DFS Finishing time */
|
||||||
struct DagAdjList *child;
|
struct DagAdjList *child;
|
||||||
struct DagAdjList *parent;
|
struct DagAdjList *parent;
|
||||||
struct DagNode *next;
|
struct DagNode *next;
|
||||||
@@ -85,8 +83,7 @@ typedef struct DagNodeQueueElem {
|
|||||||
struct DagNodeQueueElem *next;
|
struct DagNodeQueueElem *next;
|
||||||
} DagNodeQueueElem;
|
} DagNodeQueueElem;
|
||||||
|
|
||||||
typedef struct DagNodeQueue
|
typedef struct DagNodeQueue {
|
||||||
{
|
|
||||||
DagNodeQueueElem *first;
|
DagNodeQueueElem *first;
|
||||||
DagNodeQueueElem *last;
|
DagNodeQueueElem *last;
|
||||||
int count;
|
int count;
|
||||||
@@ -95,37 +92,36 @@ typedef struct DagNodeQueue
|
|||||||
} DagNodeQueue;
|
} DagNodeQueue;
|
||||||
|
|
||||||
// forest as we may have more than one DAG unnconected
|
// forest as we may have more than one DAG unnconected
|
||||||
typedef struct DagForest
|
typedef struct DagForest {
|
||||||
{
|
|
||||||
ListBase DagNode;
|
ListBase DagNode;
|
||||||
struct GHash *nodeHash;
|
struct GHash *nodeHash;
|
||||||
int numNodes;
|
int numNodes;
|
||||||
int is_acyclic;
|
int is_acyclic;
|
||||||
int time; // for flushing/tagging, compare with node->lasttime
|
int time; /* for flushing/tagging, compare with node->lasttime */
|
||||||
} DagForest;
|
} DagForest;
|
||||||
|
|
||||||
|
|
||||||
// queue operations
|
// queue operations
|
||||||
DagNodeQueue * queue_create (int slots);
|
DagNodeQueue *queue_create(int slots);
|
||||||
void queue_raz(DagNodeQueue *queue);
|
void queue_raz(DagNodeQueue *queue);
|
||||||
void push_queue(DagNodeQueue *queue, DagNode *node);
|
void push_queue(DagNodeQueue *queue, DagNode *node);
|
||||||
void push_stack(DagNodeQueue *queue, DagNode *node);
|
void push_stack(DagNodeQueue *queue, DagNode *node);
|
||||||
DagNode * pop_queue(DagNodeQueue *queue);
|
DagNode *pop_queue(DagNodeQueue *queue);
|
||||||
DagNode * get_top_node_queue(DagNodeQueue *queue);
|
DagNode *get_top_node_queue(DagNodeQueue *queue);
|
||||||
|
|
||||||
// Dag management
|
// Dag management
|
||||||
DagForest *getMainDag(void);
|
DagForest *getMainDag(void);
|
||||||
void setMainDag(DagForest *dag);
|
void setMainDag(DagForest *dag);
|
||||||
DagForest * dag_init(void);
|
DagForest *dag_init(void);
|
||||||
DagNode * dag_find_node (DagForest *forest, void * fob);
|
DagNode *dag_find_node(DagForest *forest, void *fob);
|
||||||
DagNode * dag_add_node (DagForest *forest, void * fob);
|
DagNode *dag_add_node(DagForest *forest, void *fob);
|
||||||
DagNode * dag_get_node (DagForest *forest, void * fob);
|
DagNode *dag_get_node(DagForest *forest, void *fob);
|
||||||
DagNode * dag_get_sub_node (DagForest *forest, void * fob);
|
DagNode *dag_get_sub_node(DagForest *forest, void *fob);
|
||||||
void dag_add_relation(DagForest *forest, DagNode *fob1, DagNode *fob2, short rel, const char *name);
|
void dag_add_relation(DagForest *forest, DagNode *fob1, DagNode *fob2, short rel, const char *name);
|
||||||
|
|
||||||
void graph_bfs(void);
|
void graph_bfs(void);
|
||||||
|
|
||||||
DagNodeQueue * graph_dfs(void);
|
DagNodeQueue *graph_dfs(void);
|
||||||
|
|
||||||
void set_node_xy(DagNode *node, float x, float y);
|
void set_node_xy(DagNode *node, float x, float y);
|
||||||
void graph_print_queue(DagNodeQueue *nqueue);
|
void graph_print_queue(DagNodeQueue *nqueue);
|
||||||
|
@@ -39,23 +39,23 @@
|
|||||||
typedef struct NlaEvalStrip {
|
typedef struct NlaEvalStrip {
|
||||||
struct NlaEvalStrip *next, *prev;
|
struct NlaEvalStrip *next, *prev;
|
||||||
|
|
||||||
NlaTrack *track; /* track that this strip belongs to */
|
NlaTrack *track; /* track that this strip belongs to */
|
||||||
NlaStrip *strip; /* strip that's being used */
|
NlaStrip *strip; /* strip that's being used */
|
||||||
|
|
||||||
short track_index; /* the index of the track within the list */
|
short track_index; /* the index of the track within the list */
|
||||||
short strip_mode; /* which end of the strip are we looking at */
|
short strip_mode; /* which end of the strip are we looking at */
|
||||||
|
|
||||||
float strip_time; /* time at which which strip is being evaluated */
|
float strip_time; /* time at which which strip is being evaluated */
|
||||||
} NlaEvalStrip;
|
} NlaEvalStrip;
|
||||||
|
|
||||||
/* NlaEvalStrip->strip_mode */
|
/* NlaEvalStrip->strip_mode */
|
||||||
enum {
|
enum {
|
||||||
/* standard evaluation */
|
/* standard evaluation */
|
||||||
NES_TIME_BEFORE = -1,
|
NES_TIME_BEFORE = -1,
|
||||||
NES_TIME_WITHIN,
|
NES_TIME_WITHIN,
|
||||||
NES_TIME_AFTER,
|
NES_TIME_AFTER,
|
||||||
|
|
||||||
/* transition-strip evaluations */
|
/* transition-strip evaluations */
|
||||||
NES_TIME_TRANSITION_START,
|
NES_TIME_TRANSITION_START,
|
||||||
NES_TIME_TRANSITION_END,
|
NES_TIME_TRANSITION_END,
|
||||||
} eNlaEvalStrip_StripMode;
|
} eNlaEvalStrip_StripMode;
|
||||||
@@ -66,11 +66,11 @@ enum {
|
|||||||
typedef struct NlaEvalChannel {
|
typedef struct NlaEvalChannel {
|
||||||
struct NlaEvalChannel *next, *prev;
|
struct NlaEvalChannel *next, *prev;
|
||||||
|
|
||||||
PointerRNA ptr; /* pointer to struct containing property to use */
|
PointerRNA ptr; /* pointer to struct containing property to use */
|
||||||
PropertyRNA *prop; /* RNA-property type to use (should be in the struct given) */
|
PropertyRNA *prop; /* RNA-property type to use (should be in the struct given) */
|
||||||
int index; /* array index (where applicable) */
|
int index; /* array index (where applicable) */
|
||||||
|
|
||||||
float value; /* value of this channel */
|
float value; /* value of this channel */
|
||||||
} NlaEvalChannel;
|
} NlaEvalChannel;
|
||||||
|
|
||||||
/* --------------- NLA Functions (not to be used as a proper API) ----------------------- */
|
/* --------------- NLA Functions (not to be used as a proper API) ----------------------- */
|
||||||
|
@@ -37,7 +37,7 @@ struct bArgs;
|
|||||||
typedef struct bArgs bArgs;
|
typedef struct bArgs bArgs;
|
||||||
|
|
||||||
/* returns the number of extra arguments consumed by the function. 0 is normal value, -1 stops parsing arguments, other negative indicates skip */
|
/* returns the number of extra arguments consumed by the function. 0 is normal value, -1 stops parsing arguments, other negative indicates skip */
|
||||||
typedef int (*BA_ArgCallback)(int argc, const char **argv, void *data);
|
typedef int (*BA_ArgCallback)(int argc, const char **argv, void *data);
|
||||||
|
|
||||||
struct bArgs *BLI_argsInit(int argc, const char **argv);
|
struct bArgs *BLI_argsInit(int argc, const char **argv);
|
||||||
void BLI_argsFree(struct bArgs *ba);
|
void BLI_argsFree(struct bArgs *ba);
|
||||||
|
@@ -45,7 +45,7 @@
|
|||||||
*
|
*
|
||||||
* for (i=0; i<10; i++) {
|
* for (i=0; i<10; i++) {
|
||||||
* BLI_array_grow_one(arr);
|
* BLI_array_grow_one(arr);
|
||||||
* arr[i] = something;
|
* arr[i] = something;
|
||||||
* }
|
* }
|
||||||
* BLI_array_free(arr);
|
* BLI_array_free(arr);
|
||||||
*
|
*
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
arr, \
|
arr, \
|
||||||
sizeof(*arr) * _##arr##_count) \
|
sizeof(*arr) * _##arr##_count) \
|
||||||
), \
|
), \
|
||||||
(void) (arr && ((void *)(arr) != (void*)_##arr##_static ? \
|
(void) (arr && ((void *)(arr) != (void *)_##arr##_static ? \
|
||||||
(MEM_freeN(arr), arr) : \
|
(MEM_freeN(arr), arr) : \
|
||||||
arr) \
|
arr) \
|
||||||
), \
|
), \
|
||||||
@@ -118,7 +118,7 @@
|
|||||||
/* grow an array by a specified number of items */
|
/* grow an array by a specified number of items */
|
||||||
#define BLI_array_grow_items(arr, num) ( \
|
#define BLI_array_grow_items(arr, num) ( \
|
||||||
((void *)(arr) == NULL && (void *)(_##arr##_static) != NULL) ? \
|
((void *)(arr) == NULL && (void *)(_##arr##_static) != NULL) ? \
|
||||||
((arr = (void*)_##arr##_static), (_##arr##_count += num)) : \
|
((arr = (void *)_##arr##_static), (_##arr##_count += num)) : \
|
||||||
_bli_array_grow_items(arr, num) \
|
_bli_array_grow_items(arr, num) \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@@ -26,7 +26,7 @@
|
|||||||
#ifndef __BLI_BITMAP_H__
|
#ifndef __BLI_BITMAP_H__
|
||||||
#define __BLI_BITMAP_H__
|
#define __BLI_BITMAP_H__
|
||||||
|
|
||||||
typedef unsigned int* BLI_bitmap;
|
typedef unsigned int *BLI_bitmap;
|
||||||
|
|
||||||
/* warning: the bitmap does not keep track of its own size or check
|
/* warning: the bitmap does not keep track of its own size or check
|
||||||
* for out-of-bounds access */
|
* for out-of-bounds access */
|
||||||
@@ -49,7 +49,7 @@ typedef unsigned int* BLI_bitmap;
|
|||||||
* with MEM_freeN() */
|
* with MEM_freeN() */
|
||||||
#define BLI_BITMAP_NEW(_tot, _alloc_string) \
|
#define BLI_BITMAP_NEW(_tot, _alloc_string) \
|
||||||
((BLI_bitmap)MEM_callocN(BLI_BITMAP_SIZE(_tot), \
|
((BLI_bitmap)MEM_callocN(BLI_BITMAP_SIZE(_tot), \
|
||||||
_alloc_string))
|
_alloc_string))
|
||||||
|
|
||||||
/* get the value of a single bit at '_index' */
|
/* get the value of a single bit at '_index' */
|
||||||
#define BLI_BITMAP_GET(_bitmap, _index) \
|
#define BLI_BITMAP_GET(_bitmap, _index) \
|
||||||
@@ -73,7 +73,7 @@ typedef unsigned int* BLI_bitmap;
|
|||||||
BLI_BITMAP_SET(_bitmap, _index); \
|
BLI_BITMAP_SET(_bitmap, _index); \
|
||||||
else \
|
else \
|
||||||
BLI_BITMAP_CLEAR(_bitmap, _index); \
|
BLI_BITMAP_CLEAR(_bitmap, _index); \
|
||||||
} while(0)
|
} while (0)
|
||||||
|
|
||||||
/* resize bitmap to have space for '_tot' bits */
|
/* resize bitmap to have space for '_tot' bits */
|
||||||
#define BLI_BITMAP_RESIZE(_bitmap, _tot) \
|
#define BLI_BITMAP_RESIZE(_bitmap, _tot) \
|
||||||
|
@@ -48,13 +48,13 @@ void BLI_bpath_traverse_id_list(struct Main *bmain, struct ListBase *lb, BPathVi
|
|||||||
void BLI_bpath_traverse_main(struct Main *bmain, BPathVisitor visit_cb, const int flag, void *userdata);
|
void BLI_bpath_traverse_main(struct Main *bmain, BPathVisitor visit_cb, const int flag, void *userdata);
|
||||||
int BLI_bpath_relocate_visitor(void *oldbasepath, char *path_dst, const char *path_src);
|
int BLI_bpath_relocate_visitor(void *oldbasepath, char *path_dst, const char *path_src);
|
||||||
|
|
||||||
#define BLI_BPATH_TRAVERSE_ABS (1<<0) /* convert paths to absolute */
|
#define BLI_BPATH_TRAVERSE_ABS (1 << 0) /* convert paths to absolute */
|
||||||
#define BLI_BPATH_TRAVERSE_SKIP_LIBRARY (1<<2) /* skip library paths */
|
#define BLI_BPATH_TRAVERSE_SKIP_LIBRARY (1 << 2) /* skip library paths */
|
||||||
#define BLI_BPATH_TRAVERSE_SKIP_PACKED (1<<3) /* skip packed data */
|
#define BLI_BPATH_TRAVERSE_SKIP_PACKED (1 << 3) /* skip packed data */
|
||||||
#define BLI_BPATH_TRAVERSE_SKIP_MULTIFILE (1<<4) /* skip paths where a single dir is used with an array of files, eg.
|
#define BLI_BPATH_TRAVERSE_SKIP_MULTIFILE (1 << 4) /* skip paths where a single dir is used with an array of files, eg.
|
||||||
* sequence strip images and pointcache. in this case only use the first
|
* sequence strip images and pointcache. in this case only use the first
|
||||||
* file, this is needed for directory manipulation functions which might
|
* file, this is needed for directory manipulation functions which might
|
||||||
* otherwise modify the same directory multiple times */
|
* otherwise modify the same directory multiple times */
|
||||||
|
|
||||||
/* high level funcs */
|
/* high level funcs */
|
||||||
|
|
||||||
|
@@ -56,7 +56,7 @@ typedef enum {
|
|||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
struct bCallbackFuncStore *next, *prev;
|
struct bCallbackFuncStore *next, *prev;
|
||||||
void (* func)(struct Main *, struct ID *, void *arg);
|
void (*func)(struct Main *, struct ID *, void *arg);
|
||||||
void *arg;
|
void *arg;
|
||||||
short alloc;
|
short alloc;
|
||||||
} bCallbackFuncStore;
|
} bCallbackFuncStore;
|
||||||
@@ -70,6 +70,6 @@ void BLI_callback_global_finalize(void);
|
|||||||
|
|
||||||
|
|
||||||
/* This is blenlib internal only, unrelated to above */
|
/* This is blenlib internal only, unrelated to above */
|
||||||
void callLocalErrorCallBack(const char* msg);
|
void callLocalErrorCallBack(const char *msg);
|
||||||
|
|
||||||
#endif /* __BLI_CALLBACKS_H__ */
|
#endif /* __BLI_CALLBACKS_H__ */
|
||||||
|
@@ -58,7 +58,7 @@ typedef struct DLRBT_Node {
|
|||||||
|
|
||||||
/* Red/Black defines for tree_col */
|
/* Red/Black defines for tree_col */
|
||||||
typedef enum eDLRBT_Colors {
|
typedef enum eDLRBT_Colors {
|
||||||
DLRBT_BLACK= 0,
|
DLRBT_BLACK = 0,
|
||||||
DLRBT_RED,
|
DLRBT_RED,
|
||||||
} eDLRBT_Colors;
|
} eDLRBT_Colors;
|
||||||
|
|
||||||
@@ -67,10 +67,10 @@ typedef enum eDLRBT_Colors {
|
|||||||
/* The Tree Data */
|
/* The Tree Data */
|
||||||
typedef struct DLRBT_Tree {
|
typedef struct DLRBT_Tree {
|
||||||
/* ListBase capabilities */
|
/* ListBase capabilities */
|
||||||
void *first, *last; /* these should be based on DLRBT_Node-s */
|
void *first, *last; /* these should be based on DLRBT_Node-s */
|
||||||
|
|
||||||
/* Root Node */
|
/* Root Node */
|
||||||
void *root; /* this should be based on DLRBT_Node-s */
|
void *root; /* this should be based on DLRBT_Node-s */
|
||||||
} DLRBT_Tree;
|
} DLRBT_Tree;
|
||||||
|
|
||||||
/* Callback Types --------------------------------- */
|
/* Callback Types --------------------------------- */
|
||||||
@@ -87,7 +87,7 @@ typedef short (*DLRBT_Comparator_FP)(void *node, void *data);
|
|||||||
typedef DLRBT_Node *(*DLRBT_NAlloc_FP)(void *data);
|
typedef DLRBT_Node *(*DLRBT_NAlloc_FP)(void *data);
|
||||||
|
|
||||||
/* update an existing node instance accordingly to be in sync with the given data *
|
/* update an existing node instance accordingly to be in sync with the given data *
|
||||||
* - node: <DLRBT_Node> the node to update
|
* - node: <DLRBT_Node> the node to update
|
||||||
* - data: pointer to the relevant data or values stored in the bitpattern dependent on the function
|
* - data: pointer to the relevant data or values stored in the bitpattern dependent on the function
|
||||||
*/
|
*/
|
||||||
typedef void (*DLRBT_NUpdate_FP)(void *node, void *data);
|
typedef void (*DLRBT_NUpdate_FP)(void *node, void *data);
|
||||||
@@ -137,7 +137,7 @@ short BLI_dlrbTree_contains(DLRBT_Tree *tree, DLRBT_Comparator_FP cmp_cb, void *
|
|||||||
/* Add the given data to the tree, and return the node added */
|
/* Add the given data to the tree, and return the node added */
|
||||||
// NOTE: for duplicates, the update_cb is called (if available), and the existing node is returned
|
// NOTE: for duplicates, the update_cb is called (if available), and the existing node is returned
|
||||||
DLRBT_Node *BLI_dlrbTree_add(DLRBT_Tree *tree, DLRBT_Comparator_FP cmp_cb,
|
DLRBT_Node *BLI_dlrbTree_add(DLRBT_Tree *tree, DLRBT_Comparator_FP cmp_cb,
|
||||||
DLRBT_NAlloc_FP new_cb, DLRBT_NUpdate_FP update_cb, void *data);
|
DLRBT_NAlloc_FP new_cb, DLRBT_NUpdate_FP update_cb, void *data);
|
||||||
|
|
||||||
|
|
||||||
/* Remove the given element from the tree and balance again */
|
/* Remove the given element from the tree and balance again */
|
||||||
|
@@ -35,9 +35,9 @@
|
|||||||
typedef struct DynamicLibrary DynamicLibrary;
|
typedef struct DynamicLibrary DynamicLibrary;
|
||||||
|
|
||||||
DynamicLibrary *BLI_dynlib_open(char *name);
|
DynamicLibrary *BLI_dynlib_open(char *name);
|
||||||
void *BLI_dynlib_find_symbol(DynamicLibrary* lib, const char *symname);
|
void *BLI_dynlib_find_symbol(DynamicLibrary *lib, const char *symname);
|
||||||
char *BLI_dynlib_get_error_as_string(DynamicLibrary* lib);
|
char *BLI_dynlib_get_error_as_string(DynamicLibrary *lib);
|
||||||
void BLI_dynlib_close(DynamicLibrary* lib);
|
void BLI_dynlib_close(DynamicLibrary *lib);
|
||||||
|
|
||||||
#endif /* __BLI_DYNLIB_H__ */
|
#endif /* __BLI_DYNLIB_H__ */
|
||||||
|
|
||||||
|
@@ -42,23 +42,23 @@
|
|||||||
|
|
||||||
struct DynStr;
|
struct DynStr;
|
||||||
|
|
||||||
/** The abstract DynStr type */
|
/** The abstract DynStr type */
|
||||||
typedef struct DynStr DynStr;
|
typedef struct DynStr DynStr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new DynStr.
|
* Create a new DynStr.
|
||||||
*
|
*
|
||||||
* \return Pointer to a new DynStr.
|
* \return Pointer to a new DynStr.
|
||||||
*/
|
*/
|
||||||
DynStr* BLI_dynstr_new (void);
|
DynStr *BLI_dynstr_new(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Append a c-string to a DynStr.
|
* Append a c-string to a DynStr.
|
||||||
*
|
*
|
||||||
* \param ds The DynStr to append to.
|
* \param ds The DynStr to append to.
|
||||||
* \param cstr The c-string to append.
|
* \param cstr The c-string to append.
|
||||||
*/
|
*/
|
||||||
void BLI_dynstr_append (DynStr *ds, const char *cstr);
|
void BLI_dynstr_append(DynStr *ds, const char *cstr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Append a length clamped c-string to a DynStr.
|
* Append a length clamped c-string to a DynStr.
|
||||||
@@ -67,38 +67,38 @@ void BLI_dynstr_append (DynStr *ds, const char *cstr);
|
|||||||
* \param cstr The c-string to append.
|
* \param cstr The c-string to append.
|
||||||
* \param len The maximum length of the c-string to copy.
|
* \param len The maximum length of the c-string to copy.
|
||||||
*/
|
*/
|
||||||
void BLI_dynstr_nappend (DynStr *ds, const char *cstr, int len);
|
void BLI_dynstr_nappend(DynStr *ds, const char *cstr, int len);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Append a c-string to a DynStr, but with formatting like printf.
|
* Append a c-string to a DynStr, but with formatting like printf.
|
||||||
*
|
*
|
||||||
* \param ds The DynStr to append to.
|
* \param ds The DynStr to append to.
|
||||||
* \param format The printf format string to use.
|
* \param format The printf format string to use.
|
||||||
*/
|
*/
|
||||||
void BLI_dynstr_appendf (DynStr *ds, const char *format, ...)
|
void BLI_dynstr_appendf(DynStr *ds, const char *format, ...)
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
__attribute__ ((format (printf, 2, 3)))
|
__attribute__ ((format(printf, 2, 3)))
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
void BLI_dynstr_vappendf (DynStr *ds, const char *format, va_list args);
|
void BLI_dynstr_vappendf(DynStr *ds, const char *format, va_list args);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find the length of a DynStr.
|
* Find the length of a DynStr.
|
||||||
*
|
*
|
||||||
* \param ds The DynStr of interest.
|
* \param ds The DynStr of interest.
|
||||||
* \return The length of \a ds.
|
* \return The length of \a ds.
|
||||||
*/
|
*/
|
||||||
int BLI_dynstr_get_len (DynStr *ds);
|
int BLI_dynstr_get_len(DynStr *ds);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a DynStr's contents as a c-string.
|
* Get a DynStr's contents as a c-string.
|
||||||
* <i> The returned c-string should be freed
|
* <i> The returned c-string should be freed
|
||||||
* using MEM_freeN. </i>
|
* using MEM_freeN. </i>
|
||||||
*
|
*
|
||||||
* \param ds The DynStr of interest.
|
* \param ds The DynStr of interest.
|
||||||
* \return The contents of \a ds as a c-string.
|
* \return The contents of \a ds as a c-string.
|
||||||
*/
|
*/
|
||||||
char* BLI_dynstr_get_cstring (DynStr *ds);
|
char *BLI_dynstr_get_cstring(DynStr *ds);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a DynStr's contents as a c-string.
|
* Get a DynStr's contents as a c-string.
|
||||||
@@ -109,14 +109,14 @@ char* BLI_dynstr_get_cstring (DynStr *ds);
|
|||||||
* \param str The string to fill.
|
* \param str The string to fill.
|
||||||
* \return The contents of \a ds as a c-string.
|
* \return The contents of \a ds as a c-string.
|
||||||
*/
|
*/
|
||||||
void BLI_dynstr_get_cstring_ex (DynStr *ds, char *str);
|
void BLI_dynstr_get_cstring_ex(DynStr *ds, char *str);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Free the DynStr
|
* Free the DynStr
|
||||||
*
|
*
|
||||||
* \param ds The DynStr to free.
|
* \param ds The DynStr to free.
|
||||||
*/
|
*/
|
||||||
void BLI_dynstr_free (DynStr *ds);
|
void BLI_dynstr_free(DynStr *ds);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -39,62 +39,62 @@ struct EdgeHashIterator;
|
|||||||
typedef struct EdgeHash EdgeHash;
|
typedef struct EdgeHash EdgeHash;
|
||||||
typedef struct EdgeHashIterator EdgeHashIterator;
|
typedef struct EdgeHashIterator EdgeHashIterator;
|
||||||
|
|
||||||
typedef void (*EdgeHashFreeFP)(void *key);
|
typedef void (*EdgeHashFreeFP)(void *key);
|
||||||
|
|
||||||
EdgeHash* BLI_edgehash_new (void);
|
EdgeHash *BLI_edgehash_new(void);
|
||||||
void BLI_edgehash_free (EdgeHash *eh, EdgeHashFreeFP valfreefp);
|
void BLI_edgehash_free(EdgeHash *eh, EdgeHashFreeFP valfreefp);
|
||||||
|
|
||||||
/* Insert edge (v0,v1) into hash with given value, does
|
/* Insert edge (v0,v1) into hash with given value, does
|
||||||
* not check for duplicates.
|
* not check for duplicates.
|
||||||
*/
|
*/
|
||||||
void BLI_edgehash_insert (EdgeHash *eh, unsigned int v0, unsigned int v1, void *val);
|
void BLI_edgehash_insert(EdgeHash *eh, unsigned int v0, unsigned int v1, void *val);
|
||||||
|
|
||||||
/* Return value for given edge (v0,v1), or NULL if
|
/* Return value for given edge (v0,v1), or NULL if
|
||||||
* if key does not exist in hash. (If need exists
|
* if key does not exist in hash. (If need exists
|
||||||
* to differentiate between key-value being NULL and
|
* to differentiate between key-value being NULL and
|
||||||
* lack of key then see BLI_edgehash_lookup_p().
|
* lack of key then see BLI_edgehash_lookup_p().
|
||||||
*/
|
*/
|
||||||
void* BLI_edgehash_lookup (EdgeHash *eh, unsigned int v0, unsigned int v1);
|
void *BLI_edgehash_lookup(EdgeHash *eh, unsigned int v0, unsigned int v1);
|
||||||
|
|
||||||
/* Return pointer to value for given edge (v0,v1),
|
/* Return pointer to value for given edge (v0,v1),
|
||||||
* or NULL if key does not exist in hash.
|
* or NULL if key does not exist in hash.
|
||||||
*/
|
*/
|
||||||
void** BLI_edgehash_lookup_p (EdgeHash *eh, unsigned int v0, unsigned int v1);
|
void **BLI_edgehash_lookup_p(EdgeHash *eh, unsigned int v0, unsigned int v1);
|
||||||
|
|
||||||
/* Return boolean true/false if edge (v0,v1) in hash. */
|
/* Return boolean true/false if edge (v0,v1) in hash. */
|
||||||
int BLI_edgehash_haskey (EdgeHash *eh, unsigned int v0, unsigned int v1);
|
int BLI_edgehash_haskey(EdgeHash *eh, unsigned int v0, unsigned int v1);
|
||||||
|
|
||||||
/* Return number of keys in hash. */
|
/* Return number of keys in hash. */
|
||||||
int BLI_edgehash_size (EdgeHash *eh);
|
int BLI_edgehash_size(EdgeHash *eh);
|
||||||
|
|
||||||
/* Remove all edges from hash. */
|
/* Remove all edges from hash. */
|
||||||
void BLI_edgehash_clear (EdgeHash *eh, EdgeHashFreeFP valfreefp);
|
void BLI_edgehash_clear(EdgeHash *eh, EdgeHashFreeFP valfreefp);
|
||||||
|
|
||||||
/***/
|
/***/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new EdgeHashIterator. The hash table must not be mutated
|
* Create a new EdgeHashIterator. The hash table must not be mutated
|
||||||
* while the iterator is in use, and the iterator will step exactly
|
* while the iterator is in use, and the iterator will step exactly
|
||||||
* BLI_edgehash_size(gh) times before becoming done.
|
* BLI_edgehash_size(gh) times before becoming done.
|
||||||
*/
|
*/
|
||||||
EdgeHashIterator* BLI_edgehashIterator_new (EdgeHash *eh);
|
EdgeHashIterator *BLI_edgehashIterator_new(EdgeHash *eh);
|
||||||
|
|
||||||
/* Free an EdgeHashIterator. */
|
/* Free an EdgeHashIterator. */
|
||||||
void BLI_edgehashIterator_free (EdgeHashIterator *ehi);
|
void BLI_edgehashIterator_free(EdgeHashIterator *ehi);
|
||||||
|
|
||||||
/* Retrieve the key from an iterator. */
|
/* Retrieve the key from an iterator. */
|
||||||
void BLI_edgehashIterator_getKey (EdgeHashIterator *ehi, unsigned int *v0_r, unsigned int *v1_r);
|
void BLI_edgehashIterator_getKey(EdgeHashIterator *ehi, unsigned int *v0_r, unsigned int *v1_r);
|
||||||
|
|
||||||
/* Retrieve the value from an iterator. */
|
|
||||||
void* BLI_edgehashIterator_getValue (EdgeHashIterator *ehi);
|
|
||||||
|
|
||||||
/* Set the value for an iterator. */
|
/* Retrieve the value from an iterator. */
|
||||||
void BLI_edgehashIterator_setValue (EdgeHashIterator *ehi, void *val);
|
void *BLI_edgehashIterator_getValue(EdgeHashIterator *ehi);
|
||||||
|
|
||||||
/* Steps the iterator to the next index. */
|
/* Set the value for an iterator. */
|
||||||
void BLI_edgehashIterator_step (EdgeHashIterator *ehi);
|
void BLI_edgehashIterator_setValue(EdgeHashIterator *ehi, void *val);
|
||||||
|
|
||||||
/* Determine if an iterator is done. */
|
/* Steps the iterator to the next index. */
|
||||||
int BLI_edgehashIterator_isDone (EdgeHashIterator *ehi);
|
void BLI_edgehashIterator_step(EdgeHashIterator *ehi);
|
||||||
|
|
||||||
|
/* Determine if an iterator is done. */
|
||||||
|
int BLI_edgehashIterator_isDone(EdgeHashIterator *ehi);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -84,10 +84,10 @@ char *BLI_file_ungzip_to_mem(const char *from_file, int *size_r);
|
|||||||
size_t BLI_file_descriptor_size(int file);
|
size_t BLI_file_descriptor_size(int file);
|
||||||
size_t BLI_file_size(const char *file);
|
size_t BLI_file_size(const char *file);
|
||||||
|
|
||||||
/* compare if one was last modified before the other */
|
/* compare if one was last modified before the other */
|
||||||
int BLI_file_older(const char *file1, const char *file2);
|
int BLI_file_older(const char *file1, const char *file2);
|
||||||
|
|
||||||
/* read ascii file as lines, empty list if reading fails */
|
/* read ascii file as lines, empty list if reading fails */
|
||||||
struct LinkNode *BLI_file_read_as_lines(const char *file);
|
struct LinkNode *BLI_file_read_as_lines(const char *file);
|
||||||
void BLI_file_free_lines(struct LinkNode *lines);
|
void BLI_file_free_lines(struct LinkNode *lines);
|
||||||
|
|
||||||
|
@@ -41,35 +41,34 @@ typedef unsigned int mode_t;
|
|||||||
|
|
||||||
struct ImBuf;
|
struct ImBuf;
|
||||||
|
|
||||||
struct direntry{
|
struct direntry {
|
||||||
char *string;
|
char *string;
|
||||||
mode_t type;
|
mode_t type;
|
||||||
char *relname;
|
char *relname;
|
||||||
char *path;
|
char *path;
|
||||||
#if (defined(WIN32) || defined(WIN64)) && (_MSC_VER>=1500)
|
#if (defined(WIN32) || defined(WIN64)) && (_MSC_VER >= 1500)
|
||||||
struct _stat64 s;
|
struct _stat64 s;
|
||||||
#elif defined(__MINGW32__)
|
#elif defined(__MINGW32__)
|
||||||
struct _stati64 s;
|
struct _stati64 s;
|
||||||
#else
|
#else
|
||||||
struct stat s;
|
struct stat s;
|
||||||
#endif
|
#endif
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
char size[16];
|
char size[16];
|
||||||
char mode1[4];
|
char mode1[4];
|
||||||
char mode2[4];
|
char mode2[4];
|
||||||
char mode3[4];
|
char mode3[4];
|
||||||
char owner[16];
|
char owner[16];
|
||||||
char time[8];
|
char time[8];
|
||||||
char date[16];
|
char date[16];
|
||||||
char extra[16];
|
char extra[16];
|
||||||
void *poin;
|
void *poin;
|
||||||
int nr;
|
int nr;
|
||||||
struct ImBuf *image;
|
struct ImBuf *image;
|
||||||
unsigned int selflag; /* selection flag */
|
unsigned int selflag; /* selection flag */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct dirlink
|
struct dirlink {
|
||||||
{
|
|
||||||
struct dirlink *next, *prev;
|
struct dirlink *next, *prev;
|
||||||
char *name;
|
char *name;
|
||||||
};
|
};
|
||||||
|
@@ -17,23 +17,23 @@
|
|||||||
* along with this program; if not, write to the Free Software Foundation,
|
* along with this program; if not, write to the Free Software Foundation,
|
||||||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
|
||||||
|
|
||||||
#ifndef __BLI_FNMATCH_H__
|
#ifndef __BLI_FNMATCH_H__
|
||||||
#define __BLI_FNMATCH_H__
|
#define __BLI_FNMATCH_H__
|
||||||
|
|
||||||
/** \file BLI_fnmatch.h
|
/** \file BLI_fnmatch.h
|
||||||
* \ingroup bli
|
* \ingroup bli
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined (__cplusplus) || (defined (__STDC__) && __STDC__)
|
#if defined(__cplusplus) || (defined(__STDC__) && __STDC__)
|
||||||
#undef __P
|
#undef __P
|
||||||
#define __P(protos) protos
|
#define __P(protos) protos
|
||||||
#else /* Not C++ or ANSI C. */
|
#else /* Not C++ or ANSI C. */
|
||||||
#undef __P
|
#undef __P
|
||||||
#define __P(protos) ()
|
#define __P(protos) ()
|
||||||
/* We can get away without defining `const' here only because in this file
|
/* We can get away without defining `const' here only because in this file
|
||||||
* it is used only inside the prototype for `fnmatch', which is elided in
|
* it is used only inside the prototype for `fnmatch', which is elided in
|
||||||
* non-ANSI C where `const' is problematical. */
|
* non-ANSI C where `const' is problematical. */
|
||||||
@@ -42,30 +42,30 @@ extern "C" {
|
|||||||
|
|
||||||
/* We #undef these before defining them because some losing systems
|
/* We #undef these before defining them because some losing systems
|
||||||
* (HP-UX A.08.07 for example) define these in <unistd.h>. */
|
* (HP-UX A.08.07 for example) define these in <unistd.h>. */
|
||||||
#undef FNM_PATHNAME
|
#undef FNM_PATHNAME
|
||||||
#undef FNM_NOESCAPE
|
#undef FNM_NOESCAPE
|
||||||
#undef FNM_PERIOD
|
#undef FNM_PERIOD
|
||||||
|
|
||||||
/* Bits set in the FLAGS argument to `fnmatch'. */
|
/* Bits set in the FLAGS argument to `fnmatch'. */
|
||||||
#define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */
|
#define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */
|
||||||
#define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
|
#define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
|
||||||
#define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */
|
#define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */
|
||||||
|
|
||||||
#if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_GNU_SOURCE) || defined( __SUNPRO_C)
|
#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined(_GNU_SOURCE) || defined(__SUNPRO_C)
|
||||||
#define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */
|
#define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */
|
||||||
#define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */
|
#define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */
|
||||||
#define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */
|
#define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Value returned by `fnmatch' if STRING does not match PATTERN. */
|
/* Value returned by `fnmatch' if STRING does not match PATTERN. */
|
||||||
#define FNM_NOMATCH 1
|
#define FNM_NOMATCH 1
|
||||||
|
|
||||||
/* Match STRING against the filename pattern PATTERN,
|
/* Match STRING against the filename pattern PATTERN,
|
||||||
* returning zero if it matches, FNM_NOMATCH if not. */
|
* returning zero if it matches, FNM_NOMATCH if not. */
|
||||||
extern int fnmatch __P ((const char *__pattern, const char *__string,
|
extern int fnmatch __P((const char *__pattern, const char *__string,
|
||||||
int __flags));
|
int __flags));
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -37,10 +37,10 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef unsigned int (*GHashHashFP) (const void *key);
|
typedef unsigned int (*GHashHashFP) (const void *key);
|
||||||
typedef int (*GHashCmpFP) (const void *a, const void *b);
|
typedef int (*GHashCmpFP) (const void *a, const void *b);
|
||||||
typedef void (*GHashKeyFreeFP) (void *key);
|
typedef void (*GHashKeyFreeFP) (void *key);
|
||||||
typedef void (*GHashValFreeFP) (void *val);
|
typedef void (*GHashValFreeFP) (void *val);
|
||||||
|
|
||||||
typedef struct Entry {
|
typedef struct Entry {
|
||||||
struct Entry *next;
|
struct Entry *next;
|
||||||
@@ -49,8 +49,8 @@ typedef struct Entry {
|
|||||||
} Entry;
|
} Entry;
|
||||||
|
|
||||||
typedef struct GHash {
|
typedef struct GHash {
|
||||||
GHashHashFP hashfp;
|
GHashHashFP hashfp;
|
||||||
GHashCmpFP cmpfp;
|
GHashCmpFP cmpfp;
|
||||||
|
|
||||||
Entry **buckets;
|
Entry **buckets;
|
||||||
struct BLI_mempool *entrypool;
|
struct BLI_mempool *entrypool;
|
||||||
@@ -65,71 +65,71 @@ typedef struct GHashIterator {
|
|||||||
|
|
||||||
/* *** */
|
/* *** */
|
||||||
|
|
||||||
GHash* BLI_ghash_new (GHashHashFP hashfp, GHashCmpFP cmpfp, const char *info);
|
GHash *BLI_ghash_new(GHashHashFP hashfp, GHashCmpFP cmpfp, const char *info);
|
||||||
void BLI_ghash_free (GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp);
|
void BLI_ghash_free(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp);
|
||||||
void BLI_ghash_insert(GHash *gh, void *key, void *val);
|
void BLI_ghash_insert(GHash *gh, void *key, void *val);
|
||||||
void * BLI_ghash_lookup(GHash *gh, const void *key);
|
void *BLI_ghash_lookup(GHash *gh, const void *key);
|
||||||
int BLI_ghash_remove(GHash *gh, void *key, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp);
|
int BLI_ghash_remove(GHash *gh, void *key, GHashKeyFreeFP keyfreefp, GHashValFreeFP valfreefp);
|
||||||
int BLI_ghash_haskey(GHash *gh, void *key);
|
int BLI_ghash_haskey(GHash *gh, void *key);
|
||||||
int BLI_ghash_size (GHash *gh);
|
int BLI_ghash_size(GHash *gh);
|
||||||
|
|
||||||
/* *** */
|
/* *** */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new GHashIterator. The hash table must not be mutated
|
* Create a new GHashIterator. The hash table must not be mutated
|
||||||
* while the iterator is in use, and the iterator will step exactly
|
* while the iterator is in use, and the iterator will step exactly
|
||||||
* BLI_ghash_size(gh) times before becoming done.
|
* BLI_ghash_size(gh) times before becoming done.
|
||||||
*
|
*
|
||||||
* \param gh The GHash to iterate over.
|
* \param gh The GHash to iterate over.
|
||||||
* \return Pointer to a new DynStr.
|
* \return Pointer to a new DynStr.
|
||||||
*/
|
*/
|
||||||
GHashIterator* BLI_ghashIterator_new (GHash *gh);
|
GHashIterator *BLI_ghashIterator_new(GHash *gh);
|
||||||
/**
|
/**
|
||||||
* Init an already allocated GHashIterator. The hash table must not
|
* Init an already allocated GHashIterator. The hash table must not
|
||||||
* be mutated while the iterator is in use, and the iterator will
|
* be mutated while the iterator is in use, and the iterator will
|
||||||
* step exactly BLI_ghash_size(gh) times before becoming done.
|
* step exactly BLI_ghash_size(gh) times before becoming done.
|
||||||
*
|
*
|
||||||
* \param ghi The GHashIterator to initialize.
|
* \param ghi The GHashIterator to initialize.
|
||||||
* \param gh The GHash to iterate over.
|
* \param gh The GHash to iterate over.
|
||||||
*/
|
*/
|
||||||
void BLI_ghashIterator_init(GHashIterator *ghi, GHash *gh);
|
void BLI_ghashIterator_init(GHashIterator *ghi, GHash *gh);
|
||||||
/**
|
/**
|
||||||
* Free a GHashIterator.
|
* Free a GHashIterator.
|
||||||
*
|
*
|
||||||
* \param ghi The iterator to free.
|
* \param ghi The iterator to free.
|
||||||
*/
|
*/
|
||||||
void BLI_ghashIterator_free (GHashIterator *ghi);
|
void BLI_ghashIterator_free(GHashIterator *ghi);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the key from an iterator.
|
* Retrieve the key from an iterator.
|
||||||
*
|
*
|
||||||
* \param ghi The iterator.
|
* \param ghi The iterator.
|
||||||
* \return The key at the current index, or NULL if the
|
* \return The key at the current index, or NULL if the
|
||||||
* iterator is done.
|
* iterator is done.
|
||||||
*/
|
*/
|
||||||
void* BLI_ghashIterator_getKey (GHashIterator *ghi);
|
void *BLI_ghashIterator_getKey(GHashIterator *ghi);
|
||||||
/**
|
/**
|
||||||
* Retrieve the value from an iterator.
|
* Retrieve the value from an iterator.
|
||||||
*
|
*
|
||||||
* \param ghi The iterator.
|
* \param ghi The iterator.
|
||||||
* \return The value at the current index, or NULL if the
|
* \return The value at the current index, or NULL if the
|
||||||
* iterator is done.
|
* iterator is done.
|
||||||
*/
|
*/
|
||||||
void* BLI_ghashIterator_getValue (GHashIterator *ghi);
|
void *BLI_ghashIterator_getValue(GHashIterator *ghi);
|
||||||
/**
|
/**
|
||||||
* Steps the iterator to the next index.
|
* Steps the iterator to the next index.
|
||||||
*
|
*
|
||||||
* \param ghi The iterator.
|
* \param ghi The iterator.
|
||||||
*/
|
*/
|
||||||
void BLI_ghashIterator_step (GHashIterator *ghi);
|
void BLI_ghashIterator_step(GHashIterator *ghi);
|
||||||
/**
|
/**
|
||||||
* Determine if an iterator is done (has reached the end of
|
* Determine if an iterator is done (has reached the end of
|
||||||
* the hash table).
|
* the hash table).
|
||||||
*
|
*
|
||||||
* \param ghi The iterator.
|
* \param ghi The iterator.
|
||||||
* \return True if done, False otherwise.
|
* \return True if done, False otherwise.
|
||||||
*/
|
*/
|
||||||
int BLI_ghashIterator_isDone (GHashIterator *ghi);
|
int BLI_ghashIterator_isDone(GHashIterator *ghi);
|
||||||
|
|
||||||
#define GHASH_ITER(gh_iter_, ghash_) \
|
#define GHASH_ITER(gh_iter_, ghash_) \
|
||||||
for (BLI_ghashIterator_init(&gh_iter_, ghash_); \
|
for (BLI_ghashIterator_init(&gh_iter_, ghash_); \
|
||||||
@@ -138,24 +138,24 @@ int BLI_ghashIterator_isDone (GHashIterator *ghi);
|
|||||||
|
|
||||||
/* *** */
|
/* *** */
|
||||||
|
|
||||||
unsigned int BLI_ghashutil_ptrhash (const void *key);
|
unsigned int BLI_ghashutil_ptrhash(const void *key);
|
||||||
int BLI_ghashutil_ptrcmp (const void *a, const void *b);
|
int BLI_ghashutil_ptrcmp(const void *a, const void *b);
|
||||||
|
|
||||||
unsigned int BLI_ghashutil_strhash (const void *key);
|
unsigned int BLI_ghashutil_strhash(const void *key);
|
||||||
int BLI_ghashutil_strcmp (const void *a, const void *b);
|
int BLI_ghashutil_strcmp(const void *a, const void *b);
|
||||||
|
|
||||||
unsigned int BLI_ghashutil_inthash (const void *ptr);
|
unsigned int BLI_ghashutil_inthash(const void *ptr);
|
||||||
int BLI_ghashutil_intcmp (const void *a, const void *b);
|
int BLI_ghashutil_intcmp(const void *a, const void *b);
|
||||||
|
|
||||||
typedef struct GHashPair {
|
typedef struct GHashPair {
|
||||||
const void *first;
|
const void *first;
|
||||||
const void *second;
|
const void *second;
|
||||||
} GHashPair;
|
} GHashPair;
|
||||||
|
|
||||||
GHashPair* BLI_ghashutil_pairalloc (const void *first, const void *second);
|
GHashPair *BLI_ghashutil_pairalloc(const void *first, const void *second);
|
||||||
unsigned int BLI_ghashutil_pairhash (const void *ptr);
|
unsigned int BLI_ghashutil_pairhash(const void *ptr);
|
||||||
int BLI_ghashutil_paircmp (const void *a, const void *b);
|
int BLI_ghashutil_paircmp(const void *a, const void *b);
|
||||||
void BLI_ghashutil_pairfree (void *ptr);
|
void BLI_ghashutil_pairfree(void *ptr);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@@ -37,10 +37,10 @@ struct BArc;
|
|||||||
|
|
||||||
struct RadialArc;
|
struct RadialArc;
|
||||||
|
|
||||||
typedef void (*FreeArc)(struct BArc*);
|
typedef void (*FreeArc)(struct BArc *);
|
||||||
typedef void (*FreeNode)(struct BNode*);
|
typedef void (*FreeNode)(struct BNode *);
|
||||||
typedef void (*RadialSymmetry)(struct BNode* root_node, struct RadialArc* ring, int total);
|
typedef void (*RadialSymmetry)(struct BNode *root_node, struct RadialArc *ring, int total);
|
||||||
typedef void (*AxialSymmetry)(struct BNode* root_node, struct BNode* node1, struct BNode* node2, struct BArc* arc1, struct BArc* arc2);
|
typedef void (*AxialSymmetry)(struct BNode *root_node, struct BNode *node1, struct BNode *node2, struct BArc *arc1, struct BArc *arc2);
|
||||||
|
|
||||||
/* IF YOU MODIFY THOSE TYPES, YOU NEED TO UPDATE ALL THOSE THAT "INHERIT" FROM THEM
|
/* IF YOU MODIFY THOSE TYPES, YOU NEED TO UPDATE ALL THOSE THAT "INHERIT" FROM THEM
|
||||||
*
|
*
|
||||||
@@ -49,16 +49,16 @@ typedef void (*AxialSymmetry)(struct BNode* root_node, struct BNode* node1, stru
|
|||||||
* */
|
* */
|
||||||
|
|
||||||
typedef struct BGraph {
|
typedef struct BGraph {
|
||||||
ListBase arcs;
|
ListBase arcs;
|
||||||
ListBase nodes;
|
ListBase nodes;
|
||||||
|
|
||||||
float length;
|
float length;
|
||||||
|
|
||||||
/* function pointer to deal with custom fonctionnality */
|
/* function pointer to deal with custom fonctionnality */
|
||||||
FreeArc free_arc;
|
FreeArc free_arc;
|
||||||
FreeNode free_node;
|
FreeNode free_node;
|
||||||
RadialSymmetry radial_symmetry;
|
RadialSymmetry radial_symmetry;
|
||||||
AxialSymmetry axial_symmetry;
|
AxialSymmetry axial_symmetry;
|
||||||
} BGraph;
|
} BGraph;
|
||||||
|
|
||||||
typedef struct BNode {
|
typedef struct BNode {
|
||||||
@@ -90,30 +90,30 @@ typedef struct BArc {
|
|||||||
|
|
||||||
struct BArcIterator;
|
struct BArcIterator;
|
||||||
|
|
||||||
void* IT_head(void* iter);
|
void *IT_head(void *iter);
|
||||||
void* IT_tail(void* iter);
|
void *IT_tail(void *iter);
|
||||||
void* IT_peek(void* iter, int n);
|
void *IT_peek(void *iter, int n);
|
||||||
void* IT_next(void* iter);
|
void *IT_next(void *iter);
|
||||||
void* IT_nextN(void* iter, int n);
|
void *IT_nextN(void *iter, int n);
|
||||||
void* IT_previous(void* iter);
|
void *IT_previous(void *iter);
|
||||||
int IT_stopped(void* iter);
|
int IT_stopped(void *iter);
|
||||||
|
|
||||||
typedef void* (*HeadFct)(void* iter);
|
typedef void * (*HeadFct)(void *iter);
|
||||||
typedef void* (*TailFct)(void* iter);
|
typedef void * (*TailFct)(void *iter);
|
||||||
typedef void* (*PeekFct)(void* iter, int n);
|
typedef void * (*PeekFct)(void *iter, int n);
|
||||||
typedef void* (*NextFct)(void* iter);
|
typedef void * (*NextFct)(void *iter);
|
||||||
typedef void* (*NextNFct)(void* iter, int n);
|
typedef void * (*NextNFct)(void *iter, int n);
|
||||||
typedef void* (*PreviousFct)(void* iter);
|
typedef void * (*PreviousFct)(void *iter);
|
||||||
typedef int (*StoppedFct)(void* iter);
|
typedef int (*StoppedFct)(void *iter);
|
||||||
|
|
||||||
typedef struct BArcIterator {
|
typedef struct BArcIterator {
|
||||||
HeadFct head;
|
HeadFct head;
|
||||||
TailFct tail;
|
TailFct tail;
|
||||||
PeekFct peek;
|
PeekFct peek;
|
||||||
NextFct next;
|
NextFct next;
|
||||||
NextNFct nextN;
|
NextNFct nextN;
|
||||||
PreviousFct previous;
|
PreviousFct previous;
|
||||||
StoppedFct stopped;
|
StoppedFct stopped;
|
||||||
|
|
||||||
float *p, *no;
|
float *p, *no;
|
||||||
float size;
|
float size;
|
||||||
@@ -123,8 +123,7 @@ typedef struct BArcIterator {
|
|||||||
} BArcIterator;
|
} BArcIterator;
|
||||||
|
|
||||||
/* Helper structure for radial symmetry */
|
/* Helper structure for radial symmetry */
|
||||||
typedef struct RadialArc
|
typedef struct RadialArc {
|
||||||
{
|
|
||||||
struct BArc *arc;
|
struct BArc *arc;
|
||||||
float n[3]; /* normalized vector joining the nodes of the arc */
|
float n[3]; /* normalized vector joining the nodes of the arc */
|
||||||
} RadialArc;
|
} RadialArc;
|
||||||
@@ -141,7 +140,7 @@ void BLI_flagArcs(BGraph *graph, int flag);
|
|||||||
|
|
||||||
int BLI_hasAdjacencyList(BGraph *rg);
|
int BLI_hasAdjacencyList(BGraph *rg);
|
||||||
void BLI_buildAdjacencyList(BGraph *rg);
|
void BLI_buildAdjacencyList(BGraph *rg);
|
||||||
void BLI_rebuildAdjacencyListForNode(BGraph* rg, BNode *node);
|
void BLI_rebuildAdjacencyListForNode(BGraph *rg, BNode *node);
|
||||||
void BLI_freeAdjacencyList(BGraph *rg);
|
void BLI_freeAdjacencyList(BGraph *rg);
|
||||||
|
|
||||||
int BLI_FlagSubgraphs(BGraph *graph);
|
int BLI_FlagSubgraphs(BGraph *graph);
|
||||||
@@ -156,11 +155,11 @@ void BLI_calcGraphLength(BGraph *graph);
|
|||||||
void BLI_replaceNode(BGraph *graph, BNode *node_src, BNode *node_replaced);
|
void BLI_replaceNode(BGraph *graph, BNode *node_src, BNode *node_replaced);
|
||||||
void BLI_replaceNodeInArc(BGraph *graph, BArc *arc, BNode *node_src, BNode *node_replaced);
|
void BLI_replaceNodeInArc(BGraph *graph, BArc *arc, BNode *node_src, BNode *node_replaced);
|
||||||
void BLI_removeDoubleNodes(BGraph *graph, float limit);
|
void BLI_removeDoubleNodes(BGraph *graph, float limit);
|
||||||
BNode * BLI_FindNodeByPosition(BGraph *graph, float *p, float limit);
|
BNode *BLI_FindNodeByPosition(BGraph *graph, float *p, float limit);
|
||||||
|
|
||||||
BArc * BLI_findConnectedArc(BGraph *graph, BArc *arc, BNode *v);
|
BArc *BLI_findConnectedArc(BGraph *graph, BArc *arc, BNode *v);
|
||||||
|
|
||||||
int BLI_isGraphCyclic(BGraph *graph);
|
int BLI_isGraphCyclic(BGraph *graph);
|
||||||
|
|
||||||
/*------------ Symmetry handling ------------*/
|
/*------------ Symmetry handling ------------*/
|
||||||
void BLI_markdownSymmetry(BGraph *graph, BNode *root_node, float limit);
|
void BLI_markdownSymmetry(BGraph *graph, BNode *root_node, float limit);
|
||||||
@@ -168,19 +167,19 @@ void BLI_markdownSymmetry(BGraph *graph, BNode *root_node, float limit);
|
|||||||
void BLI_mirrorAlongAxis(float v[3], float center[3], float axis[3]);
|
void BLI_mirrorAlongAxis(float v[3], float center[3], float axis[3]);
|
||||||
|
|
||||||
/* BNode symmetry flags */
|
/* BNode symmetry flags */
|
||||||
#define SYM_TOPOLOGICAL 1
|
#define SYM_TOPOLOGICAL 1
|
||||||
#define SYM_PHYSICAL 2
|
#define SYM_PHYSICAL 2
|
||||||
|
|
||||||
/* the following two are exclusive */
|
/* the following two are exclusive */
|
||||||
#define SYM_AXIAL 4
|
#define SYM_AXIAL 4
|
||||||
#define SYM_RADIAL 8
|
#define SYM_RADIAL 8
|
||||||
|
|
||||||
/* BArc symmetry flags
|
/* BArc symmetry flags
|
||||||
*
|
*
|
||||||
* axial symmetry sides */
|
* axial symmetry sides */
|
||||||
#define SYM_SIDE_POSITIVE 1
|
#define SYM_SIDE_POSITIVE 1
|
||||||
#define SYM_SIDE_NEGATIVE 2
|
#define SYM_SIDE_NEGATIVE 2
|
||||||
/* Anything higher is the order in radial symmetry */
|
/* Anything higher is the order in radial symmetry */
|
||||||
#define SYM_SIDE_RADIAL 3
|
#define SYM_SIDE_RADIAL 3
|
||||||
|
|
||||||
#endif /*__BLI_GRAPH_H__*/
|
#endif /*__BLI_GRAPH_H__*/
|
||||||
|
@@ -36,64 +36,64 @@
|
|||||||
|
|
||||||
typedef struct _GSQueue GSQueue;
|
typedef struct _GSQueue GSQueue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new GSQueue.
|
* Create a new GSQueue.
|
||||||
*
|
*
|
||||||
* \param elem_size The size of the structures in the queue.
|
* \param elem_size The size of the structures in the queue.
|
||||||
* \retval The new queue
|
* \retval The new queue
|
||||||
*/
|
*/
|
||||||
GSQueue* BLI_gsqueue_new (int elem_size);
|
GSQueue *BLI_gsqueue_new(int elem_size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Query if the queue is empty
|
* Query if the queue is empty
|
||||||
*/
|
*/
|
||||||
int BLI_gsqueue_is_empty(GSQueue *gq);
|
int BLI_gsqueue_is_empty(GSQueue *gq);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Query number elements in the queue
|
* Query number elements in the queue
|
||||||
*/
|
*/
|
||||||
int BLI_gsqueue_size(GSQueue *gq);
|
int BLI_gsqueue_size(GSQueue *gq);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Access the item at the head of the queue
|
* Access the item at the head of the queue
|
||||||
* without removing it.
|
* without removing it.
|
||||||
*
|
*
|
||||||
* \param item_r A pointer to an appropriately
|
* \param item_r A pointer to an appropriately
|
||||||
* sized structure (the size passed to BLI_gsqueue_new)
|
* sized structure (the size passed to BLI_gsqueue_new)
|
||||||
*/
|
*/
|
||||||
void BLI_gsqueue_peek (GSQueue *gq, void *item_r);
|
void BLI_gsqueue_peek(GSQueue *gq, void *item_r);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Access the item at the head of the queue
|
* Access the item at the head of the queue
|
||||||
* and remove it.
|
* and remove it.
|
||||||
*
|
*
|
||||||
* \param item_r A pointer to an appropriately
|
* \param item_r A pointer to an appropriately
|
||||||
* sized structure (the size passed to BLI_gsqueue_new).
|
* sized structure (the size passed to BLI_gsqueue_new).
|
||||||
* Can be NULL if desired.
|
* Can be NULL if desired.
|
||||||
*/
|
*/
|
||||||
void BLI_gsqueue_pop (GSQueue *gq, void *item_r);
|
void BLI_gsqueue_pop(GSQueue *gq, void *item_r);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Push an element onto the tail of the queue.
|
* Push an element onto the tail of the queue.
|
||||||
*
|
*
|
||||||
* \param item A pointer to an appropriately
|
* \param item A pointer to an appropriately
|
||||||
* sized structure (the size passed to BLI_gsqueue_new).
|
* sized structure (the size passed to BLI_gsqueue_new).
|
||||||
*/
|
*/
|
||||||
void BLI_gsqueue_push (GSQueue *gq, void *item);
|
void BLI_gsqueue_push(GSQueue *gq, void *item);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Push an element back onto the head of the queue (so
|
* Push an element back onto the head of the queue (so
|
||||||
* it would be returned from the next call to BLI_gsqueue_pop).
|
* it would be returned from the next call to BLI_gsqueue_pop).
|
||||||
*
|
*
|
||||||
* \param item A pointer to an appropriately
|
* \param item A pointer to an appropriately
|
||||||
* sized structure (the size passed to BLI_gsqueue_new).
|
* sized structure (the size passed to BLI_gsqueue_new).
|
||||||
*/
|
*/
|
||||||
void BLI_gsqueue_pushback (GSQueue *gq, void *item);
|
void BLI_gsqueue_pushback(GSQueue *gq, void *item);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Free the queue
|
* Free the queue
|
||||||
*/
|
*/
|
||||||
void BLI_gsqueue_free (GSQueue *gq);
|
void BLI_gsqueue_free(GSQueue *gq);
|
||||||
|
|
||||||
#endif /* __BLI_GSQUEUE_H__ */
|
#endif /* __BLI_GSQUEUE_H__ */
|
||||||
|
|
||||||
|
@@ -38,35 +38,35 @@ struct HeapNode;
|
|||||||
typedef struct Heap Heap;
|
typedef struct Heap Heap;
|
||||||
typedef struct HeapNode HeapNode;
|
typedef struct HeapNode HeapNode;
|
||||||
|
|
||||||
typedef void (*HeapFreeFP)(void *ptr);
|
typedef void (*HeapFreeFP)(void *ptr);
|
||||||
|
|
||||||
/* Creates a new heap. BLI_memarena is used for allocating nodes. Removed nodes
|
/* Creates a new heap. BLI_memarena is used for allocating nodes. Removed nodes
|
||||||
* are recycled, so memory usage will not shrink. */
|
* are recycled, so memory usage will not shrink. */
|
||||||
Heap* BLI_heap_new (void);
|
Heap *BLI_heap_new(void);
|
||||||
void BLI_heap_free (Heap *heap, HeapFreeFP ptrfreefp);
|
void BLI_heap_free(Heap *heap, HeapFreeFP ptrfreefp);
|
||||||
|
|
||||||
/* Insert heap node with a value (often a 'cost') and pointer into the heap,
|
/* Insert heap node with a value (often a 'cost') and pointer into the heap,
|
||||||
* duplicate values are allowed. */
|
* duplicate values are allowed. */
|
||||||
HeapNode* BLI_heap_insert (Heap *heap, float value, void *ptr);
|
HeapNode *BLI_heap_insert(Heap *heap, float value, void *ptr);
|
||||||
|
|
||||||
/* Remove a heap node. */
|
/* Remove a heap node. */
|
||||||
void BLI_heap_remove (Heap *heap, HeapNode *node);
|
void BLI_heap_remove(Heap *heap, HeapNode *node);
|
||||||
|
|
||||||
/* Return 0 if the heap is empty, 1 otherwise. */
|
/* Return 0 if the heap is empty, 1 otherwise. */
|
||||||
int BLI_heap_empty (Heap *heap);
|
int BLI_heap_empty(Heap *heap);
|
||||||
|
|
||||||
/* Return the size of the heap. */
|
/* Return the size of the heap. */
|
||||||
int BLI_heap_size (Heap *heap);
|
int BLI_heap_size(Heap *heap);
|
||||||
|
|
||||||
/* Return the top node of the heap. This is the node with the lowest value. */
|
/* Return the top node of the heap. This is the node with the lowest value. */
|
||||||
HeapNode* BLI_heap_top (Heap *heap);
|
HeapNode *BLI_heap_top(Heap *heap);
|
||||||
|
|
||||||
/* Pop the top node off the heap and return it's pointer. */
|
/* Pop the top node off the heap and return it's pointer. */
|
||||||
void* BLI_heap_popmin (Heap *heap);
|
void *BLI_heap_popmin(Heap *heap);
|
||||||
|
|
||||||
/* Return the value or pointer of a heap node. */
|
/* Return the value or pointer of a heap node. */
|
||||||
float BLI_heap_node_value (HeapNode *heap);
|
float BLI_heap_node_value(HeapNode *heap);
|
||||||
void* BLI_heap_node_ptr (HeapNode *heap);
|
void *BLI_heap_node_ptr(HeapNode *heap);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
* \ingroup bli
|
* \ingroup bli
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void BLI_jitter_init(float *jitarr, int num);
|
void BLI_jitter_init(float *jitarr, int num);
|
||||||
void BLI_jitterate1(float *jit1, float *jit2, int num, float rad1);
|
void BLI_jitterate1(float *jit1, float *jit2, int num, float rad1);
|
||||||
void BLI_jitterate2(float *jit1, float *jit2, int num, float rad2);
|
void BLI_jitterate2(float *jit1, float *jit2, int num, float rad2);
|
||||||
|
|
||||||
|
@@ -49,37 +49,34 @@ typedef struct BVHTreeOverlap {
|
|||||||
int indexB;
|
int indexB;
|
||||||
} BVHTreeOverlap;
|
} BVHTreeOverlap;
|
||||||
|
|
||||||
typedef struct BVHTreeNearest
|
typedef struct BVHTreeNearest {
|
||||||
{
|
int index; /* the index of the nearest found (untouched if none is found within a dist radius from the given coordinates) */
|
||||||
int index; /* the index of the nearest found (untouched if none is found within a dist radius from the given coordinates) */
|
float co[3]; /* nearest coordinates (untouched it none is found within a dist radius from the given coordinates) */
|
||||||
float co[3]; /* nearest coordinates (untouched it none is found within a dist radius from the given coordinates) */
|
float no[3]; /* normal at nearest coordinates (untouched it none is found within a dist radius from the given coordinates) */
|
||||||
float no[3]; /* normal at nearest coordinates (untouched it none is found within a dist radius from the given coordinates) */
|
float dist; /* squared distance to search arround */
|
||||||
float dist; /* squared distance to search arround */
|
|
||||||
} BVHTreeNearest;
|
} BVHTreeNearest;
|
||||||
|
|
||||||
typedef struct BVHTreeRay
|
typedef struct BVHTreeRay {
|
||||||
{
|
float origin[3]; /* ray origin */
|
||||||
float origin[3]; /* ray origin */
|
float direction[3]; /* ray direction */
|
||||||
float direction[3]; /* ray direction */
|
float radius; /* radius around ray */
|
||||||
float radius; /* radius around ray */
|
|
||||||
} BVHTreeRay;
|
} BVHTreeRay;
|
||||||
|
|
||||||
typedef struct BVHTreeRayHit
|
typedef struct BVHTreeRayHit {
|
||||||
{
|
int index; /* index of the tree node (untouched if no hit is found) */
|
||||||
int index; /* index of the tree node (untouched if no hit is found) */
|
float co[3]; /* coordinates of the hit point */
|
||||||
float co[3]; /* coordinates of the hit point */
|
float no[3]; /* normal on hit point */
|
||||||
float no[3]; /* normal on hit point */
|
float dist; /* distance to the hit point */
|
||||||
float dist; /* distance to the hit point */
|
|
||||||
} BVHTreeRayHit;
|
} BVHTreeRayHit;
|
||||||
|
|
||||||
/* callback must update nearest in case it finds a nearest result */
|
/* callback must update nearest in case it finds a nearest result */
|
||||||
typedef void (*BVHTree_NearestPointCallback) (void *userdata, int index, const float *co, BVHTreeNearest *nearest);
|
typedef void (*BVHTree_NearestPointCallback)(void *userdata, int index, const float *co, BVHTreeNearest *nearest);
|
||||||
|
|
||||||
/* callback must update hit in case it finds a nearest successful hit */
|
/* callback must update hit in case it finds a nearest successful hit */
|
||||||
typedef void (*BVHTree_RayCastCallback) (void *userdata, int index, const BVHTreeRay *ray, BVHTreeRayHit *hit);
|
typedef void (*BVHTree_RayCastCallback)(void *userdata, int index, const BVHTreeRay *ray, BVHTreeRayHit *hit);
|
||||||
|
|
||||||
/* callback to range search query */
|
/* callback to range search query */
|
||||||
typedef void (*BVHTree_RangeQuery) (void *userdata, int index, float squared_dist);
|
typedef void (*BVHTree_RangeQuery)(void *userdata, int index, float squared_dist);
|
||||||
|
|
||||||
BVHTree *BLI_bvhtree_new(int maxsize, float epsilon, char tree_type, char axis);
|
BVHTree *BLI_bvhtree_new(int maxsize, float epsilon, char tree_type, char axis);
|
||||||
void BLI_bvhtree_free(BVHTree *tree);
|
void BLI_bvhtree_free(BVHTree *tree);
|
||||||
|
@@ -46,7 +46,7 @@ typedef struct KDTreeNearest {
|
|||||||
} KDTreeNearest;
|
} KDTreeNearest;
|
||||||
|
|
||||||
/* Creates or free a kdtree */
|
/* Creates or free a kdtree */
|
||||||
KDTree* BLI_kdtree_new(int maxsize);
|
KDTree *BLI_kdtree_new(int maxsize);
|
||||||
void BLI_kdtree_free(KDTree *tree);
|
void BLI_kdtree_free(KDTree *tree);
|
||||||
|
|
||||||
/* Construction: first insert points, then call balance. Normal is optional. */
|
/* Construction: first insert points, then call balance. Normal is optional. */
|
||||||
@@ -56,12 +56,11 @@ void BLI_kdtree_balance(KDTree *tree);
|
|||||||
/* Find nearest returns index, and -1 if no node is found.
|
/* Find nearest returns index, and -1 if no node is found.
|
||||||
* Find n nearest returns number of points found, with results in nearest.
|
* Find n nearest returns number of points found, with results in nearest.
|
||||||
* Normal is optional, but if given will limit results to points in normal direction from co. */
|
* Normal is optional, but if given will limit results to points in normal direction from co. */
|
||||||
int BLI_kdtree_find_nearest(KDTree *tree, float *co, float *nor, KDTreeNearest *nearest);
|
int BLI_kdtree_find_nearest(KDTree *tree, float *co, float *nor, KDTreeNearest *nearest);
|
||||||
int BLI_kdtree_find_n_nearest(KDTree *tree, int n, float *co, float *nor, KDTreeNearest *nearest);
|
int BLI_kdtree_find_n_nearest(KDTree *tree, int n, float *co, float *nor, KDTreeNearest *nearest);
|
||||||
|
|
||||||
/* Range search returns number of points found, with results in nearest */
|
/* Range search returns number of points found, with results in nearest */
|
||||||
/* Normal is optional, but if given will limit results to points in normal direction from co. */
|
/* Normal is optional, but if given will limit results to points in normal direction from co. */
|
||||||
/* Remember to free nearest after use! */
|
/* Remember to free nearest after use! */
|
||||||
int BLI_kdtree_range_search(KDTree *tree, float range, float *co, float *nor, KDTreeNearest **nearest);
|
int BLI_kdtree_range_search(KDTree *tree, float range, float *co, float *nor, KDTreeNearest **nearest);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -46,20 +46,19 @@ typedef struct LinkNode {
|
|||||||
void *link;
|
void *link;
|
||||||
} LinkNode;
|
} LinkNode;
|
||||||
|
|
||||||
int BLI_linklist_length (struct LinkNode *list);
|
int BLI_linklist_length(struct LinkNode *list);
|
||||||
int BLI_linklist_index (struct LinkNode *list, void *ptr);
|
int BLI_linklist_index(struct LinkNode *list, void *ptr);
|
||||||
|
|
||||||
struct LinkNode *BLI_linklist_find (struct LinkNode *list, int index);
|
struct LinkNode *BLI_linklist_find(struct LinkNode *list, int index);
|
||||||
|
|
||||||
void BLI_linklist_reverse (struct LinkNode **listp);
|
void BLI_linklist_reverse(struct LinkNode **listp);
|
||||||
|
|
||||||
void BLI_linklist_prepend (struct LinkNode **listp, void *ptr);
|
void BLI_linklist_prepend(struct LinkNode **listp, void *ptr);
|
||||||
void BLI_linklist_append (struct LinkNode **listp, void *ptr);
|
void BLI_linklist_append(struct LinkNode **listp, void *ptr);
|
||||||
void BLI_linklist_prepend_arena (struct LinkNode **listp, void *ptr, struct MemArena *ma);
|
void BLI_linklist_prepend_arena(struct LinkNode **listp, void *ptr, struct MemArena *ma);
|
||||||
void BLI_linklist_insert_after (struct LinkNode **listp, void *ptr);
|
void BLI_linklist_insert_after(struct LinkNode **listp, void *ptr);
|
||||||
|
|
||||||
void BLI_linklist_free (struct LinkNode *list, LinkNodeFreeFP freefunc);
|
void BLI_linklist_free(struct LinkNode *list, LinkNodeFreeFP freefunc);
|
||||||
void BLI_linklist_apply (struct LinkNode *list, LinkNodeApplyFP applyfunc, void *userdata);
|
void BLI_linklist_apply(struct LinkNode *list, LinkNodeApplyFP applyfunc, void *userdata);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -127,19 +127,19 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#ifndef FREE_WINDOWS
|
# ifndef FREE_WINDOWS
|
||||||
#define isnan(n) _isnan(n)
|
# define isnan(n) _isnan(n)
|
||||||
#define finite _finite
|
# define finite _finite
|
||||||
#define hypot _hypot
|
# define hypot _hypot
|
||||||
#endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef SWAP
|
#ifndef SWAP
|
||||||
#define SWAP(type, a, b) { type sw_ap; sw_ap=(a); (a)=(b); (b)=sw_ap; }
|
# define SWAP(type, a, b) { type sw_ap; sw_ap = (a); (a) = (b); (b) = sw_ap; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef CLAMP
|
#ifndef CLAMP
|
||||||
#define CLAMP(a, b, c) if((a)<(b)) (a)=(b); else if((a)>(c)) (a)=(c)
|
# define CLAMP(a, b, c) if ((a) < (b)) (a) = (b); else if ((a) > (c)) (a) = (c)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __BLI_MATH_INLINE_H__
|
#ifdef __BLI_MATH_INLINE_H__
|
||||||
|
@@ -37,19 +37,19 @@ extern "C" {
|
|||||||
#include "BLI_math_inline.h"
|
#include "BLI_math_inline.h"
|
||||||
|
|
||||||
/* primaries */
|
/* primaries */
|
||||||
#define BLI_XYZ_SMPTE 0
|
#define BLI_XYZ_SMPTE 0
|
||||||
#define BLI_XYZ_REC709_SRGB 1
|
#define BLI_XYZ_REC709_SRGB 1
|
||||||
#define BLI_XYZ_CIE 2
|
#define BLI_XYZ_CIE 2
|
||||||
|
|
||||||
/* built-in profiles */
|
/* built-in profiles */
|
||||||
#define BLI_PR_NONE 0
|
#define BLI_PR_NONE 0
|
||||||
#define BLI_PR_SRGB 1
|
#define BLI_PR_SRGB 1
|
||||||
#define BLI_PR_REC709 2
|
#define BLI_PR_REC709 2
|
||||||
|
|
||||||
/* YCbCr */
|
/* YCbCr */
|
||||||
#define BLI_YCC_ITU_BT601 0
|
#define BLI_YCC_ITU_BT601 0
|
||||||
#define BLI_YCC_ITU_BT709 1
|
#define BLI_YCC_ITU_BT709 1
|
||||||
#define BLI_YCC_JFIF_0_255 2
|
#define BLI_YCC_JFIF_0_255 2
|
||||||
|
|
||||||
/******************* Conversion to RGB ********************/
|
/******************* Conversion to RGB ********************/
|
||||||
|
|
||||||
@@ -101,8 +101,8 @@ void BLI_init_srgb_conversion(void);
|
|||||||
int constrain_rgb(float *r, float *g, float *b);
|
int constrain_rgb(float *r, float *g, float *b);
|
||||||
void minmax_rgb(short c[3]);
|
void minmax_rgb(short c[3]);
|
||||||
|
|
||||||
void rgb_float_set_hue_float_offset(float * rgb, float hue_offset);
|
void rgb_float_set_hue_float_offset(float *rgb, float hue_offset);
|
||||||
void rgb_byte_set_hue_float_offset(unsigned char * rgb, float hue_offset);
|
void rgb_byte_set_hue_float_offset(unsigned char *rgb, float hue_offset);
|
||||||
|
|
||||||
void rgb_uchar_to_float(float col_r[3], const unsigned char col_ub[3]);
|
void rgb_uchar_to_float(float col_r[3], const unsigned char col_ub[3]);
|
||||||
void rgba_uchar_to_float(float col_r[4], const unsigned char col_ub[4]);
|
void rgba_uchar_to_float(float col_r[4], const unsigned char col_ub[4]);
|
||||||
|
@@ -67,23 +67,23 @@ float dist_to_plane_v3(const float p[3], const float plane_co[3], const float pl
|
|||||||
float dist_to_line_segment_v3(const float p[3], const float l1[3], const float l2[3]);
|
float dist_to_line_segment_v3(const float p[3], const float l1[3], const float l2[3]);
|
||||||
float closest_to_line_v3(float r[3], const float p[3], const float l1[3], const float l2[3]);
|
float closest_to_line_v3(float r[3], const float p[3], const float l1[3], const float l2[3]);
|
||||||
float closest_to_line_v2(float r[2], const float p[2], const float l1[2], const float l2[2]);
|
float closest_to_line_v2(float r[2], const float p[2], const float l1[2], const float l2[2]);
|
||||||
void closest_to_line_segment_v3(float r[3], const float p[3], const float l1[3], const float l2[3]);
|
void closest_to_line_segment_v3(float r[3], const float p[3], const float l1[3], const float l2[3]);
|
||||||
void closest_to_plane_v3(float r[3], const float plane_co[3], const float plane_no_unit[3], const float pt[3]);
|
void closest_to_plane_v3(float r[3], const float plane_co[3], const float plane_no_unit[3], const float pt[3]);
|
||||||
|
|
||||||
|
|
||||||
float line_point_factor_v3(const float p[3], const float l1[3], const float l2[3]);
|
float line_point_factor_v3(const float p[3], const float l1[3], const float l2[3]);
|
||||||
float line_point_factor_v2(const float p[2], const float l1[2], const float l2[2]);
|
float line_point_factor_v2(const float p[2], const float l1[2], const float l2[2]);
|
||||||
void limit_dist_v3(float v1[3], float v2[3], const float dist);
|
void limit_dist_v3(float v1[3], float v2[3], const float dist);
|
||||||
|
|
||||||
/******************************* Intersection ********************************/
|
/******************************* Intersection ********************************/
|
||||||
|
|
||||||
/* TODO int return value consistency */
|
/* TODO int return value consistency */
|
||||||
|
|
||||||
/* line-line */
|
/* line-line */
|
||||||
#define ISECT_LINE_LINE_COLINEAR -1
|
#define ISECT_LINE_LINE_COLINEAR -1
|
||||||
#define ISECT_LINE_LINE_NONE 0
|
#define ISECT_LINE_LINE_NONE 0
|
||||||
#define ISECT_LINE_LINE_EXACT 1
|
#define ISECT_LINE_LINE_EXACT 1
|
||||||
#define ISECT_LINE_LINE_CROSS 2
|
#define ISECT_LINE_LINE_CROSS 2
|
||||||
|
|
||||||
int isect_line_line_v2(const float a1[2], const float a2[2], const float b1[2], const float b2[2]);
|
int isect_line_line_v2(const float a1[2], const float a2[2], const float b1[2], const float b2[2]);
|
||||||
int isect_line_line_v2_int(const int a1[2], const int a2[2], const int b1[2], const int b2[2]);
|
int isect_line_line_v2_int(const int a1[2], const int a2[2], const int b1[2], const int b2[2]);
|
||||||
@@ -139,13 +139,13 @@ void isect_plane_plane_v3(float r_isect_co[3], float r_isect_no[3],
|
|||||||
|
|
||||||
/* line/ray triangle */
|
/* line/ray triangle */
|
||||||
int isect_line_tri_v3(const float p1[3], const float p2[3],
|
int isect_line_tri_v3(const float p1[3], const float p2[3],
|
||||||
const float v0[3], const float v1[3], const float v2[3], float *r_lambda, float r_uv[2]);
|
const float v0[3], const float v1[3], const float v2[3], float *r_lambda, float r_uv[2]);
|
||||||
int isect_ray_tri_v3(const float p1[3], const float d[3],
|
int isect_ray_tri_v3(const float p1[3], const float d[3],
|
||||||
const float v0[3], const float v1[3], const float v2[3], float *r_lambda, float r_uv[2]);
|
const float v0[3], const float v1[3], const float v2[3], float *r_lambda, float r_uv[2]);
|
||||||
int isect_ray_tri_threshold_v3(const float p1[3], const float d[3],
|
int isect_ray_tri_threshold_v3(const float p1[3], const float d[3],
|
||||||
const float v0[3], const float v1[3], const float v2[3], float *r_lambda, float r_uv[2], const float threshold);
|
const float v0[3], const float v1[3], const float v2[3], float *r_lambda, float r_uv[2], const float threshold);
|
||||||
int isect_ray_tri_epsilon_v3(const float p1[3], const float d[3],
|
int isect_ray_tri_epsilon_v3(const float p1[3], const float d[3],
|
||||||
const float v0[3], const float v1[3], const float v2[3], float *r_lambda, float r_uv[2], const float epsilon);
|
const float v0[3], const float v1[3], const float v2[3], float *r_lambda, float r_uv[2], const float epsilon);
|
||||||
|
|
||||||
/* point in polygon */
|
/* point in polygon */
|
||||||
int isect_point_quad_v2(const float p[2], const float a[2], const float b[2], const float c[2], const float d[2]);
|
int isect_point_quad_v2(const float p[2], const float a[2], const float b[2], const float c[2], const float d[2]);
|
||||||
@@ -161,10 +161,10 @@ void isect_point_face_uv_v2(const int isquad, const float v0[2], const float v1[
|
|||||||
|
|
||||||
/* other */
|
/* other */
|
||||||
int isect_sweeping_sphere_tri_v3(const float p1[3], const float p2[3], const float radius,
|
int isect_sweeping_sphere_tri_v3(const float p1[3], const float p2[3], const float radius,
|
||||||
const float v0[3], const float v1[3], const float v2[3], float *r_lambda, float ipoint[3]);
|
const float v0[3], const float v1[3], const float v2[3], float *r_lambda, float ipoint[3]);
|
||||||
|
|
||||||
int isect_axial_line_tri_v3(const int axis, const float co1[3], const float co2[3],
|
int isect_axial_line_tri_v3(const int axis, const float co1[3], const float co2[3],
|
||||||
const float v0[3], const float v1[3], const float v2[3], float *r_lambda);
|
const float v0[3], const float v1[3], const float v2[3], float *r_lambda);
|
||||||
|
|
||||||
int isect_aabb_aabb_v3(const float min1[3], const float max1[3], const float min2[3], const float max2[3]);
|
int isect_aabb_aabb_v3(const float min1[3], const float max1[3], const float min2[3], const float max2[3]);
|
||||||
|
|
||||||
@@ -176,20 +176,20 @@ void plot_line_v2v2i(const int p1[2], const int p2[2], int (*callback)(int, int,
|
|||||||
|
|
||||||
/* tri or quad, d can be NULL */
|
/* tri or quad, d can be NULL */
|
||||||
void interp_weights_face_v3(float w[4],
|
void interp_weights_face_v3(float w[4],
|
||||||
const float a[3], const float b[3], const float c[3], const float d[3], const float p[3]);
|
const float a[3], const float b[3], const float c[3], const float d[3], const float p[3]);
|
||||||
void interp_weights_poly_v3(float w[], float v[][3], const int n, const float p[3]);
|
void interp_weights_poly_v3(float w[], float v[][3], const int n, const float p[3]);
|
||||||
|
|
||||||
void interp_cubic_v3(float x[3], float v[3],
|
void interp_cubic_v3(float x[3], float v[3],
|
||||||
const float x1[3], const float v1[3], const float x2[3], const float v2[3], const float t);
|
const float x1[3], const float v1[3], const float x2[3], const float v2[3], const float t);
|
||||||
|
|
||||||
int interp_sparse_array(float *array, const int list_size, const float invalid);
|
int interp_sparse_array(float *array, const int list_size, const float invalid);
|
||||||
|
|
||||||
void barycentric_transform(float pt_tar[3], float const pt_src[3],
|
void barycentric_transform(float pt_tar[3], float const pt_src[3],
|
||||||
const float tri_tar_p1[3], const float tri_tar_p2[3], const float tri_tar_p3[3],
|
const float tri_tar_p1[3], const float tri_tar_p2[3], const float tri_tar_p3[3],
|
||||||
const float tri_src_p1[3], const float tri_src_p2[3], const float tri_src_p3[3]);
|
const float tri_src_p1[3], const float tri_src_p2[3], const float tri_src_p3[3]);
|
||||||
|
|
||||||
void barycentric_weights_v2(const float v1[2], const float v2[2], const float v3[2],
|
void barycentric_weights_v2(const float v1[2], const float v2[2], const float v3[2],
|
||||||
const float co[2], float w[3]);
|
const float co[2], float w[3]);
|
||||||
|
|
||||||
void resolve_tri_uv(float r_uv[2], const float st[2], const float st0[2], const float st1[2], const float st2[2]);
|
void resolve_tri_uv(float r_uv[2], const float st[2], const float st0[2], const float st1[2], const float st2[2]);
|
||||||
void resolve_quad_uv(float uv[2], const float st[2], const float st0[2], const float st1[2], const float st2[2], const float st3[2]);
|
void resolve_quad_uv(float uv[2], const float st[2], const float st0[2], const float st1[2], const float st2[2], const float st3[2]);
|
||||||
@@ -197,21 +197,21 @@ void resolve_quad_uv(float uv[2], const float st[2], const float st0[2], const f
|
|||||||
/***************************** View & Projection *****************************/
|
/***************************** View & Projection *****************************/
|
||||||
|
|
||||||
void lookat_m4(float mat[4][4], float vx, float vy,
|
void lookat_m4(float mat[4][4], float vx, float vy,
|
||||||
float vz, float px, float py, float pz, float twist);
|
float vz, float px, float py, float pz, float twist);
|
||||||
void polarview_m4(float mat[4][4], float dist, float azimuth,
|
void polarview_m4(float mat[4][4], float dist, float azimuth,
|
||||||
float incidence, float twist);
|
float incidence, float twist);
|
||||||
|
|
||||||
void perspective_m4(float mat[4][4], const float left, const float right,
|
void perspective_m4(float mat[4][4], const float left, const float right,
|
||||||
const float bottom, const float top, const float nearClip, const float farClip);
|
const float bottom, const float top, const float nearClip, const float farClip);
|
||||||
void orthographic_m4(float mat[4][4], const float left, const float right,
|
void orthographic_m4(float mat[4][4], const float left, const float right,
|
||||||
const float bottom, const float top, const float nearClip, const float farClip);
|
const float bottom, const float top, const float nearClip, const float farClip);
|
||||||
void window_translate_m4(float winmat[][4], float perspmat[][4],
|
void window_translate_m4(float winmat[][4], float perspmat[][4],
|
||||||
const float x, const float y);
|
const float x, const float y);
|
||||||
|
|
||||||
int box_clip_bounds_m4(float boundbox[2][3],
|
int box_clip_bounds_m4(float boundbox[2][3],
|
||||||
const float bounds[4], float winmat[4][4]);
|
const float bounds[4], float winmat[4][4]);
|
||||||
void box_minmax_bounds_m4(float min[3], float max[3],
|
void box_minmax_bounds_m4(float min[3], float max[3],
|
||||||
float boundbox[2][3], float mat[4][4]);
|
float boundbox[2][3], float mat[4][4]);
|
||||||
|
|
||||||
/********************************** Mapping **********************************/
|
/********************************** Mapping **********************************/
|
||||||
|
|
||||||
@@ -221,11 +221,11 @@ void map_to_sphere(float *r_u, float *r_v, const float x, const float y, const f
|
|||||||
/********************************** Normals **********************************/
|
/********************************** Normals **********************************/
|
||||||
|
|
||||||
void accumulate_vertex_normals(float n1[3], float n2[3], float n3[3],
|
void accumulate_vertex_normals(float n1[3], float n2[3], float n3[3],
|
||||||
float n4[3], const float f_no[3], const float co1[3], const float co2[3],
|
float n4[3], const float f_no[3], const float co1[3], const float co2[3],
|
||||||
const float co3[3], const float co4[3]);
|
const float co3[3], const float co4[3]);
|
||||||
|
|
||||||
void accumulate_vertex_normals_poly(float **vertnos, float polyno[3],
|
void accumulate_vertex_normals_poly(float **vertnos, float polyno[3],
|
||||||
float **vertcos, float vdiffs[][3], int nverts);
|
float **vertcos, float vdiffs[][3], int nverts);
|
||||||
|
|
||||||
/********************************* Tangents **********************************/
|
/********************************* Tangents **********************************/
|
||||||
|
|
||||||
@@ -236,15 +236,15 @@ typedef struct VertexTangent {
|
|||||||
|
|
||||||
float *find_vertex_tangent(VertexTangent *vtang, const float uv[2]);
|
float *find_vertex_tangent(VertexTangent *vtang, const float uv[2]);
|
||||||
void sum_or_add_vertex_tangent(void *arena, VertexTangent **vtang,
|
void sum_or_add_vertex_tangent(void *arena, VertexTangent **vtang,
|
||||||
const float tang[3], const float uv[2]);
|
const float tang[3], const float uv[2]);
|
||||||
void tangent_from_uv(float uv1[2], float uv2[2], float uv3[2],
|
void tangent_from_uv(float uv1[2], float uv2[2], float uv3[2],
|
||||||
float co1[3], float co2[3], float co3[3], float n[3], float tang[3]);
|
float co1[3], float co2[3], float co3[3], float n[3], float tang[3]);
|
||||||
|
|
||||||
/******************************** Vector Clouds ******************************/
|
/******************************** Vector Clouds ******************************/
|
||||||
|
|
||||||
void vcloud_estimate_transform(int list_size, float (*pos)[3], float *weight,
|
void vcloud_estimate_transform(int list_size, float (*pos)[3], float *weight,
|
||||||
float (*rpos)[3], float *rweight,
|
float (*rpos)[3], float *rweight,
|
||||||
float lloc[3], float rloc[3], float lrot[3][3], float lscale[3][3]);
|
float lloc[3], float rloc[3], float lrot[3][3], float lscale[3][3]);
|
||||||
|
|
||||||
/****************************** Spherical Harmonics *************************/
|
/****************************** Spherical Harmonics *************************/
|
||||||
|
|
||||||
@@ -266,7 +266,7 @@ MINLINE void madd_sh_shfl(float r[9], const float sh[3], const float f);
|
|||||||
/********************************* Form Factor *******************************/
|
/********************************* Form Factor *******************************/
|
||||||
|
|
||||||
float form_factor_hemi_poly(float p[3], float n[3],
|
float form_factor_hemi_poly(float p[3], float n[3],
|
||||||
float v1[3], float v2[3], float v3[3], float v4[3]);
|
float v1[3], float v2[3], float v3[3], float v4[3]);
|
||||||
|
|
||||||
void axis_dominant_v3(int *axis_a, int *axis_b, const float axis[3]);
|
void axis_dominant_v3(int *axis_a, int *axis_b, const float axis[3]);
|
||||||
|
|
||||||
|
@@ -36,13 +36,13 @@ extern "C" {
|
|||||||
|
|
||||||
/********************************* Init **************************************/
|
/********************************* Init **************************************/
|
||||||
|
|
||||||
#define MAT4_UNITY {{ 1.0, 0.0, 0.0, 0.0},\
|
#define MAT4_UNITY {{ 1.0, 0.0, 0.0, 0.0}, \
|
||||||
{ 0.0, 1.0, 0.0, 0.0},\
|
{ 0.0, 1.0, 0.0, 0.0}, \
|
||||||
{ 0.0, 0.0, 1.0, 0.0},\
|
{ 0.0, 0.0, 1.0, 0.0}, \
|
||||||
{ 0.0, 0.0, 0.0, 1.0}}
|
{ 0.0, 0.0, 0.0, 1.0}}
|
||||||
|
|
||||||
#define MAT3_UNITY {{ 1.0, 0.0, 0.0},\
|
#define MAT3_UNITY {{ 1.0, 0.0, 0.0}, \
|
||||||
{ 0.0, 1.0, 0.0},\
|
{ 0.0, 1.0, 0.0}, \
|
||||||
{ 0.0, 0.0, 1.0}}
|
{ 0.0, 0.0, 1.0}}
|
||||||
|
|
||||||
void zero_m3(float R[3][3]);
|
void zero_m3(float R[3][3]);
|
||||||
@@ -76,11 +76,11 @@ void mult_m4_m4m4(float R[4][4], float A[4][4], float B[4][4]);
|
|||||||
void mult_m3_m3m4(float R[3][3], float A[4][4], float B[3][3]);
|
void mult_m3_m3m4(float R[3][3], float A[4][4], float B[3][3]);
|
||||||
|
|
||||||
void mul_serie_m3(float R[3][3],
|
void mul_serie_m3(float R[3][3],
|
||||||
float M1[3][3], float M2[3][3], float M3[3][3], float M4[3][3],
|
float M1[3][3], float M2[3][3], float M3[3][3], float M4[3][3],
|
||||||
float M5[3][3], float M6[3][3], float M7[3][3], float M8[3][3]);
|
float M5[3][3], float M6[3][3], float M7[3][3], float M8[3][3]);
|
||||||
void mul_serie_m4(float R[4][4],
|
void mul_serie_m4(float R[4][4],
|
||||||
float M1[4][4], float M2[4][4], float M3[4][4], float M4[4][4],
|
float M1[4][4], float M2[4][4], float M3[4][4], float M4[4][4],
|
||||||
float M5[4][4], float M6[4][4], float M7[4][4], float M8[4][4]);
|
float M5[4][4], float M6[4][4], float M7[4][4], float M8[4][4]);
|
||||||
|
|
||||||
void mul_m4_v3(float M[4][4], float r[3]);
|
void mul_m4_v3(float M[4][4], float r[3]);
|
||||||
void mul_v3_m4v3(float r[3], float M[4][4], const float v[3]);
|
void mul_v3_m4v3(float r[3], float M[4][4], const float v[3]);
|
||||||
@@ -131,13 +131,11 @@ int is_uniform_scaled_m3(float mat[3][3]);
|
|||||||
void adjoint_m3_m3(float R[3][3], float A[3][3]);
|
void adjoint_m3_m3(float R[3][3], float A[3][3]);
|
||||||
void adjoint_m4_m4(float R[4][4], float A[4][4]);
|
void adjoint_m4_m4(float R[4][4], float A[4][4]);
|
||||||
|
|
||||||
float determinant_m2(
|
float determinant_m2(float a, float b,
|
||||||
float a, float b,
|
float c, float d);
|
||||||
float c, float d);
|
float determinant_m3(float a, float b, float c,
|
||||||
float determinant_m3(
|
float d, float e, float f,
|
||||||
float a, float b, float c,
|
float g, float h, float i);
|
||||||
float d, float e, float f,
|
|
||||||
float g, float h, float i);
|
|
||||||
float determinant_m4(float A[4][4]);
|
float determinant_m4(float A[4][4]);
|
||||||
|
|
||||||
void svd_m4(float U[4][4], float s[4], float V[4][4], float A[4][4]);
|
void svd_m4(float U[4][4], float s[4], float V[4][4], float A[4][4]);
|
||||||
@@ -165,13 +163,13 @@ void mat3_to_rot_size(float rot[3][3], float size[3], float mat3[][3]);
|
|||||||
void mat4_to_loc_rot_size(float loc[3], float rot[3][3], float size[3], float wmat[][4]);
|
void mat4_to_loc_rot_size(float loc[3], float rot[3][3], float size[3], float wmat[][4]);
|
||||||
|
|
||||||
void loc_eul_size_to_mat4(float R[4][4],
|
void loc_eul_size_to_mat4(float R[4][4],
|
||||||
const float loc[3], const float eul[3], const float size[3]);
|
const float loc[3], const float eul[3], const float size[3]);
|
||||||
void loc_eulO_size_to_mat4(float R[4][4],
|
void loc_eulO_size_to_mat4(float R[4][4],
|
||||||
const float loc[3], const float eul[3], const float size[3], const short order);
|
const float loc[3], const float eul[3], const float size[3], const short order);
|
||||||
void loc_quat_size_to_mat4(float R[4][4],
|
void loc_quat_size_to_mat4(float R[4][4],
|
||||||
const float loc[3], const float quat[4], const float size[3]);
|
const float loc[3], const float quat[4], const float size[3]);
|
||||||
void loc_axisangle_size_to_mat4(float R[4][4],
|
void loc_axisangle_size_to_mat4(float R[4][4],
|
||||||
const float loc[3], const float axis[4], const float angle, const float size[3]);
|
const float loc[3], const float axis[4], const float angle, const float size[3]);
|
||||||
|
|
||||||
void blend_m3_m3m3(float R[3][3], float A[3][3], float B[3][3], const float t);
|
void blend_m3_m3m3(float R[3][3], float A[3][3], float B[3][3], const float t);
|
||||||
void blend_m4_m4m4(float R[4][4], float A[4][4], float B[4][4], const float t);
|
void blend_m4_m4m4(float R[4][4], float A[4][4], float B[4][4], const float t);
|
||||||
|
@@ -34,12 +34,12 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define RAD2DEG(_rad) ((_rad)*(180.0/M_PI))
|
#define RAD2DEG(_rad) ((_rad) * (180.0 / M_PI))
|
||||||
#define DEG2RAD(_deg) ((_deg)*(M_PI/180.0))
|
#define DEG2RAD(_deg) ((_deg) * (M_PI / 180.0))
|
||||||
|
|
||||||
|
|
||||||
#define RAD2DEGF(_rad) ((_rad)*(float)(180.0/M_PI))
|
#define RAD2DEGF(_rad) ((_rad) * (float)(180.0 / M_PI))
|
||||||
#define DEG2RADF(_deg) ((_deg)*(float)(M_PI/180.0))
|
#define DEG2RADF(_deg) ((_deg) * (float)(M_PI / 180.0))
|
||||||
|
|
||||||
/******************************** Quaternions ********************************/
|
/******************************** Quaternions ********************************/
|
||||||
/* stored in (w, x, y, z) order */
|
/* stored in (w, x, y, z) order */
|
||||||
@@ -171,10 +171,10 @@ typedef struct DualQuat {
|
|||||||
void copy_dq_dq(DualQuat *r, DualQuat *dq);
|
void copy_dq_dq(DualQuat *r, DualQuat *dq);
|
||||||
void normalize_dq(DualQuat *dq, float totw);
|
void normalize_dq(DualQuat *dq, float totw);
|
||||||
void add_weighted_dq_dq(DualQuat *r, DualQuat *dq, float weight);
|
void add_weighted_dq_dq(DualQuat *r, DualQuat *dq, float weight);
|
||||||
void mul_v3m3_dq(float r[3], float R[3][3], DualQuat *dq);
|
void mul_v3m3_dq(float r[3], float R[3][3], DualQuat * dq);
|
||||||
|
|
||||||
void mat4_to_dquat(DualQuat *r, float base[4][4], float M[4][4]);
|
void mat4_to_dquat(DualQuat * r, float base[4][4], float M[4][4]);
|
||||||
void dquat_to_mat4(float R[4][4], DualQuat *dq);
|
void dquat_to_mat4(float R[4][4], DualQuat * dq);
|
||||||
|
|
||||||
void quat_apply_track(float quat[4], short axis, short upflag);
|
void quat_apply_track(float quat[4], short axis, short upflag);
|
||||||
void vec_apply_track(float vec[3], short axis);
|
void vec_apply_track(float vec[3], short axis);
|
||||||
|
@@ -189,7 +189,7 @@ float angle_normalized_v3v3(const float v1[3], const float v2[3]);
|
|||||||
float angle_on_axis_v3v3v3_v3(const float v1[3], const float v2[3], const float v3[3], const float axis[3]);
|
float angle_on_axis_v3v3v3_v3(const float v1[3], const float v2[3], const float v3[3], const float axis[3]);
|
||||||
void angle_tri_v3(float angles[3], const float v1[3], const float v2[3], const float v3[3]);
|
void angle_tri_v3(float angles[3], const float v1[3], const float v2[3], const float v3[3]);
|
||||||
void angle_quad_v3(float angles[4], const float v1[3], const float v2[3], const float v3[3], const float v4[3]);
|
void angle_quad_v3(float angles[4], const float v1[3], const float v2[3], const float v3[3], const float v4[3]);
|
||||||
void angle_poly_v3(float* angles, const float* verts[3], int len);
|
void angle_poly_v3(float *angles, const float *verts[3], int len);
|
||||||
|
|
||||||
/********************************* Geometry **********************************/
|
/********************************* Geometry **********************************/
|
||||||
|
|
||||||
@@ -237,4 +237,3 @@ void fill_vn_fl(float *array_tar, const int size, const float val);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __BLI_MATH_VECTOR_H__ */
|
#endif /* __BLI_MATH_VECTOR_H__ */
|
||||||
|
|
||||||
|
@@ -41,25 +41,25 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* A reasonable standard buffer size, big
|
/* A reasonable standard buffer size, big
|
||||||
* enough to not cause much internal fragmentation,
|
* enough to not cause much internal fragmentation,
|
||||||
* small enough not to waste resources
|
* small enough not to waste resources
|
||||||
*/
|
*/
|
||||||
#define BLI_MEMARENA_STD_BUFSIZE (1<<14)
|
#define BLI_MEMARENA_STD_BUFSIZE (1 << 14)
|
||||||
|
|
||||||
struct MemArena;
|
struct MemArena;
|
||||||
typedef struct MemArena MemArena;
|
typedef struct MemArena MemArena;
|
||||||
|
|
||||||
|
|
||||||
struct MemArena* BLI_memarena_new (int bufsize, const char *name);
|
struct MemArena *BLI_memarena_new(int bufsize, const char *name);
|
||||||
void BLI_memarena_free (struct MemArena *ma);
|
void BLI_memarena_free(struct MemArena *ma);
|
||||||
|
|
||||||
void BLI_memarena_use_malloc (struct MemArena *ma);
|
void BLI_memarena_use_malloc(struct MemArena *ma);
|
||||||
void BLI_memarena_use_calloc (struct MemArena *ma);
|
void BLI_memarena_use_calloc(struct MemArena *ma);
|
||||||
|
|
||||||
void BLI_memarena_use_align(struct MemArena *ma, int align);
|
void BLI_memarena_use_align(struct MemArena *ma, int align);
|
||||||
|
|
||||||
void* BLI_memarena_alloc (struct MemArena *ma, int size);
|
void *BLI_memarena_alloc(struct MemArena *ma, int size);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@@ -54,7 +54,7 @@ float mg_HeteroTerrain(float x, float y, float z, float H, float lacunarity, flo
|
|||||||
float mg_HybridMultiFractal(float x, float y, float z, float H, float lacunarity, float octaves, float offset, float gain, int noisebasis);
|
float mg_HybridMultiFractal(float x, float y, float z, float H, float lacunarity, float octaves, float offset, float gain, int noisebasis);
|
||||||
float mg_RidgedMultiFractal(float x, float y, float z, float H, float lacunarity, float octaves, float offset, float gain, int noisebasis);
|
float mg_RidgedMultiFractal(float x, float y, float z, float H, float lacunarity, float octaves, float offset, float gain, int noisebasis);
|
||||||
/* newnoise: voronoi */
|
/* newnoise: voronoi */
|
||||||
void voronoi(float x, float y, float z, float* da, float* pa, float me, int dtype);
|
void voronoi(float x, float y, float z, float *da, float *pa, float me, int dtype);
|
||||||
/* newnoise: cellNoise & cellNoiseV (for vector/point/color) */
|
/* newnoise: cellNoise & cellNoiseV (for vector/point/color) */
|
||||||
float cellNoise(float x, float y, float z);
|
float cellNoise(float x, float y, float z);
|
||||||
void cellNoiseV(float x, float y, float z, float *ca);
|
void cellNoiseV(float x, float y, float z, float *ca);
|
||||||
|
@@ -48,29 +48,29 @@ char *BLI_get_folder_version(const int id, const int ver, const int do_check);
|
|||||||
/* folder_id */
|
/* folder_id */
|
||||||
|
|
||||||
/* general, will find based on user/local/system priority */
|
/* general, will find based on user/local/system priority */
|
||||||
#define BLENDER_DATAFILES 2
|
#define BLENDER_DATAFILES 2
|
||||||
|
|
||||||
/* user-specific */
|
/* user-specific */
|
||||||
#define BLENDER_USER_CONFIG 31
|
#define BLENDER_USER_CONFIG 31
|
||||||
#define BLENDER_USER_DATAFILES 32
|
#define BLENDER_USER_DATAFILES 32
|
||||||
#define BLENDER_USER_SCRIPTS 33
|
#define BLENDER_USER_SCRIPTS 33
|
||||||
#define BLENDER_USER_PLUGINS 34
|
#define BLENDER_USER_PLUGINS 34
|
||||||
#define BLENDER_USER_AUTOSAVE 35
|
#define BLENDER_USER_AUTOSAVE 35
|
||||||
|
|
||||||
/* system */
|
/* system */
|
||||||
#define BLENDER_SYSTEM_DATAFILES 52
|
#define BLENDER_SYSTEM_DATAFILES 52
|
||||||
#define BLENDER_SYSTEM_SCRIPTS 53
|
#define BLENDER_SYSTEM_SCRIPTS 53
|
||||||
#define BLENDER_SYSTEM_PLUGINS 54
|
#define BLENDER_SYSTEM_PLUGINS 54
|
||||||
#define BLENDER_SYSTEM_PYTHON 54
|
#define BLENDER_SYSTEM_PYTHON 54
|
||||||
|
|
||||||
/* for BLI_get_folder_version only */
|
/* for BLI_get_folder_version only */
|
||||||
#define BLENDER_RESOURCE_PATH_USER 0
|
#define BLENDER_RESOURCE_PATH_USER 0
|
||||||
#define BLENDER_RESOURCE_PATH_LOCAL 1
|
#define BLENDER_RESOURCE_PATH_LOCAL 1
|
||||||
#define BLENDER_RESOURCE_PATH_SYSTEM 2
|
#define BLENDER_RESOURCE_PATH_SYSTEM 2
|
||||||
|
|
||||||
#define BLENDER_STARTUP_FILE "startup.blend"
|
#define BLENDER_STARTUP_FILE "startup.blend"
|
||||||
#define BLENDER_BOOKMARK_FILE "bookmarks.txt"
|
#define BLENDER_BOOKMARK_FILE "bookmarks.txt"
|
||||||
#define BLENDER_HISTORY_FILE "recent-files.txt"
|
#define BLENDER_HISTORY_FILE "recent-files.txt"
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#define SEP '\\'
|
#define SEP '\\'
|
||||||
@@ -81,7 +81,7 @@ char *BLI_get_folder_version(const int id, const int ver, const int do_check);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
void BLI_setenv(const char *env, const char *val);
|
void BLI_setenv(const char *env, const char *val);
|
||||||
void BLI_setenv_if_new(const char *env, const char* val);
|
void BLI_setenv_if_new(const char *env, const char *val);
|
||||||
|
|
||||||
void BLI_make_file_string(const char *relabase, char *string, const char *dir, const char *file);
|
void BLI_make_file_string(const char *relabase, char *string, const char *dir, const char *file);
|
||||||
void BLI_make_exist(char *dir);
|
void BLI_make_exist(char *dir);
|
||||||
@@ -93,11 +93,11 @@ void BLI_join_dirfile(char *string, const size_t maxlen, const char *dir, const
|
|||||||
char *BLI_path_basename(char *path);
|
char *BLI_path_basename(char *path);
|
||||||
int BKE_rebase_path(char *abs, size_t abs_len, char *rel, size_t rel_len, const char *base_dir, const char *src_dir, const char *dest_dir);
|
int BKE_rebase_path(char *abs, size_t abs_len, char *rel, size_t rel_len, const char *base_dir, const char *src_dir, const char *dest_dir);
|
||||||
char *BLI_last_slash(const char *string);
|
char *BLI_last_slash(const char *string);
|
||||||
int BLI_add_slash(char *string);
|
int BLI_add_slash(char *string);
|
||||||
void BLI_del_slash(char *string);
|
void BLI_del_slash(char *string);
|
||||||
char *BLI_first_slash(char *string);
|
char *BLI_first_slash(char *string);
|
||||||
|
|
||||||
void BLI_getlastdir(const char* dir, char *last, const size_t maxlen);
|
void BLI_getlastdir(const char *dir, char *last, const size_t maxlen);
|
||||||
int BLI_testextensie(const char *str, const char *ext);
|
int BLI_testextensie(const char *str, const char *ext);
|
||||||
int BLI_testextensie_array(const char *str, const char **ext_array);
|
int BLI_testextensie_array(const char *str, const char **ext_array);
|
||||||
int BLI_testextensie_glob(const char *str, const char *ext_fnmatch);
|
int BLI_testextensie_glob(const char *str, const char *ext_fnmatch);
|
||||||
@@ -105,7 +105,7 @@ int BLI_replace_extension(char *path, size_t maxlen, const char *ext);
|
|||||||
int BLI_ensure_extension(char *path, size_t maxlen, const char *ext);
|
int BLI_ensure_extension(char *path, size_t maxlen, const char *ext);
|
||||||
void BLI_uniquename(struct ListBase *list, void *vlink, const char defname[], char delim, short name_offs, short len);
|
void BLI_uniquename(struct ListBase *list, void *vlink, const char defname[], char delim, short name_offs, short len);
|
||||||
int BLI_uniquename_cb(int (*unique_check)(void *, const char *), void *arg, const char defname[], char delim, char *name, short name_len);
|
int BLI_uniquename_cb(int (*unique_check)(void *, const char *), void *arg, const char defname[], char delim, char *name, short name_len);
|
||||||
void BLI_newname(char * name, int add);
|
void BLI_newname(char *name, int add);
|
||||||
int BLI_stringdec(const char *string, char *head, char *start, unsigned short *numlen);
|
int BLI_stringdec(const char *string, char *head, char *start, unsigned short *numlen);
|
||||||
void BLI_stringenc(char *string, const char *head, const char *tail, unsigned short numlen, int pic);
|
void BLI_stringenc(char *string, const char *head, const char *tail, unsigned short numlen, int pic);
|
||||||
int BLI_split_name_num(char *left, int *nr, const char *name, const char delim);
|
int BLI_split_name_num(char *left, int *nr, const char *name, const char delim);
|
||||||
@@ -165,19 +165,19 @@ void BLI_path_rel(char *file, const char *relfile);
|
|||||||
*/
|
*/
|
||||||
void BLI_char_switch(char *string, char from, char to);
|
void BLI_char_switch(char *string, char from, char to);
|
||||||
|
|
||||||
/* Initialize path to program executable */
|
/* Initialize path to program executable */
|
||||||
void BLI_init_program_path(const char *argv0);
|
void BLI_init_program_path(const char *argv0);
|
||||||
/* Initialize path to temporary directory.
|
/* Initialize path to temporary directory.
|
||||||
* NOTE: On Window userdir will be set to the temporary directory! */
|
* NOTE: On Window userdir will be set to the temporary directory! */
|
||||||
void BLI_init_temporary_dir(char *userdir);
|
void BLI_init_temporary_dir(char *userdir);
|
||||||
|
|
||||||
/* Path to executable */
|
/* Path to executable */
|
||||||
const char *BLI_program_path(void);
|
const char *BLI_program_path(void);
|
||||||
/* Path to directory of executable */
|
/* Path to directory of executable */
|
||||||
const char *BLI_program_dir(void);
|
const char *BLI_program_dir(void);
|
||||||
/* Path to temporary directory (with trailing slash) */
|
/* Path to temporary directory (with trailing slash) */
|
||||||
const char *BLI_temporary_dir(void);
|
const char *BLI_temporary_dir(void);
|
||||||
/* Path to the system temporary directory (with trailing slash) */
|
/* Path to the system temporary directory (with trailing slash) */
|
||||||
void BLI_system_temporary_dir(char *dir);
|
void BLI_system_temporary_dir(char *dir);
|
||||||
|
|
||||||
#ifdef WITH_ICONV
|
#ifdef WITH_ICONV
|
||||||
|
@@ -40,59 +40,59 @@
|
|||||||
struct RNG;
|
struct RNG;
|
||||||
typedef struct RNG RNG;
|
typedef struct RNG RNG;
|
||||||
|
|
||||||
struct RNG* rng_new (unsigned int seed);
|
struct RNG *rng_new(unsigned int seed);
|
||||||
void rng_free (struct RNG* rng);
|
void rng_free(struct RNG *rng);
|
||||||
|
|
||||||
void rng_seed (struct RNG* rng, unsigned int seed);
|
void rng_seed(struct RNG *rng, unsigned int seed);
|
||||||
void rng_srandom(struct RNG *rng, unsigned int seed);
|
void rng_srandom(struct RNG *rng, unsigned int seed);
|
||||||
int rng_getInt (struct RNG* rng);
|
int rng_getInt(struct RNG *rng);
|
||||||
double rng_getDouble (struct RNG* rng);
|
double rng_getDouble(struct RNG *rng);
|
||||||
float rng_getFloat (struct RNG* rng);
|
float rng_getFloat(struct RNG *rng);
|
||||||
void rng_shuffleArray(struct RNG *rng, void *data, int elemSize, int numElems);
|
void rng_shuffleArray(struct RNG *rng, void *data, int elemSize, int numElems);
|
||||||
|
|
||||||
/** Note that skipping is as slow as generating n numbers! */
|
/** Note that skipping is as slow as generating n numbers! */
|
||||||
void rng_skip (struct RNG *rng, int n);
|
void rng_skip(struct RNG *rng, int n);
|
||||||
|
|
||||||
/** Seed the random number generator */
|
/** Seed the random number generator */
|
||||||
void BLI_srand (unsigned int seed);
|
void BLI_srand(unsigned int seed);
|
||||||
|
|
||||||
/** Better seed for the random number generator, using noise.c hash[] */
|
/** Better seed for the random number generator, using noise.c hash[] */
|
||||||
void BLI_srandom (unsigned int seed);
|
void BLI_srandom(unsigned int seed);
|
||||||
|
|
||||||
/** Return a pseudo-random number N where 0<=N<(2^31) */
|
/** Return a pseudo-random number N where 0<=N<(2^31) */
|
||||||
int BLI_rand (void);
|
int BLI_rand(void);
|
||||||
|
|
||||||
/** Return a pseudo-random number N where 0.0<=N<1.0 */
|
/** Return a pseudo-random number N where 0.0<=N<1.0 */
|
||||||
double BLI_drand (void);
|
double BLI_drand(void);
|
||||||
|
|
||||||
/** Return a pseudo-random number N where 0.0f<=N<1.0f */
|
/** Return a pseudo-random number N where 0.0f<=N<1.0f */
|
||||||
float BLI_frand (void);
|
float BLI_frand(void);
|
||||||
|
|
||||||
/** Fills a block of memory starting at \a addr
|
/** Fills a block of memory starting at \a addr
|
||||||
* and extending \a len bytes with pseudo-random
|
* and extending \a len bytes with pseudo-random
|
||||||
* contents. This routine does not use nor modify
|
* contents. This routine does not use nor modify
|
||||||
* the state of the BLI random number generator.
|
* the state of the BLI random number generator.
|
||||||
*/
|
*/
|
||||||
void BLI_fillrand (void *addr, int len);
|
void BLI_fillrand(void *addr, int len);
|
||||||
|
|
||||||
/** Shuffle an array randomly using the given seed.
|
/** Shuffle an array randomly using the given seed.
|
||||||
* contents. This routine does not use nor modify
|
* contents. This routine does not use nor modify
|
||||||
* the state of the BLI random number generator.
|
* the state of the BLI random number generator.
|
||||||
*/
|
*/
|
||||||
void BLI_array_randomize (void *data, int elemSize, int numElems, unsigned int seed);
|
void BLI_array_randomize(void *data, int elemSize, int numElems, unsigned int seed);
|
||||||
|
|
||||||
|
|
||||||
/** Better seed for the random number generator, using noise.c hash[] */
|
/** Better seed for the random number generator, using noise.c hash[] */
|
||||||
/** Allows up to BLENDER_MAX_THREADS threads to address */
|
/** Allows up to BLENDER_MAX_THREADS threads to address */
|
||||||
void BLI_thread_srandom (int thread, unsigned int seed);
|
void BLI_thread_srandom(int thread, unsigned int seed);
|
||||||
|
|
||||||
/** Return a pseudo-random number N where 0<=N<(2^31) */
|
/** Return a pseudo-random number N where 0<=N<(2^31) */
|
||||||
/** Allows up to BLENDER_MAX_THREADS threads to address */
|
/** Allows up to BLENDER_MAX_THREADS threads to address */
|
||||||
int BLI_thread_rand (int thread);
|
int BLI_thread_rand(int thread);
|
||||||
|
|
||||||
/** Return a pseudo-random number N where 0.0f<=N<1.0f */
|
/** Return a pseudo-random number N where 0.0f<=N<1.0f */
|
||||||
/** Allows up to BLENDER_MAX_THREADS threads to address */
|
/** Allows up to BLENDER_MAX_THREADS threads to address */
|
||||||
float BLI_thread_frand (int thread);
|
float BLI_thread_frand(int thread);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -58,7 +58,7 @@ void BLI_resize_rcti(struct rcti *rect, int x, int y);
|
|||||||
void BLI_resize_rctf(struct rctf *rect, float x, float y);
|
void BLI_resize_rctf(struct rctf *rect, float x, float y);
|
||||||
int BLI_in_rcti(struct rcti *rect, int x, int y);
|
int BLI_in_rcti(struct rcti *rect, int x, int y);
|
||||||
int BLI_in_rctf(struct rctf *rect, float x, float y);
|
int BLI_in_rctf(struct rctf *rect, float x, float y);
|
||||||
int BLI_segment_in_rcti(struct rcti *rect, int s1[2], int s2[2]);
|
int BLI_segment_in_rcti(struct rcti *rect, int s1[2], int s2[2]);
|
||||||
// int BLI_segment_in_rctf(struct rcti *rect, int s1[2], int s2[2]); // NOT NEEDED YET
|
// int BLI_segment_in_rctf(struct rcti *rect, int s1[2], int s2[2]); // NOT NEEDED YET
|
||||||
int BLI_isect_rctf(struct rctf *src1, struct rctf *src2, struct rctf *dest);
|
int BLI_isect_rctf(struct rctf *src1, struct rctf *src2, struct rctf *dest);
|
||||||
int BLI_isect_rcti(struct rcti *src1, struct rcti *src2, struct rcti *dest);
|
int BLI_isect_rcti(struct rcti *src1, struct rcti *src2, struct rcti *dest);
|
||||||
|
@@ -41,8 +41,7 @@ struct ScanFillVert;
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct ScanFillContext
|
typedef struct ScanFillContext {
|
||||||
{
|
|
||||||
ListBase fillvertbase;
|
ListBase fillvertbase;
|
||||||
ListBase filledgebase;
|
ListBase filledgebase;
|
||||||
ListBase fillfacebase;
|
ListBase fillfacebase;
|
||||||
@@ -61,13 +60,12 @@ typedef struct ScanFillContext
|
|||||||
} ScanFillContext;
|
} ScanFillContext;
|
||||||
|
|
||||||
/* note; changing this also might affect the undo copy in editmesh.c */
|
/* note; changing this also might affect the undo copy in editmesh.c */
|
||||||
typedef struct ScanFillVert
|
typedef struct ScanFillVert {
|
||||||
{
|
|
||||||
struct ScanFillVert *next, *prev;
|
struct ScanFillVert *next, *prev;
|
||||||
union {
|
union {
|
||||||
struct ScanFillVert *v;
|
struct ScanFillVert *v;
|
||||||
void *p;
|
void *p;
|
||||||
intptr_t l;
|
intptr_t l;
|
||||||
} tmp;
|
} tmp;
|
||||||
float co[3]; /* vertex location */
|
float co[3]; /* vertex location */
|
||||||
float xy[2]; /* 2D copy of vertex location (using dominant axis) */
|
float xy[2]; /* 2D copy of vertex location (using dominant axis) */
|
||||||
@@ -76,16 +74,14 @@ typedef struct ScanFillVert
|
|||||||
unsigned char f, h;
|
unsigned char f, h;
|
||||||
} ScanFillVert;
|
} ScanFillVert;
|
||||||
|
|
||||||
typedef struct ScanFillEdge
|
typedef struct ScanFillEdge {
|
||||||
{
|
|
||||||
struct ScanFillEdge *next, *prev;
|
struct ScanFillEdge *next, *prev;
|
||||||
struct ScanFillVert *v1, *v2;
|
struct ScanFillVert *v1, *v2;
|
||||||
short poly_nr;
|
short poly_nr;
|
||||||
unsigned char f;
|
unsigned char f;
|
||||||
} ScanFillEdge;
|
} ScanFillEdge;
|
||||||
|
|
||||||
typedef struct ScanFillFace
|
typedef struct ScanFillFace {
|
||||||
{
|
|
||||||
struct ScanFillFace *next, *prev;
|
struct ScanFillFace *next, *prev;
|
||||||
struct ScanFillVert *v1, *v2, *v3;
|
struct ScanFillVert *v1, *v2, *v3;
|
||||||
} ScanFillFace;
|
} ScanFillFace;
|
||||||
@@ -97,7 +93,7 @@ struct ScanFillEdge *BLI_scanfill_edge_add(ScanFillContext *sf_ctx, struct ScanF
|
|||||||
int BLI_scanfill_begin(ScanFillContext *sf_ctx);
|
int BLI_scanfill_begin(ScanFillContext *sf_ctx);
|
||||||
int BLI_scanfill_calc(ScanFillContext *sf_ctx, const short do_quad_tri_speedup);
|
int BLI_scanfill_calc(ScanFillContext *sf_ctx, const short do_quad_tri_speedup);
|
||||||
int BLI_scanfill_calc_ex(ScanFillContext *sf_ctx, const short do_quad_tri_speedup,
|
int BLI_scanfill_calc_ex(ScanFillContext *sf_ctx, const short do_quad_tri_speedup,
|
||||||
const float nor_proj[3]);
|
const float nor_proj[3]);
|
||||||
void BLI_scanfill_end(ScanFillContext *sf_ctx);
|
void BLI_scanfill_end(ScanFillContext *sf_ctx);
|
||||||
|
|
||||||
/* These callbacks are needed to make the lib finction properly */
|
/* These callbacks are needed to make the lib finction properly */
|
||||||
@@ -108,7 +104,7 @@ void BLI_scanfill_end(ScanFillContext *sf_ctx);
|
|||||||
* \param f The function to use as callback
|
* \param f The function to use as callback
|
||||||
* \attention used in creator.c
|
* \attention used in creator.c
|
||||||
*/
|
*/
|
||||||
void BLI_setErrorCallBack(void (*f)(const char*));
|
void BLI_setErrorCallBack(void (*f)(const char *));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set a function to be able to interrupt the execution of processing
|
* Set a function to be able to interrupt the execution of processing
|
||||||
|
@@ -43,7 +43,7 @@ typedef struct {
|
|||||||
} SmallHashEntry;
|
} SmallHashEntry;
|
||||||
|
|
||||||
/*how much stack space to use before dynamically allocating memory*/
|
/*how much stack space to use before dynamically allocating memory*/
|
||||||
#define SMSTACKSIZE 521
|
#define SMSTACKSIZE 521
|
||||||
typedef struct SmallHash {
|
typedef struct SmallHash {
|
||||||
SmallHashEntry *table;
|
SmallHashEntry *table;
|
||||||
SmallHashEntry _stacktable[SMSTACKSIZE];
|
SmallHashEntry _stacktable[SMSTACKSIZE];
|
||||||
@@ -59,15 +59,15 @@ typedef struct {
|
|||||||
int i;
|
int i;
|
||||||
} SmallHashIter;
|
} SmallHashIter;
|
||||||
|
|
||||||
void BLI_smallhash_init(SmallHash *hash);
|
void BLI_smallhash_init(SmallHash *hash);
|
||||||
void BLI_smallhash_release(SmallHash *hash);
|
void BLI_smallhash_release(SmallHash *hash);
|
||||||
void BLI_smallhash_insert(SmallHash *hash, uintptr_t key, void *item);
|
void BLI_smallhash_insert(SmallHash *hash, uintptr_t key, void *item);
|
||||||
void BLI_smallhash_remove(SmallHash *hash, uintptr_t key);
|
void BLI_smallhash_remove(SmallHash *hash, uintptr_t key);
|
||||||
void * BLI_smallhash_lookup(SmallHash *hash, uintptr_t key);
|
void *BLI_smallhash_lookup(SmallHash *hash, uintptr_t key);
|
||||||
int BLI_smallhash_haskey(SmallHash *hash, uintptr_t key);
|
int BLI_smallhash_haskey(SmallHash *hash, uintptr_t key);
|
||||||
int BLI_smallhash_count(SmallHash *hash);
|
int BLI_smallhash_count(SmallHash *hash);
|
||||||
void * BLI_smallhash_iternext(SmallHashIter *iter, uintptr_t *key);
|
void *BLI_smallhash_iternext(SmallHashIter *iter, uintptr_t *key);
|
||||||
void * BLI_smallhash_iternew(SmallHash *hash, SmallHashIter *iter, uintptr_t *key);
|
void *BLI_smallhash_iternew(SmallHash *hash, SmallHashIter *iter, uintptr_t *key);
|
||||||
/* void BLI_smallhash_print(SmallHash *hash); */ /* UNUSED */
|
/* void BLI_smallhash_print(SmallHash *hash); */ /* UNUSED */
|
||||||
|
|
||||||
#endif /* __BLI_SMALLHASH_H__ */
|
#endif /* __BLI_SMALLHASH_H__ */
|
||||||
|
@@ -36,95 +36,95 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Duplicates the cstring \a str into a newly mallocN'd
|
* Duplicates the cstring \a str into a newly mallocN'd
|
||||||
* string and returns it.
|
* string and returns it.
|
||||||
*
|
*
|
||||||
* \param str The string to be duplicated
|
* \param str The string to be duplicated
|
||||||
* \retval Returns the duplicated string
|
* \retval Returns the duplicated string
|
||||||
*/
|
*/
|
||||||
char *BLI_strdup(const char *str);
|
char *BLI_strdup(const char *str);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Duplicates the first \a len bytes of cstring \a str
|
* Duplicates the first \a len bytes of cstring \a str
|
||||||
* into a newly mallocN'd string and returns it. \a str
|
* into a newly mallocN'd string and returns it. \a str
|
||||||
* is assumed to be at least len bytes long.
|
* is assumed to be at least len bytes long.
|
||||||
*
|
*
|
||||||
* \param str The string to be duplicated
|
* \param str The string to be duplicated
|
||||||
* \param len The number of bytes to duplicate
|
* \param len The number of bytes to duplicate
|
||||||
* \retval Returns the duplicated string
|
* \retval Returns the duplicated string
|
||||||
*/
|
*/
|
||||||
char *BLI_strdupn(const char *str, const size_t len);
|
char *BLI_strdupn(const char *str, const size_t len);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Appends the two strings, and returns new mallocN'ed string
|
* Appends the two strings, and returns new mallocN'ed string
|
||||||
* \param str1 first string for copy
|
* \param str1 first string for copy
|
||||||
* \param str2 second string for append
|
* \param str2 second string for append
|
||||||
* \retval Returns dst
|
* \retval Returns dst
|
||||||
*/
|
*/
|
||||||
char *BLI_strdupcat(const char *str1, const char *str2);
|
char *BLI_strdupcat(const char *str1, const char *str2);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Like strncpy but ensures dst is always
|
* Like strncpy but ensures dst is always
|
||||||
* '\0' terminated.
|
* '\0' terminated.
|
||||||
*
|
*
|
||||||
* \param dst Destination for copy
|
* \param dst Destination for copy
|
||||||
* \param src Source string to copy
|
* \param src Source string to copy
|
||||||
* \param maxncpy Maximum number of characters to copy (generally
|
* \param maxncpy Maximum number of characters to copy (generally
|
||||||
* the size of dst)
|
* the size of dst)
|
||||||
* \retval Returns dst
|
* \retval Returns dst
|
||||||
*/
|
*/
|
||||||
char *BLI_strncpy(char *dst, const char *src, const size_t maxncpy);
|
char *BLI_strncpy(char *dst, const char *src, const size_t maxncpy);
|
||||||
|
|
||||||
/* Makes a copy of the text within the "" that appear after some text 'blahblah'
|
/* Makes a copy of the text within the "" that appear after some text 'blahblah'
|
||||||
* i.e. for string 'pose["apples"]' with prefix 'pose[', it should grab "apples"
|
* i.e. for string 'pose["apples"]' with prefix 'pose[', it should grab "apples"
|
||||||
*
|
*
|
||||||
* - str: is the entire string to chop
|
* - str: is the entire string to chop
|
||||||
* - prefix: is the part of the string to leave out
|
* - prefix: is the part of the string to leave out
|
||||||
*
|
*
|
||||||
* Assume that the strings returned must be freed afterwards, and that the inputs will contain
|
* Assume that the strings returned must be freed afterwards, and that the inputs will contain
|
||||||
* data we want...
|
* data we want...
|
||||||
*/
|
*/
|
||||||
char *BLI_getQuotedStr(const char *str, const char *prefix);
|
char *BLI_getQuotedStr(const char *str, const char *prefix);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a copy of the cstring \a str into a newly mallocN'd
|
* Returns a copy of the cstring \a str into a newly mallocN'd
|
||||||
* string with all instances of oldText replaced with newText,
|
* string with all instances of oldText replaced with newText,
|
||||||
* and returns it.
|
* and returns it.
|
||||||
*
|
*
|
||||||
* \param str The string to replace occurrences of oldText in
|
* \param str The string to replace occurrences of oldText in
|
||||||
* \param oldText The text in the string to find and replace
|
* \param oldText The text in the string to find and replace
|
||||||
* \param newText The text in the string to find and replace
|
* \param newText The text in the string to find and replace
|
||||||
* \retval Returns the duplicated string
|
* \retval Returns the duplicated string
|
||||||
*/
|
*/
|
||||||
char *BLI_replacestr(char *str, const char *oldText, const char *newText);
|
char *BLI_replacestr(char *str, const char *oldText, const char *newText);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Replacement for snprintf
|
* Replacement for snprintf
|
||||||
*/
|
*/
|
||||||
size_t BLI_snprintf(char *buffer, size_t len, const char *format, ...)
|
size_t BLI_snprintf(char *buffer, size_t len, const char *format, ...)
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
__attribute__ ((format (printf, 3, 4)))
|
__attribute__ ((format(printf, 3, 4)))
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Print formatted string into a newly mallocN'd string
|
* Print formatted string into a newly mallocN'd string
|
||||||
* and return it.
|
* and return it.
|
||||||
*/
|
*/
|
||||||
char *BLI_sprintfN(const char *format, ...)
|
char *BLI_sprintfN(const char *format, ...)
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
__attribute__ ((format (printf, 1, 2)))
|
__attribute__ ((format(printf, 1, 2)))
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
|
|
||||||
size_t BLI_strescape(char *dst, const char *src, const size_t maxlen);
|
size_t BLI_strescape(char *dst, const char *src, const size_t maxlen);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compare two strings without regard to case.
|
* Compare two strings without regard to case.
|
||||||
*
|
*
|
||||||
* \retval True if the strings are equal, false otherwise.
|
* \retval True if the strings are equal, false otherwise.
|
||||||
*/
|
*/
|
||||||
int BLI_strcaseeq(const char *a, const char *b);
|
int BLI_strcaseeq(const char *a, const char *b);
|
||||||
|
|
||||||
char *BLI_strcasestr(const char *s, const char *find);
|
char *BLI_strcasestr(const char *s, const char *find);
|
||||||
|
@@ -37,17 +37,17 @@ int BLI_utf8_invalid_byte(const char *str, int length);
|
|||||||
int BLI_utf8_invalid_strip(char *str, int length);
|
int BLI_utf8_invalid_strip(char *str, int length);
|
||||||
|
|
||||||
int BLI_str_utf8_size(const char *p); /* warning, can return -1 on bad chars */
|
int BLI_str_utf8_size(const char *p); /* warning, can return -1 on bad chars */
|
||||||
/* copied from glib */
|
/* copied from glib */
|
||||||
unsigned int BLI_str_utf8_as_unicode(const char *p);
|
unsigned int BLI_str_utf8_as_unicode(const char *p);
|
||||||
unsigned int BLI_str_utf8_as_unicode_and_size(const char *p, size_t *index);
|
unsigned int BLI_str_utf8_as_unicode_and_size(const char *p, size_t *index);
|
||||||
unsigned int BLI_str_utf8_as_unicode_step(const char *p, size_t *index);
|
unsigned int BLI_str_utf8_as_unicode_step(const char *p, size_t *index);
|
||||||
size_t BLI_str_utf8_from_unicode(unsigned int c, char *outbuf);
|
size_t BLI_str_utf8_from_unicode(unsigned int c, char *outbuf);
|
||||||
|
|
||||||
char *BLI_str_find_prev_char_utf8(const char *str, const char *p);
|
char *BLI_str_find_prev_char_utf8(const char *str, const char *p);
|
||||||
char *BLI_str_find_next_char_utf8(const char *p, const char *end);
|
char *BLI_str_find_next_char_utf8(const char *p, const char *end);
|
||||||
char *BLI_str_prev_char_utf8(const char *p);
|
char *BLI_str_prev_char_utf8(const char *p);
|
||||||
|
|
||||||
/* wchar_t functions, copied from blenders own font.c originally */
|
/* wchar_t functions, copied from blenders own font.c originally */
|
||||||
size_t BLI_wstrlen_utf8(const wchar_t *src);
|
size_t BLI_wstrlen_utf8(const wchar_t *src);
|
||||||
size_t BLI_strlen_utf8(const char *strc);
|
size_t BLI_strlen_utf8(const char *strc);
|
||||||
size_t BLI_strncpy_wchar_as_utf8(char *dst, const wchar_t *src, const size_t maxcpy);
|
size_t BLI_strncpy_wchar_as_utf8(char *dst, const wchar_t *src, const size_t maxcpy);
|
||||||
|
@@ -35,7 +35,7 @@
|
|||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
/* for tables, button in UI, etc */
|
/* for tables, button in UI, etc */
|
||||||
#define BLENDER_MAX_THREADS 64
|
#define BLENDER_MAX_THREADS 64
|
||||||
|
|
||||||
struct ListBase;
|
struct ListBase;
|
||||||
|
|
||||||
@@ -44,15 +44,15 @@ struct ListBase;
|
|||||||
/*this is run once at startup*/
|
/*this is run once at startup*/
|
||||||
void BLI_threadapi_init(void);
|
void BLI_threadapi_init(void);
|
||||||
|
|
||||||
void BLI_init_threads (struct ListBase *threadbase, void *(*do_thread)(void *), int tot);
|
void BLI_init_threads(struct ListBase *threadbase, void *(*do_thread)(void *), int tot);
|
||||||
int BLI_available_threads(struct ListBase *threadbase);
|
int BLI_available_threads(struct ListBase *threadbase);
|
||||||
int BLI_available_thread_index(struct ListBase *threadbase);
|
int BLI_available_thread_index(struct ListBase *threadbase);
|
||||||
void BLI_insert_thread (struct ListBase *threadbase, void *callerdata);
|
void BLI_insert_thread(struct ListBase *threadbase, void *callerdata);
|
||||||
void BLI_remove_thread (struct ListBase *threadbase, void *callerdata);
|
void BLI_remove_thread(struct ListBase *threadbase, void *callerdata);
|
||||||
void BLI_remove_thread_index(struct ListBase *threadbase, int index);
|
void BLI_remove_thread_index(struct ListBase *threadbase, int index);
|
||||||
void BLI_remove_threads(struct ListBase *threadbase);
|
void BLI_remove_threads(struct ListBase *threadbase);
|
||||||
void BLI_end_threads (struct ListBase *threadbase);
|
void BLI_end_threads(struct ListBase *threadbase);
|
||||||
int BLI_thread_is_main(void);
|
int BLI_thread_is_main(void);
|
||||||
|
|
||||||
|
|
||||||
void BLI_begin_threaded_malloc(void);
|
void BLI_begin_threaded_malloc(void);
|
||||||
@@ -60,28 +60,28 @@ void BLI_end_threaded_malloc(void);
|
|||||||
|
|
||||||
/* System Information */
|
/* System Information */
|
||||||
|
|
||||||
int BLI_system_thread_count(void); /* gets the number of threads the system can make use of */
|
int BLI_system_thread_count(void); /* gets the number of threads the system can make use of */
|
||||||
|
|
||||||
/* Global Mutex Locks
|
/* Global Mutex Locks
|
||||||
*
|
*
|
||||||
* One custom lock available now. can be extended. */
|
* One custom lock available now. can be extended. */
|
||||||
|
|
||||||
#define LOCK_IMAGE 0
|
#define LOCK_IMAGE 0
|
||||||
#define LOCK_PREVIEW 1
|
#define LOCK_PREVIEW 1
|
||||||
#define LOCK_VIEWER 2
|
#define LOCK_VIEWER 2
|
||||||
#define LOCK_CUSTOM1 3
|
#define LOCK_CUSTOM1 3
|
||||||
#define LOCK_RCACHE 4
|
#define LOCK_RCACHE 4
|
||||||
#define LOCK_OPENGL 5
|
#define LOCK_OPENGL 5
|
||||||
#define LOCK_NODES 6
|
#define LOCK_NODES 6
|
||||||
#define LOCK_MOVIECLIP 7
|
#define LOCK_MOVIECLIP 7
|
||||||
|
|
||||||
void BLI_lock_thread(int type);
|
void BLI_lock_thread(int type);
|
||||||
void BLI_unlock_thread(int type);
|
void BLI_unlock_thread(int type);
|
||||||
|
|
||||||
/* Mutex Lock */
|
/* Mutex Lock */
|
||||||
|
|
||||||
typedef pthread_mutex_t ThreadMutex;
|
typedef pthread_mutex_t ThreadMutex;
|
||||||
#define BLI_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
|
#define BLI_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
|
||||||
|
|
||||||
void BLI_mutex_init(ThreadMutex *mutex);
|
void BLI_mutex_init(ThreadMutex *mutex);
|
||||||
void BLI_mutex_lock(ThreadMutex *mutex);
|
void BLI_mutex_lock(ThreadMutex *mutex);
|
||||||
@@ -90,8 +90,8 @@ void BLI_mutex_end(ThreadMutex *mutex);
|
|||||||
|
|
||||||
/* Read/Write Mutex Lock */
|
/* Read/Write Mutex Lock */
|
||||||
|
|
||||||
#define THREAD_LOCK_READ 1
|
#define THREAD_LOCK_READ 1
|
||||||
#define THREAD_LOCK_WRITE 2
|
#define THREAD_LOCK_WRITE 2
|
||||||
|
|
||||||
typedef pthread_rwlock_t ThreadRWMutex;
|
typedef pthread_rwlock_t ThreadRWMutex;
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user