Commit Graph

548 Commits

Author SHA1 Message Date
dbc8e1e883 fix for own mistake when changing curve flags - Reported as [#7888] Extrude broken for vector handles 2007-12-15 15:30:08 +00:00
f15956356c misc warning fixes and one fix for a big in curve allocation 2007-12-13 15:06:02 +00:00
a2d6623689 bugfix, curve radius would display incorrectly when there were single point's before a curve. now allow the bevel list to have zero point BevList's to keep in sync with curve->nurb as was expected in a few places. 2007-12-03 22:42:48 +00:00
1e32ec2000 minor update, "Draw Handles" wasnt working when disabled everywhere and replaced some magic numbers 2007-12-01 23:25:00 +00:00
90b4ed9543 added buttons in the Transform Properties for changing curve handle types, (Similar to how Metaballs can be selected) for easier access then H,Shift H, V keys 2007-11-10 15:31:41 +00:00
63a801c21d * Curve tilt interpolation types
Just a quickie feature I needed here at work- the previous linear 
interpolation of tilt in curves can give nasty pinching problems 
when trying to do flowing curves like a ribbon. This commit lets 
you choose the interpolation type, between Linear, Cardinal, and 
BSpline. The code was already set up for it pretty easily, mainly 
needed to make the choice visible to the user.

Example:
http://mke3.net/blender/devel/etc/tilt_interp_types.png

Works on selected curve 'lines', menu in 'curve tools' panel in
edit mode.
2007-08-21 01:57:15 +00:00
a499da7192 Curve Selection Tool Refactor:
This commit refactors curve selection system to use certain curve selections
functions that encapsulate setting of selection flags. New function to select
adjacent control points was introduced too. Refactoring made it possible to 
simplify certain existing selection functions quite a bit. 
New functionality was delivered as well. Select more/less works now with NURBS 
as expected. Also two new curve selection functions were added: Select Every Nth 
and Select Random. 

See http://wiki.blender.org/index.php/BlenderDev/Curve_Selection_Tools for 
further information.
2007-06-14 14:36:27 +00:00
afdd54fa37 moved source and text to american spelling
* colour -> color
* centre -> center
* normalise -> normalize
* modelling -> modeling
2007-04-04 13:18:41 +00:00
66238eab7c PyAPI
curve - added curve_type() to return the curve type
BPyModule & gen_library - works with text3d now, can also make new text3d through bpy.curves.new
Added Draw.Label() so scripts can draw can using freetype.
widgetwizard - use Draw.Label
2007-03-27 11:37:54 +00:00
e0c77c0f14 made all data adding functions accept a name such as add_mesh or add_curve, previously only some datatypes adding functions accepted a name.
also updated the Bpy.py epydocs
2007-03-11 16:25:17 +00:00
43b390c936 Fix for [ #5785 ] standard bezier curve resolution doesn't show correctly in 3d
view: Just made the initial curve resolution consistent between curve parts'
resolution and curve object's resolution.
2007-01-22 23:11:18 +00:00
f75c784434 Bugfix #5685
EditMode text objects: using different text Width didn't draw anything.
2007-01-19 14:25:56 +00:00
fc00e73a83 removed the WKey "Split font" option. It doesnt work and corrupts memory
(saved files cannot read back, they crash).

The implementation of this option was plain accident that it even worked
once... you cannot use the API in blender that way.
2006-12-21 12:36:25 +00:00
ca6824a640 Correction commit, didn't have the console in correct directory!
Log again:

 Log:
  1)
  Bugfix: Beziers in curve didn't calculate the tilt values correctly for
  the endpoint and not for all handle types. That way deforming curves didn't
  extend the tilted deform either. (IRC report by Jahka)

  2)
  If you setup a Proxy for Armatures, the protected bones now have an error
  pupup for buttons and for some of the tools in 3d window (constraint edit
  mostly).
  Also the Bones Panel shows a note when the bone is not editable.
2006-11-16 11:49:14 +00:00
Ken Hughes
2e133599da Python API:
Bugfix #5075: make curve.update() recalculate bezier curve handles.  This
would/should be called after changing the handles of a BezTriple.
2006-11-13 21:14:48 +00:00
05ee7d9053 =translate hoek to angle=
renamed the dutch variable hoek to angle globally arithb.c changes done by Matt Plough
2006-10-14 23:27:18 +00:00
e3d78dd4e1 * Fix: Disabled radius tapering on 2d curves with filled front or back. It would be
really cool to get this working solidly, but there are many potential problems with the
triangle face creation across the flat surfaces, especially when there are holes inside
the curves. Maybe this could be a fun project for someone better at this than I? :)
Taper object curves still cause similar problems...

* Made the curve radius affect the 'Nsize' curve normal drawing too, so you don't need a
bevel to see the value.
2006-08-13 08:31:59 +00:00
e460747680 Bugfix #4630
They're getting rare, but here's another bugfix from issue since NaN days:

Orco texture coordinates for surfaces didn't work *at all*!
(Try 2 nurbs spheres in 1 object). Fixed!
2006-07-06 14:20:44 +00:00
6867773401 Plumiferos bug: autohandles in Ipos could get screwed up in extreme cases,
but they got this case! :)

Bug was that for autohandle, the previous position of handle was used for
calculating the position too, which I really don't remember why... (that
is code from 10 years ago). Problem with that approach is that extreme
changes in handles don't go correct immediately, but need to itterate a
while. Or even worse, can give NaN values, resulting in this:

http://www.blender.org/bf/ipobug.jpg

Now the handle points are fully recalculated, as it should.
2006-06-21 19:16:09 +00:00
985db6c4ef Bugfix #4367
Creating texture coordinates for Curve bevels didn't allocate a correct
sized memory block when both U and V directions of a bevel are circular.

This will also fix "UV orco" for such curves (like donut shapes).
2006-06-21 10:02:47 +00:00
85ac48c782 With the commit last week to have curve bevels nice circular (when no
front/back is selected), the UV coordinates for curves should also be
corrected.
This commit re-uses the same code as for Nurbs, to make sure UV coordinates
wrap around nicely.

BUT! I've noticed that Daniel's commit of august in this code actually
broke this UV correction... in his craze to cleanup old code, he missed
the actual functionality. Meaning that in 2.40 and 2.41, "UV orco" texture
coordinates wrap around ugly in Nurbs Surfaces, something that was fixed
in NaN days.

Got no time for tracker now... but I'm sure it's in there! :)
2006-03-11 12:34:50 +00:00
aa1d8162be Curves with bevel, but without front/back or extrude depth, now render
as a full circle instead of 2 halves.
2006-03-06 21:44:08 +00:00
78c87abeed Wanted feature for curves: a render-time resolution. This option is
located under the 'def resolu' button. If not zero, it assigns this
resolution to a curve on render.
Also copies with ctrl+c menu.
2006-02-07 19:59:02 +00:00
Ken Hughes
1e589f59d0 -- Bugfix #3520: Text with extrusion and/or bevelling would would disappear
when edit mode was entered.
2005-12-09 14:30:51 +00:00
824ed2e041 A year-zero bug, and actually another issue with auto-handles for Ipo
curves. On sharp 'peaking' curves the handle was calculated
using both X and Y distance. This could result in overshooting.

New code only evaluates the X distance, resulting in much more moderate
sized handles.

Thanks Gabio for the demo file!
2005-11-17 19:34:32 +00:00
ec58f413b1 Autohandles in Ipo Window still could overshoot. Added a new clamping to
ensure the handles never result in a curve that goes beyond the neighbour
control points.

http://www.blender.org/cms/Animation_Curve_Handle.717.0.html
2005-10-23 21:36:24 +00:00
10a790041b Orange request; get RVK (relative vertex keys) work for Curve objects.
Sir yes sir!
2005-09-20 21:18:37 +00:00
Alexander Ewering
a07394ef2c More text object fancyness, and fixes:
- "Flush" is now split into two seperate Alignment modes "Flush" and
   "Justify":

   - Justify does exactly the same as a normal word processor's justify
     function does, and in addition, it uses *whitespace* instead of
     *character spacing* (kerning) to fill lines. Much more readable.

   - Flush is pretty much the old Blender "Flush" mode - and as such it
     uses character spacing to fill lines. Just as Justify, this only
     works with at least one textframe.

 - Underlining for text objects. Not a lot to explain. New button "U" in
   the editbuttons, and CTRL-U as hotkey toggle underlining for newly
   entered characters or for the selection, just like CTRL-B/CTRL-I do for
   bold/italic.

   Underline height (thickness) and Underline position (vertical) can be
   set in the editbuttons.

   Implemented as CU_POLY polygon curves.

 - The B, U and i buttons (and the corresponding CTRL-B/U/I keystrokes)
   have been fixed to only affect *one* attribute at a time. Formerly,
   hitting CTRL-B when no other style was active, on a text portion with
   italics text, for example, would kill the italics and just apply bold.

   Now, these attributes always add or substract only, but do not
   replace the style.

 - In the past, there were bugs with material indices uninitialized, and
   thus crashes in the renderer with illegal material indices.

   Even though I assume they have been fixed, I've put in a check that
   checks (hah) if the material index of a character is illegal (bigger
   than ob->totcol), and then sets it to zero, and spits out a warning
   on stderr.

   If you see such warnings, please report and link to the .blend.

 - Bugfix: All alignment modes only worked if there were at least *two*
   lines of text in the text object. Fixed


There's now a regression test file for text objects, please add to the
corresponding repository:

http://blender.instinctive.de/downloads/release/demo/text-regression.blend.gz
2005-08-29 12:46:07 +00:00
2abd79b491 - readded DL_VERTS type to store lattice deformed verts
- new feature, twiddled with lattice resizing to try to maintain
   existing vertex changes... much nicer than just resetting the
   lattice if you decide you need more detail in the lattice.
 - modifiers work with lattices now. yes, that does mean you
   can make a chain of lattices effecting each other 8 miles
   long.
 - some cleanup of softbody code, was rather splintered and call
   path was twisted and confusing. reworked main object step
   routine to do things in a more obvious and consistent manner
   and without duplicate code
 - added ob->softflag OB_SB_RESET instead of sbObjectReset
   call
 - modifier changes reset softbody now
 - moved curve_getVertexCos/curve_applyVertexCos into curve.c
 - update curve modifier eval to work with virtual modifiers
 - update modifier apply to work with curves/surfs
 - update make parent to also recalc object data

NOTE: Although you can turn SB on for curve/font objects at the
moment it doesn't really work because they call deform in
multiple steps and this confuses SB. Not sure how to deal with
atm.
2005-08-15 10:30:53 +00:00
93aeb6b318 - added make_orco_curf, even does keys!
- removed {lattice,curve}_modifier functions
 - changed render code to use displist for curve rendering
   instead of making its own. required adding a bevelSplitFlag
   field to DispList. I also fixed the bevel face splitting
   which did not work correctly in many situations.
 - changed so all curve data creation happens in makeDispListCurveTypes,
   includes making bevel list and filling polys
 - changed render code to use displist for surface rendering
 - removed Curve.orco variable, built as needed now
 - removed stupid BLI_setScanFill* functions... why use a function
   argument when you can use a global and two functions! Why indeed.
   (this fixed crash when reloading a file with filled curves and
   toggling editmode)
 - bug fix, setting curve width!=1 disabled simple bevel for no
   apparent reason
 - cleaned up lots and lots of curve/displist code (fun example:
   "if(dl->type==DL_INDEX3 || dl->type==DL_INDEX3)"). Hmmm!
 - switched almost all lattice calls to go through lattice_deform_verts,
   only exception left is particles
 - added DBG_show_shared_render_faces function in render, just
   helps to visualize which verts are shared while testing (no
   user interface).
 - renamed some curve bevel buttons and rewrote tooltips to be
   more obvious
 - made CU_FAST work without dupfontbase hack

Also by the way I wrote down some notes on how curve code
works, nothing spiffy but it is at:

http://wiki.blender.org/bin/view.pl/Blenderdev/CurveNotes
2005-08-14 06:08:41 +00:00
74dc0e191d - more nurbs fixes... as it turns out, rendering of cyclic UV didn't
really work at all. Fortunately no one actually *USES* nurbs so
   no one noticed. This is bug from NaN days (strubi, I am looking at
   you here) which I guess says a lot (or a little) about NURBS usage.
   And as usual, the correct code is shorter.
 - added do_version copy of ME_OPT_EDGES flag
2005-08-13 05:05:18 +00:00
5afdfc6ac1 - remove some silly array copying code for nurb displist generation
- converted dl->flag to use consistent defines for cyclic U/V
2005-08-11 22:27:53 +00:00
06c7653be1 - added boundbox_set_from_min_max function
- fix DerivedMesh.getMinMax implementations to set min & max when
   there are no vertices
 - mesh boundbox calc was wrong in some cases, messed up HOMEKEY
   and localview zooming
2005-07-18 17:33:51 +00:00
e67ba0ae33 More armature goodies;
The B-Bones!
(where the B can be read as 'block' or 'bezier' or 'b-spline')

- set option on/off in edit buttons, armature panel
- scaling of B-bones only works in editmode, use ALT+S to make bones fatter
  or thinner. Also works for constrainted transform
- In pose mode, you now have a buttons panel with per-bone settings too
  Here you can find the "segments" button, which allows bones to
  interpolate between previous/next bones, including roll.
- Buttons to control interpolation ("In" and "Out" are disabled, doesn't
  work satisfying yet

NOTE: this doesn't give deform yet! Main purpose for now is to test if this
drawing method serves to animate/pose armatures well.
Still need to review proper interpolation methods... maybe bezier is too
limited.
2005-07-16 19:07:02 +00:00
befc2bbc41 - split makeDispList into makeDispList{Mesh,MBall,CurveTypes}, there is
still a makeDispList that dispatches to the appropriate one.
   makeDispList is on the way out and this makes it easier to track down
   exactly which places use makedispList and for what types of objects.
 - switch calls to makeDispList to appropriate more specific function (if
   the object type is known by caller).
 - added mesh_changed function that invalidates cached mesh data (but does
   not rebuild, mesh data gets rebuilt on access). Most old calls to
   makeDispListMesh use this instead now.
2005-07-14 15:48:01 +00:00
a17e21dfab SLightly altered rule for the new IpoCurve option "Keep horizontal on
extrema". It now also keeps auto-handles horizontal when the Y coordinate
is exactly identical.

And; made this option default on inserting new curve/keys.
2005-07-11 12:31:15 +00:00
31f50d9247 For long on the wanna-have list;
Ipocurves with "Auto" handles now have option to remain horizontal on the
extrema (tops & valleys). Use ALT+H to set this per selected curve.
Note this is a per-curve feature, not per-handle.

If it works satisfying I can check on making this the default new added
curve.
2005-07-10 12:50:14 +00:00
Alexander Ewering
97df61a7e5 Initial commit for new text object.
Important notes:

 - Full compatibility with old text objects not fully restored
   (word spacing will be 0.0, need to set it manually to 1.0), will
   either need version upgrade to 238 or a hack. Will check.

 - lorem.c (about to be committed) contains BF copyright notice, but as
   BF did not exist a few hundred years ago, probably best to remove it :)

 - If you notice any cross-platform issues (especially beloved windows),
   please report

 - A few tiny warnings left, I will fix those issues still.

The rest has been said already - so have fun testing. And please do!

=== Reminder:
=== Documentation at http://blender.instinctive.de/docs/textobject.txt ===
2005-06-17 21:04:27 +00:00
d34acbfe44 Replaced a bunch of malloc() calls with proper MEM_mallocN()
(and free() and calloc() of course)

Remainder malloc() calls need to be there for realloc().
2005-04-17 18:00:33 +00:00
5ff281eaec Li'll feat request;
When curve objects have no front/back faces, the bevels were only drawn
for the outer part. Now it also makes interior bevels, so yo can
have a curve become a 'solid' ring easily.
Note: only works when you disable filling option "Front" and "Back".
2005-04-16 15:51:44 +00:00
8e92ee8684 - remove all obsolete inclusions of BLI_winstuff.h (due to recent changes)
NOTE: BLI_winstuff.h was meant to be a wrapper around windows.h to handle
undefining various crap that windows.h defines. Platform specific headers
should only have to be included in a few places. This reduces the number
of inclusions of BLI_winstuff.h to 16 which is a much more reasonable
number (than the 144 or whatever it used to be)
2005-03-19 21:08:13 +00:00
290361776e Thanks to stefano; auto-handles on Bezier curve now make a (near) perfect
circle.
bug report;
http://projects.blender.org/tracker/index.php?func=detail&aid=2274&group_id=9&atid=125
2005-03-03 21:25:53 +00:00
6c04fe887e Just some nice updates in drawing (extruded) Curve objects;
- display of 'smooth' or 'solid' is correct now
- standard bevel and extrude displays in 'smooth' correctly now (with sharp
  edges where you expect it)
2004-10-31 13:51:36 +00:00
16e90d56d2 - replaced AUTOSPACE define with {ME_,CU_,MB_}AUTOSPACE,
different objects shouldn't share flags this way (still sharing of
  other mesh flags in renderer... ickity pickity, but I'm not fixing now)
 - removed some unnecessary uses of DNA_mesh_types.h
2004-03-14 16:59:48 +00:00
e1d6502259 - first of a series of translated C comments. No dutchies get advantage anymore soon... :-) 2003-04-25 15:48:11 +00:00
d0e346d544 updated .c files to include:
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

Just need to finish cpp files now :)

Kent
--
mein@cs.umn.edu
2002-11-25 12:02:15 +00:00
f6c7a89357 some small optimizations 2002-10-30 00:37:19 +00:00
Hans Lambermont
12315f4d0e Initial revision 2002-10-12 11:37:38 +00:00