to my previous commit (whoops). The second part covers the changes I
have made to the code since then (all related to merge tools code).]
# Part One: Complete Log for Commit from 2/13/06
-> Upgraded merge tools.
The new merge tools add several options to blenders Merge submenu,
accessed via the WKEY whilst in Editmode for meshes. The new options
depend on current mode:
- Vertex mode: "At First" and "At Last"
When choosing "At First" or "At last" it will merge all selected
vertices at the first or last selected vertex.
(Note: Blender now keeps track of the last and first verts selected in
editMode (G.editMesh->lastvert and G.editMesh->firstvert
pointers. This meant additions were made to the undomesh code in
editmesh.c as well).
- Edge mode: "Collapse Edges"
When choosing this option, Blender examines the current set of
selected edges and groups them according whether or not they are
topologically connected. It then goes through each group and merges
them one by one to a single point.
- Face Mode: "Collapse Faces"
Works the same as "Collapse Edges", only works on groups of
topologically connected faces.
-> Inclusive selection mode conversion.
This feature extends the ability of blenders selection mode
conversions. Currently when you change selection modes from a "lower
order" mode to a "higher order" one (vertex->edge, vertex->face or
edge->face) blender only selects elements in the new mode whose
elements were completely selected in the previous mode.
This patch does not change blenders default behavior but offers
implicit selection mode conversion as an alternative. To access it,
hold either the left or right CTRL keys and click on a selection mode
in the view 3d selection mode header buttons. This can be accessed via
the CTRL-TAB selection mode switching as well, simply hold CTRL while
clicking the mode you want or entering its number on the keypad.
In some programs, such as Wings and Mirai, it has been demonstrated
that it can also be very useful to exploit selection mode switching to
implicitly select previously unselected elements as well. For instance
switching selection mode from vertex to edges will select all edges
currently associated with the currently selected vertices. The same
behavior is applied to switching between vertex->face and
edge->face. By exploiting this sort of selection conversion complex
selection sets can be built quicker.
Furthermore I modified blenders UndoMesh code to make selection mode
switching "undo coherent". Aside from its relevance to inclusive
selection mode conversion, this really counts as a "bug" in my
mind. Previously selection mode switch could cause the selection state
of the mesh to be invalid when certain modeling operations were
undone. An example of this would be "edge subdivide-> switch to face
mode-> undo"; you end up with edges selected while still in face mode!
# Part Two: Log for this Commit
-> Code Cleanup
As per Ton's request I reformatted all my code, changed variable names
and eliminated my use of "LinkNode" structs and replaced them with
"ListBase" instead. There should be no warnings while compiling now
either.
-> Remove doubles bug
Fixed small problem in removedoublesflag() in editmesh_tools.c that
caused editface structs to get their UV's scrambled. Vertex colors
might not be safe though? Need to investigate later.
-> Small bug in in the the code for merge last/first
It could cause a crash when exiting editmode, switching meshes, then
entering editmode again. "lastvert" and "firstvert" pointers are now
set to NULL whenever exiting editmode now (see load_editmesh() in
editmesh.c). I will find a better solution to this *soon*...
-> All merge tools now UV aware (optional)
The default behavior is to leave UVs alone, but if you hold CTRL while
clicking on the menu entry, UV's are merged. This works fine in most
situations, although some investigation into how to best handle
merging of UVs at the border of UV islands needs to be done.
This last item brings up a point about the current state of the
interface: several functions accessed through the WKEY menu now use
the CTRL modifier to change how they behave (This convention has been
in place for a while, see subdivide for example). Unfortunately there
is no way to communicate the way modifier keys change the behavior of
certain functions to the user. This makes such options invisible for
all intents and purposes...
object center, it doesn't generate displaylist (or derivedmesh). This
error showed especially on loading files, and you had to advance frame,
zoom out or press Numpad-9 to see stuff.
* when WITH_BF_STATICOPENGL=1 on Linux Blender will be statically linked
against GL libraries. NOTE: I used values that worked on my machine -
platform managers and people who have better knowledge about this, please
modify config/linux2-config.py accordingly.
- Links now can be made between any socket type. The nodes recognize amount
of channels, and will convert types if needed.
Conversions from RGBA to 1 channel will use the 'RGB to BW' formula.
Also note that conversions only happen when required. So you can blur an
alpha channel, filter it, and put this in a 1-channel socket without any
conversion to happen, which saves memory & cpu time.
http://www.blender.org/bf/rt.jpg
The blur nodes don't accept Vector input yet... But filter does.
- RGB Curve Nodes now have the premultiply option resored, 2 x faster
- Fixed some confusing code in Node Group handling... much stabler now
Bugfix, Wrongly waited colinear test that caused quads with co-linear edges to be made.
Bugfix, Use active object even if unselected.
Optimize, Skip further tests if face pair is above the quad error limit.
Optimize, Faster edge/Face user dict creation ~10%
Feature: Options to ignore VCols and UV's as delimetres.
At long last!
This new constraint is pretty simple. Following in the footsteps of such giants as Copy Loc and Copy Rot, it lets you constrain the size of an object/bone to another object/bone, with per axis restrictions.
- Texture Node
Allows to use any Blender Texture block as input for masks or color
blending. The texture node doesn't generate a real image, but adjusts to
the size as mapped with during an operation. So it won't work to use it
as Image input for Blur or Filter nodes.
Note; the Vector inputs for this node only work with manual input now!
- Translation Node
Give any image an offset in X or Y direction
For the Texture node to work, I needed to move the central 'pixel
processor' up one level... to allow differently sized images to merge
and allow 'procedural images' without size.
Temporal image of the day: http://www.blender.org/bf/rt.jpg
without initialization.
For Brecht:
source/blender/blenkernel/intern/subsurf_ccg.c:329: warning: left-hand operand of comma expression has no effect
This line I don't understand...
This now is a post-process option only (used to be in render).
It is only handled within the Imbuf/ module, on conversions from float
to byte rect, which atm mostly happens on saving images.
- Small fix: when using Scene RenderLayer nodes, the speed vectors for
these nodes were not created when that scene had "Do Composite" off.
(NOTE: new include dependency in Render module, might need MSVC update!
It has to include the imbuf/intern/openexr/ directory in search path)
-> New Composite node: "Hue Saturation".
Works like the former 'post process' menu. There's no gamma, brightness or
multiply needed in this node, for that the Curves Node functions better.
-> Enabled Toolbox in Node editor
This now also replaces the SHIFT+A for adding nodes. The nodes are
automatically added to the menus, using the 'class' category from the
type definition.
Current classes are (compositor examples):
Inputs: RenderResult, Image
Outputs: Composite, Viewer
Color Ops: RGB Curves, Mix, Hue Saturation, AlphaOver
Vector Ops: Normal, Vector Curves, Map Value
Filters: Filter, Blur, VectorBlur
Convertors: ColorRamp, RGBtoBW, Separate RGBA, Separate HSVA, Set Alpha
Generators: RGB, Value, Time
Groups: the list of custom defined nodes
-> OpenEXR tile saving support
Created an API for for saving tile-based Images with an unlimited amount
of layers/channels. I've tested it for 'render result' now, with the idea
that this can (optionally) replace the current inserting of tiles in the
main result buffers. Especially with a lot of layers, the used memory for
these buffers can easily go into the 100s of megs.
Two other advantages:
- all 'render result' layers can be saved entirely in a single file, for
later use in compositing, also for animation output.
- on each render, per scene, a unique temp file can be stored, allowing
to re-use these temp files on starting Blender or loading files, showing
the last result of a render command.
The option is currently disabled, needs more work... but I had to commit
this because of the rest of the work I did!
-> Bug fix
The Image node didn't call an execute event when browsing another image.
they work ok in testing here and get done what I need, any checks or fixes are welcome.
* Separate RGBA: Separates an input RGBA image into its R, G, B and A channels
* Separate HSVA: Separates an input RGBA image into H, S, V and A channels
* Set Alpha: Takes an input RGBA image and an alpha value channel and combines them
into a single RGBA image channel. You can also set the alpha for the entire image
with the number field when there's no input alpha channel. TODO: Allow input alpha
channel with no input image, in order to output a solid colour, with alpha.
Allow object.setMatrix() to accept 3x3 matrices by extending to a 4x4
internally. Also check the dimensions of the new matrix and throw an
exception if not a 3x3 or 4x4.
In Orange we've been fighting the past weeks with memory usage a lot...
at the moment incredible huge scenes are being rendered, with multiple
layers and all compositing, stressing limits of memory a lot.
I had hoped that less frequently used blocks would be swapped away
nicely, so fragmented memory could survive. Unfortunately (in OSX) the
malloc range is limited to 2 GB only (upped half of address space).
Other OS's have a limit too, but typically larger afaik.
Now here's mmap to the rescue! It has a very nice feature to map to
a virtual (non existing) file, allowing to allocate disk-mapped memory
on the fly. For as long there's real memory it works nearly as fast as
a regular malloc, and when you go to the swap boundary, it knows nicely
what to swap first.
The upcoming commit will use mmap for all large memory blocks, like
the composit stack, render layers, lamp buffers and images. Tested here
on my 1 GB system, and compositing huge images with a total of 2.5 gig
still works acceptable here. :)
http://www.blender.org/bf/memory.jpg
This is a silly composit test, using 64 MB images with a load of nodes.
Check the header print... the (2323.33M) is the mmap disk-cache in use.
BTW: note that is still limited to the virtual address space of 4 GB.
The new call is:
MEM_mapalloc()
Per definition, mmap() returns zero'ed memory, so a calloc isn't required.
For Windows there's no mmap() available, but I'm pretty sure there's an
equivalent. Windows gurus here are invited to insert that here in code! At
the moment it's nicely ifdeffed, so for Windows the mmap defaults to a
regular alloc.
- Button option "Single" in render-layer panel will enable to only render
the currently indicated render-layer. It will also skip compositing.
- Brought back the 'Local View' render. This will only render the visible
objects, but with lights from the original view-layers.
To make the option useful, it also temporal enables 'Single', which has
the a disadvantage that you need to set the correct render-layer.
It is a bit a tricky option though... since its quite invisble and
confusing for people who don't know the feature. This might become either
a button in 3d header, or use a popup requester to confirm, or... will
need to think over!
At least; both options display in render window a text to denote the option.