Commit Graph

47594 Commits

Author SHA1 Message Date
Ton Roosendaal
436c76006a Bugfix for #2036
Backbuffer selection codes issue on OSX.
On some h/w configs, with "1000s of colors set", the drivers seem to round
colors up or down... whilst until now rounding always was just truncating
bits. This gives errors in writing color codes and reading it back.
The c code only changed for OSX. For other OS's and HW this test could be
done as well.
2004-12-20 18:11:20 +00:00
Ton Roosendaal
c8e4dd0e3a Fix in hook menu; "select" option only worked in vertex selectmode. 2004-12-19 18:38:17 +00:00
Ton Roosendaal
302dc94b7a Fix for #2034
It appeared that the method as used in unified render for "render all sub-
pixels" isn't very well resistant to having large amounts of faces in a
single pixel. The bug file had about 16x70x2 faces per pixel... causing
tremendous slowdown and even wrong render.

I've disabled the option (was coded by Nzc in NaN days) and made it
sampling in the main render loop. Goes much faster, error free. Only loss
is in that it doesnt use superiour subsamples for gauss anymore. Here the
normal render performs slightly better. Not a real issue though. Hard to
notice.
2004-12-19 18:18:54 +00:00
Rob Haarsma
add84ea301 Fixed adding a filename extension for bmp images. 2004-12-19 18:06:28 +00:00
Ton Roosendaal
21e524fa8f Bugfix, reported by Basse: static particles didnt render correct with
"Layer" Lamp. Was just missing a value being written in halo struct.
2004-12-19 18:04:48 +00:00
Ton Roosendaal
b0162a19fd Bug fix #2026
Slightly altered rules for calculating vertexnormals. By only averaging
face normals from faces actually set 'smooth', the result looks much more
nice (for example on a cylinder with caps solid). Vertex normals not being
used by smooth faces are set to the face normal direction.

Shows both in editor as rendering.
2004-12-19 14:19:20 +00:00
Rob Haarsma
ca5784a7ce A one-line commit; Quicktime movies used as texture are now loaded at the highest quality.
I noticed Quicktime did not display interlaced fields for DV movies, it works OK now !
2004-12-19 13:45:03 +00:00
Stephen Swaney
36abceed6b bugfix: #2025 getCurveBP (and others) segfault
This method is now unsupported.  The original intent appears to
return the first BPoint of an Ipo curve.  However, BPoint Ipo curves
are not implemented and the first point therefore never existed.

The segfault was from an unchecked input parameter.

Calling this method now always throws a NotImplemented exception.
2004-12-17 17:34:51 +00:00
Ton Roosendaal
ee810028b7 Increased builtin limit for selection buffer (border select in Object mode)
to allow up to 2500 objects (was 500).
Still an arbitrary limit, could use better code. For now its less
frustrating :)
2004-12-16 14:42:10 +00:00
Ton Roosendaal
1b4667b33f Errors in saving runtime, and fileops in file window; files were copied
or deleted without keeping track of spaces in names, causing in potential
loss of data.

Needs review!
2004-12-16 14:40:25 +00:00
Ton Roosendaal
6719d88aab Bug #2019
Separate in Mesh editmode, selectmode 'face', and with a selection that
used to be in vertex mode a full select (like selecting the 2 opposing
faces in a cube) caused crash. There was still no good face-select
awareness there... tsk! :)
2004-12-15 11:36:46 +00:00
Ton Roosendaal
82421a2d70 Fix for #2017
Actually a 1 liner fix, added displist re-make event for wave objects
being used to vertexparent objects to. Will of course be much better
solved with the dep graph!
2004-12-14 22:01:52 +00:00
Ton Roosendaal
b5d9b1e72d Small fixes for UI;
- Add UV Sphere now aligns with view, as do all primitives
- Small drawing error in edges between blender areas (black lines were 2
  pixels too short)
- Replaced the heuristics in opening sublevel menus, to be less frustrating.
  It now keeps sublevel open while mouse moves within the triangle defined
  by original mouse location (before moving) and the closest vertical edge
  of the new sub menu. Works nice for toolbox and pulldowns.
2004-12-14 18:18:31 +00:00
Ton Roosendaal
f3106212e8 Bug fix #2016
Particles added to mesh being deformed with Armature crashes.
Bug introduced with 2.33, particle collisions... leon added some fancy
updates for actions and armature displists there, which are highly
disputable. I left it in, because I didn't see it was actually new.

Note: particles added while updating mesh with armatures is not supported,
it will shoot particles from original location.
What does work, is static particles.
2004-12-14 18:12:30 +00:00
Ton Roosendaal
5981b77838 While giving snapto a good test (thanks all_select.blend!) I found it was
not implemented on MetaBall editmode, causing an old global var to wreak
havoc.
2004-12-13 17:11:33 +00:00
Ton Roosendaal
900b952137 Bug fix #2013
Face dots didn't recalculate after a 'snap to grid' or 'snap to cursor'.
2004-12-13 16:46:40 +00:00
Kent Mein
021087de45 STEP macro was a typo waiting to happen.
Fix done by LetterRip.

Kent
2004-12-13 13:51:35 +00:00
Kester Maddock
551806bce8 Set the physics scale on added objects. (Fix bug #1837) 2004-12-13 09:53:30 +00:00
Kester Maddock
5dc6d22e46 Reset backface culling. (Fix bug #1960) 2004-12-13 09:10:58 +00:00
Ton Roosendaal
a9128a5109 Bug fix, after irc report sk1p:
frame-sliding (LMB) in action, nla, sound and ipo window went into very
tight while loop, causing cpu to choke. Added nice idle.

Bug fix, found self while testing:
- relative.blend, editmode
- delete part, exit editmode
- enter editmode, undo twice, exit editmode -> crash

The trick to copy 'old' locations of vertices to keys isnt undo-resistant
yet. This fix at least doesnt crash, but copying doesnt work when undo-ing
back to previous editmode session (indices just differ from current mesh...)
2004-12-12 21:13:07 +00:00
Ton Roosendaal
d422cbb544 Bug, reported by Bassam;
When editing Meshes with vertex keys (RVKs), the undo stack isn't
updated correctly, causing a loss of the situation when entering
editmode after changing active key, and doing undo immediate after.

This due to an 'optimizer' in the undo code that tried to prevent undos
pushed on identical situations (e.g. pressing TAB multiple times).
Decided to remove that convention, the annoyance of having possible
multiple undos in a row isn't worth solving it by potential losses.
2004-12-12 19:06:04 +00:00
Ton Roosendaal
f48b4f5b4a Bugfix #2008
Combination of:
- render movie
- with border set
- and "crop" set
Crashed.

Was due to feeding movie initialize code wrong frame sizes. Another oldie!

Also found that crop+border+parts doesnt work. This now is prevented with
warning and return.
2004-12-12 18:16:35 +00:00
Simon Clitherow
c021f10783 Added missing include path for BIF_toolbox.h. 2004-12-12 16:24:08 +00:00
Jean-Luc Peurière
d12960dd2d fix for potential crasher. we were returning pointer to a local var 2004-12-12 13:29:54 +00:00
Ton Roosendaal
91c3cffbcc Bug fix #2005
Simple case; make MAXSTACK define for vrml import to allow import up to
750k faces or 1M vertices (was 125k faces, 160k vertices).
2004-12-12 11:19:27 +00:00
Ton Roosendaal
201c742394 Ctrl+C and CTRL+V copy/paste didn't work for COL buttons ("swatches").
Thanks Chris B for a useful fix!
2004-12-11 16:33:55 +00:00
Rob Haarsma
7434e91f7d Bugfix #1589
When the render output directory doesn't exist (on windows) the BLI_recurdir_fileops() function
tries to create a directory with no name. Added check if a name is specified..
2004-12-11 15:56:01 +00:00
Ton Roosendaal
10d2330343 The ugly global R.flag was reset to zero, before it was calling functions
that could popup error() boxes. These dont work then, and need to be
disabled by keeping R.flag on R_RENDERING

This is a half fix for a report Rob H works on. Will wait for his test.
2004-12-11 15:48:33 +00:00
Ton Roosendaal
99c6e728f6 Fix for bug #1823
Hiding window (Apple-H) caused the modifier to hang when reopened.
Added 1 line that re-reads modifier on "Inputchange" event, which only
is when you switch focus from one app to another.
Might solve more issues reported with 'hanging' keys.
2004-12-11 14:07:38 +00:00
Ton Roosendaal
2b614b2be4 Fixes, after bug report Stefano:
- Dupli-Frames objects didn't render correct with Motion Blur (they moved!)
- VertexKey on Bezier paths didn't animate the 'twist' rotation. This did
  work for Nurbs paths.

Plus; removed Nabla slider from Stucci, it doesn't work for that texture.
2004-12-11 12:41:51 +00:00
Ton Roosendaal
974f11379a As addition to the use of Colorband for normals;
- Stucci now accepts it too (for normals and color)
  Note; stucci doesn't return a single value, like marble or wood, that's
  still so, to disable it coloring the "Col" Map input by default.
- Magic texture now accepts Colorband
2004-12-10 18:29:16 +00:00
Ton Roosendaal
3bcc45ff64 Bug fix #1994
Sequence editor crash when you delete Scenes which were used as a strip.
Related to that, file reading code didn't restore pointers for strips
correctly when you save with open "Meta" strip.
First bug 8 year old. Second 1 month. :)
2004-12-10 14:50:39 +00:00
Rob Haarsma
58a503c189 Disabled debug printing. Pfft. 2004-12-10 13:39:05 +00:00
Rob Haarsma
56242a4977 Bugfix #1262 bugfix.
Path detection was wrong. Grrr, stupid windows paths.
2004-12-10 13:24:56 +00:00
Rob Haarsma
4b07e2c4d6 Bugfix #1262 additions.
When the Quicktime movie output path lacks any path indication, the movie is created in the
executable directory.
Also new, when the Quicktime output movie isn't created for some reason, the rendering will
stop and give an error message (in the console).
2004-12-10 12:55:53 +00:00
Ton Roosendaal
de0eb1caa3 Patch provided by Chris Burt; constraint name button exceeded actual string
size.
2004-12-10 11:49:24 +00:00
Rob Haarsma
8b20a8a685 Bugfix #1262
Raw fix for the drive letter issue with Quicktime/Windows filenames.
When a drive letter is missing in a filename, it'll use the drive where the executable is.

Fix might be useful for Yafray too, because the extern char bprogname[]; doesn't return
a full path when Blender is started from the console.
2004-12-10 01:28:28 +00:00
Simon Clitherow
b5131b4c65 Fixed a crafty little bug that only seemed to show up in 'Rotate Edges'.
Rotated edges (seemingly on quads only) were not drawn even if
'Draw All Edges' is active.

Finally tracked the bug down to a typo in flag checks! Eeugh, was much
head scratching on this one! :)
2004-12-09 22:11:40 +00:00
Ton Roosendaal
2de89e2a35 Three fixes in edge/crease edit for Transform Properties Panel (NKEY)
- code wasn't edge-select aware yet
- the "Median" button now allows to move a "median" correctly around, also
  to 0 or 1 in a single step
- missing undo push  here.
2004-12-09 16:43:37 +00:00
Ton Roosendaal
add697407a Bug fix #1995
Unpacking a file with packed sounds didn't save the samples... was due
to *very* weird method samples were put in Blender.
2004-12-09 13:46:38 +00:00
Kent Mein
175491deb4 I had to change a bit of the stuff I added to get solaris openal working.
I also removed a redundant bit of config stuff for freebsd
that didn't do anything.

Kent
2004-12-09 13:13:24 +00:00
Kent Mein
bdffe196af This fixes bug #1990
It moves targa, bmp, iris and png loading so that were not opening
2 file handles for each file, and made them like the jpeg stuff.

Also cleaned up some minor other stuff.

Kent
2004-12-09 13:09:11 +00:00
Ton Roosendaal
eae5d39899 Bug fix #1988, ray-transparency render.
Five fixes in this commit...

- the normals for nurbs surfaces still were calculated pointing wrong in some occasions
- recoded ray-transp rendering to accept normals pointing any direction; it just counts how many times it passes a "glass" layer, and flips normals appropriate then. This means rendering will go fine on models without manually setting the normals. You can also move a camera inside a 'glass' object.
- rendering of the inside part of glass now uses correct normal too... specularity happen on a solid glass inside now.
- And an inside reflected mirror ray will keep bouncing inside glass

Related to rendering localview: old convention to render localview, but with the lamps in the normal layers, has been restored.
Please note; render happens based on active window. You *only* get a localview or 'unlocked layer' render when that 3d window is active = mouse in window.
2004-12-09 12:06:37 +00:00
Ton Roosendaal
d8797f36f7 Bug fix based on bug report Chris Burt, IRC.
Appending objects with constraints expands links to objects (according
code) but doesn't give such objects a link to Scene.

Apprently, somewhere in NaN days, someone commented a call, which
already invoked comments... here's the full code + comments now:

	/* give a base to loose objects */
	give_base_to_objects(G.scene, &(G.main->object));
	/* has been removed... erm, why? (ton) */
	/* 20040907: looks like they are give base already in append_named_part(); -Nathan L */
	/* 20041208: put back. It only linked direct, not indirect objects (ton) */

:-)
2004-12-08 19:08:37 +00:00
Ton Roosendaal
ef4ac2b592 Narrowed code for restoring UI after undo. It seems still an error in
oops code, having pointers to ID structs that are invalid.

This solves at least it crashing... oops needs to be refreshed once :)

(occurred on testing complex files, with conversion from nurbs=>mesh)
2004-12-08 18:36:48 +00:00
Ton Roosendaal
b6f5420e8b Bug fix #1987
Halos with texture, but only mapping to "Alpha" and not color, were
rendered black, instead of in material color.
2004-12-08 15:29:47 +00:00
Ton Roosendaal
7662f80b75 Bug fix #1985
Using ctrl+up/down in buttons window, didn't use a proper rescale of view
as already works for dragging window edges. Now the 'Full window' action
keeps size nicely.
2004-12-08 15:11:52 +00:00
Rob Haarsma
fe3166e140 removed a debug printf. (excuse to check cvs permissions) 2004-12-08 15:11:38 +00:00
Kent Mein
80b25309b1 This commit makes it so openal finally works on solaris.
Kent
2004-12-08 14:58:40 +00:00
Ton Roosendaal
8712c7dab4 Essential cleanup for mess involved with reading files, initializing UI and
patching versions for UI settings.

Currently four different levels of routines for .blend file reading exist;

/* interface level */
1) BIF_init() -> calls 3
2) BIF_read_file() -> calls 11, optional 4
3) BIF_read_homefile() -> calls 11 or 12, and then 4
4) init_userdef_file()

/* kernel level */
11) BKE_read_file() -> calls 21, and then 14
12) BKE_read_file_from_memory() -> calls 22, and then 14
13) BKE_read_file_from_memfile() -> calls 23, and then 14
14) setup_app_data()

/* loader module level */
21) BLO_read_from_file() -> calls 24
22) BLO_read_from_memory() -> calls 24
23) BLO_read_from_memfile() -> calls 24

/* loader module, internal */
24) blo_read_file_internal()


Note:
- BIF_read_homefile() has additional UI initialize calls, like windows fullscreen and executing commandline options

- Reading from memory (12) only happens for the compiled-in .B.blend

- The "memfile" here is a name I gave to the undo "file" structure. Which is constructed out of memory chunks with basic compression features.

- the kernel function setup_app_data() sets globals like "current screen" and "current scene".

So far, so good. The levels as mentioned here clearly distinguish UI from kernel, and should enable for example game loading (runtime) or background (no UI) loading. In the past years however, 'bad level' dependencies were added, and especially the patches for 'file versions' were added in too many places. The latter is evidently a result of the problem that the "UserDef" struct cannot be initialized/patched if there's not a need for a UI.

Here's how the flow goes in four different cases:

----- Starting up Blender, in foreground with UI --------------------

- creator/creator.c, main() -> calls 1
- If the commandline contains a filename, it calls 11

----- Starting up Blender, in background without UI --------------------

- creator/creator.c, main() -> calls 11 if the commandline has a filename

Note: no Userdef is read, nor initialized. Please note that this was already an existing problem for using Yafray, not setting proper file paths in background mode. The Yafray paths don't belong in the User menu.

----- Starting up Blender as a runtime executable --------------------

This only has calls to 22

----- Loading a file from within the UI (with F1, CTRL+O, using pulldowns) -----

Only calls allowed to 2. It detects if a UserDef has been read too, and in that case the init_userdef_file() will be executed.

Hope this is understandable :)

-Ton-
2004-12-08 14:12:47 +00:00