Get the latest Blender, older versions, or experimental builds.
Stay up-to-date with the new features in the latest Blender releases.
Access production assets and knowledge from the open movies.
Documentation on the usage and features in Blender.
Latest development updates, by Blender developers.
Guidelines, release notes and development docs.
A platform to collect and share results of the Blender Benchmark.
The yearly event that brings the community together.
Support core development with a monthly contribution.
Perform a single donation with more payment options available.
#ifndef __EXPORT_PLUGIN_H
#define __EXPORT_PLUGIN_H
#include"yafray_Render.h"
#include"yafexternal.h"
extern "C"
{
#include"PIL_dynlib.h"
}
class yafrayPluginRender_t : public yafrayRender_t
public:
yafrayPluginRender_t()
handle=NULL;
#ifdef WIN32
corehandle=NULL;
#endif
yafrayGate=NULL;
virtual ~yafrayPluginRender_t();
protected:
std::string imgout;
PILdynlib *handle;
PILdynlib *corehandle;
yafray::yafrayInterface_t *yafrayGate;
void displayImage();
virtual void writeTextures();
virtual void writeShader(const std::string &shader_name, Material* matr, const std::string &facetexname="");
virtual void writeMaterialsAndModulators();
virtual void writeObject(Object* obj,
const std::vector<VlakRen*> &VLR_list, const float obmat[4][4]);
virtual void writeAllObjects();
virtual void writeAreaLamp(LampRen* lamp, int num, float iview[4][4]);
virtual void writeLamps();
virtual void writeCamera();
virtual void writeHemilight();
virtual void writePathlight();
virtual bool writeWorld();
virtual bool writeRender();
virtual bool initExport();
virtual bool finishExport();
void genUVcoords(std::vector<yafray::GFLOAT> &uvcoords,VlakRen *vlr,TFace* uvc, bool comple=false);
void genVcol(std::vector<yafray::CFLOAT> &vcol, VlakRen *vlr, bool comple=false);
void genFace(std::vector<int> &faces,std::vector<std::string> &shaders,std::vector<int> &faceshader,
std::vector<yafray::GFLOAT> &uvcoords,std::vector<yafray::CFLOAT> &vcol,
std::map<VertRen*, int> &vert_idx,VlakRen *vlr,
bool has_orco,bool has_uv);
void genCompleFace(std::vector<int> &faces,/*std::vector<std::string> &shaders,*/std::vector<int> &faceshader,
void genVertices(std::vector<yafray::point3d_t> &verts, int &vidx,
std::map<VertRen*, int> &vert_idx, VlakRen* vlr, bool has_orco, Object* obj);
};
class blenderYafrayOutput_t : public yafray::colorOutput_t
blenderYafrayOutput_t() {out=0;};
virtual ~blenderYafrayOutput_t() {};
virtual bool putPixel(int x, int y,const yafray::color_t &c,
yafray::CFLOAT alpha=0,yafray::PFLOAT depth=0);
virtual void flush() {};
int out;