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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-08-04 15:27:13 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-08-04 15:27:13 +0400
commitcdea64e32cbe1a8b9c9312b04cf15b0ac3daf685 (patch)
tree4a46f88c5d827df5c619b71d33f35429a3cf4175 /source
parent9da70f74d37c7c0001a2705afc8fe5044f63bb0a (diff)
remove append to cursor code, wasnt used and made some naive assumptions about object locations.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenloader/intern/readfile.c49
-rw-r--r--source/blender/makesdna/DNA_space_types.h2
2 files changed, 1 insertions, 50 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 0a24dfaed72..d60ac492f97 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -12999,53 +12999,6 @@ Main* BLO_library_append_begin(const bContext *C, BlendHandle** bh, const char *
return library_append_begin(C, &fd, filepath);
}
-static void append_do_cursor(Scene *scene, Library *curlib, short flag)
-{
- Base *centerbase;
- Object *ob;
- float *curs, centerloc[3], vec[3], min[3], max[3];
- int count= 0;
-
- /* when not linking (appending)... */
- if(flag & FILE_LINK)
- return;
-
- /* we're not appending at cursor */
- if((flag & FILE_ATCURSOR) == 0)
- return;
-
- /* find the center of everything appended */
- INIT_MINMAX(min, max);
- centerbase= (scene->base.first);
- while(centerbase) {
- if(centerbase->object->id.lib==curlib && centerbase->object->parent==NULL) {
- VECCOPY(vec, centerbase->object->loc);
- DO_MINMAX(vec, min, max);
- count++;
- }
- centerbase= centerbase->next;
- }
- /* we haven't found any objects to move to cursor */
- if(!count)
- return;
-
- /* move from the center of the appended objects to cursor */
- mid_v3_v3v3(centerloc, min, max);
- curs = scene->cursor;
- VECSUB(centerloc,curs,centerloc);
-
- /* now translate the center of the objects */
- centerbase= (scene->base.first);
- while(centerbase) {
- if(centerbase->object->id.lib==curlib && centerbase->object->parent==NULL) {
- ob= centerbase->object;
- ob->loc[0] += centerloc[0];
- ob->loc[1] += centerloc[1];
- ob->loc[2] += centerloc[2];
- }
- centerbase= centerbase->next;
- }
-}
/* Context == NULL signifies not to do any scene manipulation */
static void library_append_end(const bContext *C, Main *mainl, FileData **fd, int idcode, short flag)
@@ -13099,8 +13052,6 @@ static void library_append_end(const bContext *C, Main *mainl, FileData **fd, in
else {
printf("library_append_end, scene is NULL (objects wont get bases)\n");
}
-
- append_do_cursor(scene, curlib, flag);
}
/* has been removed... erm, why? s..ton) */
/* 20040907: looks like they are give base already in append_named_part(); -Nathan L */
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index ff9f2269f53..1549bd71748 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -703,7 +703,7 @@ enum FileSortTypeE {
#define FILE_HIDE_DOT (1<<3)
#define FILE_AUTOSELECT (1<<4)
#define FILE_ACTIVELAY (1<<5)
-#define FILE_ATCURSOR (1<<6)
+/* #define FILE_ATCURSOR (1<<6) */ /* deprecated */
#define FILE_DIRSEL_ONLY (1<<7)
#define FILE_FILTER (1<<8)
#define FILE_BOOKMARKS (1<<9)