[Bf-committers] XML Patches

Ton Roosendaal bf-committers@blender.org
Mon, 25 Aug 2003 15:29:31 +0200


Hi Philipp,

The save-to xml part looks clean, not too much code, nice!
A few remarks on the code itself:

- always comply to the used C/C++ style when you work on someone else's =20=

code. You did that in some cases, but not in 'writestruct()' for =20
example.
- I think it could be wise to make the xml counterparts of 'readfile.c' =20=

and 'writefile.c' where the new code resides, with minimal =20
calls/changes in the original files.

Things to notice, also for documenting and reading xml;

- the function "void writedata" is used in Blender to save datablocks =20=

that are not structs... this hardly happens, but still does =20
occasionally. For example the array with knot values of a Nurbs are =20
saved that way.
You seem to dump it as 'binary code' now in XML. Something we should =20
look at.

- packed files? I think that's something XML-blend just can tell not to =20=

support, doesn't make sense for ascii formats.

- The Library block in Blender files contains ID links to used data =20
from other files... is that something we want in XML as well?

- I don't see a general header yet, with version number for example. =20
Maybe I missed it? Will there be a default extension, or magic number =20=

in a file?

- when reading back XML, a user should decide to either read it (like =20=

.blend) or append it (like SHIFT+F1). I prefer a transparant inferface =20=

for it, where F1 is used for both .blend and .blendxml. It would be =20
good to have a few checks available to evaluate fitness of an xml file. =20=

I can provide you a call that makes a default Screen and Scene, in case =20=

the .blendxml doesnt have it.

- describe the new dependency to the XSLT module. What is it? Where you =20=

load it, who maintains it, which version we stick to, static or =20
dynamic, what is the binary size, where to put it in our cvs?

Thanks! :)

-Ton-




On Monday, Aug 18, 2003, at 00:19 Europe/Amsterdam, Philipp G=FChring =20=

wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> Ok, and finally the User Interface for it, XML saving support is now =20=

> complete.
>
> With this 2 patches you can decide upon XML vs. binary in the =20
> File-Options
> Menu now.
>
> They go against source/blender/src/headerbuttons.c and
> source/blender/src/usiblender.c
>
> Many greetings,
> - --
> ~ Philipp G=FChring              p.guehring@futureware.at
> ~ http://www.livingxml.net/       ICQ UIN: 6588261
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (GNU/Linux)
> Comment: For info see http://www.gnupg.org
>
> iD8DBQE/P/7DlqQ+F+0wB3oRAlbrAJ9cIAwPkNOtLpFmy6DyGiEogBwirgCgi2/a
> EFvSKi7KVwE8dyN+XQ3flt0=3D
> =3DlHuZ
> -----END PGP SIGNATURE-----
>
>
> <headerpatch><usipatch>
------------------------------------------------------------------------=20=

--
Ton Roosendaal  Blender Foundation ton@blender.org =20
http://www.blender.org