Commit Graph

548 Commits

Author SHA1 Message Date
Nathan Letwory
0ff06e21cd doxygen: blender/blenkernel tagged. 2011-02-27 20:40:57 +00:00
0955c664aa fix for warnings from Sparse static source code checker, mostly BKE/BLI and python functions.
- use NULL rather then 0 where possible (makes code & function calls more readable IMHO).
- set static variables and functions (exposed some unused vars/funcs).
- use func(void) rather then func() for definitions.
2011-02-13 10:52:18 +00:00
ede0d85522 comment/remove various unused vars,
also make rna function for new images require width and hight args.
2011-01-10 03:58:07 +00:00
89c9aaaa25 remove references to BKE_utildefines where its not needed.
- move GS() define into DNA_ID.h
- add BLI_utildefines as an automatic include with makesrna generated files.
2011-01-07 19:18:31 +00:00
8f21a43535 split BKE_utildefines.h, now it only has blender specific defines like GS() MAKE_ID, FILE_MAXDIR, moved the generic defines to BLI_utildefines.h.
no functional changes.
2011-01-07 18:36:47 +00:00
64c3ea272e Todo item: linked curve objects behaves incorrect with modifiers
Use object's displists for storing deformed tesselated curve. Was unable to
totally get rid of curve's displist because of how texture space is calculating.
2011-01-05 10:40:38 +00:00
09debd69ba change the resolution for new surfaces to 4x4, since 12x12 used to be the total number of subdivisions along the U/V of the nurbs surface but now its multiplied by the number of segments. 2010-12-20 07:45:24 +00:00
990b487c73 Bugfix #25026
Nurbs edit: 'switch order' crashed when order was higher than amount of 
points.
2010-12-03 17:31:34 +00:00
8934b61739 Fix #25017: Bezier Curve Deform Twisting after adding Shape Keys
- Invalid step was used in curve_applyKeyVertexTilts
- Minor cleanup in editcurve stuff
2010-12-03 14:35:03 +00:00
51dcbdde03 use 'const char *' by default with RNA functions except when the value is flagged as PROP_THICK_WRAP.
Also use const char in many other parts of blenders code.

Currently this gives warnings for setting operator id, label and description since these are an exception and allocated beforehand.
2010-11-17 09:45:45 +00:00
ba965b0f7a Seamless texture used for beveled curve is now really seamless (thanks to Mario G. Kishalmi aka lmg) 2010-11-14 19:06:39 +00:00
cf673cf80a Fix #24643: Nurbs Surface Preview resolution overrides render resolution
NURBS surfaces always used resol{u,v} from spline and never used curve's render resolutions.
Now, if curve's render resolution is non-zero then it'll override resolution for all
splines when rendering (in needed direction only, ofcource).
2010-11-11 09:56:39 +00:00
e179c92a27 tedious string copying changes
- use sizeof() in more places.
- fixed some off by 1 bugs copying strings. setting curve font family for instance was 1 char too short.
- replace strncpy and strcpy with BLI_strncpy
2010-11-05 07:35:21 +00:00
Nathan Letwory
715fa82769 Make sure separation between modifier keys is communicated from GHOST upwards too (BGE at least uses this). 2010-10-24 12:45:47 +00:00
1de1d6537e Fully disable AUD's FFTW3 usage. 2010-10-24 00:09:23 +00:00
8268a4be71 most unused arg warnings corrected.
- removed deprecated bitmap arg from IMB_allocImBuf (plugins will need updating).
- mostly tagged UNUSED() since some of these functions look like they may need to have the arguments used later.
2010-10-16 14:32:17 +00:00
b01e6fd564 rename makeknots to nurbs_knot_calc_u/v 2010-09-30 06:51:32 +00:00
33fab0f7d7 fix for user counts with text3d bold/italic fonts. 2010-09-29 06:24:05 +00:00
6be46efe6c fix for the rna curve interpolation enum, 'ease' was using the same value as Bezier. 2010-08-12 06:28:46 +00:00
14fe11bd81 bugfix [#19525] Curve modifier moves mesh geometry first
more of a request then a bug but shows up a strange limitation with curve deform modifier,
The mesh bounding box would set the deform axis start/end to map the deformation of the curve to. This means it ignored offset in the object location and object data location (you could use a dummy vertex to trick it).

Old files wont change, added an option (next to stretch), called 'Bounds Clamp', old files have this behavior but newly made curves have it disabled.
Double checked this gives useful results with stretch on/off and negative axis.
2010-08-06 08:27:07 +00:00
5f77852a47 Do not reset bevel/taper object when they've got incorrect type - just do
noting in makebevelcurve and calc_taper functions if type is not curve.

This avoids DNA changing depended on object recalc.
2010-08-05 08:39:25 +00:00
708ef64663 include cleanup, no functional changes
- removed DNA_brush_types.h from DNA_scene_types.h (and some other similar cases)
- removed DNA_wave_types.h (never used)
- removed Main.wave
2010-08-04 04:01:27 +00:00
66f32bd7f9 set origin was setting surfaces as 2D curves, added dupli-group support using the dupli's offset value. 2010-08-03 00:56:43 +00:00
d25747ee75 bugfix's
[#23108] bpy.ops.object.origin_set(type='GEOMETRY_ORIGIN') dosen't work in console
  [#23115] Crash when moving armature origin

- setting the armature in editmode would leave editdata in some cases.
- transforming selected linked objects to account for the movement of the obdata was only done for meshes, now do for curves and text3d.
- added utility functions for getting curve & mesh bounds.
- text3d moving center wasn't working at all.
- changed drawobject.c to use BLI_math funcs in more places.
- remove some unused code from operator object.origin_set.
2010-08-01 11:00:36 +00:00
cc0f3146e7 Shapekeys for curves/surfeces
Fix #21498: Edit curve Shape key /252_r 27318

Added full support of shape keys for curves and nurbs surfaces including
topology changing in edit mode, undo stuff, updating relative keys when
working under basis and so on.
2010-07-25 11:57:36 +00:00
1bb0c84236 - added text3d.body_format to be able to set bold/italic/smallcaps etc on text.
- the length of a new text object wasnt set on creation.
- tex3d and controllers rna name was being set to its body (rather then ID name)
- remove reference to wave objects which are very old and not used anymore.
2010-07-17 17:50:20 +00:00
d94868f821 Incorrect flags were checing for cyclic in order clamping functions 2010-07-16 09:45:09 +00:00
8e3a9634a3 Change to text3d: When back or front is enabled, the bevel rim on the other side is not created anymore, just as the back/front filling faces are not created when disabled.
when both are off the behavior is unchanged.

This is needed when rendering alpha text so its possible to have a single layer of faces but use the bevel option to make text thicker.
adding a rim on the back when back is disabled also doesnt make much sense IMHO.

minor python edits too.
2010-07-14 17:47:58 +00:00
03e638d128 - make duplis real wasnt redrawing
- small caps option for titles (doing manually is quite painful to watch).
2010-07-13 22:21:59 +00:00
f7717b2e80 option to use curve point weights to influence particle effectors. 2010-04-21 11:59:47 +00:00
8f1500da00 remove config.h references, was added for automake build system rev around 124-126 but isnt used by any build systems now. 2010-04-18 10:28:37 +00:00
0d19b4167c - Call DAG_id_flush_update for each object in convert operator if keep_original
option is switched off. This fixes trouble when user converts curve which is
  set as taper/bevel object to mesh (scene kept unchanged until object
  recalculation).
- Moved checking of taper/bevel objects type to RNA property update handlers.
- Added resetting taper/bevel object in do_makeDispListCurveTypes it this
  objects aren't curves.
2010-03-30 18:10:05 +00:00
d0f8d9f38c Fixed segmentation fault when non-curve object is setting as a taper
Deny user to select non-curve objects for taper and bevel lists, also
added some checking into displist and curve modules - object could be
converted from curve to mesh (would be better to unset bevel/taper
object in this case -- will try to implement a bit later).
2010-03-30 14:33:05 +00:00
0912d84f2a Fixed incorrect rendering result when bevel object has got modifiers
enabled only for realtime display or only for rendering
2010-03-26 15:06:30 +00:00
1e9bf0cfdb spaces -> tabs, (4 spaces == 1 tab, only for white space preceding text) 2010-03-22 09:30:00 +00:00
546ca400d8 removed unused includes, except for physics and particle related files 2010-03-21 13:42:25 +00:00
391cc2d004 merge own commits into render branch into trunk since 27560
27562, 27570, 27571, 27574, 27576, 27577, 27579, 27590, 27591, 27594, 27595, 27596, 27599, 27605, 27611, 27612, 27613, 27614, 27623
2010-03-20 16:41:01 +00:00
838842581c - Fixed trouble with rendering curves with disabled modifiers, which are
disabled for realtime displaying but enabled for rendering.
- Calculate tex space for curves before modifiers applying.
2010-03-08 13:49:13 +00:00
a9e3e0e40f Patch #21267 by Sergey Sharybin
His log:
There is a small typo in copy_curve(): there will be serious troubles 
if this functions is called for OB_FONT in edit mode (for my cases 
it is segmentation fault).
I think we should set editfont to NULL for cloned curves (as it is made 
for edit nurb).

This bug was found by trying to edit text with applied Cast modifier 
and while I was searching what's wrong, I've found that in 
castModifier_deformVerts() DerivedMesh is creating for all objects, 
but in castModifier_*_do() derived mesh is used only for OB_MESH 
objects. Maybe this place could be optimized a bit by skipping DM 
creation for non-meshes?
2010-02-27 16:06:33 +00:00
081c1205a3 correct fsf address 2010-02-12 13:34:04 +00:00
02d9da1d5d [#20681] Text beveling works incosistently when not justifying text left
as changed in 2.4x
2010-02-03 21:33:22 +00:00
8dd14e1eed Graph Editor: Bugfixes for option where only the keyframes of selected F-Curves are shown
* Selected keyframes in unselected F-Curves were still being modified, although not shown
* Selection tools for keyframes were changing the selection status of F-Curves, making keyframes sometimes disappear after trying to select another keyframe

* Warning fixes in a few other files
2010-01-22 23:51:31 +00:00
bd1f548d8e fix for [#19655] Curve is a disaster
when changing curve twist I assumed 2D curves would not need dir or quat values set, however these are used when getting a path from a curve.
also added interp_v3_v3v3v3v3
2009-11-21 14:35:28 +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
06d5d53a24 Bugfixes + Spline IK Tweaks:
* #19819: 'Select' operator for Hooks was crashing when Hooks didn't have any vertices assigned yet

* Default twist resolution mode for curves is now 'Minimise'. This seems to work better for Curve Deforms and other purposes. Can be changed if other ways are better after some more testing.

* Spline IK now has more options for controlling how the x and z axis scaling is determined. There is now a choice between using the radius of the curve, the x+z scaling from the bones, or no scaling (default). This does break old files a bit, but this is to have a more stable base for later.
2009-11-05 10:09:45 +00:00
ae37d92dbf Fix #19742: shape key crashes for curve & lattice. 2009-11-04 09:20:31 +00:00
06d57fdae0 Shape Keys
Internal change to not apply the shape keys to the Mesh vertex coordinates,
but rather use it as part of the derivedmesh/displist evaluation. This only
has one practical advantage right now, which is that you can now make a
linked duplicate and pin it's shape key to a different shape than the first
object.

Further, this makes shape keys correctly fit into the modifier stack design,
which will help implement some other features later. Also it means the mesh
vertex coordinates are now really the orco's.
2009-10-22 09:31:07 +00:00
5fb73d8b81 Make compiler happy, remove doubtful non init usage. 2009-10-21 17:56:26 +00:00
474378a0e8 VecAngle3_2D, VecAngle2 and VecAngle3 returned degrees, in arithb.c degrees are most common.
- These now return radians
- added macro RAD2DEG(rad)
- renamed VecAngle3_2D to Vec2Angle3 since Vec2* is used in arithb.c for 2D vector functions.
2009-09-18 15:47:00 +00:00
ba5df38d66 use static functions where possible for some local functions. 2009-09-14 16:52:06 +00:00