Commit Graph

2653 Commits

Author SHA1 Message Date
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
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
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
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
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
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
fe3166e140 removed a debug printf. (excuse to check cvs permissions) 2004-12-08 15:11:38 +00:00
80b25309b1 This commit makes it so openal finally works on solaris.
Kent
2004-12-08 14:58:40 +00:00
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
28303c80e7 Bug fix 1982
Three buttons, showing float values, had only precision of 2 digits.
Made it three.
2004-12-07 18:14:03 +00:00
bc76f088bb Bugfix #1981
Pad-minus key didn't work in typemode transform().
Very easy, just flipping an && with || :)
2004-12-07 18:06:13 +00:00
0e7ac575c0 Sneak in little feature for texture editing pleasure;
- New channel for "Map to" added, "Warp"
- Use the slider next to the option to set amount of influence the texture
  will have on the coordinates of the next texture.
- Warp uses for this the same values as for Normal or Displacement mapping
- Warp remains active for all channels, until replaced (or zeroed).
2004-12-07 17:46:14 +00:00
d0cdf2bd4b More tweaks related to bump mapping quality;
While going over the code, I found out the "nabla", the size of offset
vectors for calculating derivatives of a texture, is a built in constant.
Even worse, the value was different for new noise types (musgrave etc).
So I've added a new slider for it in the procedural texture panels, which
by default is set to 0.025, the value of the old constant. Also made sure
it works with equal effect in all procedurals.

NOTE: a small Nabla will give sharper, detailed bump, but the effect also
becomes smaller, correct that in the Mapping Panel of materials.

For better & compliant control over the bumpmapping, I've also included
the Colorband output in derivatives calculus, so the bump output then
matches the color created. It's also a nice tool to finetune output of
textures for bumpmapping in general.

Bug fix; clicking on the rightmose 'item' in ColorBand didn't activate it.
Found out the ColorBand was slightly drawn off (2 pixels).
2004-12-07 14:46:48 +00:00
198ce177a3 Added support for normalmaps. 2004-12-07 05:31:17 +00:00
23b14eccec Bug fix #1978
Stencil in World didn't work with RGB textures (like what returns from
colorbands).
2004-12-06 19:14:53 +00:00
e4d428b539 Tweaked support for normalmaps to be OK.
http://www.blender3d.org/cms/Normal_Mapping.491.0.html

main changes:
- The "Map Input" in Blender for normals was negated
- Range for Z in normal map is Z (0-1) to Blue (0-255)
2004-12-06 18:05:42 +00:00
049adae624 Bug #1970
Objects being vertex-parented to a mesh, which in turn was being deformed
by a curve or lattice, were never update correctly.
Whilst this is a typical issue for our beloved new Dependency Graph, I
consider it worth at least solving for now. An issue since Blender 1.0
you know. :)

Solution is only working for this specific case; vertex-parent to deformed
object.
2004-12-06 12:24:10 +00:00
5590c179f5 Fix the case when the physics system starves the logic & renderer of CPU time. If this happens, we reduce physics precision to maintain some framerate. 2004-12-06 11:15:50 +00:00
e54f51c462 Fix numerical precision issue in physics. Dividing by a number too close to zero would make the impulse response normal large hence the jittering. 2004-12-06 11:10:41 +00:00
85a8203cbc Set the default physics tic rate to 90 Hz 2004-12-06 11:01:42 +00:00
88e435a52a Don't try to interpolate from prop ipo actuators 2004-12-06 10:58:38 +00:00
74256b8b7d Bug fix #1972
AKEY didn't toggle open/close outliner. It'll be back temporal, until
definitely defined what to do with selections in it.
2004-12-06 09:57:01 +00:00
947b99b0ce Outliner crash reported bu K-rich;
- with outliner visible
- alt+d (linked dupli) an armature
2004-12-05 23:24:43 +00:00
1e811c7886 Bugfix: normal mapping for textures wasn't rotated back to view space,
causing weird results on camera moves or object rotations.

Added: support for "normal maps". See for example:
http://members.shaw.ca/jimht03/normal.html

The Image panel in Texture buttons has new option "Normal Map" for it.
When this is used, normals are read straight from RGB values, and blended
with the current normal.
2004-12-05 21:49:13 +00:00
0b24f20a79 Bugfix/feat request... in textured view mode the Build Effect didnt show. 2004-12-05 21:46:30 +00:00
6c52311ee4 Reported on IRC;
Converting subsurf to mesh didn't display new Mesh object in correct wire,
when susurf was optimal.
2004-12-05 12:05:28 +00:00
a368426d26 BPython, two bug fixes:
- #1911: http://projects.blender.org/tracker/?func=detail&atid=125&aid=1911&group_id=9
    BOOL properties were returning True always, small mistake in logic.c's getData method.
- #1944: http://projects.blender.org/tracker/?func=detail&atid=125&aid=1944&group_id=9
    G.vd was not being checked against NULL in Window.ViewLayer, causing a crash when this function was called from a command line script.  Now it returns an error in such cases.
- small doc updates, tiny minor change in Object.c.
2004-12-05 04:01:57 +00:00
263479dfba Added support for the extra texture channels. 2004-12-05 03:51:01 +00:00
ef971de66d Fix Action & IPO actuators: (Bugs #1921 & #1920) 2004-12-05 02:50:57 +00:00
aad31875d7 Special bf-committers request; Lamp/World/Material now each have 10
channels to link texture to.

The amount of code changes seems large, but is mostly getting rind of
hardcoded values (6 and 8) for channels, replacing it with MAX_MTEX.

Further did some fixes;
- Ipo for Lamp showed too many mapping channels
- Texture MapTo buttons for lamp missed the slider to blend texture color
- Lamp texture mapping "View" only worked for Spot, now it uses lamp-
  view vector for all types. (Nice for projections!)
2004-12-04 21:49:02 +00:00
8d4782f729 Was on my todo; with option "load No UI" the CTRL+X (start over) didnt
load UI either.

(editmesh commit is error in previous commit, but caused no harm)
2004-12-04 17:52:44 +00:00
bebeecef78 Bug fix #1955
Another tweak in the convex formula, replaced a ">" with ">=" for detecting
optimal projection of face in 2d. Solves issue reveiled in Bevel tool,
where it could happen that a face wasn't created.
2004-12-04 14:29:57 +00:00
fb57058f9f Bug fix #1954
Edge render for wire in unified was total mess! Code there apparently never
even tested. Gave wrong rendering and potential crashes.
2004-12-04 12:02:19 +00:00
a07cc9a296 Bug #1957
Blender ALT+Z drawmode didnt support quad lights.
2004-12-04 10:51:04 +00:00
ae8102c8d6 Update the physics engine: interpolate between frames so track to/camera actuators work properly. (bug #1816) 2004-12-04 09:51:04 +00:00
d109dc7685 Two small fixes;
- on exit editmode, displist for subsurf was not made, causing static
  particles to calculate wrong
- static particles were not selectable
2004-12-03 23:22:21 +00:00
792c5334f8 - added undo pushes for buttons invoking file window in scene buttons
(set directory, backbuf, scene)
- small annoyance; after extrude the transform() didn't react to the
  "midtog" feature (middlemouse constraint)
2004-12-03 22:04:28 +00:00
1fc26457f4 Bug fix #1952
When rotating camera itself in camera view, and choose local axis rotate,
the camera flipped around. Was due to using viewmat[][] while it changes...

Solved in the simplest elegant way; hope Martin will cope with this in new
transform!
2004-12-03 21:25:56 +00:00
ded466b0c2 Bug fix #1945
Undo push missing after "ALT/SHIFT+D and ESC".
2004-12-03 20:41:53 +00:00
73b7d9f80b Fixes in static particles. Result of going over details with Chris Burt,
thanks for that!

- static particles that are being deformed (curve/lattice/armature) now
  display correct in 3d window. Only updates when particle system updates
  normally though
- static particles without "animate" set didn't deform even
- static particles used as duplicators had errors with extreme low "life"
  value for particles. Also, still cases could happen with unrotated duplis
  at the end of a static particle line (with Vect option)
- Added tooltip for "Step" option in particles
2004-12-03 20:22:37 +00:00
4193f1cd7f Bug fix #1946
Editmode Mesh, edge selectmode, not zbuffer on. Selecting edges didnt give
a small disadvantage to the already selected one, making it hard to select
edges that are extreme close or on top of each other.
2004-12-03 18:04:33 +00:00
0d9f06cce4 Bug fix #1947
Unified render added sky with alpha=1. Found the way how to fix it, didnt
dare that yesterday. :)
Now sky is rendered with alpha=0, like normal render.

Thanks to the recent reports, a lot of old issues with unified render have
been solved. This is going to be pretty OK!
2004-12-03 17:03:35 +00:00
7a686d2d7e Bug fix #1948
When using a backbuffer with alpha, but alpha is not premulled, you can
get weird rendering results with halos or lens flare. This was caused by
optimize rule in alpha routine that assumed alpha==0 means color is zero.
Removed for the the halo case.
2004-12-03 16:44:48 +00:00
25165da42d Fixed the very annoying display of User Settings Menu when Blender window
is wider than 1280 pixels. It now keeps scale at 100% then, without zoom.
2004-12-03 16:32:24 +00:00
9c9047a641 Fix for #1951
Textbuttons and buttons showing ID names (Objects, etc) were accidentally
also translated. Error since 2.3 recode. :)
2004-12-03 15:28:48 +00:00
1411f7ed59 Fix for #1700 and #1941
When a font for 3d Text Object doesnt exist anymore, Blender could crash.
Thanks Rob Haarsma for fixing it.
2004-12-03 14:30:32 +00:00
81702927a8 Bufix for #1940
With material slider "Ray Mir" set non zero, but with toggle "Ray Mirror"
off, Blender accidentally entered a part of raytracing code, screwing up
the alpha value of the result.
2004-12-03 10:16:29 +00:00
e6489f4a55 Added
#define B_UNLINKIMA            1358

Since it was undefined and causing things not to compile.  Whoever added it
might want to move it but hey its working again for now. ;)

Kent
2004-12-03 02:42:21 +00:00
4c7bd73741 Fix, reported on irc by K-rich.
Texture buttons didn't allow to unlink the image. Nowhere in Blender this
even is possible or happens... reason for blocks to get "stuck" in file. :)
2004-12-02 22:39:16 +00:00
541e36fe11 Added new option:
In renderwindow, press AKEY to see the alpha in B&W. Another AKEY shows
normal RGB again. This uses glColorMask, an opengl 1.0 function.
Really needed it for debugging alpha in rendering. :)
2004-12-02 21:22:17 +00:00