Commit Graph

434 Commits

Author SHA1 Message Date
6ed79ede7e Eeshlo fixed the iYFexport path problem and added a file selector button
for it. Now win32 users should have less problems.

I added export of the "no shadow" flag (traceable) And changed the reflection
export scheme so now blender's RayMir is used as yafray's min_refle and the
amount of reflection is controled by the mir color. This seems more intuitive.
And now IOR is exported also for reflection only, wich is needed for fresnel.
2004-01-06 12:28:31 +00:00
092c6fd1bb Yafray export code moved to source/blender/yafray to keep blender/src pure C
code. Now all the cpp code is in intern under yafray and the api include
file is just plain C

Also changed old include in initrender.c and updated Makefiles.am and configure.ac
so the new dirs are taken into account.
2004-01-05 14:53:56 +00:00
eff07b8329 Basic initial yafray integration by Eeshlo.
Materials are exported the best we can do by now. It will look almost as in
blender except for the missing procedural textures and some minor issues.
You have to tweak normal modulation amount to get the desired result cause
is not the same in yafray.

We added a panel in render space to adjust some yafray settings (GI and so)

Also we export transparency and reflection using new raytracing settings,
but that will be changed and improved soon.

Remember that you have to set YFexport path in user defaults and yafray must
be on path (version 0.0.6)

We added the "yafray" button to activate all this stuff in the render window.
Panel and settings are only shown when checked.

So now when activated the code calls yafray export instead of the internal
renderer and finally the resulting image is loaded back into render window's
buffer. So animation is also possible and results can be saved using blender
usual scheme.
2004-01-04 22:10:36 +00:00
Chris Want
9f009558bf A few related bug-fixes/refinements
* A patch to make sure that constraints on bones that point to
    external objects are evaluated correctly (and that the bones that
    depend on these bones are evaluated correctly, etc, ad nauseum).
    This addresses some of intrr's issues (the blender-related ones,
    that is).

  * Make sure that deformed displists are updated when the user
    manipulates any of the constraint buttons.

  * Added a nice little function, ik_chain_looper(), that executes a
    callback for every bone in an IK chain.
2004-01-04 03:39:06 +00:00
6669831346 * Preliminary NLA header menus
A couple of items are still commented out in the code, that still need to be implemented. I'm committing this now, so people can test/help ;)
2004-01-03 13:13:51 +00:00
c9a7e4be17 * Ported mesh editmode 'select random' from tuhopuu by popular request
Description:
Mesh editmode header/toolbox: Select -> Random...

Randomly selects a user-set percentage of vertices, adding to the current selection.

* Modified some menu entries to be consistent with the guidelines doc.

* Added 'Align Active Camera to View' in 3D View menu
2004-01-03 09:22:33 +00:00
Chris Want
d2787f1372 When a bone is renamed, all constraints that point to it are
updated with the new name.
2004-01-03 06:27:53 +00:00
Chris Want
9f0123d0c7 Three new selection techniques in mesh edit mode, two of which are
controversial:

* "Select non-manifold geometry" via ctrl-alt-shift-M, or through
  the menu or toolbox. Great for troubleshooting weirdness on a
  subsurf, or for preparing a mesh for decimation or for rapid
  prototyping.

* "Select more" via ctrl-PADPLUS, or through the menu or toolbox.
  If a selected vert shares an edge with an unselected vert, the
  unselected one gets selected too. Similar to PADPLUS in wings3d.
  This is controversial because maybe it would be more useful to
  select all of the verts that share a face (instead of just an
  edge) with a selected vert -- what do *you* think?

* "Select less" via ctrl-PADMINUS, or through the menu or toolbox.
  If a selected vert shares an edge with an unselected vert, the
  selected one gets unselected too. Similar to PADMINUS in wings3d.
  Also, selected non-manifold geometry becomes unselected. This is
  controversial because of the non-manifold stuff ... is it needed?
  What do *you* think?
2004-01-03 06:01:16 +00:00
Chris Want
085730683d Added the prototype for the bone_looper() function to this header
to silence some warnings.
2004-01-03 05:36:56 +00:00
Chris Want
e090595ec9 Hide selected/hide unselected/show all bones in posemode using the
usual HKEY, shift-HKEY, alt-HKEY, and also through the menu.

Thanks to malefico for the feature request, and thanks to broken
for doing the menu code.
2004-01-03 05:07:31 +00:00
Chris Want
d311e96174 Armature speed ups, Part III
----------------------------

Another (major) armature speed up for bones with many constraints.

When tranform()-ing, figure out which bones need to be recalculated
beforehand and only update those bones.
2004-01-03 03:53:18 +00:00
Chris Want
33916a2402 Armature speed ups, Part II
---------------------------
"Delay Deform" option for armatures.

The button is under the X-ray bones button in the edit buttons.
With this armature option selected, manipulations in pose mode
will only deform children after the transformation is finished.
While hardly an optimal solution to the slow armature crisis, this
gives about 4 times speed up on some meshes (ah well, at least lets
me isolate armature vs. displist slowdowns while profiling).
2004-01-03 01:40:53 +00:00
Chris Want
a5a01ed549 Armature speed ups, Part I
--------------------------

Major speed up for armatures during times when you aren't
posing a figure.

Background: the calculation of poses generated by actions and the
calculation of displists were getting somewhat out of sync.
This was being remedied by 'clearing the constraint done flag'
of the pose channels and recalculating the displists every time
the 3d view was redrawn, making life slow and unpleasant.
Commenting out the code that was doing this, then reinserting
the 'clearing the constraint done flag' at the right times
made things a bit more perky.
2004-01-02 23:29:34 +00:00
Chris Want
b9f98c3545 Expanding some work done by Matt Ebb to add menu's to the
action window (Matt: please check).
2004-01-02 04:59:45 +00:00
3ce1dc9065 Area lights and more...
- New lamp type added "Area". This uses the radiosity formula (Stoke) to
  calculate the amount of energy which is received from a plane. Result
  is very nice local light, which nicely spreads out.
- Area lamps have a 'gamma' option to control the light spread
- Area lamp builtin sizes: square, rect, cube & box. Only first 2 are
  implemented. Set a type, and define area size
- Button area size won't affect the amount of energy. But scaling the lamp
  in 3d window will do. This is to cover the case when you scale an entire
  scene, the light then will remain identical
  If you just want to change area lamp size, use buttons when you dont want
  to make the scene too bright or too dark
- Since area lights realistically are sensitive for distance (quadratic), the
  effect it has is quickly too much, or too less. For this the "Dist" value
  in Lamp can be used. Set it at Dist=10 to have reasonable light on distance
  10 Blender units (assumed you didnt scale lamp object).
- I tried square sized specularity, but this looked totally weird. Not
  committed
- Plan is to extend area light with 3d dimensions, boxes and cubes.
- Note that area light is one-sided, towards negative Z. I need to design
  a nice drawing method for it.

Area Shadow

- Since there are a lot of variables associated with soft shadow, they now
  only are available for Area lights. Allowing spot & normal lamp to have
  soft shadow is possible though, but will require a reorganisation of the
  Lamp buttons. Is a point of research & feedback still.
- Apart from area size, you now can individually set amount of samples in
  X and Y direction (for area lamp type 'Rect'). For box type area lamp,
  this will become 3 dimensions
- Area shadows have four options:
  "Clip circle" : only uses a circular shape of samples, gives smoother
  results
  "Dither" : use a 2x2 dither mask
  "Jitter" : applys a pseudo-random offset to samples
  "Umbra" : extra emphasis on area that's fully in shadow.

Raytrace speedup

- improved filling in faces in Octree. Large faces occupied too many nodes
- added a coherence check; rays fired sequentially that begin and end in
  same octree nodes, and that don't intersect, are quickly rejected
- rendering shadow scenes benefits from this 20-40%. My statue test monkey
  file now renders in 19 seconds (was 30).

Plus:

- adjusted specular max to 511, and made sure Blinn spec has again this
  incredible small spec size
- for UI rounded theme: the color "button" displayed RGB color too dark
- fixed countall() function, to also include Subsurf totals
- removed setting the 'near' clipping for pressing dot-key numpad
- when you press the buttons-window icon for 'Shading Context' the context
  automaticilly switches as with F5 hotkey

Please be warned that this is not a release... settings in files might not
work as it did, nor guaranteed to work when we do a release. :)
2003-12-29 16:52:51 +00:00
85ae21d5dd Commit of cursor framework. Cursors now defined in source/blender/src/cursors.c and
source/blender/include/BIF_cursors.h.  Allows large cursors on Win32 and X11.
See cursors.c for documentatioin on how to use.
2003-12-26 20:12:42 +00:00
97d4dbc9c3 Another commit for raytracing, now with glass refraction & fresnel!
Changelog:

- enable refraction with button "Ray Transp" in Material buttons.
- set "Angular Index" value for amount of refraction.
- use the "Alpha" value to define transparency.
- remember to set a higher "Depth" too... glass can bounce quite some
  more than expected.
- for correct refraction, 3D models MUST have normals pointing in the
  right direction (consistently pointing outside).
- refraction 'sees' the thickness of glass based on what you model. So
  make for realistic glass both sides of a surface.

- I needed to do some rewriting for correct mirroring/refraction,
  especially to prevent specularity being blended away.
  Solved this with localizing shading results in the rendercore.c.
  Now specularity correctly is added, and reduces the 'mirror' value.
- Localizing more parts of the render code is being planned. The old
  render heavily relies on struct Render and struct Osa to store globals.
  For scanline render no problem, but recursive raytracing dislikes that.

- done test with gamma-corrected summation of colors during tracing, is
  commented out still. But this will give more balanced reflections. Now
  dark reflections that are reflected in a bright surface seem incorrect.

- Introduced 'Fresnel' effect for Mirror and Transparency. This
  influences the amount of mirror/transparency based at viewing angle.
  Next to a new Fresnel slider, also a 'falloff' button has been added to
  define the way it spreads.
- Fresnel also works for Ztransp rendering

- created new Panel for Raytrace options
  I have to evaluate still where it all should be logically located.
- material preview shows fake reflection and fake refraction as well.
2003-12-16 14:12:01 +00:00
050dc02134 Chris reported build errors w/ traditional makefiles.
This commit moves the 2 undefined references to BPY_interface.c and
changes things a little, hopefully fixing the problem.  I had to add a new dir,
source/blender/include/ to auto*'s Makefile.am in source/blender/python/.

Thanks Chris for the report, and Jiri, for adding a missing declaration.
2003-12-15 18:18:09 +00:00
436bb963f1 - added declaration SpaceType *spacescript_get_type (void); 2003-12-15 16:06:00 +00:00
ec7c7d6983 BEVEL FOR MESH **** LONG LOG WARNING ****
The interesting part:

Bevelling functions for meshes.
Accessible through the Wkey menu.
You then have to enter the recursivity level (Warning, don't use 3 on a big mesh) and interactivly set the bevel width by moving the mouse. It draws the new faces in yellow. Ctrl constraint to 0.1 multiples, Shift switches to low gear, Space to type a value directly.
Support for selective bevelling isn't really working yet, so be sure to select all the vertices beforehand.


The less interesting part:

Code done by intrr (logical stuff, how the algorithm works) and me (math stuff and the interactive bevel width code).

The splitting and bevelling algorithm is not yet fully optimized, and the face shrinking math still doesn't like too big bevel width values. So this will have to be cleaned too.

Selective bevel is on the list next.

If you have any questions about how the code works, send the questions regarding the logic of the method to intrr and math questions to me.


This is very much testing code (or should I say teasing code), so please don't flood me with bug reports. (This excludes OFFICIAL Blender developpers who were there at the meeting and pretty much know what the limitations of the code is and what it should do.)
2003-12-15 04:38:30 +00:00
49021f7ec4 BPython - first step for better integration of Python in Blender:
- add a new space: Space Script
- add a new dna struct: Script
- add these two properly everywhere they are meant to

It's not a tiny commit, but most of it is ground work for what is still to be done.
Right now the benefits should be: freeing the Text Editor to be used in a window even while a script w/ gui in "on" and letting more than one currently running script w/ gui be accessible from each window

Some files are added, so some build systems (not autotools) will need updates
2003-12-14 01:18:09 +00:00
f574f38a39 Numpad - . (dot) now centers on selected vertices/controlpoints in editmode.
It already centered on selected objects outside of editmode, so this is just a consistency feature.
2003-12-12 20:54:12 +00:00
aefb33e8cf Corrected function name. 2003-12-08 15:13:00 +00:00
b4192ad94b Prints current blend filename in windowheader. 2003-12-08 13:08:24 +00:00
087dda2d64 - forgot a define... 2003-11-27 10:22:13 +00:00
5af2e7ac25 - this routine is going to be my waterloo!
forgot to check null pointer...
2003-11-22 18:38:53 +00:00
b5e6b84dc8 - finished some minor drawing stuff which i couldnt complete last friday:
(related to rounded theme)
  - layer buttons in view3d header grouped
  - outline colour now blends darker with respect to background (better
    visibility on dark backgrounds)
  - added some align calls to user settings menu

Now back to real bugs!
2003-11-17 14:31:25 +00:00
d8f8605098 - Bug fix: at osx, default AA font couldnt be written in .b.blend
(unless you manually install font)
- Bug fix: string for AA font was only 64 chars... made 256.

- Changed API for buttons aligning... it now detects automatic what rows
  are, or collums, and aligns buttons. This makes call easier:
  uiBlockBeginAlign(block);
  ... defBut....
  uiBlockEndAlign(block);
  Only works when you provide buttons in row order!
- made sure only 'rounded' theme uses this align stuff
- still work in progress.. I commit now because I leave to denmark for 2 days!

http://www.blender.org/bf/rt.jpg  <- now also groups with rows+collums
2003-11-14 15:49:26 +00:00
a291ea6683 - Added button align code:
uiBlockBeginAlign(block, 'v');  'v'= vertical. 'h'=horizontal
  ..... (button def calls)
  uiBlockEndAlign(block);

  this will allow new themes to have buttons nicely drawn together.
- added new rounded draw theme, to test & illustrate the above.
- only did parts of button code with align... rest for later
- fixed 'minimal' theme to make it usable (with some decoration)
- put back 'oldskool' theme... but it just looks plain ugly! remove?

Lazy people: http://www.blender.org/bf/rt.jpg
check the top header, or Nkey menu, to see the meaning of 'align'.
2003-11-14 00:44:48 +00:00
b961e52f71 Discovered I never remapped RMB to cancel in get_mouse_trail(). Done now. 2003-11-06 01:57:49 +00:00
5ea904faca - added another load of items to new toolbox... yeez, what an
ENORMOUS job Matt has done with the menus! :)
- followed as much as possible order and options in pulldowns, but since
  toolbox has more categories, it is split up sometimes.
- did some minor changes in pulldowns to make it more consistant
- not yet: armature & text options...
- not yet: toolbox in other window types

(warning; shift+a now is new... eek!)
2003-10-29 00:23:16 +00:00
5bd910ae2c - added buttons for NKEY menu editmode curve, nurbs, armature
- same for PoseMode
2003-10-28 16:26:51 +00:00
a5247cf5b8 - fixed bug in wrong event code, causing some plugin buttons not working
- added redraw events to plugin buttons, to show updates better
2003-10-28 14:37:47 +00:00
4bec8ba7d5 Fixing loose ends:
- nkey menu for buttonswindow (hex values) couldnt be restored yet, is
  for next release
- replaced Nkey in IpoWindow with Panel, this now displays the buttons
  that were formerly in 'anim buttons' as well; to view the boundbox
  values of all visible curves, and adjust it.
- the new panel also has the 'set speed' option, fixed stuff in it and
  added better errorwarning... still not a very well coded tool!
2003-10-28 14:20:03 +00:00
bfef1d0d92 Hotkey fixes for space.c
renaming mirrormesh to mirrormenu and added to the hotkey M in editmode (Layer move no longer works in edit mode)
2003-10-27 23:55:38 +00:00
cc35c992b3 Added K Menu for Loop Select, Loop Cut, and Knife tools. 2003-10-26 21:22:32 +00:00
f3532c7be5 Split the 'background and settings' panel in 3d window in 2 parts.
Instructions for how to add panels there:

- add a handler define code in BIF_space.h
- create a menu item that invokes a add_blockhandler()
- add to view3d_blockhandlers() the correct handler for it

- plus create a panel itself, just copy one... it needs some stuff
  to get working, docs for that are for later
2003-10-25 22:03:19 +00:00
513ae61f2b First commit of a new toolbox system.
Aim was to find a simple & easy system, script alike, to add and configure
a toolbox system, so that others can experiment, but also of course Python.

Summary:
- spacebar calls it up. SHIFT+A still does old toolbox
- hold left or rightmouse for 0.4 second, and it pops up as well
  this is experimental! Can be tweaked with Userdef var "ThresA"
- it is a little bit complete for Object mode only. Needs still work
  at information desing/structure level
- the code works like an engine, interpreting structs like this:

static TBitem addmenu_curve[]= {
{	0, "Bezier Curve", 	0, NULL},
{	0, "Bezier Circle", 1, NULL},
{	0, "NURBS Curve", 	2, NULL},
{	0, "NURBS Circle", 	3, NULL},
{	0, "Path", 			4, NULL},
{  -1, "", 			0, do_info_add_curvemenu}};

- first value is ICON code,
- then name
- return value
- pointer to optional child

last row has -1 to indicate its the last...
plus a callback to event function.

I also built an old toolbox style callback for this:

static TBitem tb_object_select[]= {
{	0, "Border Select|B", 	'b', NULL},
{	0, "(De)select All|A", 	'a', NULL},
{	0, "Linked...|Shift L", 	'L', NULL},
{	0, "Grouped...|Shift G", 	'G', NULL},
{  -1, "", 			0, tb_do_hotkey}};

here the return values are put back as hotkeys in mainqueue.

A mainloop can do all context switching, and build menus on the fly.
Meaning, it also allows other designs such as radials...
2003-10-25 00:08:12 +00:00
0c177df766 - added Panel for 'anim playback settings'
- removed draw rect from avi coded settings (should become label but)
- changing texture settings, now also updates lamp/material/world
  preview when thats open
2003-10-23 16:52:54 +00:00
9a625925da Cleaned up new constraint line drawing while grab/rot/scale
- uses callback mechanism to tell main drawing routine what to do
- for that reason it doesn't use frontbuffer drawing anymore
  and it shows up in all 3d windows as well
- it uses the same colors as for the grid axes (I tweaked it a bit,
  this is based at themecolors, and also should work in different
  background and grid color)
- I disabled drawing lines through every object or every vertex.
  The current display method is clear and not distracting
- when in 'local' transform (double press X/Y/Z), it displays a nice
  axis in the center of transform for vertices.
  In object-mode, local transform differs per object, so constraint lines
  and axes are drawn for each individually...

Also:

- fixed an old bug in rotate transform(). Using a constraint for
  rotation (X, Y, Z) didn't work for multiple objects at all!
2003-10-23 16:15:05 +00:00
d213b7d0db Small constraint loop detection and calculation fix that now allows two objects to track each other (normal track or LockTrack).
This is done by disabling the object position refresh call when calculating these constraints. From the tests I did, this doesn't cause any problem at all.

The main point of this is to create pistons and the like.

For coders:

the detect_constraint_loop function now takes an additional parameter that determines the constraint type of the object it's looping from.
2003-10-22 23:17:48 +00:00
a0824f8fb9 Mesh drawing stuff!
- in zbuffer mode, vertices will be blended 50% in... and when you increase
  vertex size larger than 2 pixels, it will draw them smaller
- removed all 'wire extra' calls (there were dozens!) and replaced it with
  simple call where it belongs.
  This drawing mode is becoming nice & stable... maybe something to make
  default on for new objects? Makes selecting quite easier...

- Subsurf: in editmode, with new 'Optimal' option set, the mesh itself
  will not draw, but instead it draws 'handles' to the vertices. Looks
  extremely clean!

- matched drawing of default grid-floor (persp) to ortho grid

- killed drawing vertices outside of main drawing loop, apart from the
  routine that uses mouse-selecting. (tekenvertices_ext()). It was an old
  optimize routine which became quite useless.
2003-10-21 16:41:28 +00:00
41f4940bff Helpline drawing in transform (semi broken in this commit)
This is only usefull for rotate now, but the axis constraining code has a part that depended on this, so I commit this part first.

For coders:

void constline(float *center, float *dir, int col)
	Draw an infinite line on the screen. col is the color argument. It must be cpack compatible

void project_short_infiniteline(float *vec, float *dir, short *adr1, short *adr2);
	clips infinite line to screen border
2003-10-21 16:25:00 +00:00
4efdabfbbc Constraint stuff from tuhopuu including (but probably not limited too):
Axis options for TrackTo
LockTrack
FollowPath

Auto creation of TrackTo constraint from Ctrl-T (old track still an option)

Auto creation of FollowPath when parenting to path (Normal parent still an option)

Backward compatibility stuff to convert the per object axis settings to per constraint when a Track constraint is present.

Function to convert old track to constraint (commented out)

Revamped the constraints interface with Matt's work from tuhopuu and the stuff we were discussing earlier.

--------------------
For coders:

unique_constraint_name and *new_constraint_data  moved to the kernel (constraint.c)

new Projf function in arithb gives the projection of a vector on another vector

add_new_constraint now takes a constraint type (int) parameter

add_constraint_to_object(bConstraint *con, Object *ob) to link a constraint to an object

add_constraint_to_client(bConstraint *con) to link constraint to current client (object or bone)

add_influence_key_to_constraint (bConstraint *con) to (eventually) add a keyframe to the influence IPO of a constraint
2003-10-21 13:22:07 +00:00
c6ef2afb3f Added a function to shade alpha as well as colour 2003-10-21 07:02:38 +00:00
fd3be2e3ef added sequence editor pull-down menus.
TODO: fix "Enter/Exit Meta Strip" to work correctly for nested
meta strips.
2003-10-20 20:12:01 +00:00
7f5d06d638 Another mega commit... loadsof restructure, and a pretty good one! :)
- changed the BIF_DrawString() function. it used to work different for
  AA fonts  as for default fonts. Now it's identical. Setting color for fonts
  can just be done with OpenGL, for both font types.
  Removed: BIF_DrawStringRGB()
- added theme color options for Buttons
- recoded DefButton, so it automatically chooses the right color.
- had to remove a 1000 uiBlockSetCol() calls for that reason...
- uiBlockSetCol() still works, to override automatic color

- removed entirely the silly old color system (BIFColorID). All color
  calls can now be done with a BIF_ThemeColor() call, including fonts and
  buttons and opengl stuff

- all buttons in button header have headercolor by default

- recoded drawing icons, it was a really bad & old loop doing manually
  colorshading and blending... which was per pixel a load of code!
  Now it uses a single OpenGL call to blend or colorize. Quite faster!
- (as test, for review) icons don't colorize anymore with button color,
  but have a different alpha to blend in (when not active)


- recoded the entire interface_draw.c file...:
- drawing buttons is separated in three parts:
  1. main drawing function for text and icons
  2. free definable callback for button itself
  3. free definable callback for slider
- removed a load of redundant code for this!
- coded a minimal theme, and adjusted Matt's buttons to match new
  callback system

- adding new drawing themes is piece of cake now
- for coders, default 'themes' to be aware of:
  UI_EMBOSS : the themable drawing style
  UI_EMBOSSP: the pulldown menu system (apart from color not themable)
  UI_EMBOSSN: draw nothing, only text and/or icon
  UI_EMBOSSM: minimal theme, still in use for Logic and Constraintsa
  this can be set with uiBlockSetEmboss(block) or in the uiNewBlock() call.

TODO: make UI API call for button alignment

(plus removed another series of warnings from code...)

Plus: fixed bug in Matts commit: he used a 'short' button for an 'int'
2003-10-20 15:40:20 +00:00
e6a86ce8cf Added
void selectall_type(short obtype);
void selectall_layer(int layernum);
2003-10-20 02:19:48 +00:00
d5322a6352 Editmesh Undo:
User Info:
	Pressing UKey in mesh edit mode now undoes only last step.  Undo can save
	upto 64 steps of undo info.  This is configurable under User Prefs->
	Edit Methods.  The default is 32.  High numbers of undo steps use a
	lot of memory, since each step stores a copy of the mesh.

	Shift-U redoes the last undone step (Undoes the undo.)

	Alt-U brings up a menu of possible steps that can be undone.  Selecting
	an item on the list undoes that item plus all items before it on the list.
	The top selection "Undo All" is identical to the old Ukey.  It undoes
	all editing since entering Editmode, even if all regular undo steps are
	used up.

	Undo info is only saved for one object at a time.  You can leave and re-
	enter editmode for the same object, and all undo steps for that object are
	preserved.  Undo info for an object is lost once a different object is
	edited.

Coder Info:
	In order for undo to work, a checkpoint save has to be made.  This is
	done with a call to undo_push_mesh("name of step").  This should be done
	after the last quick abort for a function (typ. the
	"if (G.obedit==0) return;", or similar).  the undo_push_mesh() does alter some
	flags, so don't try to be too tricky and call undo_push_mesh() too late.
	The step name is what shows up in the undo_menu.  The name "U" is reserved.
2003-10-19 20:52:34 +00:00
de64d218a0 Adding Knife tool as to be released in 2.3
User Info:
	To use this tool, select a group of verts, it can be larger than the
	desired cut as explained below.  Then hit Shift-K.
	The tool will  prompt for cut type (Exact line or Edge centers),
	Select, then use LMB to draw a "cut-line".  Holding down LMB causes
	a freehand draw, clicking LMB causes a polyline draw.  MMB locks the axis.
	When done press enter to divide mesh on cut line. Subdivide routines have
	been modified to produce fewer triangles as part of this tool.
	Edge Centers preserves UV info, Exact Line does not (it will be there, just
	slightly distorted).

	Since the cut line exists in 2D space, and does not make a persistant
	selection that can be modified in another 3D view, the knife selection
	is the AND of the vertex selection and the knife line, ie; the edge will
	be subdivided only if both verts are selected, and the knife line crosses
	the edge.  Select your verts first, but you don't have to be overly
	precise. If you want to cut a few faces on the front of a sphere, you
	can select the whole front of the sphere, then knife the faces you want.

Coder Info:
	KnifeSubdivide is called with 1 of 3 modes. KNIFE_PROMPT, KNIFE_EXACT,
	KNIFE_MIDPOINTS.  The hotkey calls KNIFE_PROMPT.  When adding to a menu
	or button, explicitly call out the mode.

	Part of the tool provides get_mouse_trail() that returns a CutCurve struct
	that defines a knife line.  There are modes defined, but currently they are not
	implimented.

	Another part of this tool defines new behaviour for subdivideflag().
	Setting beauty param to B_KNIFE	tells subdivideflag() that the edges
	are preselected ans to skip the vert check.  Also setting B_PERCENTSUB tells
	subdivideflag() to divide the edge at a percentage of the distance from
	eed->v1 to eed->v2.  This percentage is passed in the eed->f1 flag as a
	short (ie, setting eed->f1 to 16384 cuts the edge half-way).
2003-10-19 19:50:17 +00:00