[Bf-python] Other peoples scripts...
Campbell Barton
cbarton at metavr.com
Thu Dec 22 23:01:43 CET 2005
Hi All,
I had a look through some of the CVS scripts and theres a heap of bad
practices.
1) Using Object.Get() to export, this is realy bad because it exports
all scenes at once!
- XSI exporter is an offender on that one.
2) Converting to an nmesh 3 times! - Mostly Scorpius's I think, have a
header that needs updating, see then wings exporter as in example.
Theres no error checking either.
eg. from Wings export- off the top of my head but its used in raw,
radiance too.
*obj = Object.GetSelected()[0] # Bad since we might not even have 1 object.
dataname = obj.data.name
mesh = NMesh.GetRaw(obj.data.name)*
I went through and fixed all the times this happens. realy simple stuff.
mostly replaced
* obj.data.name*
with...
* obj.getData(name_only=1)*
Should I commit my fixes or contact the authors?
- Cam
--
Campbell J Barton
133 Hope Street
Geelong West, Victoria 3218 Australia
URL: http://www.metavr.com
e-mail: cbarton at metavr.com
phone: AU (03) 5229 0241
More information about the Bf-python
mailing list