This repository has been archived on 2023-10-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
blender-archive/source/blender/yafray/intern/export_Plugin.h
Alfredo de Greef f32b8e6b7f added support for ortho camera (needs yafray from cvs)
When using xml export, yafray will now render the alpha channel as well when 'RGBA' button in blender is enabled (Plugin does this automatically).
In plugin code, fixed smooth shading bug for non-mesh objects.
Relative paths for textures are now recognized (plugin & xml).
Fixed problem with duplicate objects (plugin & xml).
Really old bug, sun position is now correct (plugin & xml).
World background now can also be a regular image texture (jpeg & tga), but for now always assumes spheremapping, which is not the same as Blender either. In yafray the texture is assumed to be a full 360 (panorama type) map.
convertBlenderScene.c cleanup, the identity transform 'hack' is removed.
THIS AFFECTS ALL EXTERNAL RENDERERS (Aqsis and others) WHICH RELY ON THE RENDERDATA OUTPUT, VERTICES AND LAMPCOORDINATES/VECTORS NOW NEED TO BE TRANSFORMED BACK TO WORLD COORDINATES. See yafray plugin/export code.
2004-07-12 03:20:31 +00:00

77 lines
2.3 KiB
C++

#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;
#ifdef WIN32
PILdynlib *corehandle;
#endif
yafray::yafrayInterface_t *yafrayGate;
void displayImage();
virtual void writeTextures();
virtual void writeMaterialsAndModulators();
virtual void writeObject(Object* obj,
const std::vector<VlakRen*> &VLR_list, const float obmat[4][4]);
virtual void writeAllObjects();
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);
void genCompleUVcoords(std::vector<yafray::GFLOAT> &uvcoords,/*VlakRen *vlr,*/TFace* uvc);
void genVcol(std::vector<yafray::CFLOAT> &vcol,VlakRen *vlr,
int p1,int p2,int p3,bool EXPORT_VCOL);
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,bool has_vcol);
void genCompleFace(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,bool has_vcol);
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
{
public:
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() {};
protected:
int out;
};
#endif