Commit Graph

13276 Commits

Author SHA1 Message Date
4930270ea7 Fixed FollowPath flag annoyance 2003-12-02 00:04:38 +00:00
efa0a97dfb - removed an old optimization line from code, which caused stenciling
with multiple bump-mapping channels not to work
2003-11-25 18:45:05 +00:00
8307f2f5fe - bug fix: in background render, the default builtin font was not
activated for rendering when other fonts were packed too.
2003-11-23 23:51:18 +00:00
d3563d23b7 No line for constraint without target
Code notes:

The constraint_has_target can be used to test if a constraint has a target at all.
2003-11-23 20:28:35 +00:00
90541541c3 Added all necessary BPY_extern.h include files to the .c files.
Updated the Make environment to point to the correct location. The include
paths were still pointing to source/blender/bpython/include while it should be
source/blender/python.
I did not encounter the build problems because I'm always working with the
autoconf build environment.
2003-11-23 14:28:46 +00:00
Chris Want
e7d3e24a0e Got rid of many #include "BPY_extern.h"
Homework from Michel: do grep BPY source/blender/src/*
and see if there is anything that needs fixing.
2003-11-22 20:21:59 +00:00
3c60f8778a - made calloc for clear mverts in subsurf-mesh conversion 2003-11-21 20:52:27 +00:00
71500a2df1 - fixed another oldie... displaylists for MBall was generated FAR too often.
even for each redraw! Now its all smooth & fast again.

  introduced new kernel API call: int is_basis_mball(ob), this provides a
  quick check of the object is the actual basis for the displaylist and
  polygonization.
2003-11-21 12:30:15 +00:00
4a5ae4a55f Fix for undo... it didn't do the UV coords (tface) nor the vertexpaint
colors. This because of the pretty weird (ab)use of load & make editmesh...

For each added undo step, the load_editmesh was fed with an empty mesh
to assign data to, without knowledge of what was in the original mesh.
That way UV and color data got lost.

Solved it in 2 steps:

1. removing the ->tface pointer from EditVlak, and make TFace a builtin
  struct inside EditVlak. This didnt cost much extra mem, since it already
  stored UV and color. This enabled some pretty cleanup in editmesh.c as
  well, storing tface pointers was cumbersome.
2. for each undo step, it then generates always a tface and mcol block to
  link to the undo Mesh.
  Even when it wasn't in the actual Mesh, at exit editmode the original
  Mesh is used as reference anyway, and undo-meshes are freed correctly.

The enormous commit is because I had to change the BLI_editVert.h file, and
found it was included in about every file unnecessary. I removed it there.
ALso found out that subsurf has code ready (unfinished) to make UV coords for
the displaylist in EditMode as well, nice to know for later...
2003-11-19 22:00:14 +00:00
baf23c7648 Fixed the lag with Follow Path and optimized constraint loops with Track To and Lock Track. I was plainly disabling the refresh of the target, but that caused a lag (3D window, not Render). Now, it raises a flag when it find a loop, so it only disables the refreshing when it needs to.
This is a temporary fix, but a complete fix will require a rewrite of of some part of the where_is_object function, and that would take too much time before 2.31.
2003-11-13 23:04:46 +00:00
Stephen Swaney
e00aa5375c fix for bug #285
text buffer not marked as modified after delete operation
2003-11-10 05:51:55 +00:00
75997db19f - fixed bug #253
from NaN period, someone just commented out a piece of code... this to
  prevent the curve itself being converted (as edges) next to the 3d filled
  faces. but for 3D curves there are no filled faces.
2003-11-08 13:36:16 +00:00
b7debeb792 Updated so that Default Vars button will reset envmap data, if it exists.
doesn't do object its tied to but does everything else for envmaps
now. (clipsta, depth, etc...)

Kent
2003-11-07 21:03:58 +00:00
cf18d4431a Fixed my blunder with Default Vars button.
It was causing plugins not to accept changes to buttons.
Now it works correctly, defaults are set only when you press the button.

Kent
2003-11-06 22:07:41 +00:00
b9cdf97e19 - little new feature; 'hide' vertices/edges/faces works in editmode
for subsurf
2003-11-06 17:22:39 +00:00
13c95a6e85 bug fix: audio hangs on OSX when playback with ALT+A
reason: mixbuffer size was not correctly initialized in .blend. Doing this
for struct UserData has some extra quirks, so better not do it with
checking for version (if version<2.27 etc) but always (if U.mix==0 etc).

I mail this to committers list as well.
2003-11-06 14:13:49 +00:00
f3a809b09f - made option for auto open toolbox on left/mouse hold.
standard starts with 0.5 sec. Turn the threshold value up to effectively
  disable it when you dislike it. But give it a try!
- added 'Home' after splitting window for buttonswindow
2003-10-29 01:10:10 +00:00
29f532588a fixed the last bug with FollowPath (it didn't work with path without a speed IPO). 2003-10-29 00:06:59 +00:00
7326fa933b - fixed crash with ALT+C conversion of subsurf to mesh with subdiv level 0
- also changed the limits in the subdiv levels buttons; ranging now 1-6
  (note: '6' gives 16k new faces per old face... and max was 12!)
2003-10-25 19:17:24 +00:00
ce60c3edc1 - fixed smooth drawing of subsurf & mesh in 'shaded' draw mode.
looks indeed a lot better!
2003-10-25 17:33:47 +00:00
3545113051 fixed three bugs:
- subsurf also smoothed loose vertices, in a strange way that never showed
  up until 'draw subsurf handles' was implemented.
  fixed subsurf code not to include loose vertices anymore
- saving a file in editmode caused a new displaylist to made... fixed an
  old bad hack from NaN period.
  (displists are still lousy code...)
- fixed drawing vertices in frontbuffer on select.
  the delay you see is because blender waits for 'rightmouse transform'.
2003-10-25 11:38:04 +00:00
513ae61f2b First commit of a new toolbox system.
Aim was to find a simple & easy system, script alike, to add and configure
a toolbox system, so that others can experiment, but also of course Python.

Summary:
- spacebar calls it up. SHIFT+A still does old toolbox
- hold left or rightmouse for 0.4 second, and it pops up as well
  this is experimental! Can be tweaked with Userdef var "ThresA"
- it is a little bit complete for Object mode only. Needs still work
  at information desing/structure level
- the code works like an engine, interpreting structs like this:

static TBitem addmenu_curve[]= {
{	0, "Bezier Curve", 	0, NULL},
{	0, "Bezier Circle", 1, NULL},
{	0, "NURBS Curve", 	2, NULL},
{	0, "NURBS Circle", 	3, NULL},
{	0, "Path", 			4, NULL},
{  -1, "", 			0, do_info_add_curvemenu}};

- first value is ICON code,
- then name
- return value
- pointer to optional child

last row has -1 to indicate its the last...
plus a callback to event function.

I also built an old toolbox style callback for this:

static TBitem tb_object_select[]= {
{	0, "Border Select|B", 	'b', NULL},
{	0, "(De)select All|A", 	'a', NULL},
{	0, "Linked...|Shift L", 	'L', NULL},
{	0, "Grouped...|Shift G", 	'G', NULL},
{  -1, "", 			0, tb_do_hotkey}};

here the return values are put back as hotkeys in mainqueue.

A mainloop can do all context switching, and build menus on the fly.
Meaning, it also allows other designs such as radials...
2003-10-25 00:08:12 +00:00
063205cc51 - <blush> forgot to delete an old line:
if(R.mat->septex) break;
  this caused the new per-channel switching only to work with 2 textures!
2003-10-23 09:38:10 +00:00
d213b7d0db Small constraint loop detection and calculation fix that now allows two objects to track each other (normal track or LockTrack).
This is done by disabling the object position refresh call when calculating these constraints. From the tests I did, this doesn't cause any problem at all.

The main point of this is to create pistons and the like.

For coders:

the detect_constraint_loop function now takes an additional parameter that determines the constraint type of the object it's looping from.
2003-10-22 23:17:48 +00:00
6963bd3947 - material editor: each texture channel can be individually switched,
instead of the old 'septex' which only showed the active one

- rendering: the 'stencil' option now works to stencil out normals as well

(special requests from our manual master, s68)
2003-10-22 18:58:46 +00:00
389b06c91e More fixes in object drawing:
- transparent faces in editmode don't write in zbuffer anymore (prevents
  drawing errors) but still read (so behind the subsurf faces for example)
- improved drawing 'handles' for subsurf editing
- going in editmode to Solid view, will draw extra wire always, including
  transparent faces when set
- works in all combos... http://www.blender.org/docs/ton/subsurf.html

- fixed error; padplus/padminus didnt work in buttonswindow anymore
- improved buttonswin: when dragging window edge, the buttons dont
  rescale, but stay same size
2003-10-22 09:06:30 +00:00
a0824f8fb9 Mesh drawing stuff!
- in zbuffer mode, vertices will be blended 50% in... and when you increase
  vertex size larger than 2 pixels, it will draw them smaller
- removed all 'wire extra' calls (there were dozens!) and replaced it with
  simple call where it belongs.
  This drawing mode is becoming nice & stable... maybe something to make
  default on for new objects? Makes selecting quite easier...

- Subsurf: in editmode, with new 'Optimal' option set, the mesh itself
  will not draw, but instead it draws 'handles' to the vertices. Looks
  extremely clean!

- matched drawing of default grid-floor (persp) to ortho grid

- killed drawing vertices outside of main drawing loop, apart from the
  routine that uses mouse-selecting. (tekenvertices_ext()). It was an old
  optimize routine which became quite useless.
2003-10-21 16:41:28 +00:00
4efdabfbbc Constraint stuff from tuhopuu including (but probably not limited too):
Axis options for TrackTo
LockTrack
FollowPath

Auto creation of TrackTo constraint from Ctrl-T (old track still an option)

Auto creation of FollowPath when parenting to path (Normal parent still an option)

Backward compatibility stuff to convert the per object axis settings to per constraint when a Track constraint is present.

Function to convert old track to constraint (commented out)

Revamped the constraints interface with Matt's work from tuhopuu and the stuff we were discussing earlier.

--------------------
For coders:

unique_constraint_name and *new_constraint_data  moved to the kernel (constraint.c)

new Projf function in arithb gives the projection of a vector on another vector

add_new_constraint now takes a constraint type (int) parameter

add_constraint_to_object(bConstraint *con, Object *ob) to link a constraint to an object

add_constraint_to_client(bConstraint *con) to link constraint to current client (object or bone)

add_influence_key_to_constraint (bConstraint *con) to (eventually) add a keyframe to the influence IPO of a constraint
2003-10-21 13:22:07 +00:00
7893cc25d1 - added new drawing type for subsurf editing. Is called 'Optimal' and
can be found under the 'SubSurf' button.
  Optimal drawing only shows the subdivided original edges. Quite nice!
  And; it's a load faster!

- to evaluate: do we want this in editmode too?
2003-10-20 21:58:15 +00:00
d26e8b1a04 - Lattice as parent of Metaball affect deforming of polygonized implicit surface
- fixed compile problem at IRIX with buttons_editing.c (look at JWalton's message in mailing list) ... sorry for mixed commit :-(
2003-10-14 12:09:57 +00:00
5f6d8e59c4 - Converted lamp buttons and world buttons, they're pretty!
- menu auto open now is user preset, including 2 thresholds you can set
- hilites of pulldown menus were not cleared, fixed
- changed F4 key to logic. F5 will show lamp buttons, when lamp active
- in 'shader context' buttons, clicking camera will show world
- Converted lamp buttons and world buttons, they're pretty!
- menu auto open now is user preset, including 2 thresholds you can set
- hilites of pulldown menus were not cleared, fixed
- changed F4 key to logic. F5 will show lamp buttons, when lamp active
- in 'shader context' buttons, clicking camera will show world
2003-10-12 13:58:56 +00:00
0ce9abf41d - converted full materialbuttons...
EEEK! It doesn't look well yet! Hopefully it inspires others to come
  with great solutions.
- the material buttons have 6 panels, three of them merged
- some drawing errors in preview render
- made settings for new Material that makes sense for Flares
2003-10-11 22:00:30 +00:00
0d03929b9b Another huge commit!!!
First, check on the new files, which are listed below.
The new butspace.h is a local include, only to be used for the buttons
drawn in the buttonswindow.

- editbuts, animbuts, gamebuts, displaybuts, paintbuts,  work now
- i quite completely reorganized it, it's now nicely telling you what
  context it is in
- sorting error in panel align fixed (tabs were flipping)
- align works correctly automatic when you click around in Blender
- editsca.c renamed to buttons_logic.h
- button names are truncated from the right for allmost all buttons
  (except text buttons and number buttons)
- while dragging panels, you cannot move them outside window anymore

And of course fixed loads of little bugs I encountered while testing
it all. This is a version I really need good test & feedback for.

Next step: restoring material/lamp/texture/world
2003-10-10 17:29:01 +00:00
d8955d1b33 - Recursive environment map render
Multiple environments now can be rendered in one pass. Previously the other objects with environment maps didn't show up in a reflection. Like this:
http://www.blender.org/bf/dep.jpg

By default, Blender renders now this result:
http://www.blender.org/bf/dep0.jpg

For a further 'recursive ray-tracing effect' you can give each EnvMap texture a higher "Depth" value. Here is a result with depth set at '2':
http://www.blender.org/bf/dep2.jpg

Related new options:
- in (F10) DisplayButtons, environment map rendering can be turned on and off.
- in EnvMap texture buttons you can free all environment maps
- Environment map sizes are also reduced with the (F10) 'percentage' option.

Tech note: with this commit the VlakRen struct has on *ob pointer!
2003-09-23 21:05:51 +00:00
5d2f98f440 - improved polygonization (linear interpolation) of Implicit Surfaces (Meta)
- added new MetaElem types (plane, elipsoid and cube) old TubeX, TubeY and TubeZ will not be supported
- new buttons in Edit button window (dx, dy, dz)
- added new items into the headers menu and toolbox menu

more details at: http://blender.webpark.cz
2003-09-05 13:54:22 +00:00
470b5c0366 So, for the platform managers to check:
- the link order for Blender has changed, the libradiosity.a has to be moved after the librender.a (obviously for a new dependency!). Check blender/source/Makefile
- there's a new file: blender/source/radiosity/intern/source/radrender.c

Here's what the new code does:

Using the core routines of the Radiosity tool, each renderface with 'emit material' and each renderface with 'radio material flag' set will be used to itterate to a global illumination solution. Per face with high energy (emit) little images are rendered (hemicubes) which makes up lookup tables to 'shoot' its energy to other faces.
In the end this energy - color - then is directly added to the pixel colors while rendering, Gouraud shaded.
Since it's done with renderfaces, it works for all primitives in Blender.

What is doesn't do yet:
- take into account textured color of faces. Currently it uses the material RGB color for filtering distributed energy.
- do some smart pre-subdividing. I don't know yet if this is useful... Right now it means that you'll have to balance the models yourself, to deliver small faces where you want a high accuracy for shadowing.
- unified render (is at my todo list)

User notes:
- per Material you want to have included in radiosity render: set the 'radio' flag. For newly added Materials it is ON by default now.
- the Ambient slider in Material controls the amount of radiosity color.
- for enabling radiosity rendering, set the F10 "Radio" button.
- the Radiosity buttons now only show the relevant radiosity rendering options. Pressing "collect meshes" will show all buttons again.
- for meshes, the faces who use Radio material always call the 'autosmooth' routine, this to make sure sharp angles (like corners in a room) do not have shared vertices. For some smooth models (like the raptor example) you might increase the standard smoothing angle from 30 to 45 degree.

Technical notes:
- I had to expand the renderface and rendervertices for it... shame on me! Faces have one pointer extra, render vertices four floats...
- The size of the hemicubes is now based at the boundbox of the entire scene (0.002 of it). This should be more reliable... to be done
- I fixed a bug in radiosity render, where sometimes backfaces where lit

In general:
I'd like everyone to play a bit with this system. It's not easy to get good results with it. A simple "hit and go" isn't there... maybe some good suggestions?
2003-08-31 20:33:46 +00:00
abede3ca04 A little more cleanup, removed a bunch of unused vars in the code.
Trying to get rid of some of the extra warnings we can ignore ;)

Kent
2003-08-14 15:18:45 +00:00
84f2b08461 - patch provided by Jiri, to prevent polygonizer not to do metaballs
outside of the old boundbox of the Object.

  it's a small fix, the code is still commented in... need further
  work to find out why sometimes balls disappear
2003-08-09 17:09:11 +00:00
Alexander Ewering
d3e2e5e660 Fix volume envelopes for audio strips, they now work in all spaces. 2003-08-05 13:39:27 +00:00
9aef0bab5c Modified Text alignment, it now aligns from the origin (centre) of the Text object. 2003-07-29 13:36:18 +00:00
46cbeb28a0 bugreport from intrr:
- spec was at wrong location in shaded view
- shaded view didnt do 'nospec' and 'nodiffuse' options

Both fixed!
2003-07-22 21:50:21 +00:00
932e9e8316 - new standard .b.blend file which has changes:
- the plane has a material
  - material has texture
  - scene has a world
  - default set 'draw faces' and 'draw edges'

that last one for the noobies, to prevent them complaining!

- added a note in interface.c about the new api doc

- forgot to commit blender.c, for setting the G.f from the file
  (this will save faceselect and vertexpaint mode too)
2003-07-22 19:49:47 +00:00
9bf630a1f3 WARNING: with makefiles I could not get a stable blender compiled.
do a make clean in source/blender/ to be sure!

- Included the new shaders from Cessen... well, only the shader calls
  themselves. To make sure the shaders work I nicely integrated it

- MaterialButtons: layout changed a bit, but still resembles the old
  layout. The 'shader' options now are located together.

- Shaders are separated in 'diffuse' and 'specular'. You can combine them
  freely.

- diffuse Lambert: old shader
  diffuse Oren Nayar: new shader, gives sandy/silky/skinny material well
  diffuse Toon: for cartoon render

- specular Phong: new spec, traditional 70ies spec
  specular CookTorr: a reduced version of cook torrance shading, does
                     off specular peak well
  specular Blinn: new spec, same features as CookTorr, but with extra
                  'refraction' setting
  specular Toon: new spec for cartoon render

- default blender starts with settings that render compatible!

- works in shaded view and preview-render

- works in unified render

Further little changes:

- removed paranoia compile warnings from render/loader/blenlib

- and the warnings at files I worked at were removed.
2003-07-19 20:31:29 +00:00
Alexander Ewering
c2f92ace79 Added a MEM_freeN call to sound_free_sound() to release bSound->stream
created by audio_makestream(). Fixes "Err Totblck stream len..." messages
and memory leak.
2003-07-18 15:30:12 +00:00
Florian Eggenberger
66e2bf39d9 When cutting out a part of a python script the old textbuffer was still used when executing the script. Adding a txt_make_dirty() to txt_cut_sel() helped. 2003-07-10 18:32:42 +00:00
a41069b954 - second change in vrml file writing. Thanks to testing of a user (don't have good
vrml viewer here) I could make the UV coords in the right order.

  seems to look good now, but will keep in touch with the tester for verification
2003-07-03 12:31:19 +00:00
b4bb377ae5 - this probably fixes export to vrml 1.0 output for textures (UV coords)
it needs tests... just a simple cube with sides texmapped. and then
  import to whatever vrml viewer or importer you have around.

  the trick lies in adding textureCoordIndex nodes to file.
2003-06-30 18:09:08 +00:00
Alexander Ewering
271dc5aaf1 Fixes a memory leak which caused Blender to hog up more and more memory
when rendering long animations.
2003-05-31 15:44:58 +00:00
9662763ee0 Updated Quicktime code so settings can be stored in the blendfile.
This enables Blender to;
- have scenes with different codec settings. (same as avicodec)
- render directly without dialog.
- batch/background render to Quicktime movies.

Only tested on windows. ;)
2003-05-21 01:21:07 +00:00
fe05ca64f2 fixed a (wn32 avi) codec issue when adding an Empty scene.
added ttc and otc to the list of font extensions.
2003-05-11 15:44:23 +00:00