[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39051] branches/soc-2011-salad: Merging r39032 through r39050 from trunk into soc-2011-salad
Sergey Sharybin
g.ulairi at gmail.com
Fri Aug 5 08:49:02 CEST 2011
Revision: 39051
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39051
Author: nazgul
Date: 2011-08-05 06:49:02 +0000 (Fri, 05 Aug 2011)
Log Message:
-----------
Merging r39032 through r39050 from trunk into soc-2011-salad
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39032
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39050
Modified Paths:
--------------
branches/soc-2011-salad/source/blender/blenloader/BLO_readfile.h
branches/soc-2011-salad/source/blender/blenloader/intern/readfile.c
branches/soc-2011-salad/source/blender/editors/space_file/file_ops.c
branches/soc-2011-salad/source/blender/editors/space_sequencer/sequencer_edit.c
branches/soc-2011-salad/source/blender/makesrna/intern/rna_access.c
branches/soc-2011-salad/source/blender/python/intern/bpy_library.c
branches/soc-2011-salad/source/blender/windowmanager/intern/wm_operators.c
branches/soc-2011-salad/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
Property Changed:
----------------
branches/soc-2011-salad/
Property changes on: branches/soc-2011-salad
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30783,30792-30793,30797-30798,30815
/branches/soc-2011-carrot:36854,37548,37564,37602,37622,37848,38043,38064,38226,38231,38282,38620,38661-38662,39001,39009
/branches/soc-2011-cucumber:36829-36994
/branches/soc-2011-onion:36833-38309
/branches/soc-2011-pepper:36830-38934
/branches/soc-2011-tomato:36831-38952
/trunk/blender:36834-39031
+ /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30783,30792-30793,30797-30798,30815
/branches/soc-2011-carrot:36854,37548,37564,37602,37622,37848,38043,38064,38226,38231,38282,38620,38661-38662,39001,39009
/branches/soc-2011-cucumber:36829-36994
/branches/soc-2011-onion:36833-38309
/branches/soc-2011-pepper:36830-38934
/branches/soc-2011-tomato:36831-38952
/trunk/blender:36834-39050
Modified: branches/soc-2011-salad/source/blender/blenloader/BLO_readfile.h
===================================================================
--- branches/soc-2011-salad/source/blender/blenloader/BLO_readfile.h 2011-08-05 06:47:37 UTC (rev 39050)
+++ branches/soc-2011-salad/source/blender/blenloader/BLO_readfile.h 2011-08-05 06:49:02 UTC (rev 39051)
@@ -211,9 +211,18 @@
*/
int BLO_is_a_library(const char *path, char *dir, char *group);
-struct Main* BLO_library_append_begin(const struct bContext *C, BlendHandle** bh, const char *filepath);
+/**
+ * Initialize the BlendHandle for appending or linking library data.
+ *
+ * @param mainvar The current main database eg G.main or CTX_data_main(C).
+ * @param bh A blender file handle as returned by BLO_blendhandle_from_file or BLO_blendhandle_from_memory.
+ * @param filepath Used for relative linking, copied to the lib->name
+ * @return the library Main, to be passed to BLO_library_append_named_part as mainl.
+ */
+struct Main* BLO_library_append_begin(struct Main *mainvar, BlendHandle** bh, const char *filepath);
+
/**
* Link/Append a named datablock from an external blend file.
*
@@ -243,11 +252,6 @@
void *BLO_library_read_struct(struct FileData *fd, struct BHead *bh, const char *blockname);
-/* deprecated */
-#if 1
-void BLO_script_library_append(BlendHandle **bh, char *dir, char *name, int idcode, short flag, struct Main *mainvar, struct Scene *scene, struct ReportList *reports);
-#endif
-
BlendFileData* blo_read_blendafterruntime(int file, char *name, int actualsize, struct ReportList *reports);
#ifdef __cplusplus
Modified: branches/soc-2011-salad/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/soc-2011-salad/source/blender/blenloader/intern/readfile.c 2011-08-05 06:47:37 UTC (rev 39050)
+++ branches/soc-2011-salad/source/blender/blenloader/intern/readfile.c 2011-08-05 06:49:02 UTC (rev 39051)
@@ -13321,9 +13321,8 @@
/* common routine to append/link something from a library */
-static Main* library_append_begin(const bContext *C, FileData **fd, const char *filepath)
+static Main* library_append_begin(Main *mainvar, FileData **fd, const char *filepath)
{
- Main *mainvar= CTX_data_main(C);
Main *mainl;
/* make mains */
@@ -13339,10 +13338,10 @@
return mainl;
}
-Main* BLO_library_append_begin(const bContext *C, BlendHandle** bh, const char *filepath)
+Main* BLO_library_append_begin(Main *mainvar, BlendHandle** bh, const char *filepath)
{
FileData *fd= (FileData*)(*bh);
- return library_append_begin(C, &fd, filepath);
+ return library_append_begin(mainvar, &fd, filepath);
}
Modified: branches/soc-2011-salad/source/blender/editors/space_file/file_ops.c
===================================================================
--- branches/soc-2011-salad/source/blender/editors/space_file/file_ops.c 2011-08-05 06:47:37 UTC (rev 39050)
+++ branches/soc-2011-salad/source/blender/editors/space_file/file_ops.c 2011-08-05 06:49:02 UTC (rev 39051)
@@ -64,6 +64,7 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
+#include <ctype.h>
/* for events */
#define NOTACTIVEFILE 0
@@ -1079,8 +1080,18 @@
}
#ifdef WIN32
- if (sfile->params->dir[0] == '\0')
+ if (sfile->params->dir[0] == '\0') {
get_default_root(sfile->params->dir);
+ }
+ /* change "C:" --> "C:\", [#28102] */
+ else if ( (isalpha(sfile->params->dir[0]) &&
+ (sfile->params->dir[1] == ':')) &&
+ (sfile->params->dir[2] == '\0')
+
+ ) {
+ sfile->params->dir[2]= '\\';
+ sfile->params->dir[3]= '\0';
+ }
#endif
}
}
Modified: branches/soc-2011-salad/source/blender/editors/space_sequencer/sequencer_edit.c
===================================================================
--- branches/soc-2011-salad/source/blender/editors/space_sequencer/sequencer_edit.c 2011-08-05 06:47:37 UTC (rev 39050)
+++ branches/soc-2011-salad/source/blender/editors/space_sequencer/sequencer_edit.c 2011-08-05 06:49:02 UTC (rev 39051)
@@ -1788,7 +1788,7 @@
se = give_stripelem(seq, cfra);
seq_new= seq_dupli_recursive(scene, scene, seq, SEQ_DUPE_UNIQUE_NAME);
- BLI_addtail(&ed->seqbase, seq_new);
+ BLI_addtail(ed->seqbasep, seq_new);
seq_new->start= start_ofs;
seq_new->type= SEQ_IMAGE;
@@ -1842,7 +1842,6 @@
ot->description="On image sequences strips, it return a strip for each image";
/* api callbacks */
- ot->invoke= WM_operator_props_popup;
ot->exec= sequencer_separate_images_exec;
ot->poll= sequencer_edit_poll;
Modified: branches/soc-2011-salad/source/blender/makesrna/intern/rna_access.c
===================================================================
--- branches/soc-2011-salad/source/blender/makesrna/intern/rna_access.c 2011-08-05 06:47:37 UTC (rev 39050)
+++ branches/soc-2011-salad/source/blender/makesrna/intern/rna_access.c 2011-08-05 06:49:02 UTC (rev 39051)
@@ -4115,10 +4115,13 @@
{
PropertyRNA *prop= RNA_struct_find_property(ptr, name);
- if(prop)
+ if(prop) {
RNA_property_string_get(ptr, prop, value);
- else
+ }
+ else {
printf("RNA_string_get: %s.%s not found.\n", ptr->type->identifier, name);
+ value[0]= '\0';
+ }
}
char *RNA_string_get_alloc(PointerRNA *ptr, const char *name, char *fixedbuf, int fixedlen)
Modified: branches/soc-2011-salad/source/blender/python/intern/bpy_library.c
===================================================================
--- branches/soc-2011-salad/source/blender/python/intern/bpy_library.c 2011-08-05 06:47:37 UTC (rev 39050)
+++ branches/soc-2011-salad/source/blender/python/intern/bpy_library.c 2011-08-05 06:49:02 UTC (rev 39051)
@@ -39,6 +39,7 @@
#include "BKE_library.h"
#include "BKE_idcode.h"
#include "BKE_report.h"
+#include "BKE_context.h"
#include "BLI_utildefines.h"
#include "BLI_string.h"
@@ -317,7 +318,7 @@
flag_all_listbases_ids(LIB_PRE_EXISTING, 1);
/* here appending/linking starts */
- mainl= BLO_library_append_begin(BPy_GetContext(), &(self->blo_handle), self->relpath);
+ mainl= BLO_library_append_begin(CTX_data_main(BPy_GetContext()), &(self->blo_handle), self->relpath);
{
int i= 0, code;
Modified: branches/soc-2011-salad/source/blender/windowmanager/intern/wm_operators.c
===================================================================
--- branches/soc-2011-salad/source/blender/windowmanager/intern/wm_operators.c 2011-08-05 06:47:37 UTC (rev 39050)
+++ branches/soc-2011-salad/source/blender/windowmanager/intern/wm_operators.c 2011-08-05 06:49:02 UTC (rev 39051)
@@ -1628,7 +1628,6 @@
int idcode, totfiles=0;
short flag;
- name[0] = '\0';
RNA_string_get(op->ptr, "filename", name);
RNA_string_get(op->ptr, "directory", dir);
@@ -1697,7 +1696,7 @@
flag_all_listbases_ids(LIB_PRE_EXISTING, 1);
/* here appending/linking starts */
- mainl = BLO_library_append_begin(C, &bh, libname);
+ mainl = BLO_library_append_begin(bmain, &bh, libname);
if(totfiles == 0) {
BLO_library_append_named_part_ex(C, mainl, &bh, name, idcode, flag);
}
Modified: branches/soc-2011-salad/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
===================================================================
--- branches/soc-2011-salad/source/gameengine/Converter/KX_BlenderSceneConverter.cpp 2011-08-05 06:47:37 UTC (rev 39050)
+++ branches/soc-2011-salad/source/gameengine/Converter/KX_BlenderSceneConverter.cpp 2011-08-05 06:49:02 UTC (rev 39051)
@@ -950,7 +950,6 @@
bool KX_BlenderSceneConverter::LinkBlendFile(BlendHandle *bpy_openlib, const char *path, char *group, KX_Scene *scene_merge, char **err_str, short options)
{
- bContext *C;
Main *main_newlib; /* stored as a dynamic 'main' until we free it */
Main *main_tmp= NULL; /* created only for linking, then freed */
LinkNode *names = NULL;
@@ -981,12 +980,10 @@
}
main_newlib= (Main *)MEM_callocN( sizeof(Main), "BgeMain");
- C= CTX_create();
- CTX_data_main_set(C, main_newlib);
BKE_reports_init(&reports, RPT_STORE);
/* here appending/linking starts */
- main_tmp = BLO_library_append_begin(C, &bpy_openlib, (char *)path);
+ main_tmp = BLO_library_append_begin(main_newlib, &bpy_openlib, (char *)path);
int totnames_dummy;
names = BLO_blendhandle_get_datablock_names( bpy_openlib, idcode, &totnames_dummy);
@@ -1000,11 +997,11 @@
}
BLI_linklist_free(names, free); /* free linklist *and* each node's data */
- BLO_library_append_end(C, main_tmp, &bpy_openlib, idcode, flag);
+ BLO_library_append_end(NULL, main_tmp, &bpy_openlib, idcode, flag);
/* now do another round of linking for Scenes so all actions are properly loaded */
if (idcode==ID_SCE && options & LIB_LOAD_LOAD_ACTIONS) {
- main_tmp = BLO_library_append_begin(C, &bpy_openlib, (char *)path);
+ main_tmp = BLO_library_append_begin(main_newlib, &bpy_openlib, (char *)path);
int totnames_dummy;
names = BLO_blendhandle_get_datablock_names( bpy_openlib, ID_AC, &totnames_dummy);
@@ -1018,12 +1015,11 @@
}
BLI_linklist_free(names, free); /* free linklist *and* each node's data */
- BLO_library_append_end(C, main_tmp, &bpy_openlib, ID_AC, flag);
+ BLO_library_append_end(NULL, main_tmp, &bpy_openlib, ID_AC, flag);
}
BLO_blendhandle_close(bpy_openlib);
-
- CTX_free(C);
+
BKE_reports_clear(&reports);
/* done linking */
More information about the Bf-blender-cvs
mailing list