This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-archive/source/blender/freestyle/intern/blender_interface/BlenderStyleModule.h
Tamito Kajiyama 8925ed1420 Merged changes in the trunk up to revision 46557.
Conflicts resolved:
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/animation/anim_channels_defines.c
source/blender/makesrna/intern/rna_scene.c

Additional changes:
* Fix for recent changes of BKE_* function renaming.
* Fix for an "attempt to free NULL pointer" in BlenderStrokeRenderer::RenderStrokeRepBasic().
2012-05-11 22:48:41 +00:00

40 lines
788 B
C++

#ifndef BLENDERSTYLEMODULE_H
#define BLENDERSTYLEMODULE_H
#include "../stroke/StyleModule.h"
#include "../system/PythonInterpreter.h"
extern "C" {
#include "BKE_global.h"
#include "BKE_library.h"
#include "BKE_text.h"
}
class BlenderStyleModule : public StyleModule
{
public:
BlenderStyleModule(struct Text *text, const string &name,
Interpreter *inter) : StyleModule(name, inter) {
_text = text;
}
virtual ~BlenderStyleModule() {
BKE_text_unlink(G.main, _text);
BKE_libblock_free(&G.main->text, _text);
}
protected:
virtual int interpret() {
PythonInterpreter* py_inter = dynamic_cast<PythonInterpreter*>(_inter);
assert(py_inter != 0);
return py_inter->interpretText(_text, getFileName());
}
private:
struct Text *_text;
};
#endif // BLENDERSTYLEMODULE_H