[Bf-committers] SDNA code and starting Python scripts from command line

Ton Roosendaal bf-committers@blender.org
Thu, 23 Jan 2003 13:12:43 +0100


Hi,

1. There's a sort-of python board now. They can review it. I wouldn't =20=

consider this a showstopper though... nice to put at the list to do!

2. In blender/source/blender/blenkernel/intern/blender.c there's a line =20=

setting global variable G.order. That's how the system's endianess is =20=

defined.
In each file there's a code for the endianness too. It's a hack: the =20
'magic number' of a file has info hidden in it:

BLENDER-V220
        ^     a '-' is 32 bits, a '_' is 64 bits files
         ^    a 'V' is big endian, a 'v' is little endian

-Ton-


in file blender/source/blender/blenloader/intern/readfile.c function =20
decode_blender_header is the code.



On Wednesday, Jan 22, 2003, at 14:26 Europe/Amsterdam, Gregor M=FCckl =20=

wrote:

> Hi!
>
> I have two questions:
>
> 1. It would be nice to be able to start Blender from commandline and =20=

> let it execute a Python script on the file. So starting blender like
>
> blender test.blend -script my_processing_script.py
>
> would make Blender open the file "test.blend" on startup, look for a =20=

> script in it called "my_processing_script.py" and execute that (and =20=

> maybe terminate after this - but this could be decided by the script =20=

> itself). What do you think? Could you add this feature?
>
> 2. Could someone please explain me how the SDNA parser in Blender =20
> decides when the file contents must be byte-swapped? I tried, but I =20=

> can't really understand that code.
>
> Thanks,
> Gregor
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers@blender.org
> http://www.blender.org/mailman/listinfo/bf-committers
>
>
------------------------------------------------------------------------=20=

--
Ton Roosendaal  Blender Foundation ton@blender.org