Commit Graph

53000 Commits

Author SHA1 Message Date
Ton Roosendaal
3e5200f1db - Restored 'align mode', which allows rotate/scale with only object centers
- commented out debug prints from theeth :)
2005-03-09 16:58:42 +00:00
Joilnen Leite
7968cf078e doc about Text3d module
.
2005-03-09 02:06:35 +00:00
Daniel Dunbar
0cb8cac4d3 - replaced min() by MIN2() and max() by MAX2()... my bad. 2005-03-08 19:31:16 +00:00
Daniel Dunbar
5936870006 Bug fix #2296
- Background image would jitter around on ATI card when zoomed in too
   far. It appears that the driver is was multiplying the image width
   by the zoom factor at some point and clamping this number, before
   clipping the visible image. Somehow this then fed back in to clipping
   the zoom factor.

   Fix is to only tell GL to draw the smallest number of pixels (width
   and height) that would be visible on the screen. Since this is not
   a generally bad thing to do applied fix for all users of
   glaDrawPixelsSafe.
2005-03-08 19:27:58 +00:00
Daniel Dunbar
af092210db - switch draW_bgpic to calculate window coordinates as floats, smoother
zooming of background pic now.
2005-03-08 19:18:40 +00:00
Daniel Dunbar
a26d91fddf - replaced call to project_short_noclip with direct implementation
because project_short_noclip doesn't do the calculation if
     the value would be near-clipped. For background picture we
     don't care about this.
2005-03-08 18:58:27 +00:00
Ton Roosendaal
8eef3cfd9c New transform project;
- restored 'Warp' (Shift+W). Should work like before, including type mode
  and holding ctrl/shift modifiers
- added CTRL event in queue, to only redraw when you press it. looks nicer.
2005-03-08 17:29:33 +00:00
Martin Poirier
81ea38cd10 + Local axis constraint for multiple object selection works with resize and rotate (the easiest).
+ Refined the headerprint for Translation. Now prints only the needed info for constraint in the constraint's space (ie: if you're moving 1 unit along the local X axis, regardless of it's orientation, it will print "D: 1.000 along local X")
Still need to make numinput work like that (typing a number with a local axis constraint would move along that axis. There's some base code already though, just need a finishing touch, but it's late now)

+ Optimised PET calculations by using the TD_NOACTION flag (actually, that might have been in the last commit).

+ Added a float axismtx[3][3] member to TransData to store the orientation of the element (useful for local axis constrainst which, in edit could be moving along normals and the like).

- Fixed scaling in edit mode (was doing some matrix multiplications in the wrong order, only visible when using a constraint)

- Fixed the constraint projection matrix. It didn't work for planar constraint if the constraint space wasn't global (in a nutshell, it produced weird results for local space planes).

- Some potential bugs fixed (Note to Ton: added an ext pointer in TransInfo to point to the TransDataExtension block. With the sort done after allocation, the first td pointer doesn't necesarely point at the start of the ext block, so we needed another to free it correctly).

- Got rid of some remaining test with G.obedit.

- Moved constraint reset from init to post trans code (Ton, that means you can create constraints before calling transform, like for the menus for example).

NOTE:

I was getting some random segfault with the new headerprint code. Very random, couldn't reproduce with a debug version. I did some initialisation that might have been missing (though doubtful that's what caused the crashes). Was linked to using constraint though not caused by them. Probably due to some dumb late coding error.
2005-03-08 03:51:45 +00:00
Chris Burt
23eb4780bf Tooltips for new marble buttons were from a copy/paste operation. This
caused error with... well... tooltips. ;) First commit!
2005-03-07 15:26:32 +00:00
Johnny Matthews
9e52a14894 Solves a build problem with MSVC scons build. Thanks kaito for pointing out the Black box of BLI_winstuff 2005-03-07 14:48:13 +00:00
Ton Roosendaal
d6f6d13f3a Bug fix #2292
Bumpmaps for skin on Env's dinosaurs appeared to be less nice in 2.36. This
was caused by the bugfix to make bumpmapping correct for rotations, which
should only work for flat/cube mapping. It also rotated it for sphere/tube
though, which gives less interesting bumps.

So; now the correction is skipped for tube/sphere mapping bumping.
2005-03-07 12:41:23 +00:00
Ton Roosendaal
fb94fcd4e7 Patch provided by Chris Burt;
Wood/marble now have three waveforms to choose from: Sine, Saw and Triangle.
The Saw wave allows for much more realistic wood, especially in combination
with a ColorBand. A blender3d.org release page is being constructed about it.

Added: commit in editmesh_add.c to remove circle warning in face-select mode.
2005-03-07 11:01:43 +00:00
Stephen Swaney
a1f97a01e4 fix warnings about implicit declarations.
overlooked by being in a hurry.
2005-03-07 03:31:14 +00:00
Martin Poirier
7b081fe3b7 Local axis constraint started.
Works with edit data and in object mode with single selections (only one object selected).

Also started adding constraint stuff in headerprints. Only for Translation for now.

Pressing X,Y,Z (and the Ctrl versions) toggle between global, local and off like it used to do.
2005-03-07 02:21:04 +00:00
Ton Roosendaal
b6cb442c2a Fix & further implementation of Proportional editing;
- made generic 'calc distance' function for it
- added generic call to sort TransData with selection first, for speedup
  of propmode calculus
- removed most propmode exceptions from code, only used for counting now
- all editmode transdata conversion function structured identical
2005-03-06 19:25:58 +00:00
Stephen Swaney
454041cc4f New Bpy type Text3d for accessing Blender's Font objects.
Contributed by Joilnen Leite (pidhash).
2005-03-06 14:55:00 +00:00
Ton Roosendaal
c8a84be5f4 Bug fix, provided by Martin Dickopp;
The dynamical allocated arrays (rwenzlaff, april 03) for render vertices/
faces/halos were freed in a way that requires the last element of array to
be NULL.
This wasn't coded however, causing memory errors in exceptional cases;
like when amount of faces/vertices is exact between 261888 and 262144. :)
2005-03-04 22:17:52 +00:00
Ton Roosendaal
512aabd68e Bug fix #2265
Found (old) issue in render... the "VlakRen" (render face) has an Object
pointer which can point to a duplicated one (dupliframes/dupliverts option),
which is freed before actual render starts... this nicely crashes in Windows.

I now store the original Object pointer, which can lead to texture
orientation errors in some situations (like normal-bump stuff).
Real solution is recode of duplicator system!
2005-03-04 20:20:59 +00:00
Ton Roosendaal
9e7c590146 Bug fix #2270
Accidentally left in testing line in dxf reader... causing quads to be
imported as triangles. Was released in 2.36! Tsk.
2005-03-04 20:02:52 +00:00
Ton Roosendaal
611c38d0f9 Bug fix #2289
Environment maps type "Load" don't need to have an "Ob" object set to
render. Without object it renders applied envmaps like reflection maps.
Please note that envmaps then still "mirror" realistic, provided the
original object the envmap was rendered with  was not rotated.
2005-03-04 19:44:29 +00:00
Martin Poirier
a61c0d7995 need to use MIN2 instead of min for compatibility with other compilers. 2005-03-04 03:52:09 +00:00
Martin Poirier
f458405069 Fixed resize constraining. Was using same function as translation but this is no go for unaligned axis.
Made a generic snapGrid function. Now, each transform needs to define it's snapping parameters in their init. This is needed because of the constraint branching.
2005-03-04 00:07:16 +00:00
Ton Roosendaal
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
Simon Clitherow
b2288bca09 Applied correct '\\' for file paths on Windows (thanks Elubie!) 2005-03-03 20:40:48 +00:00
Ton Roosendaal
894a73590f Tinsy UI change in game-framing menu (X and Y resol buttons correct align)
Provided by Carsten.
2005-03-03 20:30:18 +00:00
Johnny Matthews
c48fcd1f00 New menu option: When converting a subsurf or metaball to mesh, the option to delete the original is added, along with code to make it work :) 2005-03-03 19:45:37 +00:00
Martin Poirier
58b3022b52 Fixed a bug in the constraint projection code. It only worked correctly when locking the Z axis because of a malformed if clause.
Renamed the constraints defines to CON_*

Renamed the fonctions used to interactively select a constraint (with MMB). The previous naming scheme was obscure at best.

Added a CON_SELECT flag when selecting interactively. (Following the idea of the patch joeedh submitted).
New behavior when selecting a constraint interactively, not only does it highlight the axis that will be selected, it also makes it the current constraint.

Holding down Ctrl when selecting a constraint with MMB now does the same as hitting Ctrl-AXIS. That is, it locks that axis (planar constraint on the normal plane).

- - - - -

To all those who posted suggestions, I'm not forgetting them:
- broken / desoto with the plane draw thingy,
- RobertT's push/pull transformation (that was from before the new code even)
- UnNamed's MMB interactive idea as we discussed on IRC
and all the others that I've noted down somewhere.

Next for today, I'll have a look at local constraint (object's axis).
2005-03-01 19:22:29 +00:00
Ton Roosendaal
dbce997ba1 Bug #2266
- top header count updates correct now using SHIFT+F4 databrowse
- same for switching layers in 3d window
2005-03-01 16:19:19 +00:00
Ton Roosendaal
a7afceb622 Fixed very old annoyance;
If the startup file ".Blanguages" is not found, Blender now will only printf
a warning if started in debug mode (-d). It used to popup a menu, even
before the UI was initialized, causing annoyance... it's irrelevant info.
2005-03-01 15:29:01 +00:00
Ton Roosendaal
bd874641a9 Bug fix #2260
"Select group, Parent" menu crashed when parent was in other scene.
Simply added extra check in code.
2005-03-01 14:03:59 +00:00
Ton Roosendaal
bc0ca65db8 Bug fix #2248
Pressing AKEY in channel buttons (names) of IpoWindow did not show all or
hide all anymore. Was due to commit last july, which enabled unlimited
amount of channels.
2005-03-01 13:14:37 +00:00
Willian Padovani Germano
52b84f0e69 BPython:
- Gert de Roost reported an inconsistency between nmesh.getMode and .setMode.  Now .setMode() optionally accepts an int value, as returned by getMode().
- Campbell Barton pointed that object.getData(name_only=True) was by mistake returning the obj name, not the obdata name, as it should.  Fixed now.
- small doc updates

Thanks both for the reports.
2005-03-01 02:37:19 +00:00
Stephen Swaney
6c62b0d8b7 Part of Big Cleanup: move data declarations out of header files.
BGL.[ch] work done by Joilnen Leite (pidhash).  Thanks!

updated 0-todo.txt.
No changes to executable code.
2005-02-27 20:07:26 +00:00
Martin Poirier
cfd5439bc6 Fixed Constraint projection code in perspective mode. When using a planar constraints, it follows the movement of the mouse exactly instead of just casting on the plane.
In user terms: the motion on screen of the selection follows the motion of the mouse pointer.

Gives some errors when the constraint plane is nearly perpendicular to the view port though.

Added a debug print function for 4D vectors to arithb.c

Optimised the 3D -> view projection functions in view.c (a bit).
2005-02-27 19:14:21 +00:00
Stephen Swaney
db892de35f Updates to NMesh doc contributed by Campbell Barton.
Corrections and useful user-oriented hints.
2005-02-27 15:15:39 +00:00
Ton Roosendaal
76500cd1ed Transform; correct inverse parent implementation for translating children 2005-02-25 19:01:13 +00:00
Johnny Matthews
bca210bc04 Update on Add Text as lines:
Spaces lines based on view -tnx Kaito for inverse help
cleaned up code
added undo
2005-02-25 17:48:06 +00:00
Ton Roosendaal
b334be110d New transform:
- added texture space grab/scale (TKEY objectmode)
- made new transform work with menus (meaning, dropping dreaded while-hold)

To Martin & other while-hold lovers: this needs to be carefully thought over
and designed. I prefer to look on this within context of making transform
fully tablet/pen friendly, as option. Aim now for me is still: get transform
back to work! :)
2005-02-25 17:40:03 +00:00
Kent Mein
e13933bc7c Added include sys/vfs.h for hpux was in the patches tracker....
and cleaned up the include for dirent.h

Kent
2005-02-25 14:50:57 +00:00
Ton Roosendaal
8ff9af5609 Transform: gesture for 'scale' did rotate, and viceversa. Typo :) 2005-02-25 12:48:23 +00:00
Ton Roosendaal
da00e25dff Preview render of stucci was wrong. Fix found+provided by Chris Burt. thnx! 2005-02-25 12:19:42 +00:00
Ton Roosendaal
4ee71094fa Added the "initgrabz()" call in new transform, this is needed to calculate
correct mapping of mouse motion to a 3d vector in perspective mode, e.g.
corrected for depth.
2005-02-25 11:55:03 +00:00
Ton Roosendaal
91fbe72115 Transform project.
Brought back functionality to work with "Ipo Keys" (Kkey in 3d window). New
transform code is looking more messy now... its design was not purposed to
clean on this level. Acceptable for this stage however.

Also renamed old variables *tob into *td.
2005-02-25 11:35:24 +00:00
Johnny Matthews
5519157c86 This is an initial commit for inserting a text file as one 3d text object per line. The function for making the objects aligned to the screen needs to be added, since right now it is aligning rotation to the screen but translation is not right since I am adding an offset to the non-viewport location of the objects. That offset just needs to be translated to screen first. 2005-02-24 19:22:31 +00:00
Ton Roosendaal
386f390ab8 - Transform works for Posemode again (after split of TransData in 2 parts)
- error in scaling objects fixed (it accumulated scaling)
2005-02-23 14:19:41 +00:00
Martin Poirier
9f678340b5 Fixed some bugs with Shear and Resize, was acting weird in object mode when parenting was involved.
Changed the meaning of mtx and smtx for objects. It's now uniform accross the board.

Added TD_OBJECT as a TransData flag. Objects is requiring exception code here and there, use a flag instead of G.obedit. Will document what the exceptions are for people who wants to add more transformations.

Split TransData in two.

Note to Ton:
You'll have to change posemode to use the new structure. I've left some variables as part of TransData to have a compilable version in CVS, remove them when you stop using them.
Check MetaElement and Object conversion for example on how to use TransDataExtension (though I'm sure you can figure it out by yourself).

And that's it. Not much coding time in the week days. :\
2005-02-23 02:23:50 +00:00
Kent Mein
b8aa04ed62 Modified the sdl stuff so it is similar to the way the soundsystem does it.
Was causing problems for people.

Kent
2005-02-22 17:15:43 +00:00
Ton Roosendaal
118e4bcf7b Transform project. Daily update:
- Pose Mode restored
- Dependencies work again as usual (mainly copied old code)
  so grabbing a Hook deforms, etc
- Made main transform loop idling nicely (save CPU)
- removed proportional mode for Objects (Martin OK'ed)
- code style: renamed "tv" into "td" variable names (trans-data now)

TODO:
- Ipo Key-mode editing
- texture space grab/scale
- correct inverse for scaling children offset
- actually, loadsa testing needed. :)
2005-02-22 16:50:04 +00:00
Joseph Gilbert
3cd546e484 Patch submitted by Michael Reimpell
- Adds NormalMap to python's list of Texture Image flags
2005-02-21 22:00:11 +00:00
Joseph Gilbert
34b61ee4e9 -AngleBetweenVecs() was returning only 8-digit precision. This changes the precision to 16-digits and should fix some problems regarding spurious numbers being returned by python after running this function. 2005-02-21 18:26:53 +00:00