Commit Graph

47594 Commits

Author SHA1 Message Date
Matt Ebb
dac868985e Orange: Added an option in View Properties panel to disable drawing of 'relationship lines' - i.e. the dashed lines that connect objects in parent/constraint/hook/IK relationships. After talking to the others I rolled the Armature-specific one into the same setting for simplicity's sake. We can see how it goes, always possible to put it back. 2006-01-11 14:44:23 +00:00
Ton Roosendaal
1eee258449 Orange: ImageWindow goodies
- options to show with alpha-over (checkered backdrop), only alpha (BW) and
  when available: the zbuffer.
  Note: it's icons in the header, I just re-used existing ones, no time now
  for fancy design. :)

Also: recoded the way alpha-only draws, also in renderwindow. Mucho faster!

Oh, and sampling the buffer with LMB now displays z values in float range
of 0.0 to 1.0. Note that we still save signed int in files for Z...
2006-01-11 14:20:35 +00:00
Erwin Coumans
fbc977e48c attempt to avoid nameclashes (although it is already in a namespace) -> extension names renamed from glXXX to blXXX. 2006-01-11 13:31:45 +00:00
Ton Roosendaal
305fdec0eb Orange: tested all EXR demo images from openexr.com, found two issues;
- images with a so-called "data window" (have negative start coordinate)
  did not read correctly
- negative colors were not clamped yet in imbuf

Now there's still some compliancy issues with zbuffers... you can save
it either as unsigned int or as float, whilst blender renders zbuffer in
signed int. :)
2006-01-11 10:41:04 +00:00
Campbell Barton
c012b94ca4 Fixed bug in do_clever_numbuts not displaying tooltips.
Comment:
	Clear all events so tooltips work, this is not ideal and
	only needed because calls from the menu still have some events
	left over when do_clever_numbuts is called.
	Calls from keyshortcuts do not have this problem.
2006-01-11 04:03:19 +00:00
Chris Want
638b625d14 For windows, NAN_NO_KETSJI was always set to false (as a result of
some strange merging). Unfortunately, Bullet doesn't build correctly
for gcc under cygwin (some private vs public stuff), so it is
important to be able to disable the game engine in these circumstances.
2006-01-11 03:23:47 +00:00
Ton Roosendaal
09549c4538 Orange: Added Alpha viewing option in Image window. 2006-01-11 00:08:02 +00:00
Ton Roosendaal
e7285229b8 Tuesday merger of bf-blender into orange branch. 2006-01-10 22:10:14 +00:00
Ton Roosendaal
d594594cbe Orange: more work on float/exr buffers;
- EXR now saves and reads Zbuffers correctly
- EXR reading didn't set alpha to 1 yet when no alpha buffer was present

- ImageWindow: the "black point" only checked for the r value... now is OK
- ImageWindow: Curves panal has button "reset"
- ImageWindow: hold LMB drag shows rgba and z values. With SHIFT or CTRL it
  applies black/white point whilte dragging too
- ImageWindow: saving file copied the entire buffer... removed that. Also
  made the header print clear; this save only saves in own file type.

- Curves: zoom and drag now gets clamped by the Clipping value

- Imbuf: duplicate buffer only copied one quarter of to new buffer
2006-01-10 21:41:37 +00:00
Ton Roosendaal
a0a3597b8b Orange:
Accidentally didn't disable the tests I did for 'translucent raytrace',
a cheapskate SSS method;

http://www.blender.org/bf/rt.jpg
http://www.blender.org/bf/rt1.jpg

It slowed down render too much, was default on... but invisible! It needed
the F10 buttons "rt" to be huge (600-1000)
2006-01-10 19:23:11 +00:00
Kent Mein
daca2eb787 ifdef check for WITH_OPENEXR was removed from readimage for some reason
causing building without OPENEXR to fail.  (Hopefully this doesn't mess up
current scons stuff, shouldn't but I haven't tested it after latest
changes in scons)

(I also cleaned up the Makefile a tad so it didn't check twice for WITH_OPENEXR)

Kent
2006-01-10 16:52:21 +00:00
Brecht Van Lommel
b3eef4f9f1 MSVC compile error fix for subsurf UV. 2006-01-10 12:25:07 +00:00
Ton Roosendaal
ff8ab2d9df Orange: tip from Nathan to get exr working in scons compiles... 2006-01-10 11:39:03 +00:00
Brecht Van Lommel
dd7e0b6bfe Apply Subsurf to UV's.
This fixes most of the UV distortion issues with subsurf. Near seams
however there might still be some distortion, but this should at least
not be worse than before. Subsurf UV is enabled by default on new meshes,
and can be enabled in the modifier panel for existing ones.

Before and after:
http://users.pandora.be/blendix/notsmooth.png
http://users.pandora.be/blendix/smooth.png
2006-01-10 11:36:57 +00:00
Erwin Coumans
b7be6620d6 applied patch from snailrose, related to multi-platform OpenGL extensions. 2006-01-10 06:34:42 +00:00
Chris Want
ca8da580a8 OpenEXR support for Windows Makefiles 2006-01-10 06:29:57 +00:00
Campbell Barton
30633421d2 Fixed bug in convert function with Mesh objects.
Objects with no modifier could still be converted, but resulting meshes were corrupt and segfaulted Blender when cycling edit mode.
This tests each mesh object for modifiers before converting.

Resulting metaballs meshes were not visible in wireframe.

Also made the selection context nicer, All new converted objects are selected while objects that are converted are deselected.
2006-01-10 02:01:24 +00:00
Kent Mein
7e94fd8254 added prototypes for bottom_sel_action and friends.
Steath Apprentice said its needed for MSC.  Bug # 3687

Kent
2006-01-10 01:36:36 +00:00
Ton Roosendaal
3b4907415c Orange: and now for the real exr fun: float buffer support in Image window!
Image as loaded in Blender (from openexr.com):
http://www.blender.org/bf/exrcurve1.jpg

Image with different white point:
http://www.blender.org/bf/exrcurve2.jpg

Image with white and black point and a curve:
http://www.blender.org/bf/exrcurve3.jpg

Use SHIFT+click to set the black point, and CTRL+click for white point.
The buttons in the panel work too, of course.

The curves work after the black/white range was corrected, so you can
stick to curves with a normal 0-1 range.
There's also now a general color curve, marked with 'C' button.

Note; this currently only maps the float colors to a visible 8 bits per
channel rect. You can save it, but when the blender file loads the curve
or mapping is not executed until you click in the curves... have to look
at that still.
Speed for this is also quite unoptimized... still WIP, but fun!
2006-01-09 23:52:51 +00:00
Ton Roosendaal
a094eb4e9a Orange: Silly error in patch... the buffer for wpaint/vpaint got allocated
with only half the size...
2006-01-09 21:51:17 +00:00
Ton Roosendaal
e62fed936e Orange: more exr & imbuf cleanup
- Reading exr images now goes OK. I've unified the code for reading
  'half' and 'float' (was nicely possible!). And removed useless copying
  of data around.

- Fixed bug in allocating new rects, like for making mipmaps. flag issues.

- filter code accidentally incremented wrong pointer (crash on mipmap too)
2006-01-09 19:17:37 +00:00
Ton Roosendaal
bdef14bf81 Orange fix: Lamp ipos were also not duplicated when indicated... old stuff
here! :)
2006-01-09 15:56:47 +00:00
Ton Roosendaal
44fb9d1860 Orange: Avi writing crashed... very weird code in here with imbufs, made
it not using imbufs for now, so I know what goes on! :)
2006-01-09 15:46:43 +00:00
Campbell Barton
7ee9caf523 There was a problem with typing over text selections, where you had an object with 21 letter name (19 is the max but 21 is supported, just copy a mesh a few times)
After this click on the object name and start typing, even though the selection makes it that the new string would be overwritten, it dosent let you type in any text.

from
if(len <= but->max) {
to...
if(len-SELWIDTH+1 <= but->max) {

- Tested and works well.
2006-01-09 15:24:23 +00:00
Ton Roosendaal
24b45cfc10 Orange: code for building the image-type menu was wrong for non-quicktime
cases. :)
2006-01-09 12:53:05 +00:00
Ton Roosendaal
b9eabd976d Orange bugfix:
On duplicating an object with material ipos that has drivers, the new ipos
(if material and ipos were copied) didn't get the correct pointer to the
new driver object (if that was copied!)
2006-01-09 12:18:42 +00:00
Nathan Letwory
96596d4ced Include paths were wrong. Now openEXR compiles and links 2006-01-09 12:14:02 +00:00
Ton Roosendaal
f0aceff196 Orange: Further cleanup of EXR saving
- F10 scene buttons now has options "half" and "zbuf" for exr saving.
  Note: when no float buffer is available, it always saves as "half",
  that's sufficient anyway, since half is 16 bits per channel.

- EXR in imbuf now uses compliant ibuf->ftype flags for denoting exr
  extensions such as 'half' and 'compression'.

- Removed ugly blenkernel dependency from exr module
2006-01-09 10:55:41 +00:00
Campbell Barton
beba2cf172 Made buttons in clever numbuts allign.
Commented out crufty name spesific actions that changed variables and added a label of buttons started with "Rot" - Since panels are used for rotating now.
2006-01-09 05:01:17 +00:00
Kent Mein
17598faca1 Another small gameengine build tweak. Included a missing header directory.
I also provided a fix for tiff images.  (It was appending tif even if
it was already in the name, now it does it correctly)
(no more image.tif.tif)

Kent
2006-01-09 02:23:04 +00:00
Kent Mein
c693e01b8d Ton forgot a few modifications to the Scons and Makefile build systems.
These should make it so that other people can compile with OpenEXR support.

(I also added the OPENAL fix erwin commited to bf-blender since I
need it for my machine, and this syncs up the file)

Kent
2006-01-09 02:18:11 +00:00
Ton Roosendaal
014aa7261e Orange branch: OpenEXR finally in Blender!
Credits go to Gernot Ziegler, who originally coded EXR support, and to
Austin  Benesh for bringing it further. Kent Mein provided a lot of code
for integrating float buffers in Blender imbuf and ImBuf API cleanup,
and provided Make and Scons and static linking.

At this moment; the EXR libraries are a *dependency*, so you cannot get
the Orange branch compiled without having OpenEXR installed. Get the
(precompiled or sources) stuff from www.openexr.com. Current default is
that the headers and lib resides in /user/local/

Several changes/additions/fixes were added:

- EXR code only supported 'half' format (16 bits per channel). I've added
  float writing, but for reading it I need tomorrow. :)
- Quite some clumsy copying of data happened in EXR code.
- cleaned up the api calls already a bit, preparing for more advanced
  support
- Zbuffers were saved 16 bits, now 32 bits
- automatic adding of .exr extensions went wrong

Imbuf:

- added proper imbuf->flags and imbuf->mall support for float buffers, it
  was created for *each* imbuf. :)
- found bugs for float buffers in scaling and flipping. Code there will
  need more checks still
- imbuf also needs to be verified to behave properly when no 32 bits
  rect exists (for saving for example)

TODO:

- support internal float images for textures, backbuf, AO probes, and
  display in Image window

Hope this commit won't screwup syncing with bf-blender... :/
2006-01-09 00:40:35 +00:00
Martin Poirier
2ead92cc2b BPy:
PupBlock method. This wraps the "clevernumbut" code to allow scripters to use popup blocks for user input instead of a sequence of multiple different popups.
See the blend file for a comprehensive test and example file.
2006-01-08 18:59:55 +00:00
Ton Roosendaal
104ab9b103 Orange:
- New UI element: the "Curve Button".

For mapping ranges (like 0 - 1) to another range, the curve button can be
used for proportional falloff, bone influences, painting density, etc.
Most evident use is of course to map RGB color with curves.

To be able to use it, you have to allocate a CurveMapping struct and pass
this on to the button. The CurveMapping API is in the new C file
blenkernel/intern/colortools.c
It's as simple as calling:

   curvemap= curvemapping_add(3, 0, 0, 1, 1)

Which will create 3 curves, and sets a default 0-1 range. The current code
only supports up to 4 curves maximum per mapping struct.
The CurveMap button in Blender than handles allmost all  editing.
Evaluating a single channel:

   float newvalue= curvemapping_evaluateF(curvemap, 0, oldval);

Where the second argument is the channel index, here 0-1-2 are possible.
Or mapping a vector:

   curvemapping_evaluate3F(curvemap, newvec, oldvec);

Optimized versions for byte or short mapping is possible too, not done yet.

In butspace.c I've added a template wrapper for buttons around the curve, to
reveil settings or show tools; check this screenie:

http://www.blender.org/bf/curves.jpg

- Buttons R, G, B: select channel
- icons + and -: zoom in, out
- icon 'wrench': menu with tools, like clear curve, set handle type
- icon 'clipping': menu with clip values, and to dis/enable clipping
- icon 'x': delete selection

In the curve button itself, only LMB clicks are handled (like all UI elements
in Blender).

- click on point: select
- shift+click on point: swap select
- click on point + drag: select point (if not selected) and move it
- click outside point + drag: translate view
- CTRL+click: add new point
- hold SHIFT while dragging to snap to grid
  (Yes I know... either one of these can be Blender compliant, not both!)
- if you drag a point exactly on top of another, it merges them

Other fixes:

- Icons now draw using "Safe RasterPos", so they align with pixel boundary.
  the old code made ints from the raster pos coordinate, which doesn't work
  well for zoom in/out situations

- bug in Node editing: buttons could not get freed, causing in memory error
  prints at end of a Blender session. That one was a very simple, but nasty
  error causing me all evening last night to find!
  (Hint; check diff of editnode.c, where uiDoButtons is called)

Last note: this adds 3 new files in our tree, I did scons, but not MSVC!
2006-01-08 11:41:06 +00:00
Erwin Coumans
c94455c14d more linux game engine work. hopefully works now! 2006-01-08 09:37:15 +00:00
Erwin Coumans
88a8508b34 Got the armatures, GLSL shaders and other snailrose changes to work for Linux.
now attempting to get this in cvs :)
2006-01-08 09:11:17 +00:00
Ton Roosendaal
32e21f4524 Orange: while testing other code, I found out the scrollwheel code redraws
a 2d window 3 (three!) times on every event! This explains why scrollwheel
seems to lag quite some when used in buttons or outliner.

The view2dzoom() and view2dmove() code is horrid. Nice project for someone
is to move all 2d (View2D struct related) code into its own C file. A lot
of that is spread around in the code.
2006-01-07 10:35:47 +00:00
Erwin Coumans
9f429be173 removed testing code 2006-01-07 02:00:44 +00:00
Erwin Coumans
bed24bc299 more work to get armatures/blender materials to work under non-windows platforms 2006-01-07 00:14:37 +00:00
Erwin Coumans
0a252adb99 use relative paths to avoid including extra folder 2006-01-06 20:35:02 +00:00
Willian Padovani Germano
b1c6fe7337 Bug #3658 reported by Daniel Holtz (thanks):
http://projects.blender.org/tracker/?func=detail&atid=125&aid=3658&group_id=9

Running scripts from command line in bg mode:
blender -b -P myscript.py
crashes Blender 2.40.

The problem is in add_text() in text.c: G.scene can be NULL at this
point (in bg mode). Added a check:

line 323:
	if (G.scene) /* can be NULL (bg mode) */
		BLI_convertstringcode(str, G.sce, G.scene->r.cfra);

The text being added with add_text() in this particular case is the
script filename specified at the command prompt, so it should be ok to skip
BLI_convertstringcode. Feel free to disagree, though.
2006-01-06 20:15:18 +00:00
Andrea Weikert
e6d5d8cb74 FIX: scaling of pupmenu for materials caused text to be cut off.
Scaling up of the text and icon in pupmenu is prevented now in ui_do_but_MENU.
2006-01-06 19:18:31 +00:00
Kent Mein
93f71e2d0c changed the size of some local vars for 64bit linux.
also added a newline at the end of the file to shut gcc up.

Kent
2006-01-06 15:29:11 +00:00
Nathan Letwory
b0d0c87a1f #3706 (patch tracker)
- Adds missing ipos for texture
   * color, contrast, brightness
- Adds IKey menu in the texture subcontext

#3711 (bug tracker)
- report and patch for missing blend types Halo and Radial

Patches by Levon Hudson
2006-01-06 13:33:20 +00:00
Nathan Letwory
50e26b7637 Todo #2574
Setchain: it allows you to chain sets. It checks for loops when trying
to assign new scene, and will notify if changing set would create a loop.
2006-01-06 12:37:45 +00:00
Erwin Coumans
4a641caddd fixed copy/paste bug in physicscontroller applyforce, and crashing radar sensor 2006-01-06 09:57:27 +00:00
Erwin Coumans
f3a76a1851 removed extra characters 2006-01-06 09:40:00 +00:00
Erwin Coumans
0002cd63a5 disable game engine and gameplayer for all platforms except windows.
Then after cvs is unfrozen, development can continue.
2006-01-06 09:02:53 +00:00
Kent Mein
dd3356f694 Added current directory to includes so it could find some headers.
(I still do not have the whole thing working but I'm stumped now and
figured this will save someone a little time)

Kent
2006-01-06 04:43:17 +00:00
Kent Mein
51368852ee Headerfile had wrong Capatalization.
Kent
2006-01-06 04:13:20 +00:00