Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-06-06 05:15:44 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-06-06 05:15:44 +0400
commited338da8c963cfcc26315584bb694a95f2c89088 (patch)
treee21a68328e7d0d1f4d41f95fd27690172bfc0957 /source/blender
parent0cc077ec455e701a1d3caa1350051f7d3737763b (diff)
- WITH_CXX_GUARDEDALLOC working again
- CMake building without python or fluidsim working again (broke in recent commit) - remove BLI_short_filename(), it wasnt used anywhere.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenlib/BLI_fileops.h1
-rw-r--r--source/blender/blenlib/intern/fileops.c25
-rw-r--r--source/blender/blenlib/intern/path_util.c2
-rw-r--r--source/blender/editors/interface/CMakeLists.txt4
-rw-r--r--source/blender/editors/object/object_constraint.c4
-rw-r--r--source/blender/editors/physics/CMakeLists.txt4
-rw-r--r--source/blender/editors/space_script/script_edit.c7
-rw-r--r--source/blender/editors/space_script/space_script.c3
-rw-r--r--source/blender/makesrna/intern/rna_wm.c2
9 files changed, 15 insertions, 37 deletions
diff --git a/source/blender/blenlib/BLI_fileops.h b/source/blender/blenlib/BLI_fileops.h
index e6ea3559e8c..6c98d30e4b1 100644
--- a/source/blender/blenlib/BLI_fileops.h
+++ b/source/blender/blenlib/BLI_fileops.h
@@ -54,7 +54,6 @@ char *BLI_last_slash(const char *string);
int BLI_add_slash(char *string);
void BLI_del_slash(char *string);
char *first_slash(char *string);
-const char *BLI_short_filename(const char *string);
/* only for the sane unix world: direct calls to system functions :( */
#ifndef WIN32
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
index 73434c548a0..a543f4623f1 100644
--- a/source/blender/blenlib/intern/fileops.c
+++ b/source/blender/blenlib/intern/fileops.c
@@ -80,31 +80,6 @@ char *BLI_last_slash(const char *string) {
else return lfslash;
}
-static const char *last_slash_len(const char *string, int len) {
- int a;
-
- for(a=len-1; a>=0; a--)
- if(string[a] == '/' || string[a] == '\\')
- return &string[a];
-
- return NULL;
-}
-
-const char *BLI_short_filename(const char *string) {
- const char *ls, *lls;
-
- ls= last_slash_len(string, strlen(string));
- if(!ls)
- return string;
-
- lls= last_slash_len(string, ls-string);
-
- if(lls)
- return lls+1;
- else
- return ls+1;
-}
-
/* adds a slash if there isnt one there alredy */
int BLI_add_slash(char *string) {
int len = strlen(string);
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index f91c38b8271..2cea9c21a57 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -1175,7 +1175,7 @@ void BLI_join_dirfile(char *string, const char *dir, const char *file)
/* like pythons os.path.basename( ) */
char *BLI_path_basename(char *path)
{
- const char *filename= BLI_last_slash(path);
+ char *filename= BLI_last_slash(path);
return filename ? filename + 1 : path;
}
diff --git a/source/blender/editors/interface/CMakeLists.txt b/source/blender/editors/interface/CMakeLists.txt
index 29ceb1fd82e..4b4590aeee5 100644
--- a/source/blender/editors/interface/CMakeLists.txt
+++ b/source/blender/editors/interface/CMakeLists.txt
@@ -39,8 +39,8 @@ IF(WITH_INTERNATIONAL)
ADD_DEFINITIONS(-DINTERNATIONAL)
ENDIF(WITH_INTERNATIONAL)
-IF(WITH_PYTHON)
+IF(NOT WITH_PYTHON)
ADD_DEFINITIONS(-DDISABLE_PYTHON)
-ENDIF(WITH_PYTHON)
+ENDIF(NOT WITH_PYTHON)
BLENDERLIB(bf_editor_interface "${SRC}" "${INC}")
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index 034de3fb703..7b61d8de43f 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -199,9 +199,9 @@ char *buildmenu_pyconstraints (Text *con_text, int *pyconindex)
/* this callback gets called when the 'refresh' button of a pyconstraint gets pressed */
void update_pyconstraint_cb (void *arg1, void *arg2)
{
+#ifndef DISABLE_PYTHON
Object *owner= (Object *)arg1;
bConstraint *con= (bConstraint *)arg2;
-#ifndef DISABLE_PYTHON
if (owner && con)
BPY_pyconstraint_update(owner, con);
#endif
@@ -1286,9 +1286,9 @@ static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase
case CONSTRAINT_TYPE_PYTHON: // FIXME: this code is not really valid anymore
{
+#ifndef DISABLE_PYTHON
char *menustr;
int scriptint= 0;
-#ifndef DISABLE_PYTHON
/* popup a list of usable scripts */
menustr = buildmenu_pyconstraints(NULL, &scriptint);
// XXX scriptint = pupmenu(menustr);
diff --git a/source/blender/editors/physics/CMakeLists.txt b/source/blender/editors/physics/CMakeLists.txt
index d84754b561d..ebe3f913508 100644
--- a/source/blender/editors/physics/CMakeLists.txt
+++ b/source/blender/editors/physics/CMakeLists.txt
@@ -32,6 +32,10 @@ SET(INC
../../../../intern/guardedalloc
)
+IF(NOT WITH_ELBEEM)
+ ADD_DEFINITIONS(-DDISABLE_ELBEEM)
+ENDIF(NOT WITH_ELBEEM)
+
IF(WITH_OPENMP)
ADD_DEFINITIONS(-DPARALLEL=1)
ENDIF(WITH_OPENMP)
diff --git a/source/blender/editors/space_script/script_edit.c b/source/blender/editors/space_script/script_edit.c
index 02993549c94..064e2295006 100644
--- a/source/blender/editors/space_script/script_edit.c
+++ b/source/blender/editors/space_script/script_edit.c
@@ -50,18 +50,17 @@
#include "script_intern.h" // own include
-
+#ifndef DISABLE_PYTHON
#include "BPY_extern.h" /* BPY_run_python_script */
+#endif
static int run_pyfile_exec(bContext *C, wmOperator *op)
{
- ARegion *ar= CTX_wm_region(C);
-
-
char path[512];
RNA_string_get(op->ptr, "path", path);
#ifndef DISABLE_PYTHON
if(BPY_run_python_script(C, path, NULL, op->reports)) {
+ ARegion *ar= CTX_wm_region(C);
ED_region_tag_redraw(ar);
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/space_script/space_script.c b/source/blender/editors/space_script/space_script.c
index 9fb1d1a3f0b..0aba1df47e9 100644
--- a/source/blender/editors/space_script/space_script.c
+++ b/source/blender/editors/space_script/space_script.c
@@ -50,8 +50,9 @@
#include "UI_resources.h"
#include "UI_view2d.h"
-
+#ifndef DISABLE_PYTHON
#include "BPY_extern.h"
+#endif
#include "script_intern.h" // own include
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index 844df1ad2d3..52c18b4e581 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -611,6 +611,7 @@ static int rna_wmKeyMapItem_name_length(PointerRNA *ptr)
return 0;
}
+#ifndef DISABLE_PYTHON
static void rna_Operator_unregister(const bContext *C, StructRNA *type)
{
char *idname;
@@ -746,7 +747,6 @@ static void operator_draw(bContext *C, wmOperator *op)
RNA_parameter_list_free(&list);
}
-#ifndef DISABLE_PYTHON
void operator_wrapper(wmOperatorType *ot, void *userdata);
void macro_wrapper(wmOperatorType *ot, void *userdata);