forked from bartvdbraak/blender
Blenkernel for 2.5 project, changes mainly are because of disabling
bad level calls. (which is not finished at all)
This commit is contained in:
parent
a1c8543f2a
commit
c79966be52
@ -37,57 +37,26 @@
|
||||
#ifndef BKE_BAD_LEVEL_CALLS_H
|
||||
#define BKE_BAD_LEVEL_CALLS_H
|
||||
|
||||
/* blender.c */
|
||||
void freeAllRad(void);
|
||||
void free_editText(void);
|
||||
void free_vertexpaint(void);
|
||||
extern ListBase editNurb;
|
||||
|
||||
/* readfile.c */
|
||||
struct SpaceButs;
|
||||
void set_rects_butspace(struct SpaceButs *buts);
|
||||
struct SpaceImaSel;
|
||||
void check_imasel_copy(struct SpaceImaSel *simasel);
|
||||
struct ScrArea;
|
||||
struct bScreen;
|
||||
void unlink_screen(struct bScreen *sc);
|
||||
void setscreen(struct bScreen *sc);
|
||||
void force_draw_all(int);
|
||||
/* otherwise the WHILE_SEQ doesn't work */
|
||||
struct Sequence;
|
||||
struct ListBase;
|
||||
void build_seqar(struct ListBase *seqbase, struct Sequence ***seqar, int *totseq);
|
||||
#include "radio.h"
|
||||
#include "BIF_editmesh.h"
|
||||
#include "BIF_editmesh.h"
|
||||
#include "BIF_editfont.h"
|
||||
#include "BIF_editarmature.h"
|
||||
#include "BIF_toolbox.h"
|
||||
#include "BIF_interface.h"
|
||||
#include "BIF_screen.h"
|
||||
|
||||
/* BPython API */
|
||||
struct ID;
|
||||
struct Script;
|
||||
struct Text;
|
||||
struct IpoDriver; /* DNA_curve_types.h */
|
||||
struct Object;
|
||||
struct bPythonConstraint;
|
||||
struct bConstraintOb;
|
||||
struct bConstraintTarget;
|
||||
void BPY_do_pyscript (struct ID *id, short int event);
|
||||
void BPY_clear_script (struct Script *script);
|
||||
void BPY_free_compiled_text (struct Text *text);
|
||||
/* pydrivers */
|
||||
struct Object **BPY_pydriver_get_objects(struct IpoDriver *driver);
|
||||
float BPY_pydriver_eval(struct IpoDriver *driver);
|
||||
void BPY_pydriver_update(void);
|
||||
/* button python evaluation */
|
||||
int BPY_button_eval(char *expr, double *value);
|
||||
/* pyconstraints */
|
||||
void BPY_pyconstraint_eval(struct bPythonConstraint *con, struct bConstraintOb *cob, struct ListBase *targets);
|
||||
void BPY_pyconstraint_targets(struct bPythonConstraint *con, struct bConstraintTarget *ct);
|
||||
#include "BDR_editcurve.h"
|
||||
#include "BDR_vpaint.h"
|
||||
|
||||
#include "BSE_sequence.h"
|
||||
|
||||
|
||||
/* writefile.c */
|
||||
struct Oops;
|
||||
void free_oops(struct Oops *oops);
|
||||
void error(char *str, ...);
|
||||
|
||||
/* anim.c */
|
||||
extern struct ListBase editNurb;
|
||||
|
||||
<<<<<<< .mine
|
||||
=======
|
||||
void mainqenter (unsigned short event, short val);
|
||||
void waitcursor(int);
|
||||
void allqueue(unsigned short event, short val);
|
||||
@ -241,5 +210,6 @@ void PE_free_particle_edit(struct ParticleSystem *psys);
|
||||
void PE_get_colors(char sel[4], char nosel[4]);
|
||||
void PE_recalc_world_cos(struct Object *ob, struct ParticleSystem *psys);
|
||||
|
||||
>>>>>>> .r12991
|
||||
#endif
|
||||
|
||||
|
@ -42,16 +42,22 @@ extern "C" {
|
||||
|
||||
struct ListBase;
|
||||
struct MemFile;
|
||||
struct bContext;
|
||||
|
||||
<<<<<<< .mine
|
||||
#define BLENDER_VERSION 250
|
||||
#define BLENDER_SUBVERSION 0
|
||||
=======
|
||||
#define BLENDER_VERSION 245
|
||||
#define BLENDER_SUBVERSION 12
|
||||
>>>>>>> .r12991
|
||||
|
||||
#define BLENDER_MINVERSION 240
|
||||
#define BLENDER_MINVERSION 250
|
||||
#define BLENDER_MINSUBVERSION 0
|
||||
|
||||
int BKE_read_file(char *dir, void *type_r);
|
||||
int BKE_read_file_from_memory(char* filebuf, int filelength, void *type_r);
|
||||
int BKE_read_file_from_memfile(struct MemFile *memfile);
|
||||
int BKE_read_file(struct bContext *C, char *dir, void *type_r);
|
||||
int BKE_read_file_from_memory(struct bContext *C, char* filebuf, int filelength, void *type_r);
|
||||
int BKE_read_file_from_memfile(struct bContext *C, struct MemFile *memfile);
|
||||
|
||||
void duplicatelist(struct ListBase *list1, struct ListBase *list2);
|
||||
void free_blender(void);
|
||||
@ -64,11 +70,11 @@ void free_pushpop(void);
|
||||
void pushpop_test(void);
|
||||
|
||||
/* global undo */
|
||||
extern void BKE_write_undo(char *name);
|
||||
extern void BKE_undo_step(int step);
|
||||
extern void BKE_write_undo(struct bContext *C, char *name);
|
||||
extern void BKE_undo_step(struct bContext *C, int step);
|
||||
extern void BKE_reset_undo(void);
|
||||
extern char *BKE_undo_menu_string(void);
|
||||
extern void BKE_undo_number(int nr);
|
||||
extern void BKE_undo_number(struct bContext *C, int nr);
|
||||
extern void BKE_undo_save_quit(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -40,6 +40,7 @@ struct VFont;
|
||||
struct Object;
|
||||
struct Curve;
|
||||
struct objfnt;
|
||||
struct TmpFont;
|
||||
|
||||
struct chartrans {
|
||||
float xof, yof;
|
||||
@ -57,7 +58,9 @@ extern struct SelBox *selboxes;
|
||||
void BKE_font_register_builtin(void *mem, int size);
|
||||
|
||||
void free_vfont(struct VFont *sc);
|
||||
void free_ttfont(void);
|
||||
struct VFont *load_vfont(char *name);
|
||||
struct TmpFont *vfont_find_tmpfont(struct VFont *vfont);
|
||||
|
||||
struct chartrans *text_to_curve(struct Object *ob, int mode);
|
||||
int style_to_sel(int style, int toggle);
|
||||
|
@ -58,11 +58,46 @@ struct SpaceNla;
|
||||
struct Main;
|
||||
struct Scene;
|
||||
struct bScreen;
|
||||
struct ScrArea;
|
||||
struct ARegion;
|
||||
struct Object;
|
||||
struct bSoundListener;
|
||||
struct BMF_Font;
|
||||
struct EditMesh;
|
||||
|
||||
/* former global stuff. context is derived, not storage! */
|
||||
typedef struct bContext {
|
||||
|
||||
/* windowmanager tree context */
|
||||
struct wmWindowManager *wm;
|
||||
struct wmWindow *window;
|
||||
struct bScreen *screen;
|
||||
struct ScrArea *curarea;
|
||||
struct ARegion *region;
|
||||
|
||||
/* fast spacedata lookups */
|
||||
struct View3D *vd;
|
||||
struct View2D *v2d;
|
||||
struct SpaceIpo *sipo;
|
||||
struct SpaceButs *buts;
|
||||
struct SpaceImage *sima;
|
||||
struct SpaceOops *soops;
|
||||
struct SpaceSound *ssound;
|
||||
struct SpaceAction *saction;
|
||||
struct SpaceNla *snla;
|
||||
|
||||
/* data context */
|
||||
struct Scene *scene;
|
||||
struct Object *obact;
|
||||
struct Object *obedit;
|
||||
|
||||
/* edit data context */
|
||||
struct EditMesh *editMesh;
|
||||
struct ListBase edbo; /* Armature Editmode bones */
|
||||
|
||||
} bContext;
|
||||
|
||||
|
||||
typedef struct Global {
|
||||
|
||||
/* active pointers */
|
||||
@ -120,7 +155,7 @@ typedef struct Global {
|
||||
/* Reevan's __NLA variables */
|
||||
struct ListBase edbo; /* Armature Editmode bones */
|
||||
|
||||
/* Rob's variables */
|
||||
/* Rob's variables (keep here for WM recode) */
|
||||
int have_quicktime;
|
||||
int ui_international;
|
||||
int charstart;
|
||||
|
@ -40,6 +40,8 @@ struct ListBase;
|
||||
struct ID;
|
||||
struct Main;
|
||||
struct Library;
|
||||
struct wmWindowManager;
|
||||
struct bContext;
|
||||
|
||||
void *alloc_libblock(struct ListBase *lb, short type, const char *name);
|
||||
void *copy_libblock(void *rt);
|
||||
@ -73,5 +75,7 @@ void IPOnames_to_pupstring(char **str, char *title, char *extraops, struct ListB
|
||||
void flag_listbase_ids(ListBase *lb, short flag, short value);
|
||||
void flag_all_listbases_ids(short flag, short value);
|
||||
|
||||
void set_free_windowmanager_cb(void (*func)(struct bContext *, struct wmWindowManager *) );
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -79,6 +79,7 @@ typedef struct Main {
|
||||
ListBase nodetree;
|
||||
ListBase brush;
|
||||
ListBase particle;
|
||||
ListBase wm;
|
||||
} Main;
|
||||
|
||||
|
||||
|
@ -1,46 +0,0 @@
|
||||
# $Id$
|
||||
# ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version. The Blender
|
||||
# Foundation also sells licenses for use in proprietary software under
|
||||
# the Blender License. See http://www.blender.org/BL/ for information
|
||||
# about this.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# The Original Code is Copyright (C) 2006, Blender Foundation
|
||||
# All rights reserved.
|
||||
#
|
||||
# The Original Code is: all of this file.
|
||||
#
|
||||
# Contributor(s): Jacques Beaurain.
|
||||
#
|
||||
# ***** END GPL/BL DUAL LICENSE BLOCK *****
|
||||
|
||||
FILE(GLOB SRC stubs.c)
|
||||
|
||||
SET(INC
|
||||
.
|
||||
..
|
||||
../../render/extern/include
|
||||
../../../intern/iksolver/extern
|
||||
../../blenlib
|
||||
../../include
|
||||
../../makesdna
|
||||
)
|
||||
|
||||
IF(WITH_INTERNATIONAL)
|
||||
ADD_DEFINITIONS(-DWITH_FREETYPE2)
|
||||
ENDIF(WITH_INTERNATIONAL)
|
||||
|
||||
BLENDERLIB_NOLIST(blenkernel_blc "${SRC}" "${INC}")
|
@ -1,51 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version. The Blender
|
||||
# Foundation also sells licenses for use in proprietary software under
|
||||
# the Blender License. See http://www.blender.org/BL/ for information
|
||||
# about this.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
|
||||
# All rights reserved.
|
||||
#
|
||||
# The Original Code is: all of this file.
|
||||
#
|
||||
# Contributor(s): none yet.
|
||||
#
|
||||
# ***** END GPL/BL DUAL LICENSE BLOCK *****
|
||||
#
|
||||
#
|
||||
|
||||
LIBNAME = blenkernel_blc
|
||||
DIR = $(OCGDIR)/blender/blenkernel/$(LIBNAME)
|
||||
|
||||
include nan_compile.mk
|
||||
|
||||
CFLAGS += $(LEVEL_2_C_WARNINGS)
|
||||
CFLAGS += $(FIX_STUBS_WARNINGS)
|
||||
|
||||
CPPFLAGS += $(OGL_CPPFLAGS)
|
||||
CPPFLAGS += -I../../makesdna
|
||||
CPPFLAGS += -I../../include
|
||||
CPPFLAGS += -I../../blenlib
|
||||
CPPFLAGS += -I../../render/extern/include
|
||||
CPPFLAGS += -I$(NAN_IKSOLVER)/include
|
||||
|
||||
# path to our own external headerfiles
|
||||
CPPFLAGS += -I..
|
||||
|
@ -1,14 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
Import ('env')
|
||||
|
||||
sources = 'stubs.c'
|
||||
|
||||
incs = '. .. ../../render/extern/include'
|
||||
incs += ' #/intern/iksolver/extern ../../blenlib'
|
||||
incs += ' ../../include ../../makesdna'
|
||||
|
||||
defs = ''
|
||||
if env['WITH_BF_INTERNATIONAL']:
|
||||
defs += 'WITH_FREETYPE2'
|
||||
|
||||
env.BlenderLib ('blenkernel_blc', sources = Split(sources), includes=Split(incs), defines=Split(defs), libtype='player',priority=225 )
|
@ -1,349 +0,0 @@
|
||||
|
||||
/**
|
||||
* $Id$
|
||||
*
|
||||
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version. The Blender
|
||||
* Foundation also sells licenses for use in proprietary software under
|
||||
* the Blender License. See http://www.blender.org/BL/ for information
|
||||
* about this.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
|
||||
* All rights reserved.
|
||||
*
|
||||
* The Original Code is: all of this file.
|
||||
*
|
||||
* Contributor(s): none yet.
|
||||
*
|
||||
* ***** END GPL/BL DUAL LICENSE BLOCK *****
|
||||
* BKE_bad_level_calls function stubs
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "BKE_bad_level_calls.h"
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BPI_script.h"
|
||||
#include "DNA_texture_types.h"
|
||||
#include "DNA_material_types.h"
|
||||
#include "DNA_node_types.h"
|
||||
#include "DNA_scene_types.h"
|
||||
|
||||
#include "RE_render_ext.h"
|
||||
#include "RE_shader_ext.h"
|
||||
#include "RE_pipeline.h"
|
||||
|
||||
int winqueue_break= 0;
|
||||
|
||||
char bprogname[1];
|
||||
|
||||
struct IpoCurve;
|
||||
struct FluidsimSettings;
|
||||
struct Render;
|
||||
struct RenderResult;
|
||||
struct Object;
|
||||
struct bPythonConstraint;
|
||||
struct bConstraintOb;
|
||||
struct bConstraintTarget;
|
||||
struct ListBase;
|
||||
|
||||
char *getIpoCurveName( struct IpoCurve * icu );
|
||||
void insert_vert_icu(struct IpoCurve *icu, float x, float y, short fast);
|
||||
struct IpoCurve *verify_ipocurve(struct ID *id, short a, char *b, char *d, int e);
|
||||
void elbeemDebugOut(char *msg);
|
||||
void fluidsimSettingsFree(struct FluidsimSettings* sb);
|
||||
void fluidsimSettingsCopy(struct FluidsimSettings* sb);
|
||||
|
||||
|
||||
/* readfile.c */
|
||||
/* struct SpaceButs; */
|
||||
void set_rects_butspace(struct SpaceButs *buts){}
|
||||
/* struct SpaceImaSel; */
|
||||
void check_imasel_copy(struct SpaceImaSel *simasel){}
|
||||
/* struct ScrArea; */
|
||||
void unlink_screen(struct bScreen *sc){}
|
||||
void freeAllRad(void){}
|
||||
void free_editText(void){}
|
||||
void free_editArmature(void){}
|
||||
void free_vertexpaint(void){}
|
||||
|
||||
char *getIpoCurveName( struct IpoCurve * icu )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void insert_vert_icu(struct IpoCurve *icu, float x, float y, short fast)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
struct IpoCurve *verify_ipocurve(struct ID *id, short a, char *b, char *d, int e)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void setscreen(struct bScreen *sc){}
|
||||
void force_draw_all(int header){}
|
||||
/* otherwise the WHILE_SEQ doesn't work */
|
||||
/* struct Sequence; */
|
||||
|
||||
/* MAART: added "seqar = 0; totseq = 0" because the loader will crash without it. */
|
||||
void build_seqar(struct ListBase *seqbase, struct Sequence ***seqar, int *totseq)
|
||||
{
|
||||
*seqar = 0;
|
||||
*totseq = 0;
|
||||
}
|
||||
|
||||
/* blender.c */
|
||||
void mainqenter (unsigned short event, short val){}
|
||||
|
||||
void BPY_do_pyscript(ID *id, short int event){}
|
||||
void BPY_clear_script(Script *script){}
|
||||
void BPY_free_compiled_text(struct Text *text){}
|
||||
void BPY_pydriver_update(void){}
|
||||
float BPY_pydriver_eval(struct IpoDriver *driver)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
/* depsgraph.c: */
|
||||
struct Object **BPY_pydriver_get_objects(struct IpoDriver *driver)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
int BPY_button_eval(char *expr, double *value)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* PyConstraints - BPY_interface.c */
|
||||
void BPY_pyconstraint_eval(struct bPythonConstraint *con, struct bConstraintOb *cob, struct ListBase *targets)
|
||||
{
|
||||
}
|
||||
void BPY_pyconstraint_target(struct bPythonConstraint *con, struct bConstraintTarget *ct)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/* writefile.c */
|
||||
/* struct Oops; */
|
||||
void free_oops(struct Oops *oops){}
|
||||
void exit_posemode(int freedata){}
|
||||
void error(char *str, ...){}
|
||||
|
||||
/* anim.c */
|
||||
ListBase editNurb;
|
||||
|
||||
void waitcursor(int val){}
|
||||
void allqueue(unsigned short event, short val){}
|
||||
#define REDRAWVIEW3D 0x4010
|
||||
Material defmaterial;
|
||||
|
||||
/* exotic.c */
|
||||
void load_editMesh(void){}
|
||||
void make_editMesh(void){}
|
||||
void free_editMesh(struct EditMesh *em){}
|
||||
void docenter_new(void){}
|
||||
int saveover(char *str){ return 0;}
|
||||
|
||||
/* image.c */
|
||||
#include "DNA_image_types.h"
|
||||
void free_realtime_image(Image *ima){} // has to become a callback, opengl stuff
|
||||
|
||||
/* ipo.c */
|
||||
void copy_view3d_lock(short val){} // was a hack, to make scene layer ipo's possible
|
||||
|
||||
/* library.c */
|
||||
void allspace(unsigned short event, short val){}
|
||||
#define OOPS_TEST 2
|
||||
|
||||
/* mball.c */
|
||||
ListBase editelems;
|
||||
|
||||
/* object.c */
|
||||
void BPY_free_scriptlink(ScriptLink *slink){}
|
||||
void BPY_copy_scriptlink(ScriptLink *scriptlink){}
|
||||
float *give_cursor(void){ return 0;} // become a callback or argument
|
||||
|
||||
|
||||
/* packedFile.c */
|
||||
short pupmenu(char *instr){ return 0;} // will be general callback
|
||||
|
||||
/* sca.c */
|
||||
#define LEFTMOUSE 0x001 // because of mouse sensor
|
||||
|
||||
/* scene.c */
|
||||
#include "DNA_sequence_types.h"
|
||||
void free_editing(struct Editing *ed){} // scenes and sequences problem...
|
||||
void BPY_do_all_scripts (short int event){}
|
||||
|
||||
/* IKsolver stubs */
|
||||
#include "IK_solver.h"
|
||||
|
||||
IK_Segment *IK_CreateSegment(int flag) { return 0; }
|
||||
void IK_FreeSegment(IK_Segment *seg) {}
|
||||
|
||||
void IK_SetParent(IK_Segment *seg, IK_Segment *parent) {}
|
||||
void IK_SetTransform(IK_Segment *seg, float start[3], float rest_basis[][3], float basis[][3], float length) {}
|
||||
void IK_GetBasisChange(IK_Segment *seg, float basis_change[][3]) {}
|
||||
void IK_GetTranslationChange(IK_Segment *seg, float *translation_change) {};
|
||||
void IK_SetLimit(IK_Segment *seg, IK_SegmentAxis axis, float lower, float upper) {};
|
||||
void IK_SetStiffness(IK_Segment *seg, IK_SegmentAxis axis, float stiffness) {};
|
||||
|
||||
IK_Solver *IK_CreateSolver(IK_Segment *root) { return 0; }
|
||||
void IK_FreeSolver(IK_Solver *solver) {};
|
||||
|
||||
void IK_SolverAddGoal(IK_Solver *solver, IK_Segment *tip, float goal[3], float weight) {}
|
||||
void IK_SolverAddGoalOrientation(IK_Solver *solver, IK_Segment *tip, float goal[][3], float weight) {}
|
||||
void IK_SolverSetPoleVectorConstraint(IK_Solver *solver, IK_Segment *tip, float goal[3], float polegoal[3], float poleangle, int getangle) {}
|
||||
float IK_SolverGetPoleAngle(IK_Solver *solver) { return 0.0f; }
|
||||
|
||||
int IK_Solve(IK_Solver *solver, float tolerance, int max_iterations) { return 0; }
|
||||
|
||||
/* exotic.c */
|
||||
int BPY_call_importloader(char *name)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* texture.c */
|
||||
#define FLO 128
|
||||
#define INT 96
|
||||
|
||||
|
||||
char texstr[20][12]; /* buttons.c */
|
||||
|
||||
/* editsca.c */
|
||||
void make_unique_prop_names(char *str) {}
|
||||
|
||||
/* DerivedMesh.c */
|
||||
void bglBegin(int mode) {}
|
||||
void bglVertex3fv(float *vec) {}
|
||||
void bglVertex3f(float x, float y, float z) {}
|
||||
void bglEnd(void) {}
|
||||
|
||||
/* booleanops.c */
|
||||
struct DerivedMesh *NewBooleanDerivedMesh(struct Object *ob, struct Object *ob_select, int int_op_type) { return 0; }
|
||||
|
||||
// bobj read/write debug messages
|
||||
void elbeemDebugOut(char *msg) {}
|
||||
void fluidsimSettingsFree(struct FluidsimSettings* sb) {}
|
||||
void fluidsimSettingsCopy(struct FluidsimSettings* sb) {}
|
||||
|
||||
/*new render funcs */
|
||||
int externtex(struct MTex *mtex, float *vec, float *tin, float *tr, float *tg, float *tb, float *ta) { return 0; }
|
||||
void texture_rgb_blend(float *in, float *tex, float *out, float fact, float facg, int blendtype) {}
|
||||
float texture_value_blend(float tex, float out, float fact, float facg, int blendtype, int flip) { return 0; }
|
||||
|
||||
void RE_FreeRenderResult(struct RenderResult *rr) {}
|
||||
void RE_GetResultImage(struct Render *re, struct RenderResult *rr) {}
|
||||
struct RenderResult *RE_MultilayerConvert(void *exrhandle, int rectx, int recty){return NULL;}
|
||||
struct Render *RE_GetRender(const char *name) {return (struct Render *)NULL;}
|
||||
struct RenderResult *RE_GetResult(Render *re) {return (struct RenderResult *)NULL;}
|
||||
float *RE_RenderLayerGetPass(RenderLayer *rl, int passtype) {return NULL;}
|
||||
float RE_filter_value(int type, float x) {return 0.0f;}
|
||||
struct RenderLayer *RE_GetRenderLayer(RenderResult *rr, const char *name) {return (struct RenderLayer *)NULL;}
|
||||
void RE_Database_Free (struct Render *re) {}
|
||||
void RE_FreeRender(Render *re) {}
|
||||
void RE_shade_external(Render *re, ShadeInput *shi, ShadeResult *shr) {}
|
||||
void RE_DataBase_GetView(Render *re, float mat[][4]) {}
|
||||
struct Render *RE_NewRender(const char *name) {return (struct Render *)NULL;}
|
||||
void RE_Database_Baking(struct Render *re, struct Scene *scene, int type, struct Object *actob) {};
|
||||
|
||||
|
||||
/* node_composite.c */
|
||||
void RE_zbuf_accumulate_vecblur(struct NodeBlurData *nd, int xsize, int ysize, float *newrect, float *imgrect, float *vecbufrect, float *zbufrect) {}
|
||||
|
||||
int multitex_ext(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex, TexResult *texres)
|
||||
{
|
||||
return 1969;
|
||||
}
|
||||
|
||||
/* verse */
|
||||
|
||||
void post_vertex_create(struct VerseVert *vvert) {}
|
||||
void post_vertex_set_xyz(struct VerseVert *vvert) {}
|
||||
void post_vertex_delete(struct VerseVert *vvert) {}
|
||||
void post_vertex_free_constraint(struct VerseVert *vvert) {}
|
||||
void post_polygon_create(struct VerseFace *vface) {}
|
||||
void post_polygon_set_corner(struct VerseFace *vface) {}
|
||||
void post_polygon_delete(struct VerseFace *vface) {}
|
||||
void post_polygon_free_constraint(struct VerseFace *vface) {}
|
||||
void post_polygon_set_uint8(struct VerseFace *vface) {}
|
||||
void post_node_create(struct VNode *vnode) {}
|
||||
void post_node_destroy(struct VNode *vnode) {}
|
||||
void post_node_name_set(struct VNode *vnode) {}
|
||||
void post_tag_change(struct VTag *vtag) {}
|
||||
void post_taggroup_create(struct VTagGroup *vtaggroup) {}
|
||||
char *verse_client_name(void) { return NULL; }
|
||||
void post_transform(struct VNode *vnode) {}
|
||||
void post_transform_pos(struct VNode *vnode) {}
|
||||
void post_transform_rot(struct VNode *vnode) {}
|
||||
void post_transform_scale(struct VNode *vnode) {}
|
||||
void post_object_free_constraint(struct VNode *vnode) {}
|
||||
void post_link_set(struct VLink *vlink) {}
|
||||
void post_link_destroy(struct VLink *vlink) {}
|
||||
void post_connect_accept(struct VerseSession *session) {}
|
||||
void post_connect_terminated(struct VerseSession *session) {}
|
||||
void post_connect_update(struct VerseSession *session) {}
|
||||
void add_screenhandler(struct bScreen *sc, short eventcode, short val) {}
|
||||
void post_bitmap_dimension_set(struct VNode *vnode) {}
|
||||
void post_bitmap_layer_create(struct VBitmapLayer *vblayer) {}
|
||||
void post_bitmap_layer_destroy(struct VBitmapLayer *vblayer) {}
|
||||
void post_bitmap_tile_set(struct VBitmapLayer *vblayer, unsigned int xs, unsigned int ys) {}
|
||||
void create_meshdata_from_geom_node(struct Mesh *me, struct VNode *vnode) {}
|
||||
void post_geometry_free_constraint(struct VNode *vnode) {}
|
||||
void post_layer_create(struct VLayer *vlayer) {}
|
||||
void post_layer_destroy(struct VLayer *vlayer) {}
|
||||
void post_server_add(void) {}
|
||||
/* Multires/sculpt stubs */
|
||||
struct MultiresLevel *multires_level_n(struct Multires *mr, int n) {return NULL;}
|
||||
void multires_free(struct Multires *mr) {}
|
||||
void multires_set_level(struct Object *ob, struct Mesh *me, const int render) {}
|
||||
void multires_update_levels(struct Mesh *me, const int render) {}
|
||||
void multires_calc_level_maps(struct MultiresLevel *lvl) {}
|
||||
struct Multires *multires_copy(struct Multires *orig) {return NULL;}
|
||||
void sculpt_reset_curve(struct SculptData *sd) {}
|
||||
void sculptmode_init(struct Scene *sce) {}
|
||||
void sculptmode_free_all(struct Scene *sce) {}
|
||||
|
||||
/* zbuf.c stub */
|
||||
void antialias_tagbuf(int xsize, int ysize, char *rectmove) {}
|
||||
|
||||
/* imagetexture.c stub */
|
||||
void ibuf_sample(struct ImBuf *ibuf, float fx, float fy, float dx, float dy, float *result) {}
|
||||
|
||||
void update_for_newframe() {}
|
||||
|
||||
struct FileList;
|
||||
void BIF_filelist_freelib(struct FileList* filelist) {};
|
||||
|
||||
/* edittime.c stub */
|
||||
TimeMarker *get_frame_marker(int frame){return 0;};
|
||||
|
||||
/* editseq.c */
|
||||
Sequence *get_forground_frame_seq(int frame){return 0;};
|
||||
|
||||
/* modifier.c stub */
|
||||
void harmonic_coordinates_bind(struct MeshDeformModifierData *mmd,
|
||||
float (*vertexcos)[3], int totvert, float cagemat[][4]) {}
|
||||
|
||||
/* particle.c */
|
||||
void PE_free_particle_edit(struct ParticleSystem *psys) {}
|
||||
void PE_get_colors(char sel[4], char nosel[4]) {}
|
||||
void PE_recalc_world_cos(struct Object *ob, struct ParticleSystem *psys) {}
|
||||
|
@ -47,12 +47,16 @@
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "DNA_curve_types.h"
|
||||
#include "DNA_listBase.h"
|
||||
#include "DNA_sdna_types.h"
|
||||
#include "DNA_userdef_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
#include "DNA_curve_types.h"
|
||||
#include "DNA_mesh_types.h"
|
||||
#include "DNA_scene_types.h"
|
||||
#include "DNA_screen_types.h"
|
||||
#include "DNA_sound_types.h"
|
||||
#include "DNA_sequence_types.h"
|
||||
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_dynstr.h"
|
||||
@ -60,9 +64,6 @@
|
||||
#include "IMB_imbuf_types.h"
|
||||
#include "IMB_imbuf.h"
|
||||
|
||||
#include "DNA_mesh_types.h"
|
||||
#include "DNA_screen_types.h"
|
||||
|
||||
#include "BKE_blender.h"
|
||||
#include "BKE_curve.h"
|
||||
#include "BKE_depsgraph.h"
|
||||
@ -89,8 +90,10 @@
|
||||
#include "nla.h"
|
||||
#include "blendef.h"
|
||||
|
||||
|
||||
Global G;
|
||||
UserDef U;
|
||||
ListBase WMlist= {NULL, NULL};
|
||||
|
||||
char versionstr[48]= "";
|
||||
|
||||
@ -313,7 +316,10 @@ static void clean_paths(Main *main)
|
||||
}
|
||||
}
|
||||
|
||||
static void setup_app_data(BlendFileData *bfd, char *filename)
|
||||
/* context matching */
|
||||
/* handle no-ui case */
|
||||
|
||||
static void setup_app_data(bContext *C, BlendFileData *bfd, char *filename)
|
||||
{
|
||||
Object *ob;
|
||||
bScreen *curscreen= NULL;
|
||||
@ -327,6 +333,8 @@ static void setup_app_data(BlendFileData *bfd, char *filename)
|
||||
|
||||
clean_paths(bfd->main);
|
||||
|
||||
/* XXX here the complex windowmanager matching */
|
||||
|
||||
/* no load screens? */
|
||||
if(mode) {
|
||||
/* comes from readfile.c */
|
||||
@ -335,7 +343,7 @@ static void setup_app_data(BlendFileData *bfd, char *filename)
|
||||
SWAP(ListBase, G.main->screen, bfd->main->screen);
|
||||
|
||||
/* we re-use current screen */
|
||||
curscreen= G.curscreen;
|
||||
curscreen= C->screen;
|
||||
/* but use new Scene pointer */
|
||||
curscene= bfd->curscene;
|
||||
if(curscene==NULL) curscene= bfd->main->scene.first;
|
||||
@ -346,11 +354,13 @@ static void setup_app_data(BlendFileData *bfd, char *filename)
|
||||
lib_link_screen_restore(bfd->main, curscene);
|
||||
}
|
||||
|
||||
clear_global(); /* free Main database */
|
||||
/* free G.main Main database */
|
||||
clear_global();
|
||||
|
||||
if(mode!='u') G.save_over = 1;
|
||||
|
||||
G.main= bfd->main;
|
||||
|
||||
if (bfd->user) {
|
||||
|
||||
/* only here free userdef themes... */
|
||||
@ -358,7 +368,6 @@ static void setup_app_data(BlendFileData *bfd, char *filename)
|
||||
|
||||
U= *bfd->user;
|
||||
MEM_freeN(bfd->user);
|
||||
|
||||
}
|
||||
|
||||
/* samples is a global list... */
|
||||
@ -366,20 +375,20 @@ static void setup_app_data(BlendFileData *bfd, char *filename)
|
||||
|
||||
/* case G_FILE_NO_UI or no screens in file */
|
||||
if(mode) {
|
||||
G.curscreen= curscreen;
|
||||
G.scene= curscene;
|
||||
C->screen= curscreen;
|
||||
C->scene= curscene;
|
||||
}
|
||||
else {
|
||||
G.winpos= bfd->winpos;
|
||||
G.displaymode= bfd->displaymode;
|
||||
G.fileflags= bfd->fileflags;
|
||||
G.curscreen= bfd->curscreen;
|
||||
G.scene= G.curscreen->scene;
|
||||
C->screen= bfd->curscreen;
|
||||
C->scene= C->screen->scene;
|
||||
}
|
||||
/* this can happen when active scene was lib-linked, and doesnt exist anymore */
|
||||
if(G.scene==NULL) {
|
||||
G.scene= G.main->scene.first;
|
||||
G.curscreen->scene= G.scene;
|
||||
if(C->scene==NULL) {
|
||||
C->scene= G.main->scene.first;
|
||||
C->screen->scene= C->scene;
|
||||
}
|
||||
|
||||
/* special cases, override loaded flags: */
|
||||
@ -390,11 +399,11 @@ static void setup_app_data(BlendFileData *bfd, char *filename)
|
||||
G.f= bfd->globalf;
|
||||
|
||||
if (!G.background) {
|
||||
setscreen(G.curscreen);
|
||||
//setscreen(G.curscreen);
|
||||
}
|
||||
|
||||
/* baseflags, groups, make depsgraph, etc */
|
||||
set_scene_bg(G.scene);
|
||||
set_scene_bg(C->scene);
|
||||
|
||||
/* last stage of do_versions actually, that sets recalc flags for recalc poses */
|
||||
for(ob= G.main->object.first; ob; ob= ob->id.next) {
|
||||
@ -403,7 +412,7 @@ static void setup_app_data(BlendFileData *bfd, char *filename)
|
||||
}
|
||||
|
||||
/* now tag update flags, to ensure deformers get calculated on redraw */
|
||||
DAG_scene_update_flags(G.scene, G.scene->lay);
|
||||
DAG_scene_update_flags(C->scene, C->scene->lay);
|
||||
|
||||
if (G.f & G_DOSCRIPTLINKS) {
|
||||
/* there's an onload scriptlink to execute in screenmain */
|
||||
@ -437,7 +446,7 @@ static void handle_subversion_warning(Main *main)
|
||||
2: OK, and with new user settings
|
||||
*/
|
||||
|
||||
int BKE_read_file(char *dir, void *type_r)
|
||||
int BKE_read_file(bContext *C, char *dir, void *unused)
|
||||
{
|
||||
BlendReadError bre;
|
||||
BlendFileData *bfd;
|
||||
@ -449,10 +458,8 @@ int BKE_read_file(char *dir, void *type_r)
|
||||
bfd= BLO_read_from_file(dir, &bre);
|
||||
if (bfd) {
|
||||
if(bfd->user) retval= 2;
|
||||
if (type_r)
|
||||
*((BlenFileType*)type_r)= bfd->type;
|
||||
|
||||
setup_app_data(bfd, dir);
|
||||
setup_app_data(C, bfd, dir);
|
||||
|
||||
handle_subversion_warning(G.main);
|
||||
}
|
||||
@ -466,7 +473,7 @@ int BKE_read_file(char *dir, void *type_r)
|
||||
return (bfd?retval:0);
|
||||
}
|
||||
|
||||
int BKE_read_file_from_memory(char* filebuf, int filelength, void *type_r)
|
||||
int BKE_read_file_from_memory(bContext *C, char* filebuf, int filelength, void *unused)
|
||||
{
|
||||
BlendReadError bre;
|
||||
BlendFileData *bfd;
|
||||
@ -475,11 +482,8 @@ int BKE_read_file_from_memory(char* filebuf, int filelength, void *type_r)
|
||||
waitcursor(1);
|
||||
|
||||
bfd= BLO_read_from_memory(filebuf, filelength, &bre);
|
||||
if (bfd) {
|
||||
if (type_r)
|
||||
*((BlenFileType*)type_r)= bfd->type;
|
||||
|
||||
setup_app_data(bfd, "<memory>");
|
||||
if (bfd) {
|
||||
setup_app_data(C, bfd, "<memory>");
|
||||
} else {
|
||||
error("Loading failed: %s", BLO_bre_as_string(bre));
|
||||
}
|
||||
@ -491,7 +495,7 @@ int BKE_read_file_from_memory(char* filebuf, int filelength, void *type_r)
|
||||
}
|
||||
|
||||
/* memfile is the undo buffer */
|
||||
int BKE_read_file_from_memfile(MemFile *memfile)
|
||||
int BKE_read_file_from_memfile(bContext *C, MemFile *memfile)
|
||||
{
|
||||
BlendReadError bre;
|
||||
BlendFileData *bfd;
|
||||
@ -501,7 +505,7 @@ int BKE_read_file_from_memfile(MemFile *memfile)
|
||||
|
||||
bfd= BLO_read_from_memfile(G.sce, memfile, &bre);
|
||||
if (bfd) {
|
||||
setup_app_data(bfd, "<memory>");
|
||||
setup_app_data(C, bfd, "<memory>");
|
||||
} else {
|
||||
error("Loading failed: %s", BLO_bre_as_string(bre));
|
||||
}
|
||||
@ -529,7 +533,7 @@ static ListBase undobase={NULL, NULL};
|
||||
static UndoElem *curundo= NULL;
|
||||
|
||||
|
||||
static int read_undosave(UndoElem *uel)
|
||||
static int read_undosave(bContext *C, UndoElem *uel)
|
||||
{
|
||||
char scestr[FILE_MAXDIR+FILE_MAXFILE];
|
||||
int success=0, fileflags;
|
||||
@ -539,9 +543,9 @@ static int read_undosave(UndoElem *uel)
|
||||
G.fileflags |= G_FILE_NO_UI;
|
||||
|
||||
if(UNDO_DISK)
|
||||
success= BKE_read_file(uel->str, NULL);
|
||||
success= BKE_read_file(C, uel->str, NULL);
|
||||
else
|
||||
success= BKE_read_file_from_memfile(&uel->memfile);
|
||||
success= BKE_read_file_from_memfile(C, &uel->memfile);
|
||||
|
||||
/* restore */
|
||||
strcpy(G.sce, scestr);
|
||||
@ -551,7 +555,7 @@ static int read_undosave(UndoElem *uel)
|
||||
}
|
||||
|
||||
/* name can be a dynamic string */
|
||||
void BKE_write_undo(char *name)
|
||||
void BKE_write_undo(bContext *C, char *name)
|
||||
{
|
||||
int nr, success;
|
||||
UndoElem *uel;
|
||||
@ -604,7 +608,7 @@ void BKE_write_undo(char *name)
|
||||
sprintf(numstr, "%d.blend", counter);
|
||||
BLI_make_file_string("/", tstr, U.tempdir, numstr);
|
||||
|
||||
success= BLO_write_file(tstr, G.fileflags, &err);
|
||||
success= BLO_write_file(C, tstr, G.fileflags, &err);
|
||||
|
||||
strcpy(curundo->str, tstr);
|
||||
}
|
||||
@ -614,17 +618,17 @@ void BKE_write_undo(char *name)
|
||||
|
||||
if(curundo->prev) prevfile= &(curundo->prev->memfile);
|
||||
|
||||
success= BLO_write_file_mem(prevfile, &curundo->memfile, G.fileflags, &err);
|
||||
success= BLO_write_file_mem(C, prevfile, &curundo->memfile, G.fileflags, &err);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/* 1= an undo, -1 is a redo. we have to make sure 'curundo' remains at current situation */
|
||||
void BKE_undo_step(int step)
|
||||
void BKE_undo_step(bContext *C, int step)
|
||||
{
|
||||
|
||||
if(step==0) {
|
||||
read_undosave(curundo);
|
||||
read_undosave(C, curundo);
|
||||
}
|
||||
else if(step==1) {
|
||||
/* curundo should never be NULL, after restart or load file it should call undo_save */
|
||||
@ -632,7 +636,7 @@ void BKE_undo_step(int step)
|
||||
else {
|
||||
if(G.f & G_DEBUG) printf("undo %s\n", curundo->name);
|
||||
curundo= curundo->prev;
|
||||
read_undosave(curundo);
|
||||
read_undosave(C, curundo);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -641,7 +645,7 @@ void BKE_undo_step(int step)
|
||||
|
||||
if(curundo==NULL || curundo->next==NULL) error("No redo available");
|
||||
else {
|
||||
read_undosave(curundo->next);
|
||||
read_undosave(C, curundo->next);
|
||||
curundo= curundo->next;
|
||||
if(G.f & G_DEBUG) printf("redo %s\n", curundo->name);
|
||||
}
|
||||
@ -663,7 +667,7 @@ void BKE_reset_undo(void)
|
||||
}
|
||||
|
||||
/* based on index nr it does a restore */
|
||||
void BKE_undo_number(int nr)
|
||||
void BKE_undo_number(bContext *C, int nr)
|
||||
{
|
||||
UndoElem *uel;
|
||||
int a=1;
|
||||
@ -672,7 +676,7 @@ void BKE_undo_number(int nr)
|
||||
if(a==nr) break;
|
||||
}
|
||||
curundo= uel;
|
||||
BKE_undo_step(0);
|
||||
BKE_undo_step(C, 0);
|
||||
}
|
||||
|
||||
char *BKE_undo_menu_string(void)
|
||||
|
@ -531,6 +531,7 @@ static void mesh_create_shadedColors(Render *re, Object *ob, int onlyForMesh, un
|
||||
}
|
||||
|
||||
for (i=0; i<totface; i++) {
|
||||
extern Material defmaterial; /* material.c */
|
||||
MFace *mf= &mface[i];
|
||||
Material *ma= give_current_material(ob, mf->mat_nr+1);
|
||||
int j, vidx[4], nverts= mf->v4?4:3;
|
||||
@ -642,6 +643,8 @@ void shadeDispList(Base *base)
|
||||
dl= cu->disp.first;
|
||||
|
||||
while(dl) {
|
||||
extern Material defmaterial; /* material.c */
|
||||
|
||||
dlob= MEM_callocN(sizeof(DispList), "displistshade");
|
||||
BLI_addtail(&ob->disp, dlob);
|
||||
dlob->type= DL_VERTCOL;
|
||||
@ -712,6 +715,7 @@ void shadeDispList(Base *base)
|
||||
|
||||
if(dl->type==DL_INDEX4) {
|
||||
if(dl->nors) {
|
||||
extern Material defmaterial; /* material.c */
|
||||
|
||||
if(dl->col1) MEM_freeN(dl->col1);
|
||||
col1= dl->col1= MEM_mallocN(sizeof(int)*dl->nr, "col1");
|
||||
|
@ -60,7 +60,6 @@
|
||||
#include "BKE_action.h"
|
||||
#include "BKE_anim.h" /* needed for where_on_path */
|
||||
#include "BKE_armature.h"
|
||||
#include "BKE_bad_level_calls.h"
|
||||
#include "BKE_blender.h"
|
||||
#include "BKE_constraint.h"
|
||||
#include "BKE_deform.h"
|
||||
@ -94,7 +93,10 @@
|
||||
#include <string.h>
|
||||
#endif // DISABLE_ELBEEM
|
||||
|
||||
#include "BIF_screen.h"
|
||||
|
||||
/* temporal struct, used for reading return of mesh_get_mapped_verts_nors() */
|
||||
|
||||
typedef struct VeNoCo {
|
||||
float co[3], no[3];
|
||||
} VeNoCo;
|
||||
|
@ -73,6 +73,8 @@
|
||||
|
||||
struct SelBox *selboxes= NULL;
|
||||
|
||||
static ListBase ttfdata= {NULL, NULL};
|
||||
|
||||
/* UTF-8 <-> wchar transformations */
|
||||
void
|
||||
chtoutf8(unsigned long c, char *o)
|
||||
@ -253,6 +255,37 @@ static PackedFile *get_builtin_packedfile(void)
|
||||
}
|
||||
}
|
||||
|
||||
void free_ttfont(void)
|
||||
{
|
||||
struct TmpFont *tf;
|
||||
|
||||
tf= ttfdata.first;
|
||||
while(tf) {
|
||||
freePackedFile(tf->pf);
|
||||
tf->pf= NULL;
|
||||
tf->vfont= NULL;
|
||||
tf= tf->next;
|
||||
}
|
||||
BLI_freelistN(&ttfdata);
|
||||
}
|
||||
|
||||
struct TmpFont *vfont_find_tmpfont(VFont *vfont)
|
||||
{
|
||||
struct TmpFont *tmpfnt = NULL;
|
||||
|
||||
if(vfont==NULL) return NULL;
|
||||
|
||||
// Try finding the font from font list
|
||||
tmpfnt = ttfdata.first;
|
||||
while(tmpfnt)
|
||||
{
|
||||
if(tmpfnt->vfont == vfont)
|
||||
break;
|
||||
tmpfnt = tmpfnt->next;
|
||||
}
|
||||
return tmpfnt;
|
||||
}
|
||||
|
||||
static VFontData *vfont_get_data(VFont *vfont)
|
||||
{
|
||||
struct TmpFont *tmpfnt = NULL;
|
||||
@ -261,14 +294,7 @@ static VFontData *vfont_get_data(VFont *vfont)
|
||||
if(vfont==NULL) return NULL;
|
||||
|
||||
// Try finding the font from font list
|
||||
tmpfnt = G.ttfdata.first;
|
||||
|
||||
while(tmpfnt)
|
||||
{
|
||||
if(tmpfnt->vfont == vfont)
|
||||
break;
|
||||
tmpfnt = tmpfnt->next;
|
||||
}
|
||||
tmpfnt = vfont_find_tmpfont(vfont);
|
||||
|
||||
// And then set the data
|
||||
if (!vfont->data) {
|
||||
@ -292,7 +318,7 @@ static VFontData *vfont_get_data(VFont *vfont)
|
||||
tmpfnt= (struct TmpFont *) MEM_callocN(sizeof(struct TmpFont), "temp_font");
|
||||
tmpfnt->pf= tpf;
|
||||
tmpfnt->vfont= vfont;
|
||||
BLI_addtail(&G.ttfdata, tmpfnt);
|
||||
BLI_addtail(&ttfdata, tmpfnt);
|
||||
}
|
||||
} else {
|
||||
pf= newPackedFile(vfont->name);
|
||||
@ -305,7 +331,7 @@ static VFontData *vfont_get_data(VFont *vfont)
|
||||
tmpfnt= (struct TmpFont *) MEM_callocN(sizeof(struct TmpFont), "temp_font");
|
||||
tmpfnt->pf= tpf;
|
||||
tmpfnt->vfont= vfont;
|
||||
BLI_addtail(&G.ttfdata, tmpfnt);
|
||||
BLI_addtail(&ttfdata, tmpfnt);
|
||||
}
|
||||
}
|
||||
if(!pf) {
|
||||
@ -385,7 +411,7 @@ VFont *load_vfont(char *name)
|
||||
tmpfnt= (struct TmpFont *) MEM_callocN(sizeof(struct TmpFont), "temp_font");
|
||||
tmpfnt->pf= tpf;
|
||||
tmpfnt->vfont= vfont;
|
||||
BLI_addtail(&G.ttfdata, tmpfnt);
|
||||
BLI_addtail(&ttfdata, tmpfnt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,10 @@
|
||||
* ***** END GPL/BL DUAL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "DNA_listBase.h"
|
||||
#include "DNA_ID.h"
|
||||
|
||||
@ -40,10 +44,6 @@
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define BSTR_EQ(a, b) (*(a) == *(b) && !strcmp(a, b))
|
||||
|
||||
/* IDPropertyTemplate is a union in DNA_ID.h */
|
||||
|
@ -54,6 +54,7 @@
|
||||
#include "DNA_scene_types.h"
|
||||
#include "DNA_camera_types.h"
|
||||
#include "DNA_texture_types.h"
|
||||
#include "DNA_sequence_types.h"
|
||||
#include "DNA_userdef_types.h"
|
||||
|
||||
#include "BLI_arithb.h"
|
||||
@ -77,14 +78,12 @@
|
||||
|
||||
#include "RE_pipeline.h"
|
||||
|
||||
/* bad level; call to free_realtime_image */
|
||||
#include "BKE_bad_level_calls.h"
|
||||
|
||||
/* for stamp drawing to an image */
|
||||
#include "BMF_Api.h"
|
||||
|
||||
#include "blendef.h"
|
||||
#include "BSE_time.h"
|
||||
#include "BDR_drawmesh.h"
|
||||
|
||||
/* max int, to indicate we don't store sequences in ibuf */
|
||||
#define IMA_NO_INDEX 0x7FEFEFEF
|
||||
@ -812,8 +811,8 @@ static void stampdata(StampData *stamp_data, int do_prefix)
|
||||
}
|
||||
|
||||
if (G.scene->r.stamp & R_STAMP_NOTE) {
|
||||
if (do_prefix) sprintf(stamp_data->note, "Note %s", G.scene->r.stamp_udata);
|
||||
else sprintf(stamp_data->note, "%s", G.scene->r.stamp_udata);
|
||||
/* Never do prefix for Note */
|
||||
sprintf(stamp_data->note, "%s", G.scene->r.stamp_udata);
|
||||
} else {
|
||||
stamp_data->note[0] = '\0';
|
||||
}
|
||||
|
@ -79,7 +79,7 @@
|
||||
#include "DNA_effect_types.h"
|
||||
#include "DNA_brush_types.h"
|
||||
#include "DNA_particle_types.h"
|
||||
#include "BKE_particle.h"
|
||||
#include "DNA_windowmanager_types.h"
|
||||
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_dynstr.h"
|
||||
@ -113,6 +113,7 @@
|
||||
#include "BKE_effect.h"
|
||||
#include "BKE_brush.h"
|
||||
#include "BKE_idprop.h"
|
||||
#include "BKE_particle.h"
|
||||
|
||||
#include "BPI_script.h"
|
||||
|
||||
@ -198,6 +199,8 @@ ListBase *wich_libbase(Main *mainlib, short type)
|
||||
return &(mainlib->brush);
|
||||
case ID_PA:
|
||||
return &(mainlib->particle);
|
||||
case ID_WM:
|
||||
return &(mainlib->wm);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -265,10 +268,11 @@ int set_listbasepointers(Main *main, ListBase **lb)
|
||||
lb[24]= &(main->object);
|
||||
lb[25]= &(main->scene);
|
||||
lb[26]= &(main->library);
|
||||
lb[27]= &(main->wm);
|
||||
|
||||
lb[27]= NULL;
|
||||
lb[28]= NULL;
|
||||
|
||||
return 27;
|
||||
return 28;
|
||||
}
|
||||
|
||||
/* *********** ALLOC AND FREE *****************
|
||||
@ -367,6 +371,9 @@ static ID *alloc_libblock_notest(short type)
|
||||
case ID_PA:
|
||||
id = MEM_callocN(sizeof(ParticleSettings), "ParticleSettings");
|
||||
break;
|
||||
case ID_WM:
|
||||
id = MEM_callocN(sizeof(wmWindowManager), "Window manager");
|
||||
break;
|
||||
}
|
||||
return id;
|
||||
}
|
||||
@ -427,6 +434,13 @@ static void free_library(Library *lib)
|
||||
/* no freeing needed for libraries yet */
|
||||
}
|
||||
|
||||
static void (*free_windowmanager_cb)(bContext *, wmWindowManager *)= NULL;
|
||||
|
||||
void set_free_windowmanager_cb(void (*func)(bContext *C, wmWindowManager *) )
|
||||
{
|
||||
free_windowmanager_cb= func;
|
||||
}
|
||||
|
||||
/* used in headerbuttons.c image.c mesh.c screen.c sound.c and library.c */
|
||||
void free_libblock(ListBase *lb, void *idv)
|
||||
{
|
||||
@ -514,6 +528,10 @@ void free_libblock(ListBase *lb, void *idv)
|
||||
case ID_PA:
|
||||
psys_free_settings((ParticleSettings *)id);
|
||||
break;
|
||||
case ID_WM:
|
||||
if(free_windowmanager_cb)
|
||||
free_windowmanager_cb(NULL, (wmWindowManager *)id);
|
||||
break;
|
||||
}
|
||||
|
||||
if (id->properties) {
|
||||
|
@ -285,6 +285,7 @@ int is_basis_mball(Object *ob)
|
||||
*/
|
||||
Object *find_basis_mball(Object *basis)
|
||||
{
|
||||
extern ListBase editelems; /* editmball.c */
|
||||
Base *base;
|
||||
Object *ob,*bob= basis;
|
||||
MetaElem *ml=NULL;
|
||||
@ -1423,6 +1424,7 @@ void polygonize(PROCESS *mbproc, MetaBall *mb)
|
||||
|
||||
float init_meta(Object *ob) /* return totsize */
|
||||
{
|
||||
extern ListBase editelems; /* editmball.c */
|
||||
Base *base;
|
||||
Object *bob;
|
||||
MetaBall *mb;
|
||||
|
@ -101,6 +101,10 @@
|
||||
|
||||
#include "RE_shader_ext.h"
|
||||
|
||||
#include "BIF_meshlaplacian.h"
|
||||
#include "BIF_space.h"
|
||||
#include "mydevice.h"
|
||||
|
||||
/***/
|
||||
|
||||
static int noneModifier_isDisabled(ModifierData *md)
|
||||
|
@ -80,6 +80,7 @@
|
||||
#include "BKE_cdderivedmesh.h"
|
||||
|
||||
#include "blendef.h"
|
||||
#include "BIF_editparticle.h"
|
||||
#include "RE_render_ext.h"
|
||||
|
||||
static void key_from_object(Object *ob, ParticleKey *key);
|
||||
|
@ -40,7 +40,6 @@
|
||||
#include <string.h>
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "nla.h" /* For __NLA: Important, do not remove */
|
||||
#include "DNA_text_types.h"
|
||||
#include "DNA_controller_types.h"
|
||||
#include "DNA_sensor_types.h"
|
||||
@ -55,6 +54,8 @@
|
||||
#include "BKE_blender.h"
|
||||
#include "BKE_sca.h"
|
||||
|
||||
#include "mydevice.h"
|
||||
|
||||
void free_text_controllers(Text *txt)
|
||||
{
|
||||
Object *ob;
|
||||
|
@ -3,15 +3,12 @@
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* ***** BEGIN GPL/BL DUAL LICENSE BLOCK *****
|
||||
* ***** BEGIN GP LICENSE BLOCK *****
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version. The Blender
|
||||
* Foundation also sells licenses for use in proprietary software under
|
||||
* the Blender License. See http://www.blender.org/BL/ for information
|
||||
* about this.
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -29,7 +26,7 @@
|
||||
*
|
||||
* Contributor(s): none yet.
|
||||
*
|
||||
* ***** END GPL/BL DUAL LICENSE BLOCK *****
|
||||
* ***** END GPL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
@ -49,7 +46,7 @@
|
||||
/* don't free screen itself */
|
||||
void free_screen(bScreen *sc)
|
||||
{
|
||||
unlink_screen(sc);
|
||||
unlink_screen(sc); /* bad level call */
|
||||
|
||||
BLI_freelistN(&sc->vertbase);
|
||||
BLI_freelistN(&sc->edgebase);
|
||||
|
@ -699,7 +699,7 @@ void make_local_texture(Tex *tex)
|
||||
|
||||
void autotexname(Tex *tex)
|
||||
{
|
||||
/* extern char texstr[20][12]; *//* buttons.c, already in bad lev calls*/
|
||||
extern char texstr[20][12]; /* buttons.c */
|
||||
Image *ima;
|
||||
char di[FILE_MAXDIR], fi[FILE_MAXFILE];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user