Commit Graph

3956 Commits

Author SHA1 Message Date
Stephen Swaney
f7ba839698 epy_docgen.sh: change directory name for generated doc to BPY_API_237
for upcoming release.
Font.py:  fix a couple of warnings about mismatched header underlines.
2005-05-09 14:11:00 +00:00
Joilnen Leite
34cd733c2b fixed a syntax error line 45
.
2005-05-09 13:40:00 +00:00
Ton Roosendaal
dec1c38332 New buttons image, with fix for slightly offset icons in top row. 2005-05-09 12:59:05 +00:00
Joilnen Leite
6eb57f8c0a doc about Text3d.Font object
.
2005-05-09 11:43:14 +00:00
Martin Poirier
dcae3d2058 MSVC 6.0 Projectfile changes for the timeline in BL_src.dsp (adding new files mostly).
BPY_python.dsp need some changes too (adding Font.c and Font.h) but I've got other changes in there that I can't commit, so someone else will have to update.
2005-05-09 09:53:55 +00:00
Alfredo de Greef
e9545cb9cd bugfix #2494:
parented linked data lamps made the export crash.

fix for two bugs reported by Diego Pino, an endian issue with vertex colors,
and the plugin code didn't export multiple colorbands correctly.

Updated the ortho camera export code for the new Blender ortho camera model.
2005-05-09 03:46:21 +00:00
Willian Padovani Germano
09fb5d6b8d BPython:
- Made Blender.event var (previously only used by script links) hold ascii value -- where it applies -- of current event during events callback registered with Draw.Register(gui, events, button_events).  Useful for gui scripts like Campbell's Python console. No problem using this var to hold the value, since in gui scripts it was not used (always None).

- Updated Window and Window.Theme with new theme vars and the Time space.

- Script links:

-- Added "Render" event for script links (runs twice, second time as "PostEvent", for clean-up actions). Now FrameChanged links don't run when a single pic is rendered.

-- Added "Enable Script Links" button in the script buttons tab.  Now this bit gets saved in .blends along with the rest of G.f, so users can define per .blend if they are on or off by default.  "blender -y" also disables all slinks as happened before with OnLoad ones only.

-- Other small changes in the script buttons tab:
  When a link is added (button "new"), it becomes the active one for the window, no need to press a button to reach it.
  Also, a pupmenu showing all available texts is shown when "new" is pressed, so users can choose a text w/o having to type.  Cancel the popup to leave the string button empty (link exists, but has no script assigned).  A pulldown would be better UI-wise, but it's kinda weird to show both scripts and normal texts (Blender doesn't differentiate them) in a script links pulldown.  With a popup we can show only texts ending in ".py" (not done in this commit, need opinions) and if the script has no or another extension, case of many in old and current .blend's, there's still the string box for writing its name.

-- Implemented Ton's space handler script links:

Right now only for the 3d View,  but it's trivial to add for others.  There are two types: EVENT, to receive 3d View events from a chosen window and DRAW, to draw on the window.  Ton's idea was to give scripts a controlled way to integrate better within Blender.

Here's how it works:

- scripts must have a proper header, like:
# SPACEHANDLER.VIEW3D.EVENT

and then they are shown in 3d View's View menu, "Space Handler Scripts" submenu.  Check (mark, click on it) a script to make it active.

EVENT handlers should consult the Blender.event var to get the current event, which can be compared with values from the Draw module:

import Blender
from Blender import Draw

evt = Blender.event
if evt == Draw.AKEY:
  print "a"
elif evt == Draw.LEFTMOUSE:
  print "left mouse button"
else:
  return # ignore, pass event back to Blender

Blender.event = None # tell Blender not to process itself the event

DRAW handlers are free to draw to their owner 3D View. OpenGL attributes and modelview and projection matrices are pushed before running the handler and poped when it finishes.

To communicate between EVENT and DRAW handler scripts we have the Blender.Registry module, as always.

Still need to code some nice example, which should also serve to test properly space handlers.  Simple tests went fine.

- doc updates about the additions.

=======

Note: the UI part of the space handlers and script links is of course open for changes, I just tried to make it understandable.  Probably we won't use the scriptlinks icon for "None Available" (check 3d View -> View -> Space Handler Scripts), though it hints at what space handlers are.  The tooltips may not be accepted either, since other menus don't use them.  Opinions welcomed.
2005-05-08 21:20:34 +00:00
Ton Roosendaal
8077caa96e Bug fix #2528
Transform on "ipo keys" gave crash on ESC, due to non initialized pointer.
(Martin; that idea to not calloc new data... grumble!)
Note; that's another Margarita for Randall, at the Figueroa pool. :)
2005-05-08 20:44:59 +00:00
Ton Roosendaal
ef2855bcab Timline goodies;
- Mkey while ALT+A inserts markers.
  Note for Matt; You forgot to check for 'val'. The delay in tuho I brought
  back to max 1 frame. Delays are common in realtime gfx apps, the picture
  you see is old, and its possible you press a key while next frame is
  already drawing, and then it has to increase the frame value still... :)

- RMB escapes from anim playback

- on activate object, Timeline redraws too

- Added keyline drawing for Material Ipos. The CTRL+Page keys work with it.

Softbody:

- Renamed buttons to call "Spring constant" now "Stiff(ness)" and the
  "Friction" became "Damping".
2005-05-08 20:10:59 +00:00
Ton Roosendaal
eec4e32714 Another Transform todo: correct Undo names for using Transform.
Martin; I've added calls like:
	BIF_TransformSetUndo("Add Duplicate");
In advance of calling transform itself, to indicate that this is the
string name to be used for Undo, and also has to be done on ESC.
To make that possible I had to add a memset() to zero the global struct
TransInfo. Nicely done with if(Trans.mode==TRANS_INIT)

Not sure how this relates to setting constraints in advance... I always
found it tricky to work a non-initalized global struct. :)
2005-05-08 12:00:28 +00:00
Ton Roosendaal
744bb6f19a UI goodies & cleanup
- TimeLine: Marker grabbing works now. Use GKEY or select+drag, as usual
  Holding CTRL will step with 1 second (corrected for ntsc dudes yes!)
  Also added this in header pulldown

- Time values and Time grid draw fixed for Seconds display. It used to
  draw steps of 2/5/10/20/50/100 etc. frames. Now does steps in seconds.
  Again corrected for "Frames/Sec" value.

- "Frames/Sec" button redraws TimeLine, Secquencer, etc

- Bug fixed in editing Theme for TimeLine (was editing Image Select...)

- Added Grid color to Theme choices for Ipo, TimeLine, Sequencer, NLA,
  Action, Sound. Was missing!
2005-05-08 11:24:46 +00:00
Ton Roosendaal
74ec3d4f51 Added: new Pivot option, "Around active object".
Works nice quick to rotate a group of Objects around a defined center,
without hassle with the 3d cursor. Especially for the 3D Manipulator.

In EditMode/PoseMode this option falls back to "Centroid", as does the
"Individual centers" option already.
2005-05-08 08:16:43 +00:00
Ton Roosendaal
d10862a9da Fix for negative scaling & Mirror menu in Object mode (CTRL+M)
Hope Martin likes this simple hack. :)

Also; added flag in constraint to denote whether its local or not. That
way its possible to:

- prevent local scale and rotate on multiple objects to change own position
- draw constraint lines cleaner
2005-05-07 21:04:55 +00:00
Ton Roosendaal
4a123c082f Dang, flipped a zero and one!
Error in commit of 5 hours ago... normal alignment didnt work OK for the
case a face is selected.
2005-05-07 20:15:54 +00:00
Ton Roosendaal
9a41ac4f70 Patch from Tom Musgrove to bypass extrude popup on singular selections...
Implementation had some issues though, since:

a) Blender has no stats available that tells amount of selected edges
b) Bypassing the popup should be 100% accurate
b) Once you do that, the popup should actually only show possible
   choices as well.

So! I've added a G.totedge and G.totedgesel, also being printed in the
info header. Using this variable the extrude popups could be limited too.

Also: made 'normal alignment' for edge-only selections work when the
normal wasn't pointing OK. Now it aligns the Z axis with the edge itself
Exact algorithm for choosing a 'normal' and 'plane' still is weak.
2005-05-07 15:50:09 +00:00
Ton Roosendaal
71c2d1e9d6 Added two UI level warnings on using Softbody;
- On leaving editmode, it deleted the Baked result automatically. Since
  that's an invisible and destructive ction, I've inserted an "OK?" menu
  here for it.
- Particle Deflectors themselves cannot be a Softbody (or viceversa).
  Added a LABEL button to denote this when a user tries to set that.
2005-05-07 12:31:43 +00:00
Ton Roosendaal
54094fed0b Commit of 2 weeks ago to correctly find normals for extrusion had a typo...
started loop with "->last" instead of "->first".
This caused old faces that should be deleted on extrude to remain there.

Thanks Jean-Luc for finding it!
2005-05-07 11:13:37 +00:00
Nathan Letwory
bcd5d1c9ed * integrate bFTGL with Scons
* add some ENV = os.environ's here and there (help those who have msvc toolkit installed)

Note for OSX users: check from your config.opts the correct info for the precompiled ftgl lib is used.
2005-05-06 13:37:18 +00:00
Ton Roosendaal
c68c3c253f Fix for crash in Mesh EditMode "Join triangles" (JKEY). Found & code
provided by Campbell Barton, thanks mate! :)

Note; this tool gives quickly bad results... also errors printed in the
give_quad_verts call. Who likes to attack this!
2005-05-06 12:12:26 +00:00
Ton Roosendaal
799d7e3f98 Bug fix #2512
When joining Meshes, with the active on having TFaces, and other Meshes
not, the new TFaces were created but not initialized.
2005-05-05 20:56:05 +00:00
Ton Roosendaal
2887e68705 Bug fix #2515
Bumped up ipo limit for material "normal" mapping to 25.0 max.
2005-05-05 20:39:50 +00:00
Ton Roosendaal
8717577950 Bug fix #2414
Quat XYZW was mixed up in NKey panel for Armature... now OK.
2005-05-05 20:36:14 +00:00
Ton Roosendaal
ec9ed88d28 Replaced the round() call with floor(0.5 + ).
Apparently MSVC doesnt have it...
2005-05-05 20:07:22 +00:00
Ton Roosendaal
1ef0359bc4 Finetuning Timeline;
- Added Ckey for 'center view around current frame'.
- Completed View pulldown menu with remainder of options.
- prevented negative scaled views when start > end frame
2005-05-05 19:37:22 +00:00
Ton Roosendaal
b33536cdaa Two little issues for Timeline window;
- Using Arrowkeys to change frames didn't give proper redraw
- Option "Record" now tied to the User-preset "Auto key insert". It is
  no user preset anymore even, I thought to leave a button in the User-
  presets for the time being though...
2005-05-05 18:31:39 +00:00
Ton Roosendaal
2b0f00d4bd Button image changed for new space type. Had to move some icons away... 2005-05-05 17:20:13 +00:00
Ton Roosendaal
f0a4ce98f9 Added the new Timeline Window, copied from Tuhopuu, coded by Matt Ebb.
Main change is that it's an own Space type now, not part of the Audio
window... the audio window should restrict to own options. This way
functionality is nicely separated.

Since it's the first time I added a new space (since long!) I've made an
extensive tutorial as well. You can find that here:
http://www.blender3d.org/cms/Adding_new_Space_Window.557.0.html

Notes for using timewindow;

- Add time markers with MKey
- CTRL+M gives option to name Marker
- Markers cannot be moved yet...
- Pageup-Pagedown keys moves current frame to next-prev Marker
- Xkey removes Markers

- If an object has Ipos or an Action, it draws key lines
- CTRL+Pageup-Pagedown moves current frame to next-prev Key

- Press S or E to set start/end frame for playback

Notes about the implementation in Tuhopuu:

- Add new Marker now selects new, deselects others
- Selecting Marker didn't work like elsewhere in Blender, on click it
  should deselect all, except the indicated Marker. Not when holding SHIFT
  of course
- Not exported functions are static now
- Removed unused defines (MARKER_NONE NEXT_AVAIL)
- Drawing order was confusing, doing too many matrix calls
- Removed not needed scrollbar, added new function to draw time values.
  (Has advantage the MMB scroll works not confusing on a scrollbar)
- Added proper support for 'frame mapping'
- The string button (name Marker) had a bug (checked str[64] while str
  was only 64 long)
- String button itself didn't allow "OK on enter"
- Made frame buttons in header larger, the arrows overlapped
- Removed support for negative frame values, that won't work so simple!
2005-05-05 17:19:21 +00:00
Joilnen Leite
22f65bce76 erased headers dirent.h and unistd.h
.
2005-05-05 05:55:29 +00:00
Stephen Swaney
2f0cf8cf73 print a msg about which Python version we are using
before the evil "'import site' failed" msg appears.
2005-05-05 04:46:06 +00:00
Joilnen Leite
3469a99f75 added Font.c
.
2005-05-04 23:18:10 +00:00
Joilnen Leite
fac824df40 export function to Text3d use 2005-05-04 22:52:14 +00:00
Joilnen Leite
273ec4fb26 added load font support to Text3d submodule
.
2005-05-04 21:31:51 +00:00
Joilnen Leite
028aae8417 define BPy_Font
.
2005-05-04 21:28:16 +00:00
Joilnen Leite
cc008dbc30 it wrapping font stuff like font file info
.
2005-05-04 21:26:29 +00:00
Ton Roosendaal
6db7d23b5f On click-release for Manipulator handles, without moving mouse, it will
stick to transform() until another mouse press (or ESC etc)
2005-05-04 15:13:25 +00:00
Ton Roosendaal
3b2c30dae4 Another big cleanup, thanks to transform recode. Could do this stage
because Martin recoded the Mirror().

- removed old globals like 'tottrans' or 'centre' or 'centroid' as used
  by old transform
- removed a lot of code from editobject.c
- moved all transform related code to transform_conversions.c
  (Note for Martin; sorry that's a mess... it now has all the weird
   functions for finding posemode dependencies... thats for the depgraph
   phase to remove)
2005-05-04 12:53:35 +00:00
Ton Roosendaal
4664431d76 Removed redundant ghostwindow->commandqual veriable, which caused to hang
on using Apple command keys. For example; starting a TextEdit from the
Dock, Command+Q, caused Blender to treat all LMB events as a RMB.

The commandqual variable was replaced with normal 'qualifier' key already
long ago, should have been removed back then.
2005-05-04 08:46:14 +00:00
Martin Poirier
e05e85523f Mirror function reuses new Transform (basicly calls the split off ElementResize function on the data).
Updated the menus to work with that too.

Of course, this doesn't work in object mode right now, because resize I haven't fixed negative resize (yet).

Again, this would have easily benefited of a stand alone init and post Transform functions. When I have time... :|
2005-05-04 00:37:11 +00:00
Ton Roosendaal
a1f70b516e Bugfix #2506
Sky type "Paper" didn't give proper dx/dy texture frequencey in OSA render.
Remainder of render recoding of last january.
2005-05-03 11:45:05 +00:00
Ton Roosendaal
f2f45d563d Removed old NO_FROZEN hack 2005-05-03 11:05:00 +00:00
Ton Roosendaal
f51b6996d1 Latest button image. Note: this is a png 24 bits 2005-05-03 10:55:03 +00:00
Ton Roosendaal
422b69fe1e UI cleanup work;
Proportional edit:

- Proportional mode added to header as button/menu. Including new option
  to have only connected geometry influenced.
- Added icons for proportional & proportional modes
- Make proportional edit data part of Scene, so all gets saved.
  The Global flag G_PROPORTIONAL was removed
- Made sure #defines get used properly, also tweaked order for proportional
  so it starts with regular 'smooth' by default.
- Use ALT+O in editmode to switch to new proportional 'connected' mode

Other UI stuff:

- in EditMode, the layer buttons get hidden... the amount of icons in
  3d header grows to fast. :)
- made less ugly icons for the Manipulators. Still can be better.
- Added alpha-filter for pre-processing Icon-image, giving nicer display
  of icon-antialising on dark or bright backdrops
- disabled Manipulators when in editmode, and current layers don't show
  the edited data.
- Added the value used to define Normal size (editmode draw) in Scene too,
  so it gets saved.
2005-05-03 10:54:42 +00:00
Ton Roosendaal
cdca939c2c Removed linewidth 2 from constraintlines 2005-05-02 19:47:50 +00:00
Ton Roosendaal
9eb5eee92e Bug fix #2507
While doing a viewmove/rotate, the queue was not emptied nor read...
so after a while the entire queue gets full, not registering a modifier
key-release anymore. Fixed :)

Reported error confirmed in windows and OSX.
2005-05-02 18:47:00 +00:00
Jens Ole Wund
6d99044373 added DNA_object_force.h to DNA_makesdna project
to make it look nicer in MSVC6
2005-05-02 18:16:19 +00:00
Ton Roosendaal
42126cb5fc Added baking for softbodies.
Works as follows;
- press the 'show bake settings' button (no space left... :)
- define start/end frame for bake, and an interval step.
  The baked result interpolates nicely (Bspline, 4 keys) so in general a
  step size of 2 or 3 still gives OK results.
- Press "BAKE". This will do a full animation + playback. Press ESC if it
  you don't want it.

Once Baked, the BAKE button becomes a FREE BAKE. As reminder the softbody
buttons get blocked with error() menu.

This saves OK in a file. Renders any frame, including fields and moblur.
You can also set a "Timeoffs" for the softbody. And yes, this should be
in the NLA once... :)

NOTE! With this commit, files saved with the old (first commit) version by
Jens Ole won't read the settings back... he stored all sofbody variables in
Object, which was moved to a new struct when I did my first commit on SB
(over a month ago)

Also note that I moved particle deflecting & softbody to a new include.
2005-05-02 13:28:13 +00:00
Ton Roosendaal
2606a5c5d3 Removed DerivedMesh and DispList creation from countall().
Apart from the not very structured way countall() is called, it should not
make displists then, since the order of calculations then get spoiled.
2005-05-02 12:16:18 +00:00
Martin Poirier
61f2736ec3 Local axis constraint external call. Had to do it in a very hackish way which highlight a design problem in the code. To solve it (and would solve other problems too), we'd have to split off the initialisation function. Not terribly hard to do but I'm overwhelmed with work...
Push/Pull had a problem with constraints enabling/disabling. Fixed

Restablished infinite line for constraint draw (when not using manipulator) as discussed in meeting.
2005-05-02 02:18:13 +00:00
Jens Ole Wund
01a053f989 put depsgraph_private.h to BKE_blenkernel.dsp /include files
looks 'claener' to me
2005-05-01 21:40:24 +00:00
Ton Roosendaal
8c1d95abc7 Error in combo of Spothalo + normal halo over sky, with OSA + gammacorrected
adding. :)

Missing gamma correction...
2005-05-01 17:11:48 +00:00