* Added Constraints template and Add Constraint operator.
* Added toggle=True/False parameter to uiItemR, to get a
toggle button (actual button) rather than an "option"
button (checkbox)
* Added OPTION/OPTIONN button type, to distinguish with
TOG/TOGN.
RNA:
* Make all modifier pointers editable, including correct updates.
* Added notifiers and updates to constraints.
* Fix a stack corruption, pointed out by Andrea, and potentially
causing crashes.
- file editors/space_image/image_panels.c -> image_buttons.c (renamed)
- file editors/interface/interface_templates.c added
Also added small fix for crash in filebrowser.
Found that subclassing an RNA struct (without even registering or instancing adds a reference to Py_None).
Unlikely a python bug, tested with py2.6 and 3.1
Still not happy with this in the long term but its less problematic then storing the context in pythons namespace which couldn't be set before importing modules.
This might fix a crash quite a few people have reported (but I cant reproduce).
First version of region-scaling. WIP commit, so bear with me a while!
- All fixed sized regions have a small 'drag' widget, on the left or top.
(not yet for free-sized regions, like 4-split).
- Mouse-over on widget changes cursor and allows drag.
- Click on widget hides/reveals.
- Fun for test; 3d view header, if high enough, draws more rows of
buttons when width is too small.
The WIP stuff;
- It doesn't save yet in files, using the "minsize" variable of region
definitions, also means other similar areas show same sizes now.
- Definitions for pref size, min/max will be added.
- Properties panel in Fcurve window draws widget on wrong place when
hidden (subdiv system needs tweak)
- Widgets don't draw perfect yet, also needs further tweaks.
But, in general it's quite fun and usable. :) Many variatians are possible,
like for real tabs, or little icons, or just click-drag on edge.
The reason to first try the widget/tab variation:
- it re-uses the "Area Action Zone" code, widgets for layouting Screens
- it's visible, hotkey-only options for screen layouts are not preferred.
- distinguish clearly area-edges from region-edges this way. Having the
cursor change shape on every edge (and block input) is probably annoying
too... but that can be tested.
Later more!
This includes a bunch of new object primitive icons
which would be great to get into the 'add object' menus,
they're not there yet. The specific lamp data type icons
are now used in the outliner though, which is very helpful.
Added subdivide operator and button for multires.
Since this seems to be the only modifier with an operator defined, I'm not sure if I put it in a good place or not, someone can check on this?
- Added new popup menu type, which can be used to pass on a
running operator too. Needed it for debug menu, allowing to
set variables outside of operator "first do then tweak" system. :)
void uiPupBlockOperator()
Don't forget to tell invoke() return that operator now runs modal!
- Test menu: alt+ctrl+d gives the G.rt debug value.
Values of 0-16 now can be used to shrink areas, stuff like this
then happens (rt==4):
http://download.blender.org/institute/rt5.jpg
Was looking at ways to visually distinguish areas and regions
better. Yes I know, cute rounded corners, etc. Just testing!
Fix in sliders; didn't notice the left part messed up :)
Another slider draw method to explore would be like this:
(<| -------- |>)
Would make it symmetrical, and visually matching number
buttons better. (the "<" is background color triangle,
without circle around it).
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)
Bugfix: In full-area screen mode, you cannot split windows again, the
full-area code is too primitive for that. Just disabled now.
(reported by Venom's Lab!)
Interface draw fixes:
- Red cursor for text edit widget was in wrong location
- Selection for text edit widget too
- Number slider text edit was too far too the left
- Number slider 'fill' was drawing outside boundaries.
(Matt: note I just interpolated rounding value :)
* template_modifier creates the modifier box, and returns a layout
to put the buttons in.
* Only the armature modifier is now done with python code, all other
modifiers use C code. To convert a modifier to python, remove the
corresponding C code and create a function in DATA_PT_modifiers.
* Some modifiers still require some RNA work to get it working well,
especially to make pointers editable. Mostly that is a matter of
defining an own _set callback and put some of the modifier C code
into it.
* Still various buttons that don't work, like for hooks or mesh
deform binding.
* Fix for crashing decimate modifier (still disabled).
* Removed UI_BUT_NO_HILITE, HMENU.
* Make uiLayoutBox work with align.
Animation playback back in control. And non-blocking still!
- Play follows the "Playback" options in TimeLine menu.
Only the region 'windows' are drawn, not headers, toolbars,
channel views, etc.
The option "Buttons Window" also redraws property regions.
- The Timeline header always redraws, this to denote at least
progressing frame numbers
- For now: if you choose to play 3D views, it also redraws
the TimeLine. Seems to be good convention, but probably
better to add menu option for it?
- Fun test: while playback, change Playback options, works OK!
- New: top header button shows animation play status, and allows
to stop playback
- New: Animation stop/start operator. Assigned to ALT+A. It has
no options yet; just plays active region + all 3D windows now.
Options will follow, based on reviews.
Also ESC won't work for now, just press ALT+A again.
* turned some slider UI controls back into number fields
Note: Sliders should only be used when representing a property that's
conceptually a percentage or ratio. For arbitrary numbers, use a number field.
For example, a lamp's energy can theoretically be anything - 0.1, 3.5, 125.0, it
doesn't matter - it's just a number, not a percentage. So this should be a
number field.
* Hide enable button in horizontal collapsed panels.
* Fix enable button not being in correct position when zooming.
* Fix n-key panels layout being messed up.
Node editor:
- Crash could occur on ALT+LMB remove link lines (read free'd mem)
- Button labels were handled as full buttons, disabling node usage
quite a lot, like drag, select, or create links.
(Caused by making all node labels buttons)
Brecht: old UI_NO_HILITE can be depricated, it was for bad overdraw
issues. I guess it's OK to not handle Label buttons at all...
Fixes:
- Render (F12) would choose the (hidden) info window in cases, disabled
that.
- Browsing ID's (like Image in Image editor) failed when no ID was
assigned yet.
Try to expand the RNA tree in Outliner -> User Preference crash blender.
RNA_struct_idproperties was not checking if ptr.data is NULL
and always try to access the properties type information.
Note: brecht double check this.
Undid fix from matt to prevent tog button alignment, this is not
working that way... made UI look very bad (like layer buttons)
The new code has 'toggle' and 'option' button types, with the
latter being the new style, and first for icon rows, layers, etc.
Purpose is that RNA or py api would allow to distinguish.
- Made Normal (Sphere) button draw with nice AA
(check in node editor)
- Bugfix in alignment code, collumns were not drawing OK
- Picker buttons draw swatches again, and made them work.
* Added material "type" property, with Surface/Volume/Halo
options, compatible with sim_physics, as requested for
material buttons layout. Obviously the Volume setting
does nothing currently.
* Deprecated MA_HALO flag in favor of this.
* Any Struct can now have ID properties, by creating a callback
function to create/return an IDProperty.
* Wrapped PoseChannel ID properties.
* Note there is still no way to create ID Properties in 2.5, though
the callback to get/create the initial group is now exposed through
RNA_struct_idproperties.