* Added Bone Groups UI to 'Armature' context buttons for now. Later, it may be more convenient to have these with bones instead?
* Added operators for the operations that can be performed on these groups. Moved the core adding/removing functions to blenkernel so that they can be used elsewhere in future if need be.
* Properly wrapped bone groups in RNA. Copied the way that Vertex Groups are wrapped, since they share some similarities. Setting colours for bone groups still needs more work though.
Moved Shade Smooth/Flat from Mesh obdata panel to tools area. These kinds of operator tools aren't really allowed in the buttons window anymore - whole point of new tools area :)
The only operators that are allowed in buttons window are things that act on the RNA fields, like add/remove buttons for adding vertex groups etc.
* 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.
Too many new features to list! But here are the biggies:
- Boids can move on air and/or land, or climb a goal object.
- Proper interaction with collision objects.
* Closest collision object in negative z direction is considered as ground.
* Other collision objects are obstacles and boids collide with them.
- Boid behavior rules are now added to a dynamic list.
* Many new rules and many still not implemented.
* Different rule evaluation modes (fuzzy, random, average).
- Only particle systems defined by per system "boid relations" are considered for simulation of that system.
* This is in addition to the boids own system of course.
* Relations define other systems as "neutral", "friend" or "enemy".
- All effectors now effect boid physics, not boid brains.
* This allows forcing boids somewhere.
* Exception to this is new "boid" effector, which defines boid predators (positive strength) and goals (negative strength).
Known issue:
- Boid health isn't yet stored in pointcache so simulations with "fight" rule are not be read from cache properly.
- Object/Group visualization object's animation is not played in "particle time". This is definately the wanted behavior, but isn't possible with the current state of dupliobject code.
Other new features:
- Particle systems can now be named separately from particle settings.
* Default name for particle settings is now "ParticleSettings" instead of "PSys"
- Per particle system list of particle effector weights.
* Enables different effection strengths for particles from different particle systems with without messing around with effector group setting.
Other code changes:
- KDTree now supports range search as it's needed for new boids.
- "Keyed particle targets" renamed as general "particle targets", as they're needed for boids too. (this might break some files saved with new keyed particles)
Bug fixes:
- Object & group visualizations didn't work.
- Interpolating pointcache didn't do rotation.
(it's the 3rd commit in a row. But as they say, the 3rd is always a charm ;)
I still think we have a little mess with the DEFINE parameters in BGE (as in RAS_IRasterizer::StereoMode).
We used to have them duplicated and hardcoded in 2.4xx, but I think we can do it in another way now.
(I didn't change gameplayer, but I can do it once we have it linking and building properly)
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
Logic Panel:
- world settings (moved from world)
... that includes physic engine selection + gravity
- game player (from gamesettings, it wasn't wrapped)
- stereo/dome (from gamesettings, it wasn't wrapped)
... separated stereom into stereoflag and stereomode
- properties
... (didn't touch it)
Buttons Game Panel:
(wip panel)
- Physics (moved from Logic Panel)
... it will be a datablock in the future (right Campbell ?)
- Material Physics (not currently implemented)
... a datablock link to the materials of an object + the dynamic physic variables
* NOTE:
in readfile.c::do_version I couldn't do if(scene->world). There is something wrong with scenes with an unlinked world. So so far we are ignoring the old values....
- BLI_add_slash returns the new string length.
- BLI_where_am_i() would often have /./ in the path (not incorrect but annoying, got into python exceptions)
- release/ui/space_image.py, py error referencing invalid keyword args.
* Moved brush NKEY panel from C to Python. Could use some UI review :)
* Added a NULL check in bpy_internal_import.c, was crashing here on Python errors
* Added RNA for vpaint brush and for weight paint
* Added context for vpaint/wpaint similar to edit_object and sculpt_object
- add a warning when an operator name is NULL, set it to a dummy name to prevent crash. POSE_OT_constraints_clear had its name commented (not sure why)
- rna_Object_parent_type_itemf wasnt checking for context being NULL, needed for docs else it crashes.
- bpy.ops.add/remove didnt show up in a dir(bpy.ops)
- simplified C operator API bpy.__ops__ since its wrapped by python now.
- needs the class to have an __idname__ rather then __name__ (like menus, headers)
- convert python names "console.exec" into blender names "CONSOLE_OT_exec" when registering (store the blender name as class.__idname_bl__, users scripters wont notice)
- bpy.props.props ???, removed
Add Constraint operators are now based on the old add_constraint() function (to be removed when the new code works well).
- Fixed a few bugs with the code, including depsgraph missing rebuild call, and unique-naming for constraints failing due to wrong order for adding constraint to list
- Added capabilities for setting the target of the constraint to the first selected object/bone for the operator when called from menus + hotkeys (but not for buttons window)
This commit is still buggy. I'll fix the remaining issues tomorrow, as well as adding some more operators for IK add/clear.
* Added pointer RNA for the sculpt brush
* Converted sculpt settings panel (in the NKEY area) from C to Python
* For Python UI, needed context for whether sculpt is enabled or not; discussed this with Brecht and added sculpt_object to scene context
- reports can be selected with RMB, Border (bkey) and (de)select all.
- delete reports (X key)
- run operators in the console (R key)
- copy reports (Ctrl+C), can be pasted in the text editor an run with alt+p
Details
- Added "selected_editable_objects" and "selected_editable_bases" to screen_context.c, use the scene layers, this was needed for duplicate to run outside the 3D view.
- RNA_property_as_string converted an array of 1 into "(num)" need a comma so python sees it as a tuple - "(num,)"
- add flag to reports, use for seletion atm.
opens a new world of context bugs :)
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.
Unit tests:
- add a check that BKE_copy_images produces NULL filepath for images having type other than IMA_TYPE_IMAGE
- also expect NULL filepath for images having empty filename
Enhanced BKE_copy_images so the tests pass.
- 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!
Calling rna functions with invalid keywords, too many keywords and too many args would fail silently
- now raise an error with invalid keywords and a list of valid ones, raise an error when too many args are given.
- calling rna functions would alloc a ParameterList each time, changed to use a stack variable (2 pointers and an int).
- store the number of parameters ParameterList
- python exception types were wrong in many cases, (using attribute error rather then type error)
- fixes to small errors in python UI scripts.
- Set View2D operators not to register, got in the way a lot with the console.
- Made autocomplete Ctrl+Enter so Tab can be used.
- Should work with python 2.5 now. (patch from Vilda)
- Moved report struct definitions into DNA_windowmanager_types.h, could also have DNA_report_types.h however the reports are not saved, its just needed so the report list can be used in the wmWindowManager struct. Fixes a crash reported by ZanQdo.
- Store the report message length in the report so calculating the total height including word wrap is not so slow.
Experimenting with cross-compiling my branch with MinGW on Linux:
- tweaked config/linuxcross.py, source/blender/makesdna/intern/SConscript and tools/Blender.py
So far linking fails.
- added class option for PyOperators __register__ so you can set if py operators are logged in the console.
- PyOperators was refcounting in a more readable but incorrect way. in some cases would be possible to crash so better not drop the reference before using the value.
- console zoom operator was registering which meant zooming in to see some text would push it away :)
* interactive console python console.
* display reports and filter types. defaults to operator display so you can see the python commands for tools as you use them,
eventually it should be possible to select commands and make macto/tools from them.
Example use of autocomp. b<tab>, bpy.<tab>, bpy.<tab>, bpy.data.<tab> etc.
basic instructions are printed when opening the console.
Details...
* Console exec and autocomp are done with operators written in python.
* added CTX_wm_reports() to get the global report list.
* The window manager had a report ListBase but reports have their own struct, switched to allocate and assign when initializing the WM since the type is not available in DNA.
* changed report types flags for easier display filtering.
* added report type RPT_OPERATOR
* logging operators also adds a python-syntax report into CTX_wm_reports() so they can be displayed in the console as well as calling a notifier for console to redraw.
* RnaAPI context.area.tag_redraw() to redraw the current area from a python operator.
Todo...
* better interactions with the console, scrolling, copy/paste.
* the text displayed doesnt load back.
* colors need to be themed.
* scroll limit needs to be a user pref.
* only tested with cmake and scons.
* 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 basic infrastructure to layout user preferences. The
intention is that you open a user preferences space in place
of the buttons space, and have panels there.
* The existing sections don't have to be followed, it's easy
to create different ones, just change the user_pref_sections
enum in RNA.
* This will get separated from the info header later.
* 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.
* Bone Transform panel now works, using appropriate EditBone or
PoseChannel properties.
* Bone name and parent are now editable.
* Some other tweaks to the UI layouts for Armature and Bone.
* Notifiers for armature/editbone properties.