[Bf-committers] "Experimental" pydna

Brecht Van Lommel brechtvanlommel at pandora.be
Sun Apr 3 18:20:28 CEST 2011


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
>


More information about the Bf-committers mailing list