Commit Graph

36948 Commits

Author SHA1 Message Date
7fa7e4ba1f bmesh python api additions:
- BMesh.is_wrapped
- BMesh.copy()
- BMesh.clear()
- BMesh.free()
- BMesh.from_object(obj, apply_modifiers=True)
- BMEdge.calc_length()
- BMLoop.calc_normal()
- BMLoop.calc_tangent()
2012-03-11 05:58:22 +00:00
050439fd9d bmesh py api - correct class references in docs and rename mesh conversion funcs to ne less confusing. 2012-03-11 04:07:22 +00:00
21fd09c028 bmesh py api: change .from_mesh() / .to_mesh() to be class methods of BMesh rather than functions in the module.
added example script which converts a mesh to a bmesh, edits and converts back again.
2012-03-11 02:45:27 +00:00
0c50bedd9c code cleanup: remove unused externs. 2012-03-11 00:00:27 +00:00
7f34653f59 style cleanup: + some warning fixes, also remove unused metaelem extern. 2012-03-10 22:00:55 +00:00
67f1e83508 [#30373] Which part to snap in volume snapping is removed
By Bug reported by Pep Ribal

Also fixed an object mode bug with volume snapping and made it compatible with the edit mode "Snap on self" option
2012-03-10 21:40:35 +00:00
e09ab8883c bmesh:
- moved mesh conversion functions into their own file.

bmesh py api:
- can now create a new empty bmesh without first creating mesh data.
- added function to copy bmesh data back to a mesh.
- bmesh.from_mesh() can now get a mesh which isnt in editmode.
2012-03-10 20:41:19 +00:00
83a5c943af 2.6 UI:
World Context:
* Made world id block wider
* Don't show texture user when Cycles engine is used
Other: 
* Change Dopesheet > DopeSheet in User Preferences Theme section for consistency.
2012-03-10 20:30:05 +00:00
bb82854d46 2.6 UI:
* Hide Modifier and Contraint Panel header, this gives a bit space.
As it's the only panel in these context tabs it does not make sense to close them anyways.
2012-03-10 20:08:25 +00:00
d6a6f285d6 patch [#30511] Save/load window state (allows Blender to start maximised)
from Tom Edwards (artfunkel)

This patch fixes bug [#20791]
2012-03-10 17:49:26 +00:00
78941c1676 Remove remained part of debug code. 2012-03-10 17:14:50 +00:00
c175ed8b9b Forgot to remove code used for debuggning in previous commit. 2012-03-10 16:55:09 +00:00
24ea07154e OSX/cmake: added a comment on method used 2012-03-10 16:39:51 +00:00
be9aa6eada Finally 2D stabilization auto scale factor should be calculated perfectly 2012-03-10 16:31:12 +00:00
3658389e72 OSX/cmake: ensure newest Xcode compatibility, important: still needs a patched cmake ( see error you will get if missed ), patched cmake provided here: http://www.jensverwiebe.de/Blender/CMake%202.8-7patched.zip 2012-03-10 16:21:48 +00:00
57693a3756 fix for own error in recent commit with UV texture layers. - was shadowing variable so assignment failed. 2012-03-10 15:55:25 +00:00
c7988dc1ac style cleanup 2012-03-10 14:43:12 +00:00
6fef7f1c32 style cleanup: unit code 2012-03-10 14:20:55 +00:00
2932ab8761 Fix an infinite loop in get_levels_from_disps().
This is called when adding a multiries modifier. BMesh MDisps have
only one loop's displacements rather than a full face's, so don't
multiply by number of corners here.
2012-03-10 12:26:32 +00:00
20d8d366ab style cleanup: fly mode. 2012-03-10 06:46:23 +00:00
064a333561 fix [#30500] Mesh.tessface_uv_textures or Mesh.tessface_vertex_colors crash on access in editmode
just missing NULL checks on face data.
2012-03-10 05:20:41 +00:00
24b676e370 Remove the OBJECT_OT_test_multires operator.
Originated in r35213, appears to have been some test for multires in
BMesh.
2012-03-10 05:15:17 +00:00
d3ffa53f78 change fly mode behavior to address issue raised in [#30508] - there being no way to pause.
now when reversing direction immediately - fly mode translation will pause until pressed again.
2012-03-10 04:19:25 +00:00
b1b07fb951 Speedup for ngon normal calculation
- BM_mesh_normals_update was looping over all faces to find the largest one, this is no longer needed.
- calculating a face normal was looping over every faces corners twice, now only once - using the loops directly (not an iterator).
- face vert locations were being copied an array, now use directly.
- calculating the normals would copy a float vector for the next point in the face, which was never used (only current and previous used).
- was copying vectors to compute the normal, now just assign the float pointers.
2012-03-10 03:25:16 +00:00
b8f15a1dd3 Revert changes BMesh changes MDisp loading in readfile.c
These changes originated in r35321, which transfered MDisps to a
different memory allocator; this is no long used, however, so
post-merge it was just making an identical copy.
2012-03-10 03:07:42 +00:00
702e85ef84 picky changes to mouse cursor text selection behavior, previously as soon as the mouse was before a character it would select the previous, even if the cursor was closer to the space between the next 2 chars.
now find the closest point inbetween both chars.
2012-03-09 23:10:07 +00:00
a2e00c6230 disable object outline draw when painting (its distracting), also fix for own recent mistake in vgroup_blend(). - had bad check for editmesh. 2012-03-09 22:00:40 +00:00
4dc35836ad code cleanup: remove unused variable assignents and added bmesh submodule links, doc correction reported by dfelinto. 2012-03-09 21:23:15 +00:00
4908ded534 bmesh fix: faces were being created flipped the wrong way compared to surrounding geometry.
also the last edge was mot taken into account when calculating the correct winding.
2012-03-09 20:29:53 +00:00
80dca0a06d style cleanup: consistent names for header guards. 2012-03-09 19:17:19 +00:00
36b2f4a009 Cycles: another tooltip tweak. 2012-03-09 19:01:44 +00:00
378765650d Fix makesdna error due to poor comment parsing, should be fixed in makesdna
ideally but for now just tweak code in case it causes issues.

ERROR: still 1 structs unknown
*** Unknown structs: bSound
2012-03-09 19:01:30 +00:00
89a963fb7f style cleanup: comment blocks 2012-03-09 18:28:30 +00:00
de4bd55e01 DO not increment image user counter on view3d duplicate and not decrement
it's user count on free. That's how other spaces handles ID block (like
image editor, space clip).

This fixes issue when loading file without loading UI when current layout
has got background images set.
Also this hopefully will fix issue #30429: Background Images Lost on Save/Close/Reload
2012-03-09 13:43:37 +00:00
0c68f0eee8 Previous fix for stabilization autoscale actually broke stabilizaiton itself
(median point was sliding a bit from it's original position)

This happens because of how transformation for stabilization calculates:
image is scaling around it's center, so image translation should be recalculated
after scale was changed, but scale also depends on translation. That's where
tricky things happens. It's still not ideal for case of rotation, but before
fixing this issue better to figure out usecase and see if it's indeed
so needed to scale around image center (it might only be helpful to use
stabilization parameters in compositor nodes).
2012-03-09 13:37:42 +00:00
15ec2a90c9 Markers Tweak for Sequencer
Applied the keymaps hack which is used for other animation editors to allow
markers to be added and renamed anywhere from within the sequencer strips
region, instead of just when the cursor is over the scrollbar.

Other operations where the hotkeys conflict though (delete, move) can still be
done only from the scrollbar, or better still, from the Timeline.
2012-03-09 13:31:20 +00:00
48f284d544 Tweaks for typos in the Keying Set descriptions commit 2012-03-09 10:24:53 +00:00
Lukas Toenne
455d1be696 Node socket selection feature reimplemented from 2.49. Sockets can be selected as a sub-selection of nodes and are then preferred by the auto-connect operator. This makes it easier to create precise links over long distances as an alternative to the click & hold operator.
Socket selection is indicated by a simple white highlight circle.

Multiple inputs can be selected by holding SHIFTKEY (just like regular node select). Only one output socket can be selected at a time for each node, but several outputs in different nodes are allowed.

The auto-connect operator will prefer selected sockets on nodes for creating links. If either the output or input side have no selected sockets it will fall back to the previous behavior of chosing 'best' sockets first (colors, then vectors, then values). This could be improved in the future, but is out of scope here.
2012-03-09 10:16:41 +00:00
eb1b38f31a Some fixes for 2D stabilization:
- Ron aspect ratio correction after applying location
  There're still some annoynments with rotation stabilization with
  pixel aspect != 1, will be fixed later.
- Joining tracks will update track used for rotation stabilization/
2012-03-09 10:01:29 +00:00
0641f1723b Optimize index buffers for multires drawing in sculpt mode.
All multires grids have exactly the same ordering, so rather than
allocate a new index buffer for each PBVH node, just allocate one that
can be reused for every grid.

This requires more draw calls (one per grid rather than one per PBVH
node), but less graphics memory.
2012-03-09 09:30:03 +00:00
dfdfa3d51b code cleanup: replace macros VECCOPY, VECADD, VECSUB, INPR - with BLI_math funcs.
added copy float/double funcs: copy_v3fl_v3db(), copy_v3db_v3fl(). 2d & 4d too.
2012-03-09 06:04:17 +00:00
4251746382 some code cleanup for rip tool. 2012-03-09 04:10:19 +00:00
78d73eb155 BMesh: rewrite edge split code (used by edge split modifier and rip tool)
this fixes but [#30461] where the same vertex was added to some faces twice.

Previous code rebuilt all faces around the split edges, replace this with much simpler code that uses existing bmesh API for splitting.

This also gives a performance boost to the modifier (over 30x faster in the bug-report file).
2012-03-09 03:16:39 +00:00
4f7bdc59d3 style cleanup: spelling.
also remove large, duplicate comments from sunsky.h
2012-03-09 00:41:09 +00:00
27d43f3fd3 added API function to C and python
* C:  BM_vert_separate(...)
* py: bmesh.utils.vert_separate(vert, edges)

This splits off regions around the vertex, splitting on connected edges passed in a sequence.

also made minor changes
- rename python api functions _rip to _separate
- fixed bmesh iterator being iterable its self (some parts of python expect this)
- fix memory leak in bmesh python api.
2012-03-09 00:01:38 +00:00
06b2343b50 Use sqrtf rather than sqrt in CCGSubSurf.c 2012-03-08 22:33:34 +00:00
3a3c5db82b - MSVC doesn't have log2f function
- Fix misusage of new [] and delete in BGE.
2012-03-08 21:14:54 +00:00
077deb1453 Cycles: improve F/Stop number tooltip description. 2012-03-08 20:13:33 +00:00
c82c456247 bmesh py api, new functions:
* bmesh.utils.face_vert_rip(f, v)
* bmesh.utils.loop_rip(l)
2012-03-08 20:00:37 +00:00
284fcd2df2 Cycles: fix UI when material has nodes but use nodes option is disabled, it
didn't show this option then.
2012-03-08 19:53:01 +00:00