Commit Graph

36372 Commits

Author SHA1 Message Date
Ton Roosendaal
6740b4f73a Matcap fix: on enabling it, and when no matcap was selected before,
it sets first matcap icon.
2013-01-22 18:36:11 +00:00
Sergey Sharybin
78f5d531a4 Fix/workaround for GLSL textured and matcap modes for dyntopo
Currently used special checks in DM draw code, perhaps better would be
simply to flush changes from PBVH to DM.

Anyway, now things seems to be working OK, will check on better solution
from code point of view later.
2013-01-22 16:06:09 +00:00
Ton Roosendaal
e7ed4605eb Bugfix #33945
OSX: in HiDPI mode, the brush circle doubled on every use.
Was caused by new code storing and setting brush sizes.
2013-01-22 15:30:29 +00:00
Bastien Montagne
711c0e4fdd Fix [#33962] Grease Pencil crashing blender
Own fault from grease pencil to curve enhacement. Fixed the bug itself, and made poll of convert operator more strict (no only active when there is something to convert, i.e. at least one stroke!).
2013-01-22 15:22:46 +00:00
Bastien Montagne
63edcf785e Fix for build with scons whithout i18n support.
This should not be needed, I really see no reason for this linking error, but I'd rather use this hack than wasting more time over this issue. When will we get rid of this "two build systems to maintain" time-wasting situation?
2013-01-22 14:55:34 +00:00
Campbell Barton
24f858016a add path for particle brush 2013-01-22 13:47:44 +00:00
Campbell Barton
0f108dede6 style cleanup 2013-01-22 13:35:02 +00:00
Ton Roosendaal
61bb1a3b50 Matcap fix:
Setting Cycles as render engine skipped matcap drawing.
Logic for checking drawing types needed a shuffle.
2013-01-22 12:36:06 +00:00
Antony Riakiotakis
90d92ea7fc Good rule of thumb. If blenderplayer gets broken after stubs.c leaves my "recently opened" menu on my editor, something is really wrong :) 2013-01-22 12:32:07 +00:00
Campbell Barton
1a28b8828f add missing includes 2013-01-22 11:27:22 +00:00
Campbell Barton
3406bafc59 comments for RNA_def_property_ui_range() and clamp some out-of-range values. 2013-01-22 11:23:05 +00:00
Ton Roosendaal
e11d22a6b7 Matcap support in 3D Viewport.
Full log is here:
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.66/Usability#Matcap_in_3D_viewport

Implementation notes:

- Matcaps are an extension of Solid draw mode, and don't show in other drawmodes.
  (It's mostly intended to aid modeling/sculpt)

- By design, Matcaps are a UI feature, and only stored locally for the UI itself, and
  won't affect rendering or materials.

- Currently a set of 16 (GPL licensed) Matcaps have been compiled into Blender. 
  It doesn't take memory or cpu time, until you use it.

- Brush Icons and Matcaps use same code now, and only get generated/allocated on
  actually using it (instead of on startup).

- The current set might get new or different images still, based on user feedback.

- Matcap images are 512x512 pixels, so each image takes 1 Mb memory. Unused matcaps get 
  freed immediately. The Matcap icon previews (128x128 pixels) stay in memory.

- Loading own matcap image files will be added later. That needs design and code work 
  to get it stable and memory-friendly.

- The GLSL code uses the ID PreviewImage for matcaps. I tested it using the existing
  Material previews, which has its limits... especially for textured previews the
  normal-mapped matcap won't look good.
2013-01-22 11:18:41 +00:00
Campbell Barton
1e3a2931ac fix [#33889] Unexpected weights after parenting with Empty Groups
out of range dvert's are now cleared before adding new-empty groups.
2013-01-22 10:51:57 +00:00
Sergey Sharybin
193df0f5a0 Fix #33951: Only margin is correctly baked for non-displacement baking
Was own mistake in recent changes.
2013-01-22 09:37:46 +00:00
Sergey Sharybin
95a13a2c02 Fix projection texture painting crash
It was caused by own mistake by not noticing externtex is used not
only by render engine. Now this function uses pool passed as argument
rather than using R.pool.
2013-01-22 08:05:00 +00:00
Campbell Barton
ee4e5da300 update stub 2013-01-22 06:55:15 +00:00
Campbell Barton
97d8e34d61 correct addon tutorial section on keymap register/unregister and add label next to image color-depth option.
having buttons labelled [8, 16] on their own is not very meaningful.
2013-01-22 06:41:12 +00:00
Campbell Barton
761b380b84 fix [#33841] Disabling and re-enabling live addon crashes blender (modal/draw handler) 2013-01-22 06:16:49 +00:00
Campbell Barton
d1a211188b property change reporting now uses the context again, rather then checking a dir() on context, hard-code common paths.
eg:
  bpy.context.scene.render.resolution_x = 1921
  bpy.context.object.data.use_auto_smooth = True
  bpy.context.object.active_material.diffuse_intensity = 1
  bpy.context.scene.world.exposure = 0.1

also remove duplicate GS() defines
2013-01-22 04:24:01 +00:00
Campbell Barton
043e1536e5 add rna paths to toolsettings and its substructs, useful for python scripting. 2013-01-22 03:11:11 +00:00
Campbell Barton
2cd25f4cf5 fix [#33836] issuing bpy.ops.render.render() in console crashes the program
don't check the event queue from threads, assert if this happens in future.
2013-01-22 02:21:21 +00:00
Alexander Pinzon
044e3398b9 Improved performance for multiple iterations, keeping the same laplacian matrix. 2013-01-21 19:33:58 +00:00
Campbell Barton
d760a86927 code cleanup: minor changes, replace len_v3 with len_squared_v3 for comparison. 2013-01-21 18:45:31 +00:00
Sergey Sharybin
709a86a8d9 Multires baker: fix wrong normalization if baking happens to multiple images
Previously normalization will happen per image buffer individually, which
was wrong in cases different faces of the sane mesh uses different images.

Also solved possible threading issues when calculating min.max displacement.
2013-01-21 18:34:27 +00:00
Sergey Sharybin
effaa79ffb Multires baker: fix bad face->grid index conversion for displacement baker 2013-01-21 18:34:20 +00:00
Sergey Sharybin
64c85d89dd Multires baker: fix memory leak caused by threading issues
Didn't notice this before because of non-working guarded allocation
at the time threading was added to multires baker.
2013-01-21 18:34:14 +00:00
Howard Trickey
698aeec8b8 Vertex bevel: adjust vertex positions to make a more rounded pattern.
Also fixed debug quad drawing code to not join successive quads.
2013-01-21 18:19:34 +00:00
Jens Verwiebe
8954c99095 Fix compile with collada enabled 2013-01-21 17:38:11 +00:00
Campbell Barton
78405a89c8 fix [#33937] Planar decimate + triangulate operator leaves non-triangle faces
triangulate operation will now always triangulate, even on degenerate faces.
2013-01-21 17:25:08 +00:00
Campbell Barton
8cde4e5182 add an influence slider to mesh cache. 2013-01-21 16:43:04 +00:00
Bastien Montagne
bcdbc57994 Usual minor UI messages fixes... 2013-01-21 16:25:25 +00:00
Campbell Barton
caac27dcbc mesh-cache deform modifier,
supports MDD and PC2 formats.

see wiki docs:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Modifiers/Deform/Mesh_Cache
2013-01-21 15:41:00 +00:00
Bastien Montagne
4c0ebedc66 On second thought, exposes bpy.app.translations also when built without i18n support, this will avoid the need for py scripts to test for its presence everywhere! 2013-01-21 15:10:22 +00:00
Bastien Montagne
95758cf2cf Fix building for new collada... 2013-01-21 14:00:01 +00:00
Gaia Clary
c263753d17 Added gsoc-2012 collada improvements from bratwurst branch 2013-01-21 13:45:49 +00:00
Howard Trickey
7d286d9a80 Bevel vertex: fix rebuild of faces so they are connected when seg > 1. 2013-01-21 13:31:16 +00:00
Sergey Sharybin
e224996f3d Avoid using python keyword as operator property name 2013-01-21 12:44:40 +00:00
Bastien Montagne
e0063bd74f Print warnings when invalid py dict/key/value is found in translations data (do not error here, this is not critical and can be ignored/skiped, and it would break translations for other addons as well). 2013-01-21 12:01:47 +00:00
Sergey Sharybin
8380646798 Fix image pool crash when acquiring buffer for NULL image 2013-01-21 11:38:15 +00:00
Bastien Montagne
57221e13ee Expose locale_explode in bpy.app.translations, will be handy in i18n manipulation scripts/addons. 2013-01-21 10:57:24 +00:00
Bastien Montagne
3aa499f3f7 I18n fix: "" context is not the same as NULL context!
This bug did not appear earlier because the "" default context was actually never used, always NULL context was passed instead. But bpy.app.translations uses "" as default context in its keys (simplifies the hash/comp functions of internal py messages cache)...

So now, Blender prefers NULL (None in python) as default context value, but understands also "" as such.
2013-01-21 10:52:34 +00:00
Bastien Montagne
a679f6399f Fixes to BLF_locale_explode, was not handling all cases correctly (own fault) :/ 2013-01-21 10:46:01 +00:00
Campbell Barton
88dd983f3c fix regression in own recent commit, vertex flags were left uninitialized. 2013-01-21 09:54:33 +00:00
Sergey Sharybin
04affbe80e Support normalized displacement maps in cases maximal distance is not set
This will calculate maximal distance automatically and normalize displacement
to it. Before this change normalization will not happen at all in cases max
distance is not set manually.

This affects on "regular" baker only, there are still some fixes to come for
multiresolution baker, but that could be solved separately.
2013-01-21 09:05:05 +00:00
Sergey Sharybin
86991fbcb0 Fixed render time regression in Blender Internal
It was caused by image threading safe commit and it was noticeable
only on really multi-core CPU (like dual-socket Xeon stations), was
not visible on core i7 machine.

The reason of slowdown was spinlock around image buffer referencing,
which lead to lots of cores waiting for single core and using image
buffer after it was referenced was not so much longer than doing
reference itself.

The most clear solution here seemed to be introducing Image Pool
which will contain list of loaded and referenced image buffers, so
all threads could skip lock if the pool is used for reading only.
Lock only needed in cases when buffer for requested image user is
missing in the pool. This lock will happen only once per image so
overall amount of locks is much less that it was before.

To operate with pool:
- BKE_image_pool_new() creates new pool
- BKE_image_pool_free() destroys pool and dereferences all image
  buffers which were loaded to it
- BKE_image_pool_acquire_ibuf() returns image buffer for given
  image and user. Pool could be NULL and in this case fallback to
  BKE_image_acquire_ibuf will happen.

  This helps to avoid lots to if(poll) checks in image sampling
  code.

- BKE_image_pool_release_ibuf releases image buffer. In fact, it
  will only do something if pool is NULL, in all other case it'll
  equal to DoNothing operation.
2013-01-21 08:49:42 +00:00
Bastien Montagne
2b9ab8781d Various cleanup in i18n code (having funcs implemented in two different places is tricky, you quickly forget to add/edit one, we already have this problem with ugly bplayer stub... e.g. since r53938, BLF_locale_explode was not implemented in non-WITH_INTERNATIONAL builds). Also tried to simplify #ifdef's here... 2013-01-21 08:08:20 +00:00
Joshua Leung
40629671f4 Style cleanup 2013-01-21 06:32:09 +00:00
Joshua Leung
bfa065f10c Bugfix [#33852] Scale of a strip in NLA is changed after moving it long distance
using numeric input

When using numeric input to move strips, the strip extent clamping code could
end up prematurely truncating one endpoint. This was because the clamping code
uses the values of the other end (e.g. end for start, and start for end) as one
of the limits on its allowable range to prevent inverted strips.

Now we just set these values twice - the first time, one of the endpoints may
still get truncated (while the other one will be able to go to its correct
value), then the second time both will get set correctly (and validated too).
2013-01-21 06:31:17 +00:00
Joshua Leung
73a68c95a4 Fix compiling problems with translation stuff disabled 2013-01-21 05:42:19 +00:00
Campbell Barton
aa6374dc0a fix for own error in vertex slide, isolated verts mixed with regular selection would crash. 2013-01-21 03:00:10 +00:00