Commit Graph

42635 Commits

Author SHA1 Message Date
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
8bcd8cb0bf Revert "Fix T38303: Inconsistent sorting of names in Append/Link view"
This reverts commit ba49d7e0e3.
2014-01-22 01:29:29 +11:00
ba49d7e0e3 Fix T38303: Inconsistent sorting of names in Append/Link view 2014-01-22 01:27:49 +11:00
3e1f78a611 Fix T38302: sequencer animation data lost in original scene when copying scene. 2014-01-21 15:17:35 +01:00
45b9822259 Fix T38300: Bevel didn't always reconstruct faces properly.
With new subdivision method for making the vertex mesh, we always
subdivide the edges between the new vertices around a vertex
(we used to not subdivide edges between two non-beveled edges).
This fixes a bug related to this change.
2014-01-21 09:02:27 -05:00
dcba34b411 Fix T38303: same names with different case sorted unpredictable in the file browser.
The string comparison was in lower case, so the same strings with different case
were considered the same which can make qsort give different results on each
sort since it's not a stable sort. Now take case into account in comparison.
2014-01-21 14:59:12 +01:00
19da32abf3 Fix T38128: snapping to node border uses node centers.
This was caused by recent change to transform locations being changed
to the upper-left corner of nodes (rBa857a6f).
2014-01-21 13:13:41 +01:00
8742f65513 Fix for dupli's using float for id's and signed/unsigned conversion
Enable strict flags exposed some strange issues.
2014-01-21 22:48:27 +11:00
6940bf0c96 Code cleanup and structural improvements for dupli generation.
This is a first step toward improving our dupli system. It implements a more
generic way of treating the various methods of dupli generation by adding a few
structs:
  * DupliContext holds a number of arguments commonly used in the recursive dupli functions and defines a recursion state for generating sub-duplis (nested groups). It also helps to prevent bloated argument lists.
  * DupliGenerator is a type struct that unifies the different dupli creation methods (groups, frames, verts, text chars, faces, particles). (As with context there should be no overhead from pointer indirection because everything can still be inlined inside anim.c)

Beside making the code more easily understandable this implementation should
also help to avoid weird side effects from custom matrix hacks by defining
clearly what a generator does. The DupliContext is deliberately made const, so a
generator can not simply add hidden matrix or flag modifications that are hard
to track down.

The result container for the generated duplis is stored in the context instead
of being passed explicitly. This means the generators are oblivious to the
storage of duplis, all they need to do is call the make_dupli function. This
will allow us to implement more efficient ways of storing DupliObject instances,
such as MemPools or batches. These can be implemented alongside the current
ListBase so we can improve dupli bottlenecks without having to replace each and
every dupli use case at once.

Differential Revision: https://developer.blender.org/D189
2014-01-21 12:11:34 +01:00
0c9d897043 Fix for Freestyle stroke rendering performed for each SSS material. 2014-01-21 19:55:33 +09:00
2a76656976 Fix T38295: Crash when changing screen with different visible layers
The issue was caused by missing object update for the curve object
before going to new screen. And that new screen had different visible
layers due to disabled lock_camera_and_layers option.

Solved by calling DAG_on_visible_update() in ED_screen_set() even
in cases scene doesn't change. This ensures all the objects which
weren't visible before are correctly updated.
2014-01-21 15:01:32 +06:00
e27dcc3423 Cleanup: no need to use constraint space transform API here, we can directly call
BKE_armature_mat_pose_to_bone (and avoids the need to get an Object pointer!).
Note the former just calls the later internally, in this case.
2014-01-21 09:18:48 +01:00
be87a65f49 Fix T38251: "Apply Visual Transform to Pose" Offsets bone unpredictably
Code here was using pchan->chan_mat, which for some reason does not work,
we rather have to use pchan->pose_mat, and convert it again from
pose space to bone space, as done by visual keyframing.
2014-01-21 09:18:48 +01:00
85a3d51078 Fix for own refcount error in recent commit 2014-01-21 14:23:39 +11:00
a0f25f2301 Fix own mistake with zealous check for face splitting
Was disallowing adjacent loops to be split which is correct for a single
split across a face, but not fore BM_face_split_n
2014-01-21 12:27:38 +11:00
37242e6b0b Code Cleanup: style 2014-01-21 12:05:27 +11:00
7c6f60572b Fix T38264: undo/redo broken with text overwrite mode in text editor (insert key). 2014-01-20 22:13:42 +01:00
e9efde2a05 Fix T38297: missing StringProperty subtype 'PASSWORD' in API docs. 2014-01-20 22:01:11 +01:00
82a7a3d3ed Fix T37976: blender internal transparent shadows from volumes not working correct. 2014-01-20 21:56:42 +01:00
fc3be511f0 Fix T37978: cycles nodes with multiple Material Output nodes not predictable.
Now it uses the last activated node like compositing does. This should have no
effect on existing files until you activate another output node there.
2014-01-20 20:31:10 +01:00
04f81c8225 Fix T37481: Image Sequence can't be loaded
Allow loading of image sequences in addition to single images in the open image operator

I solved it by adding the possibility to load an image sequence in the Load Image Operator.
The image user is passed in the operator customdata now as well, best solution for now, but general handling of image user still a bit weak. The offset and length of the image sequence is now calculated in the image open operator by storing all found frames in a list and sorting this list.

Reviewed By: campbellbarton, brecht, lukastoenne

Differential Revision: https://developer.blender.org/D209
2014-01-20 19:13:21 +01:00
4c6a72a7d8 Fix T38283: UV unwrap giving wrong results with particular meshes.
LSCM auto pinning where it picks two vertices on opposite sides of the outer
UV island boundary would in some cases give the same 3D coordinate, which
causes UV unwrap to give poor results.
2014-01-20 18:49:09 +01:00
8506e3a78c Fix T38294: enabling hair dynamics very slow / hangs with many hairs.
This function call was accidentally placed inside a loop which gave O(n^2)
behavior, but there's no reason for it.
2014-01-20 17:20:58 +01:00
a2930c634f Code cleanup: remove quicktime image loading code (not animation loading).
This code has been broken for a few years and no one noticed, it's also less
useful now that we support PSD image loading ourselves which was the original
motivation to have this.
2014-01-20 16:55:00 +01:00
a502959e4b Bevel: fixed problems with vertex bevel and some 'weld' cases.
Vertex bevel was completely messed up after last change,
and this fixes.
'Weld' bevels, where there are exactly two beveled edges
meeting at a vertex, now look better in cases where one
of the beveled edges is on a flat plane.
2014-01-20 08:55:07 -05:00
f074b67108 Fix T38267: dynamic paint Use Object Material not working correct in some cases. 2014-01-20 14:50:10 +01:00
c8d0d9b383 Code Cleanup: tabs/spaces, no need to call CTX_data_edit_object twice 2014-01-21 00:33:00 +11:00
fbf821c50b Fix T37967: autosave does not save dynamic topology edits while in sculpt mode. 2014-01-20 14:26:48 +01:00
018fe81779 Fix T38269: scene full copy in mesh edit or sculpt mode did not copy mesh edits. 2014-01-20 14:16:22 +01:00
aa18c4c445 Clear object recalc flag on load
It is possible that object in .blend file will have non-zero
recalc flags. Clear them on load in order to prevent possible
unneeded recalc after the load.

Differential Revision: https://developer.blender.org/D224
2014-01-20 18:39:30 +06:00
59762ff0f7 Fix T38291: depgraph tagging was wrong for
OBJECT_OT_constraint_add_with_targets. This now works exactly the same
way as when setting the target via RNA/constraint buttons.
2014-01-20 13:28:26 +01:00
f70921d90c Fix T38221: node fcurves in compositor get deleted when muting a node.
This is because of the animdata cleanup in rBd2e55cb. This works ok in
general, but causes issues with the localized node trees used for compo/
shader/texture previews. These localized trees share the same default
action as their original trees, and then remove fcurves when removing
muted nodes (which should affect the localized tree only).

node_free_node_ex now has an argument for disabling animdata cleanup,
which is also not necessary when freeing the whole node tree (because
animdata is freed in advance anyway). In addition to that it also checks
the NTREE_IS_LOCALIZED flag to prevent freeing of fcurves in the action.
2014-01-20 12:52:30 +01:00
1b3fdc4309 Followup for 1728c1e: we don't need to replace flags at all
Replacing the flags isn't thread safe and could lead to bi troubles.
Such things are to be handled by the dependency graph.
2014-01-20 16:10:34 +06:00
2e01f38885 Python API: fix for help() failing on bpy instances
Caused by missing __name__ from bpy.types (alternate method to patch D232)
2014-01-20 18:13:15 +11:00
a696a0ff1e Python API: create args for meta-classes directly (a little faster).
Also add some new interned strings.
2014-01-20 18:09:00 +11:00
ece504aff8 Fix for incorrect use of DNA_struct_find_nr
Patch T38290 by ldo (Lawrence D'Oliveiro)
2014-01-20 14:13:59 +11:00
7436a3f4ce Correction for recent commit clearing font cache
- move cache reset into view2d and comment about the rationale for resetting cache there.
- missed other places where view2d zoom level can change (smoothview, borderzoom, home and file reload)
- comment about DPI wasn't correct.
2014-01-20 12:45:38 +11:00
60c53a5bde Fix for saving startup file ignoring editmode/sculpt edits 2014-01-20 12:14:09 +11:00
44855f9ef2 Code Cleanup: remove redundant NULL checks and add function attributes 2014-01-20 11:13:53 +11:00
1728c1e284 Fix for flag not being restored in BKE_vfont_to_curve_ex 2014-01-20 10:44:11 +11:00
d358f1f9e7 Fix last part of T38244: memory leak when scaling any panel
Issue is not noticeable with default font, but i18n one can use more than 500Mo of ram when cached in undreds of different sizes.

Campbell had already done most of the work in rBa780e7f3f09f and rB6b283f116829, just had to call BLF_cache_clear() in _exit funcs of VIEW2D_zoom & co operators.
2014-01-19 15:02:53 +01:00
621bf47e91 Docs: doxygen file descriptions for BLF, GPU and WM 2014-01-19 23:15:25 +11:00
Simon Repp
6cd132b29c Increase maximum allowed amount of points for Splines in both U and V directions
Increase the maximum allowed amount of points in a spline from currently 32,767 (short) to 2,147,483,647 (int).
Change variables that get assigned the value from pntsu/pntsv to int type all over the codebase.
Change function parameters that previously passed the count as short to int type as well.

(because https://developer.blender.org/T38191)

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D212
2014-01-19 00:22:04 +06:00
f6624b84cf Send sequencer render context as const pointer rather than as value
No functional changes just creepy to send rather huge structure by value.
2014-01-19 00:18:36 +06:00
7142b97085 Make it possible to hide/unhide a node during node transform operations.
During drag the H key can be used to toggle the hide flag of the selected nodes.
This makes it easier to 'attach' nodes to available links in narrow places.
2014-01-18 18:20:21 +01:00
a025ff407e Math: Code cleanup
Remove stray #undef directives.
2014-01-17 20:44:34 +01:00
09ce3c18ee Blender Internal: Tweak GLSL preview of the spot lamp to use shadow buffer also for ray shadows, to solve inconsistency with the sun lamp. 2014-01-18 02:23:44 +09:00