Commit Graph

43576 Commits

Author SHA1 Message Date
Stuart Broadfoot
e9ba345c46 New feature
Patch [#33445] - Experimental Cycles Hair Rendering (CPU only)

This patch allows hair data to be exported to cycles and introduces a new line segment primitive to render with.

The UI appears under the particle tab and there is a new hair info node available.

It is only available under the experimental feature set and for cpu rendering.
2012-12-28 14:21:30 +00:00
Campbell Barton
857df8065f style cleanup 2012-12-28 14:19:05 +00:00
Campbell Barton
ddf39a87aa code cleanup: move view3d buffer bones loop into a static function (was not breaking out of the loop when a bone was found). 2012-12-28 13:48:30 +00:00
Ton Roosendaal
6ac7ab48f4 Small fix: increased precision print of color sampling float images with 1 digit.
Now it prints 5, which shows better whether a buffer is float, or half float.
2012-12-28 13:44:44 +00:00
Bastien Montagne
c587c985e8 Fix [#33424] Inadequate bake action.
bake_action tries to make kind of a 'visual keying'... On one side, this is rather stupid when you keep constraints (in this case, keying actual loc/rot/scale transforms, i.e. matrix_basis, is enough, doing more would lead to unexpected behavior with some constraints). On the other one, making a good visual keying of bones is *really* tricky, so now using the new object's convert_space() func to compute that (when the user chooses to remove the constraints).

Incidentally, this greatly simplifies the code of bake_action!
2012-12-28 13:34:19 +00:00
Bastien Montagne
921750149b Expose BKE_constraint_mat_convertspace() as object's convert_space() func in RNA. Converting between various standard spaces (like local, pose, world, etc.) can become quite hairy (especially with bones), as we already have this code in C, let's help py devs' life.
Thanks to Campbell for the review and advices.
2012-12-28 13:21:57 +00:00
Ton Roosendaal
9f9e35c82a Bugfix #33681
Blender didn't detect properly whether event came from a mouse-wheel or
from a trackpad in OS X.

Now you can both, and both are handled independently.

Removed back hack from 2 years ago - which disabled mouse wheel for laptops.
2012-12-28 12:48:45 +00:00
Campbell Barton
c04631f0bb patch [#33669] SConstruct: Tell how to pass BF_PYTHON_INC to SCons is it is not found
from anatoly techtonik (techtonik)
2012-12-28 12:12:04 +00:00
Campbell Barton
5e4bc5a4f8 patch [#33687] select similar lamp
by Saurabh Wankhade (sauraedron), with some edits.
2012-12-28 11:24:07 +00:00
Antony Riakiotakis
6522aba615 Fix blenderplayer compilation. 2012-12-28 11:19:33 +00:00
Campbell Barton
4e88bfca1b fix [#33677] Lambda is un-settable for mesh.vertices_smooth_laplacian
lambda is python keyword.
2012-12-28 11:12:46 +00:00
Campbell Barton
d984c46701 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.
2012-12-28 10:45:59 +00:00
Ton Roosendaal
914b0aafa5 Yesterday's memory free error fix in IMB_onehalf was wrong, it should
be fixed in the icons code!
2012-12-28 10:38:07 +00:00
Campbell Barton
6061ecca0b add missing free for ui lists 2012-12-28 10:36:25 +00:00
Campbell Barton
8c00c57187 style cleanup: var naming for ui list 2012-12-28 10:32:49 +00:00
Campbell Barton
37760c0ad0 fix for memory leaks in own recent changes. 2012-12-28 10:23:06 +00:00
Campbell Barton
08fbc48ee5 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.
2012-12-28 10:08:17 +00:00
Ton Roosendaal
67b76a70bc The new feature printing changed properties in python history list didn't free
a list of context properties. Give lots of leaked small blocks...
2012-12-28 09:48:35 +00:00
Bastien Montagne
7504cf34b4 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.
2012-12-28 09:20:16 +00:00
Campbell Barton
7730ddb3d6 code cleanup:
- free_dverts -> BKE_defvert_array_free
- copy_dverts -> BKE_defvert_array_copy

also move the functions from BKE_mesh into BKE_deform
2012-12-28 09:06:48 +00:00
Campbell Barton
3f68790108 fix for memory leak with weight painting and ensure vertex group is created before use. 2012-12-28 09:00:05 +00:00
Howard Trickey
4e5d5e0d84 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.
2012-12-28 02:45:10 +00:00
Campbell Barton
1e3f98c000 remove unneeded inline lookups and fix error with wpaint_stroke_test_start returning OPERATOR_PASS_THROUGH rather then a boolean. 2012-12-28 01:36:00 +00:00
Campbell Barton
71dbd39891 remove workaround for [#31555], forcing PYTHONIOENCODING was causing stdout to be lost on exit - no MEM_printmemlist_stats() 2012-12-28 00:54:22 +00:00
Pablo Vazquez
6a0c8790d8 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:
http://pasteall.org/pic/show.php?id=42499

I believe this commit is pretty harmless, and only adds functionality. But feel free to remove it.
2012-12-27 22:00:31 +00:00
Ton Roosendaal
5a90721098 Outliner fix:
New "Blender file" viewer now shows names of libraries better.
2012-12-27 19:07:16 +00:00
Ton Roosendaal
b931d2d0cd Function IMB_onehalf was not freeing memory.
(Used for icon mipmap)
2012-12-27 17:15:45 +00:00
Ton Roosendaal
f0b872e7f1 Fix in previous commit: forgot to free data from file reading.
(Campbell: we want the memory prints back!!!)
2012-12-27 17:09:27 +00:00
Ton Roosendaal
bfcb1d4cde Bug fix, own collection.
"Add Group" was excluding linked library objects.
2012-12-27 15:55:37 +00:00
Ton Roosendaal
16411da41e 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.
2012-12-27 15:07:19 +00:00
Campbell Barton
1f4fda10ce validate operator names on startup (debug mode only) 2012-12-27 12:40:02 +00:00
Campbell Barton
daa2a0d1c3 use keyword args for bmesh.update_edit_mesh(...) 2012-12-27 07:27:28 +00:00
Campbell Barton
f0c1bc830c 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. 2012-12-27 06:39:27 +00:00
Campbell Barton
f9b2788ddc correction for poly_to_tri_count() when given zero poly count. 2012-12-27 05:08:16 +00:00
Campbell Barton
89364fd0fa remove realloc's during BMEdit_RecalcTessellation(), instead use poly_to_tri_count() to calculate how many triangles are needed. 2012-12-27 04:18:22 +00:00
Campbell Barton
1d6c3ccf09 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.
2012-12-27 03:51:45 +00:00
Antony Riakiotakis
6586fd9c62 Fix: edge uv stitch mode did not average final position of uvs in
midpoint, non-snapping mode.
2012-12-27 03:14:11 +00:00
Antony Riakiotakis
540cbbc1d0 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.
2012-12-27 02:52:45 +00:00
Campbell Barton
84361f602a 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.
2012-12-27 01:02:32 +00:00
Brecht Van Lommel
7cbfe1839b Fix part of #33662: cycles crash using displacement on meshes with vertices not
attached to any face.
2012-12-26 20:59:35 +00:00
Antony Riakiotakis
b28848063f 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)
2012-12-26 20:38:20 +00:00
Ton Roosendaal
7b938abe2b 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).
2012-12-26 17:36:51 +00:00
Ton Roosendaal
cffd10a7c8 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)
2012-12-26 16:24:50 +00:00
Ton Roosendaal
0bca6c1834 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 :)
2012-12-26 14:22:04 +00:00
Ton Roosendaal
86134fd8c6 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.
2012-12-26 13:57:07 +00:00
Ton Roosendaal
41753f4fdd 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.
2012-12-26 13:25:13 +00:00
Ton Roosendaal
fa28e50ac2 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.
2012-12-26 13:05:39 +00:00
Mitchell Stokes
4e604642de 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. 2012-12-26 01:50:01 +00:00
Mitchell Stokes
13f49f3101 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. 2012-12-26 01:25:53 +00:00
Campbell Barton
2c38c32661 make weight paint respect box & near clipping.
also replace strncmp with BLI_path_ncmp for BLI_rebase_path, (so its case insensitive on windows)
2012-12-25 14:09:51 +00:00