This commit is contained in:
2011-05-11 00:19:13 +00:00
38 changed files with 209 additions and 99 deletions

View File

@@ -38,7 +38,7 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux")
include(build_files/cmake/RpmBuild.cmake) include(build_files/cmake/RpmBuild.cmake)
if(RPMBUILD_FOUND AND NOT WIN32) if(RPMBUILD_FOUND AND NOT WIN32)
set(CPACK_GENERATOR "RPM") set(CPACK_GENERATOR "RPM")
set(CPACK_RPM_PACKAGE_RELEASE "r${BUILD_REV}") set(CPACK_RPM_PACKAGE_RELEASE "1.r${BUILD_REV}")
set(CPACK_SET_DESTDIR "true") set(CPACK_SET_DESTDIR "true")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_DESCRIPTION}") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_DESCRIPTION}")
set(CPACK_PACKAGE_RELOCATABLE "false") set(CPACK_PACKAGE_RELOCATABLE "false")

View File

@@ -5,7 +5,7 @@ BuildRoot: @CPACK_RPM_DIRECTORY@/@CPACK_PACKAGE_FILE_NAME@@CPACK_RPM_PACKAG
Summary: @CPACK_RPM_PACKAGE_SUMMARY@ Summary: @CPACK_RPM_PACKAGE_SUMMARY@
Name: @CPACK_RPM_PACKAGE_NAME@ Name: @CPACK_RPM_PACKAGE_NAME@
Version: @CPACK_RPM_PACKAGE_VERSION@ Version: @CPACK_RPM_PACKAGE_VERSION@
Release: @CPACK_RPM_PACKAGE_RELEASE@ Release: @CPACK_RPM_PACKAGE_RELEASE@%{?dist}
License: @CPACK_RPM_PACKAGE_LICENSE@ License: @CPACK_RPM_PACKAGE_LICENSE@
Group: @CPACK_RPM_PACKAGE_GROUP@ Group: @CPACK_RPM_PACKAGE_GROUP@
Vendor: @CPACK_RPM_PACKAGE_VENDOR@ Vendor: @CPACK_RPM_PACKAGE_VENDOR@

View File

@@ -52,6 +52,9 @@
#ifndef RID_INPUT #ifndef RID_INPUT
#define RID_INPUT 0x10000003 #define RID_INPUT 0x10000003
#endif #endif
#ifndef RIM_INPUTSINK
#define RIM_INPUTSINK 0x1
#endif
#ifndef RI_KEY_BREAK #ifndef RI_KEY_BREAK
#define RI_KEY_BREAK 0x1 #define RI_KEY_BREAK 0x1
#endif #endif

View File

@@ -127,6 +127,7 @@ class DATA_PT_camera_display(CameraButtonsPanel, bpy.types.Panel):
col.prop(cam, "show_mist", text="Mist") col.prop(cam, "show_mist", text="Mist")
col.prop(cam, "show_title_safe", text="Title Safe") col.prop(cam, "show_title_safe", text="Title Safe")
col.prop(cam, "show_name", text="Name") col.prop(cam, "show_name", text="Name")
col.prop_menu_enum(cam, "show_guide")
col = split.column() col = split.column()
col.prop(cam, "draw_size", text="Size") col.prop(cam, "draw_size", text="Size")

View File

@@ -51,6 +51,7 @@
#include "BLF_api.h" #include "BLF_api.h"
#include "blf_internal_types.h" #include "blf_internal_types.h"
#include "blf_internal.h"
static ListBase global_font_dir= { NULL, NULL }; static ListBase global_font_dir= { NULL, NULL };
@@ -150,6 +151,7 @@ char *blf_dir_search(const char *file)
return(s); return(s);
} }
#if 0 // UNUSED
int blf_dir_split(const char *str, char *file, int *size) int blf_dir_split(const char *str, char *file, int *size)
{ {
int i, len; int i, len;
@@ -173,6 +175,7 @@ int blf_dir_split(const char *str, char *file, int *size)
} }
return(0); return(0);
} }
#endif
/* Some font have additional file with metrics information, /* Some font have additional file with metrics information,
* in general, the extension of the file is: .afm or .pfm * in general, the extension of the file is: .afm or .pfm

View File

@@ -44,7 +44,7 @@ int blf_utf8_next(unsigned char *buf, int *iindex);
char *blf_dir_search(const char *file); char *blf_dir_search(const char *file);
char *blf_dir_metrics_search(const char *filename); char *blf_dir_metrics_search(const char *filename);
int blf_dir_split(const char *str, char *file, int *size); // int blf_dir_split(const char *str, char *file, int *size); // UNUSED
int blf_font_init(void); int blf_font_init(void);
void blf_font_exit(void); void blf_font_exit(void);

View File

@@ -72,6 +72,8 @@
#include "ED_curve.h" /* for BKE_curve_nurbs */ #include "ED_curve.h" /* for BKE_curve_nurbs */
extern Material defmaterial; /* material.c */
static void boundbox_displist(Object *ob); static void boundbox_displist(Object *ob);
void free_disp_elem(DispList *dl) void free_disp_elem(DispList *dl)
@@ -552,7 +554,6 @@ static void mesh_create_shadedColors(Render *re, Object *ob, int onlyForMesh, un
} }
for (i=0; i<totface; i++) { for (i=0; i<totface; i++) {
extern Material defmaterial; /* material.c */
MFace *mf= &mface[i]; MFace *mf= &mface[i];
Material *ma= give_current_material(ob, mf->mat_nr+1); Material *ma= give_current_material(ob, mf->mat_nr+1);
int j, vidx[4], nverts= mf->v4?4:3; int j, vidx[4], nverts= mf->v4?4:3;
@@ -664,8 +665,6 @@ void shadeDispList(Scene *scene, Base *base)
dl= ob->disp.first; dl= ob->disp.first;
while(dl) { while(dl) {
extern Material defmaterial; /* material.c */
dlob= MEM_callocN(sizeof(DispList), "displistshade"); dlob= MEM_callocN(sizeof(DispList), "displistshade");
BLI_addtail(&ob->disp, dlob); BLI_addtail(&ob->disp, dlob);
dlob->type= DL_VERTCOL; dlob->type= DL_VERTCOL;
@@ -734,8 +733,6 @@ void shadeDispList(Scene *scene, Base *base)
if(dl->type==DL_INDEX4) { if(dl->type==DL_INDEX4) {
if(dl->nors) { if(dl->nors) {
extern Material defmaterial; /* material.c */
if(dl->col1) MEM_freeN(dl->col1); if(dl->col1) MEM_freeN(dl->col1);
col1= dl->col1= MEM_mallocN(sizeof(int)*dl->nr, "col1"); col1= dl->col1= MEM_mallocN(sizeof(int)*dl->nr, "col1");

View File

@@ -1929,9 +1929,10 @@ static void give_parvert(Object *par, int nr, float *vec)
if(dm) { if(dm) {
MVert *mvert= dm->getVertArray(dm); MVert *mvert= dm->getVertArray(dm);
int *index = (int *)dm->getVertDataArray(dm, CD_ORIGINDEX); int *index = (int *)dm->getVertDataArray(dm, CD_ORIGINDEX);
int i, count = 0, vindex, numVerts = dm->getNumVerts(dm); int i, vindex, numVerts = dm->getNumVerts(dm);
/* get the average of all verts with (original index == nr) */ /* get the average of all verts with (original index == nr) */
count= 0;
for(i = 0; i < numVerts; i++) { for(i = 0; i < numVerts; i++) {
vindex= (index)? index[i]: i; vindex= (index)? index[i]: i;

View File

@@ -58,6 +58,8 @@ typedef unsigned long long r_uint64;
#define LOWSEED 0x330E #define LOWSEED 0x330E
extern unsigned char hash[]; // noise.c
/***/ /***/
struct RNG { struct RNG {
@@ -83,8 +85,6 @@ void rng_seed(RNG *rng, unsigned int seed) {
} }
void rng_srandom(RNG *rng, unsigned int seed) { void rng_srandom(RNG *rng, unsigned int seed) {
extern unsigned char hash[]; // noise.c
rng_seed(rng, seed + hash[seed & 255]); rng_seed(rng, seed + hash[seed & 255]);
seed= rng_getInt(rng); seed= rng_getInt(rng);
rng_seed(rng, seed + hash[seed & 255]); rng_seed(rng, seed + hash[seed & 255]);
@@ -180,8 +180,6 @@ static RNG rng_tab[BLENDER_MAX_THREADS];
void BLI_thread_srandom(int thread, unsigned int seed) void BLI_thread_srandom(int thread, unsigned int seed)
{ {
extern unsigned char hash[]; // noise.c
if(thread >= BLENDER_MAX_THREADS) if(thread >= BLENDER_MAX_THREADS)
thread= 0; thread= 0;

View File

@@ -6118,6 +6118,7 @@ int join_curve_exec(bContext *C, wmOperator *UNUSED(op))
mul_m4_v3(cmat, bezt->vec[2]); mul_m4_v3(cmat, bezt->vec[2]);
bezt++; bezt++;
} }
calchandlesNurb(newnu);
} }
if( (bp= newnu->bp) ) { if( (bp= newnu->bp) ) {
a= newnu->pntsu*nu->pntsv; a= newnu->pntsu*nu->pntsv;

View File

@@ -262,14 +262,12 @@ static int ui_is_a_warp_but(uiBut *but)
static int ui_is_utf8_but(uiBut *but) static int ui_is_utf8_but(uiBut *but)
{ {
if (but->rnaprop) { if (but->rnaprop) {
int subtype= RNA_property_subtype(but->rnaprop); const int subtype= RNA_property_subtype(but->rnaprop);
return !(ELEM3(subtype, PROP_FILEPATH, PROP_DIRPATH, PROP_FILENAME));
if(ELEM3(subtype, PROP_FILEPATH, PROP_DIRPATH, PROP_FILENAME)) { }
return TRUE; else {
} return !(but->flag & UI_BUT_NO_UTF8);
} }
return !(but->flag & UI_BUT_NO_UTF8);
} }
/* ********************** button apply/revert ************************/ /* ********************** button apply/revert ************************/
@@ -1679,7 +1677,7 @@ static void ui_textedit_begin(bContext *C, uiBut *but, uiHandleButtonData *data)
static void ui_textedit_end(bContext *C, uiBut *but, uiHandleButtonData *data) static void ui_textedit_end(bContext *C, uiBut *but, uiHandleButtonData *data)
{ {
if(but) { if(but) {
if(!ui_is_utf8_but(but)) { if(ui_is_utf8_but(but)) {
int strip= BLI_utf8_invalid_strip(but->editstr, strlen(but->editstr)); int strip= BLI_utf8_invalid_strip(but->editstr, strlen(but->editstr));
/* not a file?, strip non utf-8 chars */ /* not a file?, strip non utf-8 chars */
if(strip) { if(strip) {

View File

@@ -516,6 +516,7 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
mul_m4_v3(mat, bezt->vec[2]); mul_m4_v3(mat, bezt->vec[2]);
bezt->radius *= scale; bezt->radius *= scale;
} }
calchandlesNurb(nu);
} }
else { else {
a= nu->pntsu*nu->pntsv; a= nu->pntsu*nu->pntsv;

View File

@@ -111,7 +111,7 @@ int ED_operator_screenactive(bContext *C)
} }
/* XXX added this to prevent anim state to change during renders */ /* XXX added this to prevent anim state to change during renders */
int ED_operator_screenactive_norender(bContext *C) static int ED_operator_screenactive_norender(bContext *C)
{ {
if(G.rendering) return 0; if(G.rendering) return 0;
if(CTX_wm_window(C)==NULL) return 0; if(CTX_wm_window(C)==NULL) return 0;

View File

@@ -612,7 +612,7 @@ static int nlaedit_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *even
bAnimContext ac; bAnimContext ac;
Scene *scene; Scene *scene;
ARegion *ar; ARegion *ar;
View2D *v2d; // View2D *v2d; /*UNUSED*/
short selectmode; short selectmode;
int mval[2]; int mval[2];
@@ -623,7 +623,7 @@ static int nlaedit_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *even
/* get useful pointers from animation context data */ /* get useful pointers from animation context data */
scene= ac.scene; scene= ac.scene;
ar= ac.ar; ar= ac.ar;
v2d= &ar->v2d; // v2d= &ar->v2d;
/* get mouse coordinates (in region coordinates) */ /* get mouse coordinates (in region coordinates) */
mval[0]= (event->x - ar->winrct.xmin); mval[0]= (event->x - ar->winrct.xmin);

View File

@@ -921,6 +921,60 @@ void view3d_calc_camera_border(Scene *scene, ARegion *ar, RegionView3D *rv3d, Vi
} }
} }
static void drawviewborder_grid3(float x1, float x2, float y1, float y2, float fac, char diagonal)
{
float x3, y3, x4, y4;
x3= x1 + fac * (x2-x1);
y3= y1 + fac * (y2-y1);
x4= x1 + (1.0f - fac) * (x2-x1);
y4= y1 + (1.0f - fac) * (y2-y1);
glBegin(GL_LINES);
switch(diagonal) {
case '\0':
glVertex2f(x1, y3);
glVertex2f(x2, y3);
glVertex2f(x1, y4);
glVertex2f(x2, y4);
glVertex2f(x3, y1);
glVertex2f(x3, y2);
glVertex2f(x4, y1);
glVertex2f(x4, y2);
break;
case 'H': /* hoz */
glVertex2f(x1, y1);
glVertex2f(x2, y4);
glVertex2f(x1, y3);
glVertex2f(x2, y2);
glVertex2f(x2, y1);
glVertex2f(x1, y4);
glVertex2f(x2, y3);
glVertex2f(x1, y2);
break;
case 'V': /* vert */
glVertex2f(x1, y1);
glVertex2f(x4, y2);
glVertex2f(x3, y1);
glVertex2f(x2, y2);
glVertex2f(x1, y2);
glVertex2f(x4, y1);
glVertex2f(x3, y2);
glVertex2f(x2, y1);
break;
}
glEnd();
}
static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d) static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d)
{ {
float fac, a; float fac, a;
@@ -995,21 +1049,70 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d)
} }
/* safety border */ /* safety border */
if (ca && (ca->flag & CAM_SHOWTITLESAFE)) { if(ca) {
fac= 0.1; if (ca->dtx & CAM_DTX_CENTER) {
UI_ThemeColorBlendShade(TH_WIRE, TH_BACK, 0.25, 0);
a= fac*(x2-x1);
x1+= a; x3= x1+ 0.5f*(x2-x1);
x2-= a; y3= y1+ 0.5f*(y2-y1);
a= fac*(y2-y1); glBegin(GL_LINES);
y1+= a; glVertex2f(x1, y3);
y2-= a; glVertex2f(x2, y3);
UI_ThemeColorBlendShade(TH_WIRE, TH_BACK, 0.25, 0); glVertex2f(x3, y1);
glVertex2f(x3, y2);
uiSetRoundBox(15); glEnd();
uiDrawBox(GL_LINE_LOOP, x1, y1, x2, y2, 12.0); }
if (ca->dtx & CAM_DTX_CENTER_DIAG) {
UI_ThemeColorBlendShade(TH_WIRE, TH_BACK, 0.25, 0);
glBegin(GL_LINES);
glVertex2f(x1, y1);
glVertex2f(x2, y2);
glVertex2f(x1, y2);
glVertex2f(x2, y1);
glEnd();
}
if (ca->dtx & CAM_DTX_THIRDS) {
UI_ThemeColorBlendShade(TH_WIRE, TH_BACK, 0.25, 0);
drawviewborder_grid3(x1, x2, y1, y2, 1.0f/3.0f, '\0');
}
if (ca->dtx & CAM_DTX_GOLDEN) {
UI_ThemeColorBlendShade(TH_WIRE, TH_BACK, 0.25, 0);
drawviewborder_grid3(x1, x2, y1, y2, 1.0f-(1.0f/1.61803399), '\0');
}
if (ca->dtx & CAM_DTX_GOLDEN_DIAG_H) {
UI_ThemeColorBlendShade(TH_WIRE, TH_BACK, 0.25, 0);
drawviewborder_grid3(x1, x2, y1, y2, 1.0f-(1.0f/1.61803399), 'H');
}
if (ca->dtx & CAM_DTX_GOLDEN_DIAG_V) {
UI_ThemeColorBlendShade(TH_WIRE, TH_BACK, 0.25, 0);
drawviewborder_grid3(x1, x2, y1, y2, 1.0f-(1.0f/1.61803399), 'V');
}
if (ca->flag & CAM_SHOWTITLESAFE) {
fac= 0.1;
a= fac*(x2-x1);
x1+= a;
x2-= a;
a= fac*(y2-y1);
y1+= a;
y2-= a;
UI_ThemeColorBlendShade(TH_WIRE, TH_BACK, 0.25, 0);
uiSetRoundBox(15);
uiDrawBox(GL_LINE_LOOP, x1, y1, x2, y2, 12.0);
}
} }
setlinestyle(0); setlinestyle(0);

View File

@@ -72,6 +72,7 @@
#include "view3d_intern.h" #include "view3d_intern.h"
extern float originmat[3][3]; /* XXX object.c */
/* ************************************************** */ /* ************************************************** */
/* ********************* old transform stuff ******** */ /* ********************* old transform stuff ******** */
@@ -502,7 +503,6 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode)
static int snap_sel_to_grid(bContext *C, wmOperator *UNUSED(op)) static int snap_sel_to_grid(bContext *C, wmOperator *UNUSED(op))
{ {
extern float originmat[3][3]; /* XXX object.c */
Main *bmain= CTX_data_main(C); Main *bmain= CTX_data_main(C);
Object *obedit= CTX_data_edit_object(C); Object *obedit= CTX_data_edit_object(C);
Scene *scene= CTX_data_scene(C); Scene *scene= CTX_data_scene(C);
@@ -639,7 +639,6 @@ void VIEW3D_OT_snap_selected_to_grid(wmOperatorType *ot)
static int snap_sel_to_curs(bContext *C, wmOperator *UNUSED(op)) static int snap_sel_to_curs(bContext *C, wmOperator *UNUSED(op))
{ {
extern float originmat[3][3]; /* XXX object.c */
Main *bmain= CTX_data_main(C); Main *bmain= CTX_data_main(C);
Object *obedit= CTX_data_edit_object(C); Object *obedit= CTX_data_edit_object(C);
Scene *scene= CTX_data_scene(C); Scene *scene= CTX_data_scene(C);

View File

@@ -37,7 +37,6 @@
/* internal exports only */ /* internal exports only */
/* editmode_undo.c */ /* editmode_undo.c */
void undo_editmode_clear(void);
void undo_editmode_name(bContext *C, const char *undoname); void undo_editmode_name(bContext *C, const char *undoname);
int undo_editmode_valid(const char *undoname); int undo_editmode_valid(const char *undoname);

View File

@@ -529,7 +529,7 @@ int ED_uvedit_minmax(Scene *scene, Image *ima, Object *obedit, float *min, float
return sel; return sel;
} }
int ED_uvedit_median(Scene *scene, Image *ima, Object *obedit, float co[3]) static int ED_uvedit_median(Scene *scene, Image *ima, Object *obedit, float co[3])
{ {
BMEditMesh *em= ((Mesh*)obedit->data)->edit_btmesh; BMEditMesh *em= ((Mesh*)obedit->data)->edit_btmesh;
BMFace *efa; BMFace *efa;

View File

@@ -76,6 +76,8 @@
#include "smoke_API.h" #include "smoke_API.h"
extern Material defmaterial; /* from material.c */
/* These are some obscure rendering functions shared between the /* These are some obscure rendering functions shared between the
* game engine and the blender, in this module to avoid duplicaten * game engine and the blender, in this module to avoid duplicaten
* and abstract them away from the rest a bit */ * and abstract them away from the rest a bit */
@@ -951,7 +953,6 @@ static Material *gpu_active_node_material(Material *ma)
void GPU_begin_object_materials(View3D *v3d, RegionView3D *rv3d, Scene *scene, Object *ob, int glsl, int *do_alpha_pass) void GPU_begin_object_materials(View3D *v3d, RegionView3D *rv3d, Scene *scene, Object *ob, int glsl, int *do_alpha_pass)
{ {
extern Material defmaterial; /* from material.c */
Material *ma; Material *ma;
GPUMaterial *gpumat; GPUMaterial *gpumat;
GPUBlendMode blendmode; GPUBlendMode blendmode;
@@ -1042,7 +1043,6 @@ void GPU_begin_object_materials(View3D *v3d, RegionView3D *rv3d, Scene *scene, O
int GPU_enable_material(int nr, void *attribs) int GPU_enable_material(int nr, void *attribs)
{ {
extern Material defmaterial; /* from material.c */
GPUVertexAttribs *gattribs = attribs; GPUVertexAttribs *gattribs = attribs;
GPUMaterial *gpumat; GPUMaterial *gpumat;
GPUBlendMode blendmode; GPUBlendMode blendmode;

View File

@@ -44,6 +44,7 @@
#include "IMB_imbuf_types.h" #include "IMB_imbuf_types.h"
#include "IMB_imbuf.h" #include "IMB_imbuf.h"
#include "IMB_filetype.h"
#include "BKE_global.h" #include "BKE_global.h"
@@ -192,7 +193,7 @@ static int imb_save_dpx_cineon(ImBuf *ibuf, const char *filename, int use_cineon
return 1; return 1;
} }
short imb_savecineon(struct ImBuf *buf, const char *myfile, int flags) int imb_savecineon(struct ImBuf *buf, const char *myfile, int flags)
{ {
return imb_save_dpx_cineon(buf, myfile, 1, flags); return imb_save_dpx_cineon(buf, myfile, 1, flags);
} }
@@ -203,14 +204,14 @@ int imb_is_cineon(unsigned char *buf)
return cineonIsMemFileCineon(buf); return cineonIsMemFileCineon(buf);
} }
ImBuf *imb_loadcineon(unsigned char *mem, int size, int flags) ImBuf *imb_loadcineon(unsigned char *mem, size_t size, int flags)
{ {
if(imb_is_cineon(mem)) if(imb_is_cineon(mem))
return imb_load_dpx_cineon(mem, 1, size, flags); return imb_load_dpx_cineon(mem, 1, size, flags);
return NULL; return NULL;
} }
short imb_save_dpx(struct ImBuf *buf, const char *myfile, int flags) int imb_save_dpx(struct ImBuf *buf, const char *myfile, int flags)
{ {
return imb_save_dpx_cineon(buf, myfile, 0, flags); return imb_save_dpx_cineon(buf, myfile, 0, flags);
} }
@@ -220,7 +221,7 @@ int imb_is_dpx(unsigned char *buf)
return dpxIsMemFileCineon(buf); return dpxIsMemFileCineon(buf);
} }
ImBuf *imb_loaddpx(unsigned char *mem, int size, int flags) ImBuf *imb_loaddpx(unsigned char *mem, size_t size, int flags)
{ {
if(imb_is_dpx(mem)) if(imb_is_dpx(mem))
return imb_load_dpx_cineon(mem, 0, size, flags); return imb_load_dpx_cineon(mem, 0, size, flags);

View File

@@ -126,19 +126,6 @@ typedef struct {
ASCII reserved[740]; ASCII reserved[740];
} CineonMPISpecificInformation; } CineonMPISpecificInformation;
#if 0
/* create CineonFile from data in header */
/* return 0 for OK */
int readCineonGenericHeader(CineonFile* cineon, CineonGenericHeader* header);
/* create header from data in CineonFile */
int initCineonGenericHeader(
CineonFile* cineon, CineonGenericHeader* header, const char* imagename);
/* Note: dump routine assumes network byte order */
void dumpCineonGenericHeader(CineonGenericHeader* header);
#endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@@ -276,7 +276,7 @@ dumpCineonOriginationInfo(CineonOriginationInformation* originInfo) {
d_printf("Input device gamma %f\n", ntohf(originInfo->input_device_gamma)); d_printf("Input device gamma %f\n", ntohf(originInfo->input_device_gamma));
} }
int static int
initCineonGenericHeader(CineonFile* cineon, CineonGenericHeader* header, const char* imagename) { initCineonGenericHeader(CineonFile* cineon, CineonGenericHeader* header, const char* imagename) {
fillCineonFileInfo(cineon, &header->fileInfo, imagename); fillCineonFileInfo(cineon, &header->fileInfo, imagename);
@@ -287,7 +287,7 @@ initCineonGenericHeader(CineonFile* cineon, CineonGenericHeader* header, const c
return 0; return 0;
} }
void static void
dumpCineonGenericHeader(CineonGenericHeader* header) { dumpCineonGenericHeader(CineonGenericHeader* header) {
dumpCineonFileInfo(&header->fileInfo); dumpCineonFileInfo(&header->fileInfo);
dumpCineonImageInfo(&header->imageInfo); dumpCineonImageInfo(&header->imageInfo);

View File

@@ -27,6 +27,8 @@
#include "logImageCore.h" #include "logImageCore.h"
#include "logmemfile.h" /* own include */
int logimage_fseek(void* logfile, intptr_t offsett, int origin) int logimage_fseek(void* logfile, intptr_t offsett, int origin)
{ {
struct _Log_Image_File_t_ *file = (struct _Log_Image_File_t_*) logfile; struct _Log_Image_File_t_ *file = (struct _Log_Image_File_t_*) logfile;

View File

@@ -47,7 +47,9 @@ typedef struct Camera {
ID id; ID id;
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */ struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
short type, flag; char type; /* CAM_PERSP or CAM_ORTHO */
char dtx; /* draw type extra */
short flag;
float passepartalpha; float passepartalpha;
float clipsta, clipend; float clipsta, clipend;
float lens, ortho_scale, drawsize; float lens, ortho_scale, drawsize;
@@ -69,6 +71,14 @@ typedef struct Camera {
#define CAM_PERSP 0 #define CAM_PERSP 0
#define CAM_ORTHO 1 #define CAM_ORTHO 1
/* dtx */
#define CAM_DTX_CENTER 1
#define CAM_DTX_CENTER_DIAG 2
#define CAM_DTX_THIRDS 4
#define CAM_DTX_GOLDEN 8
#define CAM_DTX_GOLDEN_DIAG_H 16
#define CAM_DTX_GOLDEN_DIAG_V 32
/* flag */ /* flag */
#define CAM_SHOWLIMITS 1 #define CAM_SHOWLIMITS 1
#define CAM_SHOWMIST 2 #define CAM_SHOWMIST 2

View File

@@ -67,6 +67,14 @@ void RNA_def_camera(BlenderRNA *brna)
{CAM_PERSP, "PERSP", 0, "Perspective", ""}, {CAM_PERSP, "PERSP", 0, "Perspective", ""},
{CAM_ORTHO, "ORTHO", 0, "Orthographic", ""}, {CAM_ORTHO, "ORTHO", 0, "Orthographic", ""},
{0, NULL, 0, NULL, NULL}}; {0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_draw_type_extra_items[] = {
{CAM_DTX_CENTER, "CENTER", 0, "Center", ""},
{CAM_DTX_CENTER_DIAG, "CENTER_DIAGONAL", 0, "Center Diagonal", ""},
{CAM_DTX_THIRDS, "THIRDS", 0, "Thirds", ""},
{CAM_DTX_GOLDEN, "GOLDEN", 0, "Golden", ""},
{CAM_DTX_GOLDEN_DIAG_H, "GOLDEN_DIAGONAL_H", 0, "Golden Diagonal Hoz", ""},
{CAM_DTX_GOLDEN_DIAG_V, "GOLDEN_DIAGONAL_V", 0, "Golden Diagonal Vert", ""},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_lens_unit_items[] = { static EnumPropertyItem prop_lens_unit_items[] = {
{0, "MILLIMETERS", 0, "Millimeters", ""}, {0, "MILLIMETERS", 0, "Millimeters", ""},
{CAM_ANGLETOGGLE, "DEGREES", 0, "Degrees", ""}, {CAM_ANGLETOGGLE, "DEGREES", 0, "Degrees", ""},
@@ -81,6 +89,13 @@ void RNA_def_camera(BlenderRNA *brna)
RNA_def_property_enum_items(prop, prop_type_items); RNA_def_property_enum_items(prop, prop_type_items);
RNA_def_property_ui_text(prop, "Type", "Camera types"); RNA_def_property_ui_text(prop, "Type", "Camera types");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "show_guide", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "dtx");
RNA_def_property_enum_items(prop, prop_draw_type_extra_items);
RNA_def_property_flag(prop, PROP_ENUM_FLAG);
RNA_def_property_ui_text(prop, "Composition Guides", "Draw overlay");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
/* Number values */ /* Number values */

View File

@@ -1790,7 +1790,8 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "physics_gravity", PROP_FLOAT, PROP_ACCELERATION); prop= RNA_def_property(srna, "physics_gravity", PROP_FLOAT, PROP_ACCELERATION);
RNA_def_property_float_sdna(prop, NULL, "gravity"); RNA_def_property_float_sdna(prop, NULL, "gravity");
RNA_def_property_range(prop, 0.0, 25.0); RNA_def_property_ui_range(prop, 0.0, 25.0, 1, 2);
RNA_def_property_range(prop, 0.0, 10000.0);
RNA_def_property_ui_text(prop, "Physics Gravity", "Gravitational constant used for physics simulation in the game engine"); RNA_def_property_ui_text(prop, "Physics Gravity", "Gravitational constant used for physics simulation in the game engine");
RNA_def_property_update(prop, NC_SCENE, NULL); RNA_def_property_update(prop, NC_SCENE, NULL);

View File

@@ -45,7 +45,7 @@ static void node_composit_exec_rgb(void *UNUSED(data), bNode *node, bNodeStack *
{ {
bNodeSocket *sock= node->outputs.first; bNodeSocket *sock= node->outputs.first;
VECCOPY(out[0]->vec, sock->ns.vec); QUATCOPY(out[0]->vec, sock->ns.vec);
} }
void register_node_type_cmp_rgb(ListBase *lb) void register_node_type_cmp_rgb(ListBase *lb)

View File

@@ -45,12 +45,6 @@
#include "py_capi_utils.h" #include "py_capi_utils.h"
#endif #endif
PyObject * PyC_UnicodeFromByte(const char *str);
const char * PyC_UnicodeAsByte(PyObject *py_str, PyObject **coerce); /* coerce must be NULL */
/*** Function to wrap ID properties ***/
PyObject *BPy_Wrap_IDProperty(ID *id, IDProperty *prop, IDProperty *parent);
extern PyTypeObject IDArray_Type; extern PyTypeObject IDArray_Type;
extern PyTypeObject IDGroup_Iter_Type; extern PyTypeObject IDGroup_Iter_Type;

View File

@@ -76,7 +76,7 @@ static void bpy_lib_dealloc(BPy_Library *self)
} }
PyTypeObject bpy_lib_Type= { static PyTypeObject bpy_lib_Type= {
PyVarObject_HEAD_INIT(NULL, 0) PyVarObject_HEAD_INIT(NULL, 0)
"bpy_lib", /* tp_name */ "bpy_lib", /* tp_name */
sizeof(BPy_Library), /* tp_basicsize */ sizeof(BPy_Library), /* tp_basicsize */

View File

@@ -36,6 +36,7 @@
#include "RNA_types.h" #include "RNA_types.h"
#include "BPY_extern.h"
#include "bpy_operator.h" #include "bpy_operator.h"
#include "bpy_operator_wrap.h" #include "bpy_operator_wrap.h"
#include "bpy_rna.h" /* for setting arg props only - pyrna_py_to_prop() */ #include "bpy_rna.h" /* for setting arg props only - pyrna_py_to_prop() */

View File

@@ -187,12 +187,8 @@ int pyrna_write_check(void);
int pyrna_struct_validity_check(BPy_StructRNA *pysrna); int pyrna_struct_validity_check(BPy_StructRNA *pysrna);
int pyrna_prop_validity_check(BPy_PropertyRNA *self); int pyrna_prop_validity_check(BPy_PropertyRNA *self);
void BPY_modules_update(struct bContext *C); //XXX temp solution
/* bpy.utils.(un)register_class */ /* bpy.utils.(un)register_class */
extern PyMethodDef meth_bpy_register_class; extern PyMethodDef meth_bpy_register_class;
extern PyMethodDef meth_bpy_unregister_class; extern PyMethodDef meth_bpy_unregister_class;
void BPY_id_release(struct ID *id);
#endif #endif

View File

@@ -37,7 +37,7 @@ struct LampRen;
struct VlakRen; struct VlakRen;
struct StrandSegment; struct StrandSegment;
struct StrandPoint; struct StrandPoint;
struct ObjectInstanceRen obi; struct ObjectInstanceRen;
struct Isect; struct Isect;
/* shadeinput.c */ /* shadeinput.c */

View File

@@ -96,7 +96,7 @@ static void RE_rayobject_config_control(RayObject *r, Render *re)
} }
} }
RayObject* RE_rayobject_create(Render *re, int type, int size) static RayObject* RE_rayobject_create(Render *re, int type, int size)
{ {
RayObject * res = NULL; RayObject * res = NULL;
@@ -1679,7 +1679,7 @@ static void ray_trace_shadow_tra(Isect *is, ShadeInput *origshi, int depth, int
/* not used, test function for ambient occlusion (yaf: pathlight) */ /* not used, test function for ambient occlusion (yaf: pathlight) */
/* main problem; has to be called within shading loop, giving unwanted recursion */ /* main problem; has to be called within shading loop, giving unwanted recursion */
int ray_trace_shadow_rad(ShadeInput *ship, ShadeResult *shr) static int ray_trace_shadow_rad(ShadeInput *ship, ShadeResult *shr)
{ {
static int counter=0, only_one= 0; static int counter=0, only_one= 0;
extern float hashvectf[]; extern float hashvectf[];

View File

@@ -782,7 +782,7 @@ void free_renderdata_vlaknodes(VlakTableNode *vlaknodes)
MEM_freeN(vlaknodes); MEM_freeN(vlaknodes);
} }
void free_renderdata_strandnodes(StrandTableNode *strandnodes) static void free_renderdata_strandnodes(StrandTableNode *strandnodes)
{ {
int a; int a;

View File

@@ -210,7 +210,7 @@ static void interpolate_vec4(float *v1, float *v2, float t, float negt, float *v
v[3]= negt*v1[3] + t*v2[3]; v[3]= negt*v1[3] + t*v2[3];
} }
void interpolate_shade_result(ShadeResult *shr1, ShadeResult *shr2, float t, ShadeResult *shr, int addpassflag) static void interpolate_shade_result(ShadeResult *shr1, ShadeResult *shr2, float t, ShadeResult *shr, int addpassflag)
{ {
float negt= 1.0f - t; float negt= 1.0f - t;
@@ -252,7 +252,7 @@ void interpolate_shade_result(ShadeResult *shr1, ShadeResult *shr2, float t, Sha
} }
} }
void strand_apply_shaderesult_alpha(ShadeResult *shr, float alpha) static void strand_apply_shaderesult_alpha(ShadeResult *shr, float alpha)
{ {
if(alpha < 1.0f) { if(alpha < 1.0f) {
shr->combined[0] *= alpha; shr->combined[0] *= alpha;

View File

@@ -113,7 +113,7 @@ static void DirectionToThetaPhi(float *toSun, float *theta, float *phi)
* PerezFunction: * PerezFunction:
* compute perez function value based on input paramters * compute perez function value based on input paramters
* */ * */
float PerezFunction(struct SunSky *sunsky, const float *lam, float theta, float gamma, float lvz) static float PerezFunction(struct SunSky *sunsky, const float *lam, float theta, float gamma, float lvz)
{ {
float den, num; float den, num;
@@ -313,7 +313,7 @@ void GetSkyXYZRadiancef(struct SunSky* sunsky, const float varg[3], float color_
* turbidity: is atmosphere turbidity * turbidity: is atmosphere turbidity
* fTau: contains computed attenuated sun light * fTau: contains computed attenuated sun light
* */ * */
void ComputeAttenuatedSunlight(float theta, int turbidity, float fTau[3]) static void ComputeAttenuatedSunlight(float theta, int turbidity, float fTau[3])
{ {
float fBeta ; float fBeta ;
float fTauR, fTauA; float fTauR, fTauA;

View File

@@ -74,7 +74,7 @@ extern struct Render R;
/* Recursive test for intersections, from a point inside the mesh, to outside /* Recursive test for intersections, from a point inside the mesh, to outside
* Number of intersections (depth) determine if a point is inside or outside the mesh */ * Number of intersections (depth) determine if a point is inside or outside the mesh */
int intersect_outside_volume(RayObject *tree, Isect *isect, float *offset, int limit, int depth) static int intersect_outside_volume(RayObject *tree, Isect *isect, float *offset, int limit, int depth)
{ {
if (limit == 0) return depth; if (limit == 0) return depth;
@@ -96,7 +96,7 @@ int intersect_outside_volume(RayObject *tree, Isect *isect, float *offset, int l
} }
/* Uses ray tracing to check if a point is inside or outside an ObjectInstanceRen */ /* Uses ray tracing to check if a point is inside or outside an ObjectInstanceRen */
int point_inside_obi(RayObject *tree, ObjectInstanceRen *UNUSED(obi), float *co) static int point_inside_obi(RayObject *tree, ObjectInstanceRen *UNUSED(obi), float *co)
{ {
Isect isect= {{0}}; Isect isect= {{0}};
float dir[3] = {0.0f,0.0f,1.0f}; float dir[3] = {0.0f,0.0f,1.0f};
@@ -350,7 +350,7 @@ static void ms_diffuse(float *x0, float *x, float diff, int *n) //n is the unpad
} }
} }
void multiple_scattering_diffusion(Render *re, VolumePrecache *vp, Material *ma) static void multiple_scattering_diffusion(Render *re, VolumePrecache *vp, Material *ma)
{ {
const float diff = ma->vol.ms_diff * 0.001f; /* compensate for scaling for a nicer UI range */ const float diff = ma->vol.ms_diff * 0.001f; /* compensate for scaling for a nicer UI range */
const int simframes = (int)(ma->vol.ms_spread * (float)MAX3(vp->res[0], vp->res[1], vp->res[2])); const int simframes = (int)(ma->vol.ms_spread * (float)MAX3(vp->res[0], vp->res[1], vp->res[2]));
@@ -538,7 +538,7 @@ static void *vol_precache_part(void *data)
pa->done = 1; pa->done = 1;
return 0; return NULL;
} }
@@ -676,7 +676,7 @@ static int precache_resolution(Render *re, VolumePrecache *vp, ObjectInstanceRen
* in camera space, aligned with the ObjectRen's bounding box. * in camera space, aligned with the ObjectRen's bounding box.
* Resolution is defined by the user. * Resolution is defined by the user.
*/ */
void vol_precache_objectinstance_threads(Render *re, ObjectInstanceRen *obi, Material *ma) static void vol_precache_objectinstance_threads(Render *re, ObjectInstanceRen *obi, Material *ma)
{ {
VolumePrecache *vp; VolumePrecache *vp;
VolPrecachePart *nextpa, *pa; VolPrecachePart *nextpa, *pa;
@@ -709,9 +709,8 @@ void vol_precache_objectinstance_threads(Render *re, ObjectInstanceRen *obi, Mat
vp->data_r = MEM_callocN(sizeof(float)*vp->res[0]*vp->res[1]*vp->res[2], "volume light cache data red channel"); vp->data_r = MEM_callocN(sizeof(float)*vp->res[0]*vp->res[1]*vp->res[2], "volume light cache data red channel");
vp->data_g = MEM_callocN(sizeof(float)*vp->res[0]*vp->res[1]*vp->res[2], "volume light cache data green channel"); vp->data_g = MEM_callocN(sizeof(float)*vp->res[0]*vp->res[1]*vp->res[2], "volume light cache data green channel");
vp->data_b = MEM_callocN(sizeof(float)*vp->res[0]*vp->res[1]*vp->res[2], "volume light cache data blue channel"); vp->data_b = MEM_callocN(sizeof(float)*vp->res[0]*vp->res[1]*vp->res[2], "volume light cache data blue channel");
if (vp->data_r==0 || vp->data_g==0 || vp->data_b==0) { if (vp->data_r==NULL || vp->data_g==NULL || vp->data_b==NULL) {
MEM_freeN(vp); MEM_freeN(vp);
vp = NULL;
return; return;
} }

View File

@@ -305,7 +305,7 @@ float vol_get_density(struct ShadeInput *shi, float *co)
/* Color of light that gets scattered out by the volume */ /* Color of light that gets scattered out by the volume */
/* Uses same physically based scattering parameter as in transmission calculations, /* Uses same physically based scattering parameter as in transmission calculations,
* along with artificial reflection scale/reflection color tint */ * along with artificial reflection scale/reflection color tint */
void vol_get_reflection_color(ShadeInput *shi, float *ref_col, float *co) static void vol_get_reflection_color(ShadeInput *shi, float *ref_col, float *co)
{ {
float scatter = shi->mat->vol.scattering; float scatter = shi->mat->vol.scattering;
float reflection= shi->mat->vol.reflection; float reflection= shi->mat->vol.reflection;
@@ -325,7 +325,7 @@ void vol_get_reflection_color(ShadeInput *shi, float *ref_col, float *co)
/* compute emission component, amount of radiance to add per segment /* compute emission component, amount of radiance to add per segment
* can be textured with 'emit' */ * can be textured with 'emit' */
void vol_get_emission(ShadeInput *shi, float *emission_col, float *co) static void vol_get_emission(ShadeInput *shi, float *emission_col, float *co)
{ {
float emission = shi->mat->vol.emission; float emission = shi->mat->vol.emission;
VECCOPY(emission_col, shi->mat->vol.emission_col); VECCOPY(emission_col, shi->mat->vol.emission_col);
@@ -343,7 +343,7 @@ void vol_get_emission(ShadeInput *shi, float *emission_col, float *co)
* This can possibly use a specific scattering color, * This can possibly use a specific scattering color,
* and absorption multiplier factor too, but these parameters are left out for simplicity. * and absorption multiplier factor too, but these parameters are left out for simplicity.
* It's easy enough to get a good wide range of results with just these two parameters. */ * It's easy enough to get a good wide range of results with just these two parameters. */
void vol_get_sigma_t(ShadeInput *shi, float *sigma_t, float *co) static void vol_get_sigma_t(ShadeInput *shi, float *sigma_t, float *co)
{ {
/* technically absorption, but named transmission color /* technically absorption, but named transmission color
* since it describes the effect of the coloring *after* absorption */ * since it describes the effect of the coloring *after* absorption */
@@ -361,7 +361,7 @@ void vol_get_sigma_t(ShadeInput *shi, float *sigma_t, float *co)
/* phase function - determines in which directions the light /* phase function - determines in which directions the light
* is scattered in the volume relative to incoming direction * is scattered in the volume relative to incoming direction
* and view direction */ * and view direction */
float vol_get_phasefunc(ShadeInput *UNUSED(shi), float g, float *w, float *wp) static float vol_get_phasefunc(ShadeInput *UNUSED(shi), float g, float *w, float *wp)
{ {
const float normalize = 0.25f; // = 1.f/4.f = M_PI/(4.f*M_PI) const float normalize = 0.25f; // = 1.f/4.f = M_PI/(4.f*M_PI)
@@ -408,7 +408,7 @@ float vol_get_phasefunc(ShadeInput *UNUSED(shi), float g, float *w, float *wp)
} }
/* Compute transmittance = e^(-attenuation) */ /* Compute transmittance = e^(-attenuation) */
void vol_get_transmittance_seg(ShadeInput *shi, float *tr, float stepsize, float *co, float density) static void vol_get_transmittance_seg(ShadeInput *shi, float *tr, float stepsize, float *co, float density)
{ {
/* input density = density at co */ /* input density = density at co */
float tau[3] = {0.f, 0.f, 0.f}; float tau[3] = {0.f, 0.f, 0.f};
@@ -464,7 +464,7 @@ static void vol_get_transmittance(ShadeInput *shi, float *tr, float *co, float *
tr[2] = expf(-tau[2]); tr[2] = expf(-tau[2]);
} }
void vol_shade_one_lamp(struct ShadeInput *shi, float *co, LampRen *lar, float *lacol) static void vol_shade_one_lamp(struct ShadeInput *shi, float *co, LampRen *lar, float *lacol)
{ {
float visifac, lv[3], lampdist; float visifac, lv[3], lampdist;
float tr[3]={1.0,1.0,1.0}; float tr[3]={1.0,1.0,1.0};