Commit Graph

60 Commits

Author SHA1 Message Date
18afcbcb7d bugfix #26267
ImageWindow + 3D view texture paint + texture preview render + texture nodes.
Threading hell! But it works now :)
2011-03-03 18:53:07 +00:00
Nathan Letwory
95100afc12 doxygen: blender/editors tagged. 2011-02-27 20:29:51 +00:00
38bd8dcf05 Bugfix #26221
Two bugs in one:

- Lukas commit monday for new group/socket handling accidentally removed
  to set socketype in stacks, which as used by (texture) nodes to detect
  whether value, color or vector had to be read.
  Result was that all texture nodes were rendering as B&W

- Old 2.5 bug: preview renders for texture nodes didn't call a 
  NodeEndExec function, which gave crashes on deleting nodes.

The change in interface_hanlers.c is only a comment to explain
how keymaps are being found.
2011-02-26 13:53:15 +00:00
d7bee4ce2c bugfix [#26156] Opening .blend files through OS ignores "Load UI" flag 2011-02-21 02:40:48 +00:00
2ef296dc4c bugfix [#26118] Getting 'Error Totblock' when using sub-properties from a PointerProperty
blender wasnt freeing ID-Properties when freeing the material copy.
Checked that this isnt a problem for other preview types - texture/world/lamp.
2011-02-21 02:07:26 +00:00
8f21a43535 split BKE_utildefines.h, now it only has blender specific defines like GS() MAKE_ID, FILE_MAXDIR, moved the generic defines to BLI_utildefines.h.
no functional changes.
2011-01-07 18:36:47 +00:00
b067a85aa3 Todo item:
Object color option now is incorporated in preview render, and
in display in 3D window.

Note that Object-color is "modulating" the render result, it just
multiplies... which is very limited for practical use. This was
added for Apricot game project. The original meaning however was
to replace diffuse only... so specular and light work still correct.

ALso made header for properties editor start on top, to reflect
default (report in tracker).
2011-01-05 15:10:35 +00:00
5db20b512e Todo item:
New option to start threaded wmJobs, with flag WM_JOB_SUSPEND.
This makes the job wait 1 timer step before running. 

Used now for Material Icon render renders, which makes the
big preview to be always rendered first while using UI.
2011-01-04 14:59:55 +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
22b97743ef avoid int/float comparisons within a number of for loops in deep shadow map compression.
gives minor overall speedup.
2011-01-03 06:13:50 +00:00
05cfe50436 Bugfix #25446 (and todo item)
The icons for materials were always lagging or not updating
at all. I also found it suspicious slow... 
It appeared that the icons now store a "mip level", where for
every change in Materials 2 render jobs for icons were started,
one for 32x32 pix, one for 96x96. The latter was cancelling out
the first job almost always.

Also made preview renders detect size, to set amount of tiles
to be rendered. Small icons use 1 part, larger previews 16 now.

All in all, behaves much smoother now! But, will also update
the thread Jobs manager to allow "delayed jobs" like for icons,
these are aggressively put as first in the jobs list.
2011-01-02 19:46:32 +00:00
6b1258f5b8 Bugfix #25301
Material Node trees:
SSS wasn't displaying in Nodes.

Implementation notes:
- Currently copying local data for preview render, only copies
  the base material. Node materials are re-used.
- This causes data to be in 2 "main" databases... complex.
- To make it work for preview, I had to add another loop in the
  SSS code that checks the original Main dbase. That's marked
  as warning in code to be fixed up.

Another bug:
- Material properties "SSS presets" copied settings to the
  active material, not to the displayed one. Added RNA call 
  to retrieve this from Objects.

(Next commit will fix preset scripts)
2010-12-20 13:02:33 +00:00
88b2955564 Bugfix #25307
Node shaders + textures, showing in Texture properties, with option
"show both previews" had bad ID checking.
2010-12-20 11:33:52 +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
7507a5f959 Bugfix #25288
SSS preview render didn't happy.
Was caused by using a Material copy for preview renders (to prevent
crashing in other cases). There were actually 2 errors:
- material copy should be added to preview-main database
- the render was invoked using wrong main database even!
2010-12-19 11:39:55 +00:00
52edaae9c5 Bugfix #20565
Material Node shaders: displaying GLSL + rendering previews crashed.
Reason was non-safe threaded access to material nodes. Now, on a preview
render, a full copy of Material is being made.
2010-12-03 14:26:03 +00:00
cd97253502 - added GCC warning -Wstrict-prototypes
- fixed bug in paste material, exposed by stricter warnings.
- removed/renamed various shadowed vars.
- removed BGE lamp.colour, only allow lamp.color attribute.
2010-12-03 12:30:59 +00:00
b45c3363fd fix for some pedantic warnings. 2010-12-03 01:52:28 +00:00
ce2295999e use zero initializers instead of memset(), also change PointerRNA_NULL from an extern into a define. 2010-11-23 08:44:21 +00:00
4d37cf90b9 remove G.sce, use G.main->name instead.
Both stored the filename of the blend file, but G.sce stored the last opened file.
This will make blender act differently in some cases since a relative path to the last opened file will no longer resolve (which is correct IMHO since that file isnt open and the path might not even be valid anymore).

Tested linking with durian files and rendering to relative paths when no files is loaded however we may need to have some operators give an error if they are used on the default startup.blend.
2010-10-18 06:41:16 +00:00
8268a4be71 most unused arg warnings corrected.
- removed deprecated bitmap arg from IMB_allocImBuf (plugins will need updating).
- mostly tagged UNUSED() since some of these functions look like they may need to have the arguments used later.
2010-10-16 14:32:17 +00:00
77fb06f630 Fix #23350: flip "both" texture preview order from material-texture to
texture-material so it corresponds better to the text below.
2010-08-20 10:17:39 +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
e81df3a6fa Fix #23238: crash rendering multiple scenes from compositor. 2010-08-12 13:58:10 +00:00
8c455e1da8 remove unused includes 2010-08-08 08:33:47 +00:00
708ef64663 include cleanup, no functional changes
- removed DNA_brush_types.h from DNA_scene_types.h (and some other similar cases)
- removed DNA_wave_types.h (never used)
- removed Main.wave
2010-08-04 04:01:27 +00:00
9b006d6d00 Fix preview render crash after recent G.main changes. 2010-08-01 20:36:24 +00:00
5fa7d1c1b4 2.5: code changes to reduce the usage of G.main and pass it along
or get it from the context instead.
2010-08-01 12:47:49 +00:00
ec19c7dffc == Sculpt ==
Fixed brush icons loading slowly

* Changed brush icon property from an enum to a flag that toggles whether a custom file is used for the brush icon
* Changed get_brush_icon to only handle loading external icons, built-ins are handled through the regular icon system
* Modified preview icon drawing to allow built-in icons
* When not using a custom icon, a default icon is selected based on the current tool

TODO:
* Allowing preview to show built-in icons makes the brush texture selector look ugly when nothing is selected. As discussed on IRC though, the nothing-selected state needs to be clarified anyway; I'll address this in another commit
* Use image browser when selecting a custom icon
* Selecting the default icon is ugly (uses the active object's mode), this can be fixed by making brushes know which paint mode they are part of
2010-07-26 04:00:09 +00:00
ba30ac1230 == Sculpt ==
Minor sculpt cleanups

* Moved the (previously extern) declarations of the brush icon data to ED_datafiles.h
* Set sculpt tool RNA to alphabetical order, quite a long list now
2010-07-25 22:05:52 +00:00
015ecdee29 * Polish preset did not enable tablet pressure for strength
* Turned off 'Front-Face Only' for all brushes, it needs more testing
* Added brush icons for other paint modes
* Moved 'tool' panel to bottom of all paint modes
* Moved 'appearance' panel to be next to bottom
* Moved brush selector panel to top of all modes
* Closed all panels except the brush selector panel
* Turned off X symmetry
2010-07-21 00:57:25 +00:00
886ce5a351 * can use file for brush icon
* fixed memory leaks
* moved some of the brush icon code around
* the update of the icon after a change is more responsive
2010-07-20 13:42:27 +00:00
b618a335f5 * Made the default sculpt icons an internal part of the executable
* Default icons can be selected from a menu
* Option to make a custom icon from a file is present but the UI is disabled because of a mysterious crash
* New startup.blend that has the appropriate icons selected
2010-07-20 11:32:30 +00:00
8f825bd460 Fix #21062 and #22175: crash with node previews being calculated while
editing nodes. Now preview jobs are killed before making any node edits.
2010-07-04 19:58:52 +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
23ad9588ad Some fixes from the render branch:
* Take border render into account when drawing grid before for render
  result becomes visible.
* Use antialiasing for rendering icon previews.
* Fix Full Sample not drawing render result while rendering.
* Mesh Deform Modifier: also forgot to commit this file.
2010-04-23 18:02:50 +00:00
07052eb377 Fix for possible null pointer, from uncle entity in irc 2010-04-16 04:44:15 +00:00
9a85013692 Merge various small changes from render branch:
* Division by zero fix for TNT SVD code.
* Sound fix, in case ffmpeg decode fails, don't use the samples.
* Fix for incorrect bounds of transformed objects in new raytracing code.
* Gave memory arena's a name used for allocations for easier memory
  usage debugging.
* Dupligroup no_draw option was using layers but not restrict view/render
  setting. (not a bugfix exactly but would do display list context switching
  while drawing for no reason).
* Fix objects instanced on hair particles not giving consistent results
  when the object is transformed.
* New math functions: madd_v4_v4fl, len_squared_v3v3, interp_v4_v4v4v4,
  mul_v4_m4v4, SH and form factor functions, box_minmax_bounds_m4.
* mul_m4_m4m4 and mul_m3_m3m3 now accept the same pointers for multiple
  arguments.
* endjob callback for WM jobs system.
* Geometry node uv/color layer now has search list/autocomplete.
* Various small buildsystem tweaks, not strictly needed yet in trunk.
2010-04-15 10:28:32 +00:00
2f1385c189 Fix [#21347] no image at node editor
Node preview render wasn't getting the correct test_break callback
2010-04-01 06:30:05 +00:00
7aab31430f External render engines can now render previews as well, disabled by
default, set RenderEngine property bl_preview = True to enable it.
2010-03-28 13:48:11 +00:00
57101c4fd2 Second attempt at committing the different render slot implementation. This
has a fix that hopefully solves the problem on mac/win. Also fixes #21322,
render slots not working well with FSA.
2010-03-27 15:35:34 +00:00
f743b583bf more lint includes
Only source/blender/editors/ dir, should not give errors on different platforms
Only removing:  UI_*.h, ED_*.h, WM_*.h, DNA_*.h, IMB_*.h, RNA_*.h, PIL_*.h
2010-03-23 14:09:09 +00:00
ed076d74ef Rendering from 3d view in local view or with unlocked layer was not
working yet, now layer is passed along to render engine, changes quite
a few files because simple swapping trick no longer works with threading.
2010-03-14 20:24:11 +00:00
1b28081102 Mac + OpenMP + pthreads workaround: recent commit broke compile, just
moved it into threads.c now instead of having it duplicated in various
places.
2010-03-09 16:54:25 +00:00
dd03793f4e OSX : Bugfix [#21293] add OpenMP apple gcc bug workaround for render preview
All openMP calls from a background thread need to have this thread var init workaround
2010-02-22 10:29:49 +00:00
2eeef0ba7b Remove some unfinished code I accidentally commit for render thread safety. 2010-02-17 11:35:20 +00:00
ad01c90ee3 Revert render slots commit for release, I can't find the bug or even redo
it myself, there will still be render slots just old implementation.
2010-02-16 19:24:04 +00:00
2061f91741 Render Slots: change the implementation by moving it from the render to the
image code, this should be clearer and makes reusing the Render struct later
on easier.
2010-02-16 15:49:22 +00:00
081c1205a3 correct fsf address 2010-02-12 13:34:04 +00:00
10240261e9 J-key render switching back, now with 10 slots.
Implementation note: this was done by giving each Render a slot number,
and for every slot a new Render will be created. Not sure if this is
ideal, but it ensures that all passes, render info, etc are separate so
you can also compare render layers and passes, in 2.4x only whatever it
was currently displaying was backed up.
2010-02-09 19:37:37 +00:00