[Bf-committers] "Experimental" pydna

Erwin Coumans erwin.coumans at gmail.com
Mon Apr 4 04:16:15 CEST 2011


By the way, Bullet has it's own DNA structures for its serialization, with a few extra features, not the Blender DNA ;)


Sent from my iPhone

On Apr 3, 2011, at 5:44 PM, Campbell Barton <ideasman42 at gmail.com> wrote:

> @Brecht, great to see you added this, saving second life devs further
> headacheds.
> 
> Regarding PyDNA.
> Since image access was just an example use of pydna it could still be
> useful to allow access on windows.
> 
> I think it very unlikely this will become popular/common way to bypass
> our own API's since its such a hassle to work with, you really have to
> understand DNA structs in the first place.
> Even if someone uses, it wont be accepted into our addons repo.
> 
> Since Ton doesn't want this in blender and I'm not motivated to get
> this working in windows , probably it wont get in.
> 
> But! If someone wants to they can embed the DNAstr/DNAlen info into
> their python scripts (for 32 & 64bits) and use this on our stable
> windows releases without the patch (as Bullet does - see
> btSerializer.cpp).
> ... or they could read this info from a blend file header, so its not
> like this is a lot harder without the patch, it just means this info
> needs to be kept in sync manually.
> 
> Even though I'm happy with py/rna api like that there is a backdoor
> for special cases & debugging,
> Its also good hint we are writing an stupid API if people want to use
> pydna instead :-)
> 
> On Sun, Apr 3, 2011 at 4:20 PM, Brecht Van Lommel
> <brechtvanlommel at pandora.be> wrote:
>> Hi,
>> 
>> I've added simple Image.pixels access in svn now. It's not the most
>> efficient implementation but it should work, just be sure to copy out
>> all in the pixels into a list in one go, instead of accessing the
>> pixels one by one. All this DNA fiddling is much too complicated..
>> 
>> Brecht.
>> 
>> On Sun, Apr 3, 2011 at 5:42 PM, Domino Marama <domino at dominodesigns.info> wrote:
>>> On Sun, 2011-04-03 at 15:32 +0200, Ton Roosendaal wrote:
>>>> Hi all,
>>>> 
>>>> Last september, Revision 31766, Campbell added this:
>>>> -----------
>>>> ./intern/tools/pydna.py
>>>> Experimental module (for developers only), exposes DNA data via python
>>>> uses no blender/python modules, pure python + autogenerated ctypes api.
>>>> -----------
>>>> 
>>>> Since it allows full Blender data access, scripters are using it to
>>>> cover up for missing RNA parts. A 2nd Life developer in IRC asked if
>>>> we could enable it on the 2.57 release, by ensuring it works for
>>>> Windows as well (needs a small #ifdef DNA hack).
>>> 
>>> The problem is caused by Windows linker optimising away unreferenced
>>> globals.
>>> http://social.msdn.microsoft.com/forums/en-US/vclanguage/thread/2aa2e1b7-6677-4986-99cc-62f463c94ef3
>>> 
>>> What the 'hack' does is make sure the globals used by pydna aren't
>>> removed by the windows linker. As far as I know the standard behaviour
>>> on other platforms is to export the symbols for these globals not remove
>>> them.
>>> 
>>>> My suggestion would be to really not do this, it doesn't belong in
>>>> releases. By "fixing" this backdoor to work in all released binaries
>>>> we only will regret it later on. We don't have our RNA project for a
>>>> good reason...
>>> 
>>> I'm not sure I understand why there may be regrets for enabling this on
>>> all platforms. It opens up a workflow where python coders can prototype
>>> features that wouldn't be possible otherwise. This helps show what is
>>> needed for the official API.
>>> 
>>>> Because 2nd Life really needs image access, I advised them to provide
>>>> temporarily a special build for their users to survive the period
>>>> until we have our own decent working RNA level image access.
>>>> 
>>>> Please advise if that's acceptable?
>>> 
>>> The sculpt map format in Second Life is such an oddball, that there's
>>> really no workaround other than having pixel read and write functions.
>>> Currently pydna is our only option for that.
>>> 
>>> Due to the image support in Second Life, there's legacy content out
>>> there in bmp, tga and png formats. Besides the actual sculpt maps, I
>>> also generate UV layout guides so being able to see the image in Blender
>>> is also a necessary feature.
>>> 
>>> Is the plan to disable pydna on Linux and Mac then? We could probably
>>> manage if we only have to do Windows builds, but neither myself, who is
>>> developing the scripts, or Gaia, who tests on Windows and does the user
>>> support, have access to Macs.
>>> 
>>> Hopefully that covers the points Gaia couldn't in IRC :)
>>> 
>>> Best Wishes,
>>> Domino
>>> 
>>> _______________________________________________
>>> Bf-committers mailing list
>>> Bf-committers at blender.org
>>> http://lists.blender.org/mailman/listinfo/bf-committers
>>> 
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers
>> 
> 
> 
> 
> -- 
> - Campbell
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers


More information about the Bf-committers mailing list