Commit Graph

1171 Commits

Author SHA1 Message Date
52a5d58045 UI: split area_copy_data into ED_area_data_copy, ED_area_data_swap
Was confusing to have swap/copy in the one function.
2014-04-11 17:18:19 +10:00
45f336c3a1 UI: correct own bad use of bool and document area_copy_data args 2014-04-11 09:17:43 +10:00
f38331adef Code cleanup: style 2014-04-03 09:24:09 +11:00
11ee2d8b97 implement cache line for image editor
It works exactly the same as a cache line in movie clip editor.
2014-04-02 16:54:30 +06:00
def5999f9b UI: support for dragging popups title area 2014-04-02 18:43:53 +11:00
617557b08e Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define 2014-04-01 15:22:28 +11:00
3ec0c73211 View3D: replace RV3D_VIEW_PERSPORTHO with RV3D_VIEW_USER
This is hardly used, and may be removed later (looks like quad view used by accident).

It could cause the 2d grid to draw with the view at an angle.
2014-03-28 15:57:33 +11:00
bd57ec686c Fix T39397: Leaving leaving camera from quadview set ortho 2014-03-25 15:14:34 +11:00
54a8753df3 Fix T39323: Animation playback is not synchronized when Screen Layout changes.
Own regression in rBd2a5ea04ed84.

This commit should be included if we do a 2.70 'a' release.
2014-03-21 15:17:50 +01:00
9767ff8916 Code cleanup: use true/false in sequencer functions 2014-03-20 15:46:38 +06:00
d4b8f6798d Code cleanup: comment unused OpenGL util functions 2014-03-20 11:54:32 +11:00
a861e5572a UI: Add theme color for viewport overlay
Was using wire or black in many places, this color is used for cursor,
camera guides, transform helper lines. So its possible to have a dark
background with light overlay color.

Patch D331 by Brita, with some edits.
2014-03-18 05:40:18 +11:00
ec4e12d9a2 Code cleanup: comments and typos 2014-03-18 05:40:18 +11:00
2097e621ed Code cleanup: use r_ prefix for return args 2014-03-16 03:26:23 +11:00
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
d2a5ea04ed Fix T38467: Animation playback is not synchronized when Screen Layout changes
When both old and new screens share the same scene, "transfer" playback to new screen, else stop playback.
2014-02-28 10:04:57 +01:00
d3b9457991 Code cleanup: style/warnings 2014-02-28 11:04:15 +11:00
d7a2d2b693 Fix T38876: hide area split widget in lower left of widget on OS X.
This is already used by the operating system for window resizing, you must use
the widget in the top right of the area to split.
2014-02-27 23:41:01 +01:00
d2548f561c WM: hide screen management and ndof operators from seach popup 2014-02-26 13:48:41 +11:00
ece755ffe6 Fix for sequencer add operators showing up in spacebar search. 2014-02-26 13:30:25 +11:00
5c8d5c70cf View3d: ensure locked views are on an axis - behavior wasn't well defined. 2014-02-12 11:26:02 +11:00
b3afbcab8f ListBase API: add utility api funcs for clearing and checking empty 2014-02-08 06:24:05 +11:00
d2699f233a Fix T38538: repeat history menu show operators that can't be repeated. 2014-02-07 17:11:09 +01:00
37026b12ec Code cleanup: use bool for static methods 2014-02-05 22:36:15 +11:00
107566ebf1 Code cleanup: check -1 for error return explicitly 2014-02-03 19:35:44 +11:00
d900f5be55 Code cleanup: use bools where possible 2014-02-03 19:35:44 +11:00
70f2389f5a Code cleanup: be less vague checking invalid index values 2014-02-01 02:01:00 +11:00
a5c35fb27f Code cleanup: use booleans where appropriate 2014-01-28 04:00:04 +11:00
a71f072f9c UI: Replace +/- menus with collapsible ones
Patch D160, by Scott Petrovic with  own modifications.
2014-01-27 18:42:11 +11:00
e2cd654a3e Fix tool properties region drawing even if the toolbar is hidden.
This would show as a line on the side of the 3D view with high DPI / retina,
not easy to notice.
2014-01-22 16:40:11 +01:00
4ae7ae6f2e Code Cleanup: use bool for return values and correct comments
also remove CDDM_Check, theres no need for it.
2014-01-22 02:53:48 +11: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
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
8b6b42b694 UI: tweak menu padding and make separator line more visible.
Adds some padding to the left of the icon, adds more space around the separator
line and make it more visible, and add some spacing at the top and bottom of
the menu. Ref T37794

Reviewed By: dingto, billrey

Differential Revision: https://developer.blender.org/D223
2014-01-17 17:06:11 +01:00
af93ebcb50 Code Cleanup: style and redundant casts 2014-01-16 19:15:53 +11:00
1f2136b329 Python/Depsgraph: bpy.data.*.is_updated now detects add/remove of any datablock.
Previously this only worked for some datablocks relevant to rendering, now it
can be used to detect if any type of datablock was added or removed (but not
yet to detect if it was modified, we need many more depsgraph tags for that).

Most of the changes are some function parameter changes, the important parts
are the DAG_id_type_tag calls.

Reviewed By: sergey, brecht

Differential Revision: https://developer.blender.org/D195
2014-01-15 16:47:53 +01:00
b8b412230b Code Cleanup: use iroundf
also increase precision of rctf print functions
2014-01-15 13:40:40 +11:00
5196c4fd12 Fix uninitialised var warning 2014-01-15 14:45:45 +13:00
709041ed0b Threaded object update and EvaluationContext
Summary:
Made objects update happening from multiple threads. It is a task-based
scheduling system which uses current dependency graph for spawning new
tasks. This means threading happens on object level, but the system is
flexible enough for higher granularity.

Technical details:

- Uses task scheduler which was recently committed to trunk
  (that one which Brecht ported from Cycles).

- Added two utility functions to dependency graph:
  * DAG_threaded_update_begin, which is called to  initialize threaded
    objects update. It will also schedule root DAG node to the queue,
    hence starting evaluation process.

    Initialization will calculate how much parents are to be evaluation
    before current DAG node can be scheduled. This value is used by task
    threads for faster detecting which nodes might be scheduled.

  * DAG_threaded_update_handle_node_updated which is  called from task
    thread function when node was fully handled.

	This function decreases num_pending_parents of node children and
	schedules children with zero valency.

    As it might have become clear, task thread receives DAG nodes and
    decides which callback to call for it.

    Currently only BKE_object_handle_update is called for object nodes.

    In the future it'll call node->callback() from Ali's new DAG.

- This required adding some workarounds to the render pipeline.
  Mainly to stop using get_object_dm() from modifiers' apply callback.
  Such a call was only a workaround for dependency graph glitch when
  rendering scene with, say, boolean modifiers before displaying
  this scene.

  Such change moves workaround from one place to another, so overall
  hackentropy remains the same.

- Added paradigm of EvaluaitonContext. Currently it's more like just a
  more reliable replacement for G.is_rendering which fails in some
  circumstances.

  Future idea of this context is to also store all the local data needed
  for objects evaluation such as local time, Copy-on-Write data and so.

  There're two types of EvaluationContext:

  * Context used for viewport updated and owned by Main. In the future
    this context might be easily moved to Window or Screen to allo
    per-window/per-screen local time.

  * Context used by render engines to evaluate objects for render purposes.
    Render engine is an owner of this context.

  This context is passed to all object update routines.

Reviewers: brecht, campbellbarton

Reviewed By: brecht

CC: lukastoenne

Differential Revision: https://developer.blender.org/D94
2013-12-26 17:24:42 +06:00
8901701808 UI: Display alpha checkers in image info's color swatch. 2013-12-24 17:20:37 +11:00
f92bb64505 Fix T37843: area split widget missing in python console editor.
Python was indirectly causing redraw tags during drawing, which interfered
with the ARegion.drawrct, now ignore these during draw.
2013-12-18 12:02:31 +01: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
e68144aed7 Fix for crash in toolbar tabs with only one tab defined 2013-12-17 19:16:44 +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
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
5a91df3271 Implement GPU-side dither
Summary:
Uses some magic pseudo-random which is actually a
texture coordinate hashing function.

TODOs:
- Dither noise is the same for all the frames.
- It's different from Floyd's dither we've been
  using before.
- Currently CPU and GPU dithering used different
  implementation. Ideally we need to use the same
  dither in CPU.

Reviewers: brecht

Reviewed By: brecht

Differential Revision: http://developer.blender.org/D58
2013-12-13 12:36:45 +06:00
7658f7acff Fix for off by one error noted by Anthony Edlin 2013-12-12 19:02:51 +11:00
9c6fc9f15e Fix T37777: layout.column_flow() not working correct with retina / DPI. 2013-12-11 17:06:49 +01:00
5afc2a9a44 Code cleanup: assign win size to const vars and some renaming 2013-12-11 13:07:00 +11:00
91d8519c47 Fix T37463: Increasing window size would add space around menu header 2013-12-10 23:54:33 +11:00