Commit Graph

42181 Commits

Author SHA1 Message Date
6e77dfeb1a Color management: get rid of original byte buffer partial update
It was only used by opengl render and in fact it needed just to
set DISPLAY_BUFFER_INVALID flag for the image buffer.

In theory it wouldn't make any change to opengl render speed
(because this change just moved rect_from_float from color
management code to image save code). And could not see any speed
changes on my laptop.
2013-12-18 15:25:46 +06:00
6f4515b614 Fix for button selection offset
Was using a different font size with selection and drawing,
But scaling both so they mostly matched.

This made selection shift noticeably when done on an interface zoomed in/out.
2013-12-18 19:33:05 +11:00
d51dd92950 BLF: debug function to print a fonts state 2013-12-18 19:33:05 +11:00
0e694b9b7e Code Clenaup: use const for button checking functions 2013-12-18 19:33:05 +11:00
69a1234c6d Fix artifact in partial buffer update after recent changes
The issue wasn't new in fact, just partial buffer update
function was still broken. Not sure how those issues were
not noticed for so long.

Perhaps partial_buffer_update_rect() could be simplified,
but i've got some more upcoming changes here which might
run into conflicts if i'll do simplification now.
2013-12-18 14:05:06 +06:00
d963bdf7d9 UI: more fixes for text clipping
Were still cases where numbers could be clipped incorrectly and icon
size was accounted for twice when left clipping (error in own recent commit).
2013-12-18 17:13:58 +11:00
d9e42cf43e Style Cleanup: minor edits in recent changes 2013-12-18 15:35:31 +11:00
509f169011 Style Cleanup 2013-12-18 15:34:56 +11:00
e9e08a1d12 Game Engine: Level of detail support and tools
Levels of detail can be added and modified in the object panel. The object
panel also contains new tools for generating levels of detail, setting up
levels of detail based on object names (useful for importing), and
clearing an object's level of detail settings. This is meant as a game
engine feature, though the level of details settings can be previewed in
the viewport.

Reviewed By: moguri, nexyon, brecht

Differential Revision: http://developer.blender.org/D109
2013-12-17 17:03:27 -08:00
173f7a3d30 Fix compile on MSVC, we don't use "isfinite" anywhere else inside source/blender ;) 2013-12-17 21:36:45 +01:00
d41b2bb25f Fix issue with right aligned number buttons overlapping the label
This also simplifies button clipping which was attempting to detect
offsets that were applied afterwards,
Now apply text clipping after adjusting the button rect margins.
2013-12-18 07:18:28 +11:00
a80278a191 Code Cleanup: comment unused functions 2013-12-18 05:07:49 +11:00
f034e69f0c UI: Theme Colors for Info space 2013-12-18 05:03:30 +11:00
c5d7ea091f Changes to partial update during rendering
Summary:
Mainly addressed to solve old TODO with color managed fallback
to CPU mode when displaying render result during rendering.

That fallback was caused by the fact that partial image update
was always acquiring image buffer for composite output and was
only modifying display buffer directly.

This was a big issue for Cycles rendering which renders layers
one by one and wanted to display progress of each individual
layer. This lead to situations when display buffer was based on
what Cycles passes via RenderResult and didn't take layer/pass
from image editor header into account.

Now made it so image buffer which partial update is operating
with always corresponds to what is set in image editor header.

To make Cycles displaying progress of all the layers one by one
made it so image_rect_update switches image editor user to
newly rendering render layer. It happens only once when render
engine starts rendering next render layer, so should not be
annoying for navigation during rendering.

Additional change to render engines was done to make it so
they're able to merge composite output to final result
without marking tile as done. This is done via do_merge_result
argument to end_result() callback. This argument is optional
so should not break script compatibility.

Additional changes:

- Partial display update for Blender Internal now happens from
  the same thread as tile rendering. This makes it so display
  conversion (which could be pretty heavy actually) is done in
  separate threads. Also gives better UI feedback when rendering
  easy scene with small tiles.

- Avoid freeing/allocating byte buffer for render result
  if it's owned by the image buffer. Only mark it as invalid
  for color management.

  Saves loads of buffer re-allocations in cases when having
  several image editors opened with render result. This change
  in conjunction with the rest of the patch gave around
  50%-100% speedup of render time when displaying non-combined
  pass during rendering on my laptop.

- Partial display buffer update was wrong for buffers with number
  of channels different from 4.

- Remove unused window from RenderJob.

- Made image_buffer_rect_update static since it's only used
  in single file.

Reviewers: brecht

Reviewed By: brecht

CC: dingto

Differential Revision: http://developer.blender.org/D98
2013-12-17 23:42:38 +06:00
04eb24a337 Fix T37718: Texture compression missing
Make sure image will saved as (not over) after changing
it's type to Generated by clearing image's path in signal
handler.
2013-12-17 22:16:53 +06:00
8e59beb815 Code Cleanup: comment unused define 2013-12-18 00:20:18 +11:00
6e88e3eda4 Fix compile after last commit, casting to (bArmature *), kudos to JesterKing 2013-12-17 14:14:03 +01:00
f5076d54cb 'Transform' Python Function for armature, curve and lattice.
patch by Paolo Acampora with some edits.
2013-12-17 23:04:36 +11:00
db795b66fa Fix bplayer broken in own rB51f5c994e9f0. 2013-12-17 10:47:32 +01:00
51f5c994e9 Fix T37103: Keyframing custom properties issue (FCurve would not reflect Custom props type changes).
Add an helper func to re-compute integer-only fcurve flags, and call it when editing custom props.

Reviewed by aligorith, thanks!

Summary: Proposal fix for "keyframing custom properties issue" (T37103).

Reviewers: aligorith

Maniphest Tasks: T37103

Differential Revision: http://developer.blender.org/D111
2013-12-17 09:51:27 +01:00
e68144aed7 Fix for crash in toolbar tabs with only one tab defined 2013-12-17 19:16:44 +11:00
5036ac6903 Partial fix for T37604: Deadlock when stopping rendered viewport (Blender Internal)
- Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS macros cannot be used here, because the Py_BEGIN_ALLOW_THREADS causes a crash when quitting Blender.
- The low level function PyEval_ReleaseLock() is used assuming the Python library was built with multi-threads support.
2013-12-17 18:44:56 +11:00
f1a989f9c3 Fix crash in freestyle vector parsing (hard to believe nobody noticed)
Vectors were being assigned as an array of classes in Vec2f_ptr_from_PyObject and similar functions,
rather then assigning a number to each axis.
2013-12-17 18:01:15 +11:00
61fb34a622 Fix for obscure freestyle crash when attempting to negate INT_MIN
This gives undefined behavior - in my case stays the same value and crashes.

Check for finite input resolves the issue.
2013-12-17 18:00:22 +11:00
b3ea4ec90c Py API: use direct access to list/tuple size when type is known 2013-12-17 16:40:06 +11:00
cda89813df Fix for possible NULL pointer use in brush image sampling 2013-12-17 13:19:54 +11:00
305fc82541 UI: don't attempt to draw with the menu-key when only drawing right aligned 2013-12-17 13:11:31 +11:00
b78b3f2ac8 Fix for out-of-bounds memcpy() when adding a material 2013-12-17 05:47:22 +11:00
9a623daf9c UserDefaults: disable orbit around object center and region-overlap
both have bad side-effects with strange behavior and viewport performance
2013-12-17 04:04:35 +11:00
a621d1e488 UI: Tabs categories for panels (D75)
- works by defining panel categories, currently restricted to the toolbar.
- no panels define bl_categories yet, so no user visible changes since tabs only show when there are multiple.
- panel pinning is available in rmb menu or alt+lmb.
2013-12-17 03:55:45 +11:00
2231b565f0 Better fix for previous commit
Cache iterator might return unused keys as well.
Now unused keys are being removed before cleanup
and iteration.
2013-12-16 22:05:27 +06:00
28d873f038 Fix possible crash when cleaning cache with some ibufs removed by the memory limit 2013-12-16 20:38:53 +06:00
3f0bae965b Color management: use fallback mode if there're no displays/views
Before this it was a runtime check for number of displays/views
which is rather really annoying.

This simplifies code a bit and allows to do some more tricks
in other patches.
2013-12-16 18:38:13 +06:00
Dalai Felinto
63eb863d8d Add optional 'frame' argument to scene.timeline_markers.new(name)
Differential Revision: http://developer.blender.org/D101
2013-12-16 10:13:59 -02:00
0f934ee3b7 Motion tracking: use PROP_PIXEL for pixel RNA values 2013-12-16 17:53:15 +06:00
cacd7c725b Disable region overlap in movie clip editor
Before it was giving weird behavior with timeline in MCE
and track preview widgets. But there's also no much benefit
of having transparent toolbox there.

Requested by our motrack guru Sebastian ages ago.
2013-12-16 17:17:59 +06:00
09b4954d2d UI: use BLF_width_to_strlen for efficient text clipping 2013-12-16 22:00:30 +11:00
ce3f42e16a BLF API: Add BLF_width_to_strlen,rstrlen gives a byte offset from a string width 2013-12-16 22:00:30 +11:00
c193dbe30b Fix T37826: Opening a new image in the image editor
Cast dimensions to size_t before multiplication.
Also made add_ibuf_size survive cases when image
buffer allocation failed.
2013-12-16 16:51:27 +06:00
a2543ee43d Make compression in IMB_allocImBuf match other places 2013-12-16 16:41:15 +06:00
17604cded9 Missing NULL-pointer check in BKE_image_free_anim_ibufs 2013-12-16 16:30:28 +06:00
6ea13cf217 Editmesh: skip allocating a face array for recalc-normals 2013-12-16 01:28:07 +11:00
2b0ba65c51 Minor optimization for strlen and memcpy calls for reading blend files
Summary:
This commit removes ~10000 strlen calls and ~100000 memcpy calls in blender (profiled with blender --background), ~10000 memcpy calls in makesdna.

There is no need to create null-terminated strings for atoi, because it converts only the initial portion of the string anyway.
Also it was noticed that DNA_elem_array_size and arraysize functions work only with full strings, so there is no point to calculate strlen.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: http://developer.blender.org/D105
2013-12-15 18:06:04 +04:00
d833aab887 correct error in recent commit 2013-12-15 03:59:51 +11:00
df2537d09d Revert "Hide the 3D cursor in a few cases where it is unneeded (active object is"
This reverts commit 85eaa98980.

Conflicts:
	source/blender/editors/space_view3d/view3d_draw.c
2013-12-14 15:23:57 +02:00
37720364d5 Curves: Skip 3dtext & 2d-curve filling when fill is set to 'None'
Otherwise was impossible to have unfilled curves unless extrude was set
2013-12-15 01:49:12 +11:00
f00728c19b Fix bmesh compiler warning with OS X / clang. 2013-12-14 15:24:53 +01:00
60a6b2422d Modeling: add optional angle limit for beauty fill
Makes this tool more useful on an entire mesh by only applying
beautify to planar surfaces.
2013-12-14 23:25:29 +11:00
ab9fabdfc6 BMesh API: optionally pass fallback to BM_edge_calc_face_angle functions 2013-12-14 23:25:28 +11:00
01fc7a687a Code cleanup: Remove "TexFace to Material Convert", from the file menu. This was used for conversion from older 2.5x files. The do_version() code is still there and functioning though. 2013-12-14 10:48:12 +01:00