Commit Graph

53000 Commits

Author SHA1 Message Date
Campbell Barton
a24f83855a Fix for crash pasting text into uilist filter 2013-12-03 01:48:32 +11:00
Scott Petrovic
d8764ab39d 3D View: use proper units for viewport lens length, matching the camera property.
Reviewed By: brecht

Differential Revision: http://developer.blender.org/D63
2013-12-02 15:32:28 +01:00
Howard Trickey
da91575206 Bevel: add width consistency pass.
When the desired widths (offsets) of beveled edges cannot be
satisfied, often because we want them to meet on an intermediate
non-beveled edge, we need to compromise on the widths somehow.
This code changes the compromise to minimize the sum of squares
of errors in the offsets.  It also adds a global width consistency
pass: starting from a vertex that needed width adjustment, it
uses a breadth-first search to try to propagate the adjustments
and keep the bevel widths from having to taper along the edges.

Also fixed a case where a reflex angle would cause bad results.
Also fixed the way the 'percentage' width method was calculated.
2013-12-02 07:24:22 -05:00
Sergey Sharybin
4ac17b3f0c Fix T37671: Edit Texture Space on Skin Resize crash
Texture space editing from TFM_SKIN_RESIZE is not supported,
so hide the option and don't use it for such a transform.
2013-12-02 18:05:49 +06:00
Campbell Barton
8cc229da93 Correct previous commit with BLF & buildinfo 2013-12-02 22:20:27 +11:00
Sergey Sharybin
9df2499531 Fix T37656: Huge amount of RAM used during start when rendering large images
Issue was caused by linear float buffer creating for every working
thread. This buffer actually duplicated original buffer which doubles
amount of required memory.

We can not avoid such a duplication, because OCIO needs to work on a
float buffer and it modifies this buffer.

Alternative for now is to not allocate linear buffer for the whole chunk
which needs to be handled by the thread and use further chunk cutting in
thread itself.

So now every thread will handle the chunk in blocks of 64 scanlines.
This reduces memory overhead significantly without speed loss in own
tests.

Ideally, IMB_processor_apply_threaded need to be switched to generic
task scheduler and made it so this function generates tasks with
reasonable number of scanlines. This requires much more testing to
be sure there're no conflicts with object update and so.

Such a change to IMB_processor_apply_threaded would not be noticed by
users, so do not consider this is a crucial to do right now.
2013-12-02 17:14:41 +06:00
Campbell Barton
02aec1e758 User Interface: fix for crash pressing Ctrl+Delete
also remove redundant string duplication.
2013-12-02 21:35:42 +11:00
Campbell Barton
1815225faa Blender Font (BLF): add length argument to string width/height functions
This also fixes a crash editing buttons longer then UI_MAX_DRAW_STR
2013-12-02 21:10:07 +11:00
Campbell Barton
f64ae4cbe5 MemArena: use size_t instead of int for alloc args and internal storage.
also add BLI_memarena_calloc to be used when calloc isnt enabled for the arena.
2013-12-02 17:51:27 +11:00
Campbell Barton
4436620150 Polyfill: fast-path for convex ngons (and mostly convex ngons).
avoid intersection checks where there are no concave coords.
2013-12-02 15:56:14 +11:00
Campbell Barton
c33fb00c28 Fix for triangulate and beauty-fill
- could crash if triangulate attempted to create an existing face.

- tagging edges to rotate was unreliable, don't do this anymore.
  now check if edge is in the array passed to the beauty function.
2013-12-02 11:49:18 +11:00
Brecht Van Lommel
6b54752c2e Fix T37667: rotational difference driver target marked invalid even though valid. 2013-12-01 15:05:03 +01:00
Bastien Montagne
69e9927b6c Cleanup: remove deprecated old Lamp.shadspotsize from code.
Was not used anymore, except in Collada import/export, but without any conversion code.
Suggested by Brecht in comments of D59.
2013-12-01 11:25:11 +01:00
Campbell Barton
e3ee0b1d38 Fix for beauty option for triangulate (modifier and tool) 2013-12-01 16:41:03 +11:00
Campbell Barton
596b6e207e Code Cleanup: make cpack into a function. 2013-12-01 14:30:22 +11:00
Campbell Barton
ac38f2584f Code Cleanup: replace ABS() with fabsf() when used with float expressions. 2013-12-01 13:11:12 +11:00
Campbell Barton
dbd7025fae Code Cleanup: softbody macro use (function calls and expressions within macros) 2013-12-01 12:37:05 +11:00
Campbell Barton
5da703e915 BMesh/Mesh: replace scanfill with polyfill 2013-11-30 22:13:52 +11:00
Campbell Barton
b9445106b2 Geometry API: polyfill2d, ear clipping polygon filling functions.
Simple/predictable polygon filling functions (no hole support)
originally from libgdx which have some advantages over scanfill.

- always creates the same number of triangles (never any missing faces).
- gives same results for any affine transformation.
- doesn't give so many skinny faces by default.

made some changes for Blender.
- remove last ears first (less to memmove)
- step over the ears while clipping to avoid some verts becoming fans to most of the other.
2013-11-30 22:00:01 +11:00
Campbell Barton
bf55eeb216 Code cleanup: minor changes to custom startup file property use 2013-11-30 18:41:42 +11:00
Campbell Barton
5910531318 Math Library: add functions cross_poly_v2, cross_tri_v2
also added utility macro for removing elements in the middle of an array
2013-11-30 15:57:16 +11:00
Mitchell Stokes
8aff45d8f6 Fix T36804: the property sensor when set to interval was causing a memory leak
The property sensor was using CValue::FindIdentifier(), which does an AddRef(). However,
the property sensor was not calling Release() when it was done with the value. This could
cause more leaks when used in conjunction with the copy property actuator since it would
really throw off ref counts.
2013-11-29 18:34:06 -08:00
Mitchell Stokes
eba07b77da Fix T37566: KX_GameObject.resumeDynamics() was not properly restoring collision groups and masks. 2013-11-29 14:32:56 -08:00
gaiaclary
72272d2e4f D54: Added a filepath attribute to the read_homefile operator.
This attribute allows to open a blend file as an alternative
start-up file. The attribute is only available from python.
This is an example call:

    bpy.ops.wm.read_homefile(filepath='path/to/a/file.blend')

This patch also changes readfile.c to ensure that unintentionally
stored cursor states are not imported from the loaded file.
2013-11-29 23:13:55 +01:00
Alexandr Kuznetsov
e2429d6492 Woo Hoo. First git commit.
Changes for VC2013

Now, I can build Blender with VC2013 with Cycles, Collada, OpenExr,OpenImageIO disabled. Also, you need VC2008 sp1 installed to make old libs compatible.
2013-11-29 15:13:12 -05:00
Antony Riakiotakis
cd4fd50562 Remove some extraneous glEnableClientState/glDisableClientState. This
part of the code is not interleaved with immediate mode drawing so they
are not necessary.
2013-11-29 21:38:01 +02:00
Sergey Sharybin
fb3f240201 Image wrapping for plane track in clip editor
Summary:
Now it's possible to assign an image to plane tracks
in clip editor. This image is only used for display
in clip editor and this image is being warped into
the plane track rectangle.

Main purpose of this is to get early feedback about
how good image warping matches the footage, before
clip goes to the compositor.

Pretty much straightforward change: just compute
homography from undeformed normalized frame corner
coordinates (unity square) to plane marker corners
and apply this matrix to opengl stack.

Still could improve behavior when perspective
plane transform is degenerate, but that's not so
much critical for now i'd say.

Reviewers: brecht, campbellbarton

Reviewed By: brecht

CC: sebastian_k

Differential Revision: http://developer.blender.org/D57
2013-11-29 23:26:57 +06:00
Sergey Sharybin
0d24c6f0d0 Move 2.6x versioning code to own file
Summary:
Makes readfile.c more clear and easier to navigate in.
We would need to do such a move when we'll do 2.70 bump
anyway. So better be prepared.

In fact, as soon 2.70 bumo is done i would think we'd
better create versioning_270 file and do version code
there. Otherwise readfile.c will grow up dramatically
again.

Reviewers: brecht, campbellbarton

Reviewed By: brecht

Differential Revision: http://developer.blender.org/D60
2013-11-29 23:16:13 +06:00
Brecht Van Lommel
cedc90b607 Fix errors and inconsistencies in confirmation popup removal.
* Improve some clip editor messages
* Remove popup for metastrips, seems unnecessary
* Renamed some variables for consistency
* Avoid unnecessary call to CTX_DATA_COUNT

Reviewed By: sergey, campbellbarton, aligorith

Differential Revision: http://developer.blender.org/D44
2013-11-29 17:49:01 +01:00
Brecht Van Lommel
77719bfd06 File Browser: autocomplete keeps focus in the file field when entering a folder.
There is a bunch of internal refactoring going on too:
* No longer use operators to handle these directory and file fields, only makes
  things more complicated than they should be.
* Handle autocomplete partial/full match deeper in the UI code
* Directory field still does not keep focus, that's for another time to fix,
  you can already do pretty quick keyboard only navigation with the file field.

Reviewed By: elubie

Differential Revision: http://developer.blender.org/D29
2013-11-29 17:49:01 +01:00
Campbell Barton
285e09bceb Fix T37149: Macros store settings from a cancelled operation 2013-11-29 16:01:03 +11:00
Campbell Barton
fd88ce4d73 Fix T37407: removing cd-layer didn't set the active layer correctly 2013-11-29 15:26:17 +11:00
Campbell Barton
57b3878efb Code cleanup: avoid using function calls within macros 2013-11-29 15:26:17 +11:00
Campbell Barton
aa3933b411 Fix own regression - adding a grid had rotated face.
some scripts depended on uv's default values
2013-11-29 10:15:26 +11:00
Campbell Barton
3e49787b01 Python API: give a better error message when creating a Matrix fails 2013-11-29 09:48:42 +11:00
Campbell Barton
918ad1719f Transform: improve normal orientation
- when 3 verts are selected ensure the normal is flipped on the side of existing vert normals.
  also use the most distant 2 verts to define the tangent.

- when 2 vertices are selected, the normal wasn't aligned with the vert normal.
2013-11-28 20:40:14 +11:00
Campbell Barton
47a8b38e53 Fix T37143: Wrong normal dir with individual origins + one vert selected 2013-11-28 19:59:26 +11:00
Campbell Barton
6dded46a48 error in last commit 2013-11-28 16:14:32 +11:00
Campbell Barton
75ca7b85b5 Testing: added check for broken links to wiki docs 2013-11-28 16:05:29 +11:00
Campbell Barton
dc3f9b9c3e View3D: split camera controlling parts of fly mode into their own functions 2013-11-28 15:12:56 +11:00
Brecht Van Lommel
29790d4fca Fix T37414: local view not taken into account for blender internal F12 render over 3D view. 2013-11-27 20:22:13 +01:00
Campbell Barton
12b4a67e95 missing from last commit 2013-11-27 21:25:15 +11:00
Campbell Barton
95bf31e4fe Resolve T37240: saving a new file always had absolute paths, now remap. 2013-11-27 21:15:19 +11:00
Campbell Barton
2123386c70 Fix T37249: Crash calling wm.progress_update() with no active window 2013-11-27 19:20:02 +11:00
Campbell Barton
caf6bf80f7 Fix T37203: New face from an edge failed if only one vert was connected to a wire edge 2013-11-27 18:59:56 +11:00
Campbell Barton
ccb79030c6 Disable redo for bend operator 2013-11-27 18:59:56 +11:00
Brecht Van Lommel
ac088192d4 Fix T37383: wrong spacing on Add menu in 3D view header.
This also was in the info header but less obvious, mistake in the layout engine.
2013-11-27 05:25:17 +01:00
Campbell Barton
3d6f3c0457 Fix for recent BMesh regression refactoring out face tessellation 2013-11-27 13:44:19 +11:00
Campbell Barton
45eed8246a BMesh Operators: BMO_op_finish now overwrites values in debug mode
This should prevent accidental use-after-free.
2013-11-27 13:42:24 +11:00
Campbell Barton
4dd949632a Fix for recent error (editmesh triangulate crashed). 2013-11-27 13:00:40 +11:00