diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-03-04 20:01:33 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-03-04 20:01:33 +0300 |
commit | 9d5c6bbe3dd5ebb7de05db482940b3e7207e8cd4 (patch) | |
tree | 786dc500b2a6681ebec52cd141bda1ecb706f375 /source/blender | |
parent | 7006038b02c797a5e485518b8137ea2738290528 (diff) |
quiet warnings and fix building without python.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/space_text/text_ops.c | 9 | ||||
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_define.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 2 | ||||
-rw-r--r-- | source/blender/render/intern/source/rayshade.c | 2 |
5 files changed, 11 insertions, 6 deletions
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index e7a2ad6eb57..0065c3317b8 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -572,6 +572,7 @@ static int run_script_poll(bContext *C) static int run_script(bContext *C, ReportList *reports) { +#ifdef WITH_PYTHON Text *text= CTX_data_edit_text(C); const short is_live= (reports == NULL); @@ -596,6 +597,10 @@ static int run_script(bContext *C, ReportList *reports) BKE_report(reports, RPT_ERROR, "Python script fail, look in the console for now..."); } +#else + (void)C; + (void)reports; +#endif /* !WITH_PYTHON */ return OPERATOR_CANCELLED; } @@ -792,7 +797,7 @@ static int paste_exec(bContext *C, wmOperator *op) /* run the script while editing, evil but useful */ if(CTX_wm_space_text(C)->live_edit) run_script(C, NULL); - + return OPERATOR_FINISHED; } @@ -863,7 +868,7 @@ static int cut_exec(bContext *C, wmOperator *UNUSED(op)) /* run the script while editing, evil but useful */ if(CTX_wm_space_text(C)->live_edit) run_script(C, NULL); - + return OPERATOR_FINISHED; } diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 0f83768f87e..8b69c764961 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -1790,7 +1790,7 @@ static const char *rna_property_subtypename(PropertySubType type) } } -static const char *rna_property_subtype_unit(PropertyType type) +static const char *rna_property_subtype_unit(PropertySubType type) { switch(RNA_SUBTYPE_UNIT(type)) { case PROP_UNIT_NONE: return "PROP_UNIT_NONE"; diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index c32681c2826..4a14b2286f9 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -1815,7 +1815,7 @@ void RNA_def_property_editable_array_func(PropertyRNA *prop, const char *editabl void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func) { if(!DefRNA.preprocess) { - fprintf(stderr, "RNA_def_struct_refine_func: only during preprocessing.\n"); + fprintf(stderr, "RNA_def_property_update: only during preprocessing.\n"); return; } diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 743e71b1ef6..ae798460294 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -2151,7 +2151,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna) prop= RNA_def_property(srna, "resolution_percentage", PROP_INT, PROP_PERCENTAGE); RNA_def_property_int_sdna(prop, NULL, "size"); - RNA_def_property_range(prop, 1, INT_MAX); + RNA_def_property_range(prop, 1, SHRT_MAX); RNA_def_property_ui_range(prop, 1, 100, 10, 1); RNA_def_property_ui_text(prop, "Resolution %", "Percentage scale for render resolution"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c index cc1d0e1cec7..6f639de70d5 100644 --- a/source/blender/render/intern/source/rayshade.c +++ b/source/blender/render/intern/source/rayshade.c @@ -2347,7 +2347,7 @@ static void ray_shadow_qmc(ShadeInput *shi, LampRen *lar, float *lampco, float * samples++; - if ((lar->ray_samp_method == LA_SAMP_HALTON)) { + if (lar->ray_samp_method == LA_SAMP_HALTON) { /* adaptive sampling - consider samples below threshold as in shadow (or vice versa) and exit early */ if ((max_samples > min_adapt_samples) && (adapt_thresh > 0.0) && (samples > max_samples / 3)) { |