style cleanup: guys - set your editors to tabs!
This commit is contained in:
@@ -57,124 +57,124 @@
|
|||||||
#include <stdio.h> /* for FILE */
|
#include <stdio.h> /* for FILE */
|
||||||
|
|
||||||
typedef struct _AviChunk {
|
typedef struct _AviChunk {
|
||||||
int fcc;
|
int fcc;
|
||||||
int size;
|
int size;
|
||||||
} AviChunk;
|
} AviChunk;
|
||||||
|
|
||||||
typedef struct _AviList {
|
typedef struct _AviList {
|
||||||
int fcc;
|
int fcc;
|
||||||
int size;
|
int size;
|
||||||
int ids;
|
int ids;
|
||||||
} AviList;
|
} AviList;
|
||||||
|
|
||||||
typedef struct _AviMainHeader {
|
typedef struct _AviMainHeader {
|
||||||
int fcc;
|
int fcc;
|
||||||
int size;
|
int size;
|
||||||
int MicroSecPerFrame; /* MicroSecPerFrame - timing between frames */
|
int MicroSecPerFrame; /* MicroSecPerFrame - timing between frames */
|
||||||
int MaxBytesPerSec; /* MaxBytesPerSec - approx bps system must handle */
|
int MaxBytesPerSec; /* MaxBytesPerSec - approx bps system must handle */
|
||||||
int PaddingGranularity;
|
int PaddingGranularity;
|
||||||
int Flags;
|
int Flags;
|
||||||
#define AVIF_HASINDEX 0x00000010 /* had idx1 chunk */
|
#define AVIF_HASINDEX 0x00000010 /* had idx1 chunk */
|
||||||
#define AVIF_MUSTUSEINDEX 0x00000020 /* must use idx1 chunk to determine order */
|
#define AVIF_MUSTUSEINDEX 0x00000020 /* must use idx1 chunk to determine order */
|
||||||
#define AVIF_ISINTERLEAVED 0x00000100 /* AVI file is interleaved */
|
#define AVIF_ISINTERLEAVED 0x00000100 /* AVI file is interleaved */
|
||||||
#define AVIF_TRUSTCKTYPE 0x00000800
|
#define AVIF_TRUSTCKTYPE 0x00000800
|
||||||
#define AVIF_WASCAPTUREFILE 0x00010000 /* specially allocated used for capturing real time video */
|
#define AVIF_WASCAPTUREFILE 0x00010000 /* specially allocated used for capturing real time video */
|
||||||
#define AVIF_COPYRIGHTED 0x00020000 /* contains copyrighted data */
|
#define AVIF_COPYRIGHTED 0x00020000 /* contains copyrighted data */
|
||||||
|
|
||||||
int TotalFrames;
|
int TotalFrames;
|
||||||
int InitialFrames; /* InitialFrames - initial frame before interleaving */
|
int InitialFrames; /* InitialFrames - initial frame before interleaving */
|
||||||
int Streams;
|
int Streams;
|
||||||
int SuggestedBufferSize;
|
int SuggestedBufferSize;
|
||||||
int Width;
|
int Width;
|
||||||
int Height;
|
int Height;
|
||||||
int Reserved[4];
|
int Reserved[4];
|
||||||
} AviMainHeader;
|
} AviMainHeader;
|
||||||
|
|
||||||
typedef struct _AviStreamHeader {
|
typedef struct _AviStreamHeader {
|
||||||
int fcc;
|
int fcc;
|
||||||
int size;
|
int size;
|
||||||
int Type;
|
int Type;
|
||||||
#define AVIST_VIDEO FCC("vids")
|
#define AVIST_VIDEO FCC("vids")
|
||||||
#define AVIST_AUDIO FCC("auds")
|
#define AVIST_AUDIO FCC("auds")
|
||||||
#define AVIST_MIDI FCC("mids")
|
#define AVIST_MIDI FCC("mids")
|
||||||
#define AVIST_TEXT FCC("txts")
|
#define AVIST_TEXT FCC("txts")
|
||||||
|
|
||||||
int Handler;
|
int Handler;
|
||||||
int Flags;
|
int Flags;
|
||||||
#define AVISF_DISABLED 0x00000001
|
#define AVISF_DISABLED 0x00000001
|
||||||
#define AVISF_VIDEO_PALCHANGES 0x00010000
|
#define AVISF_VIDEO_PALCHANGES 0x00010000
|
||||||
|
|
||||||
short Priority;
|
short Priority;
|
||||||
short Language;
|
short Language;
|
||||||
int InitialFrames;
|
int InitialFrames;
|
||||||
int Scale;
|
int Scale;
|
||||||
int Rate;
|
int Rate;
|
||||||
int Start;
|
int Start;
|
||||||
int Length;
|
int Length;
|
||||||
int SuggestedBufferSize;
|
int SuggestedBufferSize;
|
||||||
int Quality;
|
int Quality;
|
||||||
int SampleSize;
|
int SampleSize;
|
||||||
short left;
|
short left;
|
||||||
short top;
|
short top;
|
||||||
short right;
|
short right;
|
||||||
short bottom;
|
short bottom;
|
||||||
} AviStreamHeader;
|
} AviStreamHeader;
|
||||||
|
|
||||||
typedef struct _AviBitmapInfoHeader {
|
typedef struct _AviBitmapInfoHeader {
|
||||||
int fcc;
|
int fcc;
|
||||||
int size;
|
int size;
|
||||||
int Size;
|
int Size;
|
||||||
int Width;
|
int Width;
|
||||||
int Height;
|
int Height;
|
||||||
short Planes;
|
short Planes;
|
||||||
short BitCount;
|
short BitCount;
|
||||||
int Compression;
|
int Compression;
|
||||||
int SizeImage;
|
int SizeImage;
|
||||||
int XPelsPerMeter;
|
int XPelsPerMeter;
|
||||||
int YPelsPerMeter;
|
int YPelsPerMeter;
|
||||||
int ClrUsed;
|
int ClrUsed;
|
||||||
int ClrImportant;
|
int ClrImportant;
|
||||||
} AviBitmapInfoHeader;
|
} AviBitmapInfoHeader;
|
||||||
|
|
||||||
typedef struct _AviMJPEGUnknown {
|
typedef struct _AviMJPEGUnknown {
|
||||||
int a;
|
int a;
|
||||||
int b;
|
int b;
|
||||||
int c;
|
int c;
|
||||||
int d;
|
int d;
|
||||||
int e;
|
int e;
|
||||||
int f;
|
int f;
|
||||||
int g;
|
int g;
|
||||||
} AviMJPEGUnknown;
|
} AviMJPEGUnknown;
|
||||||
|
|
||||||
typedef struct _AviIndexEntry {
|
typedef struct _AviIndexEntry {
|
||||||
int ChunkId;
|
int ChunkId;
|
||||||
int Flags;
|
int Flags;
|
||||||
#define AVIIF_LIST 0x00000001
|
#define AVIIF_LIST 0x00000001
|
||||||
#define AVIIF_KEYFRAME 0x00000010
|
#define AVIIF_KEYFRAME 0x00000010
|
||||||
#define AVIIF_NO_TIME 0x00000100
|
#define AVIIF_NO_TIME 0x00000100
|
||||||
#define AVIIF_COMPRESSOR 0x0FFF0000
|
#define AVIIF_COMPRESSOR 0x0FFF0000
|
||||||
int Offset;
|
int Offset;
|
||||||
int Size;
|
int Size;
|
||||||
} AviIndexEntry;
|
} AviIndexEntry;
|
||||||
|
|
||||||
typedef struct _AviIndex {
|
typedef struct _AviIndex {
|
||||||
int fcc;
|
int fcc;
|
||||||
int size;
|
int size;
|
||||||
AviIndexEntry *entrys;
|
AviIndexEntry *entrys;
|
||||||
} AviIndex;
|
} AviIndex;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
AVI_FORMAT_RGB24, /* The most basic of forms, 3 bytes per pixel, 1 per r, g, b */
|
AVI_FORMAT_RGB24, /* The most basic of forms, 3 bytes per pixel, 1 per r, g, b */
|
||||||
AVI_FORMAT_RGB32, /* The second most basic of forms, 4 bytes per pixel, 1 per r, g, b, alpha */
|
AVI_FORMAT_RGB32, /* The second most basic of forms, 4 bytes per pixel, 1 per r, g, b, alpha */
|
||||||
AVI_FORMAT_AVI_RGB, /* Same as above, but is in the weird AVI order (bottom to top, left to right) */
|
AVI_FORMAT_AVI_RGB, /* Same as above, but is in the weird AVI order (bottom to top, left to right) */
|
||||||
AVI_FORMAT_MJPEG /* Motion-JPEG */
|
AVI_FORMAT_MJPEG /* Motion-JPEG */
|
||||||
} AviFormat;
|
} AviFormat;
|
||||||
|
|
||||||
typedef struct _AviStreamRec {
|
typedef struct _AviStreamRec {
|
||||||
AviStreamHeader sh;
|
AviStreamHeader sh;
|
||||||
void *sf;
|
void *sf;
|
||||||
int sf_size;
|
int sf_size;
|
||||||
AviFormat format;
|
AviFormat format;
|
||||||
} AviStreamRec;
|
} AviStreamRec;
|
||||||
|
|
||||||
typedef struct _AviMovie {
|
typedef struct _AviMovie {
|
||||||
@@ -201,23 +201,23 @@ typedef struct _AviMovie {
|
|||||||
} AviMovie;
|
} AviMovie;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
AVI_ERROR_NONE=0,
|
AVI_ERROR_NONE=0,
|
||||||
AVI_ERROR_COMPRESSION,
|
AVI_ERROR_COMPRESSION,
|
||||||
AVI_ERROR_OPEN,
|
AVI_ERROR_OPEN,
|
||||||
AVI_ERROR_READING,
|
AVI_ERROR_READING,
|
||||||
AVI_ERROR_WRITING,
|
AVI_ERROR_WRITING,
|
||||||
AVI_ERROR_FORMAT,
|
AVI_ERROR_FORMAT,
|
||||||
AVI_ERROR_ALLOC,
|
AVI_ERROR_ALLOC,
|
||||||
AVI_ERROR_FOUND,
|
AVI_ERROR_FOUND,
|
||||||
AVI_ERROR_OPTION
|
AVI_ERROR_OPTION
|
||||||
} AviError;
|
} AviError;
|
||||||
|
|
||||||
/* belongs to the option-setting function. */
|
/* belongs to the option-setting function. */
|
||||||
typedef enum {
|
typedef enum {
|
||||||
AVI_OPTION_WIDTH=0,
|
AVI_OPTION_WIDTH=0,
|
||||||
AVI_OPTION_HEIGHT,
|
AVI_OPTION_HEIGHT,
|
||||||
AVI_OPTION_QUALITY,
|
AVI_OPTION_QUALITY,
|
||||||
AVI_OPTION_FRAMERATE
|
AVI_OPTION_FRAMERATE
|
||||||
} AviOption;
|
} AviOption;
|
||||||
|
|
||||||
/* The offsets that will always stay the same in AVI files we
|
/* The offsets that will always stay the same in AVI files we
|
||||||
@@ -306,4 +306,3 @@ AviError AVI_print_error(AviError error);
|
|||||||
void AVI_set_debug(int mode);
|
void AVI_set_debug(int mode);
|
||||||
|
|
||||||
#endif /* __AVI_AVI_H__ */
|
#endif /* __AVI_AVI_H__ */
|
||||||
|
|
||||||
|
|||||||
@@ -32,17 +32,16 @@ extern "C" {
|
|||||||
|
|
||||||
typedef struct OceanResult {
|
typedef struct OceanResult {
|
||||||
float disp[3];
|
float disp[3];
|
||||||
float normal[3];
|
float normal[3];
|
||||||
float foam;
|
float foam;
|
||||||
|
|
||||||
/* raw eigenvalues/vectors */
|
/* raw eigenvalues/vectors */
|
||||||
float Jminus;
|
float Jminus;
|
||||||
float Jplus;
|
float Jplus;
|
||||||
float Eminus[3];
|
float Eminus[3];
|
||||||
float Eplus[3];
|
float Eplus[3];
|
||||||
} OceanResult;
|
} OceanResult;
|
||||||
|
|
||||||
|
|
||||||
typedef struct OceanCache {
|
typedef struct OceanCache {
|
||||||
struct ImBuf **ibufs_disp;
|
struct ImBuf **ibufs_disp;
|
||||||
struct ImBuf **ibufs_foam;
|
struct ImBuf **ibufs_foam;
|
||||||
@@ -74,7 +73,6 @@ typedef struct OceanCache {
|
|||||||
#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);
|
||||||
|
|||||||
@@ -1046,7 +1046,7 @@ static const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = {
|
|||||||
{sizeof(float), "", 0, "BevelWeight", NULL, NULL, layerInterp_bweight},
|
{sizeof(float), "", 0, "BevelWeight", NULL, NULL, layerInterp_bweight},
|
||||||
/* 30: CD_CREASE */
|
/* 30: CD_CREASE */
|
||||||
{sizeof(float), "", 0, "SubSurfCrease", NULL, NULL, layerInterp_bweight},
|
{sizeof(float), "", 0, "SubSurfCrease", NULL, NULL, layerInterp_bweight},
|
||||||
/* 31: CD_ORIGSPACE_MLOOP */
|
/* 31: CD_ORIGSPACE_MLOOP */
|
||||||
{sizeof(OrigSpaceLoop), "OrigSpaceLoop", 1, "OS Loop", NULL, NULL, layerInterp_mloop_origspace, NULL, NULL,
|
{sizeof(OrigSpaceLoop), "OrigSpaceLoop", 1, "OS Loop", NULL, NULL, layerInterp_mloop_origspace, NULL, NULL,
|
||||||
layerEqual_mloop_origspace, layerMultiply_mloop_origspace, layerInitMinMax_mloop_origspace,
|
layerEqual_mloop_origspace, layerMultiply_mloop_origspace, layerInitMinMax_mloop_origspace,
|
||||||
layerAdd_mloop_origspace, layerDoMinMax_mloop_origspace, layerCopyValue_mloop_origspace},
|
layerAdd_mloop_origspace, layerDoMinMax_mloop_origspace, layerCopyValue_mloop_origspace},
|
||||||
|
|||||||
@@ -150,8 +150,8 @@ typedef struct SB_thread_context {
|
|||||||
|
|
||||||
#define SOFTGOALSNAP 0.999f
|
#define SOFTGOALSNAP 0.999f
|
||||||
/* if bp-> goal is above make it a *forced follow original* and skip all ODE stuff for this bp
|
/* if bp-> goal is above make it a *forced follow original* and skip all ODE stuff for this bp
|
||||||
removes *unnecessary* stiffnes from ODE system
|
* removes *unnecessary* stiffnes from ODE system
|
||||||
*/
|
*/
|
||||||
#define HEUNWARNLIMIT 1 /* 500 would be fine i think for detecting severe *stiff* stuff */
|
#define HEUNWARNLIMIT 1 /* 500 would be fine i think for detecting severe *stiff* stuff */
|
||||||
|
|
||||||
|
|
||||||
@@ -179,16 +179,16 @@ static void Vec3PlusStVec(float *v, float s, float *v1);
|
|||||||
|
|
||||||
static float sb_grav_force_scale(Object *UNUSED(ob))
|
static float sb_grav_force_scale(Object *UNUSED(ob))
|
||||||
/* since unit of g is [m/sec^2] and F = mass * g we rescale unit mass of node to 1 gramm
|
/* since unit of g is [m/sec^2] and F = mass * g we rescale unit mass of node to 1 gramm
|
||||||
put it to a function here, so we can add user options later without touching simulation code
|
* put it to a function here, so we can add user options later without touching simulation code
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
return (0.001f);
|
return (0.001f);
|
||||||
}
|
}
|
||||||
|
|
||||||
static float sb_fric_force_scale(Object *UNUSED(ob))
|
static float sb_fric_force_scale(Object *UNUSED(ob))
|
||||||
/* rescaling unit of drag [1 / sec] to somehow reasonable
|
/* rescaling unit of drag [1 / sec] to somehow reasonable
|
||||||
put it to a function here, so we can add user options later without touching simulation code
|
* put it to a function here, so we can add user options later without touching simulation code
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
return (0.01f);
|
return (0.01f);
|
||||||
}
|
}
|
||||||
@@ -216,12 +216,12 @@ static float sb_time_scale(Object *ob)
|
|||||||
|
|
||||||
/* helper functions for everything is animatable jow_go_for2_5 +++++++*/
|
/* helper functions for everything is animatable jow_go_for2_5 +++++++*/
|
||||||
/* introducing them here, because i know: steps in properties ( at frame timing )
|
/* introducing them here, because i know: steps in properties ( at frame timing )
|
||||||
will cause unwanted responses of the softbody system (which does inter frame calculations )
|
* will cause unwanted responses of the softbody system (which does inter frame calculations )
|
||||||
so first 'cure' would be: interpolate linear in time ..
|
* so first 'cure' would be: interpolate linear in time ..
|
||||||
Q: why do i write this?
|
* Q: why do i write this?
|
||||||
A: because it happend once, that some eger coder 'streamlined' code to fail.
|
* A: because it happend once, that some eger coder 'streamlined' code to fail.
|
||||||
We DO linear interpolation for goals .. and i think we should do on animated properties as well
|
* We DO linear interpolation for goals .. and i think we should do on animated properties as well
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* animate sb->maxgoal, sb->mingoal */
|
/* animate sb->maxgoal, sb->mingoal */
|
||||||
static float _final_goal(Object *ob, BodyPoint *bp)/*jow_go_for2_5 */
|
static float _final_goal(Object *ob, BodyPoint *bp)/*jow_go_for2_5 */
|
||||||
@@ -2984,10 +2984,10 @@ static void softbody_apply_forces(Object *ob, float forcetime, int mode, float *
|
|||||||
maxerrpos = MAX2(maxerrpos, ABS(dx[1] - bp->prevdx[1]));
|
maxerrpos = MAX2(maxerrpos, ABS(dx[1] - bp->prevdx[1]));
|
||||||
maxerrpos = MAX2(maxerrpos, ABS(dx[2] - bp->prevdx[2]));
|
maxerrpos = MAX2(maxerrpos, ABS(dx[2] - bp->prevdx[2]));
|
||||||
|
|
||||||
/* bp->choke is set when we need to pull a vertex or edge out of the collider.
|
/* bp->choke is set when we need to pull a vertex or edge out of the collider.
|
||||||
the collider object signals to get out by pushing hard. on the other hand
|
* the collider object signals to get out by pushing hard. on the other hand
|
||||||
we don't want to end up in deep space so we add some <viscosity>
|
* we don't want to end up in deep space so we add some <viscosity>
|
||||||
to balance that out */
|
* to balance that out */
|
||||||
if (bp->choke2 > 0.0f) {
|
if (bp->choke2 > 0.0f) {
|
||||||
mul_v3_fl(bp->vec, (1.0f - bp->choke2));
|
mul_v3_fl(bp->vec, (1.0f - bp->choke2));
|
||||||
}
|
}
|
||||||
@@ -3268,7 +3268,9 @@ static void mesh_to_softbody(Scene *scene, Object *ob)
|
|||||||
BodyPoint *bp;
|
BodyPoint *bp;
|
||||||
BodySpring *bs;
|
BodySpring *bs;
|
||||||
int a, totedge;
|
int a, totedge;
|
||||||
BKE_mesh_tessface_ensure(me);
|
|
||||||
|
BKE_mesh_tessface_ensure(me);
|
||||||
|
|
||||||
if (ob->softflag & OB_SB_EDGES) totedge= me->totedge;
|
if (ob->softflag & OB_SB_EDGES) totedge= me->totedge;
|
||||||
else totedge= 0;
|
else totedge= 0;
|
||||||
|
|
||||||
|
|||||||
@@ -1012,15 +1012,15 @@ static void pbvh_update_normals(PBVH *bvh, PBVHNode **nodes,
|
|||||||
* we have to store for each vertex which node it is in */
|
* we have to store for each vertex which node it is in */
|
||||||
vnor= MEM_callocN(sizeof(float)*3*bvh->totvert, "bvh temp vnors");
|
vnor= MEM_callocN(sizeof(float)*3*bvh->totvert, "bvh temp vnors");
|
||||||
|
|
||||||
/* subtle assumptions:
|
/* subtle assumptions:
|
||||||
* - We know that for all edited vertices, the nodes with faces
|
* - We know that for all edited vertices, the nodes with faces
|
||||||
* adjacent to these vertices have been marked with PBVH_UpdateNormals.
|
* adjacent to these vertices have been marked with PBVH_UpdateNormals.
|
||||||
* This is true because if the vertex is inside the brush radius, the
|
* This is true because if the vertex is inside the brush radius, the
|
||||||
* bounding box of it's adjacent faces will be as well.
|
* bounding box of it's adjacent faces will be as well.
|
||||||
* - However this is only true for the vertices that have actually been
|
* - However this is only true for the vertices that have actually been
|
||||||
* edited, not for all vertices in the nodes marked for update, so we
|
* edited, not for all vertices in the nodes marked for update, so we
|
||||||
* can only update vertices marked with ME_VERT_PBVH_UPDATE.
|
* can only update vertices marked with ME_VERT_PBVH_UPDATE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma omp parallel for private(n) schedule(static)
|
#pragma omp parallel for private(n) schedule(static)
|
||||||
for (n = 0; n < totnode; n++) {
|
for (n = 0; n < totnode; n++) {
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ void RegisterBlendExtension(void)
|
|||||||
char BlPath[MAX_PATH];
|
char BlPath[MAX_PATH];
|
||||||
char InstallDir[FILE_MAXDIR];
|
char InstallDir[FILE_MAXDIR];
|
||||||
char SysDir[FILE_MAXDIR];
|
char SysDir[FILE_MAXDIR];
|
||||||
const char *ThumbHandlerDLL;
|
const char *ThumbHandlerDLL;
|
||||||
char RegCmd[MAX_PATH*2];
|
char RegCmd[MAX_PATH*2];
|
||||||
char MBox[256];
|
char MBox[256];
|
||||||
BOOL IsWOW64;
|
BOOL IsWOW64;
|
||||||
@@ -173,7 +173,7 @@ void RegisterBlendExtension(void)
|
|||||||
|
|
||||||
DIR *opendir (const char *path)
|
DIR *opendir (const char *path)
|
||||||
{
|
{
|
||||||
wchar_t *path_16 = alloc_utf16_from_8(path, 0);
|
wchar_t *path_16 = alloc_utf16_from_8(path, 0);
|
||||||
|
|
||||||
if (GetFileAttributesW(path_16) & FILE_ATTRIBUTE_DIRECTORY) {
|
if (GetFileAttributesW(path_16) & FILE_ATTRIBUTE_DIRECTORY) {
|
||||||
DIR *newd= MEM_mallocN(sizeof(DIR), "opendir");
|
DIR *newd= MEM_mallocN(sizeof(DIR), "opendir");
|
||||||
@@ -198,7 +198,7 @@ DIR *opendir (const char *path)
|
|||||||
static char *BLI_alloc_utf_8_from_16(wchar_t *in16, size_t add)
|
static char *BLI_alloc_utf_8_from_16(wchar_t *in16, size_t add)
|
||||||
{
|
{
|
||||||
size_t bsize = count_utf_8_from_16(in16);
|
size_t bsize = count_utf_8_from_16(in16);
|
||||||
char *out8 = NULL;
|
char *out8 = NULL;
|
||||||
if (!bsize) return NULL;
|
if (!bsize) return NULL;
|
||||||
out8 = (char*)MEM_mallocN(sizeof(char) * (bsize + add), "UTF-8 String");
|
out8 = (char*)MEM_mallocN(sizeof(char) * (bsize + add), "UTF-8 String");
|
||||||
conv_utf_16_to_8(in16, out8, bsize);
|
conv_utf_16_to_8(in16, out8, bsize);
|
||||||
@@ -208,7 +208,7 @@ static char *BLI_alloc_utf_8_from_16(wchar_t *in16, size_t add)
|
|||||||
static wchar_t *UNUSED_FUNCTION(BLI_alloc_utf16_from_8)(char *in8, size_t add)
|
static wchar_t *UNUSED_FUNCTION(BLI_alloc_utf16_from_8)(char *in8, size_t add)
|
||||||
{
|
{
|
||||||
size_t bsize = count_utf_16_from_8(in8);
|
size_t bsize = count_utf_16_from_8(in8);
|
||||||
wchar_t *out16 = NULL;
|
wchar_t *out16 = NULL;
|
||||||
if (!bsize) return NULL;
|
if (!bsize) return NULL;
|
||||||
out16 =(wchar_t*) MEM_mallocN(sizeof(wchar_t) * (bsize + add), "UTF-16 String");
|
out16 =(wchar_t*) MEM_mallocN(sizeof(wchar_t) * (bsize + add), "UTF-16 String");
|
||||||
conv_utf_8_to_16(in8, out16, bsize);
|
conv_utf_8_to_16(in8, out16, bsize);
|
||||||
|
|||||||
@@ -40,18 +40,18 @@
|
|||||||
int bmesh_elem_check(void *element, const char htype);
|
int bmesh_elem_check(void *element, const char htype);
|
||||||
|
|
||||||
#define BM_CHECK_ELEMENT(el) \
|
#define BM_CHECK_ELEMENT(el) \
|
||||||
if (bmesh_elem_check(el, ((BMHeader *)el)->htype)) { \
|
if (bmesh_elem_check(el, ((BMHeader *)el)->htype)) { \
|
||||||
printf("check_element failure, with code %i on line %i in file\n" \
|
printf("check_element failure, with code %i on line %i in file\n" \
|
||||||
" \"%s\"\n\n", \
|
" \"%s\"\n\n", \
|
||||||
bmesh_elem_check(el, ((BMHeader *)el)->htype), \
|
bmesh_elem_check(el, ((BMHeader *)el)->htype), \
|
||||||
__LINE__, __FILE__); \
|
__LINE__, __FILE__); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define BM_DISK_EDGE_LINK_GET(e, v) ( \
|
#define BM_DISK_EDGE_LINK_GET(e, v) ( \
|
||||||
((v) == ((BMEdge *)(e))->v1) ? \
|
((v) == ((BMEdge *)(e))->v1) ? \
|
||||||
&((e)->v1_disk_link) : \
|
&((e)->v1_disk_link) : \
|
||||||
&((e)->v2_disk_link) \
|
&((e)->v2_disk_link) \
|
||||||
)
|
)
|
||||||
|
|
||||||
int bmesh_radial_length(BMLoop *l);
|
int bmesh_radial_length(BMLoop *l);
|
||||||
int bmesh_disk_count(BMVert *v);
|
int bmesh_disk_count(BMVert *v);
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
#include "BLI_utildefines.h"
|
#include "BLI_utildefines.h"
|
||||||
|
|
||||||
/* XXX: using 128 for totelem and pchunk of mempool, no idea what good
|
/* XXX: using 128 for totelem and pchunk of mempool, no idea what good
|
||||||
values would be though */
|
* values would be though */
|
||||||
#include "BLI_mempool.h"
|
#include "BLI_mempool.h"
|
||||||
|
|
||||||
#include "bmesh.h"
|
#include "bmesh.h"
|
||||||
@@ -77,7 +77,7 @@ static int edge_match(BMVert *e1_0, BMVert *e1_1, BMVert *e2[2])
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Returns true if the edge (e1, e2) is already in edges; that edge is
|
/* Returns true if the edge (e1, e2) is already in edges; that edge is
|
||||||
deleted here as well. if not found just returns 0 */
|
* deleted here as well. if not found just returns 0 */
|
||||||
static int check_for_dup(ListBase *edges, BLI_mempool *pool,
|
static int check_for_dup(ListBase *edges, BLI_mempool *pool,
|
||||||
BMVert *e1, BMVert *e2)
|
BMVert *e1, BMVert *e2)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2644,9 +2644,9 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define UI_DEF_BUT_RNA_DISABLE(but) \
|
#define UI_DEF_BUT_RNA_DISABLE(but) \
|
||||||
but->flag |= UI_BUT_DISABLED; \
|
but->flag |= UI_BUT_DISABLED; \
|
||||||
but->lock = 1; \
|
but->lock = 1; \
|
||||||
but->lockstr = ""
|
but->lockstr = ""
|
||||||
|
|
||||||
|
|
||||||
static uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, PointerRNA *ptr, PropertyRNA *prop, int index, float min, float max, float a1, float a2, const char *tip)
|
static uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, const char *str, int x1, int y1, short x2, short y2, PointerRNA *ptr, PropertyRNA *prop, int index, float min, float max, float a1, float a2, const char *tip)
|
||||||
|
|||||||
@@ -1639,7 +1639,7 @@ static void node_composit_buts_distance_matte(uiLayout *layout, bContext *UNUSED
|
|||||||
|
|
||||||
col = uiLayoutColumn(layout, 1);
|
col = uiLayoutColumn(layout, 1);
|
||||||
|
|
||||||
uiItemL(layout, "Color Space:", ICON_NONE);
|
uiItemL(layout, "Color Space:", ICON_NONE);
|
||||||
row= uiLayoutRow(layout, 0);
|
row= uiLayoutRow(layout, 0);
|
||||||
uiItemR(row, ptr, "channel", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
|
uiItemR(row, ptr, "channel", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
|
||||||
|
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ static void wform_put_line(int w,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void wform_put_line_single(
|
static void wform_put_line_single(
|
||||||
int w, unsigned char *last_pos, unsigned char *new_pos, int col)
|
int w, unsigned char *last_pos, unsigned char *new_pos, int col)
|
||||||
{
|
{
|
||||||
if (last_pos > new_pos) {
|
if (last_pos > new_pos) {
|
||||||
unsigned char *temp = new_pos;
|
unsigned char *temp = new_pos;
|
||||||
|
|||||||
@@ -2054,9 +2054,9 @@ static void mesh_foreachScreenVert__mapFunc(void *userData, int index, const flo
|
|||||||
}
|
}
|
||||||
|
|
||||||
void mesh_foreachScreenVert(
|
void mesh_foreachScreenVert(
|
||||||
ViewContext *vc,
|
ViewContext *vc,
|
||||||
void (*func)(void *userData, BMVert *eve, int x, int y, int index),
|
void (*func)(void *userData, BMVert *eve, int x, int y, int index),
|
||||||
void *userData, eV3DClipTest clipVerts)
|
void *userData, eV3DClipTest clipVerts)
|
||||||
{
|
{
|
||||||
foreachScreenVert_userData data;
|
foreachScreenVert_userData data;
|
||||||
DerivedMesh *dm = editbmesh_get_derived_cage(vc->scene, vc->obedit, vc->em, CD_MASK_BAREMESH);
|
DerivedMesh *dm = editbmesh_get_derived_cage(vc->scene, vc->obedit, vc->em, CD_MASK_BAREMESH);
|
||||||
@@ -2140,9 +2140,9 @@ static void mesh_foreachScreenEdge__mapFunc(void *userData, int index, const flo
|
|||||||
}
|
}
|
||||||
|
|
||||||
void mesh_foreachScreenEdge(
|
void mesh_foreachScreenEdge(
|
||||||
ViewContext *vc,
|
ViewContext *vc,
|
||||||
void (*func)(void *userData, BMEdge *eed, int x0, int y0, int x1, int y1, int index),
|
void (*func)(void *userData, BMEdge *eed, int x0, int y0, int x1, int y1, int index),
|
||||||
void *userData, eV3DClipTest clipVerts)
|
void *userData, eV3DClipTest clipVerts)
|
||||||
{
|
{
|
||||||
foreachScreenEdge_userData data;
|
foreachScreenEdge_userData data;
|
||||||
DerivedMesh *dm = editbmesh_get_derived_cage(vc->scene, vc->obedit, vc->em, CD_MASK_BAREMESH);
|
DerivedMesh *dm = editbmesh_get_derived_cage(vc->scene, vc->obedit, vc->em, CD_MASK_BAREMESH);
|
||||||
@@ -2187,9 +2187,9 @@ static void mesh_foreachScreenFace__mapFunc(void *userData, int index, const flo
|
|||||||
}
|
}
|
||||||
|
|
||||||
void mesh_foreachScreenFace(
|
void mesh_foreachScreenFace(
|
||||||
ViewContext *vc,
|
ViewContext *vc,
|
||||||
void (*func)(void *userData, BMFace *efa, int x, int y, int index),
|
void (*func)(void *userData, BMFace *efa, int x, int y, int index),
|
||||||
void *userData)
|
void *userData)
|
||||||
{
|
{
|
||||||
foreachScreenFace_userData data;
|
foreachScreenFace_userData data;
|
||||||
DerivedMesh *dm = editbmesh_get_derived_cage(vc->scene, vc->obedit, vc->em, CD_MASK_BAREMESH);
|
DerivedMesh *dm = editbmesh_get_derived_cage(vc->scene, vc->obedit, vc->em, CD_MASK_BAREMESH);
|
||||||
@@ -2209,9 +2209,9 @@ void mesh_foreachScreenFace(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void nurbs_foreachScreenVert(
|
void nurbs_foreachScreenVert(
|
||||||
ViewContext *vc,
|
ViewContext *vc,
|
||||||
void (*func)(void *userData, Nurb *nu, BPoint *bp, BezTriple *bezt, int beztindex, int x, int y),
|
void (*func)(void *userData, Nurb *nu, BPoint *bp, BezTriple *bezt, int beztindex, int x, int y),
|
||||||
void *userData)
|
void *userData)
|
||||||
{
|
{
|
||||||
Curve *cu = vc->obedit->data;
|
Curve *cu = vc->obedit->data;
|
||||||
short s[2] = {IS_CLIPPED, 0};
|
short s[2] = {IS_CLIPPED, 0};
|
||||||
|
|||||||
@@ -837,10 +837,11 @@ void ED_uvedit_live_unwrap(Scene *scene, Object *obedit)
|
|||||||
{
|
{
|
||||||
BMEditMesh *em = BMEdit_FromObject(obedit);
|
BMEditMesh *em = BMEdit_FromObject(obedit);
|
||||||
|
|
||||||
if (scene->toolsettings->edge_mode_live_unwrap &&
|
if (scene->toolsettings->edge_mode_live_unwrap &&
|
||||||
CustomData_has_layer(&em->bm->ldata, CD_MLOOPUV)) {
|
CustomData_has_layer(&em->bm->ldata, CD_MLOOPUV))
|
||||||
ED_unwrap_lscm(scene, obedit, FALSE); /* unwrap all not just sel */
|
{
|
||||||
}
|
ED_unwrap_lscm(scene, obedit, FALSE); /* unwrap all not just sel */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************** UV Map Common Transforms *****************/
|
/*************** UV Map Common Transforms *****************/
|
||||||
|
|||||||
@@ -49,12 +49,12 @@ struct ColorBlock
|
|||||||
ColorBlock(const Image * img, uint x, uint y);
|
ColorBlock(const Image * img, uint x, uint y);
|
||||||
|
|
||||||
void init(const Image * img, uint x, uint y);
|
void init(const Image * img, uint x, uint y);
|
||||||
void init(uint w, uint h, const uint * data, uint x, uint y);
|
void init(uint w, uint h, const uint * data, uint x, uint y);
|
||||||
void init(uint w, uint h, const float * data, uint x, uint y);
|
void init(uint w, uint h, const float * data, uint x, uint y);
|
||||||
|
|
||||||
void swizzle(uint x, uint y, uint z, uint w); // 0=r, 1=g, 2=b, 3=a, 4=0xFF, 5=0
|
void swizzle(uint x, uint y, uint z, uint w); // 0=r, 1=g, 2=b, 3=a, 4=0xFF, 5=0
|
||||||
|
|
||||||
bool isSingleColor(Color32 mask = Color32(0xFF, 0xFF, 0xFF, 0x00)) const;
|
bool isSingleColor(Color32 mask = Color32(0xFF, 0xFF, 0xFF, 0x00)) const;
|
||||||
bool hasAlpha() const;
|
bool hasAlpha() const;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -129,20 +129,20 @@ struct DDSHeader
|
|||||||
void setPixelFormat(uint bitcount, uint rmask, uint gmask, uint bmask, uint amask);
|
void setPixelFormat(uint bitcount, uint rmask, uint gmask, uint bmask, uint amask);
|
||||||
void setDX10Format(uint format);
|
void setDX10Format(uint format);
|
||||||
void setNormalFlag(bool b);
|
void setNormalFlag(bool b);
|
||||||
void setSrgbFlag(bool b);
|
void setSrgbFlag(bool b);
|
||||||
void setHasAlphaFlag(bool b);
|
void setHasAlphaFlag(bool b);
|
||||||
void setUserVersion(int version);
|
void setUserVersion(int version);
|
||||||
|
|
||||||
/*void swapBytes();*/
|
/*void swapBytes();*/
|
||||||
|
|
||||||
bool hasDX10Header() const;
|
bool hasDX10Header() const;
|
||||||
uint signature() const;
|
uint signature() const;
|
||||||
uint toolVersion() const;
|
uint toolVersion() const;
|
||||||
uint userVersion() const;
|
uint userVersion() const;
|
||||||
bool isNormalMap() const;
|
bool isNormalMap() const;
|
||||||
bool isSrgb() const;
|
bool isSrgb() const;
|
||||||
bool hasAlpha() const;
|
bool hasAlpha() const;
|
||||||
uint d3d9Format() const;
|
uint d3d9Format() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// DirectDraw Surface. (DDS)
|
/// DirectDraw Surface. (DDS)
|
||||||
|
|||||||
@@ -62,8 +62,8 @@ static int tc_types[] = { IMB_TC_RECORD_RUN,
|
|||||||
#define INDEX_FILE_VERSION 1
|
#define INDEX_FILE_VERSION 1
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
- time code index functions
|
* - time code index functions
|
||||||
---------------------------------------------------------------------- */
|
* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
anim_index_builder * IMB_index_builder_create(const char * name)
|
anim_index_builder * IMB_index_builder_create(const char * name)
|
||||||
{
|
{
|
||||||
@@ -354,8 +354,8 @@ int IMB_timecode_to_array_index(IMB_Timecode_Type tc)
|
|||||||
|
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
- rebuild helper functions
|
* - rebuild helper functions
|
||||||
---------------------------------------------------------------------- */
|
* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
static void get_index_dir(struct anim * anim, char * index_dir)
|
static void get_index_dir(struct anim * anim, char * index_dir)
|
||||||
{
|
{
|
||||||
@@ -427,8 +427,8 @@ static void get_tc_filename(struct anim * anim, IMB_Timecode_Type tc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
- common rebuilder structures
|
* - common rebuilder structures
|
||||||
---------------------------------------------------------------------- */
|
* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
typedef struct IndexBuildContext {
|
typedef struct IndexBuildContext {
|
||||||
int anim_type;
|
int anim_type;
|
||||||
@@ -436,8 +436,8 @@ typedef struct IndexBuildContext {
|
|||||||
|
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
- ffmpeg rebuilder
|
* - ffmpeg rebuilder
|
||||||
---------------------------------------------------------------------- */
|
* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
#ifdef WITH_FFMPEG
|
#ifdef WITH_FFMPEG
|
||||||
|
|
||||||
@@ -952,8 +952,8 @@ static int index_rebuild_ffmpeg(FFmpegIndexBuilderContext *context,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
- internal AVI (fallback) rebuilder
|
* - internal AVI (fallback) rebuilder
|
||||||
---------------------------------------------------------------------- */
|
* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
typedef struct FallbackIndexBuilderContext {
|
typedef struct FallbackIndexBuilderContext {
|
||||||
int anim_type;
|
int anim_type;
|
||||||
@@ -1116,8 +1116,8 @@ static void index_rebuild_fallback(FallbackIndexBuilderContext *context,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
- public API
|
* - public API
|
||||||
---------------------------------------------------------------------- */
|
* ---------------------------------------------------------------------- */
|
||||||
|
|
||||||
IndexBuildContext *IMB_anim_index_rebuild_context(struct anim *anim, IMB_Timecode_Type tcs_in_use,
|
IndexBuildContext *IMB_anim_index_rebuild_context(struct anim *anim, IMB_Timecode_Type tcs_in_use,
|
||||||
IMB_Proxy_Size proxy_sizes_in_use, int quality)
|
IMB_Proxy_Size proxy_sizes_in_use, int quality)
|
||||||
|
|||||||
@@ -330,34 +330,34 @@ static void rna_Matte_t2_set(PointerRNA *ptr, float value)
|
|||||||
|
|
||||||
static void rna_distance_matte_t1_set(PointerRNA *ptr, float value)
|
static void rna_distance_matte_t1_set(PointerRNA *ptr, float value)
|
||||||
{
|
{
|
||||||
bNode *node = (bNode*)ptr->data;
|
bNode *node = (bNode*)ptr->data;
|
||||||
NodeChroma *chroma = node->storage;
|
NodeChroma *chroma = node->storage;
|
||||||
|
|
||||||
chroma->t1 = value;
|
chroma->t1 = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rna_distance_matte_t2_set(PointerRNA *ptr, float value)
|
static void rna_distance_matte_t2_set(PointerRNA *ptr, float value)
|
||||||
{
|
{
|
||||||
bNode *node = (bNode*)ptr->data;
|
bNode *node = (bNode*)ptr->data;
|
||||||
NodeChroma *chroma = node->storage;
|
NodeChroma *chroma = node->storage;
|
||||||
|
|
||||||
chroma->t2 = value;
|
chroma->t2 = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rna_difference_matte_t1_set(PointerRNA *ptr, float value)
|
static void rna_difference_matte_t1_set(PointerRNA *ptr, float value)
|
||||||
{
|
{
|
||||||
bNode *node = (bNode*)ptr->data;
|
bNode *node = (bNode*)ptr->data;
|
||||||
NodeChroma *chroma = node->storage;
|
NodeChroma *chroma = node->storage;
|
||||||
|
|
||||||
chroma->t1 = value;
|
chroma->t1 = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rna_difference_matte_t2_set(PointerRNA *ptr, float value)
|
static void rna_difference_matte_t2_set(PointerRNA *ptr, float value)
|
||||||
{
|
{
|
||||||
bNode *node = (bNode*)ptr->data;
|
bNode *node = (bNode*)ptr->data;
|
||||||
NodeChroma *chroma = node->storage;
|
NodeChroma *chroma = node->storage;
|
||||||
|
|
||||||
chroma->t2 = value;
|
chroma->t2 = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1966,14 +1966,14 @@ static void def_cmp_distance_matte(StructRNA *srna)
|
|||||||
{
|
{
|
||||||
PropertyRNA *prop;
|
PropertyRNA *prop;
|
||||||
|
|
||||||
static EnumPropertyItem color_space_items[] = {
|
static EnumPropertyItem color_space_items[] = {
|
||||||
{1, "RGB", 0, "RGB", "RGB color space"},
|
{1, "RGB", 0, "RGB", "RGB color space"},
|
||||||
{2, "YCC", 0, "YCC", "YCbCr Suppression"},
|
{2, "YCC", 0, "YCC", "YCbCr Suppression"},
|
||||||
{0, NULL, 0, NULL, NULL}};
|
{0, NULL, 0, NULL, NULL}};
|
||||||
|
|
||||||
RNA_def_struct_sdna_from(srna, "NodeChroma", "storage");
|
RNA_def_struct_sdna_from(srna, "NodeChroma", "storage");
|
||||||
|
|
||||||
prop = RNA_def_property(srna, "channel", PROP_ENUM, PROP_NONE);
|
prop = RNA_def_property(srna, "channel", PROP_ENUM, PROP_NONE);
|
||||||
RNA_def_property_enum_sdna(prop, NULL, "channel");
|
RNA_def_property_enum_sdna(prop, NULL, "channel");
|
||||||
RNA_def_property_enum_items(prop, color_space_items);
|
RNA_def_property_enum_items(prop, color_space_items);
|
||||||
RNA_def_property_ui_text(prop, "Channel", "");
|
RNA_def_property_ui_text(prop, "Channel", "");
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
(void)0
|
(void)0
|
||||||
|
|
||||||
#define DEF_GET_SET(type, arr) \
|
#define DEF_GET_SET(type, arr) \
|
||||||
void rna_Test_ ## arr ## _get(PointerRNA * ptr, type * values) \
|
void rna_Test_ ## arr ## _get(PointerRNA * ptr, type * values) \
|
||||||
{ \
|
{ \
|
||||||
memcpy(values, arr, sizeof(arr)); \
|
memcpy(values, arr, sizeof(arr)); \
|
||||||
} \
|
} \
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
(void)0
|
(void)0
|
||||||
|
|
||||||
#define DEF_GET_SET_LEN(arr, max) \
|
#define DEF_GET_SET_LEN(arr, max) \
|
||||||
static int rna_Test_ ## arr ## _get_length(PointerRNA * ptr) \
|
static int rna_Test_ ## arr ## _get_length(PointerRNA * ptr) \
|
||||||
{ \
|
{ \
|
||||||
return arr ## _len; \
|
return arr ## _len; \
|
||||||
} \
|
} \
|
||||||
|
|||||||
@@ -782,8 +782,8 @@ static DerivedMesh * cutEdges(ExplodeModifierData *emd, DerivedMesh *dm)
|
|||||||
return splitdm;
|
return splitdm;
|
||||||
}
|
}
|
||||||
static DerivedMesh * explodeMesh(ExplodeModifierData *emd,
|
static DerivedMesh * explodeMesh(ExplodeModifierData *emd,
|
||||||
ParticleSystemModifierData *psmd, Scene *scene, Object *ob,
|
ParticleSystemModifierData *psmd, Scene *scene, Object *ob,
|
||||||
DerivedMesh *to_explode)
|
DerivedMesh *to_explode)
|
||||||
{
|
{
|
||||||
DerivedMesh *explode, *dm=to_explode;
|
DerivedMesh *explode, *dm=to_explode;
|
||||||
MFace *mf= NULL, *mface;
|
MFace *mf= NULL, *mface;
|
||||||
|
|||||||
@@ -104,9 +104,9 @@ static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void foreachObjectLink(
|
static void foreachObjectLink(
|
||||||
ModifierData *md, Object *ob,
|
ModifierData *md, Object *ob,
|
||||||
void (*walk)(void *userData, Object *ob, Object **obpoin),
|
void (*walk)(void *userData, Object *ob, Object **obpoin),
|
||||||
void *userData)
|
void *userData)
|
||||||
{
|
{
|
||||||
MeshDeformModifierData *mmd = (MeshDeformModifierData*) md;
|
MeshDeformModifierData *mmd = (MeshDeformModifierData*) md;
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ static void node_composit_exec_color_matte(void *data, bNode *node, bNodeStack *
|
|||||||
/*convert rgbbuf to hsv*/
|
/*convert rgbbuf to hsv*/
|
||||||
composit1_pixel_processor(node, colorbuf, cbuf, in[0]->vec, do_rgba_to_hsva, CB_RGBA);
|
composit1_pixel_processor(node, colorbuf, cbuf, in[0]->vec, do_rgba_to_hsva, CB_RGBA);
|
||||||
|
|
||||||
/*convert key to hsv*/
|
/*convert key to hsv*/
|
||||||
do_rgba_to_hsva(node, c->key, in[1]->vec);
|
do_rgba_to_hsva(node, c->key, in[1]->vec);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -161,7 +161,7 @@ static void do_apply_spillmap_green(bNode *node, float* out, float *in, float *m
|
|||||||
out[0]=in[0]+(ncs->uspillr*map[0]);
|
out[0]=in[0]+(ncs->uspillr*map[0]);
|
||||||
out[1]=in[1]-(ncs->uspillg*map[0]);
|
out[1]=in[1]-(ncs->uspillg*map[0]);
|
||||||
out[2]=in[2]+(ncs->uspillb*map[0]);
|
out[2]=in[2]+(ncs->uspillb*map[0]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
out[0]=in[0];
|
out[0]=in[0];
|
||||||
out[1]=in[1];
|
out[1]=in[1];
|
||||||
@@ -177,7 +177,7 @@ static void do_apply_spillmap_blue(bNode *node, float* out, float *in, float *ma
|
|||||||
out[0]=in[0]+(ncs->uspillr*map[0]);
|
out[0]=in[0]+(ncs->uspillr*map[0]);
|
||||||
out[1]=in[1]+(ncs->uspillg*map[0]);
|
out[1]=in[1]+(ncs->uspillg*map[0]);
|
||||||
out[2]=in[2]-(ncs->uspillb*map[0]);
|
out[2]=in[2]-(ncs->uspillb*map[0]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
out[0]=in[0];
|
out[0]=in[0];
|
||||||
out[1]=in[1];
|
out[1]=in[1];
|
||||||
|
|||||||
@@ -313,7 +313,7 @@ float *node_composit_get_float_buffer(RenderData *rd, ImBuf *ibuf, int *alloc)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* note: this function is used for multilayer too, to ensure uniform
|
/* note: this function is used for multilayer too, to ensure uniform
|
||||||
handling with BKE_image_get_ibuf() */
|
* handling with BKE_image_get_ibuf() */
|
||||||
static CompBuf *node_composit_get_image(RenderData *rd, Image *ima, ImageUser *iuser)
|
static CompBuf *node_composit_get_image(RenderData *rd, Image *ima, ImageUser *iuser)
|
||||||
{
|
{
|
||||||
ImBuf *ibuf;
|
ImBuf *ibuf;
|
||||||
|
|||||||
@@ -113,16 +113,16 @@ void register_node_type_cmp_sephsva(bNodeTreeType *ttype)
|
|||||||
|
|
||||||
|
|
||||||
/* **************** COMBINE HSVA ******************** */
|
/* **************** COMBINE HSVA ******************** */
|
||||||
static bNodeSocketTemplate cmp_node_combhsva_in[]= {
|
static bNodeSocketTemplate cmp_node_combhsva_in[] = {
|
||||||
{ SOCK_FLOAT, 1, "H", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
|
{ SOCK_FLOAT, 1, "H", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
|
||||||
{ SOCK_FLOAT, 1, "S", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
|
{ SOCK_FLOAT, 1, "S", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
|
||||||
{ SOCK_FLOAT, 1, "V", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
|
{ SOCK_FLOAT, 1, "V", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
|
||||||
{ SOCK_FLOAT, 1, "A", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
|
{ SOCK_FLOAT, 1, "A", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
|
||||||
{ -1, 0, "" }
|
{ -1, 0, "" }
|
||||||
};
|
};
|
||||||
static bNodeSocketTemplate cmp_node_combhsva_out[]= {
|
static bNodeSocketTemplate cmp_node_combhsva_out[]= {
|
||||||
{ SOCK_RGBA, 0, "Image"},
|
{ SOCK_RGBA, 0, "Image"},
|
||||||
{ -1, 0, "" }
|
{ -1, 0, "" }
|
||||||
};
|
};
|
||||||
|
|
||||||
static void do_comb_hsva(bNode *UNUSED(node), float *out, float *in1, float *in2, float *in3, float *in4)
|
static void do_comb_hsva(bNode *UNUSED(node), float *out, float *in1, float *in2, float *in3, float *in4)
|
||||||
|
|||||||
@@ -90,12 +90,12 @@ void register_node_type_sh_valtorgb(bNodeTreeType *ttype)
|
|||||||
|
|
||||||
/* **************** RGBTOBW ******************** */
|
/* **************** RGBTOBW ******************** */
|
||||||
static bNodeSocketTemplate sh_node_rgbtobw_in[]= {
|
static bNodeSocketTemplate sh_node_rgbtobw_in[]= {
|
||||||
{ SOCK_RGBA, 1, "Color", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f},
|
{ SOCK_RGBA, 1, "Color", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f},
|
||||||
{ -1, 0, "" }
|
{ -1, 0, "" }
|
||||||
};
|
};
|
||||||
static bNodeSocketTemplate sh_node_rgbtobw_out[]= {
|
static bNodeSocketTemplate sh_node_rgbtobw_out[]= {
|
||||||
{ SOCK_FLOAT, 0, "Val", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
|
{ SOCK_FLOAT, 0, "Val", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
|
||||||
{ -1, 0, "" }
|
{ -1, 0, "" }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -138,8 +138,8 @@ void BPy_BM_init_types(void);
|
|||||||
PyObject *BPyInit_bmesh_types(void);
|
PyObject *BPyInit_bmesh_types(void);
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
BPY_BMFLAG_NOP = 0, /* do nothing */
|
BPY_BMFLAG_NOP = 0, /* do nothing */
|
||||||
BPY_BMFLAG_IS_WRAPPED = 1 /* the mesh is owned by editmode */
|
BPY_BMFLAG_IS_WRAPPED = 1 /* the mesh is owned by editmode */
|
||||||
};
|
};
|
||||||
|
|
||||||
PyObject *BPy_BMesh_CreatePyObject(BMesh *bm, int flag);
|
PyObject *BPy_BMesh_CreatePyObject(BMesh *bm, int flag);
|
||||||
|
|||||||
@@ -5691,14 +5691,14 @@ void RE_Database_FromScene_Vectors(Render *re, Main *bmain, Scene *sce, unsigned
|
|||||||
|
|
||||||
/* setup for shaded view or bake, so only lamps and materials are initialized */
|
/* setup for shaded view or bake, so only lamps and materials are initialized */
|
||||||
/* type:
|
/* type:
|
||||||
RE_BAKE_LIGHT: for shaded view, only add lamps
|
* RE_BAKE_LIGHT: for shaded view, only add lamps
|
||||||
RE_BAKE_ALL: for baking, all lamps and objects
|
* RE_BAKE_ALL: for baking, all lamps and objects
|
||||||
RE_BAKE_NORMALS:for baking, no lamps and only selected objects
|
* RE_BAKE_NORMALS:for baking, no lamps and only selected objects
|
||||||
RE_BAKE_AO: for baking, no lamps, but all objects
|
* RE_BAKE_AO: for baking, no lamps, but all objects
|
||||||
RE_BAKE_TEXTURE:for baking, no lamps, only selected objects
|
* RE_BAKE_TEXTURE:for baking, no lamps, only selected objects
|
||||||
RE_BAKE_DISPLACEMENT:for baking, no lamps, only selected objects
|
* RE_BAKE_DISPLACEMENT:for baking, no lamps, only selected objects
|
||||||
RE_BAKE_SHADOW: for baking, only shadows, but all objects
|
* RE_BAKE_SHADOW: for baking, only shadows, but all objects
|
||||||
*/
|
*/
|
||||||
void RE_Database_Baking(Render *re, Main *bmain, Scene *scene, unsigned int lay, const int type, Object *actob)
|
void RE_Database_Baking(Render *re, Main *bmain, Scene *scene, unsigned int lay, const int type, Object *actob)
|
||||||
{
|
{
|
||||||
Object *camera;
|
Object *camera;
|
||||||
|
|||||||
@@ -815,8 +815,8 @@ char *WM_keymap_item_to_string(wmKeyMapItem *kmi, char *str, int len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static wmKeyMapItem *wm_keymap_item_find_handlers(
|
static wmKeyMapItem *wm_keymap_item_find_handlers(
|
||||||
const bContext *C, ListBase *handlers, const char *opname, int UNUSED(opcontext),
|
const bContext *C, ListBase *handlers, const char *opname, int UNUSED(opcontext),
|
||||||
IDProperty *properties, int compare_props, int hotkey, wmKeyMap **keymap_r)
|
IDProperty *properties, int compare_props, int hotkey, wmKeyMap **keymap_r)
|
||||||
{
|
{
|
||||||
wmWindowManager *wm = CTX_wm_manager(C);
|
wmWindowManager *wm = CTX_wm_manager(C);
|
||||||
wmEventHandler *handler;
|
wmEventHandler *handler;
|
||||||
@@ -856,8 +856,8 @@ static wmKeyMapItem *wm_keymap_item_find_handlers(
|
|||||||
}
|
}
|
||||||
|
|
||||||
static wmKeyMapItem *wm_keymap_item_find_props(
|
static wmKeyMapItem *wm_keymap_item_find_props(
|
||||||
const bContext *C, const char *opname, int opcontext,
|
const bContext *C, const char *opname, int opcontext,
|
||||||
IDProperty *properties, int compare_props, int hotkey, wmKeyMap **keymap_r)
|
IDProperty *properties, int compare_props, int hotkey, wmKeyMap **keymap_r)
|
||||||
{
|
{
|
||||||
wmWindow *win = CTX_wm_window(C);
|
wmWindow *win = CTX_wm_window(C);
|
||||||
ScrArea *sa = CTX_wm_area(C);
|
ScrArea *sa = CTX_wm_area(C);
|
||||||
@@ -906,8 +906,8 @@ static wmKeyMapItem *wm_keymap_item_find_props(
|
|||||||
}
|
}
|
||||||
|
|
||||||
static wmKeyMapItem *wm_keymap_item_find(
|
static wmKeyMapItem *wm_keymap_item_find(
|
||||||
const bContext *C, const char *opname, int opcontext,
|
const bContext *C, const char *opname, int opcontext,
|
||||||
IDProperty *properties, const short hotkey, const short sloppy, wmKeyMap **keymap_r)
|
IDProperty *properties, const short hotkey, const short sloppy, wmKeyMap **keymap_r)
|
||||||
{
|
{
|
||||||
wmKeyMapItem *found = wm_keymap_item_find_props(C, opname, opcontext, properties, 1, hotkey, keymap_r);
|
wmKeyMapItem *found = wm_keymap_item_find_props(C, opname, opcontext, properties, 1, hotkey, keymap_r);
|
||||||
|
|
||||||
@@ -918,8 +918,8 @@ static wmKeyMapItem *wm_keymap_item_find(
|
|||||||
}
|
}
|
||||||
|
|
||||||
char *WM_key_event_operator_string(
|
char *WM_key_event_operator_string(
|
||||||
const bContext *C, const char *opname, int opcontext,
|
const bContext *C, const char *opname, int opcontext,
|
||||||
IDProperty *properties, const short sloppy, char *str, int len)
|
IDProperty *properties, const short sloppy, char *str, int len)
|
||||||
{
|
{
|
||||||
wmKeyMapItem *kmi = wm_keymap_item_find(C, opname, opcontext, properties, 0, sloppy, NULL);
|
wmKeyMapItem *kmi = wm_keymap_item_find(C, opname, opcontext, properties, 0, sloppy, NULL);
|
||||||
|
|
||||||
@@ -932,8 +932,8 @@ char *WM_key_event_operator_string(
|
|||||||
}
|
}
|
||||||
|
|
||||||
int WM_key_event_operator_id(
|
int WM_key_event_operator_id(
|
||||||
const bContext *C, const char *opname, int opcontext,
|
const bContext *C, const char *opname, int opcontext,
|
||||||
IDProperty *properties, int hotkey, wmKeyMap **keymap_r)
|
IDProperty *properties, int hotkey, wmKeyMap **keymap_r)
|
||||||
{
|
{
|
||||||
wmKeyMapItem *kmi = wm_keymap_item_find(C, opname, opcontext, properties, hotkey, TRUE, keymap_r);
|
wmKeyMapItem *kmi = wm_keymap_item_find(C, opname, opcontext, properties, hotkey, TRUE, keymap_r);
|
||||||
|
|
||||||
|
|||||||
@@ -33,10 +33,10 @@
|
|||||||
#define __KX_CONVERTPROPERTIES_H__
|
#define __KX_CONVERTPROPERTIES_H__
|
||||||
|
|
||||||
void BL_ConvertProperties(struct Object* object,
|
void BL_ConvertProperties(struct Object* object,
|
||||||
class KX_GameObject* gameobj,
|
class KX_GameObject* gameobj,
|
||||||
class SCA_TimeEventManager* timemgr,
|
class SCA_TimeEventManager* timemgr,
|
||||||
class SCA_IScene* scene,
|
class SCA_IScene* scene,
|
||||||
bool isInActiveLayer);
|
bool isInActiveLayer);
|
||||||
|
|
||||||
#endif //__KX_CONVERTPROPERTIES_H__
|
#endif //__KX_CONVERTPROPERTIES_H__
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ enum KX_PYGENSEQ_TYPE {
|
|||||||
extern PyTypeObject KX_PythonSeq_Type;
|
extern PyTypeObject KX_PythonSeq_Type;
|
||||||
|
|
||||||
#define BPy_KX_PythonSeq_Check(obj) \
|
#define BPy_KX_PythonSeq_Check(obj) \
|
||||||
(Py_TYPE(obj) == &KX_PythonSeq_Type)
|
(Py_TYPE(obj) == &KX_PythonSeq_Type)
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
PyObject_VAR_HEAD
|
PyObject_VAR_HEAD
|
||||||
|
|||||||
Reference in New Issue
Block a user