Commit Graph

273 Commits

Author SHA1 Message Date
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
Lukas Toenne
e7750aa6ed Convenience fix: Exposing internal sockets now copies the default input value to the group sockets. The "expose" function on group inputs/outputs has an optional parameter "add_link", which can be used to prevent the automatic linking. 2011-02-22 20:49:34 +00:00
Lukas Toenne
b3c60ef3ea Added RNA functions to group tree inputs/outputs for exposing internal sockets or adding custom sockets by name and type (fixes #26171). Changed a few function names for groups for consistency. 2011-02-22 20:24:06 +00:00
Lukas Toenne
8b5d019139 Fixed missing initialization of node stack entries. 2011-02-22 07:58:49 +00:00
Lukas Toenne
4fb730d6d0 Fixed do_versions for node groups which contain nodes that have changed sockets. do_versions is running before the lib_verify_nodetree function updates socket lists of nodes. This means that when adding unlinked sockets in do_versions to restore older node groups, the new sockets are not taken into account. To fix this a temporary node tree flag has been introduced, which delays actual group socket do_version until the group tree internal nodes have been updated. After that the unlinked group sockets are exposed (like old node groups did), then the external sockets look up the new index, so that external links to group instances are preserved. 2011-02-21 18:18:37 +00:00
Lukas Toenne
1c7a422f78 Big node groups improvement patch. Node group trees now have their own lists of input/output sockets. Those can be linked to internal nodes just like links between regular nodes. In addition group sockets can be renamed and have a defined order, which can be modified, and they can be removed again.
More details can be found in the patch tracker description (#24883) and on the code.blender.org development blog.
2011-02-21 13:47:49 +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
69e72ea427 Removed the internal_select parameter from ntreeCopyTree. This was used just in one place when duplicating nodes, which is not an actual copying of the tree. The node duplicate operator now copies selected nodes itself. 2011-02-11 09:37:58 +00:00
Lukas Toenne
9fea58ca91 Made group label callback function static. 2011-02-11 07:46:06 +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
37f55ec194 Group node type info is now also initialized with helper functions. 2011-02-08 09:14:18 +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
5c421c328e Todo/feature request
When using masks or other simple 3D elements in composites, doing
a layer re-rendering on a node is a bit clumsy all the time.

This commit does two things to help:
- new hotkey "Z" in node editor automatically finds render layer
  that changed and re-renders it + composites
- option "Auto Render" does same, but then after every transform
  edit in 3D window

The latter is experimental; real & proper system for this requires
full threaded render support (like previews). But it works!

Demo file:
http://download.blender.org/demo/test/auto_composite.blend

Important fix:
After any render, all the render layers were tagged "changed", which
caused any edit to first totally recomposte everthing. Now it only
composites changes.

Implementation notes

- DAG scene flush now sets 'changed' flags in render layer nodes
- Added notifier for 'transform finished' to trigger the update,
  this is temporarily.
2011-02-07 16:41:57 +00:00
Lukas Toenne
2070356a32 A simplified way of defining bNodeType structs. Instead of doing full struct member initialization for each node, this uses a couple of helper functions now. This will make it easier to change and extend the bNodeSocket interface in the future. Two examples (normal and mapping shader nodes) included, the rest should be converted too. 2011-02-07 09:33:36 +00:00
c0e74f9dce fix [#25748] Addons register parameters/functions more than once
- values were added to both the classes __dict__ as well as the internal StructRNA.
- made properties available from the type since this is where the python api assigns them:
>>> bpy.types.Scene.frame_start
<bpy_struct, IntProperty("frame_start")>
- rename RNA_struct_type_properties() -> RNA_struct_type_properties(), added RNA_struct_type_find_property()
2011-01-25 06:54:57 +00:00
Lukas Toenne
bee3d78393 Added a check in nodeGroupVerify to detect if a tree is actually a group tree. This is necessary to avoid the group-in-group error if the function is called for a tree that already contains group nodes. 2011-01-18 13:28:18 +00:00
4b7930dbbd Bugfix #25681
Python API allowed to make links with input->output reversed.
Now node api checks for this case and flips order.
2011-01-17 15:16:08 +00:00
39e7848ca1 fix for using freed memory with animation/group/ungroup code. 2011-01-08 11:08:51 +00:00
89c9aaaa25 remove references to BKE_utildefines where its not needed.
- move GS() define into DNA_ID.h
- add BLI_utildefines as an automatic include with makesrna generated files.
2011-01-07 19:18:31 +00:00
2ad8175597 Todo: Material nodes
- On each re-render, the node image was cleared. Skipping this gives
  nicer pictures
- Node render was using AA, but unfortunately only 1 sample for Nodes
  is being stored. Disable AA render for now, nice speedup too.
2011-01-03 15:50:08 +00:00
32b23b2b82 Bugfix [#24163] (PART 2) Unable to animate INSIDE a group node in the
compositor

Now ungrouping grouped-nodes copies the animation back to the main
nodetree. This means that it is now possible to successfully roundtrip
group/un-group nodes and their animation data.

---

This should also be done for the Separate Armature operator... hmm...
2010-12-29 12:18:59 +00:00
92172b779e Bugfix [#24163] Unable to animate INSIDE a group node in the
compositor

This commit fixes the original bug reported here by adding some
methods to move the relevant F-Curves (and drivers) over to the new
Node-Tree's (i.e. group-node) AnimData. Animated nodes which
subsequently get grouped will still be able to animate as a result of
this commit.

TODO's:
- Ungrouping now will not yet merge the animation back (or at least
copy it)
- Buttons for nodes freshly grouped do not correctly show animated
status indicators for some reason, yet normal animation does
2010-12-29 11:51:53 +00:00
b2be78c0cc Bugfix #25392
Compositor: Texture node didn't use texture-nodes itself.
Now composites initialize texture nodes correctly.

Also reviewed the fix for crashing texture nodes for displace.
It appears texture nodes also are used for sculpt/paint 
brushes, in these cases it can be allowed again. But, don't
do this during rendering for now!
2010-12-27 19:26:38 +00:00
97197b54cf Bugfix #25309
Code cleanup to allow switching active output nodes in Compositor
made shader nodes output not set correctly.

Now you can have multiple output nodes in shaders too, and switch
on click-activate.
2010-12-20 11:08:29 +00:00
b8e47fd160 Bugfix #25301
Preview render for node shaders broke, caused by localizing 
materials last week, to prevent thread crashes. Fixed now.
Also added a temp fix to draw color-management corrected
node previews default. Will follow scene setting tomorrow.

Also: SSS in nodes doesn't render yet. Was issue in 2.4 too...
2010-12-19 20:12:12 +00:00
d3f9b0d05a Bugfix #25049: Compositing Nodes not Keyframable
An error seems to have been introduced to the node-tree building at some point, which means that the ID-type for data-attached node trees was incorrect (i.e. scene->nodetree->id.name = NTREE_COMPOSIT instead of ID_NT). 

This in turn meant that the ID AnimData availability poll would fail, as the ID-type could not be determined.
2010-12-07 10:15:09 +00:00
fa4bbbb249 Maintenance,
- remove some redundant declarations
- changed VertexTangent and Path structs to avoid compiler alignment padding.
2010-12-04 13:00:28 +00:00
263830f000 Enabled GCC -Wwrite-strings warning for CMake and replaced many 'char's for 'const char's,.
Only one functional change where Transform orientations passed "" to BIF_createTransformOrientation() which could then have the value written into.
2010-12-03 17:05:21 +00:00
cfc1b133f6 updates to patch from Dan Eicher, allow adding a NodeGroup through bpy.data.node_groups.new(name, type)
made some minor changes.
2010-12-03 03:44:39 +00:00
b7d0715284 Bugfix #24953
Compositor: If scene render size changed, a Texture node didn't get tagged
to re-render, using previous size instead.
2010-11-28 16:36:36 +00:00
7a62c05204 bugfix [#24403] Object.copy() duplicates armature action
now duplicating ID data wont duplicate actions by default and the user preference is used with duplicate operators.
2010-11-09 09:53:17 +00:00
5d7ed88f17 Fix #24436: GLSL + Node material gives wrong color. 2010-11-02 12:18:49 +00:00
0876fce009 rename and negate DISABLE_PYTHON --> WITH_PYTHON 2010-10-31 04:11:39 +00:00
9862157087 fix for fix [#24344] crash on adding new image when composite is open and there is no Nodetree
also use const prefix in solidify modifier where possible.
2010-10-21 04:21:09 +00:00
9aa2bde26b Most likely fix for #23420: viewer node: loses viewer nodes forever.
Related to another bug fixed recently, both viewer + split viewer
could be set to output to the same image. That also could make node
tree localization/sync go wrong.
2010-10-02 14:32:03 +00:00
734b7b969d Fix #23932: compositing nodes with viewer and split viewer node could
crash, with two threads writing to the same image.
2010-10-01 21:56:36 +00:00
bd5a62cfcb bugfix [#23068] Image editor: Update Automatically not updating the compositor.
[#23637] Replacing an image used in the compositor crashes
       [#23343] changes in images doesn't update compositor image nodes
2010-09-13 06:08:26 +00:00
0bab23633a remove inline loops in a few places
replace with defgroup_find_name() and BLI_findstring()
2010-08-22 14:15:28 +00:00
d1759639dc - remove unused includes IMB_*, BIF_* & MEM_*
- remove MEM_guardedalloc.h from header files (include directly)
2010-08-16 05:46:10 +00:00
9ce2086506 Fix #23111: file Output node not working when inside a group. 2010-08-13 10:20:40 +00:00
8c75853bb6 bugfix [#23164] Copied Scene Nodes!
copying a scene would still have nodes point back to the old scene which would crash (in some cases) or break rendering.
2010-08-05 10:50:38 +00:00
3840b0c206 Fix #22869: procedural compositing buffers from texture nodes were not restored
correct between localize/merge, bugfix for #21727 only did it one way.
2010-08-04 15:51:52 +00:00
449f8ce4fe bugfix [#22859] Multi-user images cant be made into single user in texure panel.
turns out this isnt exactly a bug since support was never written for this but may as well support it.
now rna/py can do image.copy() too.
2010-07-30 06:09:23 +00:00
4596588fe8 - avoid divide by zero with node progress
- write_crash_blend() was writing to the original path.
2010-06-23 15:07:20 +00:00
6e92ddf8b3 Progress indicators for threaded jobs
Now, rather than the bit-too-alarming stop sign, threaded wmJobs 
display a progress indicator in the header. This is an optional feature
for each job type and still uses the same hardcoded ui template
(could use further work here...).

Currently implemented for:
Render - parts completed, then nodes comped
Compositor - nodes comped
Fluid Sim - frames simulated
Texture Bake - faces baked

Example: http://mke3.net/blender/devel/2.5/progress.mov
2010-05-27 08:22:16 +00:00
9db7f4122d fix for crash on loading some nodes. 2010-04-28 18:13:03 +00:00
8616d22dc3 Fix [#21727] texture in compositor quickly results in crash
Hopefully this is correct - looks like the CompBuf->node pointer was getting left
out of the per-thread copying/localisation.
2010-03-31 05:44:21 +00:00
083b11f3c3 fix for mistake in own recent commit.
(commit 27690 by Campbell from render25 branch)
2010-03-23 16:17:27 +00:00
9ca5243df8 workaround for compositor threading copying actions every time.
(commit 27684 by Campbell from render25 branch)
2010-03-23 15:34:07 +00:00