bf-blender / Windows (2004/07/13) Updated (LSCM)

User-contributed CVS development builds. Please test and give feedback!

Moderators: jesterKing, stiv

Posts: 0
Joined: Thu Jan 15, 2004 6:41 am
Location: Canada - Québec - Sherbrooke

bf-blender / Windows (2004/07/13) Updated (LSCM)

Post by gabio »

*EDIT* Yes! folks the new LSCM UV Unwrapping system is now part of the release. it was commited just after I did my build, i'll not let you down for an other week without it!*EDIT*
Damn, i've been away from my compiling machine for too long! Now that is i'll give you a full featured from the last build i did. I saw(with some surprise) that some pp asked for my build... Since i don't mean to be superior in anything (jesterking can do it well too) I'll just say i'm glad to see pp like what i'm doing(as I like to do it). My little resumé isn't a long job, just a copy'n paste while the build is running, anyway if it's usefull...
But please note: This forum is open to anyone to post a build.
Now, the big joke:
since june 26:

Relevant features to test:
-worlspace and localspace matrices from objects through python.
-New effect: Leon's particle effecs
-Yafray dll plugin is finaly working for windows
-optimalization of MetaBall polygonisation
-NEW: Ramp shades for diffuse and specular.
-the gameplayer is back!(save runtime)
-new operators for "MapTo" panel.
-New python stuff and scripts.
-particle motion based on textures
-new interface button: back from script.
-new stuff in menu: script menu in many window type.
-static particles working with a deformed Mesh.
-Directly edit number fields with a click.
-New color picker for color button.
-IPO for displacement, translucency and raymirror.
-revamp of the sweep effects.
-Creases for subsurf.
-vortex field for particles. Particles swirl around z-axis of the object.
-particle deflection optimisation.
-added support for ortho camera(yafray)
-clock wipe effect to the sweep menu.
-LSCM UV Unwrapping.(See blender3d webpage)


Minor Fixes:
Better use of booleans for python
#include fixes for Windows
Python Doc fixes
Use the farthest vertex as the face position when z sorting faces. (Camera is on -z axis!)

- added support for getting worlspace and localspace matrices from objects through python. Add cvars matrixWorld/matrixLocal.
- credits to Campbell Barton

The revised patch from Leon for new particle effects.

New is that objects can have a force field, and Meshes can even deflect
(collide) particles. This is in a new sub-menu in Object buttons F7

The full instructions where on the web, Leon mailed it me and I will put
it in CMS tomorrow. For those who like to play with it now, here are demo

Quite some changes where in the integration though... so previous created
particle deflectors will not work. Changes to mention now are:
- gravity is renamed to 'force field'
- force field and deflector options are in Object now, not in Mesh
- the options also have its own struct, doesnt add to Object by default
- force fields are possible for all object types, but only work on center.
So empty objects are typical for it.

Work to do:
- add draw method in 3d win to denote forcefield objects
- check on the UI (panel with different size?)
- add 'recalc' button in deflector panel

Finally, fixed the evil dll problem. It works now
on my win32 box with my tests without crashing.
But be aware! There may be more of them watching
us, waiting for a moment of distraction, nobody
is safe.

Metaball normals were flipped again... thanks jiri for pointing me to it...

- added octal tree node optimalization of MetaBall polygonisation
polygonization of 512 MetaBalls:
- version 2.33a: 76 s
- current cvs version 8 s

- button "Never" is added in button window: Metaballs are polygonized only during render time (it is useful for particle animation) ... alls.blend

NEW: Ramp shades for diffuse and specular

Material color and specular now can be defined by a Colorband. The actual
color then is defined during shading based on:
- shade value (like dotproduct)
- energy value (dot product plus light)
- normal
- result of all shading (useful for adding stuff in the end)

Special request from [A]ndy! :)
Fixed draw error in panels, the header was overdrawn with panel background.
Only visible when panels are not transparent.

Corrected a misleading confirmation message when deleting a bone ("Erase selected bone", not "Erase selected armature")

Report #1401

Division by zero in calculating render coords... only happens for
Wire material AND having face-less edges. Then the normal is zero, and
some calculations can't happen correctly.

(error in rendercore.c, other files committed was because of removed and
cleaned up enters)
Forgot to add code for copying/paste functionality Materials. With new
ColorBand data added in Material that needs to be tackled corectly.
Bug #1411

"inserting keys in editmode didnt work on newly created Meshes"

Found out the error was in code committed by Hos in december, when
he added feature to copy newly added vertices (or remove) when editing
vertex keys. In his commit he already noted "please test" :)

Error was that newly created meshes didn't give a correct first key. For keys
to work in 2.32 and 2.33 you have to leave editmode at least once, or
insert keys outside of editmode.

The fix was fairly simple, just checking for an empty first key.

Added new exported render calls in stubs... so player compiles again!
Fixed rendering of image textures with alpha... it gave ugly dark outlines.
Please note the following:

- pictures need to be saved as 'premul' sky render if you want to use it
in Blender as texture
- but for alpha-over in sequencer it has to be 'key alpha'...

This inconsistancy needs to be solved.. for example as option for both
texture as sequencer.
Added new operators for "MapTo" panel as suggested & partially coded by
Kent Mein. So next to the mix, mult, add, sub we have now:

- Div: divides by texture color
- Screen: is like Mult, but works opposite (makes lighter)
- Diff: the difference between texture color and material
- Light: if texture is lighter it shows (per component)
- Dark: if texture is darker it shows (per component)

Next step: add this for specular and mirror, and the other channels...
I commit it now because it also fixes error in previous commit.

New scripts:
- hotkeys, obdatacopier and renameobjectbyblock, all from Jean-Michel Soler (jms);
- bevel_center by Loic Berthe, suggested for inclusion by jms;
- doc_browser, by Daniel Dunbar (Zr)

Thanks to them for the new contributions!

(I included doc_browser at 'Misc' because only users interested in script writing would actually use it, but it could also be under 'Help'. Opinions?)

BPython related:
- Added scriptlink methods to object, lamp, camera and world.
- Object: added object.makeTrack and object.clearTrack (old track method).
- sys: made sys.exists(path) return 0 for not found; 1 for file, 2 for dir and -1 for neither.
- doc updates and fixes.
- made ONLOAD event work. G.f's SCENESCRIPT bit was being zeroed in set_app_data.
- Blender: updated functions Load and Save to support the builtin importers and exporters besides .blend (dxf, videoscape, vrml 1.0, stl, ...)
- Draw: added mouse wheel events.
- Scene: added to play back animations (like ALT+A and SHIFT+ALT+A). Makes a good counter, too, when the 'win' attribute is set to a space that doesn't "animate".

The addition and the fix to ONLOAD scriptlinks is part of the work for a Blender demo mode. It already works, but I'll still add support for Radiosity calculations and fix a thing in main(): it executes onload scripts too early (BIF_Init), giving funny results in alt+a animations and renderings when firing up Blender. Loading after the program is up has no such problems. When I finish I'll post examples of demo mode scripts.

Three in one:

- textures: added support for new mixers (div, diff etc) to work on the
other map-to channels too, like ref or spec
Also it works on lamp and world textures
- brought back uncommented line of code that was removed by leon, to have
particle motion based on textures
- recoded the glPylonOffset hack to be nice function, this for future

- added submenu "Scripts" in both View3D->Object and Mesh menus.
Put them on top (it's better to follow some guideline, so users don't have to search for "Scripts" submenu in a different position in each menu), feel free to change.
- added button 'previous win' to SpaceScript, makes accessing buttons win, for example, much faster. Maybe all spaces could have this button.

- added Window.EditMode(), to check, enter and leave edit mode. Scripts that change mesh data need this to leave edit mode before making changes to the active (G.obedit) mesh, of course.
- updated script bevel_center to use the above function and also popup an error msg if the active obj is not a mesh.
- doc updates, minor fixes.

Forgot to mention in my previous commit that I also updated the "-P" command-line option (for running script files) to be able to run already loaded Blender Texts, too. So, if you have a script called 'Text' in foo.blend, you can run it with blender foo.blend -P Text .

Made static particles working with a deformed Mesh, both for Lattice as
for Armature. Note: only works for subsurfed Mesh now!

Change in drawobject.c: Halo option on subsurf Mesh now draws points.
but using the original vertices...

- py docs update
- getMatrix(), properties for object class, some examples

Directly edit number fields with a click instead of having
to use Shift-Click.

As before, clicking on the left side of a number field decreases, clicking on the right side increases, but clicking in the centre, on the text itself, starts editing the
value directly. Other behaviour like dragging left and right
is unchanged.

New: color picker!

With a click on the 'COL' buttons (the ones showing RGB) a menu pops up
with three colorpicking fields and a palette.
The fields are the three planar intersections of a HSV cube, each allowing
choosing in the field without the field changing.

The palette is 'modal' unfortunately (couldn't find a simple working other
method) where the button "paste to color" denotes the state that click in
palette copies to edited color, and "copy to palette" means the active
color is copied into the palette...

- saving of palette in file
- decide whether ESC leaves without changes...

* Added IPO for displacement, translucency and raymirror
* Cleaned out IPO #defines

Changed redraw of picker not to include the background, prevents flashing.
- clipped selection circle in colorpicker to prevent it drawing outside
the color plane
- removed warnings from glutil.c, made circleXOR call become float instead
of short
- fixed error in drawing text of buttons in pop-up menus, when zoomed small
Cleaned up pop-up menus for F10; edge settings and framing menu.
Fixed NUM button code that it doesn't return halfway, but nicely proceeds
to end of the function to handle the exit requirements.
(returns where added for patch that makes NUM buttons into textbut on a
click in center)
Picker made slightly larger, and removed confusing "copy to" and "paste
from" buttons.

Now a click in palette is default: update the active color.
If you want to store in palette: hold CTRL while click.

This isn't optimal either, but at least better.
Colorpicker variant 2; One large field for S and V, and slider for H, like
Gimp has for example.

The previous picker is still as code there... ongoing experiments.
Fixes in colorpicker;

- click on palette didn't update button values
- the bottom 'palette' button now restores to old color
- H values scroll allways, also with black or white

Todo still:
- save in file (btw, i changed default colors to my pref :)
- Removed new outline drawing from vpaint/faceselect and other paint modes
- fixed tooltip drawing in color picker

This is the initial commit of a revamp of the sweep effects that goofster committed that was originally a sequence plugin from sirdude.

The changes from the original include the ability to add a blurred edge with a selectable width to the wipe and to rotate the effect.

Has these sweep types included already

These still need to be coded

* fixed bug in rainbow color for material and world ipoview
* removed 32 channel limit (can now have 50, or of you know what number to change, 999 ;)
* added new IPOs: mirror fresnel and fac, transparency fresnel and fac, and glow factor transparent materials (add)

Quite a large one this time... but now we have:

Edges in Mesh
- adds automatic when you use creases. For other situations; call the
void make_edges(Mesh *me) in mesh.c. Of course, once in editmode the
edges are automatically recreated.
- in F9 buttons you can add/remove edges too
- both for Mesh and DisplistMesh, so it speeds up drawing quite some in
- render for edges can't work... edges have no material nor tface nor col..
so here still the faces are rendered in wire

Creases in Subsurf
- based on the code by Chris McFarlen
- main changes is that now edges are used, saving quite some data in file
- use SHIFT+E in editmode to set edges-sharpness. values go from 0-1
- in F9 buttons you can set draw-crease mode. It draws now blended from
wire color to edge-select color (as provided in Theme)

Known issue: setting sharpness on 1 cube (subdiv 2) gives weird results
with some values... Chris, can you check?

Further; code cleanups, changing 0 in NULL when needed, no warnings, etc etc
Fix for last commit; the escape out of SHIFT+E loop didnt work.
Caused error with 1 vertex selected.
Two little fixes in administrating new Mesh edges. Solves crash when
joining newly created (Added) Mesh with others...
Typing values in color picker got a mixup in but->func() usage... caused
weird values to be set after entering a value. Nicely solved now.

Fixed for forcefield. It needed to add half of the acceleration as speed on each frame it affected.
Cleaned the GUI for effectors: Widen the panel and the buttons. Made the button text more conformed.
Added vortex field for particles. Particles swirl around z-axis of the object. Little hackish, could be made better.
Fix metaball update bug when mirroring in object mode
Compressed the two particles effectors loop into one. It was rather stupid of me to do it as two at first, but it was the first thing that came to mind. Fixed now, so it will calculate much faster.
Made effector strenght as big in the negative as in the positive.

- Update FTGL to version 2.0.9 (small changes to headers, blender usage still works)
- supply precompiled FTGL library with patch applied (should fix bug #1290)

Changed weird line in add_primitiveMesh() that caused cursor to flip back
to normal mousepointer while in editmode.
Was in code since 2.25...

Added edges in Mesh undo.
Note; whether or not edges are created is derived from original Mesh, the
one still residing in obedit->data while modeling.

More closely implement the Installation Policy
< ... 352.0.html>

- Within those confines 'ERROR: File ".Blanguages" not found' won't show up
again (all such bugs in tracker have already been closed, #745 for reference)

And intrr, if it does, 'cp -a .blender ~' already :P

Of course, this issue should not be fixed on a per file basis (.Blanguages,
.bfont.ttf), but instead return the .blender dir location. Duplicating .blender
finding logic everywhere, sigh.

< jesterKinky> that's what I meant. for now this is ok to continue with, and then in a later stage correct it all in one bigger effort
< jesterKinky> and since you point code at policy url we all can get reminded of how it was supposed to go when cleaning it.
< LarstiQ> jesterKinky: yes, I meant to do a "grrrr, this is the last time I'm not fixing the underlying issue"
< LarstiQ> all your lazy coders are belong to me
< jesterKinky> set us up the superficial bugfix

Added colorpicker in Panel for:

- Transform properties 3d win, while Vertex/Texture paint is on
- Paint panel in UV window

Note; both use the same GVP struct to store current color in. Also the
function used now to add picker isn't complete... might need further
thinking over. Consult me when you like them in more places.
Small improvement in detecting which previews need update in Blender.
Now you can have multiple buttons windows open, for example one showing
only a larger material preview, and have it updated correctly. Nice for
setups where you can keep preview shown while scrolling buttons.

Long on the todolist: a patch to have pointsize working on systems that
don't have them larger than 1, since vertices are drawn with it.

It is solved by patching code with minimal confusement. So you can get
automatic patched glPoints with:


In glutil.c the wrapper can be found, that checks for maximum Pointsize,
and bypasses it to a glBitmap then.
Oops! Changing return values for picker buttons to B_NOP causes pop-ups
to close. Changed it so that it sets retvals at zero for pop-up pickers.

- Simple optimizing for deflected (collision) particles. It now caches
transformation (from vertex -> world space), used defines for vecadd and
vecsub, and intersects quads more efficient.
Result is about 2 times faster.

- Added draw mode for empty used as forcefield

- added defines VECADD and VECSUB

- changed sequence for finding HOME on Win32. Sequence is now as
shown at ... 352.0.html

Still TODO: update NSIS installer script to suit the change.

added support for ortho camera (needs yafray from cvs)
When using xml export, yafray will now render the alpha channel as well when 'RGBA' button in blender is enabled (Plugin does this automatically).
In plugin code, fixed smooth shading bug for non-mesh objects.
Relative paths for textures are now recognized (plugin & xml).
Fixed problem with duplicate objects (plugin & xml).
Really old bug, sun position is now correct (plugin & xml).
World background now can also be a regular image texture (jpeg & tga), but for now always assumes spheremapping, which is not the same as Blender either. In yafray the texture is assumed to be a full 360 (panorama type) map.
convertBlenderScene.c cleanup, the identity transform 'hack' is removed.

This commit add the clock wipe effect to the sweep menu in the sequence editor

Added SuperLU 3.0:

This is a library to solve sparse matrix systems (type A*x=B). It is able
to solve large systems very FAST. Only the necessary parts of the library
are included to limit file size and compilation time. This means the example
files, fortran interface, test files, matlab interface, cblas library,
complex number part and build system have been left out. All (gcc) warnings
have been fixed too.

This library will be used for LSCM UV unwrapping. With this library, LSCM
unwrapping can be calculated in a split second, making the unwrapping proces
much more interactive.

Added OpenNL (Open Numerical Libary):

OpenNL is a library to easily construct and solve sparse linear systems. We
use a stripped down version, as an interface to SuperLU.

This library was kindly given to use by Bruno Levy.

Added LSCM UV Unwrapping:

Implementation Least Squares Conformal Maps parameterization, based on
chapter 2 of:
Bruno Levy, Sylvain Petitjean, Nicolas Ray, Jerome Maillot. Least Squares
Conformal Maps for Automatic Texture Atlas Generation. In Siggraph 2002,
July 2002.

Seams: Stored as a flag (ME_SEAM) in the new MEdge struct, these seams define
where a mesh will be cut when executing LSCM unwrapping. Seams can be marked
and cleared in Edit Mode. Ctrl+EKEY will pop up a menu allowing to Clear or Mark
the selected edges as seams.

Select Linked in Face Select Mode now only selects linked faces if no seams
separate them. So if seams are defined, this will now select the 'face group'
defined by the seams. Hotkey is still LKEY.

LSCM Unwrap: unwrap UV's by calculating a conformal mapping (preserving local
angles). Based on seams, the selected faces will be 'cut'. If multiple
'face groups' are selected, they will be unwrapped separately and packed in
the image rectangle in the UV Editor. Packing uses a simple and fast
algorithm, only designed to avoid having overlapping faces.

LSCM can be found in the Unwrap menu (UKEY), and the UV Calculation panel.

Pinning: UV's can be pinned in the UV Editor. When LSCM Unwrap is then
executed, these UV's will stay in place, allowing to tweak the solution.
PKEY and ALT+PKEY will respectively pin and unpin selected UV's.

Face Select Mode Drawing Changes:
- Draw Seams option to enable disable drawing of seams
- Draw Faces option to enable drawing of selected faces in transparent purple
- Draw Hidden Edges option to enable drawing of edges of hidden faces
- Draw Edges option to enable drawing of edges of visible faces

The colors for these seams, faces and edges are themeable.
A new build is available.
Last edited by gabio on Thu Jul 22, 2004 6:03 pm, edited 4 times in total.

Posts: 7
Joined: Thu Feb 12, 2004 7:47 pm

Post by @ner »

long log!

thanks everyone!

Posts: 13
Joined: Wed Oct 16, 2002 9:34 am

Post by UglyMike »


Well, give it two more years at this speed of development and Blender will actually become usable!! :wink:

Posts: 86
Joined: Fri Oct 18, 2002 2:47 am

Post by solmax »

good work, man. new ppl will love the hotkey-reference, as will pro's.

just a couple of suggestions:

- adding a weight value for selected vertex/vertices to num-tab? maybe copy/paste?

- update blend texture to new ramps-functionality?

yafray plugin doesn't work anymore for me, crashes blender.. hoe i can figure ou what went wrong..

anyway thx for the new build


Posts: 0
Joined: Wed Mar 19, 2003 7:59 am

Post by Carl »


But...when trying yafray, it asks for cygwin.dll. I do not have cygwin installed, do I need that??


Site Admin
Posts: 207
Joined: Fri Oct 18, 2002 12:48 pm
Location: Finland

Post by jesterKing »

for yafray plugin to work you need the newest cvs build from yafray. Also the XML toggle should be off in the yafray panel.


Posts: 15
Joined: Thu Oct 17, 2002 10:20 am
Location: Berlin, Germany

Post by thoro »

Thank you very much! Blender is getting better and better.

The saved runtimes require the SDL.dll - is this intended?


Posts: 0
Joined: Mon Jun 02, 2003 7:54 am
Location: Smethwick West Midlands UK

Post by kencanvey »

Thanks gabio for the build and the short novel :D :wink:


Site Admin
Posts: 207
Joined: Fri Oct 18, 2002 12:48 pm
Location: Finland

Post by jesterKing »

thoro wrote:Thank you very much! Blender is getting better and better.

The saved runtimes require the SDL.dll - is this intended?

Yes. They also need Python23.dll. I might be looking into getting those two statically linked.


Posts: 0
Joined: Mon Jun 09, 2003 11:16 pm

Post by Marty_D »

Last edited by Marty_D on Tue Sep 14, 2004 7:20 pm, edited 1 time in total.

Posts: 0
Joined: Mon Feb 24, 2003 7:42 pm

Post by A2597 »

*Continues to wait for DoF and real glows*

seriously, they should be part of blender, not a plugin....
The man with his head stuck in the Blender.

Posts: 0
Joined: Wed Mar 19, 2003 7:59 am

Post by Carl »

Got it to work now... I needed to uninstall and re-install Yafray...

SWEET!!!! 8) 8)


Posts: 18
Joined: Fri Oct 25, 2002 9:32 am

Post by pildanovak »

The Lscm is perfect, only when there are more seams(eg, if you select all faces and make them all seamed, so, in fact each face=1 UV island), the uvs get scaled down to little points. Also, when trying to UV the blender monkey, after making more then 3 or four islands, the UV got scaled down to points. But i realized that with LSCM it is really simple to unwrap the whole mesh in a very little count of islands :)

Posts: 0
Joined: Wed Jan 14, 2004 8:26 pm

Post by Usagi »

The "use alpha" problem with image textures which I reported in the threads for the 2004/07/05 and 2004/07/09 release still exists.

Posts: 17
Joined: Wed Oct 16, 2002 10:09 am
Location: Belgium

Post by pinhead_66 »

very very nice

finally selecting faces in face select mode is gonna be a lot easier with the show faces and show edges in face mode


thank you for the build gabio


Post Reply