This also revealed another bug, as you could not explicitely set default context to text_ctxt UI func parameter (None is not accpeted by RNA string props), so I had to change default context from py POV to "*" instead of None.
Anyway, that physics UI translation remains weak, as the trick used here (helper func) prevents message extractor script to directly find them. Currently it works because specified labels are also defined elsewhere, but it would be nice to have some kind of "translation markers" in py code too (similar to our N_/CTX_N_ C macros, unfortunately python does not have preprocessing ;) )...
(Did not add those when I created that module, because I did not thought we would actually need them in usual UI code, but turned out I was wrong).
Also made some optimizations in those py gettext funcs, when i18n is disabled at build time, no need to do pyobject -> cstring -> pyobject conversions!.
As per discussion and analysis of all trackpad usage, we now
follow this convention:
- Blender follows system setting for trackpad direction preference.
- If you set your system to "natural" scroll, we need to invert a couple
of cases in Blender we do "natural" already. Like:
- view rotate (the inversed option just never feels ok)
- scroll active items in list or pulldown menu (up/down is absolute)
- ALT+scroll values in buttons (up/down is absolute)
The new User Preference setting "Trackpad Natural" handles this.
For 2.66 we only have trackpad handling for OS X... so this isn't
affecting trackpad usage in Windows and Linux, which stick to be mapped
to Scroll Wheel still.
(Note: viewrotate now is "natural" always, changing how it worked in the
past weeks).
* Disabling Skeleton Sketching now refreshes the view properly, so that strokes
don't linger on even after being disabled
* Added the delete operator to the panel
Although the bug report here wasn't exactly clear about what exactly was wrong,
it soon became apparent that the UI stuff here was in need of some love.
Changes:
* Ported over missing tooltips from 2.49 (i.e. most of them)
* Fixed a few incorrect tooltips (mostly the subdivision length settings)
* Made the autonaming and number/side settings slightly clearer - number/side
are used to replace placeholders in the names of template bones (&N and &S
respectively) when autonaming is disabled. When it is enabled, these values are
determined automatically.
Thought of setting the operator context before so it wouldnt invoke the confirmation dialog, but better leave it by default to confirm since it might be clicked by mistake and start dumping video/image-sequence and can get annoying.
draw_item *is* optional (it then uses default C function), even though there is not much sense to register a class without it, except for our default UI_UL_list!
Previously it wasn't clear what it was supposed to be doing, or what was
required for it to work.
TODO: figure out why the operator redo settings panel won't work. The workflow
here is still a bit clunky.
(and marking rna as deprecated)
I talked with Benoit Bolsee and Mitchell Stokes and they both agreed that
the feature should be removed.
In case someone was actually using it the rna is still available. But next
release we remove both the rna, the DNA and the flag in the code.
I did a simple benchmark with tons of cubes, and the DBVT culling (use_occlusion_culling=True)
always perform better than when it's off. Even when no occluder objects are in the scene.
Also generate rigid body constraint types in py bullet code from RNA enum values (simpler than having to sync the code when something is changed here!).
Side note: RNA API about icons still needs to expose icons for enum values, and conversion funcs between icon_name and icon_value!
Oops! So there was an Unpack button, hidden in the Nkey properties of Image window.
This was drawn next to greyed-out buttons, didn't notice it well.
I also now found the unpack() menu in editors/util, and there's an Image unpack op.
Also the RNA api has an unpack!
Will remove the generic unpack op, and add a sound and vfont unpack instead.
Now all add/remove operators for rigid body objects and constraints
automatically add objects to the appropriate groups and create groups if they
don't exist yet.
This makes handling rigid bodies easier but doesn't take away functionality.
If users want to handle groups manually they just need to create them before
adding any objects.
The previous behaviour was confusing and was even considered to be a bug since
clicking on rigid body in the physics tab seemed to do nothing.
This means the deformation on the input to the modifier can be re-applied ontop of the mesh cache.
In practice this is most useful for using corrective shape-keys with mesh-cache.
Added "Panel Title" style to Theme settings.
Allows to make these nice larger or draw differently.
Also tried to put hinting in Style, but this needs to be a per-font
setting. uiFont data is still not being saved (also not allowing
to set own font files for UI). That's a todo for 267 then.
* Code cleanup for new Rigid Body panels.
* Removed some unneeded split() calls.
* Remove redundant check for "ob.rigid_body_constraint" in the draw() function of the "Rigid Body Constraint" panel. The check is already made in the poll.
Behaves like the generic constraint but has optional spring on each axis.
TODO: Add option to set rest length.
Patch by Markus Kasten (markus111), thanks!
Constraints connect two rigid bodies.
Depending on which constraint is used different degrees of freedom
are limited, e.g. a hinge constraint only allows the objects to rotate
around a common axis.
Constraints are implemented as individual objects and bahave similar to
rigid bodies in terms of adding/removing/validating.
The position and orientation of the constraint object is the pivot point
of the constraint.
Constraints have their own group in the rigid body world.
To make connecting rigid bodies easier, there is a "Connect" operator that
creates an empty objects with a rigid body constraint connecting the selected
objects to active.
Currently the following constraints are implemented:
* Fixed
* Point
* Hinge
* Slider
* Piston
* Generic
Note: constraint limits aren't animatable yet).
Add operators to add/remove rigid body world and objects.
Add UI scripts.
The rigid body simulation works on scene level and overrides the
position/orientation of rigid bodies when active.
It does not deform meshes or generate data so there is no modifier.
Usage:
* Add rigid body world in the scene tab
* Create a group
* Add objects to the group
* Assign group to the rigid body world
* Play animation
For convenience the rigid body tools operators in the tools panel of the 3d view
will add a world, group and add objects to the group automatically so you only have
to press one button to add/remove rigid bodies to the simulation.
Part of GSoC 2010 and 2012.
Authors: Joshua Leung (aligorith), Sergej Reich (sergof)
Add read/write/interpolate functions.
In order to get rigid body point cache id from object it's now required to pass the
scene to BKE_ptcache_ids_from_object().
Rigid body cache is drawn in the orange color of the bullet logo.
removing non-GE supported features.
The idea of splitting the draw() function comes from Campbell Barton.
Review from him as well.
The main reason for not implement this in properties_games.py is to make sure the
panel is in the same order for both BI and BGE engines.
Full log is here:
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.66/Usability#Matcap_in_3D_viewport
Implementation notes:
- Matcaps are an extension of Solid draw mode, and don't show in other drawmodes.
(It's mostly intended to aid modeling/sculpt)
- By design, Matcaps are a UI feature, and only stored locally for the UI itself, and
won't affect rendering or materials.
- Currently a set of 16 (GPL licensed) Matcaps have been compiled into Blender.
It doesn't take memory or cpu time, until you use it.
- Brush Icons and Matcaps use same code now, and only get generated/allocated on
actually using it (instead of on startup).
- The current set might get new or different images still, based on user feedback.
- Matcap images are 512x512 pixels, so each image takes 1 Mb memory. Unused matcaps get
freed immediately. The Matcap icon previews (128x128 pixels) stay in memory.
- Loading own matcap image files will be added later. That needs design and code work
to get it stable and memory-friendly.
- The GLSL code uses the ID PreviewImage for matcaps. I tested it using the existing
Material previews, which has its limits... especially for textured previews the
normal-mapped matcap won't look good.