Re: [Bf-committers] help with tessface, CustomData and MTFace

2014-01-05 Thread Tom Edwards
This should fix it:

(cdl[1])

Currently you are indexing into your reference!

On 05/01/2014 5:28 PM, Dalai Felinto wrote:
 Hi there,
 Anyone  familiar with CustomData and tessface here?

 I'm trying to figure out why this function is only working for the first face:
 https://github.com/dfelinto/blender-git/blob/bake-cycles/source/blender/render/intern/source/bake_new.c#L104

 I'm getting bad data when trying to read the MTFace for any face that
 is not the first one:

 ((MTFace *)cdl[0])-uv
 {0.50238, 1}, {0, 0}, {1, 0}, {0, 0}}

 ((MTFace *)cdl[1])-uv
 {{0, 0}, {0.50238, 1}, {0, 0}, {0, 0}}

 ((MTFace *)cdl[2])-uv
 {{7.87199301e+31, 1.17082983e-19}, {2.17010503e-18,
 2.61866902e+20}, {2.61048549e+20, 2.95921708e+21}, {
6.9779858e+22, 4.66808809e+24}}

 As you can see the 2nd face is bad (2 verts are at 0, 0) and the 3rd
 one is totally bogus. The mesh itself is very simple, if you want to
 check out (it's the one in 3-Tris):
 http://www.pasteall.org/blend/26092

 While at there another question:
 Is there any way to get the number of verts of a MTFace?

 Thanks,
 Dalai
 --
 blendernetwork.org/dalai-felinto
 www.dalaifelinto.com
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers


___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] help with tessface, CustomData and MTFace

2014-01-05 Thread Tom Edwards
Built your patch and realised that cdl isn't MTFace**, which is what the 
fix I suggested is for. This is what you actually need:

MTFace *mtface = ((MTFace *) cdl)[i];

The original code was creating a ref to CustomDataLayer*, indexing into 
it, and only casting to MTFace* as the last step. The structs are 
different sizes so things ended up out of alignment.

I had to fix a heap corruption bug to get that far BTW...full patch at 
http://pastebin.com/RR4GPQJN. :-)

On 05/01/2014 6:25 PM, Dalai Felinto wrote:
 Hi,

 This should fix it:
 (cdl[1])
 Sorry, but where would that be? Because If I do:
 (1) MTFace *mtface = (MTFace *)cdl[i];

 As it is now, or if I do:
 (2) MTFace *mtface = (MTFace *)(cdl[i]);

 They all produce the same result

 I just committed (bc3d601 in the branch) a temporary printf code to
 illustrate better how I'm getting the values:
 https://github.com/dfelinto/blender-git/blob/bake-cycles/source/blender/render/intern/source/bake_new.c#L142

 It produces this output:
 face: 0
 vec[0]: 0.50, 1.00
 vec[1]: 0.00, 0.00
 vec[2]: 1.00, 0.00
 vec[3]: 0.00, 0.00

 face: 1
 vec[0]: 0.00, 0.00
 vec[1]: 0.50, 1.00
 vec[2]: 0.00, 0.00
 vec[3]: 0.00, 0.00

 face: 2
 vec[0]: 78719930099698347488497473945600.00, 0.00
 vec[1]: 0.00, 261866902067410370560.00
 vec[2]: 261048548756996227072.00, 2959217080378280902656.00
 vec[3]: 69779857993988661313536.00, 4668088091354259464912896.00

 Thanks,
 Dalai
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers


___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


[Bf-committers] Patch: DatablockProperty and DatablockVectorProperty

2013-12-09 Thread Tom Edwards
I've just submitted a fairly hefty patch which allows scripts to create 
ID Properties which reference other other IDs.

http://developer.blender.org/T37754

Feedback welcome!
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


[Bf-committers] Editing bugs

2013-12-06 Thread Tom Edwards
I can't edit my bug reports on the new tracker. When I try I see an 
error which includes this line:

 The owner of a task can always view and edit it.

Aren't I the owner of the task?
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Editing bugs

2013-12-06 Thread Tom Edwards
Thanks!

On 06/12/2013 2:35, Brecht Van Lommel wrote:
 The owner of the task is the assignee.

 I'd like to let authors edit their tasks, but there is currently no
 way to configure this, so we have to implement that in phabricator,
 projects.blender.org didn't allow it either for what it's worth.

 For now I've added you to the moderators project so you can edit the
 entry (it's not really an exclusive club, just exists so random people
 can't spam and make a mess).

 Brecht.

 On Fri, Dec 6, 2013 at 1:14 PM, Tom Edwards cont...@steamreview.org wrote:
 I can't edit my bug reports on the new tracker. When I try I see an
 error which includes this line:

 The owner of a task can always view and edit it.
 Aren't I the owner of the task?
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers


___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


[Bf-committers] MSVC compile error

2013-12-04 Thread Tom Edwards
Campbell's commit a9b97dcf creates a call to alloca, which is undefined. 
blenlib/BLI_linklist_stack.h needs `#include malloc.h`.

Thanks!
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


[Bf-committers] progress_update message pumping

2013-10-10 Thread Tom Edwards
https://codereview.appspot.com/14454056/

This patch makes the wm.progress_update bpy methods pump the message queue.

Results are:

* Users can cancel scripts with Esc
* User input is ignored until the script finishes (except Esc)
* Blender's window can be moved, minimised etc. while the script is running
* On Windows, pumping avoids the Not Responding state

Scripts which don't call the progress_update methods (e.g. UI panels) 
are not affected by these changes.

Reviews please!
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] BGE: Removing Singletexture Mode

2013-09-11 Thread Tom Edwards
Windows' native OpenGL implementation only does 1.1. You need 
vendor-specific drivers installed to go any higher.

http://www.opengl.org/wiki/Getting_Started#Windows

On 11/09/2013 9:27, David Jeske wrote:
 why not have the legacy rasterizer use the transitional GLSL 1.2 instead of
 multitexture? is there userbase out there with pre opengl 2 / glsl 1.2
 hardware?
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers


___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Steam-powered Blender

2013-08-28 Thread Tom Edwards
There's lots of help and guidance available once you're logged into 
https://partner.steamgames.com/.

I've used the partner site a lot and would be quite happy to handle it 
for Blender, if I'm trusted enough. :)

On 28/08/2013 1:36, Jan Albartus wrote:
 Hi all,

 Some things concerning the actual publishing of Blender on Steam. I
 don't know if this is to soon to discuss, but I think some of the issues
 need to be tackled before Blender can appear on Steam.

 Blender is available as 32-bit and 64-bit applications on various
 platforms. I assume Steam has functionality to auto-detect and
 downloading the correct Blender version for that. Using 64-bit versions
 on a 64-bit platform is preferred.

 The actual Publishing part of Blender onto the Steam store; I assume
 Valve is willing to assist in this matter? Would Valve just take the zip
 files from Blender.org after a new Blender has been released?


 Besides the software itself, Steam also requires some artwork assets:

 - Screen-shots: The Steam store page shows screenshots for the
 application. 6 Blender screenshots can be found here;
 http://www.blender.org/blenderorg/blender-foundation/press/

 - Application banner/graphic in different sizes: These graphics show up
 on store pages, community pages and games library. I did some research
 but could not find any specific information about sizes and formats. I
 would assume these need to be prepared as well before Blender is put on
 Steam. Maybe JP could provide some details. People can check out the
 steam store to get a feeling how these images are used.

 Regards,
 Jan 'LOGAN' Albartus


 On 2013-08-28 10:00, Jan-Peter Ewert wrote:
 Hi Ton,

 We are currently working on improving the ingestion process for various file 
 formats on our end, but that is indeed an entirely different topic. I don't 
 expect an import path for .blend files to happen anytime soon, since these 
 can do a lot more than what we will probably ever need.

 A more realistic goal would be to work on improved import and export paths 
 between Blender and game engine files, including solid support for character 
 rigging, weight maps, facial animation setups etc. Doing that within Blender 
 plugins and making these available both to the general Blender community at 
 Blender.org and via Steam seems to be the best way from my perspective to 
 gain momentum.

 I believe the right order should be to bring the current version of Blender 
 to Steam soon, with a few useful existing plugins included in the initial 
 download or as DLC, and to go from there in making people on Steam 
 interested in Blender. That's something that could happen within the next 
 couple of weeks within our regular release calendar.

 Best, Jan-Peter

 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers


___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Steam-powered Blender

2013-08-14 Thread Tom Edwards
It will be possible to create QCs from a node graph once a custom 
property for datablocks is added.

What's the news on that, BTW? When PyNodes was released it was listed as 
something that would be arriving soon...

On 14/08/2013 9:28, brook...@internode.on.net wrote:
   I have been a long time user of blender for source modding, and have
 been through all the add-ons that have been released. The most recent
 SMD/DMX tools by Varsity (of facepunch) are by far the best, and are
 really easy to use. The part that most people have trouble with in
 source is the compilation process, so you would want to have an
 automatic system for generating a .qc through the blender addon (like
 the one used by GUIstudiomdl, for instance) for new users. The
 .smd/dmx files and the .qc could be uploaded together and compiled
 remotely (and locally for testing). This would maximize useability for
 new modelers I think.
   
   Another major feature that would be very useful for modders is the
 ability to create source materials for their models directly within
 blender. At the moment there is no VTF support, so we use tga or png
 and convert them externally. Blender already has a good material
 system but being able to generate a .vmt from your material settings
 would be great as well. At least the basics like phong/cubemap and
 normals. These two features would immediately allow people who already
 model with blender to make models straight away.
   
   Hell I have a whole list of stuff but I digress.
   
   I'd be up for providing training for modelers to use the tools, I
 have already been making tutorial videos and such on youtube, but the
 majority of my input has been streaming to online classrooms via
 Livestream. I would love to help out in any way I can, be that testing
 or providing some service to the community. My support is behind
 providing Blender with the SMD/DMX tools already installed and
 automatically maintained. Great that you guys are even considering
 this!
   
   - Abe (Black_Stormy)

 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers


___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Steam-powered Blender

2013-08-13 Thread Tom Edwards
Hi John. I'm not part of the BF team but I do make the SMD/DMX addon 
that everyone uses for Source games 
(http://code.google.com/p/blender-smd/). I'd be very interested in 
integrating it with Steam!

On 13/08/2013 9:25, Jan-Peter Ewert wrote:
 Hi everyone,
 I work for Valve (http://www.valvesoftware.com/company/). We would like to 
 make our digital distribution platform Steam 
 (www.steampowered.comhttp://www.steampowered.com) one of the places where 
 you can download Blender. The long-term goal would be to make it easier for 
 people to build their own mods for PC games with Blender and share these mods 
 with other gamers.
 So I was wondering if there are any Blender users on this list who are 
 interested in PC games and could see themselves working on an integration 
 between Blender and PC games that offer official modding support such as DOTA 
 2.

 Long story:
 Valve is a company that is built on modding. The original Half-Life was built 
 on a modified version of the Quake engine. All our major games since then 
 started out as mods which we found cool, hired the people who built them and 
 released them as major game titles. This is true for Counter-Strike, the 
 original Team Fortress, Day of Defeat and DOTA 2 (Portal was not technically 
 a mod but a student project - but you see the pattern).
 Similarly, one of the most successful features of our Steam platform is the 
 Steam Workshop (http://steamcommunity.com/workshop/), which is an interface 
 for users to share, discover and install mods for their games. Essentially, 
 you can publish your mod there and other gamers can bring your mod into their 
 games with a single mouse click.
 This is something that we think would be a cool feature for Blender to tap 
 into.  Like modeling a sword in Blender, pushing a button and having it 
 available to all users of Skyrim. But we bet there are more creative ideas 
 out there than this one.
 What we are currently looking at is offering a completely vanilla version of 
 Blender as a free download on Steam that is completely the same as that 
 offered on other websites. We'd hope that this will get enough of our users 
 exposed to and interested in Blender so they will be inclined to work on 
 Blender plugins that would talk to Steam's backend services such as Workshop.
 If you think you might be interested in being part of that, we'd be happy to 
 hear from you!
 Best,
 Jan-Peter
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers


___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] FCurve Python update patch

2013-07-17 Thread Tom Edwards
Here's a script:

import bpy

o = bpy.context.active_object
if not o.animation_data: o.animation_data_create()

a = o.animation_data.action = bpy.data.actions.new(Test Action)

c = a.fcurves.new(data_path=location,index=2)

c.keyframe_points.add(3)
c.keyframe_points[0].co = [0, 0]
c.keyframe_points[1].co = [4, 1.5]
c.keyframe_points[2].co = [8, 0]

This is what I see (note the orange handle line): 
http://img46.imageshack.us/img46/8609/aath.png

Editing the curve or even starting an edit then cancelling it causes the 
handles to pop into the correct position.

On 17/07/2013 5:46, Dan Eicher wrote:
 HI,

 Do you have some code that shows how this fails because it really should
 happen automagically, probably just a missing update event somewhere.

 Dan
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers


___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


[Bf-committers] FCurve Python update patch

2013-07-16 Thread Tom Edwards
Hi all, I've just submitted a quick patch to directly expose various 
internal FCurve update and sanity-checking functions to Python scripts.

https://projects.blender.org/tracker/index.php?func=detailaid=36168group_id=9atid=127

This helps animation import scripts. Quoting from the page above: 
Triggering the update functions previously required running a curve 
operator of some sort, all of which check the context for UI state. 
Setting up and then reverting the UI state was a pain when Blender was 
running with UI and impossible when it was running in background mode.
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] New-User Interface Proposal

2012-03-30 Thread Tom Edwards
I have to agree with Gianmichele. It's overkill to create a new UI for 
the first-time user, especially as they will need to switch over to and 
learn the full one eventually.

What I would like to see (and as a fellow game dev this should come 
naturally!) is an inline tutorial displayed in a series of window 
overlays. It would avoid users learning a second UI and be reusable for 
on-demand help for advanced topics.

On 30/03/2012 10:57, Gianmichele Mariani wrote:
 I can understand your point of view, but most of the things that you
 describe, except for the Object/Edit/Other various modes and the cosmetics,
 can already be done in Blender.

 I think we're trying to solve lack of a good documentation by just changing
 Blender's interface. And believe me changing to edit mode is a lot easier
 than having to find an editable mesh modifier in 3ds max!

 I have made a fully functional Maya keymap, that other artists in the
 studio where I work are using, easing their transition in a tremendous way.
 Unfortunately due to a bug in the export/import code I have not made it
 public yet (you can download the startup.blend file from the bug attachment
 in the tracker if you want to try it). I'm also recording a pretty
 extensive video guide for Maya users that want to quickly migrate to
 Blender.

 I think that clearly documenting this is a much clever way of attracting
 other artists to the software, rather than trying to change drastically
 Blender.

 Hope this helps.

 Just my 2c.

 Gian

 On Fri, Mar 30, 2012 at 10:33 PM, Jorge Rodriguez
 jo...@lunarworkshop.comwrote:

 Hello! I've submitted my GSoC proposal about making an interface for
 Blender that is targeted to new users:


 http://www.google-melange.com/gsoc/proposal/review/google/gsoc2012/vino/21001

 I would love to hear some feedback and thoughts on how I can improve the
 proposal and thus my chances of it being accepted. Thanks!

 --
 Jorge Vino Rodriguez
 jo...@lunarworkshop.com
 twitter: VinoBS
 919.757.3066
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] collapse/flatten modifier stack?

2012-03-21 Thread Tom Edwards
You're missing this:

bpy.ops.object.convert(keep_original=True)

Which is exactly what you want. It is quite obscure though!

On 21/03/2012 9:04, Bassam Kurdali wrote:
 Hello list,
 This has come up before, albeit in a python context: the desire to get
 the result of the modifier stack as a mesh. There was some discussion
 over the desirability of hard-coded py api, and a question of why not
 just use the apply modifier approach one by one.

 I've encountered both the use-case and the problem today.

 use-case: collapsing the stack/applying shapekeys for prepping a rigged
 model for 3d printing.

 problem: this is the first 'cannot be done' problem I've encountered:

 Multimodifiers (correct me if I'm wrong) cannot be simply applied one by
 one: they need to be applied together. And afaik there is no mechanism
 to do this.

 Is there anything I'm missing? this seems totally undoable, I wonder how
 render-engines deal with it?

 cheers,
 Bassam

 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Reference counting, deleting data and fake users

2012-03-14 Thread Tom Edwards
This is a problem specific to Actions. An object can have any number of 
relevant Actions, but it can only _use_ one at a time. Shameless plug: 
there's a patch at 
http://projects.blender.org/tracker/index.php?func=detailaid=28453 
that fixes this problem.

It's possible to get into this situation with other data types, but that 
requires the user to do advanced things like manually change an object's 
data or to explicitly delete the datablock.

On 14/03/2012 6:20, Antony Riakiotakis wrote:
 Interesting ranting post on blenderartists about data lost due to user
 not setting fake user on datablock.

 http://blenderartists.org/forum/showthread.php?248813-MAJOR-BUG-in-2.62-loosing-Actions/page1

 The point is, in my opinion: Should the user care about the number of
 datablock references? This looks like something that would concern the
 reference counting system of a memory manager/garbage collector rather
 than users.

 This would not have been a problem if we had an explicit way to delete
 data and data always stayed in blender even after closing the program.
 A user will usually want his data to stay if he creates it and go if
 he deletes it. Currently there are two problems with the approach we
 have: 1) You have to close the program to delete all unreferenced data
 and 2) You can't create a library of datablocks without explicitly
 setting a fake user, which is not the best of options.

 I realize this might have been a popular theme of debate but I am not
 up to the facts. Is this a design choice or simply not  implemented
 yet? Is this part of the asset browser project?
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] HDR rendering using 8bpc

2012-03-11 Thread Tom Edwards
8-bit HDR is (shock horror!) low quality stuff which leads to a lot of 
colour banding. The performance boost is good for games, but not worth 
it for rendering. :)

On 10/03/2012 10:57, Tom M wrote:
 You might find this interesting,

 Brian Karis links to my LogLUV post while pointing out that there’s
 another kid in town: RGBM color encoding. In fact, we are using a
 version of RGBM (different from Brian’s), not LogLUV, to represent HDR
 in God of War III. A third version of RGBM is described by Malte
 Clasen in HDR values in 8 bit RGBA pixels. (see the links in the
 actual post)

 http://realtimecollisiondetection.net/blog/?p=93#more-93

 Lots of worthwhile reading...
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


[Bf-committers] Starting blender up maximised

2012-03-11 Thread Tom Edwards
Now that Blender can store window state, what do people think of making 
startup.blend default to maximised?

The startup file defines the position and state of the main window even 
if you load another blend file, so if it stays 
maximum-size-but-not-maximised I'm concerned that very few people will 
notice the fix.

Case in point: I was in IRC yesterday and somebody was saying that their 
main window size changed to half of the screen once and they had been 
stuck with it that way ever since. It seems that updating your user 
prefs to change the default window position isn't very intuitive.
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] HDR rendering using 8bpc

2012-03-11 Thread Tom Edwards
Well okay, perhaps lots was an overstatement. But there is 
nevertheless noticeable banding, particularly if you use the image in a 
skybox like I did. Have a look at the colour distribution chart here: 
http://iwasbeingirony.blogspot.com/2010/06/difference-between-rgbm-and-rgbd.html.

On 11/03/2012 2:57, Tom M wrote:
 On Sun, Mar 11, 2012 at 2:07 AM, Tom Edwardscont...@steamreview.org  wrote:
 8-bit HDR is (shock horror!) low quality stuff which leads to a lot of
 colour banding. The performance boost is good for games, but not worth
 it for rendering. :)
 Actually if you read the articles there wasn't any color banding
 observed even in the most extreme test they tried.

 LetterRip
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] HDR rendering using 8bpc

2012-03-11 Thread Tom Edwards
Here's exactly what I'm talking about: 
http://img15.imageshack.us/img15/745/rgbm.png

Left side 16-bit float, right side 8-bit RGBM. As you can see RGBM is 
okay in bright and dark areas, but really suffers in between.

(No idea why the RGBM image is darker BTW, not seen that before.)

On 11/03/2012 6:24, Tom Edwards wrote:
 Well okay, perhaps lots was an overstatement. But there is
 nevertheless noticeable banding, particularly if you use the image in a
 skybox like I did. Have a look at the colour distribution chart here:
 http://iwasbeingirony.blogspot.com/2010/06/difference-between-rgbm-and-rgbd.html.

 On 11/03/2012 2:57, Tom M wrote:
 On Sun, Mar 11, 2012 at 2:07 AM, Tom Edwardscont...@steamreview.org   
 wrote:
 8-bit HDR is (shock horror!) low quality stuff which leads to a lot of
 colour banding. The performance boost is good for games, but not worth
 it for rendering. :)
 Actually if you read the articles there wasn't any color banding
 observed even in the most extreme test they tried.

 LetterRip
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Makesdna fails with wrong pointer syntax

2012-03-05 Thread Tom Edwards
I don't mind if it throws an error, just so long as it throws one.

On 05/03/2012 12:31, Joshua Leung wrote:
 Legal but semantically confusing:
 ID* a, b, c;--- only a is pointer, b and c are not.

 IMO this is bad style, and I'm glad that makesdna actually ends up
 enforcing it, albeit with a confusing error message. So, a big -1 to
 this idea from me.

 On Mon, Mar 5, 2012 at 1:20 PM, Tom Edwardscont...@steamreview.org  wrote:
 Hi everyone. I just spent 1hr+ hunting an annoying bug down. The
 following declaration in a DNA header will cause makesdna to fail with a
 generic strut unknown error, despite being entirely legal:

 ID* data;

 Putting the space in front of the asterisk avoids the problem. Fix
 please? :)
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


[Bf-committers] ListBase vs. slots

2012-03-05 Thread Tom Edwards
I'm trying to refactor some code from the array of pointers solution 
used by material/texture slots to ListBase, as a result of code review. 
But I'm beginning to think that Blender doesn't support that.

The code in question is my Action Library patch from last October. It 
allows AnimData to store a list of associated Actions in addition to the 
single active action it currently stores. 
http://projects.blender.org/tracker/index.php?func=detailaid=28453group_id=9atid=127

ListBase usually takes IDs directly, but since I'm not creating a global 
list of IDs I am having to use LinkData instead. For reference:

typedef struct LinkData
{
 struct LinkData *next, *prev;
 void *data;
} LinkData;

This works fine in C, but accessing items with Python crashes. Python 
can walk the list just fine (*next and *prev are as it expects) but 
doesn't seem to understand the *data indirection of LinkData.

Is there a RNA setting I've overlooked here? If not, I vote for 
supporting ListBase-LinkData collections. They are immediately 
applicable to material slots, texture slots, and I suspect particle 
system settings too. :)
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] ListBase vs. slots

2012-03-05 Thread Tom Edwards
OK, solved it in the RNA get function:

static PointerRNA rna_actlib_get(CollectionPropertyIterator *iter)
{
 return rna_pointer_inherit_refine(iter-parent, RNA_Action, 
((LinkData*)rna_iterator_listbase_get(iter))-data);
}

That's what needs to be offered by the API.

On 05/03/2012 10:48, Tom Edwards wrote:
 I'm trying to refactor some code from the array of pointers solution
 used by material/texture slots to ListBase, as a result of code review.
 But I'm beginning to think that Blender doesn't support that.

 The code in question is my Action Library patch from last October. It
 allows AnimData to store a list of associated Actions in addition to the
 single active action it currently stores.
 http://projects.blender.org/tracker/index.php?func=detailaid=28453group_id=9atid=127

 ListBase usually takes IDs directly, but since I'm not creating a global
 list of IDs I am having to use LinkData instead. For reference:

 typedef struct LinkData
 {
   struct LinkData *next, *prev;
   void *data;
 } LinkData;

 This works fine in C, but accessing items with Python crashes. Python
 can walk the list just fine (*next and *prev are as it expects) but
 doesn't seem to understand the *data indirection of LinkData.

 Is there a RNA setting I've overlooked here? If not, I vote for
 supporting ListBase-LinkData collections. They are immediately
 applicable to material slots, texture slots, and I suspect particle
 system settings too. :)
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


[Bf-committers] Makesdna fails with wrong pointer syntax

2012-03-04 Thread Tom Edwards
Hi everyone. I just spent 1hr+ hunting an annoying bug down. The 
following declaration in a DNA header will cause makesdna to fail with a 
generic strut unknown error, despite being entirely legal:

ID* data;

Putting the space in front of the asterisk avoids the problem. Fix 
please? :)
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Fully qualified names for channels in actions?

2011-09-19 Thread Tom Edwards
You can add a constraint that forces one object to move with the other.

On 19/09/2011 6:06, Tobias Oelgarte wrote:
 I just stumbled upon a simple task. I have two objects (a sphere and a
 cube for example) and i wanted to control their locations with _one_
 action. That simply isn't possible with one action alone, since both
 objects will share the location-channel (sitting on top of each other).
 Is there a way to store the location of two objects in one action or
 will i have to combine both actions with the NLA or the need to parent
 both to the bones of an armature?

 If it isn't possible, wouldn't it not make sense to (optionally) use
 something like fully qualified names in a way, that both locations could
 be stored inside the same action? I may be wrong, but i would find it
 useful for this properties.

 Greetings from
 Tobias Oelgarte
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Two new patches

2011-08-31 Thread Tom Edwards
I made the patch because PFM is the only format from which HDR skyboxes 
and cubemaps 
http://developer.valvesoftware.com/wiki/HDR_Skybox_Creation can be 
created for the Source game engine. I imagine that there are plenty of 
other obscure/proprietary texture tools that require it too, but I 
couldn't name any.

With the format being so simple it wouldn't surprise me to see people 
starting to include it in their own pipelines once it's a part of Blender.

On 31/08/2011 6:00, Campbell Barton wrote:
 Having support for a very simple floating point image format seems
 reasonable - EXR/TIFF/DPX/JPEG2000/HDR are a bit complicated requiring
 libs to properly support and some of these do conversions from float
 to fixed 16-32 bits per channel, gamma blah blah or use lossy
 compression.

 So I see there is something nice about being able to write a float
 image to disk without trying to be *smart* about it like DPX/KPEG2000
 do.

 The patch is very small and other apps support it so should be ok?
 ...I'd like to know anyone uses this image format though, or if there
 are areas where its in common use.

 On Thu, Aug 25, 2011 at 1:05 AM, Tom Edwardscont...@steamreview.org  wrote:
 I've submitted a couple of patches recently:

 Better Environment Map scripting:
 http://projects.blender.org/tracker/index.php?func=detailaid=28355group_id=9atid=127

 Portable Floatmap format support:
 http://projects.blender.org/tracker/index.php?func=detailaid=28360group_id=9atid=127

 Any thoughts?
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers



___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39760] trunk/blender/source/blender: patch [#28355] Better Environment Map scripting

2011-08-29 Thread Tom Edwards
You're welcome. :)

On 29/08/2011 11:11, Αντώνης Ρυακιωτάκης wrote:
 At last! Thanks a lot Tom!
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


[Bf-committers] Two new patches

2011-08-24 Thread Tom Edwards
I've submitted a couple of patches recently:

Better Environment Map scripting:
http://projects.blender.org/tracker/index.php?func=detailaid=28355group_id=9atid=127

Portable Floatmap format support:
http://projects.blender.org/tracker/index.php?func=detailaid=28360group_id=9atid=127

Any thoughts?
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Blender incorpore encryption???

2011-08-21 Thread Tom Edwards
He might mean does Blender incorporate file encryption.

On 21/08/2011 10:14, Damir Prebeg wrote:
 ???

 On 21 August 2011 11:10, Fabio Gonzalezfabiojo...@gmail.com  wrote:
 Blender incorpore encryption???
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] 2008 vs 2010

2011-08-20 Thread Tom Edwards
If anything it will be slower. The biggest benefit (as long as you use 
the IDE) is that Intellisense was rewritten for 2010 and works much 
better with large projects like Blender.

On 20/08/2011 6:24, Yousef Hurfoush wrote:
 i was just wondering what benefits give us compiling blender in vc 2010 vs 
 2008, is it faster?

   
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


[Bf-committers] Environment map render op

2011-08-07 Thread Tom Edwards
A while ago I added a skip cameras option to the render operator (in 
my local copy), to improve the export of environment maps. This works 
well, but looking ahead to possible trunk integration I'm not sure that 
it is good API design: external renderers will need to be updated to 
account for both the new setting and, more importantly, the fact that a 
render can now go ahead without an active camera.

What is the best approach to making these changes play nicely? Do 
external renderers expect these kind of breaking changes on new Blender 
versions?
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Syntax Highlighting Alternate Languages

2011-07-27 Thread Tom Edwards
There's no reason to keep the keywords list as a Python var. Who needs 
constant access to it? It can be converted to a native C 
vector/array/whatever immediately. Any highlighting extension that isn't 
scriptable isn't worth doing IMO.

On 27/07/2011 9:25, Benjamin Tolputt wrote:
 I'm pretty sure that putting the parsing code into the Python layer 
 would slow the syntax highlighting code quite dramatically and, as 
 such, is not likely to get the core team approval (let alone be 
 appreciated by the users). I like the idea of that kind of 
 flexibility, but the code is currently quite low level  speedy 
 (integer comparisons from a char array). The speed hit to jump up to 
 Python (with the string passing, Python string comparisons, and return 
 path) is most likely going to rule this out almost completely. That 
 said, in terms of the priority request, I'm willing to do the 
 low-level code stuff myself. This isn't a request for other developers 
 to code something for me, it is a request to pre-check whether it is 
 worth putting the code together myself. It is contained in perhaps two 
 files, there are no changes to the API required, and it is very close 
 to a copy/paste job with alternate means of detecting comments, 
 strings, and special strings. The changes are small, there is no 
 performance penalty, and the upside is (for people like myself) quite 
 high. If I cannot get approval for this - I don't think integrating 
 Python would be worth mentioning ;) 
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Defaults for RNA array parameters

2011-07-26 Thread Tom Edwards
Everything is working now. :)

On 26/07/2011 5:02, Brecht Van Lommel wrote:
 Hi Tom,

 There was an error in the function calling code, fix in svn, hopefully
 it works now.

 Brecht.

 On Sun, Jul 24, 2011 at 12:02 AM, Tom Edwardscont...@steamreview.org  wrote:
 Brecht, I see uninitialised memory whenever I should see the default. It
 has never worked, and there are no code examples in the whole of Blender
 to go on.

 Declaring the array static doesn't help, but I must admit I hadn't
 thought of it!

 This is what ends up in rna_texture_gen.c:

 static float rna_EnvironmentMap_save_layout_default[12] = {
  0.0f,
  0.0f,
  0.0f,
  1.0f,
  0.0f,
  2.0f,
  1.0f,
  0.0f,
  1.0f,
  1.0f,
  1.0f,
  2.0f
 };

 FloatPropertyRNA rna_EnvironmentMap_save_layout = {
  {NULL, (PropertyRNA*)rna_EnvironmentMap_save_scene,
  -1, layout, 3, File layout,
  Snip,
  0,
  PROP_FLOAT, PROP_NONE|PROP_UNIT_NONE, NULL, 1, {12, 0, 0}, 12,
  NULL, 0, NULL, NULL,
  0, -1, NULL},
  NULL, NULL, NULL, NULL, NULL, 0.0f, 0.0f, -FLT_MAX, FLT_MAX, 1.0f,
 3, 0.0f, rna_EnvironmentMap_save_layout_default
 };
 Which does suggest that I'm doing things right...

 Here is the entire API:http://pastebin.com/VZdrDeMs. There wasn't a
 texture API at all before I started, if that makes any difference.

 On 23/07/2011 8:32, Brecht Van Lommel wrote:
 Hi Tom,

 It's not clear to me when you saw uninitialized memory, am I right
 thinking that the malloc made it work, but didn't look like a good
 solution? In other places the array is defined static to keep it in
 memory, without a malloc.

 Brecht.

 On Fri, Jul 22, 2011 at 3:45 PM, Tom Edwardscont...@steamreview.org
 wrote:
 I can't work out how to provide a default value for an RNA array
 parameter. Ominously, the unit tests don't cover this at all.

 The code is:

 const int default_layout_size = sizeof(float) * 12;
 const float default_layout_stack[] = { 0,0, 0,1, 0,2, 1,0, 1,1, 1,2 };

 float* default_layout_heap = (float*)malloc(default_layout_size);
 memcpy(default_layout_heap,default_layout_stack,default_layout_size);

 ...

 parm = RNA_def_float_array(func, layout, 12, default_layout_heap,
 0.0f, 0.0f, File layout, Snip, 0.0f, 0.0f);

 There is no problem if a value is provided, but the default appears to
 be uninitialised memory.
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


[Bf-committers] Defaults for RNA array parameters

2011-07-22 Thread Tom Edwards
I can't work out how to provide a default value for an RNA array 
parameter. Ominously, the unit tests don't cover this at all.

The code is:

const int default_layout_size = sizeof(float) * 12;
const float default_layout_stack[] = { 0,0, 0,1, 0,2, 1,0, 1,1, 1,2 };

float* default_layout_heap = (float*)malloc(default_layout_size);
memcpy(default_layout_heap,default_layout_stack,default_layout_size);

...

parm = RNA_def_float_array(func, layout, 12, default_layout_heap, 
0.0f, 0.0f, File layout, Snip, 0.0f, 0.0f);

There is no problem if a value is provided, but the default appears to 
be uninitialised memory.
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


[Bf-committers] python32_d.dll requires MSVC9

2011-07-21 Thread Tom Edwards
If VC9 is not installed, Blender debug builds quit with an application 
was unable to start correctly error as soon as they try to load the 
Python library.

The problem is that python32_d.dll was built with the VC9 debug CRT 
dynamically linked, and that the debug CRT is available only through an 
install of VC9. The solution is simply to recompile the DLL with the 
runtime statically linked (/MTd).

This is the only thing preventing VC10 builds from succeeding!
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Proposal: better envmap scripting

2011-07-21 Thread Tom Edwards
Then I'll begin. :)

On 20/07/2011 2:47, Tom Edwards wrote:
 Hello all. I'm currently writing an add-on to ease the export of renders
 and environment maps to the Source game engine, and I'm finding my
 options when it comes to envmaps extremely limited. I'd like to add the
 following functions:

 bpy.types.EnvironmentMap.save( filename, layout=(
 (0,0),(0,1),(0,2),(1,0),(1,1),(1,2) ) )

 Saves the envmap with the scene render settings. layout determines the
 location of each face in the output image; 1 == EnvironmentMap.resolution.

 bpy.types.EnvironmentMap.render(ignore_cache=False)

 Renders the envmap if it is stale. Ignores the camera and indeed goes
 ahead without one. Might render other envmaps for recursion.
 ignore_cache bypasses the normal envmap cache checks.

 bpy.types.EnvironmentMap.clear()

 Same as bpy.ops.texture.envmap_clear(), but without the overhead of
 setting up then reverting the context.


 Is there any reason why the above couldn't be added to trunk?
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] python32_d.dll requires MSVC9

2011-07-21 Thread Tom Edwards
Steady on, nobody is suggesting that. ;-)

On 21/07/2011 4:28, Shaul Kedem wrote:
 Well, not only... when running cmake with VC10 in builds that require
 boost and ioimage libs it will fail on them as well.

 If we want to upgrade to VC10 I think that we should abandon VC9 and
 do the move once and for all

 On Thu, Jul 21, 2011 at 8:12 AM, Tom Edwardscont...@steamreview.org  wrote:
 If VC9 is not installed, Blender debug builds quit with an application
 was unable to start correctly error as soon as they try to load the
 Python library.

 The problem is that python32_d.dll was built with the VC9 debug CRT
 dynamically linked, and that the debug CRT is available only through an
 install of VC9. The solution is simply to recompile the DLL with the
 runtime statically linked (/MTd).

 This is the only thing preventing VC10 builds from succeeding!
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


[Bf-committers] Proposal: better envmap scripting

2011-07-20 Thread Tom Edwards
Hello all. I'm currently writing an add-on to ease the export of renders 
and environment maps to the Source game engine, and I'm finding my 
options when it comes to envmaps extremely limited. I'd like to add the 
following functions:

bpy.types.EnvironmentMap.save( filename, layout=( 
(0,0),(0,1),(0,2),(1,0),(1,1),(1,2) ) )

Saves the envmap with the scene render settings. layout determines the 
location of each face in the output image; 1 == EnvironmentMap.resolution.

bpy.types.EnvironmentMap.render(ignore_cache=False)

Renders the envmap if it is stale. Ignores the camera and indeed goes 
ahead without one. Might render other envmaps for recursion. 
ignore_cache bypasses the normal envmap cache checks.

bpy.types.EnvironmentMap.clear()

Same as bpy.ops.texture.envmap_clear(), but without the overhead of 
setting up then reverting the context.


Is there any reason why the above couldn't be added to trunk?
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Compile Error on BLEN_VER_RC_1

2011-04-18 Thread Tom Edwards
It should be generated by source\creator\CMakeLists.txt line 104 onward. 
It works fine in VC9 though but there's a comment about it not building 
with VC10...is 10 actually supported?

On 18/04/2011 4:22, Steve Obbayi wrote:
 Hi all,

 I am getting this error building Rev. 36213 with Ms VC 2010

 ..\..\..\source\icons\winblender.rc(17): error RC2104: undefined keyword or 
 key name: BLEN_VER_RC_1

 I have not seen this before, does anyone know where that should be defined?

 Steve
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] help one script to clear all vertex groups of all models

2011-04-10 Thread Tom Edwards
for shape in obj.data.shape_keys.key_blocks:
 bpy.ops.object.shape_key_remove('EXEC_SCREEN')

On 09/04/2011 3:30, iozk hz wrote:
 hi i have a model that I link to new file but this have all vertex groups of
 the last skeleton and i want delete them quickly. somebody know how do it,
 without press the x button of the list to delete all groups
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


[Bf-committers] Revision 36036

2011-04-06 Thread Tom Edwards
http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36036

wm_init_exit.c (131) and (361) need updating. Windows builds currently fail.
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Revision 36036

2011-04-06 Thread Tom Edwards
No, that wasn't the problem. The problem is in wm_init_exit.c on lines 
131 and 361, which are still trying to call WM_toggle_console(). Both 
lines need updating to WM_console_toggle().

On 06/04/2011 11:03, Dalai Felinto wrote:
 Revision 36038 fix any eventual problems.

 In case it doesn't:
 - What OS (windows 32/64?) and build system?
 - Can you pasteall.org the complete error message?

 Thanks,
 Dalai

 2011/4/6 Tom Edwardscont...@steamreview.org:
 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=36036

 wm_init_exit.c (131) and (361) need updating. Windows builds currently fail.
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Defining new node types with Python

2011-03-05 Thread Tom Edwards
I don't really understand rendering, but in its own words that toolset 
hijacks Blender's existing shader nodes and re-purposes them, using 
hacks like storing information in each node's *location*! That's not 
going to help us.

It's a shame I graduated last year, as I would totally be up for 
implementing this through GSoC. I'm just surprised that it's a big 
enough job to warrant something like that...

On 04/03/2011 7:42, Toni Alatalo wrote:
 On Fri, 2011-03-04 at 17:01 +, Doug Hammond wrote:
 I'm also interested in python-defined nodes, but for a different purpose:
 external render engine material/texture setups.
 In my case, the nodes themselves needn't even calculate anything in Blender,
 they'd only need to serve as UI elements for material construction.
 Brett has used python defined nodes in this fashion for defining Ogre
 materials, http://pyppet.blogspot.com/2010/11/ogre-shader-nodes.html

 http://code.google.com/p/blender2ogre/wiki/ShaderNodes

 http://www.youtube.com/watch?v=Sn2Zhh72emk

 Doug.
 ~Toni

 On 3 March 2011 18:16, Tom Edwardscont...@steamreview.org  wrote:

 That sounds very interesting Xavier, but those jobs are already
 performed by the game engine's compiler in this case. I just need to
 generate a script for it to run.

 On 03/03/2011 5:39, Xavier Thomas wrote:
 Hi Tom,

 Hi would be interested in such a solution too.

 Maybe youwill be interested in my current work also:

 http://code.google.com/p/gamekit/source/browse/branches/AnimKit/Dependencies/Source/GameKit/AnimKit/
 It is a animation library designed to be similar to Havok animation or
 playstation Edge. It's meant to be used by gamekit but is generic
 enought and dependence free to be used by any project (and lisenced
 without copyleft)

 It is still under heavy development but already support:
 Animating all you want to (including skeleton)
 Animation blending (including additive)
 SSE on Linux

 I am planning on adding animation blend tree to it as soon as I finish
 SSE on windows.

 As Blender already serves as authoring tool for gamekit. I would be
 verry interested in the possibility to edit animation blend tree in
 Blender too.


 Xavier

 2011/3/3 Tom Edwardscont...@steamreview.org:
 I'd like to create a new node graph type to define how an external game
 engine treats exports from a scene. Similar things exist already
 http://i3.photobucket.com/albums/y84/starwind168/AnimTree.jpg.

 The bad news is that creating new node types is not currently possible
 with Python, and that the output I want is too esoteric to justify
 building into Blender itself.

 The good news is that my design is pure Python does not require anything
 outside the existing API: its output is a small script file, and all the
 heavy lifting is done by an existing external compiler. I could actually
 create it today, and the only missing element would be the visual aid of
 the node editor.

 My question, then, is how feasible supporting the definition of new
 node/graph types in Python is. We can already instance and modify
 existing ones...
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers



 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


[Bf-committers] Defining new node types with Python

2011-03-03 Thread Tom Edwards
I'd like to create a new node graph type to define how an external game 
engine treats exports from a scene. Similar things exist already 
http://i3.photobucket.com/albums/y84/starwind168/AnimTree.jpg.

The bad news is that creating new node types is not currently possible 
with Python, and that the output I want is too esoteric to justify 
building into Blender itself.

The good news is that my design is pure Python does not require anything 
outside the existing API: its output is a small script file, and all the 
heavy lifting is done by an existing external compiler. I could actually 
create it today, and the only missing element would be the visual aid of 
the node editor.

My question, then, is how feasible supporting the definition of new 
node/graph types in Python is. We can already instance and modify 
existing ones...
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Defining new node types with Python

2011-03-03 Thread Tom Edwards
That sounds very interesting Xavier, but those jobs are already 
performed by the game engine's compiler in this case. I just need to 
generate a script for it to run.

On 03/03/2011 5:39, Xavier Thomas wrote:
 Hi Tom,

 Hi would be interested in such a solution too.

 Maybe youwill be interested in my current work also:
 http://code.google.com/p/gamekit/source/browse/branches/AnimKit/Dependencies/Source/GameKit/AnimKit/

 It is a animation library designed to be similar to Havok animation or
 playstation Edge. It's meant to be used by gamekit but is generic
 enought and dependence free to be used by any project (and lisenced
 without copyleft)

 It is still under heavy development but already support:
 Animating all you want to (including skeleton)
 Animation blending (including additive)
 SSE on Linux

 I am planning on adding animation blend tree to it as soon as I finish
 SSE on windows.

 As Blender already serves as authoring tool for gamekit. I would be
 verry interested in the possibility to edit animation blend tree in
 Blender too.


 Xavier

 2011/3/3 Tom Edwardscont...@steamreview.org:
 I'd like to create a new node graph type to define how an external game
 engine treats exports from a scene. Similar things exist already
 http://i3.photobucket.com/albums/y84/starwind168/AnimTree.jpg.

 The bad news is that creating new node types is not currently possible
 with Python, and that the output I want is too esoteric to justify
 building into Blender itself.

 The good news is that my design is pure Python does not require anything
 outside the existing API: its output is a small script file, and all the
 heavy lifting is done by an existing external compiler. I could actually
 create it today, and the only missing element would be the visual aid of
 the node editor.

 My question, then, is how feasible supporting the definition of new
 node/graph types in Python is. We can already instance and modify
 existing ones...
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] MinGW debug builds do not run

2011-02-25 Thread Tom Edwards
Thanks Ervin, that did the trick and I was able to hunt down my problem. 
Now when is anyone going to look at my wonderful patch? ;-) 
http://projects.blender.org/tracker/index.php?func=detailaid=26044group_id=9atid=127

On 25/02/2011 3:13, ervin weber wrote:
 Ok, I think to have found the solution to compile debug Blender with
 scons + mingw.

 Tested on WinXP + MinGW gcc 4.5.2 + scons + Blender rev. 35129
 I have msvc 2008 express installed, so it may depend on that too.
 Can someone without msvc installed confirm that it works?
 Thanks.


 Short version:
 -

 Add this to your user-config.py
 BF_DEBUG_CCFLAGS = ['-g', '-DDEBUG','-D_DEBUG']


 Long explanation:
 

 My debug Blenders always crashed on start with this error (same as Tom
 Edwards):

 The procedure entry point PyModule_Create2 could not be located in the
 dynamic link library python31_d.dll.

 Actually there is no PyModule_Create2 entry point in python31_d.dll,
 however there is one for PyModule_Create2TraceRefs.
 Instead in python31.dll there's an entry for PyModule_Create2 and none
 for PyModule_Create2TraceRefs.

 bash-3.1$ cd lib/windows/python/lib/

 bash-3.1$ grep -nr PyModule_Create2[^T] *
 Binary file python31.dll matches
 Binary file python31.lib matches
 Binary file python31mw.lib matches
 Binary file python31mw_d.lib matches

 bash-3.1$ grep -nr PyModule_Create2TraceRefs *
 python31_d.def:122:PyModule_Create2TraceRefs
 Binary file python31_d.dll matches
 Binary file python31_d.lib matches
 Binary file python31_d.pdb matches
 Binary file python31mw.lib matches
 Binary file python31mw_d.lib matches

 Turns out that the python headers are replacing symbol definitions
 depending whether you are building a python release or debug dll.

 modsupport.h:94:

 #ifdef Py_TRACE_REFS
/* When we are tracing reference counts, rename PyModule_Create2 so
   modules compiled with incompatible settings will generate a
   link-time error. */
#define PyModule_Create2 PyModule_Create2TraceRefs
 #endif

 object.h:54:

 /* Py_DEBUG implies Py_TRACE_REFS. */
 #if defined(Py_DEBUG)  !defined(Py_TRACE_REFS)
 #define Py_TRACE_REFS
 #endif

 pyconfig.h:369:

 #ifdef _DEBUG
 # define Py_DEBUG
 #endif

 The default user-config doesn't set _DEBUG so Blender compiles against
 PyModule_Create2 which doesn't exists in python31_d.dll, hence the crash.


 On 23/02/2011 20.01, Peter Kümmel wrote:
 On 23.02.2011 10:45, Nathan Letwory wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On 21.2.2011 1:15, Peter Kümmel wrote:
 It compiles now out of the box but still crashes.
 Seems I have to go the 'hard' way you described.
 Python 3.1 debug dll is built dynamically linking against msvc9 debug
 runtime, so if you want to run debug with other than vs2008, you'll have
 to acquire the appropriate debug runtime dlls. These are not
 redistributable, so you'll need to get vs2008 (I assume the express
 version will do, but can't tell for sure).

 You could also rebuild python 3.1 debug dll with mingw, if that's
 possible, I suppose. And when using vs2010, you could rebuild the python
 3.1 debug dll with that.

 OK. Is it possible that these dlls get added to subversion?
 I would update the cmake rules then.

 Peter

 Anyway, have the correct debug runtime dlls in the same dir as
 blender.exe, and you should be running fine.

 /Nathan

 On 20.02.2011 14:46, Campbell Barton wrote:
 IIRC MSVC2008 full version is used for releases,
 I have a free MSVC2010 which has a similar problem to MinGW, debug
 builds fail to run with strange popup dialog error.

 Re Crash on startup:
  If its a crash (not a linking/error message), best not assume blender
 is without fault, debug info call-stack can help a lot in tracking
 down these problems.

 The IOError define is already in lib/windows, committed shortly after
 changing the exception.
 I use an update alias which does both repo's before building to
 prevent these kinds of errors.

 Do you still get the crash on startup?

 On Sun, Feb 20, 2011 at 11:54 AM, Peter Kümmelsyntheti...@gmx.net 
 wrote:
 On 20.02.2011 04:24, Campbell Barton wrote:

 Whats supported isn't set in stone, its more a case of which
 configurations are tested   known to work.
 OK, thanks. And what is mostly used for the Windows releases?

 this works for me.
 - windows xp
 - mingw-gcc4.5.2, (from mingw's main site)
 - cmake 2.8 (build type set to Release or RelWithDebInfo)
 - blender (tested r34959)
 I had a little bit outdated checkout with 4.4, W7-64Bit, and
 problems with release and debug.

 A crash on startup may be a real bug rather then lack of support, you
 could run with gdb and see why its crashing.
 If you are unable to figure out how to fix you could file a bug and
 include a backtace.
 I assume not really a error in blender code, it's the mixture of
 pre-compiled binaries, compiler used for blender, OS, and runtime
 libraries.

 Best is to build everyting with the same compiler.

 Another

Re: [Bf-committers] MinGW debug builds do not run

2011-02-16 Thread Tom Edwards
Thanks, but the DLL doesn't have it either. It has 
PyModule_Create2TraceRefs instead.

On 15/02/2011 11:44, Peter Kümmel wrote:
 On 13.02.2011 14:42, Tom Edwards wrote:
 The procedure entry point PyModule_Create2 could not be located in the
 dynamic link library python31_d.dll.
 There is a script which extracts the symbols from python31_d.dll (which is
 not build with mingw) for mingw. Maybe it helps when you delete 
 'python31mw_d.lib'
 and rerun 'python_mw_update.bat'.
 In python31_d.def is no 'PyModule_Create2' so maybe python31mw_d.lib was 
 outdated.

 All these files are in 'your blender path\lib\windows\python\lib'

 Peter


 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] MinGW debug builds do not run

2011-02-15 Thread Tom Edwards
I'm getting the error with Scons and MinGW.

On 15/02/2011 9:00, Campbell Barton wrote:
 On CMake 'Debug' builds I get an error popup 'The application failed
 to initialize properly (0x0150002)',

 There seems to be some problem with python/debug on windows for
 MSVC-2010 and MingW32.
 I'm sure its python because building without python enabled loads ok.

 For now you can build with CMake's 'RelWithDebInfo' which includes
 debug info but doesnt link against python debug dll.

 On Sun, Feb 13, 2011 at 1:42 PM, Tom Edwardscont...@steamreview.org  wrote:
 The procedure entry point PyModule_Create2 could not be located in the
 dynamic link library python31_d.dll.
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers



___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


[Bf-committers] MinGW debug builds do not run

2011-02-13 Thread Tom Edwards
The procedure entry point PyModule_Create2 could not be located in the 
dynamic link library python31_d.dll.
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34732] trunk/blender/release/bin/ blender-thumbnailer.py: patch [#25972] blender-thumbnailer.py: GVFS support

2011-02-11 Thread Tom Edwards
Patch is up: 
http://projects.blender.org/tracker/index.php?func=detailaid=26044group_id=9atid=127

On 10/02/2011 10:59, Tom Edwards wrote:
 Turns out that Scons isn't set up for dynamic libs: it can only copy
 them in from the /libs folder. The thumb handler residing there is
 probably for the best anyway, since the Windows SDK is needed to build it.

 Pre-compiling also solves the arch problem in my last message.

 On 10/02/2011 5:11, Tom Edwards wrote:
 Thanks Campbell. There is another issue I forgot: unlike Blender itself,
 an x86 thumb handler won't run on x64 Windows. Can the build systems
 handle this?

 On 10/02/2011 12:57, Campbell Barton wrote:
 @Xavier,
 blender-thumbnailer.py is a standalone script and runs without blender
 in py2.x - 3.x
 its included so tools may extract thumbnails from blender without
 loading blender.

 blender does this internally in C, from thumbs_blend.c: loadblend_thumb.

 @Tom Edwards, there doesn't seem to be a good place for this to go in
 blenders source.
 For now how about: ./source/tools/windows_thumbnail/ ?

 On Wed, Feb 9, 2011 at 9:20 PM, Tom Edwardscont...@steamreview.org
 wrote:
 Thumbs are generated by Blender on save and stored in the file as RGBA
 pixels. There is no risk.

 On this topic, I keep wanting to submit my Windows thumbnail handler but
 I don't know where it should go in the source tree. It has to be a
 dynamic lib, but it's not exactly external...any suggestions?

 On 09/02/2011 2:34, Xavier Thomas wrote:
 Hi Campbell,

 I would like to know if the Blender thumbnailer deactivate python scripts
 inside the blend.

 Thumbnailers are big security issues. A malisous .blend on a USB memory
 stick could serve as infection vector on all platform. Executing some of 
 the
 py scripts inside would make it too easy.

 Xavier


 2011/2/9 Campbell Bartonideasma...@gmail.com

 Revision: 34732

 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=34732
 Author:   campbellbarton
 Date: 2011-02-09 02:09:30 + (Wed, 09 Feb 2011)
 Log Message:
 ---
 patch [#25972] blender-thumbnailer.py: GVFS support
 from Shinsuke Irie (irie) with some minor edits.

 Shinsuke's description from the tracker:
 ---
 I have implemented GVFS framework support of blender-thumbnailer.py which
 allows some file managers like Nautilus and Thunar to show thumbnails in
 trash or network directories. If Python's gio module is available, the
 thumbnailer uses it to access to filesystems mounted via GVFS. This 
 change
 shouldn't affect desktop environments other than GNOME and XFCE.

 A function gvfs_open() in this patch is defined to solve a stupid
 incompatibility between Python file object and GIO Seekable object.

 On Ubuntu 10.10, I confirmed thumbnails can be generated for file://,
 trash://, sftp://, and smb://.

 Modified Paths:
 --
trunk/blender/release/bin/blender-thumbnailer.py

 Modified: trunk/blender/release/bin/blender-thumbnailer.py
 ===
 --- trunk/blender/release/bin/blender-thumbnailer.py2011-02-09 
 02:09:25
 UTC (rev 34731)
 +++ trunk/blender/release/bin/blender-thumbnailer.py2011-02-09 
 02:09:30
 UTC (rev 34732)
 @@ -24,27 +24,49 @@
  Thumbnailer runs with python 2.6 and 3.x.
  To run automatically with nautilus:
gconftool --type boolean --set
 /desktop/gnome/thumbnailers/application@x-blender/enable true
 -   gconftool --type string --set
 /desktop/gnome/thumbnailers/application@x-blender/command
 blender-thumbnailer.py %i %o
 +   gconftool --type string --set
 /desktop/gnome/thumbnailers/application@x-blender/command
 blender-thumbnailer.py %u %o
  

  import struct


 +def open_wrapper_get():
 + wrap OS spesific read functionality here, fallback to 'open()'
 +
 +
 +def open_gio(path, mode):
 +g_file = gio.File(path).read()
 +g_file.orig_seek = g_file.seek
 +
 +def new_seek(offset, whence=0):
 +return g_file.orig_seek(offset, [1, 0, 2][whence])
 +
 +g_file.seek = new_seek
 +return g_file
 +
 +try:
 +import gio
 +return open_gio
 +except ImportError:
 +return open
 +
 +
  def blend_extract_thumb(path):
 import os
 +open_wrapper = open_wrapper_get()

 # def MAKE_ID(tag): ord(tag[0])24 | ord(tag[1])16 | 
 ord(tag[2])8
 | ord(tag[3])
 REND = 1145980242  # MAKE_ID(b'REND')
 TEST = 1414743380  # MAKE_ID(b'TEST')

 -blendfile = open(path, 'rb')
 +blendfile = open_wrapper(path, 'rb')

 head = blendfile.read(12)

 if head[0:2] == b'\x1f\x8b':  # gzip magic
 import gzip
 blendfile.close()
 -blendfile = gzip.open(path, 'rb')
 +blendfile = gzip.GzipFile('', 'rb', 0, open_wrapper(path, 'rb'))
 head = blendfile.read(12)

 if not head.startswith(b'BLENDER

Re: [Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34732] trunk/blender/release/bin/ blender-thumbnailer.py: patch [#25972] blender-thumbnailer.py: GVFS support

2011-02-10 Thread Tom Edwards
Thanks Campbell. There is another issue I forgot: unlike Blender itself, 
an x86 thumb handler won't run on x64 Windows. Can the build systems 
handle this?

On 10/02/2011 12:57, Campbell Barton wrote:
 @Xavier,
 blender-thumbnailer.py is a standalone script and runs without blender
 in py2.x - 3.x
 its included so tools may extract thumbnails from blender without
 loading blender.

 blender does this internally in C, from thumbs_blend.c: loadblend_thumb.

 @Tom Edwards, there doesn't seem to be a good place for this to go in
 blenders source.
 For now how about: ./source/tools/windows_thumbnail/ ?

 On Wed, Feb 9, 2011 at 9:20 PM, Tom Edwardscont...@steamreview.org  wrote:
 Thumbs are generated by Blender on save and stored in the file as RGBA
 pixels. There is no risk.

 On this topic, I keep wanting to submit my Windows thumbnail handler but
 I don't know where it should go in the source tree. It has to be a
 dynamic lib, but it's not exactly external...any suggestions?

 On 09/02/2011 2:34, Xavier Thomas wrote:
 Hi Campbell,

 I would like to know if the Blender thumbnailer deactivate python scripts
 inside the blend.

 Thumbnailers are big security issues. A malisous .blend on a USB memory
 stick could serve as infection vector on all platform. Executing some of the
 py scripts inside would make it too easy.

 Xavier


 2011/2/9 Campbell Bartonideasma...@gmail.com

 Revision: 34732

 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=34732
 Author:   campbellbarton
 Date: 2011-02-09 02:09:30 + (Wed, 09 Feb 2011)
 Log Message:
 ---
 patch [#25972] blender-thumbnailer.py: GVFS support
 from Shinsuke Irie (irie) with some minor edits.

 Shinsuke's description from the tracker:
 ---
 I have implemented GVFS framework support of blender-thumbnailer.py which
 allows some file managers like Nautilus and Thunar to show thumbnails in
 trash or network directories. If Python's gio module is available, the
 thumbnailer uses it to access to filesystems mounted via GVFS. This change
 shouldn't affect desktop environments other than GNOME and XFCE.

 A function gvfs_open() in this patch is defined to solve a stupid
 incompatibility between Python file object and GIO Seekable object.

 On Ubuntu 10.10, I confirmed thumbnails can be generated for file://,
 trash://, sftp://, and smb://.

 Modified Paths:
 --
  trunk/blender/release/bin/blender-thumbnailer.py

 Modified: trunk/blender/release/bin/blender-thumbnailer.py
 ===
 --- trunk/blender/release/bin/blender-thumbnailer.py2011-02-09 02:09:25
 UTC (rev 34731)
 +++ trunk/blender/release/bin/blender-thumbnailer.py2011-02-09 02:09:30
 UTC (rev 34732)
 @@ -24,27 +24,49 @@
Thumbnailer runs with python 2.6 and 3.x.
To run automatically with nautilus:
  gconftool --type boolean --set
 /desktop/gnome/thumbnailers/application@x-blender/enable true
 -   gconftool --type string --set
 /desktop/gnome/thumbnailers/application@x-blender/command
 blender-thumbnailer.py %i %o
 +   gconftool --type string --set
 /desktop/gnome/thumbnailers/application@x-blender/command
 blender-thumbnailer.py %u %o


import struct


 +def open_wrapper_get():
 + wrap OS spesific read functionality here, fallback to 'open()'
 +
 +
 +def open_gio(path, mode):
 +g_file = gio.File(path).read()
 +g_file.orig_seek = g_file.seek
 +
 +def new_seek(offset, whence=0):
 +return g_file.orig_seek(offset, [1, 0, 2][whence])
 +
 +g_file.seek = new_seek
 +return g_file
 +
 +try:
 +import gio
 +return open_gio
 +except ImportError:
 +return open
 +
 +
def blend_extract_thumb(path):
   import os
 +open_wrapper = open_wrapper_get()

   # def MAKE_ID(tag): ord(tag[0])24 | ord(tag[1])16 | 
 ord(tag[2])8
 | ord(tag[3])
   REND = 1145980242  # MAKE_ID(b'REND')
   TEST = 1414743380  # MAKE_ID(b'TEST')

 -blendfile = open(path, 'rb')
 +blendfile = open_wrapper(path, 'rb')

   head = blendfile.read(12)

   if head[0:2] == b'\x1f\x8b':  # gzip magic
   import gzip
   blendfile.close()
 -blendfile = gzip.open(path, 'rb')
 +blendfile = gzip.GzipFile('', 'rb', 0, open_wrapper(path, 'rb'))
   head = blendfile.read(12)

   if not head.startswith(b'BLENDER'):

 ___
 Bf-blender-cvs mailing list
 bf-blender-...@blender.org
 http://lists.blender.org/mailman/listinfo/bf-blender-cvs

 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers



___
Bf-committers

Re: [Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34732] trunk/blender/release/bin/ blender-thumbnailer.py: patch [#25972] blender-thumbnailer.py: GVFS support

2011-02-10 Thread Tom Edwards
Turns out that Scons isn't set up for dynamic libs: it can only copy 
them in from the /libs folder. The thumb handler residing there is 
probably for the best anyway, since the Windows SDK is needed to build it.

Pre-compiling also solves the arch problem in my last message.

On 10/02/2011 5:11, Tom Edwards wrote:
 Thanks Campbell. There is another issue I forgot: unlike Blender itself,
 an x86 thumb handler won't run on x64 Windows. Can the build systems
 handle this?

 On 10/02/2011 12:57, Campbell Barton wrote:
 @Xavier,
 blender-thumbnailer.py is a standalone script and runs without blender
 in py2.x - 3.x
 its included so tools may extract thumbnails from blender without
 loading blender.

 blender does this internally in C, from thumbs_blend.c: loadblend_thumb.

 @Tom Edwards, there doesn't seem to be a good place for this to go in
 blenders source.
 For now how about: ./source/tools/windows_thumbnail/ ?

 On Wed, Feb 9, 2011 at 9:20 PM, Tom Edwardscont...@steamreview.org   wrote:
 Thumbs are generated by Blender on save and stored in the file as RGBA
 pixels. There is no risk.

 On this topic, I keep wanting to submit my Windows thumbnail handler but
 I don't know where it should go in the source tree. It has to be a
 dynamic lib, but it's not exactly external...any suggestions?

 On 09/02/2011 2:34, Xavier Thomas wrote:
 Hi Campbell,

 I would like to know if the Blender thumbnailer deactivate python scripts
 inside the blend.

 Thumbnailers are big security issues. A malisous .blend on a USB memory
 stick could serve as infection vector on all platform. Executing some of 
 the
 py scripts inside would make it too easy.

 Xavier


 2011/2/9 Campbell Bartonideasma...@gmail.com

 Revision: 34732

 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=34732
 Author:   campbellbarton
 Date: 2011-02-09 02:09:30 + (Wed, 09 Feb 2011)
 Log Message:
 ---
 patch [#25972] blender-thumbnailer.py: GVFS support
 from Shinsuke Irie (irie) with some minor edits.

 Shinsuke's description from the tracker:
 ---
 I have implemented GVFS framework support of blender-thumbnailer.py which
 allows some file managers like Nautilus and Thunar to show thumbnails in
 trash or network directories. If Python's gio module is available, the
 thumbnailer uses it to access to filesystems mounted via GVFS. This change
 shouldn't affect desktop environments other than GNOME and XFCE.

 A function gvfs_open() in this patch is defined to solve a stupid
 incompatibility between Python file object and GIO Seekable object.

 On Ubuntu 10.10, I confirmed thumbnails can be generated for file://,
 trash://, sftp://, and smb://.

 Modified Paths:
 --
   trunk/blender/release/bin/blender-thumbnailer.py

 Modified: trunk/blender/release/bin/blender-thumbnailer.py
 ===
 --- trunk/blender/release/bin/blender-thumbnailer.py2011-02-09 
 02:09:25
 UTC (rev 34731)
 +++ trunk/blender/release/bin/blender-thumbnailer.py2011-02-09 
 02:09:30
 UTC (rev 34732)
 @@ -24,27 +24,49 @@
 Thumbnailer runs with python 2.6 and 3.x.
 To run automatically with nautilus:
   gconftool --type boolean --set
 /desktop/gnome/thumbnailers/application@x-blender/enable true
 -   gconftool --type string --set
 /desktop/gnome/thumbnailers/application@x-blender/command
 blender-thumbnailer.py %i %o
 +   gconftool --type string --set
 /desktop/gnome/thumbnailers/application@x-blender/command
 blender-thumbnailer.py %u %o
 

 import struct


 +def open_wrapper_get():
 + wrap OS spesific read functionality here, fallback to 'open()'
 +
 +
 +def open_gio(path, mode):
 +g_file = gio.File(path).read()
 +g_file.orig_seek = g_file.seek
 +
 +def new_seek(offset, whence=0):
 +return g_file.orig_seek(offset, [1, 0, 2][whence])
 +
 +g_file.seek = new_seek
 +return g_file
 +
 +try:
 +import gio
 +return open_gio
 +except ImportError:
 +return open
 +
 +
 def blend_extract_thumb(path):
import os
 +open_wrapper = open_wrapper_get()

# def MAKE_ID(tag): ord(tag[0])24 | ord(tag[1])16 | 
 ord(tag[2])8
 | ord(tag[3])
REND = 1145980242  # MAKE_ID(b'REND')
TEST = 1414743380  # MAKE_ID(b'TEST')

 -blendfile = open(path, 'rb')
 +blendfile = open_wrapper(path, 'rb')

head = blendfile.read(12)

if head[0:2] == b'\x1f\x8b':  # gzip magic
import gzip
blendfile.close()
 -blendfile = gzip.open(path, 'rb')
 +blendfile = gzip.GzipFile('', 'rb', 0, open_wrapper(path, 'rb'))
head = blendfile.read(12)

if not head.startswith(b'BLENDER'):

 ___
 Bf-blender-cvs mailing list
 bf-blender-...@blender.org
 http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Re: [Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34732] trunk/blender/release/bin/ blender-thumbnailer.py: patch [#25972] blender-thumbnailer.py: GVFS support

2011-02-09 Thread Tom Edwards
Thumbs are generated by Blender on save and stored in the file as RGBA 
pixels. There is no risk.

On this topic, I keep wanting to submit my Windows thumbnail handler but 
I don't know where it should go in the source tree. It has to be a 
dynamic lib, but it's not exactly external...any suggestions?

On 09/02/2011 2:34, Xavier Thomas wrote:
 Hi Campbell,

 I would like to know if the Blender thumbnailer deactivate python scripts
 inside the blend.

 Thumbnailers are big security issues. A malisous .blend on a USB memory
 stick could serve as infection vector on all platform. Executing some of the
 py scripts inside would make it too easy.

 Xavier


 2011/2/9 Campbell Bartonideasma...@gmail.com

 Revision: 34732

 http://projects.blender.org/scm/viewvc.php?view=revroot=bf-blenderrevision=34732
 Author:   campbellbarton
 Date: 2011-02-09 02:09:30 + (Wed, 09 Feb 2011)
 Log Message:
 ---
 patch [#25972] blender-thumbnailer.py: GVFS support
 from Shinsuke Irie (irie) with some minor edits.

 Shinsuke's description from the tracker:
 ---
 I have implemented GVFS framework support of blender-thumbnailer.py which
 allows some file managers like Nautilus and Thunar to show thumbnails in
 trash or network directories. If Python's gio module is available, the
 thumbnailer uses it to access to filesystems mounted via GVFS. This change
 shouldn't affect desktop environments other than GNOME and XFCE.

 A function gvfs_open() in this patch is defined to solve a stupid
 incompatibility between Python file object and GIO Seekable object.

 On Ubuntu 10.10, I confirmed thumbnails can be generated for file://,
 trash://, sftp://, and smb://.

 Modified Paths:
 --
 trunk/blender/release/bin/blender-thumbnailer.py

 Modified: trunk/blender/release/bin/blender-thumbnailer.py
 ===
 --- trunk/blender/release/bin/blender-thumbnailer.py2011-02-09 02:09:25
 UTC (rev 34731)
 +++ trunk/blender/release/bin/blender-thumbnailer.py2011-02-09 02:09:30
 UTC (rev 34732)
 @@ -24,27 +24,49 @@
   Thumbnailer runs with python 2.6 and 3.x.
   To run automatically with nautilus:
 gconftool --type boolean --set
 /desktop/gnome/thumbnailers/application@x-blender/enable true
 -   gconftool --type string --set
 /desktop/gnome/thumbnailers/application@x-blender/command
 blender-thumbnailer.py %i %o
 +   gconftool --type string --set
 /desktop/gnome/thumbnailers/application@x-blender/command
 blender-thumbnailer.py %u %o
   

   import struct


 +def open_wrapper_get():
 + wrap OS spesific read functionality here, fallback to 'open()'
 +
 +
 +def open_gio(path, mode):
 +g_file = gio.File(path).read()
 +g_file.orig_seek = g_file.seek
 +
 +def new_seek(offset, whence=0):
 +return g_file.orig_seek(offset, [1, 0, 2][whence])
 +
 +g_file.seek = new_seek
 +return g_file
 +
 +try:
 +import gio
 +return open_gio
 +except ImportError:
 +return open
 +
 +
   def blend_extract_thumb(path):
  import os
 +open_wrapper = open_wrapper_get()

  # def MAKE_ID(tag): ord(tag[0])24 | ord(tag[1])16 | ord(tag[2])8
 | ord(tag[3])
  REND = 1145980242  # MAKE_ID(b'REND')
  TEST = 1414743380  # MAKE_ID(b'TEST')

 -blendfile = open(path, 'rb')
 +blendfile = open_wrapper(path, 'rb')

  head = blendfile.read(12)

  if head[0:2] == b'\x1f\x8b':  # gzip magic
  import gzip
  blendfile.close()
 -blendfile = gzip.open(path, 'rb')
 +blendfile = gzip.GzipFile('', 'rb', 0, open_wrapper(path, 'rb'))
  head = blendfile.read(12)

  if not head.startswith(b'BLENDER'):

 ___
 Bf-blender-cvs mailing list
 bf-blender-...@blender.org
 http://lists.blender.org/mailman/listinfo/bf-blender-cvs

 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] python mathutils api update proposal

2011-02-03 Thread Tom Edwards
Could we please have maths operator (i.e. * / +) support for eulers? You 
can't do anything with them currently, you have to cast to vector then 
back again!

On 03/02/2011 11:08, Campbell Barton wrote:
 Here are some proposed changes to the mathutils API I'd like to make
 to avoid some confusing aspects of the api since its now used for all
 RNA math types and GameEngine I think it would be good to make
 improvements in this area.

 Proposal:
http://wiki.blender.org/index.php/Dev:2.5/Source/Python/Mathutils

 If this is acceptable I can make these changes and update scripts.

 I'm keeping a log of all mathutils changes since 2.4x in mathutils.c

 To get up to speed on changes so far:

 /* Note: Changes to Mathutils since 2.4x
   * use radians rather then degrees
   * - Mathutils.Vector/Euler/Quaternion(), now only take single
 sequence arguments.
   * - Mathutils.MidpointVecs --  vector.lerp(other, fac)
   * - Mathutils.AngleBetweenVecs --  vector.angle(other)
   * - Mathutils.ProjectVecs --  vector.project(other)
   * - Mathutils.DifferenceQuats --  quat.difference(other)
   * - Mathutils.Slerp --  quat.slerp(other, fac)
   * - Mathutils.Rand: removed, use pythons random module
   * - Mathutils.RotationMatrix(angle, size, axis_flag, axis) --
 Mathutils.RotationMatrix(angle, size, axis); merge axis  axis_flag
 args
   * - Matrix.scalePart --  Matrix.scale_part
   * - Matrix.translationPart --  Matrix.translation_part
   * - Matrix.rotationPart --  Matrix.rotation_part
   * - mathutils.Matrix.Shear(plane, fac, size), now takes a pair of
 floats for 3x3 or 4x4 shear factor.
   * - toMatrix --  to_matrix
   * - toEuler --  to_euler
   * - toQuat --  to_quat
   * - Vector.toTrackQuat --  Vector.to_track_quat
   * - Quaternion * Quaternion --  cross product (not dot product)
   * - Euler.rotate(angle, axis) --  Euler.rotate_axis(axis, angle)
   * - Euler.unique() *removed*, not a standard function only toggled
 different rotations.
   *
   * moved into class functions.
   * - Mathutils.RotationMatrix -  mathutils.Matrix.Rotation
   * - Mathutils.ScaleMatrix -  mathutils.Matrix.Scale
   * - Mathutils.ShearMatrix -  mathutils.Matrix.Shear
   * - Mathutils.TranslationMatrix -  mathutils.Matrix.Translation
   * - Mathutils.OrthoProjectionMatrix -  mathutils.Matrix.OrthoProjection
   *
   * Moved to Geometry module: Intersect, TriangleArea, TriangleNormal,
 QuadNormal, LineIntersect
   * - geometry.Intersect -  intersect_ray_tri
   * - geometry.ClosestPointOnLine -  intersect_point_line
   * - geometry.PointInTriangle2D -  intersect_point_tri_2d
   * - geometry.PointInQuad2D -  intersect_point_quad_2d
   * - geometry.LineIntersect -  intersect_line_line
   * - geometry.LineIntersect2D -  intersect_line_line_2d
   * - geometry.BezierInterp -  interpolate_bezier
   * - geometry.TriangleArea -  area_tri
   * - geometry.QuadNormal, TriangleNormal -  normal
   * - geometry.PolyFill -  tesselate_polygon
   * - geometry.BoxPack2D -  box_pack_2d
   * - geometry.BarycentricTransform -  barycentric_transform
   */

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] python mathutils api update proposal

2011-02-03 Thread Tom Edwards
I'm importing/exporting a format that uses eulers exclusively, so I 
can't avoid them. They are also the default rotation method within Blender.

(And sorry for the confusion, but the actual signs I used were just 
examples. All I've ever needed to do is add and multiply by a matrix.)

On 03/02/2011 6:08, Martin Poirier wrote:
 Those mathematical operations aren't defined on eulers triplets.

 Unless you really really know what you are doing, use quats or matrices to 
 manipulate rotations.

 Martin


 --- On Thu, 2/3/11, Tom Edwardscont...@steamreview.org  wrote:

 From: Tom Edwardscont...@steamreview.org
 Subject: Re: [Bf-committers] python mathutils api update proposal
 To: bf-blender developersbf-committers@blender.org
 Received: Thursday, February 3, 2011, 8:04 AM
 Could we please have maths operator
 (i.e. * / +) support for eulers? You
 can't do anything with them currently, you have to cast to
 vector then
 back again!

 On 03/02/2011 11:08, Campbell Barton wrote:
 Here are some proposed changes to the mathutils API
 I'd like to make
 to avoid some confusing aspects of the api since its
 now used for all
 RNA math types and GameEngine I think it would be good
 to make
 improvements in this area.

 Proposal:
  http://wiki.blender.org/index.php/Dev:2.5/Source/Python/Mathutils

 If this is acceptable I can make these changes and
 update scripts.
 I'm keeping a log of all mathutils changes since 2.4x
 in mathutils.c
 To get up to speed on changes so far:

 /* Note: Changes to Mathutils since 2.4x
 * use radians rather then degrees
 * -
 Mathutils.Vector/Euler/Quaternion(), now only take single
 sequence arguments.
 * - Mathutils.MidpointVecs
 --   vector.lerp(other, fac)
 * - Mathutils.AngleBetweenVecs
 --   vector.angle(other)
 * - Mathutils.ProjectVecs
 --   vector.project(other)
 * - Mathutils.DifferenceQuats
 --   quat.difference(other)
 * - Mathutils.Slerp --
 quat.slerp(other, fac)
 * - Mathutils.Rand: removed, use
 pythons random module
 * - Mathutils.RotationMatrix(angle,
 size, axis_flag, axis) --
 Mathutils.RotationMatrix(angle, size, axis); merge
 axis   axis_flag
 args
 * - Matrix.scalePart --
 Matrix.scale_part
 * - Matrix.translationPart
 --   Matrix.translation_part
 * - Matrix.rotationPart --
 Matrix.rotation_part
 * - mathutils.Matrix.Shear(plane,
 fac, size), now takes a pair of
 floats for 3x3 or 4x4 shear factor.
 * - toMatrix --   to_matrix
 * - toEuler --   to_euler
 * - toQuat --   to_quat
 * - Vector.toTrackQuat --
 Vector.to_track_quat
 * - Quaternion * Quaternion
 --   cross product (not dot product)
 * - Euler.rotate(angle, axis)
 --   Euler.rotate_axis(axis, angle)
 * - Euler.unique() *removed*, not a
 standard function only toggled
 different rotations.
 *
 * moved into class functions.
 * - Mathutils.RotationMatrix
 -   mathutils.Matrix.Rotation
 * - Mathutils.ScaleMatrix -
 mathutils.Matrix.Scale
 * - Mathutils.ShearMatrix -
 mathutils.Matrix.Shear
 * - Mathutils.TranslationMatrix
 -   mathutils.Matrix.Translation
 * - Mathutils.OrthoProjectionMatrix
 -   mathutils.Matrix.OrthoProjection
 *
 * Moved to Geometry module:
 Intersect, TriangleArea, TriangleNormal,
 QuadNormal, LineIntersect
 * - geometry.Intersect -
 intersect_ray_tri
 * - geometry.ClosestPointOnLine
 -   intersect_point_line
 * - geometry.PointInTriangle2D
 -   intersect_point_tri_2d
 * - geometry.PointInQuad2D
 -   intersect_point_quad_2d
 * - geometry.LineIntersect
 -   intersect_line_line
 * - geometry.LineIntersect2D
 -   intersect_line_line_2d
 * - geometry.BezierInterp -
 interpolate_bezier
 * - geometry.TriangleArea -
 area_tri
 * - geometry.QuadNormal,
 TriangleNormal -   normal
 * - geometry.PolyFill -
 tesselate_polygon
 * - geometry.BoxPack2D -
 box_pack_2d
 * - geometry.BarycentricTransform
 -   barycentric_transform
 */

 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers


 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] python mathutils api update proposal

2011-02-03 Thread Tom Edwards
That is more or less what I do. There is no reason I can see why it 
shouldn't happen implicitly.

On 03/02/2011 10:19, Campbell Barton wrote:
 Euler() * 0.5, makes sense to halve rotation, but from reading down
 you're mainly interested in: Euler() * Matrix().

 This could be supported, internally doing...
eul = Euler()
(eul.to_matrix() * Matrix()).to_euler(eul.order)

 I'd be interested to know if there are many other math libs which do
 Euler * Matrix since there are enough de-facto standard with
 C++/python libs like mathutils I rather not define new ones.

 On Thu, Feb 3, 2011 at 1:04 PM, Tom Edwardscont...@steamreview.org  wrote:
 Could we please have maths operator (i.e. * / +) support for eulers? You
 can't do anything with them currently, you have to cast to vector then
 back again!

 On 03/02/2011 11:08, Campbell Barton wrote:
 Here are some proposed changes to the mathutils API I'd like to make
 to avoid some confusing aspects of the api since its now used for all
 RNA math types and GameEngine I think it would be good to make
 improvements in this area.

 Proposal:
 http://wiki.blender.org/index.php/Dev:2.5/Source/Python/Mathutils

 If this is acceptable I can make these changes and update scripts.

 I'm keeping a log of all mathutils changes since 2.4x in mathutils.c

 To get up to speed on changes so far:

 /* Note: Changes to Mathutils since 2.4x
* use radians rather then degrees
* - Mathutils.Vector/Euler/Quaternion(), now only take single
 sequence arguments.
* - Mathutils.MidpointVecs --vector.lerp(other, fac)
* - Mathutils.AngleBetweenVecs --vector.angle(other)
* - Mathutils.ProjectVecs --vector.project(other)
* - Mathutils.DifferenceQuats --quat.difference(other)
* - Mathutils.Slerp --quat.slerp(other, fac)
* - Mathutils.Rand: removed, use pythons random module
* - Mathutils.RotationMatrix(angle, size, axis_flag, axis) --
 Mathutils.RotationMatrix(angle, size, axis); merge axisaxis_flag
 args
* - Matrix.scalePart --Matrix.scale_part
* - Matrix.translationPart --Matrix.translation_part
* - Matrix.rotationPart --Matrix.rotation_part
* - mathutils.Matrix.Shear(plane, fac, size), now takes a pair of
 floats for 3x3 or 4x4 shear factor.
* - toMatrix --to_matrix
* - toEuler --to_euler
* - toQuat --to_quat
* - Vector.toTrackQuat --Vector.to_track_quat
* - Quaternion * Quaternion --cross product (not dot product)
* - Euler.rotate(angle, axis) --Euler.rotate_axis(axis, angle)
* - Euler.unique() *removed*, not a standard function only toggled
 different rotations.
*
* moved into class functions.
* - Mathutils.RotationMatrix -mathutils.Matrix.Rotation
* - Mathutils.ScaleMatrix -mathutils.Matrix.Scale
* - Mathutils.ShearMatrix -mathutils.Matrix.Shear
* - Mathutils.TranslationMatrix -mathutils.Matrix.Translation
* - Mathutils.OrthoProjectionMatrix -
 mathutils.Matrix.OrthoProjection
*
* Moved to Geometry module: Intersect, TriangleArea, TriangleNormal,
 QuadNormal, LineIntersect
* - geometry.Intersect -intersect_ray_tri
* - geometry.ClosestPointOnLine -intersect_point_line
* - geometry.PointInTriangle2D -intersect_point_tri_2d
* - geometry.PointInQuad2D -intersect_point_quad_2d
* - geometry.LineIntersect -intersect_line_line
* - geometry.LineIntersect2D -intersect_line_line_2d
* - geometry.BezierInterp -interpolate_bezier
* - geometry.TriangleArea -area_tri
* - geometry.QuadNormal, TriangleNormal -normal
* - geometry.PolyFill -tesselate_polygon
* - geometry.BoxPack2D -box_pack_2d
* - geometry.BarycentricTransform -barycentric_transform
*/

 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers



___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Question about bone allocation (Chicken or the egg)

2011-02-01 Thread Tom Edwards
Why are heads and tails stored anyway? This would be a great opportunity 
to make editbones loc, rot, length. The difference between edit and pose 
is bizarre from both a user's and developer's perspective, and a huge 
HUGE headache when importing/exporting.

On 01/02/2011 2:13, Tobias Oelgarte wrote:
 Im currently reviewing the armature code to fix the loss of precession
 while switching between edit mode and pose mode. Basically the locations
 and roll angles are computed back and forth every time. Since it is done
 with floating point precession the rig tends to fall apart. To correct
 that i will have to know how the Bone struct is allocated. Does it
 even get allocated? Meaning that it will always be the result from a
 conversion from struct EditBone to struct Bone?

 The question is basically about the fact which kind of struct is created
 first. From using blender i would assume that Editbones get created
 first and will then be converted to Bones, when you leave editmode. On
 the other hand: How it is handled while loading an existing file? Are
 the Editbones (for editmode) stored or the Bones (for Posemode and
 anything else)?

 What i basically want to do is to store the untransformed head and tail
 locations together with the boneroll as separate variables inside the
 Bone struct. That seams to me the only way to get rid of the steady
 conversions, which will end up destroying the bone locations in editmode.

 Tobias Oelgarte


 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


[Bf-committers] Scons can't define strings with spaces

2011-01-26 Thread Tom Edwards
In scons, string defines cannot contain spaces. The entire value is 
wrapped in quote marks even if it has already been escape-quoted.

env['RCFLAGS'].append(-DTEST=\a space\)
env['RCFLAGS'].append(-DTEST=\nospace\)

Gives:

windres -DTEST=a space -DTEST=nospace

And the first is, of course, an invalid arg.
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Scons can't define strings with spaces

2011-01-26 Thread Tom Edwards
It's me, not Lars. That line gives SyntaxError: unexpected character 
after line continuation character because double quotes means a 
zero-character string, and so everything following it is interpreted by 
Python.

On 26/01/2011 8:01, Sergey Kurdakov wrote:
 Hi  Lars,

 env['RCFLAGS'].append(-DTEST=\a space\)
 env['RCFLAGS'].append(-DTEST=\nospace\)

 Gives:

 windres -DTEST=a space -DTEST=nospace
 among scons docs there is a phrase:


 string surrounded by double quotation marks is interpreted as a single
 argument, regardless of white space contained within

 so
   env['RCFLAGS'].append(-DTEST=\a space\)

 might be what you are looking for ( not tested though )

 Regards
 Sergey
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Scons can't define strings with spaces

2011-01-26 Thread Tom Edwards
I don't quite believe it, but no!

On 26/01/2011 9:18, Sergey Kurdakov wrote:
 Hi Tom,

 and escape sequence with
   
 \ooo  Character with octal value ooo  
 \xhh  Character with hex value hh 

 where space is
 Octal 40  or  Hex 20

 does not help too?

 Regards
 Sergey
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Removing auto registration

2011-01-25 Thread Tom Edwards
I have several operators in my script and was always annoyed at their 
lacklustre ordering in search results. Turns out that re-arranging them 
within the script fixes that problem too. +1 for manual registration!

On 24/01/2011 2:56, Campbell Barton wrote:
 Martin correctly reprimanded me for being vague on the kinds of
 problems that auto-registration causes, so I had a look into it today
 :)

 Started by looking into a registration bug in the tracker by removing
 auto-registration locally to check if this was causing the problem.

 https://projects.blender.org/tracker/index.php?func=detailaid=24132group_id=9atid=498
 https://projects.blender.org/tracker/?func=detailaid=24498group_id=9atid=498
 (the same bug but wasn't obvious initially)

 In short, it is.
 Any subclass of an IDPropertyGroup is instantly registered and never
 unregistered, but this was a known problem.

 If we remove auto registration editing existing addons to correctly
 load/unload is not a big problem, I did one script as a test.
 Though Martins answer is to fix the auto-registration which is all
 very well, except that I still would rather remove it.

 The other things are things are less immediately useful. For example
 registering operators automatically, and removing them at runtime
 while the script stays running.
 How would this be done with the current system?, from what I can tell
 it cant be.

 @Marin, I think you misrepresent my position in one respect, You say
 that I would have users solve registration problems themselves. This
 isn't true, we can have a function which does a smart register of all
 classes defined. I'm just against this being built into the class.

 Infact when removing auto registration I added a utility to register
 all classes in a module because defining class lists is tedious (as we
 had before auto-registration was introduced).

 def register():
  bpy.utils.auto_register(globals())

 This registers all classes defined in that module, scanning globals is
 ugly but I think we can get a good brief function and avoid class
 lists.

 So I don't think this should be seen as a choice between
 automatic+clear OR bloilerplate+verbose.
 For scripts which register every class like UI scripts we can have a
 single function, nicer then having to define a class list.
 Such a function could of course be extended to do dependency calculation too.

 Btw, you mention finding the class line in python for errors, python
 cant know where a class is defined, its just not stored. pythons
 'inspect' module just a regex search on the source to find the most
 likely match, not useful for blender internal texts.


 - Campbell

 On Sat, Jan 22, 2011 at 10:56 PM, Sergey Kurdakov
 sergey.fo...@gmail.com  wrote:
 Hi,

 I'm sorry, as actually I would need to dig into details to understand all
 the subtleties,
 but few sparse thoughts

 order:
 is it possible to have a two step registration? such that first - there  map
 is created ( or graph
 http://www.boost.org/doc/libs/1_45_0/libs/graph/doc/index.html )  like it is
 done in boost.python (starting files  to look at
 are \boost\python\converter\registry.hpp
 | boost\python\converter\registrations.hpp  )  of types ,
 where all requested types are registered upon class creation and then
 then the whole system is glued together ( registered ) looking for
 unavailable parts and the next step?

 will it solve
 Matt Ebb and Nathan Vegdahl have complained about auto-registration
 in its current state fir renderman support which does dynamic
 generated classes from shaders, and rigify for rig types.
 if yes. then why two step registration is not an option ( or will it add too
 much complexity)?

 Regards
 Sergey
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers



___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] New Blender Logo

2011-01-09 Thread Tom Edwards
One thing I'd like is for the Windows icon to be updated to the much 
nicer Gnome version. The Windows one is all flat colour and looks really 
boring.

On 09/01/2011 3:58, Jonathan Smith wrote:
 The old Blender logo has been hanging around for (as for as I know) just as
 long as the UI/Theme has been. And now the UI/Theme has changed drastically,
 and I wonder whether it might be time for a change to the Blender logo.
 Although I don't believe we would have to change it all that drastically, I
 think a subtle change would go over well.

 The first change (and a more general one) that I would propose for any new
 logo, would be to get rid of the blue colour, which that circle in the
 middle currently is. Although originally that same blue (or something near
 the same) was the default world background as well as being the colour of
 many buttons, now there is hardly any blue in the default theme of Blender.
 Therefore to go in line with new theme of Blender, at least a new colour
 scheme for the logo might be nice, using colours like grey and orange.

 The second change (and this one would be more specific) is to get rid of the
 rounded edges on the logo, and on any new shape that people might come up
 with. The rounded shapes seem to give the logo a bit more
 childish/not-so-serious look which doesn't seem to meld with Blender's new
 look. It would be nice to have some sharper edges (I tried to do this a
 little on the mockup I linked to).

 All of this is just my own opinion and I would welcome anyone else's
 thoughts on the matter, to the point of whether or not we even need a new
 logo for Blender. I understand that changing it would require a lot of work,
 including reworking at least two of the Blender icons, not to mention the
 actual designing of a new logo. Another effect of this would be
 some disassociation of the old Blender icon with the new Blender, instead it
 would probably strengthen the ties to the older version (2.4x, etc.). This
 might not be a bad thing though, it would let people know the difference,
 between Blender 2.5 and Blender 2.4, they could look at the icon and
 immediately tell the difference.

 I did some very quick mockups of what a new Blender logo might look like:
 http://www.pasteall.org/pic/7940
 http://www.pasteall.org/pic/7941
 *note this is just a mockup, if there was to be a new one, it could use a
 completely different shape, etc. However I did like the way the colours in
 this one were complimentary.

 Just something for consideration.

 Cheers,
 Jonathan
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Unlimited Clay video online

2011-01-07 Thread Tom Edwards
That is simply incredible. Nothing can stop Blender now!

On 07/01/2011 3:15, ra...@info.upr.edu.cu wrote:
 Hi guys!

   The video is now online ... waitting visaul feedback

   ... again, no public patch aviable for now ... sooner than you think will
 be :P

 http://farsthary.wordpress.com/2011/01/07/toward-sculptris-like-sculpting/

 hope you like it

 Cheers
 Farsthary

 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Custom Properties - python issues

2011-01-01 Thread Tom Edwards
I'm with you on then name length limitation, that's annoying. Otherwise, 
here is how to create and display a proper custom value:

 type.Scene.my_prop = BoolProperty(name=A boolean 
 property,description=Blah,default=False)
 # ...
 layout.prop(scene,my_prop,text=A UI property element)

There is also StringProperty, IntProperty, EnumProperty and many more; 
check bpy.props. You can probably use CollectionProperty to store a dict 
(or at least a list) but I've never tried.

I didn't try reading your code sample because your line breaks have 
disappeared.

On 01/01/2011 9:41, Hart's Antler wrote:
 1. KeyError: 'the length of IDProperty names is limited to 31 
 characters'object['x'*32] = 'why not make the limit 32 or 64?, 31 is an odd 
 number - not possible to use md5sum hashes either as a workaround'
 2. inner single quotes are invalid## this failslayout.prop( object, 
 ['my-custom-prop'] )# a better warning should be printed, or 
 single quotes should be supported## this works - double quotes must be 
 usedlayout.prop( object, '[my-custom-prop]' )
 3. dicts are allowed, but layout.prop(...) can not show each subkey on its 
 own## (the dict can be viewed as a string from Custom Properties Panel, but 
 thats not very useful for the user) ##object['x'] = {'a':1, 'b':2}box.prop( 
 object, '[x][a]' ) # error: rna_uiItemR: property not found: 
 Object.[x][a]box.prop( object, '[x]' )  # this also fails

 4. booleans not supported by custom propertiesobject['my-custom-prop'] = True 
 # converted to 1 without any warninglayout.prop( object, 
 '[my-custom-prop]', toggle=True )# toggle is ignored, numeric entry is 
 displayed instead
 ## workaround ##class mypanel(bpy.types.Panel):   bl_space_type = 
 'PROPERTIES'bl_region_type = 'WINDOW'   bl_context = object   
 bl_label = toggle custom prop example @classmethoddef poll(cls, 
 context): return True def draw(self, context):layout = 
 self.layoutob = context.active_object  tag = 
 'my-custom-prop'  if tag not in ob.keys(): ob[tag] = True v = 
 ob[tag] if v: icon = 'CHECKBOX_HLT' else: icon = 
 'CHECKBOX_DEHLT'   op = layout.operator( 'toggle_prop', text=tag, 
 icon=icon )  op.propname = tag
 class toggle_prop_op(bpy.types.Operator): '''operator: 
 prop toggle helper'''  bl_idname = toggle_prop   bl_label = 
 toggle bl_options = {'REGISTER', 'UNDO'}   propname 
 = StringProperty(name=property name, description=..., maxlen=32, 
 default=)   @classmethoddef poll(cls, context): return True def 
 invoke(self, context, event):   ob = context.active_object
   ob[ self.propname ] = not ob[ self.propname ]   return 
 {'FINISHED'}


 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Custom Properties - python issues

2011-01-01 Thread Tom Edwards
Oops. For type read bpy.types.

On 01/01/2011 10:22, Tom Edwards wrote:
 I'm with you on then name length limitation, that's annoying. Otherwise,
 here is how to create and display a proper custom value:

 type.Scene.my_prop = BoolProperty(name=A boolean
 property,description=Blah,default=False)
 # ...
 layout.prop(scene,my_prop,text=A UI property element)
 There is also StringProperty, IntProperty, EnumProperty and many more;
 check bpy.props. You can probably use CollectionProperty to store a dict
 (or at least a list) but I've never tried.

 I didn't try reading your code sample because your line breaks have
 disappeared.

 On 01/01/2011 9:41, Hart's Antler wrote:
 1. KeyError: 'the length of IDProperty names is limited to 31 
 characters'object['x'*32] = 'why not make the limit 32 or 64?, 31 is an odd 
 number - not possible to use md5sum hashes either as a workaround'
 2. inner single quotes are invalid## this failslayout.prop( object, 
 ['my-custom-prop'] )   # a better warning should be printed, or 
 single quotes should be supported## this works - double quotes must be 
 usedlayout.prop( object, '[my-custom-prop]' )
 3. dicts are allowed, but layout.prop(...) can not show each subkey on its 
 own## (the dict can be viewed as a string from Custom Properties Panel, but 
 thats not very useful for the user) ##object['x'] = {'a':1, 'b':2}box.prop( 
 object, '[x][a]' )# error: rna_uiItemR: property not found: 
 Object.[x][a]box.prop( object, '[x]' )  # this also fails

 4. booleans not supported by custom propertiesobject['my-custom-prop'] = 
 True# converted to 1 without any warninglayout.prop( object, 
 '[my-custom-prop]', toggle=True )# toggle is ignored, numeric entry is 
 displayed instead
 ## workaround ##class mypanel(bpy.types.Panel):  bl_space_type = 
 'PROPERTIES'bl_region_type = 'WINDOW'   bl_context = object   
 bl_label = toggle custom prop example @classmethoddef poll(cls, 
 context): return True def draw(self, context):layout = 
 self.layoutob = context.active_object  tag = 
 'my-custom-prop'  if tag not in ob.keys(): ob[tag] = True v 
 = ob[tag] if v: icon = 'CHECKBOX_HLT' else: icon = 
 'CHECKBOX_DEHLT'   op = layout.operator( 'toggle_prop', text=tag, 
 icon=icon )  op.propname = tag
 class toggle_prop_op(bpy.types.Operator):'''operator: 
 prop toggle helper'''  bl_idname = toggle_prop   bl_label = 
 toggle bl_options = {'REGISTER', 'UNDO'}   
 propname = StringProperty(name=property name, description=..., 
 maxlen=32, default=)   @classmethoddef poll(cls, context): return 
 True def invoke(self, context, event):   ob = 
 context.active_object  ob[ self.propname ] = not ob[ 
 self.propname ]   return {'FINISHED'}


 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Windows Explorer thumbnails for 2.5

2010-12-23 Thread Tom Edwards
Finally worked out why thumbs were sometimes getting dark backgrounds 
when one of them turned blue instead. It wasn't a drop shadow, it was 
Windows being not being explicitly told about the alpha channel. This 
should be the last change, honest!

The link again: http://steamreview.org/external/blender/BlendThumb.zip

On 23/12/2010 1:21, Tom Edwards wrote:
 Thanks for that. The files' copyright notice is:
 // THIS CODE AND INFORMATION IS PROVIDED AS IS WITHOUT WARRANTY OF
 // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
 // PARTICULAR PURPOSE.
 //
 // Copyright (c) Microsoft Corporation. All rights reserved
 But the SDK license says this:
 You may modify, copy, and distribute the source and object code form
 of code marked as “sample.”
 Which I think clears us. With that and Satoshi's Vista testing both
 sorted, I've uploaded a GPLed 1.0 release.

 One technical caveat: I stop reading/decompressing the file after 70KB.
 At the moment that encompasses the thumbnail, but things might change in
 the future!

 On 23/12/2010 12:40, Campbell Barton wrote:
 On Tue, Dec 21, 2010 at 8:53 PM, Tom Edwardscont...@steamreview.org   
 wrote:
 Hello everyone, here's a small project I just completed:
 http://steamreview.org/external/blender/BlendThumb.zip

 It's a thumbnail handler for Windows 7 and Vista that extracts the
 .blend thumbnails generated by Blender 2.5 for display in Explorer. It's
 feature complete (including compressed blend support), but there are two
 niggles left before it's final:

 - I haven't actually tested it on Vista. Feedback appreciated!

 - I'm unclear on licensing. I'd like it to be GPL but there are two
 problems: firstly I'm using the Windows API, and secondly the code is
 based on a sample thumb handler provided in the Windows SDK. I've
 replaced all of the meat, but a lot of the supporting COM guff is the
 same as in the sample because it's so simple that I can't see any other
 way of doing what it does. Does anyone have experience of what happens
 in situations like this?

 Thanks!
 Re: GPL, Lots of opensource apps use the Windows API, there shouldn't
 be any problems releasing this as GPL unless you copied someone elses
 non-GPL code it should not be a problem.

 IANAL: If the sample code doesn't have a license I would consider it
 to be reference/documentation, after all MS cant expect to own part of
 every app that uses their thumbnail example reference as a basis.

 So I think its safe to release as GPL2   eventually commit to blender/trunk.

 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Windows Explorer thumbnails for 2.5

2010-12-22 Thread Tom Edwards
Great! There was one last bug that I just fixed, which caused drop 
shadows to be added to the thumbs (bad because they have transparency). 
Register it again to apply the fix.

I didn't spot these problems because I registered it on my system by 
hand, if anyone was wondering.

On 22/12/2010 1:04, Caleb wrote:
 It's working great now, no issues so far.
 ___
 Bf-committers mailing list
 Bf-committers@blender.org
 http://lists.blender.org/mailman/listinfo/bf-committers

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Windows Explorer thumbnails for 2.5

2010-12-22 Thread Tom Edwards
On 22/12/2010 11:00, Knapp wrote:
 On Wed, Dec 22, 2010 at 10:04 PM, UnderSampled -undersamp...@live.com  
 wrote:
 So, any chance this could be added to the windows installer?

 Date: Wed, 22 Dec 2010 14:04:09 +
 From: cont...@steamreview.org
 To: bf-committers@blender.org
 Subject: Re: [Bf-committers] Windows Explorer thumbnails for 2.5

 Great! There was one last bug that I just fixed, which caused drop
 shadows to be added to the thumbs (bad because they have transparency).
 Register it again to apply the fix.

 I didn't spot these problems because I registered it on my system by
 hand, if anyone was wondering.

 On 22/12/2010 1:04, Caleb wrote:
 It's working great now, no issues so far.
 I am not sure if I am getting a bug or if I have not understood how
 this works. I am running Kubuntu 10.10 current SVN Blender 2.5 64 bit

 I have found in preferences where it says thumbnails and have turned
 that on. I have rendered and saved a blend using the default cube but
 even when reloading my blend using Blender I get no thumbnails and I
 don't see any with Dolphin ether. Help? Or bug?
 Thanks
Kubuntu is KDE, Ubuntu is GNOME. It seems their thumb handlers aren't 
compatible.
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


Re: [Bf-committers] Windows Explorer thumbnails for 2.5

2010-12-22 Thread Tom Edwards
Thanks for that. The files' copyright notice is:
 // THIS CODE AND INFORMATION IS PROVIDED AS IS WITHOUT WARRANTY OF
 // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
 // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
 // PARTICULAR PURPOSE.
 //
 // Copyright (c) Microsoft Corporation. All rights reserved
But the SDK license says this:
 You may modify, copy, and distribute the source and object code form 
 of code marked as “sample.”
Which I think clears us. With that and Satoshi's Vista testing both 
sorted, I've uploaded a GPLed 1.0 release.

One technical caveat: I stop reading/decompressing the file after 70KB. 
At the moment that encompasses the thumbnail, but things might change in 
the future!

On 23/12/2010 12:40, Campbell Barton wrote:
 On Tue, Dec 21, 2010 at 8:53 PM, Tom Edwardscont...@steamreview.org  wrote:
 Hello everyone, here's a small project I just completed:
 http://steamreview.org/external/blender/BlendThumb.zip

 It's a thumbnail handler for Windows 7 and Vista that extracts the
 .blend thumbnails generated by Blender 2.5 for display in Explorer. It's
 feature complete (including compressed blend support), but there are two
 niggles left before it's final:

 - I haven't actually tested it on Vista. Feedback appreciated!

 - I'm unclear on licensing. I'd like it to be GPL but there are two
 problems: firstly I'm using the Windows API, and secondly the code is
 based on a sample thumb handler provided in the Windows SDK. I've
 replaced all of the meat, but a lot of the supporting COM guff is the
 same as in the sample because it's so simple that I can't see any other
 way of doing what it does. Does anyone have experience of what happens
 in situations like this?

 Thanks!
 Re: GPL, Lots of opensource apps use the Windows API, there shouldn't
 be any problems releasing this as GPL unless you copied someone elses
 non-GPL code it should not be a problem.

 IANAL: If the sample code doesn't have a license I would consider it
 to be reference/documentation, after all MS cant expect to own part of
 every app that uses their thumbnail example reference as a basis.

 So I think its safe to release as GPL2  eventually commit to blender/trunk.

___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers


[Bf-committers] Windows Explorer thumbnails for 2.5

2010-12-21 Thread Tom Edwards
Hello everyone, here's a small project I just completed: 
http://steamreview.org/external/blender/BlendThumb.zip

It's a thumbnail handler for Windows 7 and Vista that extracts the 
.blend thumbnails generated by Blender 2.5 for display in Explorer. It's 
feature complete (including compressed blend support), but there are two 
niggles left before it's final:

- I haven't actually tested it on Vista. Feedback appreciated!

- I'm unclear on licensing. I'd like it to be GPL but there are two 
problems: firstly I'm using the Windows API, and secondly the code is 
based on a sample thumb handler provided in the Windows SDK. I've 
replaced all of the meat, but a lot of the supporting COM guff is the 
same as in the sample because it's so simple that I can't see any other 
way of doing what it does. Does anyone have experience of what happens 
in situations like this?

Thanks!
___
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers