- add option to calloc or not, existing code wasnt consistent here, would calloc on first alloc but not on realloc, also - the static memory was never zero'd.
use flag BLI_BUFFER_USE_CALLOC to ensure all new memory is zero'd (static/alloc/realloc's).
- add BLI_buffer_declare_static / BLI_buffer_declare so its possible to have a buffer that never uses static memory.
There is a new option in the Bake panel to enable baking to vertex colors. Unlike regular baking, this mode does not require a UV map or image to bake to, however the object must have a vertex color layer.
Thanks to:
- AutoCRC for funding
- Brech van Lommel and Dalai Felinto for their initial advice on how to implement it
- Campbell Barton for helping to make this feature work with modifiers and bmesh
Separate 2D painting functions away from brush.c, which should implement
the brush API and into its own file, paint_2D.c.
Ideally projective texturing and 2D painting should be totally separate,
however functionality is still interleaved mostly in the
BKE_brush_painter_paint function. The functionality of this function can
possibly be done using the brush stroke functions instead.
While examining icons, I noticed material icons were too dark.
It appeared a lot of bad hacks were added for colormanagement in preview render.
Removed them all, and things look smooth (yes, color management is OK!).
However! It is now very clear that Procedural Textures miss getting inverse
color managed in render - a reason why they show so bright washed out, already
since introduction of Color Management in Blender.
Try render a plane with linear black-white blend, shadeless!
http://www.blender.org/bf/Untitled.png
Todo: add colormanaged procedurals (optional).
Looks like _Bool is also a type in std (at least with msvc), so the 'typdef bool _Bool;' generates a name collision... Now using _BLI_Bool as placeholder instead.
When trackpad swipes don't convert to ScrollWheel steps anymore, several hardcoded
wheel events need to support swipe too.
This adds swipe support to:
- Menu item scroll
- Search item scroll
- ALT + number/slider/swatch values
The amount of old style scroll "clicks" is calculated based on how trackad is
being mapped to move a mouse pointer. Move it one widget unit = 1 click.
The swatch option applies trackpad swipe motion in analog way.
This commit implements highlight of tiles which are being currently
rendered for both Blender Internal and Cycles (and should be possible
to use it for other external engines as well).
Couple of implementation details:
- Added one extra boolean flag to render engine which should be set
to truth if render engine wants to highlight tiles. If so, property
use_highlight_tiles should be set to True.
- Render Part's ready boolena was changed by status enum, which could
be NONE, IN_PROGRESS and READY. All render part with IN_PROGRESS
status will be highlighted in image editor.
- For external engines render part's status is filling in automatically.
Initially all render parts has got NONE status, then one external
engine acquire render result, corresponding part will change status
to IN_PROGRESS. As soon as render result is finished, corresponding
render part will change status to FINISHED
This should make it easy to highlight tiles for other engines as well.
There's many hardcoded scrollwheel events in Blender for this, and with new proper
analog trackpad handling I'll try to find good remapping for most cases.
There was no selection flushing when faces or verts were selected, this allowed incorrect selection states like selected face with unselected vertices.
add flush commands to paintface_flush_flags() and paintvert_flush_flags()
by Lawrence D'Oliveiro (ldo)
so BKE_utildefines.h allows use of C99's bool type and true/false.
currently scons wont try to use stdbool.h, and works as if its never found.
* Some code cleanup
* Bugfix: rotation of uv islands during stitch on images with aspect
ratio was different for different island rotations. I needed to correct
normal and tangent calculation to take image aspect into account.
- This doesnt use python as 2.4x did, instead it just autocompletes based on the text files unique identifiers so its useful for any language.
- key is same as console (Ctrl+Space)
in user preferences in place.
New scroller code made user pref scroller jump back on activating add-ons,
because that causes a full blender system refresh.
This assumptions are now made:
- Internally float buffers are always linear alpha-premul colors
- Readers should worry about delivering float buffers with that
assumptions.
- There's an input image setting to say whether it's stored with
straight/premul alpha on the disk.
- Byte buffers are now assumed have straight alpha, readers should
deliver straight alpha.
Some implementation details:
- Removed scene's color unpremultiply setting, which was very
much confusing and was wrong for default settings.
Now all renderers assumes to deliver premultiplied alpha.
- IMB_buffer_byte_from_float will now linearize alpha when
converting from buffer.
- Sequencer's effects were changed to assume bytes have got
straight alpha. Most of effects will work with bytes still,
however for glow it was more tricky to avoid data loss, so
there's a commented out glow implementation which converts
byte buffer to floats first, operates on floats and returns
bytes back. It's slower and not sure if it should actually
be used -- who're using glow on alpha anyway?
- Sequencer modifiers should also be working nice with straight
bytes now.
- GLSL preview will predivide float textures to make nice shading,
shading with byte textures worked nice (GLSL was assuming straight
alpha).
- Blender Internal will set alpha=1 to the whole sky. The same
happens in Cycles and there's no way to avoid this -- sky is
neither straight nor premul and doesn't fit color pipeline well.
- Straight alpha mode for render result was also eliminated.
- Conversion to correct alpha need to be done before linearizing
float buffer.
- TIFF will now load and save files with proper alpha mode setting
in file meta data header.
- Remove Use Alpha from texture mapping and replaced with image
datablock setting.
Behaves much more predictable and clear from code point of view
and solves possible regressions when non-premultiplied images were
used as textures with ignoring alpha channel.
for not finding it in review.
Also removed the hard limits on motion blur shutter time, soft limits are still
the same but it can be useful to set things lower/higher in some cases.
Editmode "Shear" didn't communicate well.
- Added X and Y shortcut to set shear axis
- Added print in header to denote that.
It will still switch with MMB press too.
The keymap entries for NDOF device were moved up, so the hotkey searches for
menus didn't show the keyboard shortcuts. Special devices shouldn't list as a
shortcut.