Commit Graph

46472 Commits

Author SHA1 Message Date
Dalai Felinto
d36fb8e34e Logic Bricks *must* be kept in alphabetical order 2015-01-06 12:29:48 -02:00
Howard Trickey
bf168f0600 Fix T43137: vertex bevel percent mode wasn't implemented. 2015-01-06 09:13:38 -05:00
Campbell Barton
e9d6350e7e Sequencer: show extensions when preview enabled 2015-01-06 23:11:20 +11:00
Sebastian Koenig
e961c06a6e Fix T43143: DPX header wrong, making it impossible to import to other software
The issue was caused by the single letter in header, which is expected to be
captial as per standard: http://www.simplesystems.org/users/bfriesen/dpx/S268M_Revised.pdf
2015-01-06 13:47:53 +05:00
Campbell Barton
77c926933b cleanup: warnings 2015-01-06 19:09:56 +11:00
Campbell Barton
1829c049be Correct args from recent mathutils refactor 2015-01-06 19:09:55 +11:00
Campbell Barton
bf0c8e116d PyAPI: add PyList_APPEND
This appends while giving ownership to the list, avoiding temp assignment.
This matches PyList_SET_ITEM which bypasses refcount's

Note, this also reduce code-size, Py_DECREF is a rather heavy macro.
2015-01-06 19:09:53 +11:00
Campbell Barton
9fd569a654 PyAPI: add utilities PyTuple_SET_ITEMS, Py_INCREF_RET
Setting all values of a tuple is such a common operation that it deserves its own macro.
Also added Py_INCREF_RET to avoid confusing use of comma operator.
2015-01-06 19:09:11 +11:00
Jorge Bernal
ee58d44945 BGE: Fix for bugs T42520 and T42097 (mouse look actuator related).
With this fix the mouse actuator movement works well as with even screen resolutions as odd screen resolutions.
Also it fixed the movement when the border of the blenderplayer window is out of the screen limits.

Reviewed By: moguri

Differential Revision: https://developer.blender.org/D946
2015-01-05 22:07:35 -08:00
Campbell Barton
2d2bfd416b Fix T43122: Shrinkwrap target, wrong linked object 2015-01-06 14:01:18 +11:00
Campbell Barton
62f2b751f8 UI: refactor button string get/set into functions. 2015-01-06 11:05:08 +11:00
julianeisel
ffd06de470 Correction to previous commit
Just realized menu buttons are using hardmin and hardmax for a bad hack which will make the assert fail :/
2015-01-06 00:02:57 +01:00
Bastien Montagne
c91e64faa6 Fix/cleanup very ugly and unsafe usage of but->str in ui_but_update().
Currently, but->str should never be smaller than but->strdata, but code shall
not rely on this.

Further more, but->strdata is 'only' 128 chars, this could become limit with some
translations, if the org label is already rather long, leading to truncated str
(Chinese e.g. can only store about 40 chars in strdata).
2015-01-05 21:38:15 +01:00
julianeisel
e7a9bf88d2 Fix T43111: Node Editor (Slider) Draw Glitch
* don't allow Node Editor input max value to be less then min value
* avoid the num slider drawing glitch if softmin equals softmax
* assert if softmax/hardmax is smaller than softmin/hardmin

With this, we sort of allow softmin/hardmin and softmax/hardmax being the same.
2015-01-05 21:05:17 +01:00
Antony Riakiotakis
22ce525bcd More border clamping removed. 2015-01-05 14:26:56 +01:00
Antony Riakiotakis
8a547af2bd Remove border clamping. Usually we just want to clamp to edge instead.
Note - checked all glTexImage functions and we never use that. Border is
ifdefed out too here.
2015-01-05 14:25:22 +01:00
Bastien Montagne
89b654dc56 FileBrowser: small tweak to new search feature: clear that string when changing dir.
In 99% of cases, you do not want to keep the same filter when changing dir,
and having to reset it by hand is *very* annoying!
2015-01-05 12:23:41 +01:00
Bastien Montagne
caf5a325b0 Outliner 'Blender file' view: Show libs used both directly and indirectly both on main level and in nested tree.
Request from Gooseberry team. This eases a bit managing dependancies in complex .blend files.

Reviewers: campbellbarton

Subscribers: fsiddi

Projects: #user_interface, #bf_blender:_next

Differential Revision: https://developer.blender.org/D943
2015-01-05 11:28:48 +01:00
Antony Riakiotakis
3414d01411 Use float format for high bit depth textures if available - storage
requirements are the same but we may avoid some clipping of float values
for HDRs when used in shaders.
2015-01-05 11:23:54 +01:00
Campbell Barton
1ef33968fd Recent fix for SDL2 broke joysticks for SDL1.2 2015-01-05 20:23:30 +11:00
Bastien Montagne
a08c5e1183 Partial fix for T43113: Filebrowser: Empty folders do not contain go back arrow.
Do not allow going into un-readable directories at all.
Note we might want to reflect that 'state' in UI for users too, but that will be
for later.

Also, not quite sure this fix the windows case, will have to start my VM... :/
2015-01-04 17:57:39 +01:00
Campbell Barton
8abdc89912 Sequencer: Preview dragging playhead over strips
Bring back the 2.4x feature.

also show a highlight when a strip is being previewed.
2015-01-05 02:27:50 +11:00
Campbell Barton
c7eb83bc17 Fix sequencer border-flickering
Offscreen viewport drawing wasn't properly restoring the theme.
Add API calls to store/restore the theme so it can be temporarily overridden.
2015-01-04 23:23:17 +11:00
Campbell Barton
3447944c3f sequencer: don't return big values (fill pointer instead) 2015-01-04 22:46:54 +11:00
Campbell Barton
44e02651ab Fix for crash for 'Edit Source'
was accessing freed menu region.
2015-01-04 22:25:53 +11:00
Bastien Montagne
026cb6bdeb FileBrowser: Cleanup: rename some (really ugly) enum names. 2015-01-04 12:04:47 +01:00
Campbell Barton
b240b8e231 Freestyle: reserve array sizes before filling
also use PyList_GET_ITEM when list size is known.
2015-01-04 21:23:26 +11:00
Campbell Barton
de6b546e15 Fix 8 memory leaks from bad PyList_Append use 2015-01-04 20:35:16 +11:00
Bastien Montagne
e0db0f84ac Fix T43119: mathutils.intersect_point_line always returns a 2D vector as first value.
Trivial, safe for final 2.73.
2015-01-04 10:11:21 +01:00
Campbell Barton
8106a6b75d mathutils: refactor instantiation
remove 'type' argument, very few mathutils objects are wrapped,
add new function for creating wrapped objects.

also fixes unlikely memory leak if the data-array can't be allocated.
2015-01-04 17:43:57 +11:00
Campbell Barton
c41431f1e9 cleanup: use 'coords' abbreviation for functions. 2015-01-04 14:21:16 +11:00
Campbell Barton
fd9b25df75 cleanup: create cube, use index lookups 2015-01-04 14:21:16 +11:00
julianeisel
555c1d6a63 Fix T43114: File Browser - don't highlight '..' while using border select 2015-01-04 02:36:42 +01:00
Bastien Montagne
dcc5997527 FileBrowser: add search field in header bar.
Not much to add, pretty straightforward...
2015-01-03 21:55:16 +01:00
Tamito Kajiyama
d8b00a3bf5 Freestyle: memory consumption optimization in stroke rendering.
Previously individual strokes were represented by distinct mesh objects
no matter how many vertices and materials each stroke has, although
the vertex and material counts can be quite small depending on the input
scene data.  Now stroke meshes are packed into a minimum number of
mesh objects, so as to reduce the overheads of Blender object creation.
2015-01-03 21:54:56 +09:00
Joshua Leung
babfec9e8f Bump subversion so that version patches for theme changes work 2015-01-04 01:17:53 +13:00
Diego Garcia
f329ebe38a D824: Add themeing for keyframe lines in Timeline
Reviewed by: Joshua Leung (aligorith)
2015-01-04 01:17:51 +13:00
Joshua Leung
c50003cd09 Grease Pencil: Vertex size and colours are now themable 2015-01-04 01:17:50 +13:00
Bastien Montagne
b137f06d7e Cleanup: rename 'filelist' BLI funcs to consistent naming.
Also, add an optional callback to `BLI_filelist_free()` to allow freein
void poin if needed (consistency with `BLI_filelist_duplicate()`...).
2015-01-03 12:41:36 +01:00
Bastien Montagne
780bb88a7a Refactor 'fit in camera view' code, and expose it to RNA.
This changes BKE's fitting code to use `BKE_camera_params_compute_viewplane` instead of
`BKE_camera_view_frame`. This allows that code to work with orthographic projection too.

Also, two funcs were added to rna's Object, to resp. get the projection matrix of that
object (mostly useful for cameras and lamps objects), and return position this object
should be to see all (to fit) a given set of points.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D961
2015-01-03 12:05:23 +01:00
Bastien Montagne
16ed20ff3c Add some BLI helpers needed by asset branch.
`BLI_strncpy_ensure_pad()` is also useful with current master code.

The two others (`BLI_strcmp_ignore_pad()` and `BLI_filelist_duplicate()`)
are only used in asset branch currently, but think they could be useful
in other places too, and simplifies handling of asset branch & future patch review.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D965
2015-01-03 10:13:44 +01:00
Tamito Kajiyama
f06335e12f Fix for view map cache not flushed by updates of edge detection options.
This fix should be considered for inclusion in the 2.73 release, since
it concerns a new feature of Freestyle introduced in 2.73.
2015-01-03 15:40:07 +09:00
Bastien Montagne
8a288953cc Fix RNA Image.frame_duration.
If a video was loaded (e.g. from python) but never 'ibuf-acquired', its Image->anim
prop would still be NULL, returning useless '1' value as frame duration!
2015-01-02 22:51:51 +01:00
Sergey Sharybin
da66a2c871 Fix T43099: Modifiers in edit mode might mess up materials
The issue was originall caused by 2e8ba17 by removing necessery call
GPU_enable_material(). It was probably removed because in some cases
material was enabled after calling setDrawOptions.

That wasn't always a case for edit mode.

This is absolutely to be included to 2.73
2015-01-02 14:28:58 +05:00
Campbell Barton
4abe548527 cleanup: style 2015-01-02 19:29:00 +11:00
Campbell Barton
bf169d6ca6 Fix T43066: Joystick broken in GE since 2.73rc
Caused by move to SDL2, fix thanks to jensverwiebe.
2015-01-02 17:14:33 +11:00
Campbell Barton
aab4f2b762 cleanup: redundant casts & const cast correctness 2015-01-01 23:42:28 +11:00
Bastien Montagne
4bdd4aa633 SpaceFile: Cleanup: fix stupid indices in filelist_from_main()
Dead code (currently), but still...
2015-01-01 11:11:37 +01:00
Bastien Montagne
46bce66805 SpaceFile: Tweak thumbnail to avoid restarting the job needlessly. 2015-01-01 11:11:37 +01:00
Bastien Montagne
950f2c84a3 SpaceFile: Refactor sorting and filtering of filelist.
New code shall be more easy to maintain and extend.
Sorting is now handled quite the same as filtering, and all filtering parameters
are now packed into a sub-struct to help extending it later.

Also done some optimizations in filelist refresh, and sorting/filtering area.
Now we should avoid re-sorting and re-filtering too often, also removed
calls to those in read_xxx funcs.

Note thumbnail job is still started basically on each call to `file_refresh()`,
will be addressed in next commit.
2015-01-01 11:11:37 +01:00
Bastien Montagne
d8bb30d87e SpaceFile: Filelist: reorder a bit things, also cleanup some unused and pure-private funcs. 2015-01-01 11:11:37 +01:00
Sergey Sharybin
9de54da5a0 Fix T43079: Proxies of 100% size are ignored in sequencer 2015-01-01 15:06:22 +05:00
Sergey Sharybin
ec9a137bb2 Fix T43078: Strip custom proxy files did not respect color space settings 2015-01-01 14:52:37 +05:00
Joshua Leung
c0805722ed GPencil Editing: Copy and Paste selected stroke segments with Ctrl-C and Ctrl-V 2015-01-01 12:49:59 +13:00
Antony Riakiotakis
7f356c20dc Modify shader for texture coordinates of objects to also match the
rendered result more closely (all three parameters should match now)
2014-12-31 15:48:16 +01:00
Antony Riakiotakis
f31f28c3f4 Corrections to world texture coordinates to match the rendered result
more closely
2014-12-31 15:00:18 +01:00
Dotsnov Valentin
01c187fb93 Gamma node support for Blender Internal
Patch by Blend4Web Team, thanks!

Reviewers: psy-fi

Subscribers: yurikovelenov, AlexKowel, Evgeny_Rodygin

Differential Revision: https://developer.blender.org/D899
2014-12-31 13:36:14 +01:00
Antony Riakiotakis
a3e832e68b Fix T42984 detail flood fill not respecting mask values for smooth/sharp
curves.

Issue here is that brush curve could return negative values. This would
result in overflow of mask values. Those were not visible during real
time preview because result would be clamped.

We had two functions in the code, one of which allowed negatives but I
don't think that we really want that, users have no control over the
negative values at all anyway.

Thanks to the reporter, Leon Cheung for figuring out the issue :)
2014-12-31 13:11:54 +01:00
Sergey Sharybin
784517dfb9 Joystick: Suppress add/remove device events
Previously they'll be printed to the console as a totally unknown events
together claim this shouldn't have happened which is just misleading.
2014-12-31 14:56:42 +05:00
Sergey Sharybin
f3e7369d48 Compilation error fix for strict flags 2014-12-31 14:50:27 +05:00
Sergey Sharybin
f80eb37e21 Remove executable flag from the build configuration files
They're not intended to be executed directly and seems mode change happened
by accident.

Setting -x for this files to avoid possible incidents by trying to run this
files in shell.
2014-12-31 14:05:53 +05:00
Joshua Leung
d5f3aee41f Operator to duplicate the active Grease Pencil layer
TODO: this needs a proper "duplicate" icon, without the "ID" label
2014-12-31 14:20:44 +13:00
Jens Verwiebe
70b6c82fd3 Fix an odd line that slipped in my ghost_hack_first_file commit 2014-12-30 18:31:37 +01:00
Antony Riakiotakis
9e950ea661 Fix issue in separate rake control commit:
Mask slot still depended on regular slot to check some capabilities.
Some angle capabilities now only depend on the texture slot, not the
brush, so separate them and use the slot where appropriate.
2014-12-30 18:07:12 +01:00
Sergey Sharybin
016bbc8793 Fix T42780: Object linking allows to have linked armatures in pose mode
This isn't so bad for until one goes re-posing the armature and then uses undo.

It is the same issue as with edit mode which was solved back in the days.
2014-12-30 21:33:15 +05:00
Campbell Barton
cefb764269 PyAPI: geometry.normal, support polygons
Previously this only supported tri/quads,
now arbitrary size poly lines are supported.
2014-12-30 22:49:52 +11:00
Campbell Barton
68600920ce PyAPI: allow non-vector args for geometry module
Previously only vector args were accepted,
now allow generic sequence of numbers.

Was annoying to create vectors just to pass in args.
2014-12-30 22:05:34 +11:00
Campbell Barton
d993bad5e7 Fix possible NULL pointer dereference
also remove redundant NULL check
2014-12-30 08:13:15 +11:00
Bastien Montagne
fb7ff31315 Fix stupid handling of 'Object.matrix_local' in RNA.
The getter of this matrix (actually, `BKE_object_matrix_local_get()`) was only correct
in case of pure-object parenting, bone parenting and such did not gave valid results.

Also cleaned up a bit setter code, was using as temp storage ob->obmat itself,
which is supposed to be a world matrix!

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D958
2014-12-29 15:26:38 +01:00
Antony Riakiotakis
18854a6506 Rotate around selection now will work on last stroke position in texture
paint too.
2014-12-29 12:35:03 +01:00
Antony Riakiotakis
427fbc879e Move average stroke from sculpt session to unified paint settings so it
can be reused by other paint systems too.
2014-12-29 11:35:43 +01:00
Antony Riakiotakis
936604e801 Cleanup: get rid of sculpt minmax and reuse last stroke function (code
did that anyway, just kept the result in an intermediate variable)
2014-12-29 11:01:10 +01:00
Bastien Montagne
0a76be81b7 cleanup: redundant call to BKE_object_apply_mat4 2014-12-29 19:34:40 +11:00
Bastien Montagne
c79c48cc93 Fix T40930: Add a new option to select faces by smooth/flat shading.
Org code by robschia (Roberto Schiavone), first review by campbellbarton (Campbell Barton),
final review and minor changes by mont29 (Bastien Montagne).

Reviewers: cambellbarton, mont29

Subscribers: mont29, campbellbarton

Maniphest Tasks: T40930

Differential Revision: https://developer.blender.org/D638
2014-12-28 19:08:43 +01:00
Bastien Montagne
58ea1639da Cleanup: no need for hacks here, RNA allows for real read-only props, and if you define
a getter func, it won't rely on any DNA member either...
2014-12-28 18:30:33 +01:00
Campbell Barton
870941c87a Fix leak in cycles-bake 2014-12-28 16:00:08 +11:00
Campbell Barton
cadcb12292 Fix leak in select-similar regions 2014-12-28 16:00:08 +11:00
Campbell Barton
9686d3005c Fix buffer overrun calculating unique names 2014-12-28 16:00:08 +11:00
Campbell Barton
00197a668b BLI_string_utf8: add BLI_strncpy_utf8_rlen 2014-12-28 16:00:08 +11:00
Campbell Barton
e182d43d3e cleanup: avoid ref-counting None for a new matrix 2014-12-28 15:13:01 +11:00
Bastien Montagne
2b226d9578 Fix a very stupid memleak in own bpy_app_translations.c code...
Safe for 2.73.
2014-12-27 17:24:39 +01:00
Joshua Leung
155bb058f4 GPencil UI: Color swatches for both Stroke and Fill colors are now shown
The layers list and the Dopesheet channels now show color swatches for both the
stroke and fill colours now. This is useful when you've got layers that only
use either/or.

* Currently, these only get shown if the relevant opacity setting is high enough
  for that aspect to contribute to the result.

* The sizing of these items could do with some more tweaking (especially in the
  Dopesheet), as these may now be too small to accurately see and/or interact with.

* There are some potential issues when using near-gray (or actually, colours similar
  to the list backgrounds, but that issue exists in other areas of Blender anyway.


(NOTE: At this stage, these changes are still experimental, and not for 2.73 yet)
2014-12-28 03:05:11 +13:00
Joshua Leung
4ab5883766 Experimental fix for "random large dots" bug when using a stylus
Since I don't have a (pressure sensitive) tablet handy, I can't really test this
out, but apparently there is a bug which currently exists with the following description:
  "Small Dots, when you do just one click a single GP dot is created, it´s fine but don't recognize the pen pressure, always the maximum value of thickness, and
    It´s so easy create dots accidentally (even when you use the eraser, this dots appear spontaneously) and you start to have big screen-size-constant dots beside of you fine lines."

This commit just shuffles around the order of things a bit so that some of the misfiring
events might get skipped instead.
2014-12-28 03:05:10 +13:00
Joshua Leung
49052c61f8 Restoring all the whitespace! 2014-12-28 03:05:09 +13:00
Campbell Barton
01c04333f5 Fix T43034: beautify-fill leaves zero area tri's 2014-12-27 16:47:42 +11:00
Campbell Barton
8d7b2d69cf cleanup: redundant tri-normal calculation 2014-12-27 16:36:31 +11:00
Campbell Barton
5ea243bbec cleanup: knife tools, use generic sort function 2014-12-27 12:37:11 +11:00
Antony Riakiotakis
b6aa936a8b Fix typo in angle commit, noticed by Kevin Dietrich, thanks! 2014-12-27 00:10:53 +01:00
Antony Riakiotakis
eb2e4577f4 Only add a fill brush to default .blend if there isn't one already. For
some reason this happened twice here.

Likely candidate for 2.73 final
2014-12-27 00:08:58 +01:00
Antony Riakiotakis
c7c10e5e28 Brush Texture Angle Goodies:
This commit includes a few things:

* It moves the Rake and Random flags from the brush to the MTex.
* The first change allows mask textures to have independent rake
support.
* Random rotation now has an angle value that controls the width of the
effect from the rake or default angle
* Rake and Random are now supported together.
2014-12-26 23:51:27 +01:00
Antony Riakiotakis
e0cf86a9e2 Fix T43010 regression in material setting.
Caused by own fix for another display case.

Shoud be safe for 2.73 final.
2014-12-26 20:06:56 +01:00
julianeisel
fd47202043 GPencil: Picky whitespace cleanup 2014-12-26 20:00:52 +01:00
Antony Riakiotakis
3253ed9e26 Put editor initialization before python.
Initially it was moved to allow setting keymaps of python defined menus
in C but looks like it breaks macro definition in python.

Thanks to Julian for tracking this down. It should fix T42485
2014-12-26 19:14:01 +01:00
julianeisel
6339ba1ee2 Fix T42977: Weights failed to display in Wireframe mode when using Face Select
D948, reviewed by @mont29 (thanks for that)
2014-12-26 16:53:40 +01:00
julianeisel
da78d2d742 GPencil: Use a different brush cursor for eraser
D783 with minor edits to increase contrast
2014-12-26 16:38:51 +01:00
Bastien Montagne
cf178f71ac Fix T42641, Graphical fragments showing on Blender 2.71 and higher when baking.
Safe for 2.73...

This revert rB9b0ab890676790bb1e8e77797629b889ea66f69e - needed to set that threshold to a small
negative value to remove the last artefacts reported in T39735, but now I could not reproduce
any with the previous 0.0f value, so restoring it for the time being.

If this 'shadowed neighbor face' case re-appears, we can always choose a value in-between, like -1e-18f...
2014-12-26 13:00:36 +01:00
Campbell Barton
2b595579e3 Fix T43013: Flip with bridge aligned loops 2014-12-26 20:22:21 +11:00
Campbell Barton
53ec177b7f optimize interp_weights_poly_v2, v3
use line_point_factor instead of length between vertices.
2014-12-26 08:46:48 +11:00
Campbell Barton
f84defa9c0 optimize interp_weights_poly_v2, v3
halve sqrtf calls per per polygon corner.
2014-12-26 08:46:48 +11:00
Campbell Barton
445e50fd1e cleanup: use cross_tri_v2 when area isn't needed. 2014-12-26 08:46:48 +11:00