Commit Graph

47594 Commits

Author SHA1 Message Date
Bastien Montagne
0141265073 Fix T39152: Blender crash when duplicate mesh with hooks and laplacian deform.
We can't simply dupalloc cache_system (LaplacianSystem), it has quite a few allocated data we'd need to dupalloc as well,
not to mention (nl) context... Much safer to just set it to NULL in new copy imho!

This commit is to be backported to 2.70 release!
2014-03-13 12:54:07 +01:00
Campbell Barton
3d031d1f3a BMesh: minor changes for BM_face_split use 2014-03-13 18:41:45 +11:00
Campbell Barton
702f374972 Fix for possible (unlikely) uninitialized var use in BM_face_split 2014-03-13 18:41:44 +11:00
Sergey Sharybin
e6a359a0a9 Fix T39148: Image does not show while rendering
Own regression since partial buffer update refactor,
display buffer for exr tiles should happen in image
update callback.

This revision is to be merged to the final release.
2014-03-13 13:28:57 +06:00
Campbell Barton
c17acf1d6e Code cleanup: quiet warning, 'else' would always crash (& never occurred)
also quiet waning clamping
2014-03-13 12:03:18 +11:00
Campbell Barton
37cf28b341 Freestyle: avoid checking PyErr_Occurred and quiet warning 2014-03-13 11:54:59 +11:00
Campbell Barton
032b42d48d Code cleanup: de-duplicate switch statement, style edits 2014-03-13 06:31:06 +11:00
Antony Riakiotakis
deef641878 Anticipate future color picker types and don't crash (uiBut could be
NULL in some cases)
2014-03-12 21:06:57 +02:00
IRIE Shinsuke
fbf859518a Followup for fix T38318: Add back previous fix and fix a glitch.
The previous fix 162d6c73e3 has been cancelled because it caused a
problem that mesh deform cages and so on mess up the preview. To avoid
the problem, viewport doesn't show mesh object if its draw type is
bounding box or wireframe.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D375
2014-03-13 03:46:44 +09:00
Campbell Barton
d7824e435f Fix possible (unlikely) use of uninitialized pointer in RNA resolving 2014-03-13 04:18:50 +11:00
Antony Riakiotakis
4fa93b1ea4 Code cleanup (tm): Some code deduplication for HSL 2014-03-12 19:12:58 +02:00
Antony Riakiotakis
bce924b43c HSL color wheel implementation.
This is a standard Hue - Saturation - Lightness model
(see for instance entry on wikipedia here: https://en.wikipedia.org/wiki/HSL_and_HSV)
Note though the difference between HSV and HSL saturation, which are not the same.

The advantage of having this color selection scheme is that artists can select
shades and tints of a color easily by using the lightness slider. Also colors
are arranged on (approximated) perceived lightness on the color wheel.

Beware, Old files opened with this preference saved will crash!

Reviewers: sergey, brecht, campbellbarton

Differential Revision: https://developer.blender.org/D385
2014-03-12 18:58:50 +02:00
Campbell Barton
35ed7486c7 Mesh API: rename 'octree' to 'spatial' since internally its using kdtree 2014-03-13 01:49:47 +11:00
Campbell Barton
5bceb00a61 Mesh API: replace octree mirror with kdtree 2014-03-13 01:49:47 +11:00
Campbell Barton
e5e0888a8f UI: allow passing "" for icon only enum buttons and still get an icon
Enum icon-only buttons were getting their strings set,
then truncated with blenders string shortening methods, then not drawn
because there was no room (since buttons are icon width).

Modify UI code so icon-only buttons don't get names and passing "" to a
button won't have its text set later on.
2014-03-12 22:56:10 +11:00
Campbell Barton
a7faad9aa1 Code cleanup: UI - de-duplicate menu/row/listrow enum logic 2014-03-12 22:54:26 +11:00
Lukas Tönne
2cbbaea44e Fix for particle edit mode using wrong pixel distances.
rB57dba739176153e052d77611ff0e554f05984686 unified pixel distance values
but omitted a factor 100 for particle edit.
2014-03-12 11:54:49 +01:00
Sergey Sharybin
7b03eb56bd Fix T39109: Vertices affected by Hook Modifiers change after "switch Direction" on Curves
Remapping hooks and vertex parent wasn't implemented for curves.
2014-03-12 15:46:24 +06:00
Sergey Sharybin
0a3850fde4 Fix T39123: Border select without "extend" does nor clear selection of bezier nodes in 3D view
This is a regression introduced in fbc7ab30f and caused by the wrong object
being passed to the function.

Not sure passing editnurb as an argument is a good thing to do..
2014-03-12 14:07:26 +06:00
Sergey Sharybin
b23a4395c7 Fix T39126: Convert To: Mesh from Curve/Meta/Surface does not respect "Keep Original"
Own regression, didn't consider operator redo would leave scene in a non-evaluated state.
2014-03-12 13:59:45 +06:00
Campbell Barton
4ae6c5cd77 BMesh: minor optimization, step over own loop in BM_face_exists 2014-03-12 18:30:38 +11:00
Campbell Barton
5db086b7ce Transform: minor optimization, use BLI_bitmap for island tagging 2014-03-12 18:30:38 +11:00
Campbell Barton
eaea050920 Transform: internal change, simplify view angle checks 2014-03-12 18:30:38 +11:00
Campbell Barton
921c829bcf Code cleanup: redundant normalize in bmbvh ray cast 2014-03-12 18:30:37 +11:00
Antony Riakiotakis
a82d899c13 fix compile error on MinGW32 2014-03-11 21:46:12 +02:00
Bastien Montagne
330272be9a Fix T39060: "Choose by numbers" do not work with Enum-menus, but work with operators-menus
The "layer" exception in handling numbers for menus was a bit too much greedy, eating numbers for all RNA props instead of just for layers ones...
2014-03-11 21:07:57 +01:00
Campbell Barton
c2045ef794 Fix T39033: Regression, duplicating proxy loses proxy
fix for bug making duplicates real effected copying scenes and linked duplis.
2014-03-12 05:56:15 +11:00
Bastien Montagne
997b49a5f3 Fix for own rB6919ffbf4b2f (we only consider unit scale when we do use a unit system!).
Noted by Campbell, thanks!
2014-03-11 16:58:09 +01:00
Bastien Montagne
6919ffbf4b Fix T39112: increment snap does not work in perspective view at 0.01 scale (for scene and grid floor)
In case of "floor" grid (i.e. perspective views), unit_scale correction was not applied...
2014-03-11 16:38:08 +01:00
Bastien Montagne
a2ffd8e423 Fix T39028: Quadview views inaccessible with python except bottom right view.
Expose all four quadviews in a collection in RNA API.

Note the region returned by old region_quadview property is now region_quadviews[2].
2014-03-11 15:22:09 +01:00
Lukas Tönne
a6bdad699c Fix T39080: copy-to-selected operator fails for pointer properties.
The copy-to-selected operator for RNA buttons uses paths for copying
object pointer properties. Copying other ID data blocks is deliberately
disabled:
https://developer.blender.org/diffusion/B/browse/master/source/blender/editors/interface/interface_ops.c$274

However, the RNA_path_resolve_full function is not properly working for
retrieving pointer properties: it always will dereference pointer
properties in anticipation of further path elements.

In fact the return value of RNA_path_resolve_full has a conflicting
double meaning. It returns `false` when
* the RNA path is invalid
* any of the pointer properties is NULL

This means that it is not capable of returning pointer properties at all.
To make this possible, there is now an internal function for path
parsing, which returns false //only// if the the path is invalid.
On top of this there are 4 wrapper functions for retrieving either
actual property values (RNA_path_resolve, RNA_path_resolve_full) and for
retrieving pointer+property pairs (RNA_path_resolve_property,
RNA_path_resolve_property_full). The latter 2 variants will **not**
dereference pointer properties at the end of the path, so callers can
actually get the property itself. The `***_full` variants include an
array index return value.

Differential Revision: https://developer.blender.org/D396
2014-03-11 14:58:53 +01:00
Sergey Sharybin
89c793f70f Fix T39029: Blender Internal: Render tiles do not appear until render is finished if Save Buffers enabled 2014-03-11 19:56:03 +06:00
Lukas Tönne
658b4c0d56 New Corner Pin node: uses explicit corner values for a plane warp transformation.
This was suggested by Christopher Barrett (terrachild). Corner pin is a common feature in compositing.

The corners for the plane warping can be defined by using vector node inputs to allow using perspective plane transformations without having to go via the MovieClip editor tracking data.
Uses the same math as the PlaneTrack node, but without the link to MovieClip and Object.

{F78199}

The code for PlaneTrack operations has been restructured a bit to share it with the CornerPin node.

* PlaneDistortCommonOperation.h/.cpp: Shared generic code for warping images based on 4 plane corners and a perspective matrix generated from these. Contains operation base classes for both the WarpImage and Mask operations.

* PlaneTrackOperation.h/.cpp: Current plane track node operations, based on the common code above. These add pointers to MovieClip and Object which define the track data from wich to read the corners.

* PlaneCornerPinOperation.h/.cpp: New corner pin variant, using explicit input sockets for the plane corners.

One downside of the current compositor design is that there is no concept of invariables (constants) that don't vary over the image space. This has already been an issue for Blur nodes (size input is usually constant except when "variable size" is enabled) and a few others. For the corner pin node it is necessary that the corner input sockets are also invariant. They have to be evaluated for each tile now, otherwise the data is not available. This in turn makes it necessary to make the operation "complex" and request full input buffers, which adds unnecessary overhead.
2014-03-11 14:12:08 +01:00
Campbell Barton
500088d9e3 Fix T39078: crash increasing hair emission number 2014-03-11 23:04:59 +11:00
Campbell Barton
ced595a37d Fix T39087: Weight Paint, custom color ranges don't update in viewport 2014-03-11 21:19:59 +11:00
Sergey Sharybin
df5cbfb625 Fix T39070: Custom bone shapes appear only one sided
The idea is simple -- only enable culling for bones if they're not using
custom shape or if culling is enabled in shading panel.
2014-03-11 13:14:29 +06:00
Sergey Sharybin
12c56d8c1f Fix T39101: Can not select object on backface by clicking when Matcap is on 2014-03-11 12:56:08 +06:00
Campbell Barton
41dde55325 Fix T39081: Crash duplicating objects 2014-03-11 17:46:11 +11:00
Campbell Barton
4cfd14644b 3D Text: textbox selection while in editmode
D395 from Henrik Aarnio with some improvements.
2014-03-11 17:16:08 +11:00
Campbell Barton
57dba73917 View3d: take pixelsize into account for selection distance 2014-03-11 15:34:19 +11:00
Campbell Barton
23fbc9f22f Fix T39083: speakers were evaluated multiple times when used in sets
also skip checking all objects for speakers when no speakers are in the
blend file.
2014-03-11 14:46:55 +11:00
Antony Riakiotakis
2de9da6ee9 Fix T39034 brush always shown even after deactivating the show cursor
option after reentering a paint mode.

Solution by Bastien with modifications, thanks!
Show Brush flag need not be reenabled always, but make sure it is at
least enabled once on paint initialization.
2014-03-10 18:42:35 +02:00
Lukas Tönne
658f37acd7 Minor cleanup: use rna_ prefix for path_resolve_* functions for
consistency.
2014-03-10 12:46:01 +01:00
Lukas Tönne
fe094eaf20 Cleanup for RNA_path_resolve_full.
* Moved collection key parsing and array index parsing into their own
functions, to make the main path loop easier to follow.
* Unified boolean return values.
2014-03-10 12:26:50 +01:00
Sergey Sharybin
4d47e75223 Fix for proxy colorspace and prefetching 2014-03-10 16:46:05 +06:00
Lukas Tönne
19935f0fc3 Fix for potential bug in copy-to-selected ui button operator: Return
value was mixing operator result with an int/boolean.
2014-03-10 09:51:59 +01:00
Tamito Kajiyama
6fdbab4366 Minor code cleanup. 2014-03-09 22:25:37 +09:00
Joshua Leung
d219312d44 Fix T39018: Duplicate entries for material/shader in AnimEditors
In many BI shader setups, the material which owns the nodetree is often itself
included as a node in that nodetree (i.e. to provide the base colour for that
mesh). This would often result in the material (and its subtree) getting included
in the dopesheet results twice.
2014-03-09 19:23:32 +13:00
Campbell Barton
fa24ad1fd5 Graph Editor: add lasso select for fcurves 2014-03-09 16:20:04 +11:00
Campbell Barton
6a4567b9ab BLI Rect: utility function to transform a point using 2 rect's 2014-03-09 15:48:09 +11:00