Commit Graph

37695 Commits

Author SHA1 Message Date
Sergey Sharybin
88683ce71c Fix #34720: Sculpt mode T panel has no texture preview
Cycles was not able to render texture icons, same actually
goes to lux. Now made it so blender internal is used to render
icons for textures.
2013-03-22 09:42:16 +00:00
Sergey Sharybin
afe46eeb40 Fix #34689: Multilayer EXRs don't load correctly if one layer is named and the other is not
OpenEXR's ChannelList.layers() will not include empty layer names,
which caused the issue. Made it so if there's one non-empty layer
name, check for empty names happens.

If there's empty layer name in case one non-empty layer name, file
will be considered multilayer now.
2013-03-22 09:18:35 +00:00
Lukas Toenne
f11f6d179e Fix for compositor node preview sizes: Use the render output aspect ratio for estimating the required preview rect size instead of assuming a square, to avoid wasted space. Note that this does not work for newly added nodes until they have first been evaluated and a preview image has been generated (same behavior as before pynodes merge and associated preview changes). 2013-03-22 08:50:56 +00:00
Campbell Barton
75a5e239d7 correct enums which were in fact variables defined in headers. 2013-03-22 05:46:39 +00:00
Campbell Barton
a79e10157d code cleanup: use NULL rather then 0 for pointers, and make vars static where possible.
also found unintentionally defined enum/struct variables that where only meant to be defining the type.
2013-03-22 05:34:10 +00:00
Campbell Barton
dd0e2da784 code cleanup: use booleans and const's for operator vars. 2013-03-22 04:40:45 +00:00
Campbell Barton
e537fae726 fix error with merge operator not handing error cases properly (errors wouldn't cancel the operator as they should).
was mixing up OPERATOR_CANCELLED with 0.
2013-03-22 04:39:43 +00:00
Joshua Leung
b5b83ce601 Tweak to previous commit - make range check less strict so that indicators don't
flicker off so easily when target moves off screen
2013-03-22 03:25:31 +00:00
Joshua Leung
48b50ec154 Graph Editor: Draw indicators on the active Driver F-Curve which show the
relationship between the result of driver evaluation (NKEY region stuff) and the
end result applied to the driven properties.

Example:
http://www.pasteall.org/pic/47687
2013-03-22 02:28:55 +00:00
Dalai Felinto
5ef9a20671 BGE bugfix for [#34505] Vertex Colors not working in the BGE (for custom GLSL shaders) when multitexture and no material
Bug introduced on rev.36723
2013-03-21 23:20:46 +00:00
Campbell Barton
f254ba77fd code cleanup: conversion from blender to BGE was unnecessarily confusing in checking weather to use vertex colors,
move check to function.
2013-03-21 23:11:52 +00:00
Dalai Felinto
6d8b3d2d94 BGE bugfix: [#34550] getVertexArrayLength changed in 2.66
This bug was producing way more geometry than we need. Potentially
memory saver (or performance even) bugfix.

Bottomline is:
We need to initialize the UVs otherwise vertex comparison fails ...
Ideally MoTo should take care of initializing MT_Point2
(note in Windows that seems to be fine, but it's safer to not rely on that)
2013-03-21 21:10:14 +00:00
Campbell Barton
b57fc113aa python api: add functionality to remove uv-texture layers. 2013-03-21 20:54:48 +00:00
Lukas Toenne
8ff3fa8ab2 Fix for Render Layers node, reported by Jason van Gumster (Fweeb) on IRC. The render layer operations need their RenderData pointer set. This was done for all connected output operations, but not for the preview operation which uses the image color layer. In case the image output is unconnected this leads to NULL pointer access. 2013-03-21 20:31:09 +00:00
Campbell Barton
fa1cd9ce9b python api: add functionality to remove vertex color layers.
note: that this intentionally removes check to exit vpaint mode when a vertex color layer is removed,
	  since being in vertex-paint mode without a vertex color layer is supported.

also minor change to drawing camera limits while picking from previous commit.
2013-03-21 20:15:39 +00:00
Campbell Barton
21c55d5304 mist line can now be used for camera selection. 2013-03-21 18:57:05 +00:00
Lukas Toenne
9713d5e740 Fix for a node compatibility code bug (reported by kopias in IRC). Compatibility data (links with NULL fromnode/tonode pointers) was created for all node trees in library data, including local scene/material/... trees, but on loading was only actually removed for node groups. Now cleans up all trees in the library to be sure, and only generate new compat data for actual group trees. 2013-03-21 18:33:38 +00:00
Campbell Barton
245a9db713 patch [#34687] Patch for AutoMerge button in 3d editor
from Dan McGrath (dmcgrath)
2013-03-21 17:26:15 +00:00
Campbell Barton
fdc3b7dfef fix for own recent commit - added function into wrong side of ifdef 2013-03-21 16:06:46 +00:00
Campbell Barton
a8b6b5ec4c use clip alpha setting for empty-image drawing. 2013-03-21 15:43:05 +00:00
Sergey Sharybin
f3db38de56 Render border + crop will be handled correct in compositor now
This commit simply implements mapping from centered cropped canvas
to a full-frame coordinates, so operations like alpha-overing render
result on top of image will be properly aligned.
2013-03-21 15:26:41 +00:00
Campbell Barton
0b40266afc revert edit from r55461, causing build error on some systems. 2013-03-21 14:46:37 +00:00
Campbell Barton
790374d07d code cleanup: rename editmode functions so we have ED_object_editmode_load/enter/exit 2013-03-21 14:18:17 +00:00
Campbell Barton
dad7afa1af code cleanup: remove double call to BKE_node_instance_key(), rename ruler (lots of tools are 3d :)), and redundant assignment. 2013-03-21 14:16:55 +00:00
Campbell Barton
401fdf5065 py api: add Object.update_from_editmode(),
Useful for python exporters to avoid toggling editmode on export, moved into own function ED_object_editmode_load(obedit).
2013-03-21 14:12:04 +00:00
Lukas Toenne
fa0e2603f5 Add a little bit of space between socket layouts on nodes. 2013-03-21 13:21:18 +00:00
Lukas Toenne
8066c09df2 Fix for extra string width padding in ui_text_icon_width, causing labels in right-aligned layouts show an annoying gap. If the layout is right-aligned, make the text button align right as well, so text is drawn at the right side of the alloted rect. 2013-03-21 12:58:31 +00:00
Ton Roosendaal
0d7f7c253b Bug fix #34713
Using MultiSample, the code that inspects Z buffer values fail, like for grease pencil
drawing on "Surface".

It appears to me that all this depth draw/read code is ignoring gpu offscreen entirely.
This should be confirmed by Campbell though :)

I'm also quite unsure why this code exists, related to other tools that use
depth too (particles, sculpt). Good to mark down for our viewport recode.
2013-03-21 11:48:13 +00:00
Joshua Leung
67e54eb819 Bugfix: Transform autokey warning indicator text was getting clipped prematurely
After quite some time debugging going back through previous commits for this
feature and digging around the internals of the blenfont,I finally found the
culprit. It turns out that there was just a single line missing between
BLF_width_default() and BLF_width_and_height_default(), which caused the widths
returned to understimate the space required or so, causing text clipping. The
offending line probably correcting for different DPI scaling values.
2013-03-21 11:14:53 +00:00
Sergey Sharybin
1769319ce2 Tweaks to movie clip prefetching after discussion with Sebastian
Don't use sequencer's Frames Prefetch option and rather fill the
whole cache with frames.

Since movie clip is not "classical" prefetcher (it doesn't do
anything while playing back) and main purpose is to speed up
reading for further tracking and so, such a change seems logical.
2013-03-21 07:47:38 +00:00
Joshua Leung
3725089b6b Driver error warnings are now only printed to the console when Blender is run
using the -d flag

This prevents a stream of error messages flooding the console when working with
particular rigs which may have a few broken controls. In general, riggers now
have a better alternative by using the filtering tools in the Graph Editor.
2013-03-21 06:11:16 +00:00
Joshua Leung
3b885751b6 Bugfix [#34688] Auto-Keying doesn't include custom properties when pasting poses
Previously, Paste Poses only used the LocRotScale Keying Set for autokeyframing
purposes. This was fine for most purposes, but with many rigs these days also
using custom properties for important posing functions, it's important that we
include those here too.
2013-03-21 04:22:29 +00:00
Campbell Barton
3966722057 code cleanup: misc warnings/style 2013-03-21 02:58:21 +00:00
Campbell Barton
2d236a57b7 fix for incorrect use of 'bool', also fix 2 older bugs in fly mode.
- panning didnt keyframe translation animation.
- when checking to key translation: speed `float` was converted to an `int` then treated as a bool, now check (speed != 0).
2013-03-21 02:56:16 +00:00
Campbell Barton
8655be437d code cleanup: use bool where values are true/false, for view3d and related functions. 2013-03-20 23:14:18 +00:00
Bastien Montagne
885441e758 I18n users request: add the ability to use a translated name for newly added/created objects or other datablocks.
This simply adds a third "translation type" (in addition to iface and tip), "new data", with relevant user settings flag and helper funcs/macros (and py api).

Currently implemented name translation when adding new objects, as well as modifiers and constraints, will add the others (cd layers, scenes, perhaps nodes [though I think they do not need this], etc.) later.
2013-03-20 18:42:09 +00:00
Sergey Sharybin
e9b0b402cc Changes to compositor output node
Make it so compositor output node wouldn't be calculated
when Render Result image is not visible on the screen.
This makes compositor tree editing more friendly and
faster.

Also, if there's no viewer image visible on the screen
viewer nodes wouldn't be handled.

Final rendering keeps unchanged for now.

This solves issues when for performance artists are
disconnecting compo output node before tweaking values
in compositor and forgets to attach compo output
node before sending file to the farm.
2013-03-20 18:01:47 +00:00
Sergey Sharybin
1b9e17fb9a When using border rendering, use the same border for compositor
This makes compositing as fast as it's possible in this case.

The only thing is border render+crop will still give funcy
results. This is the next thing to be solved in compositor.
2013-03-20 18:01:41 +00:00
Daniel Genrich
b5ac9639dc Bugfix [#34710] Crash on duplicating object with cloth modifier.
Caused by last commit by me.
2013-03-20 17:45:35 +00:00
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
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
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
Campbell Barton
e7c15beaf6 code cleanup: use booleans for mesh and selection code. 2013-03-19 23:17:44 +00:00