Commit Graph

45730 Commits

Author SHA1 Message Date
Sergey Sharybin
808ac6debf Prefetching for movie clips
This commit basically implements frames prefetching for
movie clip datablock.

Number of frames to be prefetched is controlled in User
Preferences, System tab, Prefetch Frames option.

Currently prefetching is destructive-less for movie cache,
meaning mo frames will be removed from the cache when while
prefetching. This is because it's half of simplier to
implement, but it also makes sense from tracking point of
view -- we could want to playback in both directions and
removing frames from behind time cursor is not always a
good idea.

Anyway, smarter prefetching strategy could be developed
later.

Some implementation notes:

- Added MEM_CacheLimiter_get_memory_in_use function to get
  memory usage of specified memory limiter.

- Fixed prototype of MEM_CacheLimiter_get_maximum which
  was simply wrong (used wrong data type for output).

- Added some utility functions to movie clip and movie
  cache for direct cache interaction and obtaining cache
  statistics.

- Prefetching is implemented using general jobs system.
  which is invoking from clip draw function.

- Prefetcing will stop as soon other job or playback starts.
  This is done from performance point of view. Jobs will
  likely require lots of CPU power and better to provide
  whole CPU to it.

  Playback is a bit more complicated case. For jpeg sequence
  playback prefetching while paying back is nice. But trying
  to prefetch heavy exr images and doing color space
  conversion slows down both playback and prefetching.

TODO:

- Think of better policy of dealing with already cached frames
  (like when cached frames from other clips prevents frames
  from current clip to be prefetched)

- Currently a bit funky redraw notification happens from
  prefetch job. Perhaps own ND_ is better to have here.

- Hiding clip while prefetch is active in theory shall stop
  prefetching job.

- Having multiple clips opened on file load will prefetch
  frames for only one of them.
2013-03-20 17:03:20 +00:00
Jens Verwiebe
09a604561d OSX/tablet: fix a longstanding bug with certain devices and a cornercases 2013-03-20 16:51:50 +00:00
Ton Roosendaal
d6ad96e2a9 Small fix: make node backdrop draw with nearest-pixel filter, so it zooms in
showing pixels. Issue was it also blurred image at zoom level 1... maybe subpixel
issue. Anyway - for inspecting exact composite results, zooming in showing pixels
is nicer anyway.
2013-03-20 16:30:48 +00:00
Campbell Barton
f8611bac8f - add knife project to toolbar.
- when running knife project, disable vertex selection since it may select areas between the newly cut regions.
  add EDBM_selectmode_disable() function since loopcut does this too.
- (optimization) avoid looping over all geometry when flushing and no selection exists.
2013-03-20 16:03:34 +00:00
Lukas Toenne
447de0a6c4 Fix #34694. This was actually a bug in the compositor's Bokeh Blur operation. It was writing outside of allocated memory in case of (0, 0) size buffers, with the usual unpredictable results. 2013-03-20 15:54:16 +00:00
Campbell Barton
d4af049fab add option to convert grease pencil into poly line directly.
Without this, bezier curves at 12 resolution are very high detail for many tasks when converted from freehand strokes.
so add the option to convert 1:1 grease pencil points to curve polygons.

also add use_handles option to curve conversion which is used when converting beziers to poly lines.
2013-03-20 15:01:15 +00:00
Lukas Toenne
f88e48fa55 When making a node group always add one input and one output node, regardless of whether there are any exposed sockets. The standard common case is that some sockets will eventually have to be exposed anyway, and it's easier to just delete the unused node instead of having to look it up in the menu. 2013-03-20 13:58:03 +00:00
Campbell Barton
643365818f add back -Wredundant-decls, just not for older gcc's 2013-03-20 13:30:20 +00:00
Lukas Toenne
1c3b3321e7 Fix for #34708 and #34709, cycles group nodes were not working well with 0 or 2+ group input/output nodes.
The issue here was that the proxy nodes created for connecting extern group node sockets to the internal nodes were generated by the input/output nodes themselves.

0 input/output nodes: there would be no proxy that external group node sockets can map to
2+ input/output nodes: additional nodes would overwrite entries from previous nodes, so that only one of the input/output nodes would be used.

Solution is to always generate exactly 1 proxy node for every group socket in advance, regardless of whether it is used internally. Internal node sockets can then all map to this proxy node.

In the case out output nodes there should only ever be one active node, otherwise the connection to the proxy would be ambiguous. For this purpose the NODE_DO_OUTPUT flag has been exposed to RNA, so that cycles can check it and only use the active output.
2013-03-20 13:17:35 +00:00
Irie Shinsuke
0130d7dcd4 Add a license document for i18n monospace font. 2013-03-20 13:02:40 +00:00
Ton Roosendaal
092b88c147 Make Blender compile again normal again with gcc 4.2
-Wredundant-decls is giving 1000s of lines of warnings for every file...
2013-03-20 12:34:20 +00:00
Lukas Toenne
a385d5f682 Fix for compositor bug introduced in pynodes branch by removing the default MuteNode for unspecified nodes in the COM_Converter. Not sure why i removed this in the first place, but it means that reroute nodes are not properly replaced in composites. It worked for preview and viewer composite because the reroute nodes are replaced there already by the node tree localization ... this needs to be cleaned up. 2013-03-20 10:06:28 +00:00
Lukas Toenne
3f1034c2b1 Fix for bug reported on bf-committers: RNA function nodetree.links.new does not remove existing links when connecting to a linked input. The check for socket connection limits was 1 off, needs to add 1 to the link counter to anticipate the newly added link. 2013-03-20 09:53:29 +00:00
Joshua Leung
08a7b607f7 UI Tweak: "Add to Group" button creates new group if no groups exist
Previously, the "Add to Group" button would show an empty search popup when there were no existing groups. While this does mean that the button behaves differently at different times, this way is more streamlined and should be less confusing than seeing an empty search popup or a greyed out "add to group" button or a "+" button which jumps around in different situations.
2013-03-20 01:41:33 +00:00
Campbell Barton
e7c15beaf6 code cleanup: use booleans for mesh and selection code. 2013-03-19 23:17:44 +00:00
Campbell Barton
cb11af8b06 fix for knife tool crash when knife_make_chain_cut() couldn't create a new face. 2013-03-19 21:37:22 +00:00
Lukas Toenne
42d65dd7ff Fix #34697, Undoing a node group crashes Blender.
The problem here was that the extra forward compatibility data for node groups (links to the node interface sockets) was written for files as well as undo memfiles. But only in the case of true .blend files is this data subsequently removed again after loading, which in the case of undo leaves invalid links hanging around in the node tree. Forward compat data is now skipped for undo.
2013-03-19 20:37:25 +00:00
Bastien Montagne
d39c6fdf2d Various cleanup around default i18n context.
Issue is that the real default context is NULL, however, in python and RNA, this value can't be used easily. So we use a specific string instead ("*"), defined as BLF_I18NCONTEXT_DEFAULT_BPYRNA.

From now on, all bpy/rna code should only use the BLF_I18NCONTEXT_DEFAULT_BPYRNA value, while all "usual" C code should use the BLF_I18NCONTEXT_DEFAULT value (BLF_pgettext is still able to "understand" both, anyway).

Also added BLF_is_default_context helper func, so that we can keep that check in a single place!

Finally, we should no need anymore to understand the void string "" as default context too - two values for a same thing are more than enough!
2013-03-19 19:37:22 +00:00
Campbell Barton
5c48eb3bb9 change to variable size bokeh blue, dont blur larger areas then the current pixel defines.
caused nasty looking errors with DOF.
2013-03-19 18:32:56 +00:00
Lukas Toenne
aa40fcb0a7 Removed the is_local_tree property from compo/shader/texture node trees. This was using an ID property, which causes trouble with 2.62 builds (possibly later) due to an old bug that causes ID properties in local node trees not loaded correctly. The bug has been fixed since then, but creating id properties will break with these builds. The property was not really necessary, so removing it will make it work as long as users don't add id properties themselves. 2013-03-19 18:15:33 +00:00
Bastien Montagne
e45da6f40a Small changes/additions to i18n tools. 2013-03-19 15:49:53 +00:00
Lukas Toenne
57cc2fd4a0 Fix for an old issue: Node names need to be unique to ensure proper preview image mapping (node instance keys are generated from node names). This caused problems with some of the old test files (e.g. compo_map_zcombine_cubes.blend).
When the uniqueness requirement was introduced in r24478 (2.50.8) for unambiguous RNA paths for animation a do_versions check was also added, but this was incorrectly only applied to main->nodetree (i.e. node groups) and not local trees in scene, material, etc.
2013-03-19 14:53:46 +00:00
Thomas Dinges
7cba869a94 Fix for [#34693] Linked Duplicate of object with Ocean modifier fails to copy geometry_mode parameter 2013-03-19 14:38:03 +00:00
Antony Riakiotakis
526d79d688 Fix: jittered brushes are not jittered, reported by kursad karatas.
Issue is sharing using global random generator which is shared with
particle system which resets the seed due to some scene/option
combination. Since it may be desirable to get predictable results with
particles, made sure brushes allocate their own random number generator
on startup and use that for jittering.
2013-03-19 14:25:12 +00:00
Thomas Dinges
8fe0c0eb45 Cycles / Mix Shader:
* Made "Fac" Socket a "PROP_FACTOR", like the other Fac sockets in the compositor.
2013-03-19 13:46:46 +00:00
Lukas Toenne
bbac76ee26 Nicer handling of undefined node, tree and socket types.
When nodes are loaded from a .blend file they can potentially have undefined types. This can happen if a type has been deprecated and removed, or if node types were defined in a python script that has not been loaded correctly. Previously all such nodes would automatically be removed from a node tree, assuming that their types were deprecated and no longer in use (more commonly caused by loading new nodes in an older Blender version). Due to the possibility of dynamic registration it is no longer feasible to simply delete such nodes.

Display and handling of node trees was simply disabled before this patch, so that a node tree where any node or socket type was undefined would not be displayed at all. To give more information and avoid problems caused by necessary checks for the typeinfo pointer, there is now a 'Undefined' fallback type for trees, nodes and sockets. These types are used as placeholders in case the real type is not registered and can provide useful visual feedback on undefined nodes.
2013-03-19 13:40:16 +00:00
Sergey Sharybin
c9d981c86d Fix regression in viewport background image transparency
Was caused by recent changes to automatically switch between
glaDrawPixelsTex and glaDrawPixelsSafe depending on resolution.

glaDrawPixelsSafe could not be sued for viewport because it'll
miss alpha transparency.
2013-03-19 13:38:43 +00:00
Antony Riakiotakis
8c90d23462 Fix: Clamp alpha to 1.0 or adding alpha in paint creates "isolines" due
to integer overflow. One of the beautiful bugs that is sad to see fixed.

Also remove unused timer variable
2013-03-19 13:32:57 +00:00
Thomas Dinges
d215f453df UI / Node Editor:
* Align Render Layer menu and Render button in "Render Layers" node. 
This looks better and the settings belong together as well.
2013-03-19 13:31:54 +00:00
Lukas Toenne
a7dd76c43f Fix for GLSL shader nodes when using Cycles nodes with shader sockets. These did not get a stack index assigned, but for GLSL they are simply replaced by colors. 2013-03-19 13:00:32 +00:00
Jens Verwiebe
a207d76709 OSX/pen: change sensivity graduation to a good value found with Sebastian and remove debug print 2013-03-19 12:29:38 +00:00
Jens Verwiebe
05787db61f OSX/pen: change sensivity graduation so we don't get maximum too early and have more feeling 2013-03-19 11:38:40 +00:00
Campbell Barton
d466e1d3b4 add BLI_rcti,f_recenter()
fix for uninitialized variable use in radial_control_get_properties() and bad cast in bpy api's foreach_parse_args()
2013-03-19 10:54:52 +00:00
Lukas Toenne
0f3515d4e2 Fixes for context updates of the node editor:
* If the node tree can be updated from context (tree has get_from_context callback defined), reset the pointers first to clear the editor path if no tree can be found.
* Stupid mistake: snode->from != snode->from is always false.
* Shader nodes context update: set the 'from' pointer to the active object, even if it doesn't have a material or node tree.
2013-03-19 10:42:33 +00:00
Bastien Montagne
4857d62ac6 More i18n tools cleanup. Also do not import nl in trunk currently (void translation)! 2013-03-19 10:11:41 +00:00
Lukas Toenne
422ed07339 Fix for shader node sockets not displaying the name when unconnected. Default button draw implementation for node sockets should be to display just the name label. 2013-03-19 10:03:52 +00:00
Sergey Sharybin
4e93ac546f Use checker backdrop for footage with alpha channel in clip editor
Also use glaDrawPixelsAuto as a fallback method. Hopefully it'll
make using 2D textures for frames higher resolution than
GL_MAX_TEXTURE_SIZE.
2013-03-19 08:53:01 +00:00
Bastien Montagne
fbbbb90af3 Some renaming/cleanup in i18n tools. 2013-03-19 08:33:24 +00:00
Sergey Sharybin
dc3ce6db6a Added alpha output to movie clip compositor node
Pretty much straightforward change, made in the same way as
texture input node.

Shall not be any regressions or crashes when mixing usage
of 2.66 and current trunk.
2013-03-19 07:46:32 +00:00
Mitchell Stokes
460d21af6f BGE: Adding docs for bge.logic.getProfileInfo(). 2013-03-19 04:56:51 +00:00
Mitchell Stokes
e6020cd320 BGE: Adding a getProfileInfo() function to bge.logic. This function returns a Python dictionary with the same information as the on screen profiler. 2013-03-19 04:51:37 +00:00
Dalai Felinto
4a5a5f2968 bge bugfix: [#34677] Setting Boolean property on KX_GameObject creates Int type
we need to check for booleans before testing for longs.
2013-03-18 22:52:43 +00:00
Pablo Vazquez
779b26058b Grease Pencil UI
The recent addition of the up/down arrows wasn't aligned.

Before/After: http://www.pasteall.org/pic/show.php?id=47512

Patch by Francesco Siddi.
2013-03-18 22:28:27 +00:00
Campbell Barton
03762409cd rewind 55389 and make this gcc4.6+ only 2013-03-18 21:36:12 +00:00
Daniel Genrich
7432924216 Smoke Bugfix /enhancement: Load pre 2.65 pointcaches.
Warning: Just make sure that you DON'T free the cache at any point. This patch can only display existing pointcaches from e.g. 2.64
2013-03-18 21:33:48 +00:00
Dalai Felinto
650a44595b fix for build error: "#pragma GCC diagnostic not allowed inside functions"
It works in a newest gcc (e.g. 4.6.3) but fails here:
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build
5658) (LLVM build 2336.11.00)
2013-03-18 21:16:04 +00:00
Sergej Reich
95bcb9d2fb Add capluse bounds drawing
Patch [#34566] by Alain Ducharme (phymec).
2013-03-18 20:32:30 +00:00
Sergej Reich
4285c45424 game engine: Increase hard limit for fps property
Patch by Alain Ducharme (phymec).
2013-03-18 20:32:28 +00:00
Lukas Toenne
d5c1a80294 Added back the custom limits for value properties in standard node socket types, to override the standard range based purely on subtype. 2013-03-18 20:27:39 +00:00
Thomas Dinges
3147d95bdf Node Interface:
* Small tweak to the "Interface" panel for group nodes, move separator into the branch to save some UI space.
2013-03-18 19:59:11 +00:00