Commit Graph

30597 Commits

Author SHA1 Message Date
Thomas Dinges
1002714fd8 2.6 User Interface:
* New Icons for the File menu, patch by David Klein (cgeffex). Thanks a lot!
* This patch also adds a new icon for the use_filter_text in Filebrowser.
2012-03-15 14:36:54 +00:00
Nicholas Bishop
9dd4058833 Add RNA for brush capabilities (sculpt-only for now.)
Added a new RNA-only nested structure, Brush.SculptCapabilities. It
contains read-only properties that use the current sculpt tool (and
occasionally other brush properties) to determine whether some feature
is available.

For example, the grab and snake-hook brushes don't support the
strength property. Querying brush.sculpt_capabilities.has_strength
will return false only if one of these brushes is selected.
2012-03-15 09:10:54 +00:00
Campbell Barton
c38e8e7a66 missed these last commit 2012-03-15 06:51:09 +00:00
Nicholas Bishop
e945acdd21 Un-abbreviate 'use_space_atten' (Brush RNA) to 'use_space_attenuation'. 2012-03-15 06:39:54 +00:00
Campbell Barton
6ed9c58a3d prepare for adding bmesh py api for customdata layer access - no functional changes. 2012-03-15 06:08:27 +00:00
Nicholas Bishop
f53888c5cc Code cleanup: simplify brush tool selection operators.
Created a single unifed operator, PAINT_OT_brush_select, to replace
BRUSH_OT_sculpt_tool_set, BRUSH_OT_vertex_tool_set,
BRUSH_OT_weight_tool_set, and BRUSH_OT_image_tool_set.
2012-03-15 05:59:44 +00:00
Campbell Barton
b40386a3e3 fixes for vertex color (found when brining X3D import back)
- tessface vertex color had the wrong sized array passing to rna_iterator_array_begin
- re-calculating tessface's would clear them if they were already created (own mistake)
- ED_mesh_color_add initialized tessface vertex colors from the loop color array

also made rna's mesh.tessface_vertex_colors.new() work like tessface_uv_textures.new()
where layers can be added as long as polygons are not present.
2012-03-15 05:40:33 +00:00
Nicholas Bishop
7081abf51f Remove unused parameter from multires_dm_create_from_derived. 2012-03-15 04:08:57 +00:00
Campbell Barton
be7477c638 fix [#30542] Shear Vertical Seg Faults Blender
honor the T_FREE_CUSTOMDATA flag.
2012-03-15 00:57:14 +00:00
Campbell Barton
ea79c470d2 bmesh: Fkey now creates faces from 5 or more disconnected vertices.
Added function: BM_face_create_ngon_vcloud
creating quads and tris use this too since it finds the best face winding direction based on surrounding face (if any)
2012-03-14 22:57:15 +00:00
Campbell Barton
c2d93e8d4a comment cleanup 2012-03-14 22:39:56 +00:00
Lukas Toenne
6f7eb383c8 Use helper functions in node_select when selecting/deselecting nodes and sockets in operators. This ensure that sockets are not selected on their own (parent node is always selected too). 2012-03-14 18:10:57 +00:00
Lukas Toenne
6624090a23 Make extension mode (shiftkey) mandatory for socket selection. Otherwise the user can end up with unexpectedly selected nodes, since socket selection allows selecting inputs and outputs from different nodes, which in turn also mean the parent nodes are selected. This fits the workflow better, you already needed to press shiftkey before to use the auto-connect operator. It will also solve some problems with the upcoming reroute nodes, where the node is basically a single socket. 2012-03-14 17:52:50 +00:00
Sergey Sharybin
930f43bd96 Fix crash on edge extrude from textured view
Issue was caused by MFACE layer adding for even DM without tessellated faces
which lead to adding new layer but with NULL data. This causes issues when layer
with faces (after extrude) was attempting to add because currently CD only checks
if layer type exists but does not check for size of the layer.

Solved by not adding MFACE layer if there's no tessellated faces.
2012-03-14 14:09:56 +00:00
Antony Riakiotakis
a829a905da fix hang when loop selecting an ngon. We need to check if edge currently walked on has already been added 2012-03-14 13:52:17 +00:00
Jens Verwiebe
639cf31f8a Avoid a sigsev after 44830 when reports is empty, clang compile work 2012-03-14 12:03:49 +00:00
Sergey Sharybin
f1da62d31f Switch *nix fileops from calling external commands via system() to posix api calls
which resolves some possible issues with operating files with quotes and backslashes.

Also this might resolve (or at least help) resolving compilation error on GNU Hurd platform
which will help a lot maintaining Blender for Debian.
2012-03-14 09:39:43 +00:00
Nicholas Bishop
bbb76ccb25 Fix for multires undo with partial visibility. 2012-03-14 08:14:03 +00:00
Nicholas Bishop
4d3f11c66f Fix some errors in partial visibility drawing.
Also changed show-in-border key to SHIFT+H as suggested by Daniel
Salazar.
2012-03-14 07:37:47 +00:00
Nicholas Bishop
7454d939c5 Add partial visibility operator including keymaps and menu items.
Uses HKEY for border hide, CTRL+HKEY for border show, and ALT+HKEY for
show all.

Documentation:
http://wiki.blender.org/index.php/User:Nicholasbishop/PartialVisibility

Code review:
http://codereview.appspot.com/5695043
2012-03-14 06:32:43 +00:00
Nicholas Bishop
68b8f3b0a8 Skip hidden elements in PBVH iterator, raycast, and drawing. 2012-03-14 06:32:25 +00:00
Nicholas Bishop
b37a355c8e Copy hidden flag to vertices when applying multires modifier. 2012-03-14 06:32:13 +00:00
Nicholas Bishop
521e724edd Skip hidden elements in PBVH iterator, raycast, and drawing. 2012-03-14 06:32:03 +00:00
Nicholas Bishop
8717e35db3 Add DerivedMesh.gridHidden and CCGDM implementation. 2012-03-14 06:31:49 +00:00
Nicholas Bishop
82840ef94b Add MDisps.hidden bitmap.
Updates SDNA, customdata functions, and file read/write. Also adds
accessor functions to BKE paint.
2012-03-14 06:31:38 +00:00
Nicholas Bishop
0c91821364 Add new CCG accessor functions.
ccg_gridsize() converts a level into gridsize, ccg_factor() is for
converting coordinates between different multires levels.
2012-03-14 06:31:24 +00:00
Nicholas Bishop
7f2acc173e Add BKE mesh function to update edge/poly hidden flags from verts. 2012-03-14 06:31:14 +00:00
Nicholas Bishop
38d4848020 Don't wait for sculpt stroke to create PBVH.
This idea is borrowed from the multires modifier, which already
checked if the object was in sculpt mode and, if so, created the
PBVH. That check is now moved higher up the chain into
mesh_build_data(), so that it occurs for CDDerivedMesh too.

This also replaces an assert in cdDM_getPBVH for tesselated mesh faces
with a call to create them if missing.
2012-03-14 06:30:55 +00:00
Campbell Barton
ee9a00948b mathutils py api:
Vector.angle_signed(other)
  for 2D vectors to get the clockwise angle between them.

  in BLI math its called - angle_signed_v2v2()

shorthand for...

  atan2f((v1[1] * v2[0]) - (v1[0] * v2[1]), dot_v2v2(v1, v2))

also corrects compile error in last commit.
2012-03-14 06:14:15 +00:00
Campbell Barton
f15c15e992 bmesh py api: finished todo - editable select_history
eg:
  bm.select_history = vert, face, edge

  bm.select_history.add(edge)
2012-03-14 04:46:12 +00:00
Nicholas Bishop
99f72dfbfc Add 'level' field to struct MDisps, companion to 'totdisp'.
Gets initialized when loading old files and updated at the same places
totdisp is updated. Saves having to do log+sqrt to extract level from
totdisp.
2012-03-14 03:10:18 +00:00
Campbell Barton
f80fa54428 documentation edit to address bmesh py api bug [#30453]
warn when addons are not found when running cmake.
2012-03-14 00:30:20 +00:00
Campbell Barton
a64ee8433a fix [#30493] GE crashes on exit because of using freed mtfaces from tessfaces
prevent gpu_draw.c holding a pointer to a freed array.
2012-03-13 23:28:02 +00:00
Campbell Barton
01b3e9cc9f loopwalker support for selecting the sides of ngons
see: wiki.blender.org/uploads/d/dc/BMesh_NGon_Loop_Select.png
2012-03-13 18:37:31 +00:00
Campbell Barton
b47e2ee907 code/style cleanup for loop walker which was is fairly confusing and hard to extend.
- only have one return at the end of the function.
- break up functionality more clearly between wire/face walk.
- remove unused struct member.
2012-03-13 17:13:44 +00:00
Campbell Barton
1581816d54 patch [#30511] from r44792, broke setting the window state from the command line (-W / -w).
Fix this by storing if the border is set - before this was only done for the window dimensions.
also move these variables into a static struct so this logic is easier to follow.
2012-03-13 15:44:48 +00:00
Sergey Sharybin
f34c3580ac Fix possible usage of NULL function reported by clang 2012-03-13 10:31:42 +00:00
Campbell Barton
2fbb5ce833 bmesh py api: more comprehensive intro page, also fix some spelling errors. 2012-03-13 06:22:43 +00:00
Campbell Barton
a69585573e bmesh python api:
BMesh.select_history.remove/clear/validate functions.
2012-03-13 02:59:42 +00:00
Campbell Barton
d25dc3b872 bmesh: Pressing Fkey when a face cant be made falls back to the selection history and creates edges in the order of verts selected, pressing F again will make an NGon.
(fun feature while our bug tracker is down)
2012-03-13 02:18:46 +00:00
Campbell Barton
a97825dfd7 stule cleanup for rct.c and fix for error in last commit. 2012-03-13 01:55:25 +00:00
Campbell Barton
8646bb4464 workaround [#30480] Knife tool flicker
the problem was numeric precision when in ortho mode the start/end points for the view vector would be 2000 apart which caused trouble for the intersection test.
2012-03-13 01:11:08 +00:00
Campbell Barton
b457c7fdbd style cleanup 2012-03-12 23:56:11 +00:00
Nicholas Bishop
caac81d75f Code cleanup: use explicit PBVH type enum rather than checking for grids or faces.
No functional changes, this is just a bit easier to read I think (and
nicer if we add more PBVH types in the future, e.g. for dynamic
topology sculpting.)
2012-03-12 23:03:43 +00:00
Nicholas Bishop
dfc9a57b3e Code cleanup: replace multires update function pointer with direct call.
Renamed the multiresModifier_update() function to
multires_modifier_update_mdisps() and made it visible to subsurf_ccg.c
so it can be called directly. No functional change, just a bit simpler.
2012-03-12 22:52:20 +00:00
Campbell Barton
07ffbbfcb6 better fix for [#30529], find the right axis rather then checking for folded quads. 2012-03-12 21:38:13 +00:00
Campbell Barton
30790e9390 fix [#30529] BMesh: Wrong Indizes of Faces
problem was bow-tie quads would add opposite normals together and result in zero vector which was used for projection.
Now is_quad_convex_v3() checks if quad contains 2 faces which point away from eachother when split by either direction.

Theres another fix for this bug which can be done since creating the face can use existing edges in the example given so it wont have to guess which order of verts to use.
2012-03-12 21:09:27 +00:00
Sergey Sharybin
e0a2e79f4d Fix #30406: Hooks ignore Automatic handles setting in curves
Update handles positions after applying modifiers which seems to be expected behavior.
The only currently unsolved issue is about updating aligned handles because this needs
to determine in which order handles need to be recalculated which currently depends on
selection flags and which is quite tricky to do when running modifiers and animation data,
so currently just not update their positions for now.
2012-03-12 14:55:56 +00:00
Lukas Toenne
d3e271c55a Fix for lasso gestures. After executing the modal gesture operator the list of gesture points is copied to the operator "path" id property, which is simply a collection of points. This list must be cleared before adding new lasso points to it, since operator properties are now stored after each execution. Noticed by Olivier Amrein (oenvoyage) on IRC. 2012-03-12 14:39:37 +00:00
Sergey Sharybin
a527e3ea25 Fix #30496: Bugs and crashes about "make links modifers" function.
Was missed check for if modifier is available for particular object type
which ended up with unpredictable results when modifier which isn't supported
yet for some object type as linked to that object type.
2012-03-12 14:35:07 +00:00