Commit Graph

41995 Commits

Author SHA1 Message Date
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
02aec1e758 User Interface: fix for crash pressing Ctrl+Delete
also remove redundant string duplication.
2013-12-02 21:35:42 +11:00
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
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
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
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
6b54752c2e Fix T37667: rotational difference driver target marked invalid even though valid. 2013-12-01 15:05:03 +01:00
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
e3ee0b1d38 Fix for beauty option for triangulate (modifier and tool) 2013-12-01 16:41:03 +11:00
596b6e207e Code Cleanup: make cpack into a function. 2013-12-01 14:30:22 +11:00
ac38f2584f Code Cleanup: replace ABS() with fabsf() when used with float expressions. 2013-12-01 13:11:12 +11:00
dbd7025fae Code Cleanup: softbody macro use (function calls and expressions within macros) 2013-12-01 12:37:05 +11:00
5da703e915 BMesh/Mesh: replace scanfill with polyfill 2013-11-30 22:13:52 +11:00
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
bf55eeb216 Code cleanup: minor changes to custom startup file property use 2013-11-30 18:41:42 +11:00
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
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
eba07b77da Fix T37566: KX_GameObject.resumeDynamics() was not properly restoring collision groups and masks. 2013-11-29 14:32:56 -08:00
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
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
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
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
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
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
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
285e09bceb Fix T37149: Macros store settings from a cancelled operation 2013-11-29 16:01:03 +11:00
fd88ce4d73 Fix T37407: removing cd-layer didn't set the active layer correctly 2013-11-29 15:26:17 +11:00
57b3878efb Code cleanup: avoid using function calls within macros 2013-11-29 15:26:17 +11:00
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
3e49787b01 Python API: give a better error message when creating a Matrix fails 2013-11-29 09:48:42 +11:00
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
47a8b38e53 Fix T37143: Wrong normal dir with individual origins + one vert selected 2013-11-28 19:59:26 +11:00
6dded46a48 error in last commit 2013-11-28 16:14:32 +11:00
75ca7b85b5 Testing: added check for broken links to wiki docs 2013-11-28 16:05:29 +11:00
dc3f9b9c3e View3D: split camera controlling parts of fly mode into their own functions 2013-11-28 15:12:56 +11:00
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
12b4a67e95 missing from last commit 2013-11-27 21:25:15 +11:00
95bf31e4fe Resolve T37240: saving a new file always had absolute paths, now remap. 2013-11-27 21:15:19 +11:00
2123386c70 Fix T37249: Crash calling wm.progress_update() with no active window 2013-11-27 19:20:02 +11:00
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
ccb79030c6 Disable redo for bend operator 2013-11-27 18:59:56 +11:00
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
3d6f3c0457 Fix for recent BMesh regression refactoring out face tessellation 2013-11-27 13:44:19 +11:00
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
4dd949632a Fix for recent error (editmesh triangulate crashed). 2013-11-27 13:00:40 +11:00
3f5b59cd90 Fix T37121: decimate works badly with flat surfaces 2013-11-27 11:26:19 +11:00
406289497f Fix T37636: double added pyattr_get_lights 2013-11-27 08:42:41 +11:00
3b24eaad9a Fix T37583: regression in bmesh triangulate breaking python's use of face_map 2013-11-27 08:11:34 +11:00
8a54336ff7 Fix T36976: drag and drop tooltip not working with retina and drawing off
screen near top of the window.

The code here was not updated for retina / DPI changes yet. The tooltip also
could draw off screen when dragging to a button at the top of the window, now
it places the tooltip lower in such cases.

Offscreen drawing fix is based on patch by Antony Riakiotakis.
2013-11-26 21:36:53 +01:00
c16f751475 Fix T37633: duplicate value GPUDynamicType could cause GLSL render issues. 2013-11-26 20:56:59 +01:00