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().
40 lines
788 B
C++
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
|