Commit Graph

30633 Commits

Author SHA1 Message Date
Campbell Barton
8b7ea6fc90 bmesh py api:
access to MLoopCol as mathutils.Color type
2012-03-17 19:34:02 +00:00
Peter Schlaile
8bf1615ce3 == Sequencer ==
Bugfix: [#28159] sequencer strip crop values on proxy not scene render size

Also: IMB saturation change moved into imbuf-module.
2012-03-17 19:31:28 +00:00
Bastien Montagne
02abb636a3 UI messages: unification of select/deselect stuff.
Previously we had three versions, Select/Deselect, Select or Deselect, and (De)select, choosen the third (shortest) one for now.
2012-03-17 19:14:08 +00:00
Howard Trickey
8d3e79ddc9 Fix 30562: bevel was infinite looping when adjacent faces had incompatible normals
The fix is to check for cases where BME_Bevel_Dissolve_Disk was trying
to join faces with opposite normals and reverse one.  This isn't a great
fix, and the example blend has strange corners at the top after beveling,
but at least it stops the infinite loops.
2012-03-17 15:47:48 +00:00
Bastien Montagne
7bc693d107 Big step forward nodes UI translation:
*Add menu is now translated.
*Nodes' title is now translated.
*Nodes' sockets' labels are now translated.

However, about the last point, and unless I’m mistaking, we’ll have to add the "i18n tag" N_() to all sockets' names, in the input/ouput templates declaration, in all nodes' files, as those sockets are collections created at runtime, I think po-generating script has no way to access that from bpy.types... Quite a piece of (borring) work. :/
2012-03-17 14:42:44 +00:00
Bastien Montagne
1f6ae5e4fb Minor UI messages fixes, and enabling i18n for all modifier_setError() error messages. 2012-03-17 14:27:46 +00:00
Jens Verwiebe
e4cc4b3e95 compile fix for 44939 2012-03-17 12:32:36 +00:00
Bastien Montagne
788b47b788 Fix for yesterday i18n own commit (r44924): we now need to define WITH_INTERNATIONAL everywhere TIP_/IFACE_ macros are used (else, we get non-international, dummy NOP macros instead!).
Also fixed in main CMakeList file, when no addon dir found, we want to disable WITH_PYTHON (I guess, certainly not WITH_INTERNATIONAL ;) ).
2012-03-17 12:07:58 +00:00
Campbell Barton
02f707e9da minor mathutils code cleanup - use mathutils callbacks as unsigned chars everywhere. 2012-03-17 10:46:02 +00:00
Bastien Montagne
1fc345cd32 Make grumpy gcc happy again! :p 2012-03-17 10:23:44 +00:00
Campbell Barton
29831ca087 bmesh py api:
added per loop UV layer access
2012-03-17 06:40:44 +00:00
Arystanbek Dyussenov
8634d0e9c1 #collada instance_node import, partially fixes #27629
Patch applied in r37663 caused loss of <instance_node>s.

All parts of the smaller test file attached in the report now import.
2012-03-17 06:37:26 +00:00
Campbell Barton
757c0af9c6 bmesh py api:
split up BMElemSeq into BMVertSeq, BMEdgeSeq, BMFaceSeq and BMLoopSeq

 Was becoming cumbersome since each needed their own new() function, and other methods only worked for some of these types.

Added BMesh.loops - since you cant iterate over loops this is for customdata access only.
2012-03-17 04:43:32 +00:00
Nicholas Bishop
3d87c23f4f Reduce poly map memory usage (used by sculpt smooth brush.)
Changed the create_vert_poly_map function to return a more compact
structure. Memory saved will vary depending on the mesh, but typically
it should be about one third of the old size.
2012-03-17 04:41:36 +00:00
Campbell Barton
681e023cb0 minor improvement to image info color sample drawing, draw a grey outline. 2012-03-16 23:44:08 +00:00
Nicholas Bishop
52418868eb Fix for size of VBO index type when drawing multires in sculpt mode.
The VBO index type can be either ushort or uint depending on the grid
size. The comparison was checking how many quads are in the array, but
this was incorrect; the size of the index elements should depend on
the maximum value they reference, i.e. the maximum coord/normal
element.
2012-03-16 23:21:40 +00:00
Campbell Barton
fa17b0a911 add select invert for lattice 2012-03-16 23:01:37 +00:00
Campbell Barton
875b69fa52 fix for own silly mistake with face creation (wasnt checking more then 1 vert was selected) 2012-03-16 22:24:56 +00:00
Campbell Barton
70d3d1aca6 style cleanup: py/capi 2012-03-16 21:39:56 +00:00
Antony Riakiotakis
56da174b14 bugfix. Brush zoom could fail if uv sculpting was on 2012-03-16 21:26:18 +00:00
Nicholas Bishop
fd2ea6b966 Follow up to fix in r44919: use standard stats in paint modes.
Removed the special case for header statistics in sculpt/paint
modes. The information provided was less useful, and less accurate
even because it didn't reflect multires.
2012-03-16 20:42:29 +00:00
Alexander Kuznetsov
ed44ddd816 Patch by Psy-Fi + my minor changes
Adds conformation on exit for windows. Needs to be enabled in user perf.

Tried to edit blender.exe.manifest for more modern dialog look, but didn't work out.
2012-03-16 17:37:45 +00:00
Bastien Montagne
2caa507b7e i18n stuff: adds translation_context to RNA structs (used for there ui name), and a first default "Operator" one for all operators' label.
The fact is, operators' label are nearly always verbs, while properties labels are nearly always nouns. So this should already solve many translations' problems regarding noun/verb confusion.

This commit also simplifies a bit i18n usage:
*Now IFACE_ and TIP_ macros (or there context versions, CTX_IFACE_/TIP_) are used nearly everywhere (with one exception, where code is a bit complex and needs to manually test whether ui/tip translations is allowed, so no need to redo it later through those macros).
*Also, those macros are now defined to NOP in case WITH_INTERNATIONAL is false, which avoid testing that define everywhere in code!
2012-03-16 15:39:25 +00:00
Sergey Sharybin
d110ae7791 Allow merging two tracks in cases when they've got overlapping tracked/keyframed
frame ranges using average position of both tracks as position/
2012-03-16 14:06:43 +00:00
Sergey Sharybin
d6339e94fe Fix #30561 Modifiers with use_apply_on_spline = True do not work on curve with shapekeys 2012-03-16 11:46:08 +00:00
Nicholas Bishop
0a9f817d35 Fix object mode check in stats_update.
Was checking object flag rather than mode.
2012-03-16 08:46:55 +00:00
Campbell Barton
f91407150a bmesh py api:
initial support for editing bmesh customdata per vert/edge/face/loop

shapes, crease, bevel weights working, missing UVs and Vertex Colors still.
2012-03-16 08:26:22 +00:00
Campbell Barton
1823bb4abb fix for building bmesh bevel with scons (source file was left out) 2012-03-16 05:25:02 +00:00
Campbell Barton
ebec111618 bmesh py api:
Wrap customdata, so far you can access the data layers in a pythonic way but not manipulate the customdata yet.

provides dictionary like access to customdata layers, eg:
  texpoly = bm.faces.tex["UVMap"]
  print(bm.verts.shape.keys())  # un-intended pun, keys() works on all layers.
  print("MyInt" in bm.edges.int)  # __contains__
  layer = bm.faces.get("CheckForLayer")
2012-03-16 05:03:13 +00:00
Nicholas Bishop
815beed922 Fix for multires VBO drawing in sculpt mode.
Forgot to use return value of function creating the index buffer.
2012-03-16 04:11:35 +00:00
Campbell Barton
eab24df950 bmesh: being back bevel modifier from 2.62 stable.
this is no big improvement but at least its not a regression.

using the new operator for the bevel modifier can be enabled again be uncommenting a define.
2012-03-15 23:56:46 +00:00
Campbell Barton
bed5ae5366 *picky* fix for edge rotate
- Edge rotate would leave verts selected, this would give problems because those selections would leave edges that would try to rotate when run again. now de-select old verts on edge rotate.

- Rotating into hidden verts gave odd results, now make sure hidden state is ok.

- BMO_slot_buffer_hflag_disable / BMO_slot_buffer_hflag_enable now have flushing for the hide flag too.
2012-03-15 23:23:04 +00:00
Sergey Sharybin
91c1f9ee77 Commit patch from Nicholas Bishop with some small modifications
to make nicer displaying of brush names.
2012-03-15 21:11:14 +00:00
Campbell Barton
2c895318e9 quiet debug print(), reported as [#30552], but infact is harmless. 2012-03-15 20:25:07 +00:00
Bastien Montagne
c9d0de49b9 mesh_validate code for bmesh (i.e. polys/loops).
Everything seems to work well (many tests making random changes over various meshes went good), but the code is a bit complex and hard to follow, due to the various possibilities of invalid poly/loop combinations… Code also makes more operations than previous tri/quad faces version (hence is a bit slower), but I don’t think we can do otherwise, it’s just the price for bmesh flexibility. ;)

Note: added the py script I used to make the tests, under source/tests/...
2012-03-15 20:10:07 +00:00
Campbell Barton
e24d221e2a add missing break statement from recent brush code refactor,
selecting texture paint brush would never run brush_generic_tool_set()
2012-03-15 19:24:16 +00:00
Thomas Dinges
1002714fd8 2.6 User Interface:
* New Icons for the File menu, patch by David Klein (cgeffex). Thanks a lot!
* This patch also adds a new icon for the use_filter_text in Filebrowser.
2012-03-15 14:36:54 +00:00
Nicholas Bishop
9dd4058833 Add RNA for brush capabilities (sculpt-only for now.)
Added a new RNA-only nested structure, Brush.SculptCapabilities. It
contains read-only properties that use the current sculpt tool (and
occasionally other brush properties) to determine whether some feature
is available.

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

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

Solved by not adding MFACE layer if there's no tessellated faces.
2012-03-14 14:09:56 +00:00