Commit Graph

30152 Commits

Author SHA1 Message Date
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
f5f529e740 Fix freeing of NULL pointer in array modifier. 2012-02-22 13:15:29 +00:00
4ed01fe734 Fixed compilation error after recent node commit. 2012-02-22 12:59:43 +00:00
ccfcc70c8c add slice access to bmesh sequences.
eg:
 verts = bm.verts[1:-7]
2012-02-22 12:54:53 +00:00
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
Lukas Toenne
3bae60d0c9 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.
2012-02-22 12:24:04 +00:00
dadc2a26e3 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.
2012-02-22 12:11:56 +00:00
0ca14d9558 bmesh py api add connectivity attributes - to access adjacent data. 2012-02-22 12:04:44 +00:00
361de47cf5 bmesh py api - function to remove vert/edge/faces 2012-02-22 11:52:56 +00:00
91353bc716 bmesh python api - add BMEdge.verts, also had to add VERTS_OF_EDGE iterator in bmesh's api. 2012-02-22 11:31:07 +00:00
e0a6d273d0 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.
2012-02-22 10:41:07 +00:00
e7d98179ea 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.
2012-02-22 09:19:53 +00:00
3788adb8cb utility functions to convert between flags / sets, without depending on RNA API. 2012-02-22 09:15:46 +00:00
1f40f01435 correct exception - was using a TypeError when should be a ValueError. 2012-02-22 09:13:29 +00:00
e5d4e0f69b 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.
2012-02-22 07:56:15 +00:00
9ca3084d4d 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.
2012-02-22 03:16:34 +00:00
c7185d2652 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. 2012-02-22 00:06:15 +00:00
a4e6967323 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! 2012-02-21 19:41:38 +00:00
9c3710df1f 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.
2012-02-21 18:20:47 +00:00
3663bd580f Remove debug print code.
It was harmless because it ifdef-ed, but it's likelly not needed anymore.
2012-02-21 17:27:33 +00:00
9064978d0b 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.
2012-02-21 17:24:21 +00:00
4041c57756 - 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)
2012-02-21 17:24:05 +00:00
debd32d336 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.
2012-02-21 17:23:32 +00:00
b2fd08c754 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.
2012-02-21 17:23:03 +00:00
3efe399ed4 Fix part of #30272: cycles preview render not updating when changing particle
emission from with instanced objects.
2012-02-21 16:34:00 +00:00
1b0802265c Fix [#30281] Left/Right vertex weights flipped.
Mirror modifier was flipping vgroups on org vertices, not mirrored ones!
2012-02-21 14:45:18 +00:00
d47b018f8d Fix #30270, #30265: cycles not displaying textured objects, and not rendering
text/curve objects after the bmesh merge. Also removed a debug print.
2012-02-21 14:39:59 +00:00
c8de268e1b Camera tracing: search area was always centered to marker's position when tracking 2012-02-21 12:59:52 +00:00
88a2be1846 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.
2012-02-21 04:24:30 +00:00
a6dc47b0ca 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.
2012-02-21 04:16:27 +00:00
3c38830013 fix [#30264] B-Mesh: Crash when unwrapping ngon mesh with Smart UV project 2012-02-21 03:43:57 +00:00
89a5cf40e3 remove NGon Interp modifier (which was merged as apart of BMesh),
this didnt really give any advantage over subsurf's Simple-Subdiv mode.
2012-02-20 23:24:57 +00:00
71146bf93b copy over a change from bmesh branch that was needed for lightmap unpack to work, also tag some rna vars as unused. 2012-02-20 22:58:00 +00:00
6d3cdbe0e5 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).
2012-02-20 22:16:20 +00:00
c4e7cc3287 fix for leak in gpu.export_shader(), wasnt freeing the function.
also change the bmesh iterator so its possible to initialize without stepping.
2012-02-20 22:04:29 +00:00
d31e1533a3 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
2012-02-20 21:25:24 +00:00
83aeb9cbd5 Fix broken predivide option for reading in images, patch by Troy Sobotka. 2012-02-20 20:55:30 +00:00
3bcca01c24 Another fix for using boolean slot as integer. This time in dissolve operator. 2012-02-20 15:58:01 +00:00
5c14048600 Fixed incorrect accessing to use_restrict as to integer slot instead of boolean 2012-02-20 14:18:14 +00:00
a921d9d22b Fixed blenderplayer compile for msvc. 2012-02-20 08:06:24 +00:00
2421058379 add type check asserts for bmesh operator get/set funcs so errors wont fail silently. 2012-02-20 02:04:13 +00:00
1953f042e6 added boolean type for bmesh operators, will make python wrapping clearer and also makes existing calls more obvious.
also corrected some error reports.
2012-02-20 01:52:35 +00:00
818e19713a 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.
2012-02-20 00:18:35 +00:00
40c59b1a3d minor edits to have the game engine and player building. 2012-02-19 23:36:10 +00:00
e9f93b9117 for bake check polygon texface (not tessface-texface) 2012-02-19 22:55:37 +00:00
1cad189e32 fix harmless but annoying memory leak prints, "newmem", now free all scanfill memory on exit. 2012-02-19 22:36:24 +00:00
a368e6771a - remove some unused editmesh functions.
- copy & rename EditMesh stricts for use with scanfill (remove unused members)
2012-02-19 22:17:30 +00:00
56e41a3ef0 B-Mesh:
* Remove Doubles was missing the info how many vertices were removed, added that back.
2012-02-19 20:29:04 +00:00
0fd176e03d moved select interior faces into a C function (was python) 2012-02-19 20:27:30 +00:00
d8a70df8cc Smoke
------
New: Child particles are used as emitter. 

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

Please do test this code!
2012-02-19 20:05:01 +00:00