Commit Graph

40398 Commits

Author SHA1 Message Date
76543574bc Code cleanup: declarations for removed functions 2014-02-04 07:20:19 +11:00
eff3bd4e98 Fix T38439: allow IOR in range [0, inf] instead of [1, inf] in Cycles.
The same can be achieved by flipping normals on the mesh, but it can be
convenient to do this in the shader.
2014-02-03 17:08:34 +01:00
8b1731e13d Scanfill: skip checks for loose edges when they can't occur
Only editmesh needs this, text, curves, masks - can all skip this check
2014-02-04 02:57:27 +11:00
0d7586739a Code cleanup: replace while -> for loops 2014-02-04 02:23:34 +11:00
68521841a8 Bevel: remove unused assignments.
Caught by coverity.
2014-02-03 09:53:27 -05:00
e996b88004 Fix T38424: modal number input ctrl - did not work, only ctrl numpad -.
Since there isn't always a numpad available this should work.
2014-02-03 15:49:24 +01:00
3d8c1068ba Fix T38420: Segfault when curve deform modifier and cyclic dependency
Crash was caused by missing curve_cache due to cyclic dependency.
This commit is rather a workaround, but we couldn't really guarantee
proper behavior in cases with cyclic dependency. So rather than calling
object update directly as it used to be let's don't perform curve
deform and be safe for threading instead.
2014-02-03 19:42:27 +06:00
7fbb7e32fd Fix T38450: Remove unused Children Offset option
This option was only exposed to the interface and internally
was doing basically nothing.

Removing it to prevent artists from being confused.
2014-02-03 19:34:29 +06:00
d484eb8c25 Fix T38421: Vertex Parenting & Triangle Vertex Parenting causes segfaults.
Issue was caused by clearing dirty flags from element table in bmesh before
the data was fully ready.

This confused checks happening from threads and some threads did consider
element table is usable while other thread was still filling it in.
2014-02-03 19:13:25 +06:00
89a846df51 Add compatibility for older Collada files
The Fix in 273 creates a backward incompatibility:
Collada files that have been created with an older Blender version
will contain the spotlight_size in Radians where Collada wants
this value to be in DEGREE.

This fix adds a check for the Blender Version that was used to create the
Collada file. If the Collada file was made by an older version of Blender
then the importer will assume that spotlight_size is specified in RADIANS.

Reviewers: campbellbarton, sauraedron

Reviewed By: sauraedron

CC: jesterking

Differential Revision: https://developer.blender.org/D279
2014-02-03 13:04:51 +01:00
9bec4f7779 Fix T38455: Blenderplayer is not working
Was a regression since avg_frame_rate changes.

Didn't find reliable way to get stream duration which will
work with both FFmpeg and Libav so added some freaking black
magic to distinguish one from another.
2014-02-03 17:25:47 +06:00
15f449c529 Add include for FreeBSD and clang 2014-02-03 22:04:56 +11:00
b783140ef6 Image/Animation loading, remove user-pref extension check.
don't use extension checking preference for low level loading functions,
otherwise a user preference may impact a script loading a file for example.

looked into making this an argument and passing it in, but theres no
real advantage and its simpler just to remove.
2014-02-03 19:37:40 +11:00
107566ebf1 Code cleanup: check -1 for error return explicitly 2014-02-03 19:35:44 +11:00
d900f5be55 Code cleanup: use bools where possible 2014-02-03 19:35:44 +11:00
a948ae2c51 Fixed a possible access to null pointer reference.
Patch by tamerlan311 (Alex Babahin)

Reviewers: sergey

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D282
2014-02-03 13:56:03 +06:00
65b1ace941 Fix T38447: Deactivated hotkeys are still showing in menu 2014-02-03 19:23:50 +13:00
b320139c67 Use bool where appropriate 2014-02-03 19:23:49 +13:00
1dc1d92dab Code cleanup: white space and cmake was broken on all platforms 2014-02-03 13:56:34 +11:00
482823a1ab Fix T38435: Crash when pressing MMB in walk mode
Snap code may be called with a NULL region, add check about this and assume ray_start is OK in this case!
2014-02-02 20:35:45 +01:00
fed1b8b16d Code cleanup: suffix vars to make obvious they are squared 2014-02-03 02:46:45 +11:00
dda63375b2 Fix: Compile error due to missing #define for MSVC9 (VisualC++ 2008)
Added some relevant #defines copied from extern\libmv\third_party\msinttypes to BLI_sys_types.h so they can be used in blenlib. Made smallhash.c use the BLI_sys_types.h include rather than including <stdint.h> directly
2014-02-02 14:40:52 +01:00
a16998911b Freestyle: Fix for iterations over 0D elements in the reversed order.
The revision is concerned with Interface0DIterator and StrokeVertexIterator.
These iterators can be generated by Interface1D::vertices_end() and
Stroke::stroke_vertices_end(), respectively.  These methods return an
iterator poinitng the next index of the last 0D element (i.e., iterator's is_end
property is true).  When the iterators created in this way are used with
Python's iterator protocol (e.g., in a for-loop), iterations over 0D elements
are automatically performed in the reversed order.  This functionality was
broken after recent revisions concerning Freestyle iterators.

Also made minor code cleanup (white space).
2014-02-02 22:05:32 +09:00
41d778fa5d Docstring updates and code cleanup by flokkievids (Folkert de Vries). 2014-02-02 22:05:31 +09:00
bab88fee20 Code cleanup (mostly indentation and white space). 2014-02-02 22:05:30 +09:00
e9e2813fbe Fix for iterators' at_start flag left unset in C++ to Python conversion utility functions.
Also changed the type of the 'reversed' flag from int to bool.
2014-02-02 22:05:29 +09:00
b58beed604 Imported D222 Diff 2 (ID 781) by flokkievids (Folkert de Vries). 2014-02-02 22:05:28 +09:00
41cc86a666 Add include needed for clang, quiet warning 2014-02-02 21:33:52 +11:00
42b68c2b1d BMesh: optimize loop_find_regions, reserve array size 2014-02-02 17:41:59 +11:00
b4ae05e4db BMesh: optimize lookups for triangle fill 2014-02-02 17:09:38 +11:00
c4345a808c Smallhash: add reserve option to avoid resizing when size is known 2014-02-02 17:08:26 +11:00
dcd90d67c8 Smallhash: fixes/improvements
- use magic numbers based on uintptr max, not uint max, to avoid possible collisions with real pointer values on 64bit systems.
- comment BLI_smallhash_remove for now, its not used.
- added smallhash_val_is_used replacing ELEM() checks
- updated docs
2014-02-02 16:24:33 +11:00
7c9b106589 Smallhash: optimizations
- remove static array used only for copying (use alloca on resize)
- set SMSTACKSIZE to one of the values in 'hashsizes' since the full available size was never used.
- ensure ~1.5x as many buckets as entries, was 3x which caused malloc's quite early on.
2014-02-02 02:24:48 +11:00
a1a0ebbf49 Code cleanup: use length squared where possible 2014-02-02 02:24:48 +11:00
798e684c7c Math lib: simplify size_to_mat4 and use in b_bone_spline_setup 2014-02-02 02:24:47 +11:00
5fce3457b7 Math lib: add axis_angle_normalized_to_quat, use when length is known 2014-02-02 02:24:47 +11:00
a9e7c7b848 Fix T38432, Fix 38432: more stupid error in view3d ray code, sorry about that. 2014-02-01 15:06:13 +01:00
70f2389f5a Code cleanup: be less vague checking invalid index values 2014-02-01 02:01:00 +11:00
1af6e656ec Fix for error setting unique names for tracks 2014-02-01 02:01:00 +11:00
34a0532584 Code cleanup: comments and warnings 2014-02-01 02:01:00 +11:00
d291d15c19 Fix for T32843
Exported angles for spot size animation is in radians , however Collada expects it to be in degrees.
This patch is for fixing import and export, and also renaming a variable

Reviewers: gaiaclary

Reviewed By: gaiaclary

Differential Revision: https://developer.blender.org/D273
2014-01-31 09:35:00 +01:00
a7b1349ce4 Events: fix for wmEvent prevx, prevy not updating 2014-01-31 07:42:34 +11:00
1e096ee816 More snapping fixes (this is ridiculous).
I hope this time we are done!
2014-01-30 18:50:12 +01:00
0e1c1b6196 Code cleanup: remove BLI_has_parent 2014-01-31 03:30:05 +11:00
3c86a1932f Code cleanup: add BLI_testextensie_n, replacing multuple calls to BLI_testextensie
also use attributes for BLI path functions
2014-01-31 03:30:05 +11:00
0cb49286ce Fix T38409: Snapping Bug
Issue partially caused by own errors (glicth in new BKE_boundbox_ray_hit_check() code causing segfault in volume snapping,
and we have to treat ortho and persp differently in case of face snapping, because in persp our ray_start might very well
already be *inside* the boundbox of the checked object), and partly due to the fact that ED_view3d_win_to_vector()
was returning wrong vector (negated one) for ortho views (see previous commit).
2014-01-30 17:16:07 +01:00
f54ed9f5e0 Fix a nice bug in ED_view3d_win_to_vector() - vector returned for an ortho view was negated compared to vector returned for the same view in perspective...
Found while working on snapping issues, confirmed using bisect tool: previous to this commit, inner/outer parts were swapped when switching from otho to persp!
2014-01-30 16:51:44 +01:00
2011156eec Fix for crash linking node groups through bpy.data.library
Defer creating the Python objects until after appending is finished
because NodeTree's types are not initialized until then.
2014-01-31 00:56:19 +11:00
2b55d7895c Fix T38403: Laplacian smooth on instanced objects leads to crash.
The laplacian modifiers (smooth and deform) use the OpenNL library,
which is not threadsafe due to the use of a global context variable.
Ideally this would be changed so that an explicit context can be
created for every caller of the OpenNL functions, but since OpenNL's
most recent version is from 2010 this is unlikely to happen.

As a workaround for now just use a mutex to prevent conflicting OpenNL
calls. Eventually OpenNL can be replaced by eigen or ceres.
2014-01-30 13:09:32 +01:00
810c6d1880 Fix T38358: typo in own rB77089a3bf203.
Also allowed me to fine another potential issue, hit.dist was no more initialized correctly - and I had forgotten to take into account Brecht's remark about normalize_v3() also returning the vector's previous length.
2014-01-30 11:54:55 +01:00