}
- void
+ void
BSP_GhostTestApp3D::
UpdateFrame(
){
GHOST_Rect v_rect;
m_window->getClientBounds(v_rect);
-
+
glViewport(0,0,v_rect.getWidth(),v_rect.getHeight());
-
+
}
}
static bool g_hasFirstFile = false;
static char g_firstFileBuf[512];
-extern "C" int GHOST_HACK_getFirstFile(char buf[FIRSTFILEBUFLG]) {
+extern "C" int GHOST_HACK_getFirstFile(char buf[FIRSTFILEBUFLG])
+{
if (g_hasFirstFile) {
strncpy(buf, g_firstFileBuf, FIRSTFILEBUFLG - 1);
buf[FIRSTFILEBUFLG - 1] = '\0';
static char g_firstFileBuf[512];
//TODO:Need to investigate this. Function called too early in creator.c to have g_hasFirstFile == true
-extern "C" int GHOST_HACK_getFirstFile(char buf[FIRSTFILEBUFLG]) {
+extern "C" int GHOST_HACK_getFirstFile(char buf[FIRSTFILEBUFLG])
+{
if (g_hasFirstFile) {
strncpy(buf, g_firstFileBuf, FIRSTFILEBUFLG - 1);
buf[FIRSTFILEBUFLG - 1] = '\0';
}
-static void SleepTillEvent(Display *display, GHOST_TInt64 maxSleep) {
+static void SleepTillEvent(Display *display, GHOST_TInt64 maxSleep)
+{
int fd = ConnectionNumber(display);
fd_set fds;
{ kEventClassWindow, kEventWindowZoom }, /* for new zoom behaviour */
};
-static OSStatus myWEventHandlerProc(EventHandlerCallRef handler, EventRef event, void* userData) {
+static OSStatus myWEventHandlerProc(EventHandlerCallRef handler, EventRef event, void* userData)
+{
WindowRef mywindow;
GHOST_WindowCarbon *ghost_window;
OSStatus err;
/* Ron Fosner's code for weighting pixel formats and forcing software.
See http://www.opengl.org/resources/faq/technical/weight.cpp */
-static int WeightPixelFormat(PIXELFORMATDESCRIPTOR& pfd) {
+static int WeightPixelFormat(PIXELFORMATDESCRIPTOR& pfd)
+{
int weight = 0;
/* assume desktop color depth is 32 bits per pixel */
/* A modification of Ron Fosner's replacement for ChoosePixelFormat */
/* returns 0 on error, else returns the pixel format number to be used */
-static int EnumPixelFormats(HDC hdc) {
+static int EnumPixelFormats(HDC hdc)
+{
int iPixelFormat;
int i, n, w, weight = 0;
PIXELFORMATDESCRIPTOR pfd;
is configured but not plugged in.
*/
-static int ApplicationErrorHandler(Display *display, XErrorEvent *theEvent) {
+static int ApplicationErrorHandler(Display *display, XErrorEvent *theEvent)
+{
fprintf(stderr, "Ignoring Xlib error: error code %d request code %d\n",
theEvent->error_code, theEvent->request_code) ;
wt->initBlenderRNA(strength);
}
-template < class T > inline T ABS( T a ) {
+template < class T > inline T ABS( T a )
+{
return (0 < a) ? a : -a ;
}
void plugin_but_changed(int but) {}
void plugin_init() {}
-void plugin_getinfo(PluginInfo *info) {
+void plugin_getinfo(PluginInfo *info)
+{
info->name= name;
info->nvars= sizeof(varstr)/sizeof(VarStruct);
info->cfra= &cfra;
void plugin_but_changed(int but) {}
void plugin_init() {}
-void plugin_getinfo(PluginInfo *info) {
+void plugin_getinfo(PluginInfo *info)
+{
info->name= name;
info->nvars= sizeof(varstr)/sizeof(VarStruct);
info->cfra= &cfra;
info->callback= plugin_but_changed;
}
-static void rgb_to_yuv(float rgb[3], float yuv[3]) {
+static void rgb_to_yuv(float rgb[3], float yuv[3])
+{
yuv[0]= 0.299*rgb[0] + 0.587*rgb[1] + 0.114*rgb[2];
yuv[1]= 0.492*(rgb[2] - yuv[0]);
yuv[2]= 0.877*(rgb[0] - yuv[0]);
yuv[2] /= 0.615;
}
-static void yuv_to_rgb(float yuv[3], float rgb[3]) {
+static void yuv_to_rgb(float yuv[3], float rgb[3])
+{
yuv[1] *= 0.436;
yuv[2] *= 0.615;
free(d);
}
-void plugin_getinfo(PluginInfo *info) {
+void plugin_getinfo(PluginInfo *info)
+{
info->name= name;
info->nvars= sizeof(varstr)/sizeof(VarStruct);
info->cfra= &cfra;
void plugin_but_changed(int but) {}
void plugin_init() {}
-void plugin_getinfo(PluginInfo *info) {
+void plugin_getinfo(PluginInfo *info)
+{
info->name= name;
info->nvars= sizeof(varstr)/sizeof(VarStruct);
info->cfra= &cfra;
*/
/* example of usage:
-
-int *arr = NULL;
-V_DECLARE(arr);
-int i;
-
-for (i=0; i<10; i++) {
- V_GROW(arr);
- arr[i] = something;
-}
-V_FREE(arr);
-
-arrays are buffered, using double-buffering (so on each reallocation,
-the array size is doubled). supposedly this should give good Big Oh
-behaviour, though it may not be the best in practice.
-*/
+ *
+ * int *arr = NULL;
+ * V_DECLARE(arr);
+ * int i;
+ *
+ * for (i=0; i<10; i++) {
+ * V_GROW(arr);
+ * arr[i] = something;
+ * }
+ * V_FREE(arr);
+ *
+ * arrays are buffered, using double-buffering (so on each reallocation,
+ * the array size is doubled). supposedly this should give good Big Oh
+ * behaviour, though it may not be the best in practice.
+ */
#define V_DECLARE(vec) int _##vec##_count=0; void *_##vec##_tmp
-/*in the future, I plan on having V_DECLARE allocate stack memory it'll
- use at first, and switch over to heap when it needs more. that'll mess
- up cases where you'd want to use this API to build a dynamic list for
- non-local use, so all such cases should use this macro.*/
+/* in the future, I plan on having V_DECLARE allocate stack memory it'll
+ * use at first, and switch over to heap when it needs more. that'll mess
+ * up cases where you'd want to use this API to build a dynamic list for
+ * non-local use, so all such cases should use this macro.*/
#define V_DYNDECLARE(vec) V_DECLARE(vec)
/*this returns the entire size of the array, including any buffering.*/
}
}
-void *pop_ob_queue(struct DagNodeQueue *queue) {
+void *pop_ob_queue(struct DagNodeQueue *queue)
+{
return(pop_queue(queue)->ob);
}
return queue->first->node;
}
-int queue_count(struct DagNodeQueue *queue){
+int queue_count(struct DagNodeQueue *queue)
+{
return queue->count;
}
queue_delete(nqueue);
}
-int pre_and_post_BFS(DagForest *dag, short mask, graph_action_func pre_func, graph_action_func post_func, void **data) {
+int pre_and_post_BFS(DagForest *dag, short mask, graph_action_func pre_func, graph_action_func post_func, void **data)
+{
DagNode *node;
node = dag->DagNode.first;
}
/* unused */
-int pre_and_post_DFS(DagForest *dag, short mask, graph_action_func pre_func, graph_action_func post_func, void **data) {
+int pre_and_post_DFS(DagForest *dag, short mask, graph_action_func pre_func, graph_action_func post_func, void **data)
+{
DagNode *node;
node = dag->DagNode.first;
}
/* unused */
-short are_obs_related(struct DagForest *dag, void *ob1, void *ob2) {
+short are_obs_related(struct DagForest *dag, void *ob1, void *ob2)
+{
DagNode * node;
DagAdjList *itA;
return DAG_NO_RELATION;
}
-int is_acyclic( DagForest *dag) {
+int is_acyclic( DagForest *dag)
+{
return dag->is_acyclic;
}
float *orco, float mat[4][4], ParticleKey *state, float t);
/* few helpers for countall etc. */
-int count_particles(ParticleSystem *psys){
+int count_particles(ParticleSystem *psys)
+{
ParticleSettings *part=psys->part;
PARTICLE_P;
int tot=0;
}
return tot;
}
-int count_particles_mod(ParticleSystem *psys, int totgr, int cur){
+int count_particles_mod(ParticleSystem *psys, int totgr, int cur)
+{
ParticleSettings *part=psys->part;
PARTICLE_P;
int tot=0;
return ret == 2;
}
-float psys_get_dietime_from_cache(PointCache *cache, int index) {
+float psys_get_dietime_from_cache(PointCache *cache, int index)
+{
PTCacheMem *pm;
int dietime = 10000000; /* some max value so that we can default to pa->time+lifetime */
/* Particles on a dm */
/************************************************/
/* interpolate a location on a face based on face coordinates */
-void psys_interpolate_face(MVert *mvert, MFace *mface, MTFace *tface, float (*orcodata)[3], float *w, float *vec, float *nor, float *utan, float *vtan, float *orco,float *ornor){
+void psys_interpolate_face(MVert *mvert, MFace *mface, MTFace *tface, float (*orcodata)[3],
+ float *w, float *vec, float *nor, float *utan, float *vtan, float *orco,float *ornor)
+{
float *v1=0, *v2=0, *v3=0, *v4=0;
float e1[3],e2[3],s1,s2,t1,t2;
float *uv1, *uv2, *uv3, *uv4;
/************************************************/
/* Particles on emitter */
/************************************************/
-void psys_particle_on_emitter(ParticleSystemModifierData *psmd, int from, int index, int index_dmcache, float *fuv, float foffset, float *vec, float *nor, float *utan, float *vtan, float *orco, float *ornor){
+void psys_particle_on_emitter(ParticleSystemModifierData *psmd, int from, int index, int index_dmcache, float *fuv, float foffset, float *vec, float *nor, float *utan, float *vtan, float *orco, float *ornor)
+{
if(psmd){
if(psmd->psys->part->distr==PART_DISTR_GRID && psmd->psys->part->from != PART_FROM_VERT){
if(vec)
/************************************************/
/* Particle Key handling */
/************************************************/
-void copy_particle_key(ParticleKey *to, ParticleKey *from, int time){
+void copy_particle_key(ParticleKey *to, ParticleKey *from, int time)
+{
if(time){
memcpy(to,from,sizeof(ParticleKey));
}
to->time=to_time;
}
}
-void psys_get_from_key(ParticleKey *key, float *loc, float *vel, float *rot, float *time){
+void psys_get_from_key(ParticleKey *key, float *loc, float *vel, float *rot, float *time)
+{
if(loc) copy_v3_v3(loc,key->co);
if(vel) copy_v3_v3(vel,key->vel);
if(rot) copy_qt_qt(rot,key->rot);
}
/*-------changing particle keys from space to another-------*/
#if 0
-static void key_from_object(Object *ob, ParticleKey *key){
+static void key_from_object(Object *ob, ParticleKey *key)
+{
float q[4];
add_v3_v3(key->vel, key->co);
}
}
/* gets particle's state at a time, returns 1 if particle exists and can be seen and 0 if not */
-int psys_get_particle_state(ParticleSimulationData *sim, int p, ParticleKey *state, int always){
+int psys_get_particle_state(ParticleSimulationData *sim, int p, ParticleKey *state, int always)
+{
ParticleSystem *psys = sim->psys;
ParticleSettings *part = psys->part;
ParticleData *pa = NULL;
}
-void psys_apply_hair_lattice(Scene *scene, Object *ob, ParticleSystem *psys) {
+void psys_apply_hair_lattice(Scene *scene, Object *ob, ParticleSystem *psys)
+{
ParticleSimulationData sim= {0};
sim.scene= scene;
sim.ob= ob;
/* Reacting to system events */
/************************************************/
-static int particles_are_dynamic(ParticleSystem *psys) {
+static int particles_are_dynamic(ParticleSystem *psys)
+{
if(psys->pointcache->flag & PTCACHE_BAKED)
return 0;
psys->fluid_springs = (ParticleSpring*)MEM_reallocN(psys->fluid_springs, psys->alloc_fluidsprings * sizeof(ParticleSpring));
}
}
-static void sph_springs_modify(ParticleSystem *psys, float dtime){
+static void sph_springs_modify(ParticleSystem *psys, float dtime)
+{
SPHFluidSettings *fluid = psys->part->fluid;
ParticleData *pa1, *pa2;
ParticleSpring *spring = psys->fluid_springs;
madd_v3_v3fl(force, gravity, fluid->buoyancy * (pfr.density-rest_density));
}
-static void sph_integrate(ParticleSimulationData *sim, ParticleData *pa, float dfra, float *gravity, EdgeHash *springhash, float *element_size, float flow[3]) {
+static void sph_integrate(ParticleSimulationData *sim, ParticleData *pa, float dfra, float *gravity, EdgeHash *springhash, float *element_size, float flow[3])
+{
ParticleTarget *pt;
int i;
* -uses Newton-Rhapson iteration to find the collisions
* -handles spherical particles and (nearly) point like particles
*/
-static void collision_check(ParticleSimulationData *sim, int p, float dfra, float cfra){
+static void collision_check(ParticleSimulationData *sim, int p, float dfra, float cfra)
+{
ParticleSettings *part = sim->psys->part;
ParticleData *pa = sim->psys->particles + p;
ParticleCollision col;
psys->flag |= PSYS_HAIR_UPDATED;
}
-static void save_hair(ParticleSimulationData *sim, float UNUSED(cfra)){
+static void save_hair(ParticleSimulationData *sim, float UNUSED(cfra))
+{
Object *ob = sim->ob;
ParticleSystem *psys = sim->psys;
HairKey *key, *root;
}
}
-static void fluid_default_settings(ParticleSettings *part){
+static void fluid_default_settings(ParticleSettings *part)
+{
SPHFluidSettings *fluid = part->fluid;
fluid->spring_k = 0.f;
// not used anymore, test_index_face from blenkernel is better
#if 0
// change face indices order so that v4 is not 0
-void MeshImporter::rotate_face_indices(MFace *mface) {
+void MeshImporter::rotate_face_indices(MFace *mface)
+{
mface->v4 = mface->v1;
mface->v1 = mface->v2;
mface->v2 = mface->v3;
}
}
-int mesh_layers_menu(CustomData *data, int type) {
+int mesh_layers_menu(CustomData *data, int type)
+{
int ret;
char *str_pt, *str;
#undef is_face_tag
#undef face_tag
-static void linked_limit_default(bContext *C, wmOperator *op) {
+static void linked_limit_default(bContext *C, wmOperator *op)
+{
if(!RNA_property_is_set(op->ptr, "limit")) {
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh(obedit->data);
return(1);
}
-static int loop_bisect(EditMesh *em, Collection *edgecollection){
-
+static int loop_bisect(EditMesh *em, Collection *edgecollection)
+{
EditFace *efa, *sf1, *sf2;
EditEdge *eed, *sed;
CollectedEdge *curredge;
#if 0
/* helper function */
-void fluidsimGetGeometryObjFilename(Object *ob, char *dst) { //, char *srcname) {
+void fluidsimGetGeometryObjFilename(Object *ob, char *dst) { //, char *srcname)
+{
//BLI_snprintf(dst,FILE_MAXFILE, "%s_cfgdata_%s.bobj.gz", srcname, ob->id.name);
BLI_snprintf(dst,FILE_MAXFILE, "fluidcfgdata_%s.bobj.gz", ob->id.name);
}
}
}
-int runSimulationCallback(void *data, int status, int frame) {
+int runSimulationCallback(void *data, int status, int frame)
+{
FluidBakeJob *fb = (FluidBakeJob *)data;
elbeemSimulationSettings *settings = fb->settings;
{
Scene *scene= CTX_data_scene(C);
struct PaintStroke *stroke = op->customdata;
- ToolSettings *ts= CTX_data_tool_settings(C);
+ ToolSettings *ts= scene->toolsettings;
VPaint *wp= ts->wpaint;
Object *ob= CTX_data_active_object(C);
struct WPaintData *wpd;
Mesh *me;
+
+// bDeformGroup *dg;
+
float mat[4][4], imat[4][4];
if(scene->obedit) return OPERATOR_CANCELLED;
return OPERATOR_PASS_THROUGH;
}
+#if 0
+ /* check if we are attempting to paint onto a locked vertex group,
+ * and other options disallow it from doing anything useful */
+ dg = BLI_findlink(&ob->defbase, (ob->actdef-1));
+ if ( (dg->flag & DG_LOCK_WEIGHT) &&
+ (ts->auto_normalize == FALSE) &&
+ (ts->multipaint == FALSE) )
+ {
+ BKE_report(op->reports, RPT_WARNING, "Active group is locked, multi-paint/normalize disabled, aborting");
+
+ return OPERATOR_CANCELLED;
+ }
+#endif
+
/* ALLOCATIONS! no return after this line */
/* make mode data storage */
wpd= MEM_callocN(sizeof(struct WPaintData), "WPaintData");
static void node_dynamic_free_storage_cb(bNode *node);
#ifdef WITH_PYTHON
-static PyObject *init_dynamicdict(void) {
+static PyObject *init_dynamicdict(void)
+{
PyObject *newscriptdict, *item;
PyGILState_STATE gilstate = PyGILState_Ensure();
node->typeinfo = node_dynamic_find_typeinfo(&node_all_shaders, NULL);
}
-int nodeDynamicUnlinkText(ID *txtid) {
+int nodeDynamicUnlinkText(ID *txtid)
+{
Material *ma;
bNode *nd;
* NODE_DYNAMIC_MENU: for the default Dynamic node type
* > NODE_DYNAMIC_MENU: for the new types defined by scripts
*/
-static void node_dynamic_init_cb(bNode *node) {
+static void node_dynamic_init_cb(bNode *node)
+{
int type = node->custom2;
node->custom2 = 0;
/* node_dynamic_exec_cb: the execution callback called per pixel
* during rendering. */
-static void node_dynamic_exec_cb(void *data, bNode *node, bNodeStack **in, bNodeStack **out) {
+static void node_dynamic_exec_cb(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
+{
#ifndef WITH_PYTHON
return;
#else
static int qtVideoCodecCount = 18;
-int quicktime_get_num_videocodecs() {
+int quicktime_get_num_videocodecs()
+{
return qtVideoCodecCount;
}
return NULL;
}
-int quicktime_rnatmpvalue_from_videocodectype(int codecType) {
+int quicktime_rnatmpvalue_from_videocodectype(int codecType)
+{
int i;
for (i=0;i<qtVideoCodecCount;i++) {
if (qtVideoCodecList[i].codecType == codecType)
return 0;
}
-int quicktime_videocodecType_from_rnatmpvalue(int rnatmpvalue) {
+int quicktime_videocodecType_from_rnatmpvalue(int rnatmpvalue)
+{
int i;
for (i=0;i<qtVideoCodecCount;i++) {
if (qtVideoCodecList[i].rnatmpvalue == rnatmpvalue)
static int qtAudioCodecCount = 4;
-int quicktime_get_num_audiocodecs() {
+int quicktime_get_num_audiocodecs()
+{
return qtAudioCodecCount;
}
return NULL;
}
-int quicktime_rnatmpvalue_from_audiocodectype(int codecType) {
+int quicktime_rnatmpvalue_from_audiocodectype(int codecType)
+{
int i;
for (i=0;i<qtAudioCodecCount;i++) {
if (qtAudioCodecList[i].codecType == codecType)
return 0;
}
-int quicktime_audiocodecType_from_rnatmpvalue(int rnatmpvalue) {
+int quicktime_audiocodecType_from_rnatmpvalue(int rnatmpvalue)
+{
int i;
for (i=0;i<qtAudioCodecCount;i++) {
if (qtAudioCodecList[i].rnatmpvalue == rnatmpvalue)
}
-static NSString *stringWithCodecType(int codecType) {
+static NSString *stringWithCodecType(int codecType)
+{
char str[5];
*((int*)str) = EndianU32_NtoB(codecType);
return [NSString stringWithCString:str encoding:NSASCIIStringEncoding];
}
-void makeqtstring (RenderData *rd, char *string) {
+void makeqtstring (RenderData *rd, char *string)
+{
char txt[64];
strcpy(string, rd->pic);
}
}
-void filepath_qt(char *string, RenderData *rd) {
+void filepath_qt(char *string, RenderData *rd)
+{
if (string==NULL) return;
strcpy(string, rd->pic);
}
-void free_qtcomponentdata(void) {
+void free_qtcomponentdata(void)
+{
}
void quicktime_verify_image_type(RenderData *rd, ImageFormatData *imf)
}
-void free_anim_quicktime (struct anim *anim) {
+void free_anim_quicktime (struct anim *anim)
+{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
if (anim == NULL) return;
static int qtVideoCodecCount = 12;
-int quicktime_get_num_videocodecs() {
+int quicktime_get_num_videocodecs()
+{
return qtVideoCodecCount;
}
return NULL;
}
-int quicktime_rnatmpvalue_from_videocodectype(int codecType) {
+int quicktime_rnatmpvalue_from_videocodectype(int codecType)
+{
int i;
for (i=0;i<qtVideoCodecCount;i++) {
if (qtVideoCodecList[i].codecType == codecType)
return 0;
}
-int quicktime_videocodecType_from_rnatmpvalue(int rnatmpvalue) {
+int quicktime_videocodecType_from_rnatmpvalue(int rnatmpvalue)
+{
int i;
for (i=0;i<qtVideoCodecCount;i++) {
if (qtVideoCodecList[i].rnatmpvalue == rnatmpvalue)
}
-void filepath_qt(char *string, RenderData *rd) {
+void filepath_qt(char *string, RenderData *rd)
+{
char txt[64];
if (string==0) return;
}
-int start_qt(struct Scene *scene, struct RenderData *rd, int rectx, int recty, ReportList *reports) {
+int start_qt(struct Scene *scene, struct RenderData *rd, int rectx, int recty, ReportList *reports)
+{
OSErr err = noErr;
char name[2048];
}
-int append_qt(struct RenderData *rd, int frame, int *pixels, int rectx, int recty, ReportList *reports) {
+int append_qt(struct RenderData *rd, int frame, int *pixels, int rectx, int recty, ReportList *reports)
+{
QT_DoAddVideoSamplesToMedia(frame, pixels, rectx, recty, reports);
return 1;
}
-void end_qt(void) {
+void end_qt(void)
+{
OSErr err = noErr;
short resId = movieInDataForkResID;
}
-void free_qtcomponentdata(void) {
+void free_qtcomponentdata(void)
+{
if(qtdata) {
if(qtdata->theComponent) CloseComponent(qtdata->theComponent);
MEM_freeN(qtdata);
}
-void free_anim_quicktime (struct anim *anim) {
+void free_anim_quicktime (struct anim *anim)
+{
if (anim == NULL) return;
if (anim->qtime == NULL) return;
}
-void BL_ActionActuator::SetBlendTime (float newtime){
+void BL_ActionActuator::SetBlendTime (float newtime)
+{
m_blendframe = newtime;
}
-static KX_LightObject *gamelight_from_blamp(Object *ob, Lamp *la, unsigned int layerflag, KX_Scene *kxscene, RAS_IRenderTools *rendertools, KX_BlenderSceneConverter *converter) {
+static KX_LightObject *gamelight_from_blamp(Object *ob, Lamp *la, unsigned int layerflag, KX_Scene *kxscene, RAS_IRenderTools *rendertools, KX_BlenderSceneConverter *converter)
+{
RAS_LightObject lightobj;
KX_LightObject *gamelight;
return gamelight;
}
-static KX_Camera *gamecamera_from_bcamera(Object *ob, KX_Scene *kxscene, KX_BlenderSceneConverter *converter) {
+static KX_Camera *gamecamera_from_bcamera(Object *ob, KX_Scene *kxscene, KX_BlenderSceneConverter *converter)
+{
Camera* ca = static_cast<Camera*>(ob->data);
RAS_CameraData camdata(ca->lens, ca->ortho_scale, ca->sensor_x, ca->sensor_y, ca->sensor_fit, ca->clipsta, ca->clipend, ca->type == CAM_PERSP, ca->YF_dofdist);
KX_Camera *gamecamera;
}
}
-KX_IScalarInterpolator *BL_InterpolatorList::GetScalarInterpolator(const char *rna_path, int array_index) {
+KX_IScalarInterpolator *BL_InterpolatorList::GetScalarInterpolator(const char *rna_path, int array_index)
+{
for(BL_InterpolatorList::iterator i = begin(); (i != end()) ; i++ )
{
FCurve *fcu= (static_cast<BL_ScalarInterpolator *>(*i))->GetFCurve();
}
-void KX_BlenderSceneConverter::resetNoneDynamicObjectToIpo(){
-
+void KX_BlenderSceneConverter::resetNoneDynamicObjectToIpo()
+{
if (addInitFromFrame){
KX_SceneList* scenes = m_ketsjiEngine->CurrentScenes();
int numScenes = scenes->size();
#include "STR_HashedString.h"
-static BL_InterpolatorList *GetAdtList(struct bAction *for_act, KX_BlenderSceneConverter *converter) {
+static BL_InterpolatorList *GetAdtList(struct bAction *for_act, KX_BlenderSceneConverter *converter)
+{
BL_InterpolatorList *adtList= converter->FindInterpolatorList(for_act);
if (!adtList) {
}
#if 0
-int CParser::MakeInt() {
+int CParser::MakeInt()
+{
// returns the integer representation of the value in the global
// variable const_as_string
// pre: const_as_string contains only numercal chars
}
#endif
-STR_String CParser::Symbol2Str(int s) {
+STR_String CParser::Symbol2Str(int s)
+{
// returns a string representation of of symbol s,
// for use in Term when generating an error
switch(s) {
}
}
-void CParser::Term(int s) {
+void CParser::Term(int s)
+{
// generates an error if the next symbol isn't the specified symbol s
// otherwise, skip the symbol
if(s == sym) NextSym();
}
}
-int CParser::Priority(int optorkind) {
+int CParser::Priority(int optorkind)
+{
// returns the priority of an operator
// higher number means higher priority
switch(optorkind) {
return 0; // should not happen
}
-CExpression *CParser::Ex(int i) {
+CExpression *CParser::Ex(int i)
+{
// parses an expression in the imput, starting at priority i, and
// returns an CExpression, containing the parsed input
CExpression *e1 = NULL, *e2 = NULL;
return e1;
}
-CExpression *CParser::Expr() {
+CExpression *CParser::Expr()
+{
// parses an expression in the imput, and
// returns an CExpression, containing the parsed input
return Ex(1);
}
*/
-bool COperator1Expr::NeedsRecalculated() {
-
+bool COperator1Expr::NeedsRecalculated()
+{
return m_lhs->NeedsRecalculated();
-
}
CExpression* COperator1Expr::CheckLink(std::vector<CBrokenLinkInfo*>& brokenlinks) {
-bool COperator2Expr::IsRightInside(float x, float y, float z,bool bBorderInclude) {
-
+bool COperator2Expr::IsRightInside(float x, float y, float z,bool bBorderInclude)
+{
return m_rhs->IsInside(x,y,z,bBorderInclude) ;
-
}
-bool COperator2Expr::IsLeftInside(float x, float y, float z,bool bBorderInclude) {
+bool COperator2Expr::IsLeftInside(float x, float y, float z,bool bBorderInclude)
+{
return m_lhs->IsInside(x,y,z,bBorderInclude);
}
*/
-bool COperator2Expr::NeedsRecalculated() {
+bool COperator2Expr::NeedsRecalculated()
+{
// added some lines, just for debugging purposes, it could be a one-liner :)
//bool modleft
//bool modright;
}
#endif
-static inline void Py_Fatal(const char *M) {
+static inline void Py_Fatal(const char *M)
+{
fprintf(stderr, "%s\n", M);
exit(-1);
};
{ NULL } //Sentinel
};
-PyObject * CValue::pyattr_get_name(void * self_v, const KX_PYATTRIBUTE_DEF * attrdef) {
+PyObject * CValue::pyattr_get_name(void * self_v, const KX_PYATTRIBUTE_DEF * attrdef)
+{
CValue * self = static_cast<CValue *> (self_v);
return PyUnicode_From_STR_String(self->GetName());
}
m_linkedcontrollers.clear();
}
-bool SCA_ISensor::IsPositiveTrigger() {
+bool SCA_ISensor::IsPositiveTrigger()
+{
bool result = false;
if (m_eventval) {
m_pulse_frequency = freq;
}
-void SCA_ISensor::SetInvert(bool inv) {
+void SCA_ISensor::SetInvert(bool inv)
+{
m_invert = inv;
}
-void SCA_ISensor::SetLevel(bool lvl) {
+void SCA_ISensor::SetLevel(bool lvl)
+{
m_level = lvl;
}
-void SCA_ISensor::SetTap(bool tap) {
+void SCA_ISensor::SetTap(bool tap)
+{
m_tap = tap;
}
-double SCA_ISensor::GetNumber() {
+double SCA_ISensor::GetNumber()
+{
return GetState();
}
-void SCA_ISensor::Suspend() {
+void SCA_ISensor::Suspend()
+{
m_suspended = true;
}
-bool SCA_ISensor::IsSuspended() {
+bool SCA_ISensor::IsSuspended()
+{
return m_suspended;
}
-void SCA_ISensor::Resume() {
+void SCA_ISensor::Resume()
+{
m_suspended = false;
}
-void SCA_ISensor::Init() {
+void SCA_ISensor::Init()
+{
printf("Sensor %s has no init function, please report this bug to Blender.org\n", m_name.Ptr());
}
-void SCA_ISensor::DecLink() {
+void SCA_ISensor::DecLink()
+{
m_links--;
if (m_links < 0)
{
return false;
}
-void SCA_RandomActuator::enforceConstraints() {
+void SCA_RandomActuator::enforceConstraints()
+{
/* The constraints that are checked here are the ones fundamental to */
/* the various distributions. Limitations of the algorithms are checked */
/* elsewhere (or they should be... ). */
/* intentionally empty */
}
-void SCA_RandomNumberGenerator::SetStartVector(void) {
+void SCA_RandomNumberGenerator::SetStartVector(void)
+{
/* setting initial seeds to mt[N] using */
/* the generator Line 25 of Table 1 in */
/* [KNUTH 1981, The Art of Computer Programming */
/**
* This is the important part: copied verbatim :)
*/
-unsigned long SCA_RandomNumberGenerator::Draw() {
+unsigned long SCA_RandomNumberGenerator::Draw()
+{
static unsigned long mag01[2] = { 0x0, MATRIX_A };
/* mag01[x] = x * MATRIX_A for x=0,1 */
return y;
}
-float SCA_RandomNumberGenerator::DrawFloat() {
+float SCA_RandomNumberGenerator::DrawFloat()
+{
return ( (float) Draw()/ (unsigned long) 0xffffffff );
}
}
-void KX_TouchSensor::EndFrame() {
+void KX_TouchSensor::EndFrame()
+{
m_colliders->ReleaseAndRemoveAll();
m_hitObject = NULL;
m_bTriggered = false;