Commit Graph

20 Commits

Author SHA1 Message Date
54c9557b85 Solidify modifier for Durian (allow cloth sim on single layer and make solid after)
Mostly the same as the recently added editmode tool with some extras.

* Options to disable filling in the rim between inner and outer surface, since its faster not to detect this in cases where its not needed.
* Option to disable high quality normal calculation, mostly noticable when operating on building walls, not needed for cloth or more organic shapes.
* Option to disable 'even thickness', again, not needed in some cases.

Also options for creasing inner/outer and rim edges, need this for makign Sintels cloths solid since zero crease looks far too soft.

note:
* UVs and VCols etc are copied to the new skin however rim faces dont get the UVs or vcols set from the faces they are created from yet.
* Normals are assumed to be pointing outwards
* used patch from Uncle Entity as a template since it added the DNA and RNA entries but the actual modifier from the patch wasnt used.
2009-12-21 01:02:08 +00:00
0095b89a67 Solidify was faiing in cases with flat aras because normal calculation assumed some angle between faces. 2009-12-15 23:35:26 +00:00
7fc799d4a9 utility functions for getting the corner angles of a quad or tri: angle_quad_v3 & angle_tri_v3 2009-12-15 09:39:46 +00:00
ded4cbb553 solidify would only work as expecyed if all faces were selected, added an override to extrude that means it runs without removing selected faces first, even on a partial selection 2009-12-15 00:53:34 +00:00
9fe37d9970 improve solidify results by weighting the faces influence on a vertex by the corner angle of each face before displacing 2009-12-15 00:24:30 +00:00
9633d198fb solidify from 2.4x (ported from python to C)
- shell_angle_to_dist() was using degrees
2009-12-14 23:35:13 +00:00
37e4a311b0 Math Lib
* Convert all code to use new functions.
* Branch maintainers may want to skip this commit, and run this
  conversion script instead, if they use a lot of math functions
  in new code:
  http://www.pasteall.org/9052/python
2009-11-10 20:43:45 +00:00
2d40b8d56f 2.5
Added SpaceLogic, to restore the old logic buttons into.
In future it can be used for a more advanced logic editor, with
states, behaviour, whatever. We'll see!

This commit only adds the backend for new space. Committed this
now as reference for when we need another space type. It's still
not well plugin-able (dynamic space types), but my idea is to just
have a new SpacePlugIn for this, with a neat small API to define
all relevant callbacks.

Also note the icon for the spacetype is wrong still.
2009-06-16 13:09:36 +00:00
41dd360420 2.5: Operator naming, reviewed some of the recent changes
by Shaul, did some minor tweaks.
2009-04-15 15:40:31 +00:00
a0fada6f18 added error reporting to edit mesh 2009-02-14 21:31:34 +00:00
283926aa2d 2.5: UV Editor module porting pretty much finished now, only missing
still is mirror transform. This commits adds the remaining operators:

* UV mapping operators (U key menu): cube, sphere, cylinder, etc.
* Hide/Show operators.

And solves most XXX's, including:

* Fix bad includes and calls into space image.
* Aspect ratio correction.
* Create UVs if they don't exist yet on unwrap.
* Assign image to UVs.
* Drawing proportional edit circle.
2009-02-09 20:58:31 +00:00
61a6e1957a flip_editnormals is back, alt+3key 2009-02-05 01:32:37 +00:00
86a2a0f694 2.5
Edit Mesh:

- Added back "Edge Shortest Path select"
  It now also does regular selection, more fun! 
  It's mapped to CTRL+click now, and makes or clears selections 
  between current and previously activated edge.
  Seam/Sharp/etc marking is a toolsetting mode still. These
  options cannot become properties easily, because the tool
  uses the properties of selected edge to clear...

- Removed a whole bunch of G.f flags, related to mesh drawing.
  It's all now local in me->drawflags. Here's the list of
  removed old globals:

G_DRAWEDGES
G_DRAWFACES
G_DRAWNORMALS
G_DRAW_VNORMALS

G_ALLEDGES
G_HIDDENEDGES

G_DRAWCREASES
G_DRAWSEAMS
G_DRAWSHARP
G_DRAWBWEIGHTS

G_DRAW_EDGELEN
G_DRAW_FACEAREA
G_DRAW_EDGEANG
2009-01-31 13:30:56 +00:00
237cd7a7a7 2.5
- Depricated another bunch of globals; all the totobj,
  totmesh, totvert, and so on.
- All code that needs such totals now count it themselves,
  these stats were not supposed to be reliable
- Editmesh now stores and manages own totals.
- Todo: make a scene->stats that tracks notifiers.

Bugfix: selecting failed in editmesh, backbuffer stuff was
too late, already using index ranges before it was set.
2009-01-15 15:01:39 +00:00
52135dd4fa 2.5: Space Image ported back
Organized as follows:

uvedit/
	uv editing related code
	uvedit_draw.c: drawing code
	uvedit_ops.c: operators, just a few done
	uvedit_unwrap_ops.c: will be operators for unwrapping
	uvedit_paramatrizer.c: lscm/abf/stretch/pack

space_image/
	space_image.c: registration and common getter/setters
	image_draw.c: drawing code, mostly functional
	image_panels.c: panels, all commented out
	image_render.c: render callbacks, non functional
	image_ops.c: operators, only view navigation done
	image_header.c: header, menus mostly done but missing buttons

Notes:
* Header menus consist only of Operator and RNA buttons, if they
  are not implemented they're displayed grayed out. Ideally the full
  header could work like this, but std_libbuttons looks problematic.

* Started using view2d code more than the old code, but for now it
  still does own view2d management due to some very specific
  requirements that the image window has. The drawing code however
  is more clear hopefully, it only uses view2d, and there is no
  switching between 'p' and 'f' view2d's anymore, it is always 'f'.

* In order to make uvedit operators more independent I move some
  image space settings to scene toolsettings, and the current image
  and its buffer is in the context. Especially sync selection and
  select mode belonged there anyway as this cannot work correct with
  different spaces having different settings anyway.

* Image paint is not back yet, did not want to put that together with
  uvedit because there's really no code sharing.. perhaps vertex paint,
  image paint and sculpt would be good to have in one module to share
  brush code, partial redraw, etc better.
2009-01-15 04:38:18 +00:00
029bbb3489 2.5
Editmesh: add primitive basics back. Had to clean up a load of
crap there... but it's sorta in control, so I think Shul can
pick it up again.

Test: ctrl+0 adds plane, or ctrl+9 adds grid.

Notes for Shul:
- i've added a transform function, which gets correctly passed
  on to the add_prim function, should work for all object 
  transforms. Only the code inside add_prim might be needed
  to check (it uses 4x4 mat now, not a 3x3)

- The old code with buttons has been ifdeffed out, check for
  user input and make it rna properties, which get read
  in the exec(), and handed over to the add_prim. Set them
  default now to the values from old buttons.

- Operator naming is preferred lower case, I gave this
  a new name.

- check a bit on formatting code, but don't use the old code
  as example! Look also at ED_keymap_mesh() for example.
2009-01-14 19:26:11 +00:00
1fe21f7e8f 2.5
Put back Armature/Pose code, including 'heat weight'.
I've added reeb.h to get things compile, but Martin will
cleanup files and put back?

Now where to put all vertexgroup code.... I guess mesh?

Note for msvc: yep, another new dir to add! :)
2009-01-05 15:19:31 +00:00
a6721c60d9 2.5
From the anti-globalization department: 
G.obedit terminated!

Wherever possible, use CTX_data_edit_object(C) to get this
now. It's stored in scene now, and the screen context has
it defined.
2009-01-02 19:10:35 +00:00
e9a3b4f85d 2.5
- Edit mode Mesh undo/redo back
  (undo for editmodes needed recode, todo for curve/lattice/etc)
- Added border select for edit mesh
- Added Akey (de)select all for edit mesh
- Added notifiers for mode changes.

This is also the first trial to dynamically add/remove
keymap handlers, based on modes. For that reason the Object
keymap was split in 2, modal and non-modal. On TABkey, the
view3d listener removes and adds maps.

The view3d keymap still handles generic mouse/border selection.
Internally it will verify modes.

The modes are not  re-implemented still... have to move this
to scene context.
2009-01-01 13:15:35 +00:00
25fac7b001 2.5
Editmesh code cleaned and compiling/linking. A whopping
20k lines back! :)
Not that it does stuff... editmode in/out has to be done,
and loads of operators. Also linking/exporting editmesh
calls has to be reviewed.

Also: added a blender_test_break() mechanism in BKE.
2008-12-30 13:16:14 +00:00