Commit Graph

1913 Commits

Author SHA1 Message Date
Ton Roosendaal
d4755e8c5c Fixed draw error in panels, the header was overdrawn with panel background.
Only visible when panels are not transparent.
2004-06-30 21:59:12 +00:00
Ton Roosendaal
a8ef804146 NEW: Ramp shades for diffuse and specular
http://www.blender3d.org/cms/Ramp_Shaders.348.0.html

Material color and specular now can be defined by a Colorband. The actual
color then is defined during shading based on:
- shade value (like dotproduct)
- energy value (dot product plus light)
- normal
- result of all shading (useful for adding stuff in the end)

Special request from [A]ndy! :)
2004-06-30 18:54:09 +00:00
Kester Maddock
c9b4585618 Switch to using floats instead of shorts for normal data - they're supposed to be faster.
Also use shorts instead of ints for the index data, since index arrays are limited anyhow.
2004-06-30 13:41:19 +00:00
Kent Mein
09d3007b71 Two stupid fixes for warnings:
First one was for drawview.c I gave some types to things that didn't have them
example
-static void view3d_panel_background(cntrl)     // VIEW3D_HANDLER_BACKGROUND
+static void view3d_panel_background(short cntrl)       // VIEW3D_HANDLER_BACKGR

For edit.c I added a newline to the end of the file.

Weee

Kent
2004-06-29 20:34:10 +00:00
Jiri Hnidek
7000bebc4b - added octal tree node optimalization of MetaBall polygonisation
polygonization of 512 MetaBalls:
   - version 2.33a:      76 s
   - current cvs version 8 s

- button "Never" is added in button window: Metaballs are polygonized only during render time (it is useful for particle animation) http://e-learning.vslib.cz/hnidek/misc/bowl_metaballs.blend
2004-06-29 17:10:13 +00:00
Ton Roosendaal
b460748777 Metaball normals were flipped again... thanks jiri for pointing me to it... 2004-06-28 11:14:58 +00:00
Alejandro Conty Estevez
7febd4547d Finally, fixed the evil dll problem. It works now
on my win32 box with my tests without crashing.
But be aware! There may be more of them watching
us, waiting for a moment of distraction, nobody
is safe.
2004-06-27 20:10:20 +00:00
Ton Roosendaal
b8f73db964 added fflush(stdout) for printf updates while calculating particles 2004-06-27 14:05:08 +00:00
Ton Roosendaal
e750478ce3 The revised patch from Leon for new particle effects.
New is that objects can have a force field, and Meshes can even deflect
(collide) particles. This is in a new sub-menu in Object buttons F7

The full instructions where on the web, Leon mailed it me and I will put
it in CMS tomorrow. For those who like to play with it now, here are demo
files:

http://download.blender.org/demo/test/

Quite some changes where in the integration though... so previous created
particle deflectors will not work. Changes to mention now are:
- gravity is renamed to 'force field'
- force field and deflector options are in Object now, not in Mesh
- the options also have its own struct, doesnt add to Object by default
- force fields are possible for all object types, but only work on center.
  So empty objects are typical for it.

Work to do:
- add draw method in 3d win to denote forcefield objects
- check on the UI (panel with different size?)
- add 'recalc' button in deflector panel
2004-06-26 18:18:11 +00:00
Ton Roosendaal
263d0823d3 Changes in code to allow double sided energy, but it's not possible
to activate it. Added comment in code how to enable it for those who
like to play (search for translu)

What doesnt work - according to me not satisfying - is fact that radiosity
hemicubes alias badly on short distances, so interior light doesn't spread
well.
2004-06-26 18:03:57 +00:00
Joseph Gilbert
2a6c8a2797 - added support for getting worlspace and localspace matrices from objects through python. Add cvars matrixWorld/matrixLocal.
- credits to Campbell Barton
2004-06-26 14:38:56 +00:00
Kester Maddock
4c53f38756 Minor Fixes:
Better use of booleans for python
#include fixes for Windows
Python Doc fixes
Use the farthest vertex as the face position when z sorting faces. (Camera is on -z axis!)
2004-06-26 09:15:41 +00:00
Alejandro Conty Estevez
f69cc652e2 minor changes to sync with yafray cvs interface, getting closer
to the clean msvc build.
2004-06-24 21:17:52 +00:00
Ton Roosendaal
855c6861ef The other fix for drawing XOR lines, now for dragging window edges too.
Main 'improvement' is it not using the gl_util function, but drawing it all
itself, and thus minimizing the amount of flush calls (factor 4).
2004-06-24 15:12:45 +00:00
Willian Padovani Germano
d5b4fb5736 Scripts:
- Added KlopUtils by Carlos Lopez and Batch Object Name Edit by Campbell Barton (thanks both!)

BPython:
- Fixed things I recently broke in Blender.sys, added Blender.sys.join(dir, file)
- doc and other minor updates
2004-06-24 15:03:08 +00:00
Ton Roosendaal
e306beec04 Screen edge split routine now uses 4 times less glFlush calls.
Is a testing commit... might be removed or further worked out.
2004-06-24 14:53:00 +00:00
Willian Padovani Germano
61efb63b0c BPython:
- Added function Blender.Save(filename) to save .blend files.
- Added scriptlink-related methods (get, clear, add) to Scene and Materials.  Will still add method remove and add these methods to World, Object, Camera and Lamp.
- Updates and small fixes in docs.
2004-06-24 09:43:13 +00:00
Roel Spruit
8a0cd0bc97 Added another Sequence effect: the wellknown Glow effect. 2004-06-23 22:11:57 +00:00
Ton Roosendaal
eec72e3d4b Feature requests:
- usage of relative paths "//" now can be controlled with a button in the
  fileselect header
- relative path support added for linked Library files

Note: in oops window you can see the library file names, select the last
icon button in header to show the blocks.
2004-06-23 18:48:55 +00:00
Roel Spruit
629e526b25 - Added correct Writing/Reading of the new Sweep sequence effect (Thanks Ton, where would I be without you)
- Sweep effect updates after you change the type of sweep now.
2004-06-23 18:22:51 +00:00
Kester Maddock
9fa857b5c7 Fix a compile error in data conversion: double declaration of some vertex attributes. 2004-06-23 12:13:09 +00:00
Kester Maddock
38de9559bc Fix for reflection mapping unlit faces: normals were not being sent, hence reflection maps weren't being rendered properly (bf-bug #1385)
Set the diffuse material colour - lighting brightness should match blender better. (bf-bug #1385)
2004-06-23 01:12:11 +00:00
Ton Roosendaal
b506d93f0e Report 1387 (todo)
Added consistant zoom in ipo, oops, sound, sequencer, nla, action. This
conforming the new user setting too (cont, dolly, scale).
2004-06-22 14:35:35 +00:00
Ton Roosendaal
01bb620574 Fixed another oldie; when loading file the totals counter (as displayed in
info header) didn't update. Also removed convention it counts from active
window-layer, now it uses scene layer.
2004-06-22 12:59:53 +00:00
Ton Roosendaal
f2be1db99d Little feat request: the rendertime disappeared from header after a
rendering; now it's a permanent part of it.
2004-06-22 12:02:19 +00:00
Jacques Guignot
f89f32d420 added a new function to the World module : GetActive(), which returns the world associated to the scene, or None if no such world exists 2004-06-22 11:38:58 +00:00
Ton Roosendaal
59433aa42e Report #1391
The work i did end of may on render normals (displacemap especially)
caused refraction code to work wrong... took a while to find out, but
just removed a couple of lines too much.
Added clear comment there what it is, and what danger of removing is!
2004-06-21 17:58:53 +00:00
Ton Roosendaal
e26c5a7676 Report #1376
Rayshadow didn't use lamp option 'layer' correctly. Objects not in
lamp-layer now also don't get shadows (nor light).
2004-06-21 16:07:50 +00:00
Ton Roosendaal
52bf2db342 Fix: creating a Mesh primitive UV Sphere, used a remove doubles to get
rid of the seam (it's a Spin command!). The threshold value for remove
was set on 0.01, giving too easy errors. Now its 0.0001
2004-06-21 14:40:31 +00:00
Willian Padovani Germano
a41759cb8b - Scripts:
Campbell Barton updated his Wavefront OBJ scripts and Ben Omari updated his DirectX 7 and 8 ones (thanks both).  The other listed scripts had minor updates to accomodate the menu changes.
- Scripts in menus:
  renamed Tools to Object, Generators to Add, and Modifiers to Mesh (Metaball, Curve, Surface can be added later), to integrate better in the interface.
- Fixed a bug in Blender.sys.makename: last letter of file extension was being cut out.
2004-06-21 12:01:23 +00:00
Alejandro Conty Estevez
625e7fb12c These are changes sent by Luis_F who got this working on win32. Only applies
to that platform and fixes a problem findind yafray dll's
2004-06-21 08:17:05 +00:00
Ton Roosendaal
f778d83155 Bug fix 1326
When changing subsurf level, in shaded mode, and with Mesh that has more
users... the shaded displist of the other meshes are corrupt, potentially
causing crash.

And: small improvement in select-outline: when drawtype-extra Wire is set,
it skips it. Not needed, looked a bit ugly.
2004-06-19 18:23:22 +00:00
Ton Roosendaal
84caaf5aca Fixed error in previous commit, that skipped drawing non-basis Mballs.
Thanks Jiri for pointing me to it!

New: removed frontbuffer draw of selected object for solid/shaded mode.
It serves no purpose anymore.
2004-06-19 17:35:37 +00:00
Ton Roosendaal
830028560e Tooltips:
- lowered tooltip-update delay loop to 0.02 sec (was 0.05), which showed
  up 'trails' while going over pulldowns with tooltips
- changed tooltip calculation for size, it was drawing the labels far too
  large (height). Made sure text prints in middle too.
- by default tooltips print 12 pixels below button now
2004-06-19 14:37:25 +00:00
Ton Roosendaal
6fdea0ffe7 Popular request: the floating panels (NKEY) now close on a 2nd NKEY command.
This for all current NKEY menus by default. Can be standard for each hotkey
controlled Panel from now on; use toggle_blockhandler() for it.

Another popular request: hotkey enabled Panels now optionally reopen on
the previous location, instead of under mouse. This option "Pinned" is a
user option now. Optional for later; have it as per-panel option... dunno!

The last request, close on mouse-exit, won't be implemented, this intrudes
with Panel consistancy, and is pretty OK solved with NKEY-NKEY now.
2004-06-19 12:25:28 +00:00
Ton Roosendaal
8617ce5141 - added Font object to have outlines on Solid draw + selection
- Font object didn't support draw xtra wire yet
- removed drawing the circles from MBall object, except in editmode
- little cleanup in draw_object() call, it had a weird exception for
  mball drawing
2004-06-19 09:35:23 +00:00
Roel Spruit
a31dec3712 added a new Sequence Effect: Sweep.
this consists of 22 different ways to sweep from 1 strip to another. For you windows lovers: it's like "Blinds" in Powerpoint :)
- in the NKEY menu you can choose which type you want perform, vertical, horizontal, in/out etc. it's too much to decribe.

Credits for this go to Kent 'Sirdude" Mein who coded the sequence plugin I stole the code from.

To allow certain sequence effects to have settings, I also added a "varstr" void pointer to the Sequence DNA, that can point to a special struct for each effect. This is similar to how plugins are handles.

more neat effects to come....
2004-06-18 22:53:06 +00:00
Johnny Matthews
d222422c7f This patch makes the vertex loop select tool only select edges which are part of 2 faces, this cleans up some incorrect selections the tool was making around areas in the mesh where faces had been deleted.
closes bug 1343

guitarGeek
2004-06-18 20:04:39 +00:00
Johnny Matthews
ace24ac5b4 This is a bandaid for a logic error in select_vertex_loop() that prevents an infinite loop in some cases. A fix for the logic error will come when I find the error :)
guitarGeek
2004-06-18 17:50:49 +00:00
Roel Spruit
401d9ef738 Added the possibillity of naming sequence strips in the sequence editor. previously this was not possible for all types.
- Change the name of a strip in the NKEY menu of the strip.
- If a strip HAS a name, it will be displayed in the strip, instead of all that garbage that was previously there (image locations, lengths, whatever)

Still TODO: while adding new effects to the sequencer I will also add this for effect strips. at the moment it's not clear yet what should go in the NKEY menu.
2004-06-18 15:04:27 +00:00
Ton Roosendaal
4861dbbe50 Scene.c: added missing code to copy base to object flag
Drawobject.c: added wireframe outline for selected solid objects. needs
some feedback though, at my system it is quite slow.
2004-06-17 18:31:42 +00:00
Alejandro Conty Estevez
5fb7fbe391 NaN makefile fix for yafray dir and typo corrected on "xml" button tooltip 2004-06-17 16:34:27 +00:00
Alejandro Conty Estevez
cfbce399aa These are changes necessary for building with msvc in a near future.
Just making sure memory is always allocated and freed in the same
binary  object, which seems to be mandatory on msvc if you don't have
the comercial version. If you are using this code you need to
syncronize with yafray cvs also, or it won't work. Binaries for os x
are updated in the link I gave in my last commit.
2004-06-17 11:24:30 +00:00
Ton Roosendaal
b106d1b8b6 Added Panel support in Sequence window, and converted old Nkey menu for it. 2004-06-16 20:25:56 +00:00
Alejandro Conty Estevez
ed86852f7e New export through plugin scheme for yafray. It is working on linux and mac os x
Needs latest yafray, you can get it from cvs, but I have also binaries
for os x here:

http://www.coala.uniovi.es/~jandro/noname/downloads/yafray-0.0.6-3.pkg.zip

To use it, go to yafray panels (global settings) and uncheck the "xml" button.
That would tell the export code to avoid xml export and use the yafray plugin
instead. You'll see the render being draw while running and you can even stop it
with ESC key.

Since I'm sure problems will appear, expect updates soon.
Remember: does not work on win32
2004-06-16 18:44:12 +00:00
Ton Roosendaal
54f9086d3c Restored oldstyle zoom in/out, and added a new userpref for denoting zoom
types:

- Continue: is default, old style
- Dolly: is like previous, but not continuous
- Scale: is the new method. Name is based on fact it scales view
2004-06-16 13:31:32 +00:00
Kester Maddock
4091851043 Replace all glFinish() with glFlush().
This is supposed to fix gradual slowdown of Blender interface on ATI cards.
2004-06-16 11:34:45 +00:00
Willian Padovani Germano
ddec3db89d - New Blender.Draw method by Campbell Barton (Cam / ideasman):
PupStrInput, a wrapper for the Blender String popup (thanks!)
- Fixed bug #1374 reported by Gabriel Beloin (gabio, thanks too):
    http://projects.blender.org/tracker/?func=detail&atid=125&aid=1374&group_id=9
    There was a minor mistake in the import menu: vrml called dxf and vice-versa and shortcuts were wrong (removed them).
- Doc updates, minor updates elsewhere.
2004-06-16 01:18:57 +00:00
Jacques Guignot
23165676b7 updated documentation 2004-06-15 16:17:25 +00:00
Willian Padovani Germano
467311ad34 - New script:
Wim Van Hoydonck contributed the famous Knife script (put under Modifiers group) developed by Stefano Selleri and himself (thank to both!)
- Added helper function Blender.sys.makename, updated docs and script ac3d_export to use it (shall update other exporters too):
  this function is just a simple helper to format a filename as needed (change extension, strip dirname, it defaults to use G.sce as path).
- Added a test method: Blender.Scene.getScriptlinks(eventName):
  just testing, if this path proves useful other functions will be added and made general, for objects, etc.
2004-06-15 04:16:30 +00:00