[Bf-committers] VRML exporter docs
Bart
bart at neeneenee.de
Sat Apr 9 10:34:49 CEST 2005
Hi Camp,
thanx for the reply (added isdigit). The exporter is based on the old
one shiped with Blender 2.36. Most code comes from Rick Kimball and
needs a lot of optimisation.
In this release i tweaked it and make it working much better, lot of new
features added too. Next version (1.6) will have more features but will
be a complete rewrite.
For this rewrite I saved all your hints. Thanx again.
Campbell Barton schrieb:
>
> replace line 834
> if newName[0] in ['0','1','2','3','4','5','6','7','8','9']:
> with
> if newName[0].isdigit():
>
>
> Why add a string at the end? Thats what string formatting is for. no
> biggie- but your doing it a lot.
> self.writeIndented("groundColor [ %s %s %s" % (round(grd0,self.cp),
> round(grd1,self.cp), round(grd2,self.cp)) + ",")
> with
> self.writeIndented("groundColor [ %s %s %s," % (round(grd0,self.cp),
> round(grd1,self.cp), round(grd2,self.cp)) )
>
> Probably the best way of indenting is this
> indent = [""]
> for i in xrange(40):
> indent.appden("%s\t" % indent[-1])
>
> file.write("%sfoobar\n" % indent[3]) # Indents without string generation
>
> if your paranoied that your going to get more then 40 indentatiuons,
> then do a .... Where i is the abbount your indenting
> i+=blah blah some unknown indent.
> file.write("%sfoobar\n" % indent[min(i, 40)])
>
> This is slightly better then the code I posted on blender.org
>
> - Cam
>
>
> Bart wrote:
>
>>
>> Found a proper way exporting face and vertex color:
>> http://www.neeneenee.de/blender/x3d/vrml97_export150.py.txt
>>
>> For this check out new help docs again (Textures and Materials)
>> http://www.neeneenee.de/blender/x3d/exporting_web3d.html
>>
>
>
--
|\/\/\/|
| |
| (O)(O) Bart.
C _) bart at neeneenee.de
| ,_/
| / - Ich bin nicht berechtigt Aushilfslehrer zu feuern -
/ \
http://www.neeneenee.de
More information about the Bf-committers
mailing list