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>2007-04-20 22:48:30 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-04-20 22:48:30 +0400
commitc7b1e5c11df31c437834088fc056a27fe852bfe1 (patch)
tree0ed49ef356e72fd4f6f7d5f9778cac9fa91c3ea7 /source/blender
parent94b7743dd3f298fa6c93e541813f43df8a3828d5 (diff)
export_fbx.py - support scene start/end frames, fpx, mist settings, better default camera writing.
BPyObject.py - function for getting an objects armature, look at both parent and modifier. editmesh_add.c and BPyAddMesh.py - check for multires filesel.c, Append/Link had a bug where files linked in, didnt have the LIB_APPEND_TAG unset, and appending these into a new blend file would link instead. BKE_library.h, library.c - utility functions for flagging listbases flag_all_listbases_ids and and flag_listbase_ids
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/BKE_library.h3
-rw-r--r--source/blender/blenkernel/intern/library.c22
-rw-r--r--source/blender/python/api2_2x/Library.c16
-rw-r--r--source/blender/src/editmesh_add.c2
-rw-r--r--source/blender/src/filesel.c16
5 files changed, 39 insertions, 20 deletions
diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h
index 064acf12eb5..1954cfe1e37 100644
--- a/source/blender/blenkernel/BKE_library.h
+++ b/source/blender/blenkernel/BKE_library.h
@@ -70,5 +70,8 @@ void IDnames_to_pupstring(char **str, char *title, char *extraops, struct ListBa
void IMAnames_to_pupstring(char **str, char *title, char *extraops, struct ListBase *lb, struct ID *link, short *nr);
void IPOnames_to_pupstring(char **str, char *title, char *extraops, struct ListBase *lb, struct ID* link, short *nr, int blocktype);
+void flag_listbase_ids(ListBase *lb, short flag, short value);
+void flag_all_listbases_ids(short flag, short value);
+
#endif
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index a5a0c2bead2..08e2fda533b 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -198,6 +198,28 @@ ListBase *wich_libbase(Main *mainlib, short type)
return 0;
}
+/* Flag all ids in listbase */
+void flag_listbase_ids(ListBase *lb, short flag, short value)
+{
+ ID *id;
+ if (value) {
+ for(id= lb->first; id; id= id->next) id->flag |= flag;
+ } else {
+ flag = ~flag;
+ for(id= lb->first; id; id= id->next) id->flag &= flag;
+ }
+}
+
+/* Flag all ids in listbase */
+void flag_all_listbases_ids(short flag, short value)
+{
+ ListBase *lbarray[MAX_LIBARRAY];
+ int a;
+ a= set_listbasepointers(G.main, lbarray);
+ while(a--) flag_listbase_ids(lbarray[a], flag, value);
+}
+
+
/* note: MAX_LIBARRAY define should match this code */
int set_listbasepointers(Main *main, ListBase **lb)
{
diff --git a/source/blender/python/api2_2x/Library.c b/source/blender/python/api2_2x/Library.c
index a9dd2c820ad..5881c88f654 100644
--- a/source/blender/python/api2_2x/Library.c
+++ b/source/blender/python/api2_2x/Library.c
@@ -604,15 +604,7 @@ PyObject *LibraryData_importLibData( BPy_LibraryData *self, char *name,
*/
if( mode != FILE_LINK ) {
- ID *id;
- ListBase *lbarray[MAX_LIBARRAY];
- int a;
-
- /* tag everything, all untagged data can be made local */
- a= set_listbasepointers(G.main, lbarray);
- while( a--)
- for( id= lbarray[a]->first; id; id= id->next )
- id->flag |= LIB_APPEND_TAG;
+ flag_all_listbases_ids(LIB_APPEND_TAG, 1);
/* see what new block will be called */
strncpy( newName, name, strlen(name)+1 );
@@ -629,8 +621,12 @@ PyObject *LibraryData_importLibData( BPy_LibraryData *self, char *name,
*/
for( lib = G.main->library.first; lib; lib = lib->id.next )
if( strcmp( longFilename, lib->name ) == 0 ) {
- if( mode != FILE_LINK )
+ if( mode != FILE_LINK ) {
all_local( lib, 1 );
+ /* important we unset, otherwise these object wont
+ * link into other scenes from this blend file */
+ flag_all_listbases_ids(LIB_APPEND_TAG, 0);
+ }
break;
}
diff --git a/source/blender/src/editmesh_add.c b/source/blender/src/editmesh_add.c
index e90a08e4086..bb1d5d00957 100644
--- a/source/blender/src/editmesh_add.c
+++ b/source/blender/src/editmesh_add.c
@@ -1183,6 +1183,8 @@ void add_primitiveMesh(int type)
if ELEM(curarea->spacetype, SPACE_VIEW3D, SPACE_INFO); else return;
if(G.vd==0) return;
+ if (G.obedit && G.obedit->type==OB_MESH && multires_test()) return;
+
/* if editmode exists for other type, it exits */
check_editmode(OB_MESH);
diff --git a/source/blender/src/filesel.c b/source/blender/src/filesel.c
index d8f1b732e19..3a2e9414354 100644
--- a/source/blender/src/filesel.c
+++ b/source/blender/src/filesel.c
@@ -2395,17 +2395,9 @@ static void do_library_append(SpaceFile *sfile)
Object *ob;
int idcode = groupname_to_code(group);
- if((sfile->flag & FILE_LINK)==0) {
+ if((sfile->flag & FILE_LINK)==0)
/* tag everything, all untagged data can be made local */
- ID *id;
- ListBase *lbarray[MAX_LIBARRAY];
- int a;
-
- a= set_listbasepointers(G.main, lbarray);
- while(a--) {
- for(id= lbarray[a]->first; id; id= id->next) id->flag |= LIB_APPEND_TAG;
- }
- }
+ flag_all_listbases_ids(LIB_APPEND_TAG, 1);
BLO_library_append(sfile, dir, idcode);
@@ -2428,6 +2420,10 @@ static void do_library_append(SpaceFile *sfile)
/* make local */
if(lib && (sfile->flag & FILE_LINK)==0) {
all_local(lib, 1);
+ /* important we unset, otherwise these object wont
+ * link into other scenes from this blend file */
+ flag_all_listbases_ids(LIB_APPEND_TAG, 1);
+
}
DAG_scene_sort(G.scene);