Commit Graph

75 Commits

Author SHA1 Message Date
0e935e397b * Displacement baking wasnt working with negative distances.
* Added Normalize option for diplacement so everything in the 'Dist' range is mapped 0-1
* Increased the maximum Dist and Bias to1000.0 (was 10.0)
* Added python utility function in BPyRender.py - bakeToPlane(...), to automate heightmap, normalmap generation for Crystalspace.
2008-02-22 14:27:46 +00:00
4dbf6cf204 adding access to missing bake variables from python 2008-02-22 10:50:45 +00:00
7c7a931fed made auto threads default (noob's get faster renders in their dual core CPU's)
changed env variable check order $TMP, $TMPDIR - aparently $TMP is more common.
2008-02-21 08:43:13 +00:00
4c0b33ef80 Python Bugfix
A new file could have its Blender.Get("filename") return "<memory>" after undo'ing on an open file.
Fix for own error with python sys.path, messed up game engine.
2008-02-20 18:56:07 +00:00
417687c4ff Bugfix: yafray number of processors was not properly initialized, and
could be 0, hanging yafray. This commits removes the separate yafray
number of processor setting and simply using the blender threads
button, there is no reason for a separate setting.
2008-02-17 22:11:05 +00:00
3974a0a3c1 Added python access for baking
http://www.blender.org/documentation/246PythonDoc/
http://www.blender.org/documentation/246PythonDoc/Render.RenderData-class.html
http://www.blender.org/documentation/246PythonDoc/bpy_api_2_46.zip
2008-02-12 14:47:55 +00:00
37d139ea54 This is patch: [#8228] Add MultiLayer image type to python and batch rendering
Submitted By: Stephane SOPPERA (soppera)

Also fixes a small typo with wrong filetype for TIFF commandline rendering.

Kent
2008-02-05 19:31:21 +00:00
Ken Hughes
87fbe307a1 Python API
----------
renderData.removeRenderLayer() was not returning a Python object; make it
return None;
2008-02-03 01:30:15 +00:00
b115bd677b some bugs with previous renderlayer api 2008-01-28 00:07:59 +00:00
5e512afa0a renderLayer access for the render api, no epydocs yet 2008-01-27 22:22:41 +00:00
78cedbd1f9 added function to get the full path for a rendered frame (before its rendered) 2008-01-26 15:38:06 +00:00
c089564faf openexr, touch and noOverwrite setting access from py api 2008-01-23 14:15:34 +00:00
f417989871 Made it so locked strips inside metastrips are transformed.
Removed FTYPE from render output panel - was some old format that did index colors, and wasn't even used anywhere.

Added 2 options to the render output panel that can be used for a really basic local renderfarm (even artists can use it!),
"NoOverwrite" and "Touch"
When both are enabled, rendering 1 scene between many pc's on a fast network will populate the directory with frames.
Also useful to delete frames that have errors and re-render (without manually re-rendering each frame)
2008-01-20 17:53:58 +00:00
Ken Hughes
f41c3340be Python API
----------
Added RenderData.activeLayer attribute, lets user access the active
rendering layer.  Also corrected description of RenderData.freeImages
attribute.

Note: doesn't seem like there is any support in the python API for accessing
the renderlayers settings....
2008-01-16 03:02:54 +00:00
5dfef1ae35 Reverting to 2_2x BPY
I was careful in selectively rolling back revisions, but if you've committed changes unrelated to BPY mixed with BPY changes, I might have reverted those too, so please double check.
2007-12-17 20:21:06 +00:00
9723e3ef39 miscellaneous edits from python development branch merged back into trunk 2007-12-07 09:51:02 +00:00
Ken Hughes
135b16662d Python API
----------
Document Peter's fps_base attribute for scene rendering objects; also remove
framesPerSecBase() method (preference is to add only attributes, and he did
add fps_base attribute).
2007-10-26 19:53:55 +00:00
a0390e5cc3 == Core ==
This adds fractional FPS support to blender and should finally
make NTSC work correctly.

NTSC has an FPS of 30.0/1.001 which is approximately 29.97 FPS.
Therefore, it is not enough to simply make frs_sec a float, since
you can't represent this accurately enough. 
I added a seperate variable frs_sec_base and FPS is now 
frs_sec / frs_sec_base.

I changed all the places, where frs_sec was used to my best knowledge.

For convenience sake, I added several macros, that should make life
easier in the future:

FRA2TIME(a) : convert frame number to a double precision time in seconds
TIME2FRA(a) : the same in the opposite direction
FPS         : return current FPS as a double precision number 
              (last resort)

This closes bug #6715 
Standard framerates not supported / breaks sync -- 23.967 29.967 etc.

https://projects.blender.org/tracker/?func=detail&aid=6715&group_id=9&atid=125

Please give this heavy testing with NTSC files, quicktime in/export
and the python interface.
Errors are most probably only spotted on longer timelines, so that is
also important.

The patch was tested by Troy Sobotka and me, so it most probably should
work out of the box, but wider testing is important, since errors are
very subtle.

Enjoy!
2007-10-21 15:42:08 +00:00
39e4dc6202 replace PyInt_CheckExact with PyInt_Check, same for floats and strings so subclass and C/subtypes work.
was reported as a bug a while ago.
2007-07-01 05:41:23 +00:00
25baab252c yafray settings access from Py API 2007-06-06 19:12:07 +00:00
afdd54fa37 moved source and text to american spelling
* colour -> color
* centre -> center
* normalise -> normalize
* modelling -> modeling
2007-04-04 13:18:41 +00:00
52e43441d1 removed unneeded dealloc functions 2007-03-15 01:47:53 +00:00
ee5dc4d0bf removed duplicate functionality, macro's and functions existed to check a PyObjects type, now only use macro's 2007-03-15 01:09:14 +00:00
dcc834f3fa updated render settings to support recent changes.
options like saveBuffers are available from Python and threads can be set from 1 to 8
usefull for python based renderfarms.
2007-01-30 03:02:58 +00:00
33e8d4b3e2 Made scene.currentFrame(val) call scene_update_for_newframe if the scene being modified was G.scene
Before this, calling scene.currentFrame(val) would not work to update object displists where Blender.Set('curframe', val) did work.
Also used less python BuildValue calls.
2007-01-22 03:59:52 +00:00
38375784df [ #4786 ] if space in the Application path name, system() doesn't work on some platforms
commited temporary fix: executable name is quoted for all platforms except Windows now,
nicely wrapped in #ifdefs. Will be doing nice wrapper function BLI_system for system calls in blenlib
after release.
Please test on all platforms!
2007-01-20 08:01:56 +00:00
2e66b143f3 - Added panel for Bake render (tabbed now in 'anim' panel).
(Empty space will get OSA options, that I add tomorrow or so)

- Removed a lot of old unused variables in renderdata. Also meant I had
  to remove this from python API... please check if this gives valid
  scripts?

- Cleaned up bad formatted code for FFMPG buttons (spaces instead of tabs)
2007-01-09 11:10:12 +00:00
253432bfc7 The Big Image refactor!
Please read:
http://www.blender3d.org/cms/Imaging.834.0.html

Or in short:

- adding MultiLayer Image support
- recoded entire Image API
- better integration of movie/sequence Images

Was a whole load of work... went down for a week to do this. So, will need
a lot of testing! Will be in irc all evening.
2006-12-20 17:57:56 +00:00
Alexander Ewering
314b7adc17 Uncommitted my potential fix for
http://projects.blender.org/tracker/index.php?func=detail&aid=4786&group_id=9&atid=125

It seems like you can't quote the executable path on win32 using system().

So, playing back a rendered animation now works again on win32, however,
the bug remains... no idea how to correct it.
2006-11-25 14:53:31 +00:00
Alexander Ewering
a94925809b Bugfix for:
http://projects.blender.org/tracker/index.php?func=detail&aid=4786&group_id=9&atid=125

If the path to Blender contained whitespace, various places which called
the Blender executable wouldn't run. Now the path to the executable
should be quoted correctly everywhere.

If this breaks anything on other platforms, please shout :)
2006-11-18 01:45:47 +00:00
7440aba482 Compositor: finished work on node "File Output".
- It saves a file with indicated type on each change, with number
  appended denoting the current frame (like ANIM saving).
- Output filename button supports relative paths ("//")
- Shows optional preview image too
- For now, added a print on each file save as feedback

To make this option work nicely, changed the BKE_makepicstring() function
to have less globals inside, so it is more generic. Todo: allow amount of
digits in filenames to be set (to support files like tmp_123456.jpg)
2006-08-10 10:38:50 +00:00
Ken Hughes
e6f4bd6baf ===Python API===
Plumiferos request: added sceneRender.set attribute, which give access
to the Render "Set" link for scenes.  Always wondered what that button
was for.
2006-07-04 00:08:40 +00:00
Ken Hughes
8400859f64 ===Python API===
Change to displayMode attribute to support the new render window options, and
correct description in the documentation.
2006-06-16 14:40:26 +00:00
bad72cec61 New feature! (Well, replacement for the exisiting cumbersome "DispView")
Next to the "DispWindow" there are now two new choices:

- Display render output to Image Editor
- Display render output to Screen-sized Image Editor

Both options won't open a 2nd window anymore, which makes work quite more
smooth even, especially because 'focus' isn't lost. Further it fits in the
'single window UI' paradigm of Blender. Should have been done 10 years ago!

Lastly it might bypass issues with X11... having 2 windows with opengl
context is not always stable in Linux.

This option uses an identical trick as for the Compositor viewer, using an
Image block with a fixed name ("Render Result").

The flow, when invoking a Render, goes as follows:
- first it checks if there's an Image Editor visible displaying the "Render
  Result", if so then it uses that area-window.
   (Use this option for dual-monitor setups for example, a render will always
   go to the same location then)
- else it checks if there's an Image Editor open in general, it then
  assigns that window the "Render Result" Image.
- else: it searches for the largest Area in the screen, and turns that into
  a temporal Image Editor showing render output.

After a render, an ESC will push back the former view, if the Area type has
changed.

Same rules apply for the "Full Screen" option. Here an ESC will always go
back to the regular Screen, and restore Area type if required.

While rendering, the queue for the renderwindow isn't handled yet, so you can
not zoom (nor get full redraws), as for the regular render window.

Existing conflicts:
- in FaceSelect mode, the Image editor enforces to display the face texture
  after rendering again.
- when using an Image window for compositing, you'll lose the Viewer output
  on a render.

Implementation note:
While rendering updates, nothing is drawn in frontbuffer anymore. That's
good news for b0rked OpenGL drivers (and faster). However, for the few
OpenGL cards that don't do a "swap copy" but a "swap exchange" you get
issues... has to be worked on. I'm afraid we have to drop frontbuffer
drawing altogether.

Other fixes:

- Hotkeys NumPad 1, 2, 4, 8 will set zoom levels (was half coded only?)
  Use SHIFT to zoom out (smaller).

- Rendering Tile updates still had draw errors on edges of tiles, in OSA
  only. (Caused by commit 4 days ago)
2006-06-12 14:39:08 +00:00
bc263b1e84 ==render by parts==
made xparts and yparts consistent in the different places it can be set now python and the buttons are max 64 (was 512 in some python locations) and xparts is max 512 (was max 64 in some python locations), also made the minimum xparts and yparts 1 again.  Ed Halley suggests that we should up the max xparts to 1024 (instead of the current 512) for 'smoother panoramas'
2006-05-31 22:56:22 +00:00
Ken Hughes
263771fc1c ===Python API===
Removed "#if 0" conditionals of future code which were causing compiler
problems on some platforms.
2006-05-30 13:09:51 +00:00
Ken Hughes
a74472014d ===Python API===
Second pass at sceneRender.c / Scene.Render API clean-up.  Most of the remaining clean-up needs to wait for the API refactor, since the "good" attribute names are already used by methods.
2006-05-29 17:14:05 +00:00
Ken Hughes
d7a21ed220 ===Python API===
First pass at sceneRender.c / Scene.Render API clean-up.  Mainly implementing
attribute via tp_getset, but a few new features too.
2006-05-29 05:01:07 +00:00
dee16b9e3d * bug fix
[ #4228 ] Blender.Image.Load(filename) loads only on the first loading
- Image.Load() will now reload the image buffer when a image of the same name is loaded again
- small textual change in render code
2006-05-26 15:28:04 +00:00
2132bbb621 *python fix
- save_rendered_image_cb_real has a popup window embedded in it that prevents automation through python as a result python scripts would get a popup which is ignorned by the script
- modified so python scripts overwrite the image by default
2006-05-25 21:34:00 +00:00
2a6952f386 - bug fix
* C uses braces unlike python :/
2006-05-25 21:13:13 +00:00
1b577b7f0d *python documention & bug fix
- added documentation to Render - saveRenderedImage has an option to save the zbuffer along with the image
(off by default)
- fixed a really annoying runtime error of uninitialized data being passed to a method in pipeline.c during a render
2006-05-25 21:10:28 +00:00
af87c651a5 *python fix
- fixed Render.saveRenderedImage() so now it works once again
(it was broken since render refactor)
2006-05-25 20:47:17 +00:00
5f571e4ded ==Bugfix==
Made the frame boost from short to int (30000 -> 300000 frames) complete
by walking through the source and finally changing all frame-variables
to ints.

This should finally fix the framecounter warp around seen in some buttons.

If you step on any further problems that may arise starting from frame
32768 please just give me a hint and I'll fix it.

(Sorry about that, didn't know enough about Blender, when I did it the first
time...)
2006-05-06 15:26:53 +00:00
Ken Hughes
139c190605 ===Python API===
Added render.getRenderWinSize() method, to complement render.setRenderWinSize()
2006-04-27 20:24:27 +00:00
87949e5c67 warnings cleanup for the python project on windows 2006-04-24 15:09:07 +00:00
Ken Hughes
4fcd19013b Fix various gcc warnings. 2006-03-19 20:45:50 +00:00
f68b0ddb2a Recoded Panorama rendering.
The old implementation was added quite hackish (talking about 10 yr ago).
You also had to make a small image slice, which was extended Xparts in
size. That also required to adjust the camera angle. Very clumsy.

Now; when enabling the Panorama option, it will automatically apply the
panorama effect on the vertically aligned tiles. You can just enable or
disable the "Pano" button, to get a subtle lens effect like this:

(without pano)
http://www.blender.org/bf/rt.jpg
(with pano)
http://www.blender.org/bf/rt1.jpg

For Panorama render, the minimum slice size has been hardcoded to be 8
pixels. The XParts button goes up to 512 to allow that. In practice,
rendering 64 slices will already give very good images for a wide angle
lens of 90 degrees, the curvature of straight lines then is equal to
a circle of 256 points.
Rendering a full 360 degree panorama you do by creating an extreme wide
angle camera. The theory says camera-lens 5 should do 360 degrees, but
for some reason my tests reveil it's 5.1... there's a rounding error
somewhere, maybe related to the clipping plane start? Will look at that
later. :)

Also note that for each Xpart slice, the entire database needs to be
rotated around camera to correct for panorama, on huge scenes that might
give some overhead.

Threaded render goes fine for Panorama too, but it can only render the
vertically aligned parts in parallel. For the next panorama slice it has
to wait for all threads of the current slice to be ready.

On reading old files, I convert the settings to match as closely as
possible the new situation.
Since I cannot bump up the version #, the code detects for old panorama
by checking for the image size. If image width is smaller than height, it
assumes it's an old file (only if Panoroma option was set).
2006-02-27 12:39:36 +00:00
3fe6fca3f6 additions to make the orange rendering preparation script work, sorry undocumented again (we are testing this now and gotta commit to get this to other compus at studio, Stivs make a note to bug me about the doc or someone add it.. :o) 2006-02-07 18:33:01 +00:00
680756393a - Header changes to support hdaudio, memcache limitor and framecount boost. 2006-02-05 19:36:32 +00:00