blender-staging.git
7 years agoCode cleanup: split up some long functions in sculpt_undo.c.
Nicholas Bishop [Wed, 22 Feb 2012 23:13:05 +0000 (23:13 +0000)]
Code cleanup: split up some long functions in sculpt_undo.c.

Should be no functional changes.

7 years agoCode cleanup: don't use GHash for GPU_build_mesh_buffers().
Nicholas Bishop [Wed, 22 Feb 2012 22:48:34 +0000 (22:48 +0000)]
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.

7 years agoCode cleanup: remove unused 'skip' field from PBVH iterator.
Nicholas Bishop [Wed, 22 Feb 2012 22:41:08 +0000 (22:41 +0000)]
Code cleanup: remove unused 'skip' field from PBVH iterator.

7 years agoCode cleanup: move the PBVH iterator's initialization into a function.
Nicholas Bishop [Wed, 22 Feb 2012 22:37:01 +0000 (22:37 +0000)]
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.

7 years agofix scons compilation, hopefully for all platforms that have a problem.
Antony Riakiotakis [Wed, 22 Feb 2012 20:31:19 +0000 (20:31 +0000)]
fix scons compilation, hopefully for all platforms that have a problem.

7 years agoArmature pose evaluation: more factorization of code.
Bastien Montagne [Wed, 22 Feb 2012 20:06:33 +0000 (20:06 +0000)]
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...

7 years agoFix blenderplayer linking with recent additions to bmesh python. We should really...
Antony Riakiotakis [Wed, 22 Feb 2012 18:57:17 +0000 (18:57 +0000)]
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.

7 years agocode cleanyp - no functional changes.
Campbell Barton [Wed, 22 Feb 2012 16:52:06 +0000 (16:52 +0000)]
code cleanyp - no functional changes.

7 years agoMore style edits (adding a space between statements and parenthesis, if (foo) blah...
Bastien Montagne [Wed, 22 Feb 2012 16:21:17 +0000 (16:21 +0000)]
More style edits (adding a space between statements and parenthesis, if (foo) blah;), to follow wiki.blender.org/index.php/User:Nazg-gul/CodeStyle proposition.

7 years agobmesh python api change in internal behavior.
Campbell Barton [Wed, 22 Feb 2012 16:08:30 +0000 (16:08 +0000)]
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.

7 years agoStyle code cleanup and consistancy (mainly spaces around assignements, C++ comments...
Bastien Montagne [Wed, 22 Feb 2012 15:35:42 +0000 (15:35 +0000)]
Style code cleanup and consistancy (mainly spaces around assignements, C++ comments to C, and misc spaces/tabs cleanup). No functional change.

7 years agoCycles: improve the Oren-Nayar BSDF (roughness value for Diffuse), to avoid
Brecht Van Lommel [Wed, 22 Feb 2012 15:04:22 +0000 (15:04 +0000)]
Cycles: improve the Oren-Nayar BSDF (roughness value for Diffuse), to avoid
undesired dark rings, and give more accurate lighting when the light is
behind the object. As a bonus, the code is simpler & faster.

Patch by Yasuhiro Fujii, detailed explanation here:
http://mimosa-pudica.net/improved-oren-nayar.html

7 years agofix 2 small bugs
Campbell Barton [Wed, 22 Feb 2012 14:55:12 +0000 (14:55 +0000)]
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.

7 years agoMulti File Output Node:
Thomas Dinges [Wed, 22 Feb 2012 14:19:39 +0000 (14:19 +0000)]
Multi File Output Node:
* Some small UI tweaks, grey out image settings rather than hide and made it a bit more compact.

7 years agoFix freeing of NULL pointer in array modifier.
Sergey Sharybin [Wed, 22 Feb 2012 13:15:29 +0000 (13:15 +0000)]
Fix freeing of NULL pointer in array modifier.

7 years agoFixed compilation error after recent node commit.
Sergey Sharybin [Wed, 22 Feb 2012 12:59:43 +0000 (12:59 +0000)]
Fixed compilation error after recent node commit.

7 years agoadd slice access to bmesh sequences.
Campbell Barton [Wed, 22 Feb 2012 12:54:53 +0000 (12:54 +0000)]
add slice access to bmesh sequences.
eg:
 verts = bm.verts[1:-7]

7 years agoBMesh-py attributes (readonly):
Campbell Barton [Wed, 22 Feb 2012 12:28:32 +0000 (12:28 +0000)]
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)

7 years agoAdds a new node type for saving multiple image files from a single node.
Lukas Toenne [Wed, 22 Feb 2012 12:24:04 +0000 (12:24 +0000)]
Adds a new node type for saving multiple image files from a single node.

Unlike the existing file output node this node has an arbitrary number of
possible input slots. It has a base path string that can be set to a general
base folder. Every input socket then uses its name as an extension of the base
path for file organization. This can include further subfolders on top of the
base path. Example:

Base path: '/home/user/myproject'
Input 1: 'Compo'
Input 2: 'Diffuse/'
Input 3: 'details/Normals'

would create output files
in /home/user/myproject: Compo0001.png, Compo0002.png, ...
in /home/user/myproject/Diffuse: 0001.png, 0002.png, ... (no filename base
given)
in /home/user/myproject/details: Normals0001.png, Normals0002.png, ...

Most settings for the node can be found in the sidebar (NKEY). New input sockets
can be added with the "Add Input" button. There is a list of input sockets and
below that the details for each socket can be changed, including the sub-path
and filename. Sockets can be removed here as well. By default each socket uses
the render settings file output format, but each can use its own format if
necessary.

To my knowledge this is the first node making use of such dynamic sockets in
trunk. So this is also a design test, other nodes might use this in the future.

Adding operator buttons on top of a node is a bit unwieldy atm, because all node
operators generally work on selected and/or active node(s). The operator button
would therefore either have to make sure the node is  activated before the
operator is called (block callback maybe?) OR it has to store the node name
(risky, weak reference). For now it is only used in the sidebar, where only the
active node's buttons are displayed.

Also adds a new struct_type value to bNodeSocket, in order to distinguish
different socket types with the same data type (file inputs are SOCK_RGBA color
sockets). Would be nicer to use data type only for actual data evaluation, but
used in too many places, this works ok for now.

7 years agoFix #30290: Shape Keys not working as expected
Sergey Sharybin [Wed, 22 Feb 2012 12:11:56 +0000 (12:11 +0000)]
Fix #30290: Shape Keys not working as expected

New method of vertex shapekey propagation didn't restored coordinates in
me->mvert array which lead to unwanted deformation of basis mesh and
lead to issues like described in the report.

7 years agobmesh py api add connectivity attributes - to access adjacent data.
Campbell Barton [Wed, 22 Feb 2012 12:04:44 +0000 (12:04 +0000)]
bmesh py api add connectivity attributes - to access adjacent data.

7 years agobmesh py api - function to remove vert/edge/faces
Campbell Barton [Wed, 22 Feb 2012 11:52:56 +0000 (11:52 +0000)]
bmesh py api - function to remove vert/edge/faces

7 years agobmesh python api - add BMEdge.verts, also had to add VERTS_OF_EDGE iterator in bmesh...
Campbell Barton [Wed, 22 Feb 2012 11:31:07 +0000 (11:31 +0000)]
bmesh python api - add BMEdge.verts, also had to add VERTS_OF_EDGE iterator in bmesh's api.

7 years agobmesh py api - generalize bmesg sequences to use the iterator type and optionally...
Campbell Barton [Wed, 22 Feb 2012 10:41:07 +0000 (10:41 +0000)]
bmesh py api - generalize bmesg sequences to use the iterator type and optionally another bmesh element.

This allows BMFace.verts to be added without defining a new sequence type.

7 years agoinitial bmesh python api.
Campbell Barton [Wed, 22 Feb 2012 09:19:53 +0000 (09:19 +0000)]
initial bmesh python api.

corrently allows to create and loop over verts/edges/faces, access selection and selection modes.

this is still WIP, access to face, edge verts is still missing, no access to UV's, no access to editing operations yet.

When the api is ready it will be documented by sphinx like mathutils, blf, aud.

7 years agoutility functions to convert between flags / sets, without depending on RNA API.
Campbell Barton [Wed, 22 Feb 2012 09:15:46 +0000 (09:15 +0000)]
utility functions to convert between flags / sets, without depending on RNA API.

7 years agocorrect exception - was using a TypeError when should be a ValueError.
Campbell Barton [Wed, 22 Feb 2012 09:13:29 +0000 (09:13 +0000)]
correct exception - was using a TypeError when should be a ValueError.

7 years agoFix #30276: mesh subdivision shorcut with maya preset
Sergey Sharybin [Wed, 22 Feb 2012 08:25:14 +0000 (08:25 +0000)]
Fix #30276: mesh subdivision shorcut with maya preset

Added subdivisions shortcut for mesh editing mode to maya preset.
Not actually sure such shortcut present in Maya, but seems to be logical
to have it both object and edit modes.

7 years agoMade Maya keymap working again.
Sergey Sharybin [Wed, 22 Feb 2012 08:16:12 +0000 (08:16 +0000)]
Made Maya keymap working again.
Keypam for midpoint knife cutting was disabled for a while due to
midpoint toggle was moved to a model keymap and i'm not sure how to
start operator with midpoint enabled by default.

7 years agoFix #30231: Drag and Droping Parenting from Outliner giving unnecessary Loop Error
Sergey Sharybin [Wed, 22 Feb 2012 07:56:15 +0000 (07:56 +0000)]
Fix #30231: Drag and Droping Parenting from Outliner giving unnecessary Loop Error

In fact, error was much deeper and DND parenting in outliner used to parent all selected
objects to drop target, not just currently dragging object.

This was caused by code sharing between Parent Set operator and this DND operator which
was iterating all selected objects in scene and was setting parent to it.

Solved issue by separating actual parenting code which makes specified object be parented
to specified parent and moved iterating to Parent Set exec callback.

Now both of discovered issues (unneeded loop error and parenting all selected objects)
are solved, but more extensive testing of this changes are welcome.

7 years agoAttempt to fix scons compilation of blenderplayer.
Antony Riakiotakis [Wed, 22 Feb 2012 03:16:34 +0000 (03:16 +0000)]
Attempt to fix scons compilation of blenderplayer.
Added bmesh to player libraries and changed the priority of blenlib so as to avoid duplicate definitions (looks like there are actually functions defined twice that cause conflicts if one changes the order of linking...figures).

Only tested this on mingw-windows, I hope it works elsewhere too.

7 years agoStitch tool fully functional again. Many thanks to Howard Trickey for proposing the...
Antony Riakiotakis [Wed, 22 Feb 2012 00:06:15 +0000 (00:06 +0000)]
Stitch tool fully functional again. Many thanks to Howard Trickey for proposing the loop winding criterion for normal disambiguation of edges. Unfortunately some extra memory has to be allocated for this to work correctly. If the tool had been initially written for bmesh I would have used the already present adjacency information to make it work, avoiding some extra allocations. Maybe a project for another day though, when I am more proficient with bmesh internals.

7 years agochange UvElement to directly use BMLoop * instead of tfindex. This saves quite some...
Antony Riakiotakis [Tue, 21 Feb 2012 19:41:38 +0000 (19:41 +0000)]
change UvElement to directly use BMLoop * instead of tfindex. This saves quite some lookups on uv sculpting and stitching. Based on BMESH todo by Campbell, thanks for the idea!

7 years agouv stitch static island highlight ported to bmesh system.
Antony Riakiotakis [Tue, 21 Feb 2012 18:20:47 +0000 (18:20 +0000)]
uv stitch static island highlight ported to bmesh system.

Unfortunately since we are missing a way to tesselate uvs, the result will look good only on concave faces since we are essentially using a triangle fan to draw. When a tesselation of uv polygons is possible the tool should also change to use that instead. This will also influence the preview drawing code, coming next.

7 years agoText fix:
Ton Roosendaal [Tue, 21 Feb 2012 18:15:28 +0000 (18:15 +0000)]
Text fix:
Added #blender to list of recommended irc channels.

7 years agoRemove debug print code.
Sergey Sharybin [Tue, 21 Feb 2012 17:27:33 +0000 (17:27 +0000)]
Remove debug print code.
It was harmless because it ifdef-ed, but it's likelly not needed anymore.

7 years agoRemove unused code left from old multires interpolation stuff
Sergey Sharybin [Tue, 21 Feb 2012 17:24:21 +0000 (17:24 +0000)]
Remove unused code left from old multires interpolation stuff

- Removed validate() callback for MDisps layer. It wouldn't actually work
  correct from CustomData layer and all needed data might be validated from
  BMesh interpolation level. Also this callback was never actually used in
  BMesh, so can't see why we'll want to have it in structures.
- Removed layrInterp_mdisps callback. Interpolation now happens from
  another level (bmesh_interp) and this callback isn't needed anymore.
- Removed all function from multires.c which were used by old interpolation
  stuff and seems to be useless for other usages.
- multires_topology_changed is still marked as a TODO, Probably it's not
  needed anymore, buy better to keep for now until it'll be 100% clear this
  function isn't needed and all needed re-allocations happens in bmesh_interp.
  Otherwise, it'll be needed to be ported to new system.

7 years ago- Remove unused code in bmesh interpolation module and switch it to using mathutils
Sergey Sharybin [Tue, 21 Feb 2012 17:24:05 +0000 (17:24 +0000)]
- Remove unused code in bmesh interpolation module and switch it to using mathutils
  functions instead of own macros for vectors.
- Double precision isn't needed here at all. It only makes it impossible to use
  mathutils, adds extra float<->double conversions without any benefits.
  (current multires interpolation is already an approximate method and it can't
  be improved using double precision)

7 years agoImproved displacement flipping algorithm to work properly in cases when target grid...
Sergey Sharybin [Tue, 21 Feb 2012 17:23:32 +0000 (17:23 +0000)]
Improved displacement flipping algorithm to work properly in cases when target grid isn't orthogonal.

Subdivision of face now works pretty smooth, only producing minor unwanted displacement on the along edges.

7 years agoFlip displacement direction after interpolation in bmesh_loop_interp_mdisps
Sergey Sharybin [Tue, 21 Feb 2012 17:23:03 +0000 (17:23 +0000)]
Flip displacement direction after interpolation in bmesh_loop_interp_mdisps

This is needed because displacement might been interpolated from a grid
with different orientation and in this case X and Y components of displacement
are need to be flipped in needed order.

Order of flipping is determining by projecting source grids axis orientation
on target grid axis. This probably will give some unwanted artifacts when
interpolating non-planar face but currently can't think about better way
to determine how to flip displacement.

This commit makes operators like Subdivide works much more unpredictable
for sculpting data, but this stuff should be rethinked much more global
because current approach is not acceptable.

7 years agoFix part of #30272: cycles preview render not updating when changing particle
Brecht Van Lommel [Tue, 21 Feb 2012 16:34:00 +0000 (16:34 +0000)]
Fix part of #30272: cycles preview render not updating when changing particle
emission from with instanced objects.

7 years agoFix [#30281] Left/Right vertex weights flipped.
Bastien Montagne [Tue, 21 Feb 2012 14:45:18 +0000 (14:45 +0000)]
Fix [#30281] Left/Right vertex weights flipped.

Mirror modifier was flipping vgroups on org vertices, not mirrored ones!

7 years agoFix #30270, #30265: cycles not displaying textured objects, and not rendering
Brecht Van Lommel [Tue, 21 Feb 2012 14:39:59 +0000 (14:39 +0000)]
Fix #30270, #30265: cycles not displaying textured objects, and not rendering
text/curve objects after the bmesh merge. Also removed a debug print.

7 years agoSomehow typo was made just before commit in previous patch.
Sergey Sharybin [Tue, 21 Feb 2012 13:00:58 +0000 (13:00 +0000)]
Somehow typo was made just before commit in previous patch.

7 years agoCamera tracing: search area was always centered to marker's position when tracking
Sergey Sharybin [Tue, 21 Feb 2012 12:59:52 +0000 (12:59 +0000)]
Camera tracing: search area was always centered to marker's position when tracking

7 years agoAnother fix for non-VBO flat-shading in sculpt mode, this time for non-multires meshes.
Nicholas Bishop [Tue, 21 Feb 2012 04:24:30 +0000 (04:24 +0000)]
Another fix for non-VBO flat-shading in sculpt mode, this time for non-multires meshes.

As with multires, this change calculates face normals rather than
using vertex normals when the node is flat-shaded.

Flat-shading with VBO on non-multires meshes is still wrong, but
fixing that would require larger changes to our vertex buffers.

7 years agoRemove call to GPU_update_mesh_buffers from GPU_build_mesh_buffers.
Nicholas Bishop [Tue, 21 Feb 2012 04:16:27 +0000 (04:16 +0000)]
Remove call to GPU_update_mesh_buffers from GPU_build_mesh_buffers.

Building the mesh buffers already gets the PBVH_UpdateDrawBuffers flag
set, so this was double-updating the vertex buffer.

7 years agofix [#30264] B-Mesh: Crash when unwrapping ngon mesh with Smart UV project
Campbell Barton [Tue, 21 Feb 2012 03:43:57 +0000 (03:43 +0000)]
fix [#30264] B-Mesh: Crash when unwrapping ngon mesh with Smart UV project

7 years agoremove NGon Interp modifier (which was merged as apart of BMesh),
Campbell Barton [Mon, 20 Feb 2012 23:24:57 +0000 (23:24 +0000)]
remove NGon Interp modifier (which was merged as apart of BMesh),
this didnt really give any advantage over subsurf's Simple-Subdiv mode.

7 years agocopy over a change from bmesh branch that was needed for lightmap unpack to work...
Campbell Barton [Mon, 20 Feb 2012 22:58:00 +0000 (22:58 +0000)]
copy over a change from bmesh branch that was needed for lightmap unpack to work, also tag some rna vars as unused.

7 years agoDone BMESH_TODO in object/object_vgroup.c (make getSurroundingVerts() use polys/loops...
Bastien Montagne [Mon, 20 Feb 2012 22:16:20 +0000 (22:16 +0000)]
Done BMESH_TODO in object/object_vgroup.c (make getSurroundingVerts() use polys/loops instead of tessfaces).

Also done a few optimizations of related code (OBJECT_OT_vertex_group_fix operator).

7 years agofix for leak in gpu.export_shader(), wasnt freeing the function.
Campbell Barton [Mon, 20 Feb 2012 22:04:29 +0000 (22:04 +0000)]
fix for leak in gpu.export_shader(), wasnt freeing the function.

also change the bmesh iterator so its possible to initialize without stepping.

7 years agoFix normals for flat-shaded non-VBO sculpt drawing.
Nicholas Bishop [Mon, 20 Feb 2012 21:25:24 +0000 (21:25 +0000)]
Fix normals for flat-shaded non-VBO sculpt drawing.

Example here, original on left, fixed normals on right:
http://www.pasteall.org/pic/show.php?id=26925

7 years agoFix broken predivide option for reading in images, patch by Troy Sobotka.
Brecht Van Lommel [Mon, 20 Feb 2012 20:55:30 +0000 (20:55 +0000)]
Fix broken predivide option for reading in images, patch by Troy Sobotka.

7 years agoAnother fix for using boolean slot as integer. This time in dissolve operator.
Sergey Sharybin [Mon, 20 Feb 2012 15:58:01 +0000 (15:58 +0000)]
Another fix for using boolean slot as integer. This time in dissolve operator.

7 years agoFix #30263: tweak threshold option in user preferences was incorrectly placed
Brecht Van Lommel [Mon, 20 Feb 2012 15:29:02 +0000 (15:29 +0000)]
Fix #30263: tweak threshold option in user preferences was incorrectly placed
under NDOF settings, but it's a mouse/tablet setting. Patch by Tobias Johansson.

7 years agoFix cmake warning on Mac, when not using Xcode generator.
Brecht Van Lommel [Mon, 20 Feb 2012 14:19:45 +0000 (14:19 +0000)]
Fix cmake warning on Mac, when not using Xcode generator.

7 years agoFix: cycles crash with multiple OpenCL platforms installed, tracked down by Sergey.
Brecht Van Lommel [Mon, 20 Feb 2012 14:19:34 +0000 (14:19 +0000)]
Fix: cycles crash with multiple OpenCL platforms installed, tracked down by Sergey.

7 years agoFixed incorrect accessing to use_restrict as to integer slot instead of boolean
Sergey Sharybin [Mon, 20 Feb 2012 14:18:14 +0000 (14:18 +0000)]
Fixed incorrect accessing to use_restrict as to integer slot instead of boolean

7 years agoFixed blenderplayer compile for msvc.
Miika Hamalainen [Mon, 20 Feb 2012 08:06:24 +0000 (08:06 +0000)]
Fixed blenderplayer compile for msvc.

7 years agoadd type check asserts for bmesh operator get/set funcs so errors wont fail silently.
Campbell Barton [Mon, 20 Feb 2012 02:04:13 +0000 (02:04 +0000)]
add type check asserts for bmesh operator get/set funcs so errors wont fail silently.

7 years agoadded boolean type for bmesh operators, will make python wrapping clearer and also...
Campbell Barton [Mon, 20 Feb 2012 01:52:35 +0000 (01:52 +0000)]
added boolean type for bmesh operators, will make python wrapping clearer and also makes existing calls more obvious.

also corrected some error reports.

7 years agofix [#30266] B-Mesh: Issue with Weight Painting
Campbell Barton [Mon, 20 Feb 2012 00:18:35 +0000 (00:18 +0000)]
fix [#30266] B-Mesh: Issue with Weight Painting

thanks to Nicholas Bishop for finding the cause of the problem.

don't tesselate on load, this means me->mface will be NULL by default.

we may need to have this set if existing uses of this array are not resolved before release - so add a define USE_TESSFACE_DEFAULT, to change this easily.

this is a rather indirect fix - need to take care here.

7 years agominor edits to have the game engine and player building.
Campbell Barton [Sun, 19 Feb 2012 23:36:10 +0000 (23:36 +0000)]
minor edits to have the game engine and player building.

7 years agofor bake check polygon texface (not tessface-texface)
Campbell Barton [Sun, 19 Feb 2012 22:55:37 +0000 (22:55 +0000)]
for bake check polygon texface (not tessface-texface)

7 years agofix harmless but annoying memory leak prints, "newmem", now free all scanfill memory...
Campbell Barton [Sun, 19 Feb 2012 22:36:24 +0000 (22:36 +0000)]
fix harmless but annoying memory leak prints, "newmem", now free all scanfill memory on exit.

7 years ago- remove some unused editmesh functions.
Campbell Barton [Sun, 19 Feb 2012 22:17:30 +0000 (22:17 +0000)]
- remove some unused editmesh functions.
- copy & rename EditMesh stricts for use with scanfill (remove unused members)

7 years agoBugfix (missed one code line): Copy paste induced bug found by Sv. Lockal.
Daniel Genrich [Sun, 19 Feb 2012 21:15:12 +0000 (21:15 +0000)]
Bugfix (missed one code line): Copy paste induced bug found by Sv. Lockal.

Thank you for pointing this out!

7 years agoBugfix: Copy paste induced bug found by Sv. Lockal.
Daniel Genrich [Sun, 19 Feb 2012 20:59:46 +0000 (20:59 +0000)]
Bugfix: Copy paste induced bug found by Sv. Lockal.

Thank you for pointing this out!

7 years agoB-Mesh:
Thomas Dinges [Sun, 19 Feb 2012 20:29:04 +0000 (20:29 +0000)]
B-Mesh:
* Remove Doubles was missing the info how many vertices were removed, added that back.

7 years agomoved select interior faces into a C function (was python)
Campbell Barton [Sun, 19 Feb 2012 20:27:30 +0000 (20:27 +0000)]
moved select interior faces into a C function (was python)

7 years agoSmoke
Daniel Genrich [Sun, 19 Feb 2012 20:05:01 +0000 (20:05 +0000)]
Smoke
------
New: Child particles are used as emitter.

Based on the patch #30013 by Kai Kostack. Thank you!

Please do test this code!

7 years agoremove more unused files.
Campbell Barton [Sun, 19 Feb 2012 19:32:41 +0000 (19:32 +0000)]
remove more unused files.

7 years agoremove files no longer used since bmesh merge.
Campbell Barton [Sun, 19 Feb 2012 19:27:06 +0000 (19:27 +0000)]
remove files no longer used since bmesh merge.

7 years agoBMesh Merge
Campbell Barton [Sun, 19 Feb 2012 19:12:36 +0000 (19:12 +0000)]
BMesh Merge
===========

initial merge from BMesh branch,

this replaces the existing mesh format and editmode data structures, for more info see:
http://wiki.blender.org/index.php/Dev:2.6/Source/Modeling/BMesh

this is the work of quite a few developers over the years.

Key Contributors
================

* Geoffrey Bantle (aka) Briggs, original author.
* Joe Eager (aka) joeedh

More recently
* Howard Trickey
* Ender79 aka Ender79 :)

What to Expect
==============

In general blender shouldnt crash on files or totally fail to load scenes,
painting tools etc have been tested to work.

* its quite easy to make the tesselator fail (show holes, missing faces), with non planer ngons.
* most modifiers are working fine but a few had to be re-written - bevel, array - array is much slower, bevel will probably be changed to match trunk soon.
* NavMesh BGE feature isn't functional yet.
* Some UV sticth tools still need porting.
* hair doesnt work right on ngons yet.
* many python scripts will break.
* a python api to BMesh needs to be written still.

(for todo's in code do a searh for BMESH_TODO)

7 years agomisc changes from trunk (avoid confusion since these were not intentional differences)
Campbell Barton [Sun, 19 Feb 2012 18:41:30 +0000 (18:41 +0000)]
misc changes from trunk (avoid confusion since these were not intentional differences)

7 years agocopying bmesh dir on its own from bmesh branch
Campbell Barton [Sun, 19 Feb 2012 18:31:04 +0000 (18:31 +0000)]
copying bmesh dir on its own from bmesh branch

7 years agosvn merge ^/trunk/blender -r44235:44250
Campbell Barton [Sun, 19 Feb 2012 17:59:30 +0000 (17:59 +0000)]
svn merge ^/trunk/blender -r44235:44250

7 years agoFix #30230, Crash after importing collada file
Juha Mäki-Kanto [Sun, 19 Feb 2012 17:55:09 +0000 (17:55 +0000)]
Fix #30230, Crash after importing collada file

On collada import a -1 layer_index from CustomData_get_layer_index (CD_MTFACE) was used.
This then managed to overwrite last mface's data with uv-set's name so at least it gave a clue where to look for :]

7 years agofix for bug where particle system would fail when the original mesh had no tessface's
Campbell Barton [Sun, 19 Feb 2012 17:44:36 +0000 (17:44 +0000)]
fix for bug where particle system would fail when the original mesh had no tessface's

7 years agosync some changes with trunk and rename bmeshutils.c
Campbell Barton [Sun, 19 Feb 2012 17:11:40 +0000 (17:11 +0000)]
sync some changes with trunk and rename bmeshutils.c

7 years agorebane files to match trunk.
Campbell Barton [Sun, 19 Feb 2012 16:54:53 +0000 (16:54 +0000)]
rebane files to match trunk.

7 years agoMore pose armature code factorization:
Bastien Montagne [Sun, 19 Feb 2012 11:09:44 +0000 (11:09 +0000)]
More pose armature code factorization:
* New armature_mat_bone_to_pose, which is just the reverse of armature_mat_pose_to_bone (currently used by armature evaluation code only, but might be used by constraints space conversion code too, see note below).
* Found another place where another (a bit erroneous) pose_to_bone code existed (apply_targetless_ik(), in transform_conversion.c, used by "auto ik" option), replaced it by a call to armature_mat_pose_to_bone.

Notes:
* All those changes leave many #if 0 commented code, I will remove those in a few weeks.
* There is at least one other place where generic armature_mat_(pose_to_bone/bone_to_pose) functions should be usable: the space conversion function of constraints (constraint_mat_convertspace(), in BKE's constraint.c), but here I have some problems (old code is also somewhat erroneous, but using new one makes old rigs using bone space constraints wrong, e.g. sintel one, and it’s just impossible to make conversion code...). So I'll wait and investigate more for this one.

7 years agoReload movie clip to ensure all cache and prefetched Ffmpeg frames are properly
Sergey Sharybin [Sun, 19 Feb 2012 08:09:10 +0000 (08:09 +0000)]
Reload movie clip to ensure all cache and prefetched Ffmpeg frames are properly
updating after proxy building is finished.

7 years agoProxies: FFmpeg proxy builder wasn't taking image quality into account at all
Sergey Sharybin [Sun, 19 Feb 2012 08:02:05 +0000 (08:02 +0000)]
Proxies: FFmpeg proxy builder wasn't taking image quality into account at all
which made it using default quality settings which are really bad for camera
tracking (and perhaps for CSE too).

haven't found Jpeg quality setting for FFmpeg which will behave in the same way
as quality setting for image sequence, but seems that mapping image quality
from 1..100 UI range to 31..1 range of qmin/qmax gives expected result.

--
svn merge -r44228:44230 ^/branches/soc-2011-tomato

7 years agostyle cleanyp: split > 120 width lines.
Campbell Barton [Sun, 19 Feb 2012 06:00:20 +0000 (06:00 +0000)]
style cleanyp: split > 120 width lines.

7 years agofix for incorrect check to find largest axis (was checking Y twice, not Z).
Campbell Barton [Sun, 19 Feb 2012 05:17:55 +0000 (05:17 +0000)]
fix for incorrect check to find largest axis (was checking Y twice, not Z).

7 years agoreplace MIN2 / MAX2 with minf / maxf to avoid calling functions multiple times.
Campbell Barton [Sun, 19 Feb 2012 05:11:24 +0000 (05:11 +0000)]
replace MIN2 / MAX2 with minf / maxf to avoid calling functions multiple times.

7 years agofix for issue with bevel when the 2 edges form a straight line. this isnt really...
Campbell Barton [Sun, 19 Feb 2012 04:13:52 +0000 (04:13 +0000)]
fix for issue with bevel when the 2 edges form a straight line. this isnt really fixing the bigger problems but the error did show up baddly as an artifact.

7 years agosvn merge ^/trunk/blender -r44213:44235 --- fixes bmesh shading bug [#30125]
Campbell Barton [Sun, 19 Feb 2012 03:19:58 +0000 (03:19 +0000)]
svn merge ^/trunk/blender -r44213:44235   --- fixes bmesh shading bug [#30125]

7 years agoChange texface draw to always use glShadeModel(GL_SMOOTH), with texface draw.
Campbell Barton [Sun, 19 Feb 2012 03:10:11 +0000 (03:10 +0000)]
Change texface draw to always use glShadeModel(GL_SMOOTH), with texface draw.

without this each face would get a solid color, this is the same method used in object mode.

also copy BLI_array.h fix from bmesh branch.

7 years agoskip per face texface poly lookup while drawing when the layer isnt found.
Campbell Barton [Sun, 19 Feb 2012 02:54:50 +0000 (02:54 +0000)]
skip per face texface poly lookup while drawing when the layer isnt found.

also remove some unused code.

7 years agoleft print in by mistake
Campbell Barton [Sun, 19 Feb 2012 01:52:59 +0000 (01:52 +0000)]
left print in by mistake

7 years agoedit-derived-mesh had a table for vert/edge/face lookups - that were never used.
Campbell Barton [Sun, 19 Feb 2012 01:51:36 +0000 (01:51 +0000)]
edit-derived-mesh had a table for vert/edge/face lookups - that were never used.

removed these and replaced them with calls to BM_vert_at_index, BM_edge_at_index - which are not ideal but same as trunk does.

7 years agoFix rest of #27022, collada export: add bone parenting of objects
Juha Mäki-Kanto [Sat, 18 Feb 2012 16:55:41 +0000 (16:55 +0000)]
Fix rest of #27022, collada export: add bone parenting of objects

- SceneExporter collects a list of child-objects for armature-object and passes it onto ArmatureExporter
- SceneExporter's writeNodes is then called from ArmatureExporter for matching child-objects for bone.
- ArmatureExporter removes written child-objects from list, objects not exported as being bone parented are exported as direct children of the armature-node.
- Should play nice with current Second Life-compatibility.

A nicer implementation would require some design changes, will have to wait.

7 years agoWring scaling and precision error in previous commit.
Sergey Sharybin [Sat, 18 Feb 2012 16:42:19 +0000 (16:42 +0000)]
Wring scaling and precision error in previous commit.

7 years agoProxies: FFmpeg proxy builder wasn't taking image quality into account at all
Sergey Sharybin [Sat, 18 Feb 2012 16:23:34 +0000 (16:23 +0000)]
Proxies: FFmpeg proxy builder wasn't taking image quality into account at all
which made it using default quality settings which are really bad for camera
tracking (and perhaps for CSE too).

haven't found Jpeg quality setting for FFmpeg which will behave in the same way
as quality setting for image sequence, but seems that mapping image quality
from 1..100 UI range to 31..1 range of qmin/qmax gives expected result.

7 years agoCollada export: changes to joints/weights in skincontroller
Juha Mäki-Kanto [Sat, 18 Feb 2012 16:20:24 +0000 (16:20 +0000)]
Collada export: changes to joints/weights in skincontroller

- Collecting joints/weights in one place, it's easier to exclude zero weights or vertexgroups with no matching bone than trying to match same logic in multiple places.
- Still not exporting -1 joints for vertices without weights, but also not outputting -1 joint + weight for each vertexgroup without a matching bone.
- The exported weights are now normalized.

Last I tested this patch stopped 3ds Max crashing on import of file from #29465 (opencollada / internal .dae).

7 years agoMerging r44140 through r44226 from trunk into soc-2011-tomato
Sergey Sharybin [Sat, 18 Feb 2012 16:12:22 +0000 (16:12 +0000)]
Merging r44140 through r44226 from trunk into soc-2011-tomato

7 years agoMinor change collada export; don't even run the parentinv-test when ob->parent is...
Juha Mäki-Kanto [Sat, 18 Feb 2012 15:41:09 +0000 (15:41 +0000)]
Minor change collada export; don't even run the parentinv-test when ob->parent is NULL