Merged changes from trunk to soc-2008-mxcurioni, to revision 14603

This commit is contained in:
Maxime Curioni
2008-04-28 19:21:51 +00:00
12 changed files with 75 additions and 22 deletions

View File

@@ -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

View File

@@ -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:

View File

@@ -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()

View File

@@ -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);
}
}

View File

@@ -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 */
if (bpi->seqdata.seqar) {
MEM_freeN((void *)bpi->seqdata.seqar);
bpi->seqdata.seqar = NULL;
}
bpi->seqdata.scene = bpi->seqdata.scene->id.next;
}
} else {

View File

@@ -7594,6 +7594,31 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
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! */

View File

@@ -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'])

View File

@@ -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,

View File

@@ -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}

View File

@@ -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) {;
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;
}

View File

@@ -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 */

View File

@@ -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