Commit Graph

1933 Commits

Author SHA1 Message Date
Campbell Barton 9e742ffc2b style cleanup: also correct some doxy comments 2012-08-18 13:07:48 +00:00
Campbell Barton 8d496b3bf2 fix [#32315] Circle select unreliable when in vertex+edge select mode
dist_squared_to_line_segment_v2() was returning the sqrt'd value in some cases.
also use int's for edge_inside_circle() rather then shorts since it was doing int/float/short conversions and we're now using int's for screen vars in more places.
2012-08-14 08:24:49 +00:00
Campbell Barton 9cce2d8645 smooth-view for 2d views, graph editor, sequencer, node view, works with border zoom, view selected, view all. 2012-08-12 01:07:31 +00:00
Campbell Barton b96c622015 style cleanup 2012-08-11 22:12:32 +00:00
Campbell Barton 414b9865e4 zero rotation values for quat_apply_track() which were in fact just float in precision.
also minor code cleanup - tabs -> spaces in scons file.
2012-08-10 08:19:45 +00:00
Campbell Barton 0107385f7f code cleanup: ensure macros require ';' endings 2012-08-08 21:20:10 +00:00
Campbell Barton c985a40abb fix for own error confusing FLT_MIN with -FLT_MAX (didnt get into a release, dont include in log) 2012-08-07 18:41:47 +00:00
Howard Trickey 244714d53e Remove redundant typedef of BLI_Stack
(caused compilation errors with some compilers)
2012-08-06 13:31:28 +00:00
Campbell Barton 00ea79afa0 fix for building in debug mode. 2012-08-06 08:01:20 +00:00
Nicholas Bishop b6bc308375 Add an array-based generic stack structure to blenlib
Very simple stack with homogeneous contents. Provides push, pop, and
is-empty operations.
2012-08-05 23:29:43 +00:00
Campbell Barton 887d517e3b use define for 0.375 = GLA_PIXEL_OFS, used all over the interface.
also use M_SQRT1_2 in math_rotation.c
2012-08-05 17:27:52 +00:00
Campbell Barton 0a35e050f3 code cleanup: remove redundant calls to CTX_data_main() 2012-08-05 14:11:51 +00:00
Campbell Barton 7cfe6e0fda fix a glitch where overlapping feathering could give random bad pixels, this was caused by feather edge going in a different direction to the mask edge - creating bowtie quads. 2012-08-04 21:04:26 +00:00
Campbell Barton 9ff4fa6671 style cleanup 2012-08-04 12:30:16 +00:00
Campbell Barton 6972e19fd5 code cleanup:
- replace (strcmp(vfont->name, FO_BUILTIN_NAME) == 0)  with  (BKE_vfont_is_builtin(vfont)).
- reduce some double promotions.
2012-08-03 22:12:57 +00:00
Campbell Barton 173b998735 fix/edits to vector font handling
- don't overwrite the font path with "<builtin>" when the font file cant be found, it caused bad problems when loading files on someone elses systems when paths couldn't be found blender would silently clobber paths (tsk tsk).

- when fonts are freed their temp data is now freed too.

- assigning a new filepath to a font now refreshes the object data.
2012-08-03 15:03:40 +00:00
Brecht Van Lommel aac3f0eaeb Fix warnings on old apple GCC compiler due to no support for alloc_size attribute. 2012-07-31 15:05:09 +00:00
Campbell Barton 82fc02fb48 fix for own error in r43796, 'Find Missing Files', could set the path to an empty string. 2012-07-30 16:42:26 +00:00
Campbell Barton 7217927414 add inline functions for max/min ints, good to use when the arguments are function calls (we had a few of these). 2012-07-29 18:14:20 +00:00
Campbell Barton c41e1e434a code cleanup: replace MIN2/MAX2 with minf/maxf 2012-07-29 16:59:51 +00:00
Campbell Barton e32c60284a style cleanup 2012-07-29 00:20:28 +00:00
Campbell Barton 4c2de5e0c7 fix some types and incorrect info 2012-07-26 17:41:09 +00:00
Sergey Sharybin 8197ae0054 Fix regression introduced in svn rev49122
Would rather have mathematical functions consistent from using
the same vector for input and output values point of view then
introducing questionable optimizations.
2012-07-25 16:37:24 +00:00
Campbell Barton 513aec7687 code cleanup: remove unused math functions (where already noted as deprecated) 2012-07-22 17:49:56 +00:00
Campbell Barton fefddc320d code cleanup: use cosf and sinf when both args and results are float values.
also remove local math functions in KX_Camera
2012-07-22 17:35:43 +00:00
Campbell Barton 2a98e83abd style cleanup 2012-07-21 16:21:42 +00:00
Campbell Barton 62a73381a7 use fabsf when using floats. 2012-07-21 15:27:40 +00:00
Campbell Barton 250cdd5e52 code cleanup: remove commented includes - mostly from 2.4x 2012-07-18 23:07:07 +00:00
Campbell Barton 8f32070e9d fix incorrect assert for mask face checking, also correct own bad spelling 2012-07-18 11:01:23 +00:00
Bastien Montagne 382ded688a Spellcheck: minkovsky -> minkowski! (Only in comments/UI messages :/ ). 2012-07-17 18:14:59 +00:00
Campbell Barton 32cf7fcdb1 code cleanup: spelling 2012-07-16 23:23:33 +00:00
Sergey Sharybin 92205486e7 Masks: feather self-intersection collapse function
This implements simple function which collapses internal loops
caused by self-intersections into a singularity.

This loops can't be removed because rasterizer expects points
of feather be aligned with points from spline itself.
2012-07-16 17:54:28 +00:00
Campbell Barton 273bb8fa90 barycentric_weights_v2_quad wasn't working quite right, rewrite as an expanded version of interp_weights_poly_v2() that cuts down duplicate calculations. 2012-07-16 12:01:18 +00:00
Campbell Barton 9a385d12e3 add 2d version of interp_weights_poly_v3 2012-07-16 10:36:40 +00:00
Campbell Barton 6f01b0b11f small speedup for mask rasterizer, only do single sided check for triangle intersection. 2012-07-16 06:39:40 +00:00
Campbell Barton 380c5d66a8 math function to get the intersection point between 2 lines (not 2 segments which we already have). 2012-07-15 11:35:13 +00:00
Campbell Barton 7cc5af4ef3 minor refactor for rect functions. more consistent naming. 2012-07-15 00:29:56 +00:00
Campbell Barton a52153a618 mask rasterization: use a simpler method to check if a bucket intersects with a triangle. 2012-07-14 18:42:59 +00:00
Campbell Barton 6946294ab9 rename vars for line dist funcs to make more sense 2012-07-14 18:37:48 +00:00
Campbell Barton e4cfcdc3a6 header comment cleanup, explain whats the difference between confusingly named drarnode.c and node_draw.c. 2012-07-14 15:29:45 +00:00
Campbell Barton 98520ce4de use gcc attributes for BLI alloc functions 2012-07-14 12:47:49 +00:00
Campbell Barton 9e09005e49 add is_quad_convex_v2(), SET_UINT_IN_POINTER, GET_UINT_FROM_POINTER macros & some minor edits. 2012-07-14 00:33:58 +00:00
Sergey Sharybin 807ad1f0e0 Fix #32087: Crash while changing values in comp editor (bt and blender included)
Issue was caused by threading conflict between compositor output node which
is freeing buffers used by render result image and image draw code which
could use buffers at the same time as compositor frees this buffers.

Solved by adding adding  lock around viewer image invalidation and image
drawing.

Use renamed LOCK_PREVIEW mutex for this, which si not called LOCK_DRAW_IMAGE.
With new compositor locking for preview is not needed so it could be removed.

Added the same lock around viewer operation which also frees buffers used
by viewer image. It's actually quite difficult to check whether this is
indeed needed. This code seems to be using acquire/release technique, but
somehow acquiring ImBuf before invalidating it in compositor operation
doesn't resolve the issue, so probably it's not actually locking acquire
and things should be checked deeper.
2012-07-13 13:47:13 +00:00
Campbell Barton 73c2abe83d new function barycentric_weights_v2_quad(), like barycentric_weights_v2 but for quads.
takes vecs and a point and assigns 4 weights, needed for nice quad interpolation for mask feathering.
2012-07-13 09:19:05 +00:00
Campbell Barton 38f91db37c add bli rect min/max functions. 2012-07-12 09:24:17 +00:00
Campbell Barton 2560725807 - add a temp var for edge scanfill (fits in 4 bytes alignment - won't increase mem usage)
- make keyindex an unsigned int, since its used to store vertex indices
- use BLI_in_rcti_v for IN_2D_VERT_SCROLL and IN_2D_HORIZ_SCROLL
2012-07-12 08:34:59 +00:00
Campbell Barton 993dfd7d2a add bli rect funcs BLI_rctf_init_minmax, BLI_rcti_init_minmax 2012-07-12 08:31:23 +00:00
Campbell Barton a5127dba57 vector versions of BLI_in_rctf / BLI_in_rcti, (BLI_in_rctf_v, BLI_in_rcti_v)
use where possible.
2012-07-11 18:17:48 +00:00
Campbell Barton 81829f5221 code cleanup: use const for passing vectors 2012-07-11 12:42:02 +00:00
Sergey Sharybin 4e213765ec Fixes for keying screen:
- Fixed issue with black areas appearing when too many sites
  are defined.

  Currently tweak epsilon value for this, but probably actual
  issue is somewhere else, can't see it yet.

- Fixed issue with bright pixels appearing in the sites, was
  caused by accumulating color for pixels, which isn't needed.

  Once color for pixel was set stop iterating via triangles.
  Could give some speedup too.

- Ignore markers which are outside of frame bounds, they were
  giving bad triangulation and they can't affect on gradient
  due to color fir such sites is not known.

- Sites used to be created at position without track offset
  taken into account.
2012-07-11 07:46:36 +00:00