diff --git a/SConstruct b/SConstruct index dcb5cfef3ec..78936a039c9 100644 --- a/SConstruct +++ b/SConstruct @@ -273,6 +273,14 @@ if not quickie and do_clean: if os.path.exists(confile): print "clean file %s"%confile os.remove(confile) + + if platform in ('win32-vc', 'win32-mingw'): + makesdnafile = B.root_build_dir+'makesdna.exe' + else: + makesdnafile = B.root_build_dir+'makesdna' + if os.path.exists(makesdnafile): + print "removing", makesdnafile + os.remove(makesdnafile) print B.bc.OKGREEN+'...done'+B.bc.ENDC else: print B.bc.HEADER+'Already Clean, nothing to do.'+B.bc.ENDC diff --git a/release/scripts/bpymodules/paths_svg2obj.py b/release/scripts/bpymodules/paths_svg2obj.py index e535af705df..de40bea3191 100644 --- a/release/scripts/bpymodules/paths_svg2obj.py +++ b/release/scripts/bpymodules/paths_svg2obj.py @@ -1309,8 +1309,9 @@ def curve_FILL(Courbe,proprietes): if not 'fill:none' in pr: Courbe[n].fill=1 if USE_COLORS: - if '#' in pr: - i= pr.find('fill:#')+6 + i= pr.find('fill:#') + if i != -1: + i= i+6 Courbe[n].color=[int(pr[i:i+2],16),int(pr[i+2:i+4],16),int(pr[i+4:i+6],16)] Courbe[n].mat=1 elif ';fill-opacity' in pr: diff --git a/release/scripts/raw_export.py b/release/scripts/raw_export.py index 02eb5ad3f36..14de4b1e371 100644 --- a/release/scripts/raw_export.py +++ b/release/scripts/raw_export.py @@ -2,9 +2,9 @@ """ Name: 'Raw Faces (.raw)...' -Blender: 242 +Blender: 245 Group: 'Export' -Tooltip: 'Export selected mesh to Raw Triangle Format (.raw)' +Tooltip: 'Export selected mesh to Raw Format (.raw)' """ __author__ = "Anthony D'Agostino (Scorpius)" @@ -13,10 +13,10 @@ __url__ = ("blender", "elysiun", __version__ = "Part of IOSuite 0.5" __bpydoc__ = """\ -This script exports meshes to Raw Triangle file format. +This script exports meshes to Raw file format. The raw triangle format is very simple; it has no verts or faces lists. -It's just a simple ascii text file with the vertices of each triangle +It's just a simple ascii text file with the vertices of each triangle or quad listed on each line. There were some very old utilities (when the PovRay forum was in existence on CompuServe) that preformed operations on these files. @@ -65,24 +65,24 @@ def write(filename): filename += '.raw' scn= Blender.Scene.GetCurrent() - object= scn.getActiveObject() - if not object: + ob= scn.objects.active + if not ob: Blender.Draw.PupMenu('Error%t|Select 1 active object') return file = open(filename, 'wb') - mesh = BPyMesh.getMeshFromObject(object, None, True, False, scn) + mesh = BPyMesh.getMeshFromObject(ob, None, True, False, scn) if not mesh: Blender.Draw.PupMenu('Error%t|Could not get mesh data from active object') return - mesh.transform(object.matrixWorld) + mesh.transform(ob.matrixWorld) file = open(filename, "wb") for f in mesh.faces: - for v in f.v: + for v in f: file.write('%.6f %.6f %.6f ' % tuple(v.co)) file.write('\n') file.close() diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 44709ce487d..88f0971ac1d 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -1629,9 +1629,12 @@ static void give_parvert(Object *par, int nr, float *vec) } } - if(count > 0) { + if (count==0) { + /* keep as 0,0,0 */ + } else if(count > 0) { VecMulf(vec, 1.0f / count); } else { + /* use first index if its out of range */ dm->getVertCo(dm, 0, vec); } } diff --git a/source/blender/blenlib/intern/bpath.c b/source/blender/blenlib/intern/bpath.c index d92414cc46b..66eb63c8dfd 100644 --- a/source/blender/blenlib/intern/bpath.c +++ b/source/blender/blenlib/intern/bpath.c @@ -239,8 +239,10 @@ static struct Sequence *seq_stepdata__internal(struct BPathIterator *bpi, int st return seq; } else { /* keep looking through the next scene, reallocate seq array */ - MEM_freeN((void *)bpi->seqdata.seqar); - bpi->seqdata.seqar = NULL; + if (bpi->seqdata.seqar) { + MEM_freeN((void *)bpi->seqdata.seqar); + bpi->seqdata.seqar = NULL; + } bpi->seqdata.scene = bpi->seqdata.scene->id.next; } } else { diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index fc3ffd2c6dc..007aaf5b48d 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -7593,6 +7593,31 @@ static void do_versions(FileData *fd, Library *lib, Main *main) idproperties_fix_group_lengths(main->brush); idproperties_fix_group_lengths(main->particle); } + + /* only needed until old bad svn/RC1,2 files are saved with a > 17 version -dg */ + if(main->versionfile == 245 && main->subversionfile < 17) { + ModifierData *md; + Object *ob; + + for(ob = main->object.first; ob; ob= ob->id.next) { + for(md=ob->modifiers.first; md; ) { + if(md->type==eModifierType_Cloth) { + ModifierData *next; + MEM_freeN(((ClothModifierData *)md)->sim_parms); + MEM_freeN(((ClothModifierData *)md)->coll_parms); + MEM_freeN(((ClothModifierData *)md)->point_cache); + ((ClothModifierData *)md)->sim_parms = NULL; + ((ClothModifierData *)md)->coll_parms = NULL; + ((ClothModifierData *)md)->point_cache = NULL; + next=md->next; + BLI_remlink(&ob->modifiers, md); + md = next; + } + else + md = md->next; + } + } + } /* WATCH IT!!!: pointers from libdata have not been converted yet here! */ /* WATCH IT 2!: Userdef struct init has to be in src/usiblender.c! */ diff --git a/source/blender/makesdna/intern/SConscript b/source/blender/makesdna/intern/SConscript index 872fd515f1d..574e289d3a9 100644 --- a/source/blender/makesdna/intern/SConscript +++ b/source/blender/makesdna/intern/SConscript @@ -25,6 +25,7 @@ if sys.platform != 'cygwin': makesdna_tool.Append (CCFLAGS = cflags) makesdna_tool.Append (CPPDEFINES = defines) makesdna_tool.Append (LIBPATH = '#'+root_build_dir+'/lib') +makesdna_tool.Append (LINKFLAGS = env['PLATFORM_LINKFLAGS']) if env['BF_PROFILE']: makesdna_tool.Append (LINKFLAGS = env['BF_PROFILE_FLAGS']) diff --git a/source/blender/python/api2_2x/MTex.c b/source/blender/python/api2_2x/MTex.c index f5d93935fd3..b9a8f7fff65 100644 --- a/source/blender/python/api2_2x/MTex.c +++ b/source/blender/python/api2_2x/MTex.c @@ -143,8 +143,11 @@ static PyGetSetDef MTex_getseters[] = { "Correct normal mapping for Texture space and Object space", (void*) MTEX_VIEWSPACE }, { "fromDupli", (getter) MTex_getFlag, (setter) MTex_setFlag, - "If object is duplicated by vertices, faces or particles, inherit texture coordinate from parent object", + "Dupli's instanced from verts, faces or particles, inherit texture coordinate from their parent", (void*) MTEX_DUPLI_MAPTO }, + { "fromOrig", (getter) MTex_getFlag, (setter) MTex_setFlag, + "Dupli's derive their object coordinates from the original objects transformation", + (void*) MTEX_OB_DUPLI_ORIG }, { "xproj", (getter) MTex_getProjX, (setter) MTex_setProjX, "Projection of X axis to Texture space", NULL }, { "yproj", (getter) MTex_getProjY, (setter) MTex_setProjY, diff --git a/source/blender/python/api2_2x/doc/Texture.py b/source/blender/python/api2_2x/doc/Texture.py index 8b29d91ca19..5161ac5ea56 100644 --- a/source/blender/python/api2_2x/doc/Texture.py +++ b/source/blender/python/api2_2x/doc/Texture.py @@ -515,7 +515,8 @@ class MTex: @ivar neg: Negate texture values mode @ivar noRGB: Convert texture RGB values to intensity values @ivar correctNor: Correct normal mapping for Texture space and Object space - @ivar fromDupli: If object is duplicated by vertices, faces or particles, inherit texture coordinate from parent object + @ivar fromDupli: Dupli's instanced from verts, faces or particles, inherit texture coordinate from their parent + @ivar fromOrig: Dupli's derive their object coordinates from the original objects transformation @ivar xproj: Projection of X axis to Texture space. L{Proj} @ivar yproj: Projection of Y axis to Texture space. L{Proj} @ivar zproj: Projection of Z axis to Texture space. L{Proj} diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c index 9fd0c247aaf..2088ebb3674 100644 --- a/source/blender/render/intern/source/rendercore.c +++ b/source/blender/render/intern/source/rendercore.c @@ -2242,8 +2242,11 @@ static void do_bake_shade(void *handle, int x, int y, float u, float v) } } - if (hit && bs->type==RE_BAKE_DISPLACEMENT) {; - bake_displacement(handle, shi, (dir==-1)? mindist:-mindist, x, y); + if (bs->type==RE_BAKE_DISPLACEMENT) { + if(hit) + bake_displacement(handle, shi, (dir==-1)? mindist:-mindist, x, y); + else + bake_displacement(handle, shi, 0.0f, x, y); return; } diff --git a/source/blender/src/buttons_shading.c b/source/blender/src/buttons_shading.c index 4500fc4a08c..5e420ade204 100644 --- a/source/blender/src/buttons_shading.c +++ b/source/blender/src/buttons_shading.c @@ -3440,9 +3440,9 @@ static void material_panel_map_input(Object *ob, Material *ma) uiBlockEndAlign(block); if(ELEM(mtex->texco, TEXCO_UV, TEXCO_ORCO)) - uiDefButBitS(block, TOG, MTEX_DUPLI_MAPTO, B_MATPRV, "From Dupli", 820,140,88,18, &(mtex->texflag), 0, 0, 0, 0, "If object is duplicated by vertices, faces or particles, inherit texture coordinate from parent object"); + uiDefButBitS(block, TOG, MTEX_DUPLI_MAPTO, B_MATPRV, "From Dupli", 820,140,88,18, &(mtex->texflag), 0, 0, 0, 0, "Dupli's instanced from verts, faces or particles, inherit texture coordinate from their parent"); else if(mtex->texco == TEXCO_OBJECT) - uiDefButBitS(block, TOG, MTEX_OB_DUPLI_ORIG, B_MATPRV, "From Original", 820,140,88,18, &(mtex->texflag), 0, 0, 0, 0, "If object is duplicated, use object coordinates as if the object was in its original position"); + uiDefButBitS(block, TOG, MTEX_OB_DUPLI_ORIG, B_MATPRV, "From Original", 820,140,88,18, &(mtex->texflag), 0, 0, 0, 0, "Dupli's derive their object coordinates from the original objects transformation"); /* COORDS */ diff --git a/tools/btools.py b/tools/btools.py index 8e195de2727..51367d6bd42 100755 --- a/tools/btools.py +++ b/tools/btools.py @@ -63,14 +63,17 @@ def validate_arguments(args, bc): 'WITHOUT_BF_INSTALL', 'WITH_BF_OPENMP', 'WITHOUT_BF_INSTALL', - 'BF_FANCY', 'BF_QUIET' + 'BF_FANCY', 'BF_QUIET', + 'BF_X264_CONFIG', + 'BF_XVIDCORE_CONFIG', ] arg_list = ['BF_DEBUG', 'BF_QUIET', 'BF_CROSS', 'BF_UPDATE', 'BF_INSTALLDIR', 'BF_TOOLSET', 'BF_BINNAME', 'BF_BUILDDIR', 'BF_FANCY', 'BF_QUICK', 'BF_PROFILE', 'BF_DEBUG_FLAGS', 'BF_BSC', 'BF_CONFIG', - 'BF_PRIORITYLIST', 'BF_BUILDINFO','CC', 'CXX', "BF_QUICKDEBUG", "BF_LISTDEBUG", 'LCGDIR'] + 'BF_PRIORITYLIST', 'BF_BUILDINFO','CC', 'CXX', 'BF_QUICKDEBUG', + 'BF_LISTDEBUG', 'LCGDIR', 'BF_X264_CONFIG', 'BF_XVIDCORE_CONFIG'] all_list = opts_list + arg_list okdict = {} @@ -315,6 +318,9 @@ def read_opts(cfg, args): (BoolOption('BF_QUIET', 'Enable silent output if true', 'true')), (BoolOption('WITH_BF_BINRELOC', 'Enable relocatable binary (linux only)', 'false')), + ('BF_X264_CONFIG', 'configuration flags for x264', ''), + ('BF_XVIDCORE_CONFIG', 'configuration flags for xvidcore', ''), + ) # end of opts.AddOptions() return localopts