- added GCC warning -Wstrict-prototypes
- fixed bug in paste material, exposed by stricter warnings. - removed/renamed various shadowed vars. - removed BGE lamp.colour, only allow lamp.color attribute.
This commit is contained in:
parent
aca76ddb50
commit
cd97253502
@ -979,7 +979,7 @@ IF((NOT WIN32) AND (NOT MSVC))
|
||||
ENDIF((NOT WIN32) AND (NOT MSVC))
|
||||
|
||||
IF(CMAKE_COMPILER_IS_GNUCC)
|
||||
SET(C_WARNINGS "${C_WARNINGS} -Wunused-parameter -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=return-type")
|
||||
SET(C_WARNINGS "${C_WARNINGS} -Wunused-parameter -Werror=strict-prototypes -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=return-type")
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCC)
|
||||
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS} ${C_WARNINGS}")
|
||||
|
@ -261,7 +261,9 @@ ENDMACRO(_REMOVE_STRICT_FLAGS)
|
||||
MACRO(REMOVE_STRICT_FLAGS)
|
||||
|
||||
IF(CMAKE_COMPILER_IS_GNUCC)
|
||||
_REMOVE_STRICT_FLAGS("-Wstrict-prototypes")
|
||||
_REMOVE_STRICT_FLAGS("-Wunused-parameter")
|
||||
_REMOVE_STRICT_FLAGS("-Wshadow")
|
||||
_REMOVE_STRICT_FLAGS("-Werror=[^ ]+")
|
||||
_REMOVE_STRICT_FLAGS("-Werror")
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCC)
|
||||
|
@ -327,7 +327,7 @@ if MACOSX_ARCHITECTURE == 'x86_64':
|
||||
REL_CCFLAGS = REL_CCFLAGS+['-march=core2','-mssse3','-with-tune=core2','-enable-threads']
|
||||
|
||||
CC_WARN = ['-Wall']
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wpointer-arith', '-Wcast-align', '-Wdeclaration-after-statement', '-Wno-unknown-pragmas']
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wpointer-arith', '-Wcast-align', '-Wdeclaration-after-statement', '-Wno-unknown-pragmas', '-Wstrict-prototypes']
|
||||
CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
|
||||
|
||||
##FIX_STUBS_WARNINGS = -Wno-unused
|
||||
|
@ -188,7 +188,7 @@ REL_CCFLAGS = ['-O2']
|
||||
##ARFLAGS = ruv
|
||||
##ARFLAGSQUIET = ru
|
||||
##
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement']
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
|
||||
CC_WARN = ['-Wall']
|
||||
CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
|
||||
|
||||
|
@ -188,7 +188,7 @@ REL_CCFLAGS = ['-O2']
|
||||
##ARFLAGS = ruv
|
||||
##ARFLAGSQUIET = ru
|
||||
##
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement']
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
|
||||
CC_WARN = ['-Wall']
|
||||
CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
|
||||
|
||||
|
@ -188,7 +188,7 @@ REL_CCFLAGS = ['-O2']
|
||||
##ARFLAGS = ruv
|
||||
##ARFLAGSQUIET = ru
|
||||
##
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement']
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
|
||||
CC_WARN = ['-Wall']
|
||||
CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
|
||||
|
||||
|
@ -204,7 +204,7 @@ REL_CCFLAGS = ['-O2']
|
||||
##ARFLAGS = ruv
|
||||
##ARFLAGSQUIET = ru
|
||||
##
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wunused-parameter', '-Werror=declaration-after-statement', '-Werror=implicit-function-declaration', '-Werror=return-type']
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wunused-parameter', '-Wstrict-prototypes', '-Werror=declaration-after-statement', '-Werror=implicit-function-declaration', '-Werror=return-type']
|
||||
CC_WARN = ['-Wall']
|
||||
CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
|
||||
|
||||
|
@ -178,7 +178,7 @@ CPPFLAGS = ['-DWIN32', '-DFREE_WINDOWS', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_
|
||||
CXXFLAGS = ['-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
|
||||
REL_CFLAGS = [ '-O2' ]
|
||||
REL_CCFLAGS = [ '-O2' ]
|
||||
C_WARN = [ '-Wall' , '-Wno-char-subscripts', '-Wdeclaration-after-statement' ]
|
||||
C_WARN = ['-Wall', '-Wstrict-prototypes', '-Wno-char-subscripts', '-Wdeclaration-after-statement']
|
||||
|
||||
CC_WARN = [ '-Wall' ]
|
||||
|
||||
|
@ -132,7 +132,7 @@ REL_CCFLAGS = ['-O2']
|
||||
##
|
||||
CC = 'gcc'
|
||||
CXX = 'g++'
|
||||
C_WARN = ['-Wdeclaration-after-statement']
|
||||
C_WARN = ['-Wdeclaration-after-statement', '-Wstrict-prototypes']
|
||||
|
||||
CC_WARN = ['-Wall']
|
||||
|
||||
|
@ -169,7 +169,7 @@ CXXFLAGS = ['-pipe', '-mwindows', '-funsigned-char', '-fno-strict-aliasing' ]
|
||||
REL_CFLAGS = [ '-O2' ]
|
||||
REL_CCFLAGS = [ '-O2' ]
|
||||
|
||||
C_WARN = [ '-Wno-char-subscripts', '-Wdeclaration-after-statement' ]
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
|
||||
|
||||
CC_WARN = [ '-Wall' ]
|
||||
|
||||
|
2
extern/glew/include/GL/glew.h
vendored
2
extern/glew/include/GL/glew.h
vendored
@ -12220,7 +12220,7 @@ GLEWAPI GLboolean glewContextIsSupported (GLEWContext* ctx, const char* name);
|
||||
|
||||
#else /* GLEW_MX */
|
||||
|
||||
GLEWAPI GLenum glewInit ();
|
||||
GLEWAPI GLenum glewInit (void);
|
||||
GLEWAPI GLboolean glewIsSupported (const char* name);
|
||||
#define glewIsExtensionSupported(x) glewIsSupported(x)
|
||||
|
||||
|
@ -58,7 +58,7 @@ typedef struct
|
||||
/**
|
||||
* Initializes FFMPEG if it is enabled.
|
||||
*/
|
||||
extern void AUD_initOnce();
|
||||
extern void AUD_initOnce(void);
|
||||
|
||||
/**
|
||||
* Initializes an audio device.
|
||||
@ -72,17 +72,17 @@ extern int AUD_init(AUD_DeviceType device, AUD_DeviceSpecs specs, int buffersize
|
||||
/**
|
||||
* Unitinitializes an audio device.
|
||||
*/
|
||||
extern void AUD_exit();
|
||||
extern void AUD_exit(void);
|
||||
|
||||
/**
|
||||
* Locks the playback device.
|
||||
*/
|
||||
extern void AUD_lock();
|
||||
extern void AUD_lock(void);
|
||||
|
||||
/**
|
||||
* Unlocks the device.
|
||||
*/
|
||||
extern void AUD_unlock();
|
||||
extern void AUD_unlock(void);
|
||||
|
||||
/**
|
||||
* Returns information about a sound.
|
||||
@ -471,9 +471,9 @@ extern void AUD_muteSequencer(AUD_Sound* sequencer, AUD_SequencerEntry* entry,
|
||||
|
||||
extern int AUD_readSound(AUD_Sound* sound, sample_t* buffer, int length);
|
||||
|
||||
extern void AUD_startPlayback();
|
||||
extern void AUD_startPlayback(void);
|
||||
|
||||
extern void AUD_stopPlayback();
|
||||
extern void AUD_stopPlayback(void);
|
||||
|
||||
extern void AUD_seekSequencer(AUD_Channel* handle, float time);
|
||||
|
||||
@ -483,7 +483,7 @@ extern float AUD_getSequencerPosition(AUD_Channel* handle);
|
||||
extern void AUD_setSyncCallback(AUD_syncFunction function, void* data);
|
||||
#endif
|
||||
|
||||
extern int AUD_doesPlayback();
|
||||
extern int AUD_doesPlayback(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ extern "C" {
|
||||
/**
|
||||
* Initalizes the Python module.
|
||||
*/
|
||||
extern PyObject* AUD_initPython();
|
||||
extern PyObject* AUD_initPython(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -41,20 +41,20 @@ extern "C" {
|
||||
* "unpack and run" path, then look for properly installed path, not including versioning.
|
||||
* @return Unsigned char string pointing to system dir (eg /usr/share/blender/).
|
||||
*/
|
||||
extern const GHOST_TUns8* GHOST_getSystemDir();
|
||||
extern const GHOST_TUns8* GHOST_getSystemDir(void);
|
||||
|
||||
/**
|
||||
* Determine the base dir in which user configuration is stored, not including versioning.
|
||||
* @return Unsigned char string pointing to user dir (eg ~).
|
||||
*/
|
||||
extern const GHOST_TUns8* GHOST_getUserDir();
|
||||
extern const GHOST_TUns8* GHOST_getUserDir(void);
|
||||
|
||||
|
||||
/**
|
||||
* Determine the dir in which the binary file is found.
|
||||
* @return Unsigned char string pointing to binary dir (eg ~/usr/local/bin/).
|
||||
*/
|
||||
extern const GHOST_TUns8* GHOST_getBinaryDir();
|
||||
extern const GHOST_TUns8* GHOST_getBinaryDir(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -444,7 +444,7 @@ typedef struct {
|
||||
GHOST_TUns64 delta;
|
||||
} GHOST_TEventNDOFData;
|
||||
|
||||
typedef int (*GHOST_NDOFLibraryInit_fp)();
|
||||
typedef int (*GHOST_NDOFLibraryInit_fp)(void);
|
||||
typedef void (*GHOST_NDOFLibraryShutdown_fp)(void* deviceHandle);
|
||||
typedef void* (*GHOST_NDOFDeviceOpen_fp)(void* platformData);
|
||||
|
||||
|
@ -177,13 +177,13 @@ static void print_error(const char *str, ...)
|
||||
if (error_callback) error_callback(buf);
|
||||
}
|
||||
|
||||
static void mem_lock_thread()
|
||||
static void mem_lock_thread(void)
|
||||
{
|
||||
if (thread_lock_callback)
|
||||
thread_lock_callback();
|
||||
}
|
||||
|
||||
static void mem_unlock_thread()
|
||||
static void mem_unlock_thread(void)
|
||||
{
|
||||
if (thread_unlock_callback)
|
||||
thread_unlock_callback();
|
||||
|
@ -39,7 +39,7 @@ typedef void(*MEM_CacheLimiter_Destruct_Func)(void*);
|
||||
|
||||
#ifndef __MEM_cache_limiter_h_included__
|
||||
extern void MEM_CacheLimiter_set_maximum(int m);
|
||||
extern int MEM_CacheLimiter_get_maximum();
|
||||
extern int MEM_CacheLimiter_get_maximum(void);
|
||||
#endif
|
||||
/**
|
||||
* Create new MEM_CacheLimiter object
|
||||
|
@ -24,6 +24,9 @@
|
||||
#
|
||||
# ***** END GPL LICENSE BLOCK *****
|
||||
|
||||
# External project, better not fix warnings.
|
||||
REMOVE_STRICT_FLAGS()
|
||||
|
||||
SET(INC
|
||||
extern
|
||||
superlu
|
||||
|
2
intern/opennl/extern/ONL_opennl.h
vendored
2
intern/opennl/extern/ONL_opennl.h
vendored
@ -136,7 +136,7 @@ void nlMatrixMultiply(NLfloat *x, NLfloat *y);
|
||||
/* Solve */
|
||||
|
||||
void nlPrintMatrix(void);
|
||||
NLboolean nlSolve();
|
||||
NLboolean nlSolve(void);
|
||||
NLboolean nlSolveAdvanced(NLint *permutation, NLboolean solveAgain);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -246,7 +246,7 @@ extern void heap_relax_snode (const int, int *, const int, int *, int *);
|
||||
extern void resetrep_col (const int, const int *, int *);
|
||||
extern int spcoletree (int *, int *, int *, int, int, int *);
|
||||
extern int *TreePostorder (int, int *);
|
||||
extern double SuperLU_timer_ ();
|
||||
extern double SuperLU_timer_ (void);
|
||||
extern int sp_ienv (int);
|
||||
extern int lsame_ (char *, char *);
|
||||
extern int xerbla_ (char *, int *);
|
||||
|
@ -68,7 +68,7 @@ void BKE_icon_delete(struct ID* id);
|
||||
void BKE_icon_changed(int icon_id);
|
||||
|
||||
/* free all icons */
|
||||
void BKE_icons_free();
|
||||
void BKE_icons_free(void);
|
||||
|
||||
/* free the preview image */
|
||||
void BKE_previewimg_free(struct PreviewImage **prv);
|
||||
@ -77,7 +77,7 @@ void BKE_previewimg_free(struct PreviewImage **prv);
|
||||
void BKE_previewimg_free_id(ID *id);
|
||||
|
||||
/* create a new preview image */
|
||||
struct PreviewImage* BKE_previewimg_create() ;
|
||||
struct PreviewImage* BKE_previewimg_create(void) ;
|
||||
|
||||
/* create a copy of the preview image */
|
||||
struct PreviewImage* BKE_previewimg_copy(struct PreviewImage *prv);
|
||||
|
@ -113,7 +113,7 @@ struct SeqEffectHandle {
|
||||
|
||||
/* number of input strips needed
|
||||
(called directly after construction) */
|
||||
int (*num_inputs)();
|
||||
int (*num_inputs)(void);
|
||||
|
||||
/* load is called first time after readblenfile in
|
||||
get_sequence_effect automatically */
|
||||
@ -208,10 +208,10 @@ typedef enum {
|
||||
SEQ_STRIPELEM_IBUF_ENDSTILL
|
||||
} seq_stripelem_ibuf_t;
|
||||
|
||||
void seq_stripelem_cache_init();
|
||||
void seq_stripelem_cache_destruct();
|
||||
void seq_stripelem_cache_init(void);
|
||||
void seq_stripelem_cache_destruct(void);
|
||||
|
||||
void seq_stripelem_cache_cleanup();
|
||||
void seq_stripelem_cache_cleanup(void);
|
||||
|
||||
struct ImBuf * seq_stripelem_cache_get(
|
||||
SeqRenderData context, struct Sequence * seq,
|
||||
|
@ -113,12 +113,12 @@ typedef struct SK_Gesture {
|
||||
/************************************************/
|
||||
|
||||
void freeSketch(SK_Sketch *sketch);
|
||||
SK_Sketch* createSketch();
|
||||
SK_Sketch* createSketch(void);
|
||||
|
||||
void sk_removeStroke(SK_Sketch *sketch, SK_Stroke *stk);
|
||||
|
||||
void sk_freeStroke(SK_Stroke *stk);
|
||||
SK_Stroke* sk_createStroke();
|
||||
SK_Stroke* sk_createStroke(void);
|
||||
|
||||
SK_Point *sk_lastStrokePoint(SK_Stroke *stk);
|
||||
|
||||
|
@ -38,11 +38,11 @@ struct ListBase;
|
||||
struct Main;
|
||||
struct Sequence;
|
||||
|
||||
void sound_init_once();
|
||||
void sound_init_once(void);
|
||||
|
||||
void sound_init(struct Main *main);
|
||||
|
||||
void sound_exit();
|
||||
void sound_exit(void);
|
||||
|
||||
void sound_force_device(int device);
|
||||
int sound_define_from_str(char *str);
|
||||
|
@ -64,27 +64,27 @@ typedef struct SuggList {
|
||||
} SuggList;
|
||||
|
||||
/* Free all text tool memory */
|
||||
void free_texttools();
|
||||
void free_texttools(void);
|
||||
|
||||
/* Used to identify which Text object the current tools should appear against */
|
||||
void texttool_text_set_active(Text *text);
|
||||
void texttool_text_clear();
|
||||
void texttool_text_clear(void);
|
||||
short texttool_text_is_active(Text *text);
|
||||
|
||||
/* Suggestions */
|
||||
void texttool_suggest_add(const char *name, char type);
|
||||
void texttool_suggest_prefix(const char *prefix);
|
||||
void texttool_suggest_clear();
|
||||
SuggItem *texttool_suggest_first();
|
||||
SuggItem *texttool_suggest_last();
|
||||
void texttool_suggest_clear(void);
|
||||
SuggItem *texttool_suggest_first(void);
|
||||
SuggItem *texttool_suggest_last(void);
|
||||
void texttool_suggest_select(SuggItem *sel);
|
||||
SuggItem *texttool_suggest_selected();
|
||||
int *texttool_suggest_top();
|
||||
SuggItem *texttool_suggest_selected(void);
|
||||
int *texttool_suggest_top(void);
|
||||
|
||||
/* Documentation */
|
||||
void texttool_docs_show(const char *docs);
|
||||
char *texttool_docs_get();
|
||||
void texttool_docs_clear();
|
||||
char *texttool_docs_get(void);
|
||||
void texttool_docs_clear(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ void tend ( void )
|
||||
{
|
||||
gettimeofday ( &_tend,&tz );
|
||||
}
|
||||
double tval()
|
||||
double tval(void)
|
||||
{
|
||||
double t1, t2;
|
||||
t1 = ( double ) _tstart.tv_sec + ( double ) _tstart.tv_usec/ ( 1000*1000 );
|
||||
|
@ -3903,7 +3903,7 @@ static bConstraintTypeInfo *constraintsTypeInfo[NUM_CONSTRAINT_TYPES];
|
||||
static short CTI_INIT= 1; /* when non-zero, the list needs to be updated */
|
||||
|
||||
/* This function only gets called when CTI_INIT is non-zero */
|
||||
static void constraints_init_typeinfo () {
|
||||
static void constraints_init_typeinfo (void) {
|
||||
constraintsTypeInfo[0]= NULL; /* 'Null' Constraint */
|
||||
constraintsTypeInfo[1]= &CTI_CHILDOF; /* ChildOf Constraint */
|
||||
constraintsTypeInfo[2]= &CTI_TRACKTO; /* TrackTo Constraint */
|
||||
|
@ -932,7 +932,7 @@ static FModifierTypeInfo *fmodifiersTypeInfo[FMODIFIER_NUM_TYPES];
|
||||
static short FMI_INIT= 1; /* when non-zero, the list needs to be updated */
|
||||
|
||||
/* This function only gets called when FMI_INIT is non-zero */
|
||||
static void fmods_init_typeinfo ()
|
||||
static void fmods_init_typeinfo (void)
|
||||
{
|
||||
fmodifiersTypeInfo[0]= NULL; /* 'Null' F-Curve Modifier */
|
||||
fmodifiersTypeInfo[1]= &FMI_GENERATOR; /* Generator F-Curve Modifier */
|
||||
|
@ -76,7 +76,7 @@ static void icon_free(void *val)
|
||||
|
||||
/* create an id for a new icon and make sure that ids from deleted icons get reused
|
||||
after the integer number range is used up */
|
||||
static int get_next_free_id()
|
||||
static int get_next_free_id(void)
|
||||
{
|
||||
int startId = gFirstIconId;
|
||||
|
||||
|
@ -85,7 +85,7 @@ static void itend(void)
|
||||
{
|
||||
gettimeofday(&_itend,&itz);
|
||||
}
|
||||
double itval()
|
||||
double itval(void)
|
||||
{
|
||||
double t1, t2;
|
||||
t1 = (double)_itstart.tv_sec + (double)_itstart.tv_usec/(1000*1000);
|
||||
|
@ -1402,7 +1402,7 @@ void paste_matcopybuf(Material *ma)
|
||||
MEM_freeN(ma->nodetree);
|
||||
}
|
||||
|
||||
GPU_materials_free(ma);
|
||||
GPU_material_free(ma);
|
||||
|
||||
id= (ma->id);
|
||||
memcpy(ma, &matcopybuf, sizeof(Material));
|
||||
|
@ -119,8 +119,8 @@ static struct ImBuf * prepare_effect_imbufs(
|
||||
|
||||
static void open_plugin_seq(PluginSeq *pis, const char *seqname)
|
||||
{
|
||||
int (*version)();
|
||||
void* (*alloc_private)();
|
||||
int (*version)(void);
|
||||
void* (*alloc_private)(void);
|
||||
char *cp;
|
||||
|
||||
/* to be sure: (is tested for) */
|
||||
@ -143,7 +143,7 @@ static void open_plugin_seq(PluginSeq *pis, const char *seqname)
|
||||
|
||||
if (pis->handle != 0) {
|
||||
/* find the address of the version function */
|
||||
version= (int (*)())PIL_dynlib_find_symbol(pis->handle, "plugin_seq_getversion");
|
||||
version= (int (*)(void))PIL_dynlib_find_symbol(pis->handle, "plugin_seq_getversion");
|
||||
if (test_dlerr(pis->name, "plugin_seq_getversion")) return;
|
||||
|
||||
if (version != 0) {
|
||||
@ -177,7 +177,7 @@ static void open_plugin_seq(PluginSeq *pis, const char *seqname)
|
||||
return;
|
||||
}
|
||||
}
|
||||
alloc_private = (void* (*)())PIL_dynlib_find_symbol(
|
||||
alloc_private = (void* (*)(void))PIL_dynlib_find_symbol(
|
||||
pis->handle, "plugin_seq_alloc_private_data");
|
||||
if (alloc_private) {
|
||||
pis->instance_private_data = alloc_private();
|
||||
@ -246,7 +246,7 @@ static void init_plugin(Sequence * seq, const char * fname)
|
||||
/*
|
||||
* FIXME: should query plugin! Could be generator, that needs zero inputs...
|
||||
*/
|
||||
static int num_inputs_plugin()
|
||||
static int num_inputs_plugin(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
@ -969,7 +969,7 @@ static void gamtabs(float gamma)
|
||||
|
||||
}
|
||||
|
||||
static void build_gammatabs()
|
||||
static void build_gammatabs(void)
|
||||
{
|
||||
if (gamma_tabs_init == FALSE) {
|
||||
gamtabs(2.0f);
|
||||
@ -1860,7 +1860,7 @@ static void init_wipe_effect(Sequence *seq)
|
||||
seq->effectdata = MEM_callocN(sizeof(struct WipeVars), "wipevars");
|
||||
}
|
||||
|
||||
static int num_inputs_wipe()
|
||||
static int num_inputs_wipe(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
@ -2044,7 +2044,7 @@ static void init_transform_effect(Sequence *seq)
|
||||
transform->uniform_scale=0;
|
||||
}
|
||||
|
||||
static int num_inputs_transform()
|
||||
static int num_inputs_transform(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
@ -2613,7 +2613,7 @@ static void init_glow_effect(Sequence *seq)
|
||||
glow->bNoComp = 0;
|
||||
}
|
||||
|
||||
static int num_inputs_glow()
|
||||
static int num_inputs_glow(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
@ -2700,7 +2700,7 @@ static void init_solid_color(Sequence *seq)
|
||||
cv->col[0] = cv->col[1] = cv->col[2] = 0.5;
|
||||
}
|
||||
|
||||
static int num_inputs_color()
|
||||
static int num_inputs_color(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -2809,7 +2809,7 @@ static struct ImBuf * do_solid_color(
|
||||
********************************************************************** */
|
||||
|
||||
/* no effect inputs for multicam, we use give_ibuf_seq */
|
||||
static int num_inputs_multicam()
|
||||
static int num_inputs_multicam(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -2884,7 +2884,7 @@ static void load_speed_effect(Sequence * seq)
|
||||
v->length = 0;
|
||||
}
|
||||
|
||||
static int num_inputs_speed()
|
||||
static int num_inputs_speed(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
@ -3059,7 +3059,7 @@ static void free_noop(struct Sequence *UNUSED(seq))
|
||||
|
||||
}
|
||||
|
||||
static int num_inputs_default()
|
||||
static int num_inputs_default(void)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
@ -1659,7 +1659,7 @@ static void *exec_scan_for_ext_spring_forces(void *data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void sb_sfesf_threads_run(Scene *scene, struct Object *ob, float timenow,int totsprings,int *UNUSED(ptr_to_break_func()))
|
||||
static void sb_sfesf_threads_run(Scene *scene, struct Object *ob, float timenow,int totsprings,int *UNUSED(ptr_to_break_func(void)))
|
||||
{
|
||||
ListBase *do_effector = NULL;
|
||||
ListBase threads;
|
||||
@ -2175,7 +2175,7 @@ static void sb_spring_force(Object *ob,int bpi,BodySpring *bs,float iks,float UN
|
||||
/* since this is definitely the most CPU consuming task here .. try to spread it */
|
||||
/* core function _softbody_calc_forces_slice_in_a_thread */
|
||||
/* result is int to be able to flag user break */
|
||||
static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, float forcetime, float timenow,int ifirst,int ilast,int *UNUSED(ptr_to_break_func()),ListBase *do_effector,int do_deflector,float fieldfactor, float windfactor)
|
||||
static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, float forcetime, float timenow,int ifirst,int ilast,int *UNUSED(ptr_to_break_func(void)),ListBase *do_effector,int do_deflector,float fieldfactor, float windfactor)
|
||||
{
|
||||
float iks;
|
||||
int bb,do_selfcollision,do_springcollision,do_aero;
|
||||
@ -2386,7 +2386,7 @@ static void *exec_softbody_calc_forces(void *data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void sb_cf_threads_run(Scene *scene, Object *ob, float forcetime, float timenow,int totpoint,int *UNUSED(ptr_to_break_func()),struct ListBase *do_effector,int do_deflector,float fieldfactor, float windfactor)
|
||||
static void sb_cf_threads_run(Scene *scene, Object *ob, float forcetime, float timenow,int totpoint,int *UNUSED(ptr_to_break_func(void)),struct ListBase *do_effector,int do_deflector,float fieldfactor, float windfactor)
|
||||
{
|
||||
ListBase threads;
|
||||
SB_thread_context *sb_threads;
|
||||
|
@ -54,7 +54,7 @@ static int txttl_cmp(const char *first, const char *second, int len) {
|
||||
return cmp;
|
||||
}
|
||||
|
||||
static void txttl_free_suggest() {
|
||||
static void txttl_free_suggest(void) {
|
||||
SuggItem *item, *prev;
|
||||
for (item = suggestions.last; item; item=prev) {
|
||||
prev = item->prev;
|
||||
@ -66,7 +66,7 @@ static void txttl_free_suggest() {
|
||||
suggestions.top = 0;
|
||||
}
|
||||
|
||||
static void txttl_free_docs() {
|
||||
static void txttl_free_docs(void) {
|
||||
if (documentation) {
|
||||
MEM_freeN(documentation);
|
||||
documentation = NULL;
|
||||
|
@ -93,7 +93,7 @@ TMARK_EDITALL is set the group ID defines which other markers should be edited.
|
||||
The mrk->clr field is used to visually group markers where the flags may not
|
||||
match. A template system, for example, may allow editing of repeating tokens
|
||||
(in one group) but include other marked positions (in another group) all in the
|
||||
same template with the same colour.
|
||||
same template with the same color.
|
||||
|
||||
Undo
|
||||
--
|
||||
|
@ -77,16 +77,16 @@ static int select_was_interrupted_by_signal()
|
||||
return (WSAGetLastError() == WSAEINTR);
|
||||
}
|
||||
#else
|
||||
static int startup_socket_system()
|
||||
static int startup_socket_system(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void shutdown_socket_system()
|
||||
static void shutdown_socket_system(void)
|
||||
{
|
||||
}
|
||||
|
||||
static int select_was_interrupted_by_signal()
|
||||
static int select_was_interrupted_by_signal(void)
|
||||
{
|
||||
return (errno == EINTR);
|
||||
}
|
||||
@ -367,7 +367,7 @@ int append_frameserver(RenderData *UNUSED(rd), int frame, int *pixels, int rectx
|
||||
return 0;
|
||||
}
|
||||
|
||||
void end_frameserver()
|
||||
void end_frameserver(void)
|
||||
{
|
||||
if (connsock != -1) {
|
||||
closesocket(connsock);
|
||||
|
@ -190,7 +190,7 @@ BM_INLINE void BLI_ghash_insert(GHash *gh, void *key, void *val) {
|
||||
gh->buckets[hash]= e;
|
||||
|
||||
if (++gh->nentries>(float)gh->nbuckets/2) {
|
||||
Entry *e, **old= gh->buckets;
|
||||
Entry **old= gh->buckets;
|
||||
int i, nold= gh->nbuckets;
|
||||
|
||||
gh->nbuckets= hashsizes[++gh->cursize];
|
||||
|
@ -121,7 +121,7 @@ void BLI_insert_work(struct ThreadedWorker *worker, void *param);
|
||||
|
||||
typedef struct ThreadQueue ThreadQueue;
|
||||
|
||||
ThreadQueue *BLI_thread_queue_init();
|
||||
ThreadQueue *BLI_thread_queue_init(void);
|
||||
void BLI_thread_queue_free(ThreadQueue *queue);
|
||||
|
||||
void BLI_thread_queue_push(ThreadQueue *queue, void *work);
|
||||
|
@ -448,7 +448,7 @@ void minmax_rgb(short c[])
|
||||
}
|
||||
|
||||
/*If the requested RGB shade contains a negative weight for
|
||||
one of the primaries, it lies outside the colour gamut
|
||||
one of the primaries, it lies outside the color gamut
|
||||
accessible from the given triple of primaries. Desaturate
|
||||
it by adding white, equal quantities of R, G, and B, enough
|
||||
to make RGB all positive. The function returns 1 if the
|
||||
|
@ -289,7 +289,7 @@ void BLI_builddir(const char *dirname, char *relname)
|
||||
}
|
||||
}
|
||||
|
||||
void BLI_adddirstrings()
|
||||
void BLI_adddirstrings(void)
|
||||
{
|
||||
char datum[100];
|
||||
char buf[512];
|
||||
|
@ -172,14 +172,14 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
|
||||
/* step between the major distinguishable color bands of the primary colors */
|
||||
#define HSV_BANDWIDTH 0.3f
|
||||
|
||||
/* used to determine the colour of F-Curves with FCURVE_COLOR_AUTO_RAINBOW set */
|
||||
/* used to determine the color of F-Curves with FCURVE_COLOR_AUTO_RAINBOW set */
|
||||
//void fcurve_rainbow (unsigned int cur, unsigned int tot, float *out)
|
||||
void getcolor_fcurve_rainbow (int cur, int tot, float *out)
|
||||
{
|
||||
float hue, val, sat, fac;
|
||||
int grouping;
|
||||
|
||||
/* we try to divide the colours into groupings of n colors,
|
||||
/* we try to divide the color into groupings of n colors,
|
||||
* where n is:
|
||||
* 3 - for 'odd' numbers of curves - there should be a majority of triplets of curves
|
||||
* 4 - for 'even' numbers of curves - there should be a majority of quartets of curves
|
||||
|
@ -603,7 +603,7 @@ void ANIM_keyingset_info_unregister (const bContext *C, KeyingSetInfo *ksi)
|
||||
|
||||
/* --------------- */
|
||||
|
||||
void ANIM_keyingset_infos_exit ()
|
||||
void ANIM_keyingset_infos_exit (void)
|
||||
{
|
||||
KeyingSetInfo *ksi, *next;
|
||||
|
||||
|
@ -1212,16 +1212,10 @@ void ARMATURE_OT_separate (wmOperatorType *ot)
|
||||
/* only for opengl selection indices */
|
||||
Bone *get_indexed_bone (Object *ob, int index)
|
||||
{
|
||||
bPoseChannel *pchan;
|
||||
int a= 0;
|
||||
|
||||
if(ob->pose==NULL) return NULL;
|
||||
index>>=16; // bone selection codes use left 2 bytes
|
||||
|
||||
for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next, a++) {
|
||||
if(a==index) return pchan->bone;
|
||||
}
|
||||
return NULL;
|
||||
return BLI_findlink(&ob->pose->chanbase, index);
|
||||
}
|
||||
|
||||
/* See if there are any selected bones in this buffer */
|
||||
@ -1780,7 +1774,7 @@ EditBone *ED_armature_bone_get_mirrored(ListBase *edbo, EditBone *ebo)
|
||||
static int armature_delete_selected_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
{
|
||||
bArmature *arm;
|
||||
EditBone *curBone, *next;
|
||||
EditBone *curBone, *ebone_next;
|
||||
bConstraint *con;
|
||||
Object *obedit= CTX_data_edit_object(C); // XXX get from context
|
||||
arm = obedit->data;
|
||||
@ -1794,9 +1788,9 @@ static int armature_delete_selected_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
for (curBone=arm->edbo->first; curBone; curBone=curBone->next) {
|
||||
if (arm->layer & curBone->layer) {
|
||||
if (curBone->flag & BONE_SELECTED) {
|
||||
next = ED_armature_bone_get_mirrored(arm->edbo, curBone);
|
||||
if (next)
|
||||
next->flag |= BONE_SELECTED;
|
||||
ebone_next= ED_armature_bone_get_mirrored(arm->edbo, curBone);
|
||||
if (ebone_next)
|
||||
ebone_next->flag |= BONE_SELECTED;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1804,9 +1798,9 @@ static int armature_delete_selected_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
|
||||
/* First erase any associated pose channel */
|
||||
if (obedit->pose) {
|
||||
bPoseChannel *pchan, *next;
|
||||
for (pchan=obedit->pose->chanbase.first; pchan; pchan=next) {
|
||||
next= pchan->next;
|
||||
bPoseChannel *pchan, *pchan_next;
|
||||
for (pchan=obedit->pose->chanbase.first; pchan; pchan= pchan_next) {
|
||||
pchan_next= pchan->next;
|
||||
curBone = editbone_name_exists(arm->edbo, pchan->name);
|
||||
|
||||
if (curBone && (curBone->flag & BONE_SELECTED) && (arm->layer & curBone->layer)) {
|
||||
@ -1844,8 +1838,8 @@ static int armature_delete_selected_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
}
|
||||
|
||||
|
||||
for (curBone=arm->edbo->first;curBone;curBone=next) {
|
||||
next=curBone->next;
|
||||
for (curBone=arm->edbo->first; curBone; curBone= ebone_next) {
|
||||
ebone_next= curBone->next;
|
||||
if (arm->layer & curBone->layer) {
|
||||
if (curBone->flag & BONE_SELECTED) {
|
||||
if(curBone==arm->act_edbone) arm->act_edbone= NULL;
|
||||
|
@ -304,7 +304,7 @@ void RIG_freeRigGraph(BGraph *rg)
|
||||
|
||||
/************************************* ALLOCATORS ******************************************************/
|
||||
|
||||
static RigGraph *newRigGraph()
|
||||
static RigGraph *newRigGraph(void)
|
||||
{
|
||||
RigGraph *rg;
|
||||
int totthread;
|
||||
@ -1535,8 +1535,7 @@ RigGraph *RIG_graphFromArmature(const bContext *C, Object *ob, bArmature *arm)
|
||||
|
||||
if (obedit == ob)
|
||||
{
|
||||
bArmature *arm = obedit->data;
|
||||
rg->editbones = arm->edbo;
|
||||
rg->editbones = ((bArmature *)obedit->data)->edbo;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2792,7 +2791,7 @@ int RIG_nbJoints(RigGraph *rg)
|
||||
return total;
|
||||
}
|
||||
|
||||
void BIF_freeRetarget()
|
||||
void BIF_freeRetarget(void)
|
||||
{
|
||||
if (GLOBAL_RIGG)
|
||||
{
|
||||
|
@ -63,8 +63,8 @@
|
||||
/* ************* XXX *************** */
|
||||
static void waitcursor(int UNUSED(val)) {}
|
||||
static void progress_bar(int UNUSED(dummy_val), const char *UNUSED(dummy)) {}
|
||||
static void start_progress_bar() {}
|
||||
static void end_progress_bar() {}
|
||||
static void start_progress_bar(void) {}
|
||||
static void end_progress_bar(void) {}
|
||||
static void error(char *str) { printf("error: %s\n", str); }
|
||||
/* ************* XXX *************** */
|
||||
|
||||
|
@ -73,7 +73,7 @@
|
||||
|
||||
/* ******* XXX ********** */
|
||||
|
||||
static void action_set_activemarker() {}
|
||||
static void action_set_activemarker(void *UNUSED(a), void *UNUSED(b), void *UNUSED(c)) {}
|
||||
|
||||
/* ************************************************************* */
|
||||
/* == POSE-LIBRARY TOOL FOR BLENDER ==
|
||||
|
@ -833,9 +833,7 @@ void pose_copy_menu(Scene *scene)
|
||||
* appending to list of constraints for this channel
|
||||
*/
|
||||
copy_constraints(&tmp_constraints, &const_copy, TRUE);
|
||||
if ((ob->proxy) && (pchan->bone->layer & arm->layer_protected)) {
|
||||
bConstraint *con;
|
||||
|
||||
if ((ob->proxy) && (pchan->bone->layer & arm->layer_protected)) {
|
||||
/* add proxy-local tags */
|
||||
for (con= tmp_constraints.first; con; con= con->next)
|
||||
con->flag |= CONSTRAINT_PROXY_LOCAL;
|
||||
|
@ -149,7 +149,7 @@ void angleToVCol(struct EditMesh *em, int index);
|
||||
void renormalizeWeight(struct EditMesh *em, float newmax);
|
||||
|
||||
ReebGraph * generateReebGraph(struct EditMesh *me, int subdivisions);
|
||||
ReebGraph * newReebGraph();
|
||||
ReebGraph * newReebGraph(void);
|
||||
|
||||
void initArcIterator(BArcIterator *iter, struct ReebArc *arc, struct ReebNode *head);
|
||||
void initArcIterator2(BArcIterator *iter, struct ReebArc *arc, int start, int end);
|
||||
@ -195,7 +195,7 @@ ReebGraph *BIF_graphForMultiNode(ReebGraph *rg, ReebNode *node);
|
||||
void REEB_freeGraph(ReebGraph *rg);
|
||||
void REEB_freeArc(BArc *barc);
|
||||
void REEB_exportGraph(ReebGraph *rg, int count);
|
||||
void REEB_draw();
|
||||
void REEB_draw(void);
|
||||
|
||||
|
||||
#endif /*REEB_H_*/
|
||||
|
@ -5978,8 +5978,6 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
|
||||
break;
|
||||
case CU_PRIM_TUBE: /* Cylinder */
|
||||
if( cutype==CU_NURBS ) {
|
||||
Curve *cu= (Curve*)obedit->data;
|
||||
|
||||
nu= add_nurbs_primitive(C, mat, CU_NURBS|CU_PRIM_CIRCLE, 0); /* circle */
|
||||
nu->resolu= cu->resolu;
|
||||
nu->flag= CU_SMOOTH;
|
||||
|
@ -197,7 +197,7 @@ void gla2DSetMap(gla2DDrawInfo *di, struct rctf *rect);
|
||||
/* use this for platform hacks. glPointSize is solved here */
|
||||
void bglBegin(int mode);
|
||||
void bglEnd(void);
|
||||
int bglPointHack();
|
||||
int bglPointHack(void);
|
||||
void bglVertex3fv(float *vec);
|
||||
void bglVertex3f(float x, float y, float z);
|
||||
void bglVertex2fv(float *vec);
|
||||
|
@ -62,7 +62,7 @@ void UI_icon_draw_preview_aspect_size(float x, float y, int icon_id, float aspec
|
||||
void UI_icon_draw_aspect(float x, float y, int icon_id, float aspect, float alpha);
|
||||
void UI_icon_draw_aspect_color(float x, float y, int icon_id, float aspect, float *rgb);
|
||||
void UI_icon_draw_size(float x, float y, int size, int icon_id, float alpha);
|
||||
void UI_icons_free();
|
||||
void UI_icons_free(void);
|
||||
void UI_icons_free_drawinfo(void *drawinfo);
|
||||
|
||||
struct ListBase *UI_iconfile_list(void);
|
||||
|
@ -386,7 +386,7 @@ void uiRoundRectFakeAA(float minx, float miny, float maxx, float maxy, float rad
|
||||
float raddiff;
|
||||
int i, passes=4;
|
||||
|
||||
/* get the colour and divide up the alpha */
|
||||
/* get the color and divide up the alpha */
|
||||
glGetFloatv(GL_CURRENT_COLOR, color);
|
||||
alpha = 1; //color[3];
|
||||
color[3]= 0.5*alpha/(float)passes;
|
||||
|
@ -1068,19 +1068,19 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data,
|
||||
|
||||
/* text/string and ID data */
|
||||
else if(ELEM3(but->type, TEX, IDPOIN, SEARCH_MENU)) {
|
||||
uiHandleButtonData *data= but->active;
|
||||
uiHandleButtonData *active_data= but->active;
|
||||
|
||||
if(but->poin==NULL && but->rnapoin.data==NULL);
|
||||
else if(mode=='c') {
|
||||
button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING);
|
||||
BLI_strncpy(buf, data->str, UI_MAX_DRAW_STR);
|
||||
WM_clipboard_text_set(data->str, 0);
|
||||
data->cancel= 1;
|
||||
BLI_strncpy(buf, active_data->str, UI_MAX_DRAW_STR);
|
||||
WM_clipboard_text_set(active_data->str, 0);
|
||||
active_data->cancel= 1;
|
||||
button_activate_state(C, but, BUTTON_STATE_EXIT);
|
||||
}
|
||||
else {
|
||||
button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING);
|
||||
BLI_strncpy(data->str, buf, data->maxlen);
|
||||
BLI_strncpy(active_data->str, buf, active_data->maxlen);
|
||||
button_activate_state(C, but, BUTTON_STATE_EXIT);
|
||||
}
|
||||
}
|
||||
@ -1281,7 +1281,7 @@ static int ui_textedit_type_ascii(uiBut *but, uiHandleButtonData *data, char asc
|
||||
return changed;
|
||||
}
|
||||
|
||||
void ui_textedit_move(uiBut *but, uiHandleButtonData *data, int direction, int select, int jump)
|
||||
static void ui_textedit_move(uiBut *but, uiHandleButtonData *data, int direction, int select, int jump)
|
||||
{
|
||||
char *str;
|
||||
int len;
|
||||
@ -1384,7 +1384,7 @@ void ui_textedit_move(uiBut *but, uiHandleButtonData *data, int direction, int s
|
||||
}
|
||||
}
|
||||
|
||||
void ui_textedit_move_end(uiBut *but, uiHandleButtonData *data, int direction, int select)
|
||||
static void ui_textedit_move_end(uiBut *but, uiHandleButtonData *data, int direction, int select)
|
||||
{
|
||||
char *str;
|
||||
|
||||
|
@ -455,7 +455,7 @@ static void vicon_move_down_draw(int x, int y, int w, int h, float UNUSED(alpha)
|
||||
glDisable(GL_LINE_SMOOTH);
|
||||
}
|
||||
|
||||
static void init_brush_icons()
|
||||
static void init_brush_icons(void)
|
||||
{
|
||||
|
||||
#define INIT_BRUSH_ICON(icon_id, name) \
|
||||
@ -500,7 +500,7 @@ static void init_brush_icons()
|
||||
#undef INIT_BRUSH_ICON
|
||||
}
|
||||
|
||||
static void init_internal_icons()
|
||||
static void init_internal_icons(void)
|
||||
{
|
||||
bTheme *btheme= U.themes.first;
|
||||
ImBuf *bbuf= NULL;
|
||||
@ -731,7 +731,7 @@ void UI_icons_free_drawinfo(void *drawinfo)
|
||||
}
|
||||
}
|
||||
|
||||
static DrawInfo *icon_create_drawinfo()
|
||||
static DrawInfo *icon_create_drawinfo(void)
|
||||
{
|
||||
DrawInfo *di = NULL;
|
||||
|
||||
|
@ -716,17 +716,17 @@ void uiItemsFullEnumO(uiLayout *layout, const char *opname, const char *propname
|
||||
for(i=0; i<totitem; i++) {
|
||||
if(item[i].identifier[0]) {
|
||||
if(properties) {
|
||||
PointerRNA ptr;
|
||||
PointerRNA tptr;
|
||||
|
||||
WM_operator_properties_create(&ptr, opname);
|
||||
if(ptr.data) {
|
||||
IDP_FreeProperty(ptr.data);
|
||||
MEM_freeN(ptr.data);
|
||||
WM_operator_properties_create(&tptr, opname);
|
||||
if(tptr.data) {
|
||||
IDP_FreeProperty(tptr.data);
|
||||
MEM_freeN(tptr.data);
|
||||
}
|
||||
ptr.data= IDP_CopyProperty(properties);
|
||||
RNA_enum_set(&ptr, propname, item[i].value);
|
||||
tptr.data= IDP_CopyProperty(properties);
|
||||
RNA_enum_set(&tptr, propname, item[i].value);
|
||||
|
||||
uiItemFullO(column, opname, (char*)item[i].name, item[i].icon, ptr.data, context, flag);
|
||||
uiItemFullO(column, opname, (char*)item[i].name, item[i].icon, tptr.data, context, flag);
|
||||
}
|
||||
else
|
||||
uiItemEnumO(column, opname, (char*)item[i].name, item[i].icon, propname, item[i].value);
|
||||
@ -2548,7 +2548,7 @@ void uiBlockLayoutResolve(uiBlock *block, int *x, int *y)
|
||||
/* XXX silly trick, interface_templates.c doesn't get linked
|
||||
* because it's not used by other files in this module? */
|
||||
{
|
||||
void ui_template_fix_linking();
|
||||
void ui_template_fix_linking(void);
|
||||
ui_template_fix_linking();
|
||||
}
|
||||
}
|
||||
|
@ -1833,7 +1833,7 @@ static void uiBlockPicker(uiBlock *block, float *rgb, PointerRNA *ptr, PropertyR
|
||||
width= PICKER_TOTAL_W;
|
||||
butwidth = width - UI_UNIT_X - 10;
|
||||
|
||||
/* existence of profile means storage is in linear colour space, with display correction */
|
||||
/* existence of profile means storage is in linear color space, with display correction */
|
||||
if (block->color_profile == BLI_PR_NONE) {
|
||||
sprintf(tip, "Value in Display Color Space");
|
||||
copy_v3_v3(rgb_gamma, rgb);
|
||||
|
@ -55,7 +55,7 @@
|
||||
|
||||
#include "BLF_api.h"
|
||||
|
||||
void ui_template_fix_linking()
|
||||
void ui_template_fix_linking(void)
|
||||
{
|
||||
}
|
||||
|
||||
@ -1959,7 +1959,6 @@ static int list_item_icon_get(bContext *C, PointerRNA *itemptr, int rnaicon)
|
||||
|
||||
static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, PointerRNA *itemptr, int i, int rnaicon, PointerRNA *activeptr, const char *activepropname)
|
||||
{
|
||||
Object *ob;
|
||||
uiBlock *block= uiLayoutGetBlock(layout);
|
||||
uiBut *but;
|
||||
uiLayout *split, *overlap, *sub, *row;
|
||||
@ -2024,7 +2023,7 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
|
||||
}
|
||||
}
|
||||
else if(itemptr->type == &RNA_ShapeKey) {
|
||||
ob= (Object*)activeptr->data;
|
||||
Object *ob= (Object*)activeptr->data;
|
||||
|
||||
split= uiLayoutSplit(sub, 0.75f, 0);
|
||||
|
||||
@ -2324,9 +2323,9 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C)
|
||||
}
|
||||
|
||||
if(WM_jobs_test(wm, owner)) {
|
||||
uiLayout *abs;
|
||||
uiLayout *ui_abs;
|
||||
|
||||
abs = uiLayoutAbsolute(layout, 0);
|
||||
ui_abs= uiLayoutAbsolute(layout, 0);
|
||||
|
||||
uiDefIconBut(block, BUT, handle_event, ICON_PANEL_CLOSE,
|
||||
0, UI_UNIT_Y*0.1, UI_UNIT_X*0.8, UI_UNIT_Y*0.8, NULL, 0.0f, 0.0f, 0, 0, "Stop this job");
|
||||
@ -2349,7 +2348,7 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C)
|
||||
Report *report= BKE_reports_last_displayable(reports);
|
||||
ReportTimerInfo *rti;
|
||||
|
||||
uiLayout *abs;
|
||||
uiLayout *ui_abs;
|
||||
uiBlock *block;
|
||||
uiBut *but;
|
||||
uiStyle *style= U.uistyles.first;
|
||||
@ -2363,8 +2362,8 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C)
|
||||
|
||||
if (!rti || rti->widthfac==0.0 || !report) return;
|
||||
|
||||
abs = uiLayoutAbsolute(layout, 0);
|
||||
block= uiLayoutGetBlock(abs);
|
||||
ui_abs= uiLayoutAbsolute(layout, 0);
|
||||
block= uiLayoutGetBlock(ui_abs);
|
||||
|
||||
width = BLF_width(style->widget.uifont_id, report->message);
|
||||
width = MIN2(rti->widthfac*width, width);
|
||||
@ -2373,7 +2372,7 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C)
|
||||
/* make a box around the report to make it stand out */
|
||||
uiBlockBeginAlign(block);
|
||||
but= uiDefBut(block, ROUNDBOX, 0, "", 0, 0, UI_UNIT_X+10, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, "");
|
||||
/* set the report's bg colour in but->col - ROUNDBOX feature */
|
||||
/* set the report's bg color in but->col - ROUNDBOX feature */
|
||||
but->col[0]= FTOCHAR(rti->col[0]);
|
||||
but->col[1]= FTOCHAR(rti->col[1]);
|
||||
but->col[2]= FTOCHAR(rti->col[2]);
|
||||
|
@ -24,7 +24,6 @@
|
||||
*/
|
||||
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
@ -1120,7 +1119,7 @@ static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiB
|
||||
|
||||
*/
|
||||
|
||||
static struct uiWidgetStateColors wcol_state= {
|
||||
static struct uiWidgetStateColors wcol_state_colors= {
|
||||
{115, 190, 76, 255},
|
||||
{90, 166, 51, 255},
|
||||
{240, 235, 100, 255},
|
||||
@ -1390,7 +1389,7 @@ void ui_widget_color_init(ThemeUI *tui)
|
||||
tui->wcol_list_item= wcol_list_item;
|
||||
tui->wcol_progress= wcol_progress;
|
||||
|
||||
tui->wcol_state= wcol_state;
|
||||
tui->wcol_state= wcol_state_colors;
|
||||
}
|
||||
|
||||
/* ************ button callbacks, state ***************** */
|
||||
@ -2325,10 +2324,10 @@ static void widget_swatch(uiBut *but, uiWidgetColors *wcol, rcti *rect, int stat
|
||||
ui_get_but_vectorf(but, col);
|
||||
|
||||
if(state & (UI_BUT_ANIMATED|UI_BUT_ANIMATED_KEY|UI_BUT_DRIVEN|UI_BUT_REDALERT)) {
|
||||
// draw based on state - colour for keyed etc
|
||||
// draw based on state - color for keyed etc
|
||||
widgetbase_draw(&wtb, wcol);
|
||||
|
||||
// inset to draw swatch colour
|
||||
// inset to draw swatch color
|
||||
rect->xmin+= SWATCH_KEYED_BORDER;
|
||||
rect->xmax-= SWATCH_KEYED_BORDER;
|
||||
rect->ymin+= SWATCH_KEYED_BORDER;
|
||||
@ -2496,7 +2495,7 @@ static void widget_box(uiBut *but, uiWidgetColors *wcol, rcti *rect, int UNUSED(
|
||||
|
||||
VECCOPY(old_col, wcol->inner);
|
||||
|
||||
/* abuse but->hsv - if it's non-zero, use this colour as the box's background */
|
||||
/* abuse but->hsv - if it's non-zero, use this color as the box's background */
|
||||
if (but->col[3]) {
|
||||
wcol->inner[0] = but->col[0];
|
||||
wcol->inner[1] = but->col[1];
|
||||
|
@ -1182,7 +1182,7 @@ void init_userdef_do_versions(void)
|
||||
if ((bmain->versionfile < 245) || (bmain->versionfile == 245 && bmain->subversionfile < 11)) {
|
||||
bTheme *btheme;
|
||||
for (btheme= U.themes.first; btheme; btheme= btheme->next) {
|
||||
/* these should all use the same colour */
|
||||
/* these should all use the same color */
|
||||
SETCOL(btheme->tv3d.cframe, 0x60, 0xc0, 0x40, 255);
|
||||
SETCOL(btheme->tipo.cframe, 0x60, 0xc0, 0x40, 255);
|
||||
SETCOL(btheme->tact.cframe, 0x60, 0xc0, 0x40, 255);
|
||||
|
@ -1167,7 +1167,7 @@ typedef struct v2dScrollerMove {
|
||||
ARegion *ar; /* region that the scroller is in */
|
||||
|
||||
short scroller; /* scroller that mouse is in ('h' or 'v') */
|
||||
short zone; /* -1 is min zoomer, 0 is bar, 1 is max zoomer */ // XXX find some way to provide visual feedback of this (active colour?)
|
||||
short zone; /* -1 is min zoomer, 0 is bar, 1 is max zoomer */ // XXX find some way to provide visual feedback of this (active color?)
|
||||
|
||||
float fac; /* view adjustment factor, based on size of region */
|
||||
float delta; /* amount moved by mouse on axis of interest */
|
||||
|
@ -918,9 +918,9 @@ void make_editMesh(Scene *scene, Object *ob)
|
||||
}
|
||||
|
||||
/* makes Mesh out of editmesh */
|
||||
void load_editMesh(Scene *scene, Object *ob)
|
||||
void load_editMesh(Scene *scene, Object *obedit)
|
||||
{
|
||||
Mesh *me= ob->data;
|
||||
Mesh *me= obedit->data;
|
||||
MVert *mvert, *oldverts;
|
||||
MEdge *medge;
|
||||
MFace *mface;
|
||||
@ -1110,7 +1110,7 @@ void load_editMesh(Scene *scene, Object *ob)
|
||||
Object *ob;
|
||||
ModifierData *md;
|
||||
EditVert **vertMap = NULL;
|
||||
int i,j;
|
||||
int j;
|
||||
|
||||
for (ob=G.main->object.first; ob; ob=ob->id.next) {
|
||||
if (ob->parent==ob && ELEM(ob->partype, PARVERT1,PARVERT3)) {
|
||||
@ -1310,7 +1310,7 @@ void load_editMesh(Scene *scene, Object *ob)
|
||||
mesh_calc_normals(me->mvert, me->totvert, me->mface, me->totface, NULL);
|
||||
|
||||
/* topology could be changed, ensure mdisps are ok */
|
||||
multires_topology_changed(ob);
|
||||
multires_topology_changed(obedit);
|
||||
}
|
||||
|
||||
void remake_editMesh(Scene *scene, Object *ob)
|
||||
|
@ -70,9 +70,9 @@ editmesh_loop: tools with own drawing subloops, select, knife, subdiv
|
||||
|
||||
/* **** XXX ******** */
|
||||
static void BIF_undo_push(const char *UNUSED(arg)) {}
|
||||
static void BIF_undo() {}
|
||||
static void BIF_undo(void) {}
|
||||
static void error(const char *UNUSED(arg)) {}
|
||||
static int qtest() {return 0;}
|
||||
static int qtest(void) {return 0;}
|
||||
/* **** XXX ******** */
|
||||
|
||||
|
||||
|
@ -35,12 +35,10 @@ editmesh_mods.c, UI level access, no geometry changes
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
|
||||
|
||||
#include "DNA_material_types.h"
|
||||
#include "DNA_meshdata_types.h"
|
||||
#include "DNA_modifier_types.h"
|
||||
@ -139,14 +137,13 @@ void EM_automerge(Scene *scene, Object *obedit, int update)
|
||||
(obedit && obedit->type==OB_MESH && (obedit->mode & OB_MODE_EDIT)) &&
|
||||
(me->mr==NULL)
|
||||
) {
|
||||
Mesh *me= (Mesh*)obedit->data;
|
||||
EditMesh *em= me->edit_mesh;
|
||||
|
||||
len = removedoublesflag(em, 1, 1, scene->toolsettings->doublimit);
|
||||
if (len) {
|
||||
em->totvert -= len; /* saves doing a countall */
|
||||
if (update) {
|
||||
DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
|
||||
DAG_id_flush_update(&me->id, OB_RECALC_DATA);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3554,7 +3554,7 @@ static const EnumPropertyItem direction_items[]= {
|
||||
#define AXIS_X 1
|
||||
#define AXIS_Y 2
|
||||
|
||||
static const EnumPropertyItem axis_items[]= {
|
||||
static const EnumPropertyItem axis_items_xy[]= {
|
||||
{AXIS_X, "X", 0, "X", ""},
|
||||
{AXIS_Y, "Y", 0, "Y", ""},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
@ -6701,7 +6701,7 @@ void MESH_OT_uvs_mirror(wmOperatorType *ot)
|
||||
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
|
||||
|
||||
/* props */
|
||||
RNA_def_enum(ot->srna, "axis", axis_items, DIRECTION_CW, "Axis", "Axis to mirror UVs around.");
|
||||
RNA_def_enum(ot->srna, "axis", axis_items_xy, DIRECTION_CW, "Axis", "Axis to mirror UVs around.");
|
||||
}
|
||||
|
||||
void MESH_OT_colors_rotate(wmOperatorType *ot)
|
||||
@ -6737,7 +6737,7 @@ void MESH_OT_colors_mirror(wmOperatorType *ot)
|
||||
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
|
||||
|
||||
/* props */
|
||||
RNA_def_enum(ot->srna, "axis", axis_items, DIRECTION_CW, "Axis", "Axis to mirror colors around.");
|
||||
RNA_def_enum(ot->srna, "axis", axis_items_xy, DIRECTION_CW, "Axis", "Axis to mirror colors around.");
|
||||
}
|
||||
|
||||
/********************** Subdivide Operator *************************/
|
||||
@ -7493,7 +7493,7 @@ void MESH_OT_select_axis(wmOperatorType *ot)
|
||||
{-1, "ALIGNED", 0, "Aligned Axis", ""},
|
||||
{0, NULL, 0, NULL, NULL}};
|
||||
|
||||
static EnumPropertyItem axis_items[] = {
|
||||
static EnumPropertyItem axis_items_xyz[] = {
|
||||
{0, "X_AXIS", 0, "X Axis", ""},
|
||||
{1, "Y_AXIS", 0, "Y Axis", ""},
|
||||
{2, "Z_AXIS", 0, "Z Axis", ""},
|
||||
@ -7513,6 +7513,6 @@ void MESH_OT_select_axis(wmOperatorType *ot)
|
||||
|
||||
/* properties */
|
||||
RNA_def_enum(ot->srna, "mode", axis_mode_items, 0, "Axis Mode", "Axis side to use when selecting");
|
||||
RNA_def_enum(ot->srna, "axis", axis_items, 0, "Axis", "Select the axis to compare each vertex on");
|
||||
RNA_def_enum(ot->srna, "axis", axis_items_xyz, 0, "Axis", "Select the axis to compare each vertex on");
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,6 @@
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <float.h>
|
||||
|
||||
|
@ -102,8 +102,8 @@ static void waitcursor(int UNUSED(val)) {}
|
||||
static int pupmenu(const char *UNUSED(msg)) {return 0;}
|
||||
|
||||
/* port over here */
|
||||
static bContext *C;
|
||||
static void error_libdata() {}
|
||||
static bContext *evil_C;
|
||||
static void error_libdata(void) {}
|
||||
|
||||
|
||||
/* find the correct active object per context
|
||||
@ -1078,13 +1078,13 @@ static void copymenu_modifiers(Main *bmain, Scene *scene, View3D *v3d, Object *o
|
||||
for (base= FIRSTBASE; base; base= base->next) {
|
||||
if(base->object != ob) {
|
||||
if(TESTBASELIB(v3d, base)) {
|
||||
ModifierData *md;
|
||||
|
||||
base->object->recalc |= OB_RECALC_OB|OB_RECALC_DATA;
|
||||
|
||||
if (base->object->type==ob->type) {
|
||||
/* copy all */
|
||||
if (event==NUM_MODIFIER_TYPES) {
|
||||
ModifierData *md;
|
||||
object_free_modifiers(base->object);
|
||||
|
||||
for (md=ob->modifiers.first; md; md=md->next) {
|
||||
@ -1805,7 +1805,7 @@ void ofs_timeoffs(Scene *scene, View3D *v3d)
|
||||
// XXX if(fbutton(&offset, -10000.0f, 10000.0f, 10, 10, "Offset")==0) return;
|
||||
|
||||
/* make array of all bases, xco yco (screen) */
|
||||
CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
|
||||
CTX_DATA_BEGIN(evil_C, Object*, ob, selected_editable_objects) {
|
||||
ob->sf += offset;
|
||||
if (ob->sf < -MAXFRAMEF) ob->sf = -MAXFRAMEF;
|
||||
else if (ob->sf > MAXFRAMEF) ob->sf = MAXFRAMEF;
|
||||
@ -1818,17 +1818,17 @@ void ofs_timeoffs(Scene *scene, View3D *v3d)
|
||||
void rand_timeoffs(Scene *scene, View3D *v3d)
|
||||
{
|
||||
Base *base;
|
||||
float rand=0.0f;
|
||||
float rand_ofs=0.0f;
|
||||
|
||||
if(BASACT==0 || v3d==NULL) return;
|
||||
|
||||
// XXX if(fbutton(&rand, 0.0f, 10000.0f, 10, 10, "Randomize")==0) return;
|
||||
// XXX if(fbutton(&rand_ofs, 0.0f, 10000.0f, 10, 10, "Randomize")==0) return;
|
||||
|
||||
rand *= 2;
|
||||
rand_ofs *= 2;
|
||||
|
||||
for(base= FIRSTBASE; base; base= base->next) {
|
||||
if(TESTBASELIB(v3d, base)) {
|
||||
base->object->sf += (BLI_drand()-0.5) * rand;
|
||||
base->object->sf += (BLI_drand()-0.5) * rand_ofs;
|
||||
if (base->object->sf < -MAXFRAMEF) base->object->sf = -MAXFRAMEF;
|
||||
else if (base->object->sf > MAXFRAMEF) base->object->sf = MAXFRAMEF;
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ void load_editLatt(Object *obedit)
|
||||
}
|
||||
|
||||
if(editlt->dvert) {
|
||||
int tot= lt->pntsu*lt->pntsv*lt->pntsw;
|
||||
tot= lt->pntsu*lt->pntsv*lt->pntsw;
|
||||
|
||||
lt->dvert = MEM_mallocN (sizeof (MDeformVert)*tot, "Lattice MDeformVert");
|
||||
copy_dverts(lt->dvert, editlt->dvert, tot);
|
||||
|
@ -51,6 +51,7 @@
|
||||
#include "BKE_property.h"
|
||||
#include "BKE_report.h"
|
||||
#include "BKE_scene.h"
|
||||
#include "BKE_library.h"
|
||||
#include "BKE_deform.h"
|
||||
|
||||
#include "WM_api.h"
|
||||
@ -826,21 +827,26 @@ void OBJECT_OT_select_same_group(wmOperatorType *ot)
|
||||
/**************************** Select Mirror ****************************/
|
||||
static int object_select_mirror_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
short extend;
|
||||
|
||||
extend= RNA_boolean_get(op->ptr, "extend");
|
||||
|
||||
CTX_DATA_BEGIN(C, Base*, primbase, selected_bases) {
|
||||
|
||||
char tmpname[32];
|
||||
flip_side_name(tmpname, primbase->object->id.name+2, TRUE);
|
||||
|
||||
CTX_DATA_BEGIN(C, Base*, secbase, visible_bases) {
|
||||
if(!strcmp(secbase->object->id.name+2, tmpname)) {
|
||||
ED_base_object_select(secbase, BA_SELECT);
|
||||
flip_side_name(tmpname, primbase->object->id.name+2, TRUE);
|
||||
|
||||
if(strcmp(tmpname, primbase->object->id.name+2)!=0) { /* names differ */
|
||||
Object *ob= (Object *)find_id("OB", tmpname);
|
||||
if(ob) {
|
||||
Base *secbase= object_in_scene(ob, scene);
|
||||
|
||||
if(secbase) {
|
||||
ED_base_object_select(secbase, BA_SELECT);
|
||||
}
|
||||
}
|
||||
}
|
||||
CTX_DATA_END;
|
||||
|
||||
if (extend == 0) ED_base_object_select(primbase, BA_DESELECT);
|
||||
|
||||
|
@ -3245,8 +3245,8 @@ static int brush_add(PEData *data, short number)
|
||||
|
||||
if(tree) {
|
||||
ParticleData *ppa;
|
||||
HairKey *hkey;
|
||||
ParticleKey key[3];
|
||||
HairKey *thkey;
|
||||
ParticleKey key3[3];
|
||||
KDTreeNearest ptn[3];
|
||||
int w, maxw;
|
||||
float maxd, mind, dd, totw=0.0, weight[3];
|
||||
@ -3272,36 +3272,36 @@ static int brush_add(PEData *data, short number)
|
||||
ppa= psys->particles+ptn[0].index;
|
||||
|
||||
for(k=0; k<pset->totaddkey; k++) {
|
||||
hkey= (HairKey*)pa->hair + k;
|
||||
hkey->time= pa->time + k * framestep;
|
||||
thkey= (HairKey*)pa->hair + k;
|
||||
thkey->time= pa->time + k * framestep;
|
||||
|
||||
key[0].time= hkey->time/ 100.0f;
|
||||
psys_get_particle_on_path(&sim, ptn[0].index, key, 0);
|
||||
mul_v3_fl(key[0].co, weight[0]);
|
||||
key3[0].time= thkey->time/ 100.0f;
|
||||
psys_get_particle_on_path(&sim, ptn[0].index, key3, 0);
|
||||
mul_v3_fl(key3[0].co, weight[0]);
|
||||
|
||||
/* TODO: interpolatint the weight would be nicer */
|
||||
hkey->weight= (ppa->hair+MIN2(k, ppa->totkey-1))->weight;
|
||||
thkey->weight= (ppa->hair+MIN2(k, ppa->totkey-1))->weight;
|
||||
|
||||
if(maxw>1) {
|
||||
key[1].time= key[0].time;
|
||||
psys_get_particle_on_path(&sim, ptn[1].index, key + 1, 0);
|
||||
mul_v3_fl(key[1].co, weight[1]);
|
||||
VECADD(key[0].co, key[0].co, key[1].co);
|
||||
key3[1].time= key3[0].time;
|
||||
psys_get_particle_on_path(&sim, ptn[1].index, &key3[1], 0);
|
||||
mul_v3_fl(key3[1].co, weight[1]);
|
||||
VECADD(key3[0].co, key3[0].co, key3[1].co);
|
||||
|
||||
if(maxw>2) {
|
||||
key[2].time= key[0].time;
|
||||
psys_get_particle_on_path(&sim, ptn[2].index, key + 2, 0);
|
||||
mul_v3_fl(key[2].co, weight[2]);
|
||||
VECADD(key[0].co, key[0].co, key[2].co);
|
||||
key3[2].time= key3[0].time;
|
||||
psys_get_particle_on_path(&sim, ptn[2].index, &key3[2], 0);
|
||||
mul_v3_fl(key3[2].co, weight[2]);
|
||||
VECADD(key3[0].co, key3[0].co, key3[2].co);
|
||||
}
|
||||
}
|
||||
|
||||
if(k==0)
|
||||
VECSUB(co1, pa->state.co, key[0].co);
|
||||
VECSUB(co1, pa->state.co, key3[0].co);
|
||||
|
||||
VECADD(hkey->co, key[0].co, co1);
|
||||
VECADD(thkey->co, key3[0].co, co1);
|
||||
|
||||
hkey->time= key[0].time;
|
||||
thkey->time= key3[0].time;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -94,7 +94,7 @@
|
||||
#define PR_YMAX 195
|
||||
|
||||
/* XXX */
|
||||
static int qtest() {return 0;}
|
||||
static int qtest(void) {return 0;}
|
||||
/* XXX */
|
||||
|
||||
ImBuf* get_brush_icon(Brush *brush)
|
||||
@ -487,12 +487,12 @@ static int ed_preview_draw_rect(ScrArea *sa, Scene *sce, ID *id, int split, int
|
||||
Render *re;
|
||||
RenderResult rres;
|
||||
char name[32];
|
||||
int gamma_correct=0;
|
||||
int do_gamma_correct=0;
|
||||
int offx=0, newx= rect->xmax-rect->xmin, newy= rect->ymax-rect->ymin;
|
||||
|
||||
if (id && GS(id->name) != ID_TE) {
|
||||
/* exception: don't color manage texture previews - show the raw values */
|
||||
if (sce) gamma_correct = sce->r.color_mgt_flag & R_COLOR_MANAGEMENT;
|
||||
if (sce) do_gamma_correct = sce->r.color_mgt_flag & R_COLOR_MANAGEMENT;
|
||||
}
|
||||
|
||||
if(!split || first) sprintf(name, "Preview %p", (void *)sa);
|
||||
@ -518,7 +518,7 @@ static int ed_preview_draw_rect(ScrArea *sa, Scene *sce, ID *id, int split, int
|
||||
newrect->xmax= MAX2(newrect->xmax, rect->xmin + rres.rectx + offx);
|
||||
newrect->ymax= MAX2(newrect->ymax, rect->ymin + rres.recty);
|
||||
|
||||
glaDrawPixelsSafe_to32(rect->xmin+offx, rect->ymin, rres.rectx, rres.recty, rres.rectx, rres.rectf, gamma_correct);
|
||||
glaDrawPixelsSafe_to32(rect->xmin+offx, rect->ymin, rres.rectx, rres.recty, rres.rectx, rres.rectf, do_gamma_correct);
|
||||
|
||||
RE_ReleaseResultImage(re);
|
||||
return 1;
|
||||
|
@ -735,12 +735,12 @@ void SCENE_OT_render_layer_remove(wmOperatorType *ot)
|
||||
static int texture_slot_move(bContext *C, wmOperator *op)
|
||||
{
|
||||
ID *id= CTX_data_pointer_get_type(C, "texture_slot", &RNA_TextureSlot).id.data;
|
||||
Material *ma = (Material *)id;
|
||||
|
||||
if(id) {
|
||||
MTex **mtex_ar, *mtexswap;
|
||||
short act;
|
||||
int type= RNA_enum_get(op->ptr, "type");
|
||||
struct AnimData *adt= BKE_animdata_from_id(id);
|
||||
|
||||
give_active_mtex(id, &mtex_ar, &act);
|
||||
|
||||
@ -750,9 +750,9 @@ static int texture_slot_move(bContext *C, wmOperator *op)
|
||||
mtex_ar[act] = mtex_ar[act-1];
|
||||
mtex_ar[act-1] = mtexswap;
|
||||
|
||||
BKE_animdata_fix_paths_rename(id, ma->adt, "texture_slots", NULL, NULL, act-1, -1, 0);
|
||||
BKE_animdata_fix_paths_rename(id, ma->adt, "texture_slots", NULL, NULL, act, act-1, 0);
|
||||
BKE_animdata_fix_paths_rename(id, ma->adt, "texture_slots", NULL, NULL, -1, act, 0);
|
||||
BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, act-1, -1, 0);
|
||||
BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, act, act-1, 0);
|
||||
BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, -1, act, 0);
|
||||
|
||||
if(GS(id->name)==ID_MA) {
|
||||
Material *ma= (Material *)id;
|
||||
@ -772,9 +772,9 @@ static int texture_slot_move(bContext *C, wmOperator *op)
|
||||
mtex_ar[act] = mtex_ar[act+1];
|
||||
mtex_ar[act+1] = mtexswap;
|
||||
|
||||
BKE_animdata_fix_paths_rename(id, ma->adt, "texture_slots", NULL, NULL, act+1, -1, 0);
|
||||
BKE_animdata_fix_paths_rename(id, ma->adt, "texture_slots", NULL, NULL, act, act+1, 0);
|
||||
BKE_animdata_fix_paths_rename(id, ma->adt, "texture_slots", NULL, NULL, -1, act, 0);
|
||||
BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, act+1, -1, 0);
|
||||
BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, act, act+1, 0);
|
||||
BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, -1, act, 0);
|
||||
|
||||
if(GS(id->name)==ID_MA) {
|
||||
Material *ma= (Material *)id;
|
||||
|
@ -26,7 +26,6 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
@ -528,7 +527,7 @@ void glaDrawPixelsTex(float x, float y, int img_w, int img_h, int format, void *
|
||||
}
|
||||
|
||||
/* row_w is unused but kept for completeness */
|
||||
void glaDrawPixelsSafe_to32(float fx, float fy, int img_w, int img_h, int UNUSED(row_w), float *rectf, int gamma_correct)
|
||||
void glaDrawPixelsSafe_to32(float fx, float fy, int img_w, int img_h, int UNUSED(row_w), float *rectf, int do_gamma_correct)
|
||||
{
|
||||
unsigned char *rect32;
|
||||
|
||||
@ -537,7 +536,7 @@ void glaDrawPixelsSafe_to32(float fx, float fy, int img_w, int img_h, int UNUSED
|
||||
|
||||
rect32= MEM_mallocN(img_w*img_h*sizeof(int), "temp 32 bits");
|
||||
|
||||
if (gamma_correct) {
|
||||
if (do_gamma_correct) {
|
||||
floatbuf_to_srgb_byte(rectf, rect32, 0, img_w, 0, img_h, img_w);
|
||||
} else {
|
||||
floatbuf_to_byte(rectf, rect32, 0, img_w, 0, img_h, img_w);
|
||||
@ -767,13 +766,13 @@ void bglBegin(int mode)
|
||||
|
||||
int bglPointHack() {
|
||||
float value[4];
|
||||
int pointhack;
|
||||
int pointhack_px;
|
||||
glGetFloatv(GL_POINT_SIZE_RANGE, value);
|
||||
if(value[1]<2.0) {
|
||||
glGetFloatv(GL_POINT_SIZE, value);
|
||||
pointhack= floor(value[0]+0.5);
|
||||
if(pointhack>4) pointhack= 4;
|
||||
return pointhack;
|
||||
pointhack_px= floor(value[0]+0.5);
|
||||
if(pointhack_px>4) pointhack_px= 4;
|
||||
return pointhack_px;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -3964,7 +3964,7 @@ static int project_paint_stroke(ProjPaintState *ps, BrushPainter *painter, int *
|
||||
|
||||
/* Imagepaint Partial Redraw & Dirty Region */
|
||||
|
||||
static void imapaint_clear_partial_redraw()
|
||||
static void imapaint_clear_partial_redraw(void)
|
||||
{
|
||||
memset(&imapaintpartial, 0, sizeof(imapaintpartial));
|
||||
}
|
||||
|
@ -451,7 +451,7 @@ void wpaint_fill(VPaint *wp, Object *ob, float paintweight)
|
||||
DAG_id_flush_update(&me->id, OB_RECALC_DATA);
|
||||
}
|
||||
|
||||
/* XXX: should be re-implemented as a vertex/weight paint 'colour correct' operator
|
||||
/* XXX: should be re-implemented as a vertex/weight paint 'color correct' operator
|
||||
|
||||
void vpaint_dogamma(Scene *scene)
|
||||
{
|
||||
|
@ -3666,7 +3666,7 @@ static void SCULPT_OT_sculptmode_toggle(wmOperatorType *ot)
|
||||
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
|
||||
}
|
||||
|
||||
void ED_operatortypes_sculpt()
|
||||
void ED_operatortypes_sculpt(void)
|
||||
{
|
||||
WM_operatortype_append(SCULPT_OT_radial_control);
|
||||
WM_operatortype_append(SCULPT_OT_brush_stroke);
|
||||
|
@ -228,7 +228,7 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
|
||||
switch (ale->type) {
|
||||
case ANIMTYPE_SUMMARY:
|
||||
{
|
||||
// FIXME: hardcoded colours - reddish color from NLA
|
||||
// FIXME: hardcoded colors - reddish color from NLA
|
||||
glColor4f(0.8f, 0.2f, 0.0f, 0.4f);
|
||||
}
|
||||
break;
|
||||
|
@ -146,7 +146,7 @@ static int console_textview_line_get(struct TextViewContext *tvc, const char **l
|
||||
|
||||
static int console_textview_line_color(struct TextViewContext *tvc, unsigned char fg[3], unsigned char UNUSED(bg[3]))
|
||||
{
|
||||
ConsoleLine *cl= (ConsoleLine *)tvc->iter;
|
||||
ConsoleLine *cl_iter= (ConsoleLine *)tvc->iter;
|
||||
|
||||
/* annoying hack, to draw the prompt */
|
||||
if(tvc->iter_index == 0) {
|
||||
@ -181,7 +181,7 @@ static int console_textview_line_color(struct TextViewContext *tvc, unsigned cha
|
||||
);
|
||||
}
|
||||
|
||||
console_line_color(fg, cl->type);
|
||||
console_line_color(fg, cl_iter->type);
|
||||
|
||||
return TVC_LINE_FG;
|
||||
}
|
||||
|
@ -365,7 +365,7 @@ static int insert_exec(bContext *C, wmOperator *op)
|
||||
|
||||
// XXX, alligned tab key hack
|
||||
if(str[0]=='\t' && str[1]=='\0') {
|
||||
int len= TAB_LENGTH - (ci->cursor % TAB_LENGTH);
|
||||
len= TAB_LENGTH - (ci->cursor % TAB_LENGTH);
|
||||
MEM_freeN(str);
|
||||
str= MEM_mallocN(len + 1, "insert_exec");
|
||||
memset(str, ' ', len);
|
||||
@ -380,7 +380,6 @@ static int insert_exec(bContext *C, wmOperator *op)
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
else {
|
||||
SpaceConsole *sc= CTX_wm_space_console(C);
|
||||
console_select_offset(sc, len);
|
||||
}
|
||||
|
||||
@ -468,7 +467,6 @@ static int delete_exec(bContext *C, wmOperator *op)
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
else {
|
||||
SpaceConsole *sc= CTX_wm_space_console(C);
|
||||
console_select_offset(sc, -1);
|
||||
}
|
||||
|
||||
@ -616,7 +614,6 @@ static int history_append_exec(bContext *C, wmOperator *op)
|
||||
int prev_len= ci->len;
|
||||
|
||||
if(rem_dupes) {
|
||||
SpaceConsole *sc= CTX_wm_space_console(C);
|
||||
ConsoleLine *cl;
|
||||
|
||||
while((cl= console_history_find(sc, ci->line, ci)))
|
||||
|
@ -96,7 +96,7 @@ void file_operator_to_sfile(struct SpaceFile *sfile, struct wmOperator *op);
|
||||
float file_shorten_string(char* string, float w, int front);
|
||||
float file_string_width(const char* str);
|
||||
|
||||
float file_font_pointsize();
|
||||
float file_font_pointsize(void);
|
||||
void file_change_dir(bContext *C, int checkdir);
|
||||
int file_select_match(struct SpaceFile *sfile, const char *pattern);
|
||||
void autocomplete_directory(struct bContext *C, char *str, void *arg_v);
|
||||
|
@ -47,8 +47,8 @@ struct rcti;
|
||||
struct ReportList;
|
||||
|
||||
struct FileList * filelist_new(short type);
|
||||
void filelist_init_icons();
|
||||
void filelist_free_icons();
|
||||
void filelist_init_icons(void);
|
||||
void filelist_free_icons(void);
|
||||
int filelist_find(struct FileList* filelist, char *file);
|
||||
void filelist_free(struct FileList* filelist);
|
||||
void filelist_sort(struct FileList* filelist, short sort);
|
||||
@ -78,7 +78,7 @@ void filelist_from_library(struct FileList* filelist);
|
||||
void filelist_freelib(struct FileList* filelist);
|
||||
void filelist_hideparent(struct FileList* filelist, short hide);
|
||||
|
||||
struct ListBase * folderlist_new();
|
||||
struct ListBase * folderlist_new(void);
|
||||
void folderlist_free(struct ListBase* folderlist);
|
||||
struct ListBase * folderlist_duplicate(ListBase* folderlist);
|
||||
void folderlist_popdir(struct ListBase* folderlist, char *dir);
|
||||
|
@ -620,7 +620,6 @@ static void graph_panel_drivers(const bContext *C, Panel *pa)
|
||||
|
||||
/* value of variable */
|
||||
if (driver->flag & DRIVER_FLAG_SHOWDEBUG) {
|
||||
uiLayout *row;
|
||||
char valBuf[32];
|
||||
|
||||
box= uiLayoutBox(col);
|
||||
|
@ -70,7 +70,7 @@
|
||||
*/
|
||||
#define drawFCurveFade(fcu) ( ((fcu)->flag & FCURVE_SELECTED)? 1.0f : 0.25f )
|
||||
|
||||
/* set the colour for some point from some value given packed into an int
|
||||
/* set the color for some point from some value given packed into an int
|
||||
* - intV: integer value containing color info packed into an int
|
||||
* - alpha: float value describing the
|
||||
*/
|
||||
|
@ -484,7 +484,7 @@ static void image_panel_preview(ScrArea *sa, short cntrl) // IMAGE_HANDLER_PREVI
|
||||
|
||||
/* ********************* callbacks for standard image buttons *************** */
|
||||
|
||||
static char *slot_menu()
|
||||
static char *slot_menu(void)
|
||||
{
|
||||
char *str;
|
||||
int a, slot;
|
||||
|
@ -1628,16 +1628,16 @@ static void sample_apply(bContext *C, wmOperator *op, wmEvent *event)
|
||||
ImBuf *ibuf= ED_space_image_acquire_buffer(sima, &lock);
|
||||
ImageSampleInfo *info= op->customdata;
|
||||
float fx, fy;
|
||||
int x, y;
|
||||
int mx, my;
|
||||
|
||||
if(ibuf == NULL) {
|
||||
ED_space_image_release_buffer(sima, lock);
|
||||
return;
|
||||
}
|
||||
|
||||
x= event->x - ar->winrct.xmin;
|
||||
y= event->y - ar->winrct.ymin;
|
||||
UI_view2d_region_to_view(&ar->v2d, x, y, &fx, &fy);
|
||||
mx= event->x - ar->winrct.xmin;
|
||||
my= event->y - ar->winrct.ymin;
|
||||
UI_view2d_region_to_view(&ar->v2d, mx, my, &fx, &fy);
|
||||
|
||||
if(fx>=0.0 && fy>=0.0 && fx<1.0 && fy<1.0) {
|
||||
float *fp;
|
||||
|
@ -349,7 +349,7 @@ static int update_reports_display_invoke(bContext *C, wmOperator *UNUSED(op), wm
|
||||
}
|
||||
|
||||
if (rti->widthfac == 0.0) {
|
||||
/* initialise colours based on report type */
|
||||
/* initialise colors based on report type */
|
||||
if(report->type & RPT_ERROR_ALL) {
|
||||
rti->col[0] = 1.0;
|
||||
rti->col[1] = 0.2;
|
||||
@ -374,7 +374,7 @@ static int update_reports_display_invoke(bContext *C, wmOperator *UNUSED(op), wm
|
||||
if(color_progress <= 1.0f) {
|
||||
send_note= 1;
|
||||
|
||||
/* fade colours out sharply according to progress through fade-out duration */
|
||||
/* fade colors out sharply according to progress through fade-out duration */
|
||||
interp_v3_v3v3(rti->col, rti->col, neutral_col, color_progress);
|
||||
rti->greyscale = interpf(neutral_grey, rti->greyscale, color_progress);
|
||||
}
|
||||
|
@ -277,7 +277,7 @@ static void recent_files_menu_draw(const bContext *UNUSED(C), Menu *menu)
|
||||
}
|
||||
}
|
||||
|
||||
void recent_files_menu_register()
|
||||
void recent_files_menu_register(void)
|
||||
{
|
||||
MenuType *mt;
|
||||
|
||||
|
@ -2206,7 +2206,6 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
|
||||
eoa= act->data;
|
||||
|
||||
if(eoa->type==ACT_EDOB_ADD_OBJECT) {
|
||||
int wval; /* just a temp width */
|
||||
ysize = 92;
|
||||
glRects(xco, yco-ysize, xco+width, yco);
|
||||
uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
|
||||
|
@ -171,7 +171,7 @@ static void nla_strip_get_color_inside (AnimData *adt, NlaStrip *strip, float co
|
||||
}
|
||||
else if (strip->type == NLASTRIP_TYPE_META) {
|
||||
/* Meta Clip */
|
||||
// TODO: should temporary metas get different colours too?
|
||||
// TODO: should temporary metas get different colors too?
|
||||
if (strip->flag & NLASTRIP_FLAG_SELECT) {
|
||||
/* selected - use a bold purple color */
|
||||
// FIXME: hardcoded temp-hack colors
|
||||
@ -272,7 +272,7 @@ static void nla_draw_strip_curves (NlaStrip *strip, float yminc, float ymaxc)
|
||||
}
|
||||
|
||||
/* time -------------------------- */
|
||||
// XXX do we want to draw this curve? in a different colour too?
|
||||
// XXX do we want to draw this curve? in a different color too?
|
||||
|
||||
/* turn off AA'd lines */
|
||||
glDisable(GL_LINE_SMOOTH);
|
||||
@ -431,7 +431,7 @@ static void nla_draw_strip_text (NlaTrack *UNUSED(nlt), NlaStrip *strip, int UNU
|
||||
else
|
||||
sprintf(str, "%s | %.2f %s %.2f", strip->name, strip->start, dir, strip->end);
|
||||
|
||||
/* set text colour - if colours (see above) are light, draw black text, otherwise draw white */
|
||||
/* set text color - if colors (see above) are light, draw black text, otherwise draw white */
|
||||
if (strip->flag & (NLASTRIP_FLAG_ACTIVE|NLASTRIP_FLAG_SELECT|NLASTRIP_FLAG_TWEAKUSER))
|
||||
glColor3f(0.0f, 0.0f, 0.0f);
|
||||
else
|
||||
|
@ -340,7 +340,7 @@ static int treesort_alpha(const void *v1, const void *v2)
|
||||
if(comp==1) return 1;
|
||||
else if(comp==2) return -1;
|
||||
else if(comp==3) {
|
||||
int comp= strcmp(x1->name, x2->name);
|
||||
comp= strcmp(x1->name, x2->name);
|
||||
|
||||
if( comp>0 ) return 1;
|
||||
else if( comp<0) return -1;
|
||||
|
@ -513,7 +513,7 @@ static void draw_seq_text(View2D *v2d, Sequence *seq, float x1, float x2, float
|
||||
if(seq->flag & SELECT){
|
||||
cpack(0xFFFFFF);
|
||||
}else if ((((int)background_col[0] + (int)background_col[1] + (int)background_col[2]) / 3) < 50){
|
||||
cpack(0x505050); /* use lighter text colour for dark background */
|
||||
cpack(0x505050); /* use lighter text color for dark background */
|
||||
}else{
|
||||
cpack(0);
|
||||
}
|
||||
|
@ -923,12 +923,12 @@ static int cut_seq_list(Scene *scene, ListBase *old, ListBase *new, int cutframe
|
||||
Sequence * (*cut_seq)(Scene *, Sequence *, int))
|
||||
{
|
||||
int did_something = FALSE;
|
||||
Sequence *seq, *seq_next;
|
||||
Sequence *seq, *seq_next_iter;
|
||||
|
||||
seq= old->first;
|
||||
|
||||
while(seq) {
|
||||
seq_next = seq->next; /* we need this because we may remove seq */
|
||||
seq_next_iter = seq->next; /* we need this because we may remove seq */
|
||||
|
||||
seq->tmp= NULL;
|
||||
if(seq->flag & SELECT) {
|
||||
@ -947,7 +947,7 @@ static int cut_seq_list(Scene *scene, ListBase *old, ListBase *new, int cutframe
|
||||
BLI_addtail(new, seq);
|
||||
}
|
||||
}
|
||||
seq = seq_next;
|
||||
seq = seq_next_iter;
|
||||
}
|
||||
return did_something;
|
||||
}
|
||||
@ -1781,7 +1781,7 @@ static int sequencer_separate_images_exec(bContext *C, wmOperator *op)
|
||||
Scene *scene= CTX_data_scene(C);
|
||||
Editing *ed= seq_give_editing(scene, FALSE);
|
||||
|
||||
Sequence *seq, *seq_new, *seq_next;
|
||||
Sequence *seq, *seq_new, *seq_next_iter;
|
||||
Strip *strip_new;
|
||||
StripElem *se, *se_new;
|
||||
int start_ofs, cfra, frame_end;
|
||||
@ -1793,7 +1793,7 @@ static int sequencer_separate_images_exec(bContext *C, wmOperator *op)
|
||||
if((seq->flag & SELECT) && (seq->type == SEQ_IMAGE) && (seq->len > 1)) {
|
||||
/* remove seq so overlap tests dont conflict,
|
||||
see seq_free_sequence below for the real free'ing */
|
||||
seq_next = seq->next;
|
||||
seq_next_iter = seq->next;
|
||||
BLI_remlink(ed->seqbasep, seq);
|
||||
/* if(seq->ipo) seq->ipo->id.us--; */
|
||||
/* XXX, remove fcurve and assign to split image strips */
|
||||
|
@ -363,16 +363,16 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
|
||||
{
|
||||
SpaceSeq *sseq= CTX_wm_space_seq(C);
|
||||
if (sseq && sseq->flag & SEQ_MARKER_TRANS) {
|
||||
TimeMarker *marker;
|
||||
TimeMarker *tmarker;
|
||||
|
||||
for (marker= scene->markers.first; marker; marker= marker->next) {
|
||||
if( ((x < CFRA) && marker->frame < CFRA) ||
|
||||
((x >= CFRA) && marker->frame >= CFRA)
|
||||
for (tmarker= scene->markers.first; tmarker; tmarker= tmarker->next) {
|
||||
if( ((x < CFRA) && tmarker->frame < CFRA) ||
|
||||
((x >= CFRA) && tmarker->frame >= CFRA)
|
||||
) {
|
||||
marker->flag |= SELECT;
|
||||
tmarker->flag |= SELECT;
|
||||
}
|
||||
else {
|
||||
marker->flag &= ~SELECT;
|
||||
tmarker->flag &= ~SELECT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1418,7 +1418,7 @@ static void draw_suggestion_list(SpaceText *st, ARegion *ar)
|
||||
UI_ThemeColor(TH_SHADE2);
|
||||
glRecti(x+16, y-3, x+16+w, y+st->lheight-3);
|
||||
}
|
||||
b=1; /* b=1 colour block, text is default. b=0 no block, colour text */
|
||||
b=1; /* b=1 color block, text is default. b=0 no block, color text */
|
||||
switch (item->type) {
|
||||
case 'k': UI_ThemeColor(TH_SYNTAX_B); b=0; break;
|
||||
case 'm': UI_ThemeColor(TH_TEXT); break;
|
||||
@ -1442,10 +1442,11 @@ static void draw_cursor(SpaceText *st, ARegion *ar)
|
||||
{
|
||||
Text *text= st->text;
|
||||
int vcurl, vcurc, vsell, vselc, hidden=0;
|
||||
int offl, offc, x, y, w, i;
|
||||
int x, y, w, i;
|
||||
|
||||
/* Draw the selection */
|
||||
if(text->curl!=text->sell || text->curc!=text->selc) {
|
||||
int offl, offc;
|
||||
/* Convert all to view space character coordinates */
|
||||
wrap_offset(st, ar, text->curl, text->curc, &offl, &offc);
|
||||
vcurl = txt_get_span(text->lines.first, text->curl) - st->top + offl;
|
||||
@ -1489,6 +1490,7 @@ static void draw_cursor(SpaceText *st, ARegion *ar)
|
||||
}
|
||||
}
|
||||
else {
|
||||
int offl, offc;
|
||||
wrap_offset(st, ar, text->sell, text->selc, &offl, &offc);
|
||||
vsell = txt_get_span(text->lines.first, text->sell) - st->top + offl;
|
||||
vselc = text_get_char_pos(st, text->sell->line, text->selc) - st->left + offc;
|
||||
|
@ -99,7 +99,7 @@ void text_free_caches(struct SpaceText *st);
|
||||
int text_file_modified(struct Text *text);
|
||||
|
||||
int text_do_suggest_select(struct SpaceText *st, struct ARegion *ar);
|
||||
void text_pop_suggest_list();
|
||||
void text_pop_suggest_list(void);
|
||||
|
||||
int text_get_visible_lines(struct SpaceText *st, struct ARegion *ar, char *str);
|
||||
int text_get_span_wrap(struct SpaceText *st, struct ARegion *ar, struct TextLine *from, struct TextLine *to);
|
||||
|
@ -388,7 +388,7 @@ short do_textmarkers(SpaceText *st, char ascii, unsigned short evnt, short val)
|
||||
/* Find the next temporary marker */
|
||||
if(evnt==TABKEY) {
|
||||
int lineno= txt_get_span(text->lines.first, text->curl);
|
||||
TextMarker *mrk= text->markers.first;
|
||||
mrk= text->markers.first;
|
||||
while(mrk) {
|
||||
if(!marker && (mrk->flags & TMARK_TEMP)) marker= mrk;
|
||||
if((mrk->flags & TMARK_TEMP) && (mrk->lineno > lineno || (mrk->lineno==lineno && mrk->end > text->curc))) {
|
||||
|
@ -427,7 +427,7 @@ static void draw_bonevert_solid(void)
|
||||
glCallList(displist);
|
||||
}
|
||||
|
||||
static void draw_bone_octahedral()
|
||||
static void draw_bone_octahedral(void)
|
||||
{
|
||||
static GLuint displist=0;
|
||||
|
||||
|
@ -383,7 +383,7 @@ static void draw_textured_begin(Scene *scene, View3D *v3d, RegionView3D *rv3d, O
|
||||
glShadeModel(GL_SMOOTH);
|
||||
}
|
||||
|
||||
static void draw_textured_end()
|
||||
static void draw_textured_end(void)
|
||||
{
|
||||
/* switch off textures */
|
||||
GPU_set_tpage(NULL, 0);
|
||||
|
@ -413,9 +413,6 @@ void drawaxes(float size, char drawtype)
|
||||
|
||||
case OB_PLAINAXES:
|
||||
for (axis=0; axis<3; axis++) {
|
||||
float v1[3]= {0.0, 0.0, 0.0};
|
||||
float v2[3]= {0.0, 0.0, 0.0};
|
||||
|
||||
glBegin(GL_LINES);
|
||||
|
||||
v1[axis]= size;
|
||||
@ -478,8 +475,6 @@ void drawaxes(float size, char drawtype)
|
||||
case OB_ARROWS:
|
||||
default:
|
||||
for (axis=0; axis<3; axis++) {
|
||||
float v1[3]= {0.0, 0.0, 0.0};
|
||||
float v2[3]= {0.0, 0.0, 0.0};
|
||||
int arrow_axis= (axis==0)?1:0;
|
||||
|
||||
glBegin(GL_LINES);
|
||||
@ -6278,10 +6273,10 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
|
||||
if (list) {
|
||||
bConstraint *curcon;
|
||||
bConstraintOb *cob;
|
||||
char col[4], col2[4];
|
||||
char col1[4], col2[4];
|
||||
|
||||
UI_GetThemeColor3ubv(TH_GRID, col);
|
||||
UI_make_axis_color(col, col2, 'z');
|
||||
UI_GetThemeColor3ubv(TH_GRID, col1);
|
||||
UI_make_axis_color(col1, col2, 'z');
|
||||
glColor3ubv((GLubyte *)col2);
|
||||
|
||||
cob= constraints_make_evalob(scene, ob, NULL, CONSTRAINT_OBTYPE_OBJECT);
|
||||
|
@ -824,7 +824,7 @@ static void draw_selected_name(Scene *scene, Object *ob, View3D *v3d)
|
||||
sprintf(info, "(%d) %s", CFRA, ob->id.name+2);
|
||||
}
|
||||
|
||||
/* colour depends on whether there is a keyframe */
|
||||
/* color depends on whether there is a keyframe */
|
||||
if (id_frame_has_keyframe((ID *)ob, /*BKE_curframe(scene)*/(float)(CFRA), v3d->keyflags))
|
||||
UI_ThemeColor(TH_VERTEX_SELECT);
|
||||
else
|
||||
@ -837,7 +837,7 @@ static void draw_selected_name(Scene *scene, Object *ob, View3D *v3d)
|
||||
else
|
||||
sprintf(info, "(%d)", CFRA);
|
||||
|
||||
/* colour is always white */
|
||||
/* color is always white */
|
||||
UI_ThemeColor(TH_TEXT_HI);
|
||||
}
|
||||
|
||||
@ -2425,13 +2425,13 @@ void view3d_main_area_draw(const bContext *C, ARegion *ar)
|
||||
}
|
||||
|
||||
if(v3d->lay_used != lay_used) { /* happens when loading old files or loading with UI load */
|
||||
ARegion *ar;
|
||||
ARegion *ar_iter;
|
||||
ScrArea *sa= CTX_wm_area(C);
|
||||
|
||||
/* find header and force tag redraw */
|
||||
for(ar= sa->regionbase.first; ar; ar= ar->next)
|
||||
if(ar->regiontype==RGN_TYPE_HEADER) {
|
||||
ED_region_tag_redraw(ar);
|
||||
for(ar_iter= sa->regionbase.first; ar_iter; ar_iter= ar_iter->next)
|
||||
if(ar_iter->regiontype==RGN_TYPE_HEADER) {
|
||||
ED_region_tag_redraw(ar_iter);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -81,9 +81,6 @@
|
||||
#define TEST_EDITMESH if(obedit==0) return; \
|
||||
if( (v3d->lay & obedit->lay)==0 ) return;
|
||||
|
||||
/* XXX port over */
|
||||
extern void borderselect();
|
||||
|
||||
/* view3d handler codes */
|
||||
#define VIEW3D_HANDLER_BACKGROUND 1
|
||||
#define VIEW3D_HANDLER_PROPERTIES 2
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user