Commit Graph

47594 Commits

Author SHA1 Message Date
Brecht Van Lommel
88cf1a2bc7 Screen: add exit callback for area and region types, this gets called when
hiding or removing an area or region.
2013-03-15 19:56:29 +00:00
Campbell Barton
433c82649e knife project: improve selection inside/outside checks.
- use more accurate method to find if a face is inside projected lines.
- check faces intersect while expanding selection - in some cases this could result in the entire model being selected.
2013-03-15 19:38:42 +00:00
Campbell Barton
40bfce6616 use bool for knife, also scons tab/space mix. 2013-03-15 19:00:21 +00:00
Thomas Dinges
87602a6d2a Compile fix:
* Scons needed PThread include after recent movie clip changes.
2013-03-15 17:18:52 +00:00
Sergey Sharybin
08a8d11216 Further improvement for multi-threaded proxies
Handle sequences in a special case for dealing with
sequence sources.

Namely handle separate frames in separate threads,
but do disk read from a critical section since HDD
is not so friendly with lots threads requesting for
data from it.

Makes proxy building much faster than it was before.
2013-03-15 16:57:19 +00:00
Brecht Van Lommel
bcec00dddc Fix #34649: texture size limit user preference not working. 2013-03-15 16:16:11 +00:00
Campbell Barton
630798ba3c add in ifdef for WITH_LIBMV, correct own error passing float[2] as float[3] 2013-03-15 15:47:32 +00:00
Bastien Montagne
ee2b7b2c68 Fix/disambiguation for some "Clip" i18n messages. 2013-03-15 15:13:34 +00:00
Bastien Montagne
bc511df3da Small fix to previous commit: temp buffer for translation context needs to be initialized to relevant default value for operators... Also fixed not initializing those buffers in macro register function. 2013-03-15 15:12:46 +00:00
Campbell Barton
1d5d8bc934 knife project:
- selecting faces inside the cut now works properly
- improve epsilon for detecing if faces are inside a cut (still not perfect)
2013-03-15 14:43:09 +00:00
Bastien Montagne
284e59d608 Add the possibility to define the translation context for py rna classes (operators, panels and menus).
Thanks to Campell and Brecht for the reviews!
2013-03-15 14:32:29 +00:00
Campbell Barton
87919be4f6 fix for own bad mistake using alloca in a loop, also knife project wasnt selecting correctly. 2013-03-15 13:18:35 +00:00
Campbell Barton
03f02019f2 knife projection feature,
apart of 3d printing tools - use to cookie-cut text into a mesh.
2013-03-15 13:06:31 +00:00
Sergey Sharybin
6dc4ea34e4 Multi-threaded frame calculation for movie clip proxies
This commit implements multi-threaded calculation of frames
when building proxies. Both scaling and undistortion steps
are now threaded.

Frames and proxy resolution are still handled one-by-one,
saving files after every single step. So if HDD is not so
fast, this commit could have not so much benefit.

Internal changes:

- Added IMB_scaleImBuf_threaded which scales given image
  buffer in multiple threads and uses bilinear filtering.

- libmv's camera intrinsics now have SetThreads() method
  which is used to specify how many OpenMP threads to use
  for buffer distortion/undistortion.

  And yeah, this code is using OpenMP for threading.

- Reshuffled a bit libmv-capi calls and added function
  BKE_tracking_distortion_set_threads to specify number
  of threads used by intrinscis.
2013-03-15 11:59:46 +00:00
Campbell Barton
0807c976f4 code cleanup: rename BKE_mesh_to_curve_ex --> BKE_mesh_to_curve_nurblist,
also correct odd indentation.
2013-03-15 10:48:48 +00:00
Antony Riakiotakis
9d060b0333 Add missing operators from paint modes:
All modes:
-----------
Shift-S sets smooth stroke mode

Texture Paint/Vertex Paint:
----------------------------
R springs brush rotation control menu
Ctrl-F sets brush user rotation

Vertex paint mode was getting transform events with R, made sure no
transform events are handled for paint modes.
2013-03-15 10:45:43 +00:00
Lukas Toenne
c6d10b8416 Fix #34617, Track Position Node outputs had a limit value of 1 instead of the usual 0 (multiple connections allowed). Common problem with the explicit limit value in socket C templates, should be removed ... 2013-03-15 10:34:32 +00:00
Antony Riakiotakis
99ee23aec5 Support for rake in 2D image painting. 2013-03-15 09:48:51 +00:00
Sergey Sharybin
1ea16dcf9b Patch #34632: DPX/Cineon speed up
Done by Julien Enche (aka trap), thanks!

From the patch comment:
This patch speeds up Cineon/DPX file loading.
Some more checks are done in dpxOpen and cineonOpen functions so IB_test
flag can now be taken into account safely, and an unnecessary call to
IMB_rect_from_float has been removed.

DPX/Cineon file now loads around 3 times faster on my computer.

Own comment:
Ideally, IB_rect shall indeed indicate which buffers to load, however
currently all places which reads image uses this flag.

This fact already mentioned in OpenEXR reader and it shall be fine
to skip doing rect_from_float in readers themselves.
2013-03-15 09:46:37 +00:00
Sergey Sharybin
42660a204a Skip allocating any display buffer and starting any threads
in case image buffer contains byte buffer only and it's
color space matches display space.

It was already check for this case, but it happened later
in color management routines, which is needed for saving
files, but not fast enough for realtime playback of 4K.
2013-03-15 09:35:12 +00:00
Sergey Sharybin
9d5c3264da Skip doing frame undistortion if it's not needed for proxies. 2013-03-15 09:32:59 +00:00
Antony Riakiotakis
b961fda0b1 Fixes for 2d painting:
* Jittering accounts for zoom
* Smooth stroke accounts for zoom
* Expose smooth stroke in image paint editor.
2013-03-15 09:19:41 +00:00
Sergey Sharybin
85b6299747 Fix #34633: Merge First/Last crashes Blender
It was check happening when generating menu with available modes
for merge operator, but no checks happened when executing operator.

Since operator could be called from python or shortcut, it was
possible to bypass all the checks.
2013-03-15 07:08:00 +00:00
Antony Riakiotakis
55a05a9b03 Fix own mistake. Erroneously prefixed sculpt capabilities with sculpt_
before separating them in another struct. Thanks to Sebastian Koenig for reporting
2013-03-15 00:22:04 +00:00
Campbell Barton
113f2367a0 move polygon intersection out of BLI_lasso into BLI_math_geom since its a generally useful function.
adds:
- isect_point_poly_v2()
- isect_point_poly_v2_int()
2013-03-14 21:44:16 +00:00
Campbell Barton
a2a594fb36 BLI_linklist_free() was incorrectly taking MEM_freeN() as an argument, evidentially this works on x86 - but could cause issues later on.
add BLI_linklist_freeN() which MEM_freeN's each item.
2013-03-14 19:40:42 +00:00
Campbell Barton
7626101dc9 split up BKE_mesh_to_curve() into 2 functions, adding BKE_mesh_to_curve_ex() which doesn't do object type conversion. 2013-03-14 18:44:32 +00:00
Campbell Barton
a0dbd88311 converting a mesh to a curve was unnecessarily using tessface's.
use mpolys instead and simplify checks for wire edges.

Also rename BKE_mesh_from_curve() --> BKE_mesh_to_curve() since this function converts a mesh into a curve.
2013-03-14 18:35:21 +00:00
Sergey Sharybin
2b845d3b2a There was a regression in recent bugfix which touched Mix node.
This commit hopefully fixes that regression.
2013-03-14 16:25:32 +00:00
Campbell Barton
d92e32e4e7 use floats for knife tool internal mouse coord. 2013-03-14 14:46:59 +00:00
Bastien Montagne
93d7e3b442 Usual blenderplayer fix! :p 2013-03-14 14:05:41 +00:00
Campbell Barton
8dd2464626 minor knife refactor to prepare for running non interactively. 2013-03-14 13:58:56 +00:00
Campbell Barton
63d3594975 ui_def_but() allocating an extra byte in 'but->str' for no reason. 2013-03-14 11:29:15 +00:00
Campbell Barton
ffc8ecc587 use BLI_strncpy_rlen() rather then BLI_snprintf() when no formatting is needed.
also replace sprintf with strcpy when no formatting is done.
2013-03-14 10:39:18 +00:00
Sergey Sharybin
cf3b3a1ba2 Code cleanup: replace magic constant used for alpha ignore flag with a define. 2013-03-14 10:15:10 +00:00
Campbell Barton
0159647ada add BLI_strncpy_rlen(), a clone of BLI_strncpy() that returns the number of bytes copied.
also move doxy comments for BLI_string.h into the C file.
2013-03-14 10:07:05 +00:00
Sergey Sharybin
ccd05c33ed Fix #34616: Wrong face culling for curves with constructive modifiers
If curve object does have derived mesh, culling shall happen for
back faces, not front.
2013-03-14 09:50:29 +00:00
Campbell Barton
4dcd4e1a28 minor change to BLI_strncpy(). replace strlen() with BLI_strnlen(). 2013-03-14 09:49:20 +00:00
Campbell Barton
1158f06b57 code cleanup: de-duplicate view clipping function for paint and knife tool, minor changes to knife initialization. 2013-03-14 07:56:40 +00:00
Sergey Sharybin
9d896f8f84 Border rendering now works for all scenes used in compositor,
before this only active scene would be rendered with border.

When do_render_fields_blur_3d() is finished, it'll modify
render's display rect so it'll correspond bordered render
result placed on black backgrund. Actual border is stored
nowhere, which makes it only way to re-calculate disprect
for all other renders used in compo based on source. Not
so big deal actually.

Also needed to modify Cycles a bit, because before this
patch it used border settings from scene being rendered.
Now made it so render data is passing to external engines.

Using a property inside RenderEngine structure for this.
Not best ever design for passing render data, but this
would prevent API breakage. So now external engines could
access engine.render to access active rendering settings.

Reviewed by Brecht, thanks!
2013-03-14 07:38:37 +00:00
Campbell Barton
6a51379bf7 tweaks to clang so blender can build with -Werror 2013-03-14 07:25:54 +00:00
Joshua Leung
21dc93d275 Quick fixes for previous commit
* Missing word in tooltip for operator
* Ensure that filters are set appropriately so that effect is visible
immediately
2013-03-14 07:11:36 +00:00
Joshua Leung
07f2efe82f NLA Editor: Operator to add AnimData to selected objects so that they can appear
This commit introduces an operator in the Add menu - this operator ensures that
all selected objects have AnimData attached to them (even if they don't have any
actions/drivers yet). By doing this, these objects can at least appear in the
NLA Editor, which will allow them to have strips added to them in future without
having to create throwaway actions first (NOTE: there's still some stuff coming
to allow that).

Also, renamed NLA_OT_delete_tracks -> NLA_OT_tracks_delete
2013-03-14 06:34:02 +00:00
Joshua Leung
396758757b Bugfix: Filtering option in NLA Editor to include AnimData blocks with no
actions or NLA data attached was broken

Looks like a typo whcih somehow slipped in at some stage, as I remember that
this used to work at some point 2 years ago!
2013-03-14 06:30:18 +00:00
Campbell Barton
92d45811c3 fix reading out of buffer bounds for recent vertex paint commit. 2013-03-14 05:59:34 +00:00
Joshua Leung
0fa006cba1 Remove OPTYPE_REGISTER flag from click handler operator for anim editors
1) It made no sense to show this as the last operator which was used, since
these can only be used from the anim editors (and not the 3D View where this
panel appears most of the time)
2) Mouse select operators in other places didn't do this
3) There aren't really any editable parameters for this operator anyway
4) It's highly dependent on valid mouse coordinates as input.

Apart from that, undo still works fine, so no need to really keep this here.
2013-03-14 05:58:13 +00:00
Campbell Barton
aff410b558 style cleanup: odd indentation 2013-03-14 05:52:30 +00:00
Joshua Leung
5f92078d53 More AnimData selection fixes
* Not all supported datatypes would show up in the NLA Properties Region when
selected
* Clicking on the name part of the "Active Action" tracks now selects the
AnimData block that action is attached to
2013-03-14 05:44:56 +00:00
Joshua Leung
daf3fc02ad Bugfix: Selecting AnimData "expanders" in AnimEditors works again
Somewhere along the line, this functionality broke, even though the code to
handle these settings was still in place for many of these. The main implication
of this fix is that it should now be possible to select a particular AnimData
block, which makes it possible to do things such as changing the action
associated with that AnimData block (i.e. via the "Animation Data" panel in the
NLA Editor), as well as other operations which I've had on the todolist for a
while. Stay tuned!
2013-03-14 05:01:51 +00:00
Antony Riakiotakis
5684352858 Fix silly mistake that could lead to crash. Also, slight cleanup/rename
and comments
2013-03-14 03:47:20 +00:00