Commit Graph

366 Commits

Author SHA1 Message Date
a557773f46 Bokeh blur in the blur node is wronlgy calculated.
when using the node on a single white pixel on black background, the output should look like as the bokeh image.
being a round image, but it looked like a donut.

the make_gausstab used dist/rad and bokeh used (dist/rad)*2 - 1
I changed it to reflect the correct bokeh circular image
2011-07-12 19:21:38 +00:00
b724c7f27e Add delete with reconnect feature.
this will reconnect nodes as if the deleted node is muted.
Operation is added to the space_node node menu and to the keymap as CTRL-X

to test this just add some nodes to the space_node
select one or multiple nodes and press CTRL-X

It should reconnect the nodes as they were muted

limitations:
1. it performs a delete and reconnect per node. It does not evaluate all selected nodes as one whole
2. mute only supports Value, Vector and Color data types, so does this feature
3. not usable for nodes where input and output does not match (like colorToBW)

Where reconnect could not be preformed the links will be removed from the model.

Undo works with this delete with reconnect.
2011-07-12 18:59:54 +00:00
65d1e27ff5 fix for using uninitialized value in gpu_shader_material 2011-07-09 19:16:32 +00:00
03b81a5c80 Ergh! first compile and test then commit! 2011-07-06 12:22:36 +00:00
9f25b85168 Making Blender compile for C90 standard, var declared after code :)
Also cleaned a line of code that was horribly spread over 4 lines.
2011-07-06 11:44:27 +00:00
5470326c3b Fix #27875: different texture nodes result after decompose/compose. 2011-07-06 09:58:29 +00:00
830fe8af84 Updated the indent, sorry! 2011-07-04 19:22:37 +00:00
c4491f558b Current situation
A mesh can consist out of multiple material. Take a character with clothing's. the skin can be a different material as the different clothing's. During compositing it is a common use-case to only do a part of the composit on only a specific material. Currently this can not be done.

In blender movies this feature is known to be implemented, but until now it never got integrated into trunk.
Proposal

With material index the Blender internal renderer will be capable of creating a buffer containing the material indexes of the first pixel-hit. This will be implemented in the same manner as the object index.

In the compositor the ID Mask node can be used to extract the information out of the Render pass.
Impact
User interface

On the properties-space the next changes will be done

    Scene⇒Render layer⇒Passes⇒Material index will be added
    Material⇒Options⇒Pass index will be added

DNA

    Material struct will get an new field called “index”. this will be a short-type.
    Material struct the field pad will be removed.
    A new Render-layer pass will be added (bit 1«18)

RNA

    Material RNA is updated (based on “pass index” from object)
    Render layer RNA is updated (based on IndexOB)

Blender internal renderer

The Blender internal renderer will process the render pass as a copy of the Object index.
Blender compositor

The render layer input will get a new output socket called “IndexMA”
Usage

An example on how to use material index can be found at:

https://svn.blender.org/svnroot/bf-blender/trunk/lib/tests/compositing/composite_materialindex.blend

This is also example of a commit message longer than the commit itself :)
2011-07-04 18:14:41 +00:00
33e554799b Minor warning cleanup & fix
- comment/remove assignments from values to themselves.
- add case break statements (no functional change but some source code checkers notice).
- fix python errors when the sculpt brush is None.
2011-06-27 03:36:14 +00:00
f31bae0aab fixed possible use of uninitialized variable. 2011-06-19 01:23:50 +00:00
Lukas Toenne
55c488abf0 Fix for GLSL material node inside groups. These were using the GPULink point from the input stack argument, but this only exists for directly linked nodes. If a node is linked directly to a group socket, which is not linked externally, the stack argument is actually the external group input. 2011-06-09 16:05:34 +00:00
d4ae38cc6c fix for own mistake & fix some comments. 2011-06-09 13:46:34 +00:00
43ec34f054 Bugfix #27601
Revision for previous fix; fast gaussian now survives on images
with a dimension smaller than 3 pixels!

Thanks Bastien Montagne for patch.
2011-06-08 16:08:57 +00:00
17becc751d Bugfix #27601
Scaling in compostior down to 1 pixel size crashed gaussian blur.
2011-06-08 15:17:38 +00:00
8ae4476fc4 getting useful results out of the round compo node was tricky, use the second value to determine how much to round by (can be used like a posterize filter) 2011-06-07 08:16:42 +00:00
044ae5e3c8 error pointed out by Jeroen Bakker with the math nodes round function. was incorrectly using the output rather then the input. 2011-06-07 07:57:26 +00:00
Lukas Toenne
cc7a154fac Material nodes were checking the nodestack->hasinput flag to determin whether the original material settings or the node input data would be used. This causes trouble when the input data is not the direct input constant of the node nor a direct link in the same tree (i.e. a group socket). Just checks if sockets are linked now (not very nice, but not hackier than the rest of that node).
Fixes bug #27511.
2011-05-31 17:54:48 +00:00
8d2e4cf42f fix [#27514] Fix Bug 27510 Color key hue flipping error (composite node) 2011-05-31 14:06:29 +00:00
09da9d4393 cmake maintenance
blender_add_lib now takes a separate include argument to suppress warnings in system includes (mostly ffmpeg & python).
also only build wm_apple.c on apple+carbon configuration.
2011-05-31 01:15:44 +00:00
0c990fba6e Bugfix #27305
RGB color node supports to set alpha too but never put alpha in the output.
Report + fix provided by Dani G. Thanks!
2011-05-10 16:30:03 +00:00
c4c22d4e9f - pass the camera to the render stamp function.
- add BKE_write_ibuf_stamp() since saving environment maps & screen shots shouldn't have stamp.
2011-04-30 05:26:09 +00:00
f9f771cd01 converted more mixed tab/space indentations to tabs. only whitespace changes. 2011-04-21 15:53:30 +00:00
210ee1ade4 whitespace only, no functional change mixed tabs/spaces --> tabs. 2011-04-21 13:11:51 +00:00
6bb626f253 minor changes
- remove some warnings
- fix typos
- cmake allow in-source build (when WITH_IN_SOURCE_BUILD is defined)
- cmake, use an explicit list of rna files (don't glob)
2011-04-21 05:49:47 +00:00
54f3167270 Bugfix #26901
Compositing, lens distortion node: it delivered RGBA out with alpha zero,
making it not draw previews, violates both premul or straight alpha usage.

Now it just sets alpha to 1 for entire output. 

Cleaned code readability a bit as well.
2011-04-18 11:22:01 +00:00
8b2a3c250a Fix [#26896] Displace Node crashes Blender when connected to Z-Buffer
Clamped the maximum displacement distance to 4 x the input image dimensions - prevents hanging when vary large values are mistakenly plugged in, such as Z buffers,
2011-04-17 22:47:23 +00:00
f261a22263 Committing patch [#26960] bu MiikaH, fixes bug:
[#26945] Hue Correct doesn't Hue But Rather Saturate

thanks!
2011-04-17 22:11:23 +00:00
ca254dd37b add option WITH_BUILTIN_GLEW, so linux packagers can disable to use their own glew library. 2011-04-05 23:31:01 +00:00
0298d223cc quiet various warnings, also disable -Wdouble-promotion with cmake since it gives warnings with variable length args. 2011-04-03 10:04:16 +00:00
e72c278f47 2 fixes for un-initialized memory uses, when running testfile: teapot_envmap.blend
boxsample() expected talpha to be set beforehand, also dont set the int value as a float since its confusing.
2011-03-29 01:47:03 +00:00
9b9c4184c8 misc nodes & editors: floats were being implicitly promoted to doubles, adjust to use floats.
+ minor update to demo_mode
2011-03-28 17:08:33 +00:00
db421408ce Bugfix #26584
- Colormanagement code was gamma correcting non-RGBA buffers in composite.
  (Like vector buffers). 
- Crash on using "use Color Management" button during composites, because
  it was freeing all node images. Added code to stop first jobs before
  freeing. It sends notifier for recomposites after free anyway.
2011-03-24 14:31:58 +00:00
ff1656175a Fix #26543: lamp sky settings were missing soft/linear light blend types,
made enum items shared with material ramp and mix node.
2011-03-19 10:26:15 +00:00
daff7a447e Bugfix #26388
Actually a todo item I forgot:

Material nodes previews now follow the scene "color managenent"
setting.
2011-03-07 11:51:09 +00:00
Lukas Toenne
8a312979ef Applied patch by Alexander Kuznetsov for bug 26373: math node 'round' mode was not working correctly for negative numbers. 2011-03-06 13:11:57 +00:00
c7fccc84bf use NULL rather then 0 for pointer assignments & comparison, modifier, imbuf & editors. 2011-03-05 10:29:10 +00:00
Nathan Letwory
19a9cffdf0 doxygen: blender/nodes tagged. 2011-02-27 20:13:22 +00:00
2e5eb41522 pedantic warning cleanup, also remove texspace_edit() since its been added using a different method. 2011-02-27 08:31:10 +00:00
Lukas Toenne
4fe21e0b4f The material "Dynamic" node (disabled anyway) had incomplete base type initialization, which made it appear as an empty item in the input node category. 2011-02-23 13:50:41 +00:00
Nathan Letwory
5b607701a7 doxygen: prevent GPL license block from being parsed as doxygen comment. 2011-02-23 10:52:22 +00:00
Nathan Letwory
8c8ae3dedf doxygen: entry for gpu, modifiers, nodes, python and render 2011-02-21 06:58:46 +00:00
65aac7c506 Fix for building math nodes provided by DustyDingo 2011-02-18 22:15:43 +00:00
538ad31bfb Bugfix #26128
Compositor/texture nodes: math node now allows to use pow() for
negative raising too, but only when that value is near-integer.
For other negative cases result is zero.
Patch provided by Aurel W
2011-02-18 12:34:31 +00:00
ba0d167d2a more vars made static 2011-02-14 18:20:10 +00:00
0852278ce7 Patch 26068
Fast-gauss node didn't respond to socket-input "Size" factor.
Thanks Philipp Oeser for the fix!
2011-02-13 14:55:39 +00:00
0955c664aa fix for warnings from Sparse static source code checker, mostly BKE/BLI and python functions.
- use NULL rather then 0 where possible (makes code & function calls more readable IMHO).
- set static variables and functions (exposed some unused vars/funcs).
- use func(void) rather then func() for definitions.
2011-02-13 10:52:18 +00:00
Lukas Toenne
46bb5643b7 Different method for blur node aspect correction. Now the user can still set different sizes for x/y blurring in relative mode, but choose to use aspect correction on either of the axes. 2011-02-10 20:54:02 +00:00
Lukas Toenne
cbe53cc48d More options for the blur node filter size. This can now be pixel based or relative to both axes or just either width or height. 2011-02-10 18:54:49 +00:00
Lukas Toenne
24db3d17aa Per-type node labels and customizable names. The label displayed in the node header is now by default the node type string. A custom label callback can be implemented to display more detailed information. This is currently used by group nodes, which display their internal tree name, and math, vector math, mix and filter nodes, which use their internal operation sub-type. Also the node tree selection/naming box for groups is now displayed only on open groups, to make it clearer that this is the internal type of the group and get a cleaner main tree. 2011-02-08 12:54:32 +00:00
Lukas Toenne
803c7fb4d4 Finished the node type definition cleanup started in r34682. All static node types should now use the node_type_* definition helpers to initialize their bNodeType structs. 2011-02-08 09:02:16 +00:00