Moved .up() and .down() methods from Modifier API to Modifier sequence
API (also renamed them to moveUp() and moveDown() ). Locating methods
which modify the "parent" structure in objects didn't seem consistent.
Nkey "Properties Panel" now has Dimension ("Dim") buttons too.
This reads from the actual bounding box value to see the size. Note that
dimensions for animated & deformed objects will change per frame.
(Cleaned up buttons layout for patch, and added support for Curve, Text and
Surface objects)
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)
Users can write any valid Python expression (that evals to an int or float) inside Blender's gui number buttons (preceded by #) and have them evaluated to their actual int or float value.
Button Evaluation has access to the same modules as PyDrivers.
For example:
#1.0*9-2.3
#ob("Camera").LocZ
#1.0/ob("Cube").LocX
#math.sin(math.pi) -- or simply #m.sin(m.pi)
etc
Removed recently added Material API methods getRbFriction() and
getRbRestitution(). Erwin had already added attributes rbFriction and
rbRestitution, and current API design goal is to eventualy replace
all getStuff()/setStuff() with attributes.
Added patch by Matt Ebb, that enhances the sequencer GUI in several ways:
- It looks a lot better
- Strip colours are themeable.
- The drawing code is more readable.
- The background of the timeline makes now distinguishing the channels easier
by alternating between different shades of gray.
- Handle-scaling is clamped to min and max-values, making it possible to
grab strips at large zooming levels more easily.
- Preview-images can be panned by dragging it with the middle mouse button.
Home-Key resets the position.
- Since some people can't grab the meaning of "C 0", it is renamed to "Chan: 0"
- Effect strips have slightly different colors to distinguish them better.
Additionally:
- fixed an off by one error in Matt's patch
- Scene-rendering saves CFRA to avoid jumping current-scene on scrub
(might be academic fix, since most likely it only happens if you add
the sequencer-scene to the timeline... But nevertheless it bugs you on
testing the GUI ;-)
Define macros for Py_RETURN_TRUE and Py_RETURN_FALSE (for Python 2.3). Also
make Py_RETURN_NONE macro a little safer. Current macro will not work as
expected in situations like below since it expands to two C statements:
if( !attr )
Py_RETURN_NONE;
addProperty() and removeProperty() were each defined twice, because each
could be called with different inputs. Hence only the second definition
was showing up in the documentation. Both descriptions are merged now.
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'
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.
[ #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
- 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
- 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
Fulfilling a very old feature request: a new Mesh Primitives module is
introduced, which gives script writers access to the Blender mesh datablocks
created from the "Add->Mesh" menu. You can now do this:
from Blender import *
me = Mesh.Primitives.UVsphere(10,20,3) # 10 segments, 20 rings, diameter 3
ob = Object.New('Mesh','mySphere')
ob.link(me)
sc = Scene.GetCurrent()
sc.link(ob)
- added a method Action.getFrameNumbers()
returns the frames at which keyframes were inserted for this action
example usage:
import Blender
myobj = Blender.Object.Get('Armature')
myaction = myobj.getAction()
frames = myaction.getFrameNumbers()
for frame in frames:
print 'bones at frame %d' % frame
myobj.evaluatePose(frame)
pose = myobj.getPose()
for bone in pose.bones.values():
print bone.head, bone.tail
Something to try making import/export script writers happy; Mesh.New() will
not create a new Blender mesh datablock unless the mesh is linked to an
object.
(although it did this one char too 'friendly'), but still happily copying
the string even if it was too long.
Pythoneerz, please check if this is the correct fix :)
- the new methods will advance an object's pose correctly to any frame
Example:
myobj = Blender.Object.Get('obert')
for x in range(10):
myobj.evaluatePose(x)
pose = myobj.getPose()
print 'Data at Frame %d' % x
for bone in pose.bones.values():
print bone.head, bone.tail
print bone.head, bone.tail