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 25ce805a58 * Implemented the basic stroke rendering functionality for the new
Parameter Editor mode.  This is a WIP commit.  Only the base line
color, base alpha transparency, and base line thickness are respected.
More additions are anticipated to account for other parameters.

* Added FRS_finish_stroke_rendering() to clean Freestyle-related
temporary resources after stroke rendering.

* Some functions in FRS_freestyle.cpp are now declared as static
functions, so as not to mess up the program-wide name space.

* Made the StyleModule class inheritable, and defined new subclass
BlenderStyleModule that takes a Text object instead of a file name.
2010-07-26 01:23:27 +00:00

40 lines
780 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() {
unlink_text(G.main, _text);
free_libblock(&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