Commit Graph

5003 Commits

Author SHA1 Message Date
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
Ton Roosendaal
ff8ab2d9df Orange: tip from Nathan to get exr working in scons compiles... 2006-01-10 11:39:03 +00:00
Chris Want
ca8da580a8 OpenEXR support for Windows Makefiles 2006-01-10 06:29:57 +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
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
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
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
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
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
Ton Roosendaal
b702ce4819 Orange bugfix; duplicating object with group didn't increase group user
counter... tsk tsk tsk!
2006-01-05 19:16:28 +00:00
Ton Roosendaal
febd2a8f28 orange bugfix: "Make local Action" did not set the Ipos in channels to
local (or make copy if used by other actions), causing in loss of ipo's.
2006-01-05 16:12:02 +00:00
Ton Roosendaal
fbe9a17138 Orange bugfix: regular materials did not show textures... 2006-01-05 14:53:26 +00:00
Ton Roosendaal
465ff56d96 Orange: Ack! Yesterday's commit to cleanup relative paths forgot to
change the undo code as well... so on any Undo/redo all the libraries got
lost!
2006-01-05 14:12:07 +00:00
Ton Roosendaal
283b0ff736 Orange; maintenance commit!
- Moved all 'render pipeline control' options out of the Material panels
  into the (now renamed) "Links and Pipeline" Panel. These are the options
  that are not per material-node, but global for the entire Material tree.
  It includes ZTransp, Zinvert, Strands, Halo, Wire, etc.

- To further make Node editing clear, when you enable Nodes for the first
  time, the link button to the first Material node is drawn red, to note
  that here needs something linked or added.

- Protected Node editing for Library data

- Fixed header buttons to work OK for Node Window
2006-01-05 13:46:27 +00:00
Matt Ebb
0551b93808 * Fix to update timeline after transform in action window 2006-01-05 13:25:26 +00:00
Ton Roosendaal
406b3ae63b Orange; last commit didnt draw passepartout correctly. Also added a limit,
so you cannot screw up the entire view :)
2006-01-04 21:29:32 +00:00
Ton Roosendaal
987a3216c3 Orange: Hold SHIFT+MMB in camera view shifts the viewports around. 2006-01-04 21:16:09 +00:00
Ton Roosendaal
1521012c18 Orange; moved version patch for bone layers to 2.40, so orange branch can
read 2.40 files!
2006-01-04 19:11:27 +00:00
Ton Roosendaal
3f4aed3658 Orange; relative path fix for libraries.
- On linking stuff from libraries, each relative path now is relative with
  respect to the file that uses the library.

This way you can make libraries that use other libraries, and link them
in your project with an entire different relative path.

The commit also fixes issues when mixing up relative or non-relative paths.

Now after this I need to commit something cool, so the orangers will update
and check! :)
2006-01-04 19:05:24 +00:00
Ton Roosendaal
ed2b55585d Wednesday sync orange with bf-blender
Note: has the crazyspace fix!
2006-01-04 15:47:16 +00:00
Ton Roosendaal
4cb838d54f Fix for CrazySpace correction. (Special request of our Argentinan bird
movie friends :)

There were two issues with it, which both have been tackled as follows:

- the correction transformations (quaternions) were calculated per face,
  and then averaged over the vertices. This gave annoying inaccuracies,
  especially when the geometry is irregular.
  The new code first calculates two tangent vectors in a vertex, based on
  the associated edges it has in a face. These tangents then are used to
  define the transform. Tangents are 20% of the length of an edge now.

- When a SubSurf modifier was in the chain, the deformation caused by the
  subsurf was also included in CrazySpace correction, giving even larger
  errors.
  New code temporally disables Subsurf, recalculates vertices, and then
  does the crazy tricks. :)

All in all, quite well working!
2006-01-04 15:37:48 +00:00
Campbell Barton
4af91dae79 Added some notes regarding Object.GetSelected() - it uses the last localview. 2006-01-04 15:11:35 +00:00
Joseph Gilbert
de37b11e56 [ #3712 ] Calling makeEditable() and update() on an armature twice duplicates bones
* fixes bug where editbones are not freed on calling update()
2006-01-04 15:07:15 +00:00
Ton Roosendaal
ec01a66a6b Orange: Node previews now draw standard backdrop to show alpha better. 2006-01-04 12:41:13 +00:00
Ton Roosendaal
3153a238b3 Orange: more Node goodies;
- New Node: "Mapping". Allows input vector to be translated, rotated and
  scaled. And optional be clipped to a range. Works for colors too!

- The button "Normal" now allows incremental input, so a click in the
  button won't change the normal anymore

- Connecting wires now show selection state for Nodes, with nice blended
  colors. Both colors were added in Themes, but default to black and white
2006-01-04 12:13:13 +00:00
Campbell Barton
ff7ca4b1a2 Gave an example of changing lamp modes in epydocs. - answers a q on elysuin. 2006-01-04 01:55:39 +00:00
Ton Roosendaal
bd26fe8f94 Orange: Another issue with Armature layers; in NLA, the strips with a
locked length should not skip hidden channels.
2006-01-03 22:09:25 +00:00
Ton Roosendaal
f47899fc0f Orange; merger with bf-blender.
(Merging is *not* fun work, especially not with bugfixes in main branch
for code that got cleaned up in the other! Poor Hos... :)
2006-01-03 21:43:31 +00:00
Ton Roosendaal
9557c3a66d Orange: minor tweak for group user counting. 2006-01-03 21:10:43 +00:00
Ton Roosendaal
14d5cd1c31 Bugfix #3646
Outliner, using scrollwheel with mouse in scrollbar didn't scroll in the
correct direction.
2006-01-03 20:59:51 +00:00
Ton Roosendaal
5414bca7f7 Bugfix #3643
Editmode mesh: after an unhide ("reveal") the countall() needed to be
called. This caused for example extrude not to work when all was hidden.
2006-01-03 20:26:24 +00:00
Ton Roosendaal
750b9df26a Bugfix #3673
Threadsafe patch for environment maps type "Load" missed to include a
call, so still crashed. Only for non-debug builds though, so not reported
earlier.

From my cvs log 7 months ago:

"Added threadsafe patch from Martin.
Now envmaps of type "Load" should not give errors. I assume Martin tested!"

 :)
2006-01-03 20:06:08 +00:00
Ton Roosendaal
a085a41bc5 Bug #3681 The never ending bump mapping saga!
With the fix over a month ago, which added correct texture space vectors for
the bump, gave results so crispy that normals could invert after normalize.
This only when the normal "fac" slider was > 1.0.

The normals from imagetextures now get clipped to prevent it to result in
flipping normals. Will do more tests though...

Also note that the real good way would be have the tangent vectors for the
actual render normal available to perturb for bump, thats another story.
2006-01-03 19:49:38 +00:00
Joseph Gilbert
9f8348a22a *bpy fix
- include file capitialized wrong
2006-01-03 17:24:24 +00:00
Chris Want
b41a476401 As positively recieved on the mailing list and irc (and blessed by
guitargeek), this commit enhances the support for temporary storage
for the structs EditVert, EditEdge, and EditFace. The field
"EditVert *vn" has been removed and replaced by a union called
"tmp" that can hold:

 v,  an EditVert pointer;
 e,  an EditEdge pointer;
 f,  an EditFace pointer;
 fp, a float pointer;
 p,  a void pointer;
 l,  a long;

Please see the mailing list post here for more information about
this:

http://projects.blender.org/pipermail/bf-committers/2005-December/012877.html
2006-01-03 17:22:42 +00:00
Joseph Gilbert
5233f73589 *warnings fixes
- fixes a number of warnings in bpy project
2006-01-03 16:27:34 +00:00
Johnny Matthews
af7e7ab587 Changing the names of the shape copying tools to something that doesn't offend the orange team ;) 2006-01-03 15:22:11 +00:00
Ton Roosendaal
832f2d33d3 Orange; stuff for the animation department!
- Found the potential crasher for sound playback & undo. Test!
- PoseMode: NKey panel didn't work when actions where assigned
- NLA: "Add action strip" now displays in menu to which active object the
  actions are added.
2006-01-03 12:04:05 +00:00
Ton Roosendaal
4bc4eac1e5 Orange; tweaks for further integrating node editing in UI
- Previews inside groups now get updated too
- Activating nodes inside of groups updates UI and preview render correctly
- Entering/leaving groups updates UI and previewrender
- Material Node: now draws socket name next to colorpicker for inputs
2006-01-03 11:34:28 +00:00
Campbell Barton
d14f6c9cbc replaced more M_Object_Get for the faster Object_CreatePyObject.
Object.GetSelected now dosnt return None if there is no 3d view. - wasnt documented and likely would mess up scripts that always expected a list. - Just return an empty list instead.
2006-01-03 06:14:53 +00:00
Campbell Barton
fc079f8482 made scene.getChildren() a heap faster. 983.3 times faster in my test.
getting 7200 objects did take: 1.18 sec,  now 0.0012 sec

It was doing a full object list lookup for every object in the scenes base using the name to compare.
now it just gets the object directly from the base and converts it to a python object, adding it to the list.
- Cam
2006-01-03 05:38:39 +00:00
Campbell Barton
fc6ec33c89 Adds a boarder around the oops, usefull to know where the oops bounds end with larger scenes.
I needed to do a make clean, then make to see this change.
2006-01-03 04:20:43 +00:00