Commit Graph

43698 Commits

Author SHA1 Message Date
Jens Verwiebe
55f3361924 Fix playercompile with stub for BKE_brush_gen_texture_cache 2013-01-02 13:41:30 +00:00
Campbell Barton
a94e4e0ef8 fix [#33726] keyframe_insert() and keyframe_delete() with index=-1 always fail
The bug was introduced in r53297, was calling pyrna_struct_anim_args_parse() twice for no reason, perhaps baddly applied patch?.
2013-01-02 06:09:53 +00:00
Campbell Barton
0d95dde79b add assert to BLI_buffer_at if a type is given different to 'elem_size' 2013-01-02 05:19:55 +00:00
Campbell Barton
9190c493c1 extend BLI_buffer
- 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.
2013-01-02 05:00:02 +00:00
Campbell Barton
a8a60c6566 dyntopo speedup for smooth brush, no need to search for the shared vert-face loop, instead just iterate over the loops. 2013-01-02 02:12:10 +00:00
Joshua Leung
8b8e5882aa Replacing/cleaning up some gibberish... 2013-01-02 02:08:43 +00:00
Campbell Barton
ec1681fae7 style cleanup 2013-01-02 01:49:07 +00:00
Campbell Barton
ab156fba3b rename image paint_image_2d to lowercase (as we have for view2d). 2013-01-02 01:36:36 +00:00
Joshua Leung
4ab2fed9bb Fix for what appears to be a typo (seq_prev is always NULL) - found while
reviewing the latest Clang reports
2013-01-02 00:15:37 +00:00
Alex Fraser
5e0e62f040 Patch [#29035] Vertex colour baking
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
2013-01-02 00:05:30 +00:00
Antony Riakiotakis
7085387def rename paint_2D to paint_image_2D. Catering for possible name conflicts
with other 2D paint systems.
2013-01-01 21:32:17 +00:00
Antony Riakiotakis
59893d9d5b Code cleanup:
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.
2013-01-01 21:23:12 +00:00
Stuart Broadfoot
0f3931dee4 Fix for normal scaling when using triangle primitives for hair.
and some code clean ups in blender_curves and node_shader_hair_info.c
2013-01-01 19:50:29 +00:00
Stuart Broadfoot
178a877a95 Fix to prevent undefined normals being generated with `add_face_normals()', from triangles with zero area. 2013-01-01 19:44:09 +00:00
Ton Roosendaal
247c7078bc Bug fixes, own collection.
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).
2013-01-01 19:02:08 +00:00
Bastien Montagne
6ea766be0e Intent to fix windows not compiling after r53480.
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.
2013-01-01 18:18:45 +00:00
Ton Roosendaal
be519ad7ff Further trackpad work:
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.
2013-01-01 16:42:35 +00:00
Sergey Sharybin
2e0e2cb170 Highlight currently rendering tiles
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.
2013-01-01 16:15:13 +00:00
Bastien Montagne
b88836a45b Add a warning to enum props' items parameter, to *never* use a generator as value for this param! It works in most cases, but in some it leads to an empty set of values for the enum (see [#33716]), and it's not an easy bug to track down! 2013-01-01 15:55:21 +00:00
Campbell Barton
16afa704cc fix for own error in recent weight paint code, bound-box clip wasnt working. 2013-01-01 14:20:59 +00:00
Ton Roosendaal
2754ee1f62 Added MOUSEPAN (the trackpad event) to control propertional size while transform.
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.
2013-01-01 14:06:02 +00:00
Campbell Barton
1692f17c9b fix for long standing annoyance with weight-paint mode selection.
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()
2013-01-01 13:08:07 +00:00
Campbell Barton
1db74622ce make wight-paint-through feature work in face select mode. (still WIP, relies on selection flushing which currently ensured). 2013-01-01 12:51:08 +00:00
Campbell Barton
80ff313495 patch [#33331] Time To Start Moving To Stdbool
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.
2013-01-01 12:47:58 +00:00
Campbell Barton
e4f65749f9 remove vertex selection check for weight paint mode so you can paint through the mesh.
also made the wire draw without depth masking when the depth check is off, similar to mesh editmode drawing, nice hint about whats going on.
2013-01-01 11:47:47 +00:00
Antony Riakiotakis
b79ec3ac2e UI cleanup: fixed texture is a 2d image painting option, hide in 3D viewport toolbar 2013-01-01 11:46:12 +00:00
Antony Riakiotakis
ccf27a3c34 Fix: weight painting operated only for selected vertices in edit mode.
We only need this in case vertex selection is enabled.
2013-01-01 11:08:05 +00:00
Mitchell Stokes
d0981c279b BGE: Fixing a crash that occurred when LibLoading a scene with a 2D Filter Actuator. The actuator was still referencing the old scene. 2012-12-31 21:32:46 +00:00
Antony Riakiotakis
2787c78175 smart stitching:
* 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.
2012-12-31 19:38:40 +00:00
Campbell Barton
5ce8409be6 code cleanup: name event -> event_type in macros, since this is from event->type 2012-12-31 17:39:01 +00:00
Campbell Barton
9d9542561c code cleanup: autocomplete functions 2012-12-31 17:19:55 +00:00
Campbell Barton
d191dec1d5 syntax highlight autocomplete listing. 2012-12-31 16:40:14 +00:00
Campbell Barton
dd62a2c375 text autocomplete
- make the popup box line up the X axis with the current word.
- add poll function for the operator
2012-12-31 16:24:49 +00:00
Bastien Montagne
f54b6eee45 More wrong "in degrees" busted out of tips! 2012-12-31 15:54:44 +00:00
Sergey Sharybin
281465a311 Correction to RNA update functions
Either forgot to merge some local changes into trunk or merge happened wrong..
2012-12-31 15:45:31 +00:00
Sergey Sharybin
f1da6fe4dd Fix for saving 8bit PNG images when there's no byte buffer in ImBuf
Misunderstand flag of file filter, should work fine now.
2012-12-31 15:30:03 +00:00
Campbell Barton
4e1da54b5e add back initial autocomplete support.
- 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)
2012-12-31 15:11:36 +00:00
Ton Roosendaal
d4eac8189e Removed on old patch from the code, which attempted to keep the scrollers
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.
2012-12-31 14:56:07 +00:00
Campbell Barton
b754fcd6f9 code cleanup: warning 2012-12-31 14:55:16 +00:00
Bastien Montagne
44632295b3 Some minor cleanup in camera's FOV angle props (mostly use DEG2RAD macro, and remove reference to degrees in tips - user is free to use radians if he prefers!). 2012-12-31 14:52:55 +00:00
Campbell Barton
acc05db50f minor updates to text autocomplete api
- draw function wasn't lining up correctly since DPI edits
- rename text_python.c to text_autocomplete.c
2012-12-31 14:49:27 +00:00
Sergey Sharybin
334ca1d344 Correction to recent PNG commit
Need to set default depth to 8bit.
2012-12-31 14:02:33 +00:00
Sergey Sharybin
93f78ac1e1 Removed byte glow effect from sequencer in favor of float one.
Byte glow was disabled in previous commit and code is removed now
in separate commit for easier revert if that'd be needed.
2012-12-31 13:52:26 +00:00
Sergey Sharybin
08cea96ab0 Alpha premul pipeline cleanup
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.
2012-12-31 13:52:13 +00:00
Brecht Van Lommel
97c6a55c39 Fix #33706: issue in cycles motion blur rendering after hair commit, my fault
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.
2012-12-31 13:07:06 +00:00
Ton Roosendaal
fc6784126b Usability todo:
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.
2012-12-31 12:26:14 +00:00
Ton Roosendaal
bec3b34d25 Bug fix - post 2.65a problem:
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.
2012-12-31 12:13:30 +00:00
Bastien Montagne
c0a697807a Add try/catch around i18n locale setter code, just in case... 2012-12-31 12:12:50 +00:00
Campbell Barton
c9d16fd22c add ".hh" as an extension for source scripts. 2012-12-31 07:06:51 +00:00
Campbell Barton
827f9aa737 rename BM_edge_calc_squared_length -> BM_edge_calc_length_squared, matching len_v3, len_squared_v3 2012-12-31 02:40:15 +00:00