Commit Graph

30597 Commits

Author SHA1 Message Date
Campbell Barton
529b2a01eb added check for DNA C syntax we cant parse:
void*somepointer;

.. this is valid C but breaks makesdna.c
2012-03-05 16:21:13 +00:00
Bastien Montagne
1e41b19ec1 tesselat -> tessellat in UI messages, + style edits. 2012-03-05 16:19:16 +00:00
Sergey Sharybin
aa0eb72c18 Fix for missed faces in mesh after switching active shape key in edit mode. 2012-03-05 14:25:52 +00:00
Campbell Barton
4f447921d2 RegionView3D.update call, to address issue in report:
[#30454] perspective_matrix not update in real time with bpy.ops.view3d.zoom

This is so you can modifify the view settings and get the view matrix after without waiting for a redraw.
2012-03-05 13:02:45 +00:00
Campbell Barton
f6ddb79e20 fix [#30457] Smooth normals wrongly exported to wavefront
mesh.calc_normals() wasnt calculating vertex normals (only face normals),

now only calculate vertex normals.

added a define incase we want to have poly normals back again.
2012-03-05 11:49:24 +00:00
Campbell Barton
4b940364a1 edge rotate now keeps edge properties (like seam, crease, bevel weight.. etc) 2012-03-05 01:53:30 +00:00
Campbell Barton
4d84e869a0 Improvements to bmesh edge rotate
On a user level, edge rotate now works better with multiple edges selected, it wont make zero area faces or rotate edges into existing ones.

With a single edge selected - rotate is less strict and will allow ugly resulting faces but still checks on duplicate edges.

API:
* BM_edge_rotate now takes a flag, to optionally...
** check for existing edge
** splice edge (rotate and merge)
** check for degenerate resulting faces (overlapping geometry, zero area)
** beauty - only rotate to a better fit.
... this allows it to still be used as a low level API function since all checks can be skipped.

* BM_edge_rotate() now works a bit different, it find the new edge rotation before joining the faces - exposed by BM_edge_rotate_calc().

* Added api call bmesh_radial_faceloop_find_vert() - Radial Find a Vertex Loop in Face
2012-03-05 00:50:18 +00:00
Sergey Sharybin
5f509134ec Added option to fit frame to the whole clip editor viewport instead of zooming
to a power-of-two factor. Shortcut is F.
2012-03-04 21:02:58 +00:00
Sergey Sharybin
c395c862e9 Track cleanup operators are now moved to the global clip editor shortcuts
which makes it possible to cleanup tracks from curve view.
2012-03-04 20:44:09 +00:00
Sergey Sharybin
0963f45c66 Fixed copyright lines for some tracking related DNA files. 2012-03-04 20:23:50 +00:00
Sergey Sharybin
f79232cf34 Movie clip editor: implemented border select operator for curves view 2012-03-04 19:34:01 +00:00
Campbell Barton
a0ab2eefb9 * rename BM_face_other_loop --> BM_face_other_edge_loop
* optimize BM_face_other_edge_loop to do about half as many iterations for quad heavy meshes, with ngons the gain is much more since searching around the entire ngon when the edge already stores its loop is silly.
 ... also nicer in cases where edge has no face users it avoids a loop on all face corners.
2012-03-04 16:36:31 +00:00
Campbell Barton
76e9f91d1c switch arg order for BM_face_other_* funcs (make face come first), and add nice ascii art for BM_face_other_vert_loop since this stuff is hard to grasp as text. 2012-03-04 16:01:02 +00:00
Arystanbek Dyussenov
c2760307e8 #collada skeleton import, bugfix #29621
Do not crash when joint SIDs cannot be resolved.

OpenCOLLADA cannot resolve joint SIDs connected to skin if the <skeleton> tag is missing.

Page 148 of COLLADA spec 1.4.1 states: "<skeleton> elements define where to start the sid lookup". So I think this is a bug in "FBX COLLADA exporter" which did not add the <skeleton> tag.

The problem can be fixed by manually adding the <skeleton> tag into <instance_controller>.
2012-03-04 13:43:23 +00:00
Campbell Barton
12d0489b33 fix for building openjpeg image support on OpenSUSE 12.1, also quiet compile warning. 2012-03-04 11:58:55 +00:00
Campbell Barton
34db81a6dc fix for missing NULL check in bmesh.from_mesh(), bug [#30446] 2012-03-04 11:10:11 +00:00
Lukas Toenne
dceab32f78 Small feature for the viewer linking operator: When no viewer node is present in the tree, it automatically adds a new one next to the output socket.
Also changed the poll function of that operator to make sure it actually only works on compositor trees (others don't have viewer nodes).
2012-03-04 10:49:13 +00:00
Campbell Barton
f6ae27daef style cleanup - comment spelling + translate some dutch. 2012-03-04 04:35:12 +00:00
Campbell Barton
4f2976941f fix for issue raise by patch [#30154] non utf8 buildinfo, fails to import 'bpy' module.
we cant ensure buildinfo to have utf8 encoding so access it as bytes via python - a different workaround then this patch made.

also use C style string formatting for sys_info.py
2012-03-04 03:14:38 +00:00
Joshua Leung
6c37e0a442 Whitespace tweaks 2012-03-04 02:43:15 +00:00
Campbell Barton
d99888d786 bmesh: add back feature from 2.4x Ctrl+Shift+T subdivides quads in the alternate direction. 2012-03-04 02:18:17 +00:00
Campbell Barton
88e0bcfbe1 fix for crash in bmesh py api, was missing NULL checks for parsing sequences and had bad string formatting in exception. 2012-03-04 02:09:02 +00:00
Campbell Barton
e583aa8e34 changes to ED_mesh_update() to work with OBJ import.
* calculate vertex normals (previously was calculating face normals only)
* clear tessfaces unless theres an argument to build them. since no tessfaces is the default state right now.
* if convert_mfaces_to_mpolys() runs, dont calculate edges, since it already does that.
2012-03-04 00:16:50 +00:00
Campbell Barton
8c7ea2f746 #ifdef out ngon edge-ring loop support, from r44561, this is a nice feature but can too easily give bad results, perhaps being it back with some sanity checks. 2012-03-03 22:27:34 +00:00
Campbell Barton
1531e3677a bmesh py api
* add BLI_rfindlink for reverse index lookup (used so bm.select_history[-1] doesn't have to loop the entire list twice).
* add bm.select_history.active so you can get the last selected item or None without having to check seq length.
2012-03-03 22:07:58 +00:00
Bastien Montagne
685fda4f13 Many i18n fixings, based on [#30428] [2.62] Translation Issues.
In fact, most "UI special cases" are not well translated, currently. :/ This affects especially the "Properties" panels. This commit should address problems in Graph editors, and 3D View (but probably not yet all of them). Yet it already adds more than 100 new messages (and fixes translated drawing of more).

Also done some style edits…
2012-03-03 21:42:21 +00:00
Campbell Barton
3590076193 style cleanup - comment formatting 2012-03-03 20:36:09 +00:00
Campbell Barton
95670e03a0 style cleanup / comment formatting for bli/bke/bmesh 2012-03-03 20:19:11 +00:00
Campbell Barton
a2c182e923 style cleanup - use aligned * prefixed blocks for descriptive comments (was already used a lot and part of proposed style guide). 2012-03-03 16:31:46 +00:00
Campbell Barton
86cec98f9e fix for leak in bmesh edge split - assert when invalid args are given rather then returning NULL. 2012-03-03 14:48:50 +00:00
Campbell Barton
cbc07986b5 bmesh support for rotating multiple edges at once. 2012-03-03 12:49:03 +00:00
Campbell Barton
9c18ade898 bmesh edge rotate
* improve check to see if edge rotate can be done,
  was checking if both edges verts have an edge count of 2, which is really a meaningless test since the verts can have stray edges connected and the result wont work right.
  instead check if the next verts in both faces share a vertex.

* add utility function BM_face_other_vert_loop() which gets the next loop in a face.
* add convenience function BM_edge_face_pair() which returns 2 faces for edges that have exactly 2 face users. (saves ugly e->l->radial_next ... in code) and is more readable.
2012-03-03 12:35:37 +00:00
Campbell Barton
9d49fa0e63 style cleanup - spelling corrections & update some incorrect comments. 2012-03-03 11:45:08 +00:00
Dalai Felinto
1f928833f3 option for the Armature Actuator to change the influence of a bone constraint.
Also adds DampedTrackTo to the list of supported constraints in the BGE

Test file:
http://www.pasteall.org/blend/11715

Patch developed as part of a project to NF-UBC Nereus Program.
Development time 'sponsored' by the project.
www.nereusprogram.org
2012-03-03 02:47:01 +00:00
Campbell Barton
95bba22af0 fix for error report in property registration, it wasnt printing the error. 2012-03-03 00:20:05 +00:00
Bastien Montagne
b3a0a33791 "Fix" [#30431] UI string spelling & similar fixes.
All suggested changes looked good to me, thx to Michael Färber for this list of changes!
2012-03-02 21:14:37 +00:00
Campbell Barton
e9c935caa0 fix bug [#30426] crash in bmesh python api.
if blender freed the BMesh before python was finished (on exit editmode for eg), python would attempt to access the bmesh to clear python pointers in it.
2012-03-02 18:23:08 +00:00
Campbell Barton
cc8e2d12a7 remove prints committed by accident. 2012-03-02 17:53:39 +00:00
Campbell Barton
7bbf4b7831 style cleanup
- spelling - turns out we had tessellation spelt wrong all over.
- use \directive for doxy (not @directive)
- remove BLI_sparsemap.h - was from bmesh merge IIRC but entire file commented and not used.
2012-03-02 16:05:54 +00:00
Campbell Barton
63f5b96fe3 mesh.update() now has option to calculate tessellation faces. 2012-03-02 14:46:14 +00:00
Campbell Barton
21280a6386 Code Cleanup - naming consistancy for bmesh struct types 2012-03-02 12:44:34 +00:00
Campbell Barton
622ac0dd16 code cleanup:
replace casts: '((Mesh *)ob->data)->edit_btmesh' with 'BMEdit_FromObject(ob)'

also minor style edits.
2012-03-02 12:09:49 +00:00
Campbell Barton
cf927d3fd1 bmesh minor changes
* dont check selection and hiddent state (select + hide isnt allowed and api ensures this)
* MESH_OT_noise had incorrect check for texture (checked if slot [0] was filled but then used active texture)
2012-03-02 10:49:15 +00:00
Bastien Montagne
47a1c7e5aa Fix [#30419] Median wrongly setting lattice vertex weights.
In fact, the same bug affected curves' weights too. Now using the same method as for setting mesh edges' crease and bevel weights. Also factorized/simplified that part of code by defining a new utility func computing the scale factor.

Also greatly simplified UI code in same v3d_editvertex_buts() function, was really over-complicated (this fixes btw a few minor UI bugs in the transform editmode panel, like missing tips, etc.).
2012-03-02 10:30:11 +00:00
Campbell Barton
979a80e743 minor edits to last commit - use fixed chunksize, rather than the number of verts/edges/faces in bm_mempool_init(). 2012-03-01 23:59:34 +00:00
Campbell Barton
c26f5035b6 style cleanup for mempool 2012-03-01 23:14:51 +00:00
Campbell Barton
bc767059cb Code Cleanup: update to mempool, use flag rather then bool args. 2012-03-01 22:59:18 +00:00
Campbell Barton
921a7556fb bmesh - changes to mempool allocations
* double default edge allocation size (double the number of verts/faces).
* CustomData_bmesh_init_pool was using allocsize & chunksize as the same variable. Now use type specific chunk size.
* bmesh copy and editmode conversion now allocate the BMesh mempool size needed for the entire vert/edge/loop/face arrays since its known already.
2012-03-01 22:17:04 +00:00
Brecht Van Lommel
2942eab57c Fix #30413: dynamic paint crash with texture slots with no texture assigned. 2012-03-01 20:41:13 +00:00
Campbell Barton
9aafe32147 bmmesh api - use struct rather than int[4] to initialize mesh sizes.
also correct bad assert() in previous commit.
2012-03-01 20:09:17 +00:00
Brecht Van Lommel
d534f0e16d Fix #30405: combine HSVA node not working correct with fixed color instead
of socket connected as input, patch by Denis Declara.
2012-03-01 20:05:14 +00:00
Brecht Van Lommel
8643b8a02d Fix related to #30416: python render_stats handler now also gets called when the
saved file message is printed.
2012-03-01 19:19:10 +00:00
Brecht Van Lommel
dff2e84427 Fix #30415: motion blur option still had an effect on external engines / cycles,
should not be used then.
2012-03-01 19:19:04 +00:00
Campbell Barton
e69a758eaa fix [#30280] bmesh: Dissolve with error message kills Crease
CD_MASK_BMESH was didnt include crease of bevel weight - so copying the bmesh would skip these.
2012-03-01 19:05:14 +00:00
Campbell Barton
522b73a635 bmesh api:
* name bmesh operator func's BMO_slot_buffer_* rather then BMO_slot_* since it wasnt obvious some only dealt with buffer, some both.
* more typechecks and asserts of BMO_ functions (I lost some time calling a map with a buffer function that failed silently).
* small speedup for extrude check - test if the edge is wire _before_ doign a hash lookup.
2012-03-01 17:38:04 +00:00
Campbell Barton
1f473a78b8 Code Cleanup: remove bmesh_radial_loop_next() function,
just access l->radial_next
2012-03-01 17:13:02 +00:00
Lukas Toenne
c1e8d77842 Same fix for file output node as Brecht did in r44580, EXR compression is defined in exr_codec instead compression. 2012-03-01 17:02:05 +00:00
Campbell Barton
e89f09a774 fast-path for BM_edge_is_manifold, BM_edge_is_boundary functions. 2012-03-01 16:56:42 +00:00
Brecht Van Lommel
93249c35b1 Fix related to #30384: multilayer exr files not saving compressed correctly. 2012-03-01 16:41:51 +00:00
Campbell Barton
3b8d96820f fix [#30399] bmesh: Extrusions adjacent to mirror plane leave stray edges.
thanks to Antony Riakiotakis for finding the cause.
2012-03-01 16:27:44 +00:00
Campbell Barton
64007f5625 bmesh regression with extrude.
Extruding an edge where both verts were clipped would not create a face for this edge.

This is ok when a connected face is also extruded but not when the edge is selected on its own.
2012-03-01 16:12:11 +00:00
Campbell Barton
4a5078d6c9 style cleanup
* add extra argument to BMO_slot_map_to_flag() to filter by vert/edge/face
* made BMO_slot_map_* / BMO_slot_buffer_* functions stricter with type checking.
2012-03-01 16:04:37 +00:00
Campbell Barton
216f74880e style cleanup: bmesh - have continue on new line, also avoid unneeded loop in bmo_extrude_face_region_exec() in some cases. 2012-03-01 13:13:08 +00:00
Campbell Barton
ea13ec1699 Spelling Cleanup 2012-03-01 12:20:18 +00:00
Lukas Toenne
6a36b6249b Call the node freestorage callback _before_ actually freeing sockets, since this is also responsible for freeing possible socket storage data. 2012-03-01 12:07:59 +00:00
Lukas Toenne
b671f5e0de When adding a file output socket make it active, for convenience. Also move back one index when deleting the last. 2012-03-01 11:41:15 +00:00
Lukas Toenne
171d6bf509 Fix for Multilayer EXR API. This was using implementation stubs directly in the header file, causing problems with scons in particular. 2012-03-01 11:19:41 +00:00
Lukas Toenne
537605f0d4 Fix for wrong channel number in ImBuf when file node output format is something other than RGBA. This doesn't get set in the init function, has to be done manually (i guess?). 2012-03-01 08:47:32 +00:00
Lukas Toenne
77442de6c0 * Removed DNA_DEPRECATED tag from old NodeImageFile struct typedef, it doesn't work that way (duh)
* Moved format field and added (deprecated) sfra and efra ints to ensure some forward compatibility of file output node. Earlier blender versions will simple interpret the struct as NodeFileImage, so by matching the first fields the numbers can stay somewhat valid.
2012-03-01 08:17:16 +00:00
Lukas Toenne
2eb29e4788 A number of improvements for the file output node(s).
1) Old CMP_NODE_OUTPUT_FILE and CMP_NODE_OUTPUT_MULTI_FILE have been merged,
only CMP_NODE_OUTPUT_FILE remains. All functions renamed accordingly.

2) do_versions code for converting single-file output nodes into multi-file
output nodes. If a Z buffer input is used, the node is made into a multilayer
exr with two inputs. (see below). Also re-identifies multi-file output nodes
with the CMP_NODE_OUTPUT_FILE type.

3) "Global" format is stored in node now. By default this overrides any
per-socket settings.

4) Multilayer EXR output implemented. When M.EXR format is selected for node
format, all socket format details are ignored. Socket names are used for layer
names.

5) Input buffer types are used as-is when possible, i.e. stored as B/W, RGB or
RGBA. In regular file output the format dictates the number of actual channels,
so the CompBuf is typechecked to the right type first. For multilayer EXR the
number of channels is more flexible, so an input buffer will store only the
channels it actually uses.

6) The editor socket type is updated from linked sockets as an indicator of the
actual data written to files. This may not be totally accurate for regular file
output though, due to restrictions of format setting.
2012-03-01 07:56:15 +00:00
Sergey Sharybin
1d5a3886a1 Fix crash on edge slide when object has got multires modifier
Issue was caused by fix for slide+automerge bug resulted in accessing to freed memory
from multires projection code. Solved by moving multires projection from cleanup callback
to special_aftertrans_update.

Patch by Antony Riakiotakis with some own corrections.
2012-03-01 07:10:45 +00:00
Nicholas Bishop
4dfc25223f Remove struct NgonInterpModifierData and related ModifierType Info.
This modifier was already removed in r44288, looks like these were
just missed.
2012-03-01 02:20:10 +00:00
Campbell Barton
af0a469307 fix [#29135] NGons dont work with loop cut
patch by Andrew Wiggin
2012-02-29 17:23:41 +00:00
Sergey Sharybin
034b1711ea Changes to startup.blend:
- Pinch/Magnify brush isn't available from vertex paint mode anymore.
- Switch default texture to Low Quality bump method
  The same method is used for new textures and it makes possible to
  view bump in 3D viewport with GLSL shading.
- Anisotropic filtering is set to 2x by default.
2012-02-29 17:01:43 +00:00
Campbell Barton
6c53638863 add an assert for inserting an egde with the same vertices and a BMESH_TODO for bevel. 2012-02-29 16:29:09 +00:00
Campbell Barton
ce64128a84 error in recent header commit. 2012-02-29 15:42:34 +00:00
Howard Trickey
fc84402632 Mistake in previous commit test for API vert new: it failed for no-arg case. 2012-02-29 15:35:10 +00:00
Campbell Barton
29b027294d use floats rather then doubles for bmesh poly functions. 2012-02-29 15:21:09 +00:00
Howard Trickey
87af0e1912 Undid part of commit 44552: can't use mathutils on doubles 2012-02-29 15:10:01 +00:00
Campbell Barton
7cc206ddca Code Cleanup: remove non existing function declarations.
added some missing functions too - which are not used yep but should be there for api completeness.
* CDDM_set_mloop
* CDDM_set_mpoly
* BLI_mempool_count
2012-02-29 15:00:37 +00:00
Sergey Sharybin
0cec655b29 Fix #30328: Crash when using edge slide
Looks like it was missed BMesh element index for faces in emDM_drawMappedFacesMat.
There was already call of BM_mesh_elem_index_ensure to ensure there's element
index for vertices, added flag to ensure there's also index for faces.
2012-02-29 14:32:09 +00:00
Howard Trickey
0d2ba6bff6 Code cleanup, no functional change: use mathutils copy
Also renamed a variable to make intent clearer (else seemed like
there was a bug).
2012-02-29 14:23:31 +00:00
Howard Trickey
d330efa084 Fix 30401: Python API vert new((0,0,0)) crashes.
Thanks to Campbell for fix, adding an & to an arg.
Also needed to negate the sense of a later test.
2012-02-29 14:16:35 +00:00
Brecht Van Lommel
3e159f65f9 UI: change shortcut to clear value in button with mouse over it (for the second
time, sorry), from delete to backspace. Delete did not work on buttons in nodes,
because it would delete the node itself or if we changed the priority interfere
with deleting nodes if the cursor was placed accidentally over a button in a node.

Patch by Damir Prebeg.
2012-02-29 14:10:12 +00:00
Campbell Barton
17ee9f77c5 bmesh py api - initial support for selection history. 2012-02-29 14:05:03 +00:00
Sergey Sharybin
c058ba207f Compilation error fix for recent indicer refactor commit. 2012-02-29 13:17:11 +00:00
Sergey Sharybin
d8bdd4497e Refactor of proxies build operators
Split proxy build operator into three parts:
- Prepare context (IMB_anim_index_rebuild_context) which prepares all
  needed data and stores it in an anonymous structure used by specific
  builder lately.
- Build proxies/timecodes into temporary files (IMB_anim_index_rebuild)
  This function will build all selected proxies/timecodes into a temporary
  files so old proxies will be still available during building.
- Finish building proxies (IMB_anim_index_rebuild_finish) which copies
  temporary files over old proxies filed and releases all resources used
  by a context.

Context creation and finishing building happens in a main thread so
it's easy and safe to close all opened handles of proxies files and
refresh cache after rebuilding is finished.

This should finally fix #30315: Temporary proxy files are not erased and old proxys are not updated if the proxy is built more then once (windows)
2012-02-29 12:08:26 +00:00
Nicholas Bishop
33baddfc47 Code cleanup: replace a few macros in CCGSubSurf with inline functions. 2012-02-29 08:35:23 +00:00
Campbell Barton
a6f420b828 update doxygen comments for bmesh. 2012-02-29 06:55:10 +00:00
Nicholas Bishop
b18794c3b6 Add blenlib function to initialize vectors from a single float.
The new functions are copy_v2_fl, copy_v3_fl, and copy_v4_fl.
2012-02-29 04:17:26 +00:00
Mike Erwin
8600c8df43 ndof button handling improvements: Spaceball5000's A,B,C buttons can now be keymapped, ndof modifiers (shift,alt,etc.) are almost ready but still hardcoded to act like keyboard for now. added a check to prevent crash on Linux when device is plugged in after blender starts. also fixed a bug introduced by my last commit that affected the SpaceTraveler and serial devices. 2012-02-29 02:44:08 +00:00
Nicholas Bishop
a71128828f Bugfix: vertexpaint blur brush was broken.
Just a minor loop iteration bug.
2012-02-29 00:14:58 +00:00
Nicholas Bishop
1ebb6e3360 Code cleanup for the neighbor_average() sculpt function.
Moved some of the code into a couple new mesh functions for searching
in poly loops to simplify the function, the rest is just cosmetic
changes.
2012-02-28 23:08:40 +00:00
Campbell Barton
d279fb503d Style Cleanup, no functional changes. 2012-02-28 22:54:09 +00:00
Campbell Barton
e6ca57b929 fix [#30367] Face Fills Crossed
when making a quad from 2 edges - it was comparing the edge lengths to avoid making a bowtie quad. but this doesnt work in all cases, now compare normals instead.
2012-02-28 22:52:09 +00:00
Nicholas Bishop
132544dd02 Fix a couple typos in comments. 2012-02-28 20:55:55 +00:00
Nicholas Bishop
4f884e21b2 Add solid background behind text in search menu.
This fixes the issue of text being hard to read due to (e.g.) black
text on a dark icon.

Example: http://www.pasteall.org/pic/show.php?id=27401
Reviewed by Brecht: http://codereview.appspot.com/5699098/
2012-02-28 20:46:55 +00:00
Campbell Barton
d309aa2d9a fix for leak in bmo_edgenet_fill_exec and remove invalid comment. 2012-02-28 20:06:52 +00:00
Campbell Barton
dcfd1dd7e2 code cleanup: de-duplicate bmesh face creation code, 2012-02-28 19:30:44 +00:00
Campbell Barton
2a7f1af61e Code Cleanup:
- apply some rules for function naming conventions, added to main bmesh doc in bmesh.h.
- remove unused function BM_loops_to_corners().
2012-02-28 19:10:53 +00:00
Campbell Barton
d1d11bbe9b more header re-arranging.
Some function comments were in headers, some in the C files, some in both.
Moved function comments from headers into the C files.
2012-02-28 18:28:30 +00:00
Campbell Barton
df0f0c63d3 bmesh: re-arrange headers 2012-02-28 16:47:12 +00:00
Campbell Barton
c48a5fd821 code cleanup,
- bmesh_newcore.c -> bmesh_core.c.
- add bmesh_interp header.
2012-02-28 16:29:48 +00:00
Campbell Barton
ed04c21374 code cleanup: use float vector size in function definitions, and const's where the values are unchanged. 2012-02-28 14:05:00 +00:00
Campbell Barton
150cedac5d fix [#30361] Edge Length will not be diplayed properly with Clipping Borders
the clipping test done for text drawing was called with local=FALSE, however with mesh info text this needs the local argument to be set.
2012-02-28 13:18:20 +00:00
Campbell Barton
9baab70aaf code cleanup: make clipping enable/disable into functions (was being done inline in drawobject.c) 2012-02-28 13:03:56 +00:00
Campbell Barton
95c14aa685 Fix UI error - some curve settings were in the path panel and were greyed out when 'Path Animation' was disabled, but were infact used for the curve deform modifier.
noticed while looking into bug [#30349].

Move these settings under the main curves panel under text "Path / Curve-Deform:"
2012-02-28 11:18:05 +00:00
Campbell Barton
0d66b57bc2 fix for issue reported in bug [#30381], though it doesn't deal with the crash.
calling DM_ensure_tessface() on an DM_TYPE_EDITBMESH does nothing, which is OK but was printing a warning.
2012-02-28 10:22:21 +00:00
Campbell Barton
b0a09bfab3 code cleanup:
use bmo_* prefix for operator defs, was confusing with bmesh_* api functions.
2012-02-28 09:48:00 +00:00
Campbell Barton
e828b10251 Code Cleanup
* remove one the changes to fix #30374, instead just check if the face exists.
* remove some unneeded edge checks in BM_face_create_quad_tri_v().
2012-02-28 08:17:53 +00:00
Campbell Barton
7536bcbe70 Code Cleanup: bmesh
* remove unneeded struct's from headers.
* give argument names for return ** pointers r_ prefix.
2012-02-28 07:42:48 +00:00
Campbell Barton
94f171f2c6 fix [#30374] Can't Fill Triangular Face
the problem was a triangle couldnt be made when there was a quad that used 3 of the verts.

* now check if overlapping face has same length as the one to be created.
* an unrelated fix - the output of a triangle was not being flagged by the bmesh_contextual_create operator.
2012-02-28 07:19:28 +00:00
Campbell Barton
e6c5ff95be patch [#30331] Support clang-3.0
from Yasuhiro Fujii (y-fujii)

only small part of the patch for now.
2012-02-28 05:19:54 +00:00
Campbell Barton
6dcbba943b bmesh py api - element hide_set() function which flushes hidden state. 2012-02-28 05:02:34 +00:00
Nicholas Bishop
87ddcab933 Bugfix: avoid reading from an OpenGL buffer mapped write-only.
When set to solid-shading, GPU_update_grid_buffers was calling
normal_quad_v3 to output into a mapped buffer, but normal_quad_v3
reads as well as writes.

This fix actually makes a huge performance difference with my drivers
(Gallium/Radeon).
2012-02-28 05:00:28 +00:00
Nicholas Bishop
79fbd39aab Remove DerivedMesh.getFaceMap and create_vert_face_map().
Not used anymore, both have BMesh replacements (DerivedMesh.getPolyMap
and create_vert_poly_map.)
2012-02-28 04:00:56 +00:00
Nicholas Bishop
bfc331dd75 BMesh: use MPoly rather than MFace in multiresModifier_base_apply 2012-02-28 03:54:31 +00:00
Nicholas Bishop
2a4cd1d203 Bugfix for clipping of SEARCH_MENU icon text.
For the preview-icon search menu (used for example in brush
selection), clip the text so that long names don't flow out into the
space between columns.
2012-02-28 01:55:27 +00:00
Campbell Barton
fa38c3dbac bmesh code cleanup - remove most of BKE_bmesh and remove BKE_bmeshCustomData.h. 2012-02-27 21:33:30 +00:00
Campbell Barton
d2cab3e8b0 move bmesh wiki docs into bmesh header and update doxygen.
also have doxygen ignore *.py files and fix some warnings.
2012-02-27 20:27:19 +00:00
Bastien Montagne
40fca4ed21 Quite a warning (unused param in func), was preventing debug build... 2012-02-27 18:20:58 +00:00
Bastien Montagne
49adbe3ab8 Various fixes to UI messages (among other things, all messages needed it should now be capitalized). 2012-02-27 18:14:56 +00:00
Campbell Barton
684a2c8dca fix for error in python context.copy(), calling in byttons view would raise an exception.
buttons view used incorrect return value. -1 is for valid but not set (could use defines/enum here).
2012-02-27 18:08:31 +00:00
Lukas Toenne
050428049f Implements a new operator for detaching nodes. In the process i overhauled the node muting system as well.
There are a number of features that use a kind of "internal linking" in nodes:
1. muting
2. delete + reconnect (restore link to/from node after delete)
3. the new detach operator (same as 2, but don't delete the node)

The desired behavior in all cases is the same: find a sensible mapping of inputs-to-outputs of a node. In the case of muting these links are displayed in red on the node itself. For the other operators they are used to relink connections, such that one gets the best possible ongoing link between previous up- and downstream nodes.

Muting previously used a complicated callback system to ensure consistent behavior in the editor as well as execution in compositor, shader cpu/gpu and texture nodes. This has been greatly simplified by moving the muting step into the node tree localization functions. Any muted node is now bypassed using the generalized nodeInternalRelink function and then removed from the local tree. This way the internal execution system doesn't have to deal with muted nodes at all, as if they are non-existent.

The same function is also used by the delete_reconnect and the new links_detach operators (which work directly in the editor node tree). Detaching nodes is currently keymapped as a translation variant (macro operator): pressing ALTKEY + moving node first detaches and then continues with regular transform operator. The default key is ALT+DKEY though, instead ALT+GKEY, since the latter is already used for the ungroup operator.
2012-02-27 17:38:16 +00:00
Antony Riakiotakis
d55c1d59f9 Fix: confirming edge slide with factor 0 and automerge turned on would delete the selected edges. Caused by automerging the edges with temporary geometry used for the operation, that was getting deleted later. Now deleting the temporary geometry before automerging. 2012-02-27 16:45:48 +00:00
Campbell Barton
96e0f18850 bmesh py api - loop vert/edge/face attributes. 2012-02-27 15:20:54 +00:00
Campbell Barton
4c3e3e93a9 bmesh minor api edits to be a little more typesafe. 2012-02-27 14:57:09 +00:00
Campbell Barton
130668b12f minor bmesh api naming edits. 2012-02-27 14:07:19 +00:00
Campbell Barton
e17bf02c2d Code Cleanup:
* made bmesh_structure.h function names more consistant.
* remove unused code in bmesh_structure.c
* removed 'Edge Flip' operator (missing from bmesh but looked into trunk feature and dont think its worth keeping).
* tagged  some BMESH_TODO's
2012-02-27 13:47:53 +00:00
Sergey Sharybin
08b35cda7f Select edge loop and edge rings operators can't be redone form history menu
so registering them seems to be kind of useless because things like deleting
edge loops with Shift-R command is impossible.

This commit will resolve issue #30375: Loop Select should not become a Redo History Item.
2012-02-27 12:53:23 +00:00
Sergey Sharybin
d7f0e29291 Few files had got +x mode which seems to be totally unnecessary. 2012-02-27 12:48:06 +00:00
Campbell Barton
21f1c99a78 update bmesh design doc and added some comments to the code from it. 2012-02-27 12:25:47 +00:00
Campbell Barton
47c373c7a9 style cleanup (mostly whitespace) 2012-02-27 10:35:39 +00:00
Campbell Barton
120297734b fix for emitting particles (needed tessfaces).
this fixes the cloud-gen addon.
2012-02-27 09:37:59 +00:00
Nicholas Bishop
8fcb66588b Code cleanup, remove redefinition of UNUSED macro.
Patch from Jason Wilkins:
http://projects.blender.org/tracker/index.php?func=detail&aid=30350&group_id=9&atid=127
2012-02-27 02:46:25 +00:00
Campbell Barton
c62a462997 use LIKELY/UNLIKELY macros for operations that run a lot. 2012-02-26 23:59:08 +00:00
Campbell Barton
3ba37b65a3 style cleanup 2012-02-26 22:38:49 +00:00
Daniel Stokes
b200c7a4df Fixing a crash when converting physics objects in the Game Engine. 2012-02-26 21:57:51 +00:00
Campbell Barton
7068fee2dd fix for a bmesh glitch when making a face (Fkey).
On a place, Ctrl+T, Fkey would create a quad overlapping the 2 Tris.

Now this case is checked for in a general way - if the bounds of the face are already filled in with faces (that _only_ use these edges-verts), then dont create the face.

This is an option for the 'edgenet_fill' operator, since creating the face isnt incorrect, just not-what-you-want mostly.

added functions
* BM_edge_share_vert - returns shared vert between 2 edges.
* BM_face_exists_multi, BM_face_exists_multi_edge - check if existing faces fill the edge bounds.
* also add BM_ELEM_INTERNAL_TAG so low level functions can tag without conflicting with higher level functions that also rely on tagging elements.
2012-02-26 21:32:20 +00:00
Campbell Barton
5cfab7f521 bmesh api name change, add _count suffix for BM_*_share functions. 2012-02-26 19:46:12 +00:00
Campbell Barton
c956e5d2d9 modified fix for "Fix [#30351] Solidify Modifier High Quality Normals fails." from r44464.
rather then recalc polygon normals - solidify is simple enough to just flip the normals of the copied faces, the rim faces normals are already re-calculated so copy them.
2012-02-26 18:12:01 +00:00
Campbell Barton
6bc7c30b93 fix for build error with non debug builds from last commit. 2012-02-26 17:24:04 +00:00
Campbell Barton
74e9563b8a * bmesh py api BMEdge.verts was using 2 v1's
* bmesh pu api __repr__ functions for mesh data.
* correct py hash defines.
2012-02-26 17:20:36 +00:00
Campbell Barton
03f5758b48 replace BMESH_ERROR with BMESH_ASSERT, most areas it was used are better suited to an assert anyway.
also tag all error cases as UNLIKELY() for better branch prediction.
2012-02-26 16:39:21 +00:00
Bastien Montagne
5970adaccf Fix [#30351] Solidify Modifier High Quality Normals fails.
Don't really know why, but appears we need to recalc normals when this option is ON.

Also small perf improvement (avoid to compute twice each face normals).
2012-02-26 15:38:28 +00:00
Campbell Barton
62f9959a8e replace bmesh_error with macro that gives the file/line/func the error happens on. 2012-02-26 14:57:41 +00:00
Sergey Sharybin
bed0257414 Fix #30254: VSE: no red warning border on metastrips with Extend (E) 2012-02-26 09:19:48 +00:00
Sergey Sharybin
f268918d50 Fix #30337: missed Set Origin for Metaball
Implemented Set Origin operator for Meta Balls.
2012-02-26 08:55:31 +00:00
Sergey Sharybin
8285fef0e8 Fixed for selected bundles drawing in 3D viewport:
- If track was hidded in clip editor it wasn't highlighted in 3d viewport
  even if it's selected.
- If two tracks has got the same bundle coordinate and one of them is
  selected it might not be highlighted in 3d viewport because of
  draw order.
2012-02-26 08:14:14 +00:00
Campbell Barton
d82c768cc7 bmesh py api, add another interpolation function.
BMVert.copy_from_vert_interp(vert_pair, fac)
2012-02-26 07:16:50 +00:00
Nicholas Bishop
e3877a625e Style cleanup: remove underscore prefix from CCG struct names. 2012-02-26 06:50:54 +00:00
Campbell Barton
1004b03578 bmesh - remove faces with <3 sides after dissolve/collapse (most tools already did this). 2012-02-26 05:48:12 +00:00
Campbell Barton
ff7ddb1925 change vertex dissolve not to collapse edges when its only connected to 2, rather then joining the faces on either side.
This way. IMHO is more useful since it means you can simplify the geometry between faces without joining them and it distinguishes vertex dissolve more from edge dissolve - which will join both faces still.
2012-02-26 05:04:30 +00:00
Nicholas Bishop
c5066df307 Code cleanup: clarify multiresModifier_disp_run modes.
Previously the function took 'invert' and 'add' parameters to indicate
what operation should be performed on the displacements, replaced
these with three named modes: APPLY_DISPLACEMENTS, CALC_DISPLACEMENTS,
and ADD_DISPLACEMENTS.
2012-02-26 04:40:56 +00:00
Campbell Barton
a631b5a651 fix for a bug in bmesh_jekv (and its main caller BM_vert_collapse_faces).
Collapsing an edge could result on 2 edges sharing the same verts, now check for this and 'splice' one edge into another.
2012-02-26 04:38:37 +00:00
Campbell Barton
ebeb815577 fix for vertex dissolve not doing anything with a single vertex on a single face.
now collapse the vertex into the edges.

also disable removing the vertrex when it could not be collapsed (old code), found it could would connected faces which isn't acceptable - now return fail in that case.
2012-02-26 00:43:47 +00:00
Campbell Barton
76acda4417 bmesh python api
* BMLoop attributes link_loop_next/prev
* BMVert.copy_from_face_interp
2012-02-25 23:56:20 +00:00
Campbell Barton
b4b7d809f1 bmesh code cleanup
* minor edits to header
* make BM_vert_dissolve() easier to read.
2012-02-25 23:41:31 +00:00
Campbell Barton
e20d09f079 fix [#30352] Dissolving a vert in an edgeloop (no faces) just deletes the verts killing connections
collapse the vertex into an edge when it has 2 edges connected to it.
2012-02-25 23:29:12 +00:00
Campbell Barton
c65b3b73fd bmesh api cleanup
* better type safety for BM_elem_flag_* and BM_elem_index_* functions.
* add BMElem type to be used where BMFace/Edge/Vert/Loop can be interchanged.
* fix bug in select manifold, found when making functions more strict.
2012-02-25 22:23:40 +00:00
Campbell Barton
72e1316dc4 minor style edits
- use GL_TRUE/FALSE for glLightModeli
- use set for python checks against multiple string values.
2012-02-25 21:27:45 +00:00
Campbell Barton
98aececc8e bmesh code cleanup
* change BMO_elem_flag_* defines to inline functions.
* BMO_slot_map_insert() is too big for an inline function - un-inline it.
* remove redundant casts.
2012-02-25 20:58:03 +00:00
Campbell Barton
55e68985e7 bmesh api:
* added BM_elem_flag_set, BMO_elem_flag_set. to avoid 'if(...) enable(); else disable();' all over the place.
* added bmesh_operator_api_inline.c, the header file was getting messy.
2012-02-25 19:43:51 +00:00
Campbell Barton
0096370db8 fix for own error edge tagging sharp. 2012-02-25 18:13:58 +00:00
Sergey Sharybin
79f9964cdb Changes in double side lighting usage
Disabled double-side lighting by default and changed areas which are using
double sided lighting to switch it off just after doing stuff which requires
double side.

This makes code a bit more simple to follow (no all that disabling double side
lighting all over the code and so).

This change also fixes crash of blender caused by intel gme965 driver which
leads to stack corruption in some place when double side lighting isn't
disabled (probably driver still kind of using double side in some areas or so).

Hopefully it'll also fix #30293: Converting Text to Mesh

Thanks to Campbell to assist writing this patch!
2012-02-25 18:09:39 +00:00
Campbell Barton
3fc2fbc333 style cleanup, use { on newline after function definition.
spelling 'impliment' -> 'implement'
2012-02-25 16:49:59 +00:00
Campbell Barton
6ca7d82932 code cleanup: white space, spelling & ';;' end of lines. 2012-02-25 16:04:03 +00:00
Campbell Barton
05725e7b6e bmesh py api - add funcs
* BMFace.copy_from_face_interp(face)
* BMLoop.copy_from_face_interp(face, vert=True, multires=True)

These are important for rebuilding geometry from existing faces without loosing UV's, vcols etc.
2012-02-25 15:51:39 +00:00
Campbell Barton
69cf6adb84 fix for own regression in r44361 (broke BM_vert_in_face)
also fix py api: bmesh.utils.face_split(face, v1, v2)
2012-02-25 14:56:37 +00:00
Campbell Barton
b366813e37 bugfix
* ntreeCompositExecTree accessed 'ntree' before NULL check.
* BM_face_triangulate accessed 'f' before NULL check.

also quiet warning in BKE_text_to_curve() and add a check for BMesh bridge loops so it knows quicker if it can copy loop data or not.
2012-02-25 09:06:17 +00:00
Campbell Barton
c955272ec5 code cleanup
* correct cmake/clang warning.
* use same include guard names as everywhere else for BLI math inline.
* correct define for madd_sh_shfl
2012-02-25 09:02:05 +00:00
Campbell Barton
57fd1fe00e remove redundant NULL check in draw_new_particle_system() 2012-02-25 08:37:51 +00:00
Juha Mäki-Kanto
2d8227f204 Collada export: bone parenting is actually against the tail.
Don't know the reasoning for having it be against the tail and not the head.
2012-02-24 21:45:59 +00:00
Juha Mäki-Kanto
adba42beaa Collada export: fix no polylist after bmesh-merge
Just needed a call to BKE_mesh_tessface_ensure when exporting geometries.
2012-02-24 21:15:58 +00:00
Joerg Mueller
697b494a30 Fix for #30336: Couldn't playback from Python without having played back via logic bricks once.
Thanks Colin Nickerson for reporting.
2012-02-24 19:34:29 +00:00
Campbell Barton
fbd6d4488e bmesh bridge - copy UVs and face data whem available. 2012-02-24 17:47:51 +00:00
Brecht Van Lommel
cf092e5a2f Python: add MeshLoop.index, same as already existed for vert/edge/face/poly. 2012-02-24 15:53:26 +00:00
Sergey Sharybin
ae38adbf55 Blender should now compile fine with older FFmpeg libraries used. 2012-02-24 15:34:57 +00:00
Sergey Sharybin
e04f32a153 More consistent variable naming. 2012-02-24 14:03:18 +00:00
Sergey Sharybin
baf485918b TODO item: zoom to mouse location in image editor 2012-02-24 14:01:42 +00:00
Campbell Barton
aca448f0b6 bmesh py api - fix for error creating a new face 2012-02-24 13:50:36 +00:00
Sergey Sharybin
3151ff825b Code clean-up and make zoom in/out operator store mouse coordinate
so exec() callback will zoom in/out properly.
2012-02-24 13:44:45 +00:00
Sergey Sharybin
826cb60731 CLIP_OT_view_zoom (Ctrl-MMB) now takes into account Zoom to Mouse Position setting 2012-02-24 13:31:18 +00:00
Campbell Barton
f7c9485605 bmesh python api:
bm.verts.get(verts) / bm.faces.get(verts)

 - use to find an edge or face from a vertex list passed.
2012-02-24 12:57:05 +00:00
Sergey Sharybin
aff0c6c0f4 Fixed crash in UV project modifier. 2012-02-24 12:30:49 +00:00
Campbell Barton
73e73ed1e0 change default name of Texture face layer to UVMap, while we fake UV's and texface as being the same. 2012-02-24 12:10:41 +00:00
Campbell Barton
c839ff3acb bmesh py api - bmesh.utils.face_flip 2012-02-24 11:04:09 +00:00
Campbell Barton
8c501c2248 bmesh: minor speedup, use 1 iterator rather then 2 when normalizing verts. 2012-02-24 10:40:32 +00:00
Campbell Barton
068566f985 bmesh py api - normal_update() functions for vert/edge/face. 2012-02-24 10:35:52 +00:00
Campbell Barton
c8d6b7759e bmesh py api, minor change - edges now take a seq of 2: bm.verts.new((v1, v2), example=None) 2012-02-24 10:17:30 +00:00
Campbell Barton
edb04d1461 bmesh docs now written in sphinx doc generator.
* http://www.blender.org/documentation/blender_python_api_2_62_0/bmesh.types.html
* http://www.blender.org/documentation/blender_python_api_2_62_0/bmesh.utils.html
2012-02-24 09:53:29 +00:00
Sergey Sharybin
dd0f151ba9 Changes in FFV1 codec settings
Since FFmpeg 0.10 release FFV1 codec supports alpha channel which is getting
enabled when using PIX_FMT_RGB32 pixel format. This leads to incompatibility of
videos rendered in Blender with almost all external players (especially in OSX).

Seems that PIX_FMT_BGR0 is recommended to be used to make videos compatible with
older players which doesn't support alpha channel in FFV1.

Also added an option to switch to RGBA rendering if FFV1 codec is used and if RGBA
rendering is used FFV1 will be using PIX_FMT_RGB32 format which supports alpha channel.
2012-02-24 09:49:44 +00:00
Campbell Barton
1fbd91b8a1 typo cleanup, no functional changes. 2012-02-24 06:44:04 +00:00
Campbell Barton
6b85b96952 bmesh py api (some api changes and doc additions)
* remove 'select' and 'hide' from BMLoop
* remove BMesh.update
* add BMesh.normal_update(skip_hidden=False)
* add BMElemSet.index_update(), eg: bm.verts.index_update()


bmesh api
* BM_mesh_normals_update() now takes skip_hidden as an argument
(previously this was default behavior), however this isnt good when
using BMesh modifiers, where you want all normals to be recalculated.
* add bm_iter_itype_htype_map[], to get the iter type from a BMesh
iterator.
2012-02-24 05:56:06 +00:00
Campbell Barton
b9b0c3dfb4 bmesh python api - add/improve rst docstrings. 2012-02-24 04:59:13 +00:00
Brecht Van Lommel
8aa569b52e Fix #30325: bmesh edges were marked as sharp by default, after recent
refactor to reuse BM_ELEM_SMOOTH flag for sharp flag.
2012-02-23 21:23:49 +00:00
Brecht Van Lommel
f39c149391 Fix #30268: cloth collision and springs not working after bmesh merge,
these cloth and collision modifiers require tesselation still.
2012-02-23 21:07:22 +00:00
Brecht Van Lommel
d7155295bb Fix #30326: calling e.g. bpy.ops.object.proxy_make(object = 'Lamp') would
not pick the right object. This operator had two properties "object" and
"type", but the latter was used while the former had the right description.
Now changed it to have only an "object" property, so that the above code works.
2012-02-23 20:31:51 +00:00
Sergey Sharybin
2254d2bdca Fix #30323: Graph view in the Movie Clip Editor does not stay open
In fact, Graph View wasn't been supposed to be opened in Clip show editor mode.
Made curves view unavailable from Clip view mode and store it's alignment in
a runtime flag in SpaceClip structure.
2012-02-23 18:51:24 +00:00
Campbell Barton
6871860cfe bmesh py api - ensure data layers to store bmesh pointers exist - removing all elements could free them for eg. 2012-02-23 17:22:37 +00:00
Campbell Barton
310af7d73f bmesh py api
bmesh.utils.face_join(faces)

added a utility function for converting a list of python BMesh elements into a C array.
use for this face_join as well as BMesh.faces.new()
2012-02-23 17:14:53 +00:00
Brecht Van Lommel
fdc01b49c2 Fix #30306: crash duplicating object with action actuator but no animation data. 2012-02-23 16:12:36 +00:00
Campbell Barton
107795af49 bmesh split tool (Ykey), was only splitting off faces, unlike EditMesh which could also split edges.
make this behavior optional and default to off (match EditMesh).
2012-02-23 16:00:53 +00:00
Campbell Barton
c6f340e6b0 previous fix wasnt working in edge mode, now selection +/- works in vert/edge/face modes. 2012-02-23 15:47:18 +00:00
Campbell Barton
668297c8b8 fix [#30318] increase/decrease selection won't work (select-more/less)
This was a problem with bmesh merge, now it works as expected again.
2012-02-23 15:22:29 +00:00
Brecht Van Lommel
75f3ff0534 Fix #30298: fluid simulation from older files not working when loaded into 2.62,
this was due to a wrong version patch which leaves simulation speed to 0.
2012-02-23 15:10:26 +00:00
Campbell Barton
6cfb67b549 fix for meshes not showing up in the game engine. 2012-02-23 14:24:45 +00:00
Campbell Barton
2fd226abe7 bmesh py api, added: bmesh.utils.edge_rotate(edge, ccw=False)
also improved docstrings.
2012-02-23 14:15:26 +00:00
Campbell Barton
bc5c5bbddc quiet error message when saving (WM_OT_save_as_mainfile.use_mesh_compat not found). 2012-02-23 13:14:59 +00:00
Sergey Sharybin
13e778893b Fix #30320: Shading issue with boolean modifier
Seems that after converting tessfaces into faces normals should be re-calculated.
At least that's what happening in some other modifiers and what makes boolean
work fine with smooth normals.
2012-02-23 12:28:18 +00:00
Campbell Barton
e164cddc43 adding icosphere was broken with own recent commit 2012-02-23 12:11:27 +00:00
Sergey Sharybin
edc1dde20d Segments and rings for UV Sphere were swapped. 2012-02-23 12:06:49 +00:00
Campbell Barton
7bc306c947 bmesh py api, new elements now take optional 'example' arguments, so the new data copies from the existing. 2012-02-23 11:27:22 +00:00
Campbell Barton
b8e019d839 use __ prefix on header guards to avoid mixing up defines with api functions / classes. 2012-02-23 10:41:31 +00:00
Nicholas Bishop
3dd449ae4f Bugfix: don't read from a write-only VBO when updating grid buffers. 2012-02-23 10:35:23 +00:00
Campbell Barton
3034971520 bmesh py api functions:
bmesh.utils.vert_collapse_edge, vert_collapse_faces, vert_dissolve, face_split
2012-02-23 10:29:04 +00:00
Campbell Barton
c3e192dcae bmesh api cleanup, remove unused header. 2012-02-23 10:24:20 +00:00
Sergey Sharybin
4662e40bfa Fix #30315: Temporary proxy files are not erased and old proxys are not updated if the proxy is built more then once (windows)
Two issues are fixed here:
- On windows rename() doesn't actually renames file if destination file is already exist.
  Solved by ulinking previously built proxy/timecode.
- IMB_TC_MAX_SLOT was set to incorrect value leading to record run timecode calculating
  several times.
2012-02-23 10:18:10 +00:00
Sergey Sharybin
d881bb4b32 BGE is compilable by MSVC again
Compilation error was mostly caused by trying to use namespace std before it was
actually defined (e.g. before any include of stl header).
It's not actually good idea to use namespaces in header files -- it's really easy to
run into namespace conflicts and so. Resolved by not using "using namespace" in header
files and using full quality accessing to stl collections (e.g. std::vector).
2012-02-23 09:40:10 +00:00
Campbell Barton
09ee59c669 bmesh minor api refactor
* BM_vert_in_face now loops over a vert's faces rather then every vert in the face.
* rename bmesh_radial_find_first_facevert --> bmesh_radial_find_first_faceloop
* rename bmesh_radial_find_next_facevert --> bmesh_radial_find_next_faceloop
* rename BM_vert_collapse_edges --> BM_vert_collapse_edge (only collapses one)
2012-02-23 09:26:53 +00:00
Thomas Dinges
bc02db27c5 * Fixed some typos in the code, patch [#30247] by Vladimir Rutsky (rutsky). Thanks! 2012-02-23 09:23:29 +00:00
Sergey Sharybin
5ccbe5a7d0 Refresh all cached ibmufs used by sequencer after all proxies are built.
Hopefully this will fix #30196: Proxies Not Visible in VSE Preview Window until Blender Reboot
2012-02-23 08:41:13 +00:00
Nicholas Bishop
1df41811ac Code cleanup: replace some common CCG operations with functions.
The new functions are ccg_gridsize, ccg_edgesize, ccg_spacing, and
ccg_edgebase. These target most of the left-shift operations in the
code.
2012-02-23 07:21:33 +00:00
Campbell Barton
0dc50a0e07 bmesh py api, new submodules
* bmesh.types, just allows access to BMVert, BMEdge etc.
* bmesh.utils, so far only added edge_split() function, this module will give access to mesh editing functions.
2012-02-23 05:20:09 +00:00
Campbell Barton
38f546a614 swap arg order for BM_edge_split(), makes sense to have edge as first
arg.
2012-02-23 05:17:07 +00:00
Campbell Barton
d232815481 - swap arg order for BM_face_copy() boolean options.
- use edge example for BM_face_split().
2012-02-23 04:26:24 +00:00
Campbell Barton
ecb6f13618 bmesh py api, more wrapped funcs:
* BMFace.copy(verts=True, faces=Trur)
* BMEdge.other_vert(vert)
2012-02-23 04:19:25 +00:00
Campbell Barton
30c62d9699 bmesh py api: functions for getting the area/angle/center of BMesh elements. 2012-02-23 03:39:39 +00:00
Campbell Barton
190f5d1787 code cleanup: dont set the namespace in STR_String.h - 'using namespace std', since this is included in many places. 2012-02-23 02:36:30 +00:00
Campbell Barton
c8b53d2aaf code style cleanup, no functional changes. 2012-02-23 02:23:42 +00:00
Campbell Barton
53fece44cf style cleanup for blenkernel, no functional changes. 2012-02-23 02:17:50 +00:00
Nicholas Bishop
c428bb4389 Move PBVH bitmap to separate header in blenlib.
The implementation was also changed in a couple ways: use unsigned
integers as its base type rather than unsigned chars, and uses macros
rather than functions. (These could be changed to inline functions.)

Currently it is still only used during PBVH building, but now it's
accessible elsewhere.
2012-02-22 23:57:31 +00:00
Nicholas Bishop
5e12c7feca Code cleanup: de-duplicate code in GPU_build_grid_buffers() with a macro. 2012-02-22 23:30:56 +00:00
Nicholas Bishop
5e29a67839 Code cleanup: split up some long functions in sculpt_undo.c.
Should be no functional changes.
2012-02-22 23:13:05 +00:00
Nicholas Bishop
fd87bf3ef6 Code cleanup: don't use GHash for GPU_build_mesh_buffers().
At the point where GPU_build_mesh_buffers is called, the
face_vert_indices map has already been built; it contains the same
data in an easier-to-access format.
2012-02-22 22:48:34 +00:00
Nicholas Bishop
78e1da961c Code cleanup: remove unused 'skip' field from PBVH iterator. 2012-02-22 22:41:08 +00:00
Nicholas Bishop
444885848d Code cleanup: move the PBVH iterator's initialization into a function.
Should be no functional changes, just shortens the amount of code
living in the macro.
2012-02-22 22:37:01 +00:00
Antony Riakiotakis
de595d995f fix scons compilation, hopefully for all platforms that have a problem. 2012-02-22 20:31:19 +00:00
Bastien Montagne
6c0361dff7 Armature pose evaluation: more factorization of code.
Now constraints' space conversion code also uses generic armature_mat_(pose_to_bone/bone_to_pose). Previous own function (constraint_pchan_diff_mat) was somewhat inconsistent too with Hinge/NoScale/LocalLocation options...
As with previous similar changes, this might break some old rigs, in very specific cases (when constraint-evaluating an hinge/noscale/local_location bone in local space).

In the same part of code, removed unnecessary matrices copying, mult_m4_m4m4 can take the same matrix as input and output, nowadays...

Also found a bug-generator weakness in those armature_mat_ functions (if both input and output mat where the same, result was wrong, now systematically copying input mat, as done in LIB's matrix funcs).

Finally, factorized offset bone matrix generation into its own small function too, as it is used in two different places in armature.c (pchan_to_pose_mat itself, and restpose's where_is_armature_bone).

Note: I think all parts of blender's code related to that topic have now been tackled, but yet have to check BGE, it’s probably using that stuff too, one way or the other...
2012-02-22 20:06:33 +00:00
Antony Riakiotakis
bb5e545bf4 Fix blenderplayer linking with recent additions to bmesh python. We should really start building with player on so that mistakes like this can be detected early. 2012-02-22 18:57:17 +00:00
Campbell Barton
1955407f7e code cleanyp - no functional changes. 2012-02-22 16:52:06 +00:00
Bastien Montagne
34e2fb40c7 More style edits (adding a space between statements and parenthesis, if (foo) blah;), to follow http://wiki.blender.org/index.php/User:Nazg-gul/CodeStyle proposition. 2012-02-22 16:21:17 +00:00
Campbell Barton
92c47145fd bmesh python api change in internal behavior.
* Only have 1 python object per bmesh, vertex, edge, loop, face.
* Store pointers back to the python data in a custom data layer so as not to use more memory for normal editing operations (when pythons not running).
* Currently this data is created and freed along with the BMesh PyObject.
* Incidentally - this fixes comparisons for bmesh elements which wasnt working before.
2012-02-22 16:08:30 +00:00
Bastien Montagne
b06beb6f35 Style code cleanup and consistancy (mainly spaces around assignements, C++ comments to C, and misc spaces/tabs cleanup). No functional change. 2012-02-22 15:35:42 +00:00
Campbell Barton
df83ce61bc fix 2 small bugs
* Ctrl+Click extrude wasnt normalizing the quaternion (was printing warnings)
* bmesh bevel was supposed to add a float layer and remove, but removing passed the mask define of the customdata layer.
2012-02-22 14:55:12 +00:00
Thomas Dinges
edab2e4b3d Multi File Output Node:
* Some small UI tweaks, grey out image settings rather than hide and made it a bit more compact.
2012-02-22 14:19:39 +00:00
Sergey Sharybin
f5f529e740 Fix freeing of NULL pointer in array modifier. 2012-02-22 13:15:29 +00:00
Sergey Sharybin
4ed01fe734 Fixed compilation error after recent node commit. 2012-02-22 12:59:43 +00:00
Campbell Barton
ccfcc70c8c add slice access to bmesh sequences.
eg:
 verts = bm.verts[1:-7]
2012-02-22 12:54:53 +00:00
Campbell Barton
5123238f7d BMesh-py attributes (readonly):
* is_valid (all types)
* is_wire (verts/edges)
* is_boundry (edge only)
* is_manifold (verts/edges)

also corrected own error, missed updating BMesh operator formatting char (broke erase only-faces)
2012-02-22 12:28:32 +00:00