- use the scene context for the unit settings since there isn't a better place for it currently.
- added 'chain' to imperial units
- set more rna props to be distances and angles.
- All of this is in python and easy to change.
- each panel class has a set() of compatible engines.
- this set is checked for the poll function
- external engines can add themselves to this panels compatible engines
eg.
buttons_world.WORLD_PT_mist.COMPAT_ENGINES.add('POVRAY_RENDER')
I tried doing this by subclassing each panel and replacing only the poll function to reference 'POVRAY_RENDER' but it became fairly complicated and meant registering many of the same panels under different names.
Added mist support to povray.
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.
* Top header now has an engine menu, to choose between the blender
render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
only properties that work in the game engine, and similarly for
the render engine.
* Moved panels from the logic space and game tabs to the physics,
scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
specific too, to better show what is supported.
This adds a RenderEngine type to RNA, which can be subclassed
in python (c++ will follow once we support subclassing there).
It's very basic, but plugs into the pipeline nicely. Two example
scripts:
http://www.pasteall.org/6635/pythonhttp://www.pasteall.org/6636/python
Issues:
* Render runs in a separate thread, and there is unrestricted
access, so it's possible to crash blender with unsafe access.
* Save buffers and full sample are not supported yet.
* Revert lamp sampling/buffers change. The right enum items should
be defined in RNA, not the layout, so that it works in outliner,
python api too.
* Also changed type popup to radio buttons again, and removed the
icons. This is more consistent, and I don't think it's a good idea
to start using icons for these things, too much clutter.
* Replace Mesh with Normals panel in the mesh buttons.
* Remove Material panel from mesh buttons.
* Added name fields for shape/vgroup/vcol/uv.
* Spacing tweak to Object and Bone names.
* Fix some naming conflicts in RNA, with "name" and "type" properties
being defined twice in the same struct.
* context.scene.tool_settings -> context.tool_settings.
Changed order of panels in scene buttons to better follow order of importance, putting the post-processing options further down.
Cleaned up game physics properties
this works for the calling operators from python and using the RNA api.
bpy.ops.CONSOLE_exec() is now bpy.ops.console.exec()
eg.
split.itemO("PARTICLE_OT_editable_set", text="Free Edit") becomes... split.itemO("particle.editable_set", text="Free Edit")
For now any operator thats called checks if its missing _OT_ and assumes its python syntax and converts it before doing the lookup.
bpy.ops is a python class in release/ui/bpy_ops.py which does the fake submodules and conversion, the C operator api is at bpy.__ops__
personally Id still rather rename C id-names not to contain the _OT_ text which would avoid the conversion, its called a lot since the UI has to convert the operators.
- 1st stage: Linear Workflow
This implements automatic linear workflow in Blender's renderer. With the
new Colour Management option on in the Render buttons, all inputs to the
renderer and compositor are converted to linear colour space before
rendering, and gamma corrected afterwards. In essence, this makes all
manual gamma correction with nodes, etc unnecessary, since it's done
automatically through the pipeline.
It's all explained much better in the notes/doc here, so please have a look:
http://wiki.blender.org/index.php/Dev:Source/Blender/Architecture/Colour_Management
And an example of the sort of difference it makes:
http://mke3.net/blender/devel/rendering/b25_colormanagement_test01.jpg
This also enables Colour Management in the default B.blend, and changes the
default lamp falloff to inverse square, which is more correct, and much
easier to use now it's all gamma corrected properly.
Next step is to look into profiles/soft proofing for the compositor.
Thanks to brecht for reviewing and fixing some oversights!
* Some changes to make lamp and world textures editing work.
You may have to click on another texture slot once before
being able to add a texture, and the layout is messy. Added
this so lightenv project isn't blocked by this being missing.
* Adding a new material slot now doesn't create a new material
anymore, to avoid creating unused materials.
* Tiny changes to scene/object buttons.
* Added Relations panel with layers, pass_index, parent.
* Groups panel now can do add to group/remove from group.
* Parent, parent type, track are now editable.
* Separate constraint add operator for object and bones.
* Texture -> renamed 'no rgb' to 'rgb to intensity' (btw it's not just for
image textures )
* Render -> stamp closed by default - not taking effect, because saved in
.B.blend. How do we fix this?
* Material -> removed 'Buffer Bias' dependency - it's for receiving shadows,
not casting them
* Material -> Ray Shadow bias renamed 'Auto Ray bias' - switches between an
automatically calculated value vs the specified value
* UI layout for scene buttons has quite some changes, I tried to
better organize things according to the pipeline, and also showing
important properties by default, and collapsing less important ones.
Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
do something when there is a node tree using nodes, or a strip in the
sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
but still using FFMPEG. Unfortunately Ogg is broken at the moment
(also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
it work.
* Organized file format menu by image/movie types.
Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.
Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
* Context panel now draws without header, with arrows, no scene name.
* Softbody vertex group search popup.
* Improve names for autogenerated shortcut keys in menus.
* Make most Select menus in the 3D view header work.
* Fix armature border select selection syncing.
* Add POSE_OT_select_constraint_target,
MESH_OT_select_by_number_vertices, MESH_OT_select_vertex_path.
* Merge mesh select similar into one operator.
* Don't give MESH_OT_select_random Space hotkey.
* Add DAG_object_flush_update to many mesh edit tools, not calling this
will crash with modifiers.
* RNA_def_enum_funcs for dynamic enums in operators, but not very useful
without context yet.
* Fix refresh issue with image window header + editmode.
* Fix drawing of shadow mesh for image painting.
* Remove deprecated uiDefMenuButO and uiDefMenuSep functions.
* Remove keyval.c, code is in wm_keymap.c already.
* Rename WM_operator_redo to WM_operator_props_popup.
* Added more material buttons by William. Thanks.
I made some minor adjustments and added Specular Shader Model RNA.
* Code cleanup and some consistency tweaks of button files.
Notes: Preview render now only shows up when there is an active world, material, texture or lamp.
* Made sure initial panels with ID Datablocks are shown, even when no block is active.
...is the same as
elif rd.file_format in "OPENEXR": # ("OPENEXR",) <- syntax for a single tuple
At the moment its using pythons syntax for a string search which works but isnt whats intended. Replaced in with ==
(Also use '' for enums rather then "")
* Added panels with dummy preview template.
* Added constraints panel for bones next to objects, though it
doesn't work that well yet, the operators and code need to be
changed so they don't assume it is one or the other in/out
of posemode.
* Added some graying out in the scene and world buttons.
note: The new 'Toggle' options in the UI api should be
avoided for normal text buttons, and used sparingly
otherwise. We want to avoid having two inconsistent
appearances for the same type of buttons.
Simple UI script fix, wanted to check... works all nice. :)
For ui scripters: keep track of alignment flags!
("Border" button was aligned with above button)
* Buttons are now created first, and after that the layout is computed.
This means the layout engine now works at button level, and makes it
easier to write templates. Otherwise you had to store all info and
create the buttons later.
* Added interface_templates.c as a separate file to put templates in.
These can contain regular buttons, and can be put in a Free layout,
which means you can specify manual coordinates, but still get nested
correct inside other layouts.
* API was changed to allow better nesting. Previously items were added
in the last added layout specifier, i.e. one level up in the layout
hierarchy. This doesn't work well in always, so now when creating things
like rows or columns it always returns a layout which you have to add
the items in. All py scripts were updated to follow this.
* Computing the layout now goes in two passes, first estimating the
required width/height of all nested layouts, and then in the second
pass using the results of that to decide on the actual locations.
* Enum and array buttons now follow the direction of the layout, i.e.
they are vertical or horizontal depending if they are in a column or row.
* Color properties now get a color picker, and only get the additional
RGB sliders with Expand=True.
* File/directory string properties now get a button next to them for
opening the file browse, though this is not implemented yet.
* Layout items can now be aligned, set align=True when creating a column,
row, etc.
* Buttons now get a minimum width of one icon (avoids squashing icon
buttons).
* Moved some more space variables into Style.
After quite a bit of searching, I finally found where the various UI functions were wrapped for use in Py Layouts.
For the reference of others, check out editors/interface/interface_api.c