diff options
author | Alejandro Conty Estevez <conty@yafray.org> | 2004-01-05 17:53:56 +0300 |
---|---|---|
committer | Alejandro Conty Estevez <conty@yafray.org> | 2004-01-05 17:53:56 +0300 |
commit | 092c6fd1bb3d0a3143368d8fb7cb42ad93589a0c (patch) | |
tree | eb30bea5dcc3251d8cf1b58dc855d5fe5dc07ab8 | |
parent | 20d64f4b8d6996c187b409ce9c7e69bf5aaa7e99 (diff) |
Yafray export code moved to source/blender/yafray to keep blender/src pure C
code. Now all the cpp code is in intern under yafray and the api include
file is just plain C
Also changed old include in initrender.c and updated Makefiles.am and configure.ac
so the new dirs are taken into account.
-rw-r--r-- | source/blender/render/intern/source/initrender.c | 2 | ||||
-rw-r--r-- | source/blender/yafray/YafRay_Api.h | 16 | ||||
-rw-r--r-- | source/blender/yafray/intern/yafray_Render.cpp (renamed from source/blender/src/yafray_Render.cpp) | 11 | ||||
-rw-r--r-- | source/blender/yafray/intern/yafray_Render.h (renamed from source/blender/include/yafray_Render.h) | 13 |
4 files changed, 26 insertions, 16 deletions
diff --git a/source/blender/render/intern/source/initrender.c b/source/blender/render/intern/source/initrender.c index 023d02e823d..81f5cb4e6f6 100644 --- a/source/blender/render/intern/source/initrender.c +++ b/source/blender/render/intern/source/initrender.c @@ -102,7 +102,7 @@ #include "initrender.h" /* yafray: include for yafray export/render */ -#include "yafray_Render.h" +#include "YafRay_Api.h" /* Some crud :/ */ #define ELEM3(a, b, c, d) ( ELEM(a, b, c) || (a)==(d) ) diff --git a/source/blender/yafray/YafRay_Api.h b/source/blender/yafray/YafRay_Api.h new file mode 100644 index 00000000000..f36a0b3df0d --- /dev/null +++ b/source/blender/yafray/YafRay_Api.h @@ -0,0 +1,16 @@ +#ifndef __YAFRAY_API_H +#define __YAFRAY_API_H + +/* C interface for Blender */ +#ifdef __cplusplus +extern "C" { +#endif +int YAF_exportScene(); +void YAF_displayImage(); +void YAF_addDupliMtx(Object* obj); +int YAF_objectKnownData(Object* obj); +#ifdef __cplusplus +} +#endif + +#endif diff --git a/source/blender/src/yafray_Render.cpp b/source/blender/yafray/intern/yafray_Render.cpp index 12ccde289e6..6f759cd81f9 100644 --- a/source/blender/src/yafray_Render.cpp +++ b/source/blender/yafray/intern/yafray_Render.cpp @@ -5,6 +5,7 @@ //---------------------------------------------------------------------------------------------------- #include "yafray_Render.h" + #include <math.h> using namespace std; @@ -118,7 +119,12 @@ bool yafrayRender_t::exportScene() string yfr = "yafray " + xmlpath; if(system(yfr.c_str())==0) displayImage(); - else cout<<"Could not execute yafray. Is it in path?"; + else + { + G.afbreek=1; //stop render and anim if doing so + cout<<"Could not execute yafray. Is it in path?"<<endl; + return false; + } return true; @@ -1197,7 +1203,8 @@ bool yafrayRender_t::writeWorld() yafrayRender_t YAFBLEND; -extern "C" { +extern "C" +{ int YAF_exportScene() { return (int)YAFBLEND.exportScene(); } void YAF_displayImage() { YAFBLEND.displayImage(); } diff --git a/source/blender/include/yafray_Render.h b/source/blender/yafray/intern/yafray_Render.h index 79abbbd6087..da3ae40714d 100644 --- a/source/blender/include/yafray_Render.h +++ b/source/blender/yafray/intern/yafray_Render.h @@ -116,17 +116,4 @@ extern yafrayRender_t YAFBLEND; #endif -/* C interface for Blender */ -#ifdef __cplusplus -extern "C" { -#endif -int YAF_exportScene(); -void YAF_displayImage(); -void YAF_addDupliMtx(Object* obj); -int YAF_objectKnownData(Object* obj); -#ifdef __cplusplus -} -#endif - - #endif /*__YAFRAY_RENDER_H */ |