Commit Graph

40091 Commits

Author SHA1 Message Date
1c29fd77d3 Code Cleanup: style and correct API class ref 2014-01-26 22:17:01 +11:00
70e844ea11 Fix T38353: some EXR files from other applications not loading correctly.
* EXR layers with names like 'Z' without any pass name were not loaded at all
  and would break the Combined pass as well.
* EXR pass names longer than 16 characters where writing past the end of the
  array and getting invalid names.
2014-01-25 17:44:15 +01:00
c0a4089265 Fix T38356: Crash when UIList.filter_items returns too few items. 2014-01-24 22:13:20 +01:00
28564e1583 Change tooltip text for Vertex Group in Bevel Modifier.
Reflects previous commit that now allows this group to
control edge bevels too.
2014-01-24 12:52:18 -05:00
2a8f6e2fd9 Bevel modifier can use vertex groups for edge bevel now.
Until now, the "vertex group" limit method in the modifier
only worked for "vertex only" bevels. With this change,
edges with both ends in a vertex group will be beveled
in the non-"vertex only" case.
Also changed the test for being in a vertex group from
"any nonzero weight" to "weight >= 0.5". This is because
cascaded bevels on disjoint vertex groups did not give
disjoint bevels, because weight interpolation would give
non-zero weights to newly created vertices in earlier bevels.
Chose 0.5 because that won't result from interpolation, but
still allows some dilution (e.g., cascaded bevels on the
same vertex group).
2014-01-24 12:42:20 -05:00
9e2ebecb21 Add convinient access to full bitangent for loops (some export formats like FBX expect full bitangents, better to compute them in C than in python...) 2014-01-24 17:49:29 +01:00
257f408864 Fix T38347: adding object visibility keyframes in the outliner groups and
libraries view not working.

This was disabled in the operator, there may have been a reason for this at
some point, but I can't see any reason to disallow it in the current code or
find a good reason why it was done in the commit logs.
2014-01-24 16:12:56 +01:00
01c1790a11 Make multisegment bevel profiles even for all parameters.
The method for calculating points on the profile for non-circles
and non-lines meant that the segments making up an edge had
uneven widths.
Use a numeric search technique to find superellipse evaluation
points that lead to equal-sized chords across the profile.
Also calculate the actual profile points sooner, so that they
don't have to be recalculated again and again.
This also sets up for a possible later feature of arbitrary
profile shapes, set by user.
2014-01-24 10:07:24 -05:00
456dc16e4a Fix currently harmless issue with converting ImBuf from sequencer space 2014-01-24 14:29:50 +06:00
18db6c58ec Fix T38150: implementation mismatch in bmesh python
Hopefully this time all mismatches are fixed (quickly checked the whole BMesh API files,
found a few others in addition to those reported in T38150).
2014-01-23 20:17:54 +01:00
037730b683 Make Tab Divider interopolate between the region background and tab outline.
Previously the divider was using the region background and the region text, leading to bad outlines with custom themes. This makes the outline behave more expectedly and allows better control.
2014-01-23 12:30:28 -06:00
0f72a8a7f0 Fix T38337: Crash when calling to_mesh() on a Curve object after clearing its parent
This is rather a workaround which only works because curve evaluation is only called
for a temporary object. Not a big deal if we'll skip path creation for such objects.

Still would need to think of general solution.
2014-01-24 00:18:22 +06:00
9f903208e8 Fix T36165: blender internal HDR textures with negative values got clamped.
For example for vector displacement, you may have an EXR texture that has
negative colors values. Blender clamps these by default, now the Colors panel
for textures has a Clamp option to disable this clamping.

This option affects all texture types and is enabled by default, you need
to disable it if you want negative values to have an influence.

Patch by Fredrik Hansson with modifications by me.
2014-01-23 18:49:10 +01:00
0847549009 Fix T37685: automatic weights affected by face masking outside weight paint mode.
Only when in weight paint mode should it check the selected vertices and faces,
in object mode it should just affect the entire mesh.
2014-01-23 17:47:20 +01:00
c37e8ecc50 Cleanup: int/short to bool in BKE_cdderivedmesh.h functions (and TRUE/FALSE to true/false in code using them). 2014-01-23 14:52:46 +01:00
26ae14d2dc Fix crash when changing space type to 3D space when having multiple windows
it is possible that different windows shares scene but displays different
layers. And it's also possible that different areas in the same window will
show different layers.

First case was violated in `dag_current_scene_layers()` which only checked
scene layers only once and if multiple windows shares the same scene only
one window was handled. Now made it so layers from all windows will be
squashed together into a single `DagSceneLayer`. This mainly solves issue
with `DAG_on_visible_update()` which didn't work reliable with multiple
open windows.

Second case required call of `DAG_on_visible_update()` when changing space
are type.

This commit slows things a bit actually because `dag_current_scene_layers()`
is actually called on every main WM loop iteration. It is possible to speed
some logic up perhaps. Not sure it's so much critical to do now because there
are unlikely to be more than few windows open anyway.

Will rather think of skipping all that flushing things if no objects are
tagged for update actually.
2014-01-23 19:35:20 +06:00
64bd4be6b2 Fix for crash getting the name of RNA properties with empty name 2014-01-24 00:25:11 +11:00
536800392a Code Cleanup: whitespace 2014-01-24 00:06:09 +11:00
45df9f4141 Code Cleanup: find operator once and reuse 2014-01-24 00:06:09 +11:00
898498c800 Fix for IMB_(un)premultiply_rect_float() not doing right business
- Made them receive number of channels rather than number of planes.
  This matches to how ImBuf structure stored planes and channels.
- IMB_premultiply_rect_float() was called with channels passed instead
  of planes already :S.
2014-01-23 16:51:32 +06:00
cbdedc169d Fix T38284: Crash with several shrinkwrap constraint using same target
Issue is caused by the race condition between getting custom data layers
from target's derived mesh (for vertices and faces) and releasing this
derived mesh from other threads.

When one releases the derived mesh it'll free temporary data from it,
and it'll also update data layers mapping.

General rule for threading is that no one is ever allowed to modify
data he doesn't own. This means that no temp layers are to be allocated
in derived mesh and making it so `CustomData_free_temporary()` doesn't
update mapping if nothing was freed will solve the race condition.

It is still possible to do other improvements, namely detect which
additional data/layers are to be present in derived mesh and create
it as a part of `object_handle_update()`, but this is to be solved
separately.
2014-01-23 16:30:57 +06:00
6c1c6f22ce Removed the omat matrix from DupliObject.
This was storing the original object matrix, which builds on the
assumption that obmat is modified during dupli construction, which is a
bad hack.

Now the obmats are still modified, but this only happens outside of the
dupli system itself and the original ("omat") is stored as local
variables in the same place where the obmat manipulation takes place.
This is easier to follow and avoids hidden hacks as much as possible.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D254
2014-01-23 10:20:42 +01:00
1713db2035 Fix T38042: Keymap crash after reloading operators
After some investigation with mont29, seems like the best way to ensure
keymaps point to valid operators is using WM_keyconfig_update().
2014-01-23 19:05:56 +11:00
b64f897606 WM: add WM_operatortype_remove_ptr to remove a known operator 2014-01-23 19:05:56 +11:00
12348318d1 Fix T38328: GLSL display shows texture mapping completely messed up in some cases
Own stupid typo in rB28ca299d4dfc...
2014-01-23 08:37:07 +01:00
c02c2dfdd9 BGE Bitmap Text: add in check if the character is outside the range 2014-01-23 13:37:09 +11:00
2f46ed5564 Fix T38325: Game Engine Bitmap fonts failed for characters >128 2014-01-23 13:29:49 +11:00
80af3d6857 Tab theme colors
patch D234 from Jonathan Williamson with edits

- de-duplicate rna_def_userdef_theme_space_gradient and rna_def_userdef_theme_space_generic
- ui_theme_init_new_do now always sets theme settings (no need to test),
  used by bpy.ops.ui.reset_default_theme()
2014-01-23 11:48:36 +11:00
28ca299d4d Fix T38316: Half of a Face is Missing on Newly Created Cubes or Cylinders.
Own bug from rBc691551249f3. Now at least I understand why `test_index_face()` is needed for tessellated quads!

Added a bunch of comments to explain the issue, as it's far from an obvious one...

We loose some performances, but it's still much quicker than org code.
2014-01-22 19:56:21 +01:00
c2fbec7bf1 Fix T38323: blender viewport render in particle hair edit mode renders halos.
Currently it's not supported to do viewport render of particles while in
particle edit mode, hide the particle instead of rendering halos.
2014-01-22 19:52:11 +01:00
1c8abf8d2a Fix T37940: Curve Render bug in Blender Internal Render.
Issue was caused by curve object really scale up. It was
caused by 677f519 to make scaled down curves work fine.

After some tweaks to epsilon value scaled up curves seems
to work as well.
2014-01-22 22:57:04 +06:00
7da44effe9 Fix T38319: no camera error message for render not showing correctly. 2014-01-22 17:45:29 +01:00
1ace875391 Fix T37198: Vorbis encoding is broken
Issue was caused by wrong PTS calculation. This commit
makes this calculation closer to what's happening in
FFmpeg itself.

Seems everything is working now including newer FFmpeg,
but there's one thing which still doesn't work: writing
avi files with h264 codec and Vorbis audio doesn't play
correct in mplayer here. But didn't manage to get this
working even using FFmpeg CLI, so this might be just a
bug in FFmpeg/mplayer. Since this file works fine in
blender just fine wouldn't consider this is crucial thing
to look into at this moment.
2014-01-22 22:15:40 +06:00
e2cd654a3e Fix tool properties region drawing even if the toolbar is hidden.
This would show as a line on the side of the 3D view with high DPI / retina,
not easy to notice.
2014-01-22 16:40:11 +01:00
162d6c73e3 Fix T38318: blender internal viewport now uses viewport, not render visibility.
This is the same as cycles and more consistent with it also using viewport
resolution.
2014-01-22 16:40:11 +01:00
c24a23f264 Fix for particle emission bug, reported on IRC by Thomas Beck
(@plasmasolutions): When the particle emitter is parented to a fast
moving object, the emission locations will not be interpolated over
subframes. This works if the particle emitter is animated itself.
Particle system evaluates the emitter location for each subframe, but
has to do this for the parent objects as well to get reliable results.
2014-01-22 16:28:45 +01:00
9c883a1eca Fix T38011 and cleanup of Lens Distortion node code.
The area-of-interest calculation for that node didn't work reliably.
It tries to estimate the distorted rectangular area based on min/max
distortion and dispersion values, but this fails in some cases and
leaves uninitialized buffer chunks. So now simply use the full input
rect as the area, even though it may not be as efficient - at least it
works ...

Also cleaned up the code somewhat to make it understandable, using
separate functions for common stuff instead of cryptic walls of math.
2014-01-22 14:37:40 +01:00
4503f82ba2 Fix T38312: Crash when using snap transform in edit mode
Issue was caused by uninitialized boolean flag.
2014-01-22 16:32:52 +06:00
b722054db3 Make memory checker happy about FileGlobal
FileGlobal structure in write_global() didn't initialize
the while build_hash property and only placed there null
terminated meaningful content, leaving trailing uninitialized.

This made valgrind complain about using uninitialized memory
later in undo stack.
2014-01-22 16:32:52 +06:00
933c2b0521 BMesh: collapse_uvs - avoid clearing and flagging for every cd-layer 2014-01-22 17:16:38 +11:00
2aeb49204d Fix T38306: dupliframes causing viewport render to continually restart.
Evaluating the animation is causing the object to get tagged as changed, but in
this case it's not a permanent change so no one should be notified. Also found
a case where the persistent ID for duplis wasn't unique, fixed that as well.
2014-01-21 21:03:49 +01:00
aeca473a41 Usual UI messages fixes. 2014-01-21 20:18:07 +01:00
00119e5ac2 Code Cleanup: reduce sign conversion 2014-01-22 02:56:52 +11:00
4ae7ae6f2e Code Cleanup: use bool for return values and correct comments
also remove CDDM_Check, theres no need for it.
2014-01-22 02:53:48 +11:00
70ce11d640 Minor cleanup from latest coverity checks - if we have a previous curve, we can safely assume we also have a previous stroke!
Better to assert here, than checking this randomly...
2014-01-21 16:45:31 +01:00
c691551249 Optimize tessellation code (min 20% better, up to 300% with some CD layers to tessellate).
The main idea is to store (during tessellation) or recreate (during tessdata update) a tessfaceverts-to-loops mapping, and then update all tessdata
in one pass, instead of calling `BKE_mesh_loops_to_mface_corners` repeatedly for all tfaces!

Differential Revision: https://developer.blender.org/D226

Reviewed by Campbell, thanks a lot!
2014-01-21 16:32:47 +01:00
8be4c6e8f3 Timing macros: remove the (void)0 at the end of TIMEIT_BLOCK_INIT,
it prevents declaring/using more than one of these timing blocks in a same code block
(C rule, no var declaration and code mixing)...
2014-01-21 15:50:44 +01:00
7acb7cb897 Replace XOR swapping by default ("naive", with extra var) one.
Ref: http://en.wikipedia.org/wiki/XOR_swap_algorithm, modern compilers/CPUs are much more efficient with "naive" algo than XOR one.
Doubled check, for me in an optimized build, XOR is several times slower than naive algo.
2014-01-21 15:50:44 +01:00
386d3a9cfb Fix T38265: transferring vertex weights from an object with modifiers not working.
It was using the modified mesh for the vertex coordinates, and the unmodified mesh
for the vertex weights, which can't work and crashed in some cases, now it used the
modified mesh for both.

Perhaps an option should be added to indicate if you want to transfer from the
unmodified mesh or transfer to the modified mesh, but I think this fix makes it
works as intended when this was implemented.
2014-01-21 15:36:00 +01:00
94325035f4 Fix T38298: crash saving float image with 3 channels from exr to png/jpeg. 2014-01-21 15:29:52 +01:00