8 years agoremove type checks on drawing uiList's,
Campbell Barton [Fri, 28 Dec 2012 10:45:59 +0000 (10:45 +0000)]
remove type checks on drawing uiList's,

if the list is given the wrong item then the script needs to be fixed, better not fail silently.

left in checks as commented out asserts.

8 years agoYesterday's memory free error fix in IMB_onehalf was wrong, it should
Ton Roosendaal [Fri, 28 Dec 2012 10:38:07 +0000 (10:38 +0000)]
Yesterday's memory free error fix in IMB_onehalf was wrong, it should
be fixed in the icons code!

8 years agoadd missing free for ui lists
Campbell Barton [Fri, 28 Dec 2012 10:36:25 +0000 (10:36 +0000)]
add missing free for ui lists

8 years agostyle cleanup: var naming for ui list
Campbell Barton [Fri, 28 Dec 2012 10:32:49 +0000 (10:32 +0000)]
style cleanup: var naming for ui list

8 years agofix for memory leaks in own recent changes.
Campbell Barton [Fri, 28 Dec 2012 10:23:06 +0000 (10:23 +0000)]
fix for memory leaks in own recent changes.

8 years agorevert r53356, this stopped the leak but still wasn't working nice.
Campbell Barton [Fri, 28 Dec 2012 10:08:17 +0000 (10:08 +0000)]
revert r53356, this stopped the leak but still wasn't working nice.

Add asserts when CTX_data_pointer_get/CTX_data_collection_get are incorrectly used.

disable context inspection for now, Will enable again when its working properly.

8 years agoThe new feature printing changed properties in python history list didn't free
Ton Roosendaal [Fri, 28 Dec 2012 09:48:35 +0000 (09:48 +0000)]
The new feature printing changed properties in python history list didn't free
a list of context properties. Give lots of leaked small blocks...

8 years agoThis commit frees list ui items from their dependencies to Panel, and hence from...
Bastien Montagne [Fri, 28 Dec 2012 09:20:16 +0000 (09:20 +0000)]
This commit frees list ui items from their dependencies to Panel, and hence from all the limitations this implied (mostly, the "only one list per panel" one).

It introduces a new (py-extendable and registrable) RNA type, UIList (roughly similar to Panel one), which currently contains only "standard" list's scroll pos and size (but may be expended to include e.g. some filtering data, etc.). This now makes lists completely independent from Panels!

This UIList has a draw_item callback which allows to customize items' drawing from python, that all addons can now use. Incidentally, this also greatly simplifies the C code of this widget, as we do not code any "special case" here anymore!

To make all this work, other changes were also necessary:

* Now all buttons (uiBut struct) have a 'custom_data' void pointer, used currently to store the uiList struct associated with a given uiLayoutListBox.

* DynamicPaintSurface now exposes a new bool, use_color_preview (readonly), saying whether that surface has some 3D view preview data or not.

* UILayout class has now four new (static) functions, to get the actual icon of any RNA object (important e.g. with materials or textures), and to get an enum item's UI name, description and icon.

* UILayout's label() func now takes an optional 'icon_value' integer parameter, which if not zero will override the 'icon' one (mandatory to use "custom" icons as generated for material/texture/... previews).
  Note: not sure whether we should add that one to all UILayout's prop funcs?

Note: will update addons using template list asap.

8 years agocode cleanup:
Campbell Barton [Fri, 28 Dec 2012 09:06:48 +0000 (09:06 +0000)]
code cleanup:
- free_dverts -> BKE_defvert_array_free
- copy_dverts -> BKE_defvert_array_copy

also move the functions from BKE_mesh into BKE_deform

8 years agofix for memory leak with weight painting and ensure vertex group is created before...
Campbell Barton [Fri, 28 Dec 2012 09:00:05 +0000 (09:00 +0000)]
fix for memory leak with weight painting and ensure vertex group is created before use.

8 years agoAdd 'vertex_only' option to bevel tool.
Howard Trickey [Fri, 28 Dec 2012 02:45:10 +0000 (02:45 +0000)]
Add 'vertex_only' option to bevel tool.
Right now, changing segments to > 1 doesn't do anything,
but intend to work on making that cause rounded corners.

8 years agoremove unneeded inline lookups and fix error with wpaint_stroke_test_start returning...
Campbell Barton [Fri, 28 Dec 2012 01:36:00 +0000 (01:36 +0000)]
remove unneeded inline lookups and fix error with wpaint_stroke_test_start returning OPERATOR_PASS_THROUGH rather then a boolean.

8 years agoremove workaround for [#31555], forcing PYTHONIOENCODING was causing stdout to be...
Campbell Barton [Fri, 28 Dec 2012 00:54:22 +0000 (00:54 +0000)]
remove workaround for [#31555], forcing PYTHONIOENCODING was causing stdout to be lost on exit - no MEM_printmemlist_stats()

8 years agoBetter error report when no camera is found.
Pablo Vazquez [Thu, 27 Dec 2012 22:00:31 +0000 (22:00 +0000)]
Better error report when no camera is found.

While trying to render a RenderLayer from a linked scene, I couldnt tell why it wasnt doing anything. It just stopped rendering. Until I look on the console and see the No Camera print.

This commit replaces the simple terminal printf with an actual error report, that shows in both terminal and to the user:

I believe this commit is pretty harmless, and only adds functionality. But feel free to remove it.

8 years agoOutliner fix:
Ton Roosendaal [Thu, 27 Dec 2012 19:07:16 +0000 (19:07 +0000)]
Outliner fix:

New "Blender file" viewer now shows names of libraries better.

8 years agoFunction IMB_onehalf was not freeing memory.
Ton Roosendaal [Thu, 27 Dec 2012 17:15:45 +0000 (17:15 +0000)]
Function IMB_onehalf was not freeing memory.
(Used for icon mipmap)

8 years agoFix in previous commit: forgot to free data from file reading.
Ton Roosendaal [Thu, 27 Dec 2012 17:09:27 +0000 (17:09 +0000)]
Fix in previous commit: forgot to free data from file reading.

(Campbell: we want the memory prints back!!!)

8 years agoBug fix, own collection.
Ton Roosendaal [Thu, 27 Dec 2012 15:55:37 +0000 (15:55 +0000)]
Bug fix, own collection.

"Add Group" was excluding linked library objects.

8 years agoNew features!
Ton Roosendaal [Thu, 27 Dec 2012 15:07:19 +0000 (15:07 +0000)]
New features!

- Packing .blend files

If you work a lot with dynamic linked .blend files ("Libraries"), it's always hard to
share your work with others (or for bug reports!).
This new option packs all used external .blend files, and - on save - combines it together
in one .blend file. You can save that file on any location.

Loading a packed .blend file then loads all library data usual - not editable.

Just use unpack to save out all linked .blend files. This will only save out the files
according the directory structure as was used on linking - relative to the current .blend.
It will create new directories, so be careful with unpacking when relative paths go up.

This feature also works fine for linked compressed .blend files.

It also works for many levels deep linked .blend hierarchies.

Access is hidden for now - I need to get some people to give it serious testing first.
You can find the options via spacebar search (try pack or unpack).

- Packed data and Undo

Now all packed data is excluded from the Undo buffer storage. Keeps undo memory smaller
and makes faster redo possible.

8 years agovalidate operator names on startup (debug mode only)
Campbell Barton [Thu, 27 Dec 2012 12:40:02 +0000 (12:40 +0000)]
validate operator names on startup (debug mode only)

8 years agouse keyword args for bmesh.update_edit_mesh(...)
Campbell Barton [Thu, 27 Dec 2012 07:27:28 +0000 (07:27 +0000)]
use keyword args for bmesh.update_edit_mesh(...)

8 years agoadd option to BLI_scanfill_calc() - BLI_SCANFILL_CALC_HOLES, gives some speedup for...
Campbell Barton [Thu, 27 Dec 2012 06:39:27 +0000 (06:39 +0000)]
add option to BLI_scanfill_calc() - BLI_SCANFILL_CALC_HOLES, gives some speedup for BMesh ngons which never have holes and ensures predictable triangle count (totvert - 2), which is needed for pre-calculating array size.

8 years agocorrection for poly_to_tri_count() when given zero poly count.
Campbell Barton [Thu, 27 Dec 2012 05:08:16 +0000 (05:08 +0000)]
correction for poly_to_tri_count() when given zero poly count.

8 years agoremove realloc's during BMEdit_RecalcTessellation(), instead use poly_to_tri_count...
Campbell Barton [Thu, 27 Dec 2012 04:18:22 +0000 (04:18 +0000)]
remove realloc's during BMEdit_RecalcTessellation(), instead use poly_to_tri_count() to calculate how many triangles are needed.

8 years agodisplay the number of tri's in object mode status, often requested feature from users...
Campbell Barton [Thu, 27 Dec 2012 03:51:45 +0000 (03:51 +0000)]
display the number of tri's in object mode status, often requested feature from users who model for realtime/game-engine output,
the total number of faces wasn't so useful and could be especially misleading with ngons.

8 years agoFix: edge uv stitch mode did not average final position of uvs in
Antony Riakiotakis [Thu, 27 Dec 2012 03:14:11 +0000 (03:14 +0000)]
Fix: edge uv stitch mode did not average final position of uvs in
midpoint, non-snapping mode.

8 years agoFix: rotation of uv islands during stitch did not take uv aspect ratio
Antony Riakiotakis [Thu, 27 Dec 2012 02:52:45 +0000 (02:52 +0000)]
Fix: rotation of uv islands during stitch did not take uv aspect ratio
of image into account, distorting the islands. Now properly scale the
components before rotating the island.

8 years agofix [#33651] Spin tool destroys unselected loose vertex
Campbell Barton [Thu, 27 Dec 2012 01:02:32 +0000 (01:02 +0000)]
fix [#33651] Spin tool destroys unselected loose vertex

bmesh.ops.extrude_face_region() didn't check for isolated verts (not connected to geometry), and removed them, happened for Ctrl+LMB extrude too.

8 years agoFix part of #33662: cycles crash using displacement on meshes with vertices not
Brecht Van Lommel [Wed, 26 Dec 2012 20:59:35 +0000 (20:59 +0000)]
Fix part of #33662: cycles crash using displacement on meshes with vertices not
attached to any face.

8 years agoFix: after multires baking, gpu textures were not getting invalidated
Antony Riakiotakis [Wed, 26 Dec 2012 20:38:20 +0000 (20:38 +0000)]
Fix: after multires baking, gpu textures were not getting invalidated
for images and viewport was not getting refreshed with new baked
textures. Now made sure this happens. The image list is copied to the
job custom data so that the custom data cleanup function can properly
delete them (if gpu image texture deletion does not happen on main
thread, image bindcodes will remain intact for original images)

8 years agoBugfix #33667
Ton Roosendaal [Wed, 26 Dec 2012 17:36:51 +0000 (17:36 +0000)]
Bugfix #33667

Mesh had invalid face indices (number too high).
On Separate in Edit Mode it crashed.

Two fixes:

- The Material properties viewer just showed the last material in the index array.
  Now it shows nothing, to indicate it's an invalid selected material.

- Crash was caused by array copy magic, not checking the active index properly.

(No assert, no warning prints, I think cases like this can happen too easily, and this
way user gets notified nicely and can fix it).

8 years agoTodo item:
Ton Roosendaal [Wed, 26 Dec 2012 16:24:50 +0000 (16:24 +0000)]
Todo item:

- Drop group into 3d window now puts itself at mouse cursor location.
- Drop objects into 3d window now doesn't move the 3d cursor anymore.

Added new function ED_view3d_cursor3d_position() to handle this,
so the temporarily object-drop operator macro also could go away.
(Which was setting 3d cursor)

8 years agoBug fix #33673
Ton Roosendaal [Wed, 26 Dec 2012 14:22:04 +0000 (14:22 +0000)]
Bug fix #33673

Edge length display in standard files (1 blender unit == 1) only gave two
numbers precision for lengths > 1. Three is much nicer at least.

The guess-work here in the code remains a bit dubious :)

8 years agoBug fix #33633 (and irc report)
Ton Roosendaal [Wed, 26 Dec 2012 13:57:07 +0000 (13:57 +0000)]
Bug fix #33633 (and irc report)

The function ui_popup_block_clip() didn't correct the buttons if a clip
happened, causing the items to draw outside.

8 years agoNode editor: remove option to show overlapping Property region.
Ton Roosendaal [Wed, 26 Dec 2012 13:25:13 +0000 (13:25 +0000)]
Node editor: remove option to show overlapping Property region.

- The main window has sliders, which was drawn behind the region
- If property region had slider too, it got even worse.

Basically the node editor is UI view, so drawing another UI on top isn't
functioning well in general.

8 years agoRegion scrollbar fix!
Ton Roosendaal [Wed, 26 Dec 2012 13:05:39 +0000 (13:05 +0000)]
Region scrollbar fix!

Now scrollbars correctly hide and show, making space for the actual contents
in a region. It solves several old hacks, and puts view2d code a bit more
back in control as well.

Implementation notes:

- The view2d mask feature is working again
- The #define V2D_SCROLL_HORIZONTAL_HIDE means: "turn on hiding".
- Code for UI_view2d_region_reinit() is enforcing better standard view settings

But... two hack/patches needed to be added:

- Region panel drawing: if after generating the button panels it appears
  a scroller hides or reveils, it calls all the generating code again.
  (a simple scale doesn't work due to rounding differences in layout code)

- View2d code that maps 'tot' and 'cur' rects: if this code detects that
  the mask changes, it calcs the map code again.

Also a bugfix (issue in 2.65)

- The left/bottom area split widget was drawing 1 pixel too large sometimes,
  leaving bad trails on moving area dividers.

8 years agoBGE: Don't set the character controller's gravity when creating the controller. The...
Mitchell Stokes [Wed, 26 Dec 2012 01:50:01 +0000 (01:50 +0000)]
BGE: Don't set the character controller's gravity when creating the controller. The default from Bullet works much better than what we were using.

8 years agoBGE: Adding a maxJumps to the character controller to adjust how many jumps a charact...
Mitchell Stokes [Wed, 26 Dec 2012 01:25:53 +0000 (01:25 +0000)]
BGE: Adding a maxJumps to the character controller to adjust how many jumps a character can perform before having to touch the ground. By default this is set to 1, which means a character can only jump once before having to touch the ground again. Setting this to 2 allows for double jumping.

8 years agomake weight paint respect box & near clipping.
Campbell Barton [Tue, 25 Dec 2012 14:09:51 +0000 (14:09 +0000)]
make weight paint respect box & near clipping.

also replace strncmp with BLI_path_ncmp for BLI_rebase_path, (so its case insensitive on windows)

8 years agoweight paint without depth buffer option, works with vertex selection mode.
Campbell Barton [Tue, 25 Dec 2012 14:03:28 +0000 (14:03 +0000)]
weight paint without depth buffer option, works with vertex selection mode.

8 years agoBGE: Some various tweaks to try and get async lib loading to be a bit more stable...
Mitchell Stokes [Tue, 25 Dec 2012 08:11:21 +0000 (08:11 +0000)]
BGE: Some various tweaks to try and get async lib loading to be a bit more stable on more complex scenes.

8 years agoBGE: Committing SolarLune's patch to allow a minimum shadow buffer size of 128 (down...
Mitchell Stokes [Tue, 25 Dec 2012 06:31:42 +0000 (06:31 +0000)]
BGE: Committing SolarLune's patch to allow a minimum shadow buffer size of 128 (down from 512).

8 years agoBGE: Fixing an assert with the canvas' GetViewPort(). bf_gpu was changing the viewpor...
Mitchell Stokes [Tue, 25 Dec 2012 06:20:50 +0000 (06:20 +0000)]
BGE: Fixing an assert with the canvas' GetViewPort(). bf_gpu was changing the viewport when handling shadow buffers. KX_LightObject::BindShadowBuffer() now updates the canvas with the new viewport information from bf_gpu.

8 years agoWe now have some Catalan, but no Amharic nor Estonian yet!
Bastien Montagne [Mon, 24 Dec 2012 17:55:00 +0000 (17:55 +0000)]
We now have some Catalan, but no Amharic nor Estonian yet!

8 years agoUsual minor UI messages tweaks...
Bastien Montagne [Mon, 24 Dec 2012 17:40:47 +0000 (17:40 +0000)]
Usual minor UI messages tweaks...

8 years agoLooks like I forgot to cleanup that file when we switched to dynamic i18n languages.
Bastien Montagne [Mon, 24 Dec 2012 17:32:38 +0000 (17:32 +0000)]
Looks like I forgot to cleanup that file when we switched to dynamic i18n languages.

8 years agoSeparate image input and sequencer's color spaces in the UI
Sergey Sharybin [Mon, 24 Dec 2012 15:51:27 +0000 (15:51 +0000)]
Separate image input and sequencer's color spaces in the UI

This two things were using the same DNA and RNA structures because
internally they're completely the same. However, that was confusing
from the interface point of view.

Now it should be much more clear what's going on there.

8 years agocode cleanup: don't alloca zero size and remove paranoid NULL checks (checked all...
Campbell Barton [Mon, 24 Dec 2012 14:59:15 +0000 (14:59 +0000)]
code cleanup: don't alloca zero size and remove paranoid NULL checks (checked all uses and there not needed).

8 years agofix possible bug with ui_item_fit() causing uninitialized variable use.
Campbell Barton [Mon, 24 Dec 2012 14:21:14 +0000 (14:21 +0000)]
fix possible bug with ui_item_fit() causing uninitialized variable use.

8 years agoFix #33650: Compositor locks up when input is an unrendered render layer.
Sergey Sharybin [Mon, 24 Dec 2012 13:33:47 +0000 (13:33 +0000)]
Fix #33650: Compositor locks up when input is an unrendered render layer.

Issue was caused by resolution detecting which assumed zero resolution is
undefined one and should be re-evaluated. It doesn't work in cases when
there's a missing input, causing lots of unneeded resolution re-calculation.

It wasn't so much issue in average sized node trees, but it was a real
problem in generated tree from the report.

Currently used pretty simple solution which added a boolean flag to the
node operation which signal whether resolution was ever set or not.

There're probably smarter solutions here but can not think about them.

8 years agoBGE: "Fix" for issue [#33663] "Objects Share Materials / Textures When Grouped In...
Mitchell Stokes [Mon, 24 Dec 2012 03:13:53 +0000 (03:13 +0000)]
BGE: "Fix" for issue [#33663] "Objects Share Materials / Textures When Grouped In SingleTexture / MultiTexture Mode" reported by Josiah Lane (solarlune).

This commit adds a UI option in the Render properties to enable the new material caching in the converter. This caching can cause problems with Singletexture and Multitexture materials when texface is being used to handle materials. By default this option is enabled and users with broken games have two options:

  1) Fix up their materials so they are properly using textures
  2) Disable the material caching and take a speed hit during conversion time

Regardless of the setting, caching is always enabled for GLSL materials.

8 years agoBGE: Use canvas->SetViewPort() instead of glViewport() in the 2D filter.
Mitchell Stokes [Mon, 24 Dec 2012 02:59:16 +0000 (02:59 +0000)]
BGE: Use canvas->SetViewPort() instead of glViewport() in the 2D filter.

8 years agoUser Interface / Preferences:
Thomas Dinges [Mon, 24 Dec 2012 00:29:24 +0000 (00:29 +0000)]
User Interface / Preferences:
* Added a new "Text Style" area into the theme section, with settings to control font kerning, shadow size, color and offset.

8 years agoflip lines to reduce odds of re-execution (non critical race condition when triangles...
Morten Mikkelsen [Sun, 23 Dec 2012 18:58:10 +0000 (18:58 +0000)]
flip lines to reduce odds of re-execution (non critical race condition when triangles overlap

8 years agoPatch for weirdo library recursive linking errors:
Ton Roosendaal [Sun, 23 Dec 2012 18:41:00 +0000 (18:41 +0000)]
Patch for weirdo library recursive linking errors:

In case you accidentally link data in a library file from the main file, Blender would crash.
Now it survives, giving error messages to tell what to fix.

8 years agocode cleanup
Campbell Barton [Sun, 23 Dec 2012 16:09:26 +0000 (16:09 +0000)]
code cleanup

8 years agofix for use of uninitialized variable with ui_handler_region_menu.
Campbell Barton [Sun, 23 Dec 2012 16:08:02 +0000 (16:08 +0000)]
fix for use of uninitialized variable with ui_handler_region_menu.

8 years agoCompilation fix for collada
Sergey Sharybin [Sun, 23 Dec 2012 14:34:10 +0000 (14:34 +0000)]
Compilation fix for collada

8 years agoFix cycles displacement not working well with OSL and multiple objects.
Brecht Van Lommel [Sun, 23 Dec 2012 14:29:43 +0000 (14:29 +0000)]
Fix cycles displacement not working well with OSL and multiple objects.

8 years agoAdd keying "options" parameter to keyframe_insert() bpy_rna function, so now you...
Bastien Montagne [Sun, 23 Dec 2012 13:58:42 +0000 (13:58 +0000)]
Add keying "options" parameter to keyframe_insert() bpy_rna function, so now you can enable 'INSERTKEY_NEEDED', 'INSERTKEY_VISUAL' and/or 'INSERTKEY_XYZ_TO_RGB' when you directly key some property from python script (previously those options were only available through keyingsets).

Thanks to Campbell for review!

8 years agoAdded support of J2K codec for Jpeg2000 writing
Sergey Sharybin [Sun, 23 Dec 2012 13:57:09 +0000 (13:57 +0000)]
Added support of J2K codec for Jpeg2000 writing

This codec is absolutely needed to generate DCP using OpenDCP,
before that external application to convert JP2 to J2K was used
which slowed down export a lot.

New codec is exposed to image format settings panel and called
Codec. Default one is JP2 which creates files with .jp2 extension,
new one is called J2K which creates with .j2c extension.

Other changes:
- Fixed avi jpeg warning which was treating as error here.
- Made it so extension is detecting from ImageFormatData instead
  of image file type, which makes it possible to have different
  extension for the same file type depending on it's settings.

  IRIS format should still be changed (depending on number of
  channels it'll be .bw, .rgb or .rgba extension)

- Default image format settings would be set from image buffer
  when re-saving it. Makes it possible to easily open .j2c file
  and save it using J2K codec (without this change it'll save as
  .jp2 using JP2 codec)

8 years agoBug fix (own collection)
Ton Roosendaal [Sun, 23 Dec 2012 13:02:38 +0000 (13:02 +0000)]
Bug fix (own collection)

Icons in search menus were not drawing on the right location when UI panels were zoomed in large.
Not very common, but annoying. (DPI setting worked fine)

8 years agoCycles: deal a bit better with errors when CUDA runs out of memory, try to avoid...
Brecht Van Lommel [Sun, 23 Dec 2012 12:53:58 +0000 (12:53 +0000)]
Cycles: deal a bit better with errors when CUDA runs out of memory, try to avoid crashes.

8 years agoFix #33641: cycles self intersection artifacts with motion blur and one of the
Brecht Van Lommel [Sun, 23 Dec 2012 12:52:10 +0000 (12:52 +0000)]
Fix #33641: cycles self intersection artifacts with motion blur and one of the
X/Y/Z coordinates close to 0.

8 years agoCode cleanup: add usual 'BKE_' prefix to 'public' constraint functions from blenkernel...
Bastien Montagne [Sun, 23 Dec 2012 11:31:15 +0000 (11:31 +0000)]
Code cleanup: add usual 'BKE_' prefix to 'public' constraint functions from blenkernel...

8 years agoAdding Scale Visual keying (and de-duplicated part of the code returning visual value...
Bastien Montagne [Sun, 23 Dec 2012 10:51:48 +0000 (10:51 +0000)]
Adding Scale Visual keying (and de-duplicated part of the code returning visual values to key).

8 years agofix for bug where weight paint would draw hidden faces but not draw then with the...
Campbell Barton [Sun, 23 Dec 2012 08:20:44 +0000 (08:20 +0000)]
fix for bug where weight paint would draw hidden faces but not draw then with the backbuffer (depth selection).

8 years agoadd zbuf/depth option to weight paint border & circle select
Campbell Barton [Sun, 23 Dec 2012 07:30:48 +0000 (07:30 +0000)]
add zbuf/depth option to weight paint border & circle select

8 years agoadd zbuf/depth option to weight paint lasso select.
Campbell Barton [Sun, 23 Dec 2012 03:04:19 +0000 (03:04 +0000)]
add zbuf/depth option to weight paint lasso select.

8 years agouse foreachMappedVert for ED_mesh_pick_vert()
Campbell Barton [Sun, 23 Dec 2012 02:32:03 +0000 (02:32 +0000)]
use foreachMappedVert for ED_mesh_pick_vert()

8 years agominor speedup ED_mesh_pick_vert, ED_mesh_pick_face_vert
Campbell Barton [Sun, 23 Dec 2012 02:04:38 +0000 (02:04 +0000)]
minor speedup ED_mesh_pick_vert, ED_mesh_pick_face_vert
avoid matrix multiply, use len_manhattan_v2v2

8 years agoinitial support for 'occlude background geometry' in weight paint mode.
Campbell Barton [Sun, 23 Dec 2012 01:54:11 +0000 (01:54 +0000)]
initial support for 'occlude background geometry' in weight paint mode.

Only support mouse vertex select at the moment.

8 years agostyle cleanup: wrap long lines (>200)
Campbell Barton [Sun, 23 Dec 2012 01:18:35 +0000 (01:18 +0000)]
style cleanup: wrap long lines (>200)

8 years agoOutliner:
Ton Roosendaal [Sat, 22 Dec 2012 18:34:17 +0000 (18:34 +0000)]

Added drag-drop support for Groups. On drop in 3d window it creates an instance.

Todo: it adds this on 3d cursor position still. The existing drop-object-duplicate operator
is a Macro - with warning. For adding on mouse-cursor position we need a better
way (new function call, just use operator option).

8 years agoChange default baking bias distance to 0.001 for new scenes
Sergey Sharybin [Sat, 22 Dec 2012 18:31:05 +0000 (18:31 +0000)]
Change default baking bias distance to 0.001 for new scenes

Would need to update startup.blend as well, but not so much familiar
with doing this nowadays.

8 years agoNew Outliner "Blender File" option: the first entry couldn't be closed/re-opened.
Ton Roosendaal [Sat, 22 Dec 2012 17:32:56 +0000 (17:32 +0000)]
New Outliner "Blender File" option: the first entry couldn't be closed/re-opened.

8 years agoReshuffled data view for Outliner.
Ton Roosendaal [Sat, 22 Dec 2012 16:49:50 +0000 (16:49 +0000)]
Reshuffled data view for Outliner.

- The new "Main Data" option is now under the category "Blender File".
- That category also displays the Linked Library files.
  (Including allows browsing what's used from this file)

Also fixed CTRL+click on names, crashed.

8 years agoCycles OSL: handle new getattribute constant folding with renderstate NULL check,
Brecht Van Lommel [Sat, 22 Dec 2012 15:15:11 +0000 (15:15 +0000)]
Cycles OSL: handle new getattribute constant folding with renderstate NULL check,
and fix #33654, distance to line segment function is not implemented but compiled
anyway, now it should give a compile error.

8 years agoBug - old code, not working for new outliner view: Click on World needed a context...
Ton Roosendaal [Sat, 22 Dec 2012 15:10:04 +0000 (15:10 +0000)]
Bug - old code, not working for new outliner view: Click on World needed a context check.

8 years agocode cleanup:
Campbell Barton [Sat, 22 Dec 2012 14:25:34 +0000 (14:25 +0000)]
code cleanup:
make vertex/weight flag names consistent

also remove unused header BLO_soundfile.h

8 years agoflush selection from vertex paint and weight paint modes when exiting, this isnt...
Campbell Barton [Sat, 22 Dec 2012 14:20:27 +0000 (14:20 +0000)]
flush selection from vertex paint and weight paint modes when exiting, this isnt fool-proof, will need more work.

8 years agoreplace RNA_ID_type_name() with BKE_idcode_to_name_plural()
Campbell Barton [Sat, 22 Dec 2012 14:04:09 +0000 (14:04 +0000)]
replace RNA_ID_type_name() with BKE_idcode_to_name_plural()

8 years agoflush selection when switching weight paint vertex/face selection modes.
Campbell Barton [Sat, 22 Dec 2012 13:42:06 +0000 (13:42 +0000)]
flush selection when switching weight paint vertex/face selection modes.

8 years agoFrom the long todo:
Ton Roosendaal [Sat, 22 Dec 2012 13:39:44 +0000 (13:39 +0000)]
From the long todo:

New Outliner mode: "Main Data".

This shows a flattened, non-hierarchical list of all linkable "ID" data in
your current project. It works fine on searches. Actually this is the
view on the "Main" database in Blender, the one that's saved in a .blend.

This is in general more useful than the "Datablocks" viewer,
which is not searchable, and shows every property of data as well.

8 years agoSmall drawing glitch, for UI with transparent overlapping regions;
Ton Roosendaal [Sat, 22 Dec 2012 11:52:53 +0000 (11:52 +0000)]
Small drawing glitch, for UI with transparent overlapping regions;

- The corner 'duplicate/merge area' widget was drawing too often.

(Added comment in subwindow 'active' code, too many redraws are being
sent on moving mouse over region eddges)

8 years agoSmall tweak in the new "Relative Parent" option for Bones that have Object-children:
Ton Roosendaal [Sat, 22 Dec 2012 11:08:25 +0000 (11:08 +0000)]
Small tweak in the new "Relative Parent" option for Bones that have Object-children:

- Transform now is relative to the bone root.

For backwards compatibility this transform was set to the tip for parenting...

Now the new parenting option uses the root, the old one still the tip.
I've noted in the code to check on a version patch, to make it consistent.

8 years agofix for using uninitialized flag in my last commit.
Campbell Barton [Sat, 22 Dec 2012 09:37:37 +0000 (09:37 +0000)]
fix for using uninitialized flag in my last commit.

8 years agoBGE: The PyGILState_Ensure() call in KX_Scene was causing a segfault in the Blenderpl...
Mitchell Stokes [Sat, 22 Dec 2012 08:59:11 +0000 (08:59 +0000)]
BGE: The PyGILState_Ensure() call in KX_Scene was causing a segfault in the Blenderplayer even when being run in the main thread. I'm removing it for now since I don't think it will really cause a problem.

8 years agocorrect own error in openmp use for BM_mesh_elem_index_ensure().
Campbell Barton [Sat, 22 Dec 2012 08:37:34 +0000 (08:37 +0000)]
correct own error in openmp use for BM_mesh_elem_index_ensure().

8 years agoWeight gradient tool for weight paint mode
Campbell Barton [Sat, 22 Dec 2012 08:19:27 +0000 (08:19 +0000)]
Weight gradient tool for weight paint mode
- blends from current weight into alpha zero.
- uses brush alpha & curve.
- respects weight paint vertex/face select modes.
- updates realtime.

Access With
- Alt+LMB (linear gradient)
- Ctrl+Alt+LMB (radial gradient)

- WM_gesture_straightline_* are used but not well suited to this task, may end up replacing with own modal operator.
- Key handling works but needs to be done better.

8 years agofunction for flushing polygon -> vert,edge selection (in object mode), currently...
Campbell Barton [Sat, 22 Dec 2012 08:13:44 +0000 (08:13 +0000)]
function for flushing polygon -> vert,edge selection (in object mode), currently unused.

8 years agoBGE: Committing async LibLoad from Swiss. This does the lib loading in a separate...
Mitchell Stokes [Sat, 22 Dec 2012 05:38:32 +0000 (05:38 +0000)]
BGE: Committing async LibLoad from Swiss. This does the lib loading in a separate thread to keep the BGE from freezing. Here is an example from the docs:

      # Print a message when an async LibLoad is done
      import bge

      def finished_cb(status):
          print("Library (%s) loaded in %.2fms." % (status.libraryName, status.timeTaken))

      bge.logic.LibLoad('myblend.blend', 'Scene', async=True).onFinish = finished_cb

LibLoad() now returns a KX_LibLoadStatus object for information on the library loading. LibNew() and LibFree() are unaffected by this commit. In other words, the async option only works for LibLoad(). Furthermore it only works for Scenes, not Actions or Meshes.

8 years agoText Editor: Gray out the Register check unless the file has .py extension. (feature...
Pablo Vazquez [Sat, 22 Dec 2012 05:04:30 +0000 (05:04 +0000)]
Text Editor: Gray out the Register check unless the file has .py extension. (feature lost since July)

8 years agocode cleanup and minor changes
Campbell Barton [Sat, 22 Dec 2012 01:08:42 +0000 (01:08 +0000)]
code cleanup and minor changes
- use DummyRNA_NULL_items to replace empty enums.
- replace calloc with malloc in copy_dverts since its copied over after.
- add wmGesture->userdata, so operators that use gestures have somewhere to store their own data (not used yet).

8 years ago"Fix" for [#33524] Interaction of "Size" & "Distance" sliders in "Spot Lamp" panel...
Bastien Montagne [Fri, 21 Dec 2012 20:25:02 +0000 (20:25 +0000)]
"Fix" for [#33524] Interaction of "Size" & "Distance" sliders in "Spot Lamp" panel with "3D view"

Simply added a dashed line materializing the center/direction of the spot, and ending at Distance from it (exactly as for the Area lamp). We already had something similar for buffered shadow spots (to materialize start/end clipping), and imho it's also quite useful to see *where* points a spot, when using wide spots!

Very easy to revert anyway.

8 years agoback to utf-8 encoding!
Bastien Montagne [Fri, 21 Dec 2012 19:20:24 +0000 (19:20 +0000)]
back to utf-8 encoding!

8 years agoBug fix #33648
Ton Roosendaal [Fri, 21 Dec 2012 19:05:52 +0000 (19:05 +0000)]
Bug fix #33648

Node location coordinate was wrapped within 10k limits, now 100k.
Go figure how large these modern node setups get :)

8 years agoAdditional fix in glsl shaders: "Darken" was using different formula as render.
Ton Roosendaal [Fri, 21 Dec 2012 18:10:01 +0000 (18:10 +0000)]
Additional fix in glsl shaders: "Darken" was using different formula as render.
"Divide" still differs too for division by zero - cannot find this yet...

8 years agoBug fix #33647
Ton Roosendaal [Fri, 21 Dec 2012 17:47:50 +0000 (17:47 +0000)]
Bug fix #33647

Particle combing didn't always respond as expected. The combed effect was
depending on the center of object in view, instead of on the center of
selected hairs. That made combing in certain close ups impossible.

Same was actually true for transform tools for hairs!

And even worse - there was an optimize break in calculating center
which wasn't true even. Causing centers for transform to fail similar
in other cases.

8 years agoBug fix, own collection:
Ton Roosendaal [Fri, 21 Dec 2012 16:11:50 +0000 (16:11 +0000)]
Bug fix, own collection:

User preference "Zoom Scale" didn't work correct for 2d views.
(was calculating center of region badly).