First version of search-based ID browsing. Now only in use for the
top bar screen/scene browse. The python buttons will follow.
Also made search button colors match the theme colors from menu back.
Todos for browse-search:
- "Add new" will disappear, and become a separate icon button in the
row of widgets (like X, delete).
- Drawing the preview icons in menu
- Make search menu dynamic, with configurable number of items? And/or
multi-collumn... for now it's static
- Search menu should popup with last active ID visible and selected
For fun, added 'sinc' (i.e. y = sin(pi*x)/(pi*x)) as a type of builtin function usable through the generator modifier. This makes a nice 'jolt' which tapers off.
20669 to 20771
(sheesh, that took an hour, not including having to restart the whole process after TortoiseSVN bailed out midway through the first try)
If a total of 30 subdirs was hit, or 4 dirs deep was hit - script scanning would quit, skipping files in the root scripts path too.
To work around this the script pack included some of blenders scripts twice just so they would get into the menu but this is a dodgy workaround.
* dont stop scanning for scripts when limits are reached (just dont scan further).
* global 30 dir limit per scan is silly - removed.
* limit recursive depth is kept but keep scanning at lower depths.
* bumped recursive limit from 4 to 6
* flt_properties.py had #!BPY without a menu header.
Adds access to...
- Anisotropy
- Mirr Threshold
- Trans Threshold
Breaks rule of no additions but python data access is quite safe, vray exporter needed these attributes.
[#18891] BGE Convert script Python 2.5 compatible
This commit restores transform support for NLA. Grab, scale, 'extend', and tweak (i.e. grab by just click+dragging) are implemented.
Notes:
- As soon as one end of a strip touches another adjacent strip (within the same track), that end stops moving. This has been done to avoid the situation where overlapping strips within the same track (which is not allowed) might be caused by transforms.
- Made some changes to the RNA setters for the strip extents so that the validation above could take place (and other necessary changes on a per-strip basis could also occur).
TODO's ?
- Strips cannot be transferred from track to track using transforms. I've yet to decide whether this needs to be done, or whether a separate operator will suffice.
- What happens to the range of Actions used when the strips change sizes unexpectedly (i.e. the no-overlap condition above)? Currently range stays the same, but this doesn't always seem desirable?
eg, layout.operator_context = 'INVOKE_REGION_WIN'
Needed to set the context that menu item operators are executed in.
fixed missing NULL check with anim system debug printing.
- clamp the border to the region bounds when selecting files
- fix for border select past the end of the filelist selecting nothing.
- de-selecting files would still set the filename.
- uiItemEnumO_string, forgot to actually set the enum value
- added more sequencer header buttons (these should probably be moved to a view panel eventually)
- Most of the settings wrapped in RNA have been exposed here using the new layout engine stuff from Brecht (C-API). I've tried to maintain a hierarchy of high-level (owner, generic-settings) to low-level (children, specialised-settings) here, which seems to be the prevailing guidelines?
(It took a while to try to understand how this all fitted together, since there were no clear examples on how to use this anywhere)
- NLA-Strip Modifiers have not been exposed yet. They still use the old-style drawing, which may/may not be compatible here.
- Fixed a bug with how the notifiers from this panel get sent. I really don't know how the compiler would have missed the undeclared pointer that was being used ('ob').
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19820:HEAD
Notes:
* Game and sequencer RNA, and sequencer header are now out of date
a bit after changes in trunk.
* I didn't know how to port these bugfixes, most likely they are
not needed anymore.
* Fix "duplicate strip" always increase the user count for ipo.
* IPO pinning on sequencer strips was lost during Undo.
- Move buttons into the sequencer Nkey region
- Made the header and menu items use the python api, still need to get more buttons working.
- Fixed some minor problems
Small fixes:
- Preview render now accepts resize of 1 pixel without re-render,
solves re-renders on scrolling window or dragging panel, because
of float rounding.
- Panel dragging outline was off 0.5 pixel, showed as fat AA lines
- On switching tab, the preview gets re-rendered
Down with smart, up with simple!
I now use the widget polygon code to generate a mask quad strip,
draw it over the image, and then the AA outline. Should work on
all systems.
Removed masking idea for preview draw, it appears Win32 && X11 windows
are 24 bits, not 32 bits with alpha. Not going to open that can of worm
to add this, will find a different masking method...
Preview renders:
- Added proper button type (BUT_EXTRA) for preview buttons, to
handle drawing better. It now first draws an alpha mask, to
ensure the preview is correctly fitting inside the widget style.
It then draws the outline.
- Added protection for executing preview renders while regular
rendering, that's not going to work...
When an Animation Editor is showing timing in 'seconds' (instead of frames), the indicator label is now drawn with the same style of timecodes as the scrollbar labels are.
Attempt to make multires updating a little cleaner by
assuming that no update needs to be performed, and only
doing the update when the modified flag is set (either
by sculpting or using some other tool that needs an update.)
Example sequencer menu
self.layout.column()
self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", property='type', value='ADD', text="Effect Strip (Add)")
* Context now allows pinning a datablock, independent of
selection.
* Initial ID browse buttons for most buttons tabs.
* Browsing from world to texture now displays world textures
again, but is a bit of a hack, not sure there is a right
way to do this.
* There's a button to switch between active materials and
textures now, only temporary though.
* There's some code to put context part in own region,
disabled still because it doesn't work that well yet.
* layout.split() now takes a percentage argument to control
the split position.
* ID template now works for more than just the Text ID type,
includes and icon, and some other fixes.
* Accept None as NULL pointers through python function calls.
* Added type callback for pointers back, it's useful still in
some cases. Made Object.data editable using this, the pointer
type varying based on object type.
* Wrap pin ID pointer in buttons space.
* Added subclasses for text and surface curve ID blocks, to
organize data better and get proper icons.
* Added RNA_type_to_ID_code and ID_code_to_RNA_type functions.
* Update RNA_access.h with new RNA types.
If anyone's doing any testing at this point, please check if this works ok for files with new/old NLA Editors, as I was having some problems with one of my testing (saved from this branch) files with this.
Nice goodie: Preview renders!
- Added new preview.blend, allowing super wide cinemascope previews
- Draws nicely blended inside widget type, rounded corners
- Preview now renders using all available cpus/cores.
- Uses - hopefully rock stable - method, which doesn't copy or
allocate anything for previews, but just uses render API calls.
- Multiple previews are possible! But, added provision in Jobs
manager to only render one preview job at a time. If you start
more preview jobs, they're suspended until it's their turn.
Bugfix: new buttons context code crashed when going full-window.
Tweaks are still needed for notifiers. I have to figure out still
how to retrieve SpaceButs button view types...
- Evaluation times for strips are now strictly clamped to the endpoints of the strips - i.e. if a strip has 'extend' on, the strip's evaluation time won't continue to change as time changes
- New NLA Editor instances now have auto-snapping turned on by default (as they should)
Most of the relevant properties have been wrapped.
- There are still some properties I'm not sure about whether they should be exposed at all (which have been left out for now). Most of these are really internal flags which are used in a few select places.
- To maintain the integrity of the settings, I've included some custom code for a few of the setters (i.e. scale/end-frame) where changing one should result in a change in the other and vica-versa.
Also, tweaked the wrapping for a few other types.
Another side effect of this commit is that I can now uncommented some code for using F-Curves to control the influence and time of the strips. These F-Curves would need to be specifically attached to the NLA-Strip they affect for now (TODO: I need to review this again...), and as such, cannot be used yet since there's no (end-user-accessible) way to do this :)
* Added a constraint tab in the buttons window.
* Added more sequencer buttons (effect strips).
Note: Sequencer buttons will go into the sequencer itself (n-key Panel) later.
* Particle button tweaks by William Reynish. Thanks!
* Some RNA fixes and new properties.
Several usablity tweaks:
- Search menu allows ScrollWheel to view items
- Tooltip on button on bottom of window showed wrong
- Tooltips were popping up while draggin (MMB) or scrolling
(wheel). Now they stay away.
- Stolen from Gimp (blame venomgfx for hint!): ScrollWheel allows
to go over menu items and use number buttons, only on mouse-over.
Note for devs: the WM_event_add_mousemove() call (to add a fake
event to bring UI back alive after view changes) now works much
more reliably. It ensures the mouse move is only handled after all
notifiers/redraws were done.
-Many things not yet working properly :)
-Experimental new (hopefully more logical) categorization of buttons, feedback on this is very welcome.
-Separate render & draw types, for example now there is actually a render option "halo" instead of all the different point draw types.
-Particles get recalculated only from buttons that actually change something that has to be recalculated, for example changing visualization doesn't reset particles any more.
-Boid physics buttons are still missing as I'm currently redoing the whole boids code.
-Point caching is still very wip, so baking is not possible for example, but I added a few cache baking flags for rna that were/will be needed for particle buttons logic.
As venomgfx point, the shift+d function never duplicate the ipo block
if we have enable the option in UserDef -> Edit Methods -> Ipo.
Now, if Ipo option is disable, we just increase the user count, otherwise
we duplicate the ipo.
Note: Alighorith, we need call ipo_idnew here ? (like single_ipo_users)
Checker: FORWARD_NULL (help)
File: base/src/source/blender/src/poseobject.c
Function: pose_special_editmenu
Description: Variable "ob" tracked as NULL was dereferenced.
logic was wrong (gets complicated when you use !'s ;))
Kent
This allows the sequencers Add-Image strip to work like it does in 2.4x.
- as well as setting the "filename" operator property, operators can have collections called "files" and "dirs" which are set when available.
- RNA_OperatorFileListElement as new collection type, its a bit redundant since each item only has a "name" property but its needed since we don't have a string array type.
- the file selector now prints operators it runs.
Tested with python, adding a list of images works to the sequencer works.
bpy.ops.SEQUENCER_OT_image_strip_add(name="MyImages", start_frame=54, channel=2, filename="/somedir/", replace_sel=True, files=[{"name":"test1.png"}, {"name":"test2.png"}])
Search menu:
- Made nicer drawing for popup version of search. It now uses
entire backdrop like pulldowns.
Search boxes for text buttons will use different style still;
if we use this option all over it shouldn't look too intrusive.
- Search menu allows scroll, to view all items. It doesn't cycle
anymore.
- Click outside search menu now cancels
- If a match is in search button, it highlights it. This also
allows ALT+CTRL+F - Enter to redo last op.
- Search popup draws higher when no no space below. No order
flipping!
- Support for python to convert a PyObject into a collection (uses a list of dicts - quite verbose :/)
- Operators can now take collection args when called from python.
- Support for printing operators that use collections (macro recording).
- Added RNA_pointer_as_string which prints all pointer prop values as a python dict.
Example that can run in the in test.py (F7 key)
bpy.ops.VIEW3D_OT_select_lasso(path=[{"loc":(0, 0), "time":0}, {"loc":(1000, 0), "time":0}, {"loc":(1000, 1000), "time":0}], type='SELECT')
for some reason lasso locations always print as 0,0. Need to look into why this is.
* Fixed an evil bug where the last frame of a strip was always incorrectly evaluated.
This was because these frames were not being included in the strip's 'range' as defined by the IN_RANGE() testing macro, which only considers the given range as an open interval (i.e. non-inclusive of boundary points). I've added a new macro, IN_RANGE_INCL(), which is inclusive of boundary points, since this is a common test in many other parts of the code.
* When an AnimData block is in 'tweaking' mode, the tracks following (and including the active track) are now correctly skipped during evaluation.
* Finished coding the option of setting a single NLA-track per NLA-block to play 'solo' (i.e. only that track is enabled for evaluation).
To enable this, simply click on one of the grey 'dots' beside the NLA-track names, turning this dot yellow. The 'yellow' dot means that the track will play by itself (even the 'active action' gets silenced). Only one track per AnimData block can play solo at a time. To disable, simply click on the 'yellow' dot again.
NOTE: this currently uses the View3D layer-status icons. We probably need some special ones for these later (coloured vs grey star?)
* Also (not related to evaluation) made the selection operators for the NLA Editor only work when not in tweaking mode, since in tweaking mode they can potentially result in data being resolved inappropriately when leaving tweaking mode.
In this commit, I've introduced the mechanism by which actions already referenced by strips used in the NLA can be edited (or 'tweaked'). To use, simply select a strip you wish to edit, and hit that TAB key to start tweaking that strip's action, and hit TAB again once you're done.
What happens when you enter 'tweak mode':
1) The action of the active strip temporarily becomes the 'active action' of the AnimData block. You are now able to edit this in one of the Animation Editors (DopeSheet/Action, Graph Editors) as per normal (i.e. sliding keyframes around, inserting keyframes, etc.). The 'action-line' will therefore get drawn immediately above the active track containing the active strip, so that it's clear that that's what we're editing.
2) All the NLA-tracks (and all the strips within them) that occur after the track that the active strip lived in get disabled while you're in tweakmode. This is equivalent to travelling back to an earlier state in a construction history stack.
3) The active NLA track also gets disabled while in tweakmode, since it would otherwise interfere with the correct functioning of the tweaking for the action of interest.
4) The 'real' active action (i.e. the one displaced by the active strip's action) gets put into temp storage, and will be restored after you exit tweakmode.
5) Any strips which also reference the action being tweaked will get highlighted in red shading to indicate that you may be making some changes to the action which you don't really want to make for the other users too.
Please note though, that this is only a rough prototype of this functionality, with some niceties still to come. i.e.:
* NLA-tracks after the active track should still get drawn above the 'tweaking action line', but perhaps with different appearance?
* Various tools will still need awareness of this to prevent corrupting operations from taking place. How to proceed is still undecided...
* When exiting tweak-mode, the strip the action came from still needs some form of syncing with the modified action... there are a few tricky issues here that will need to be solved
* Evaluation code doesn't totally take this into account yet...
---
Also, fixed a number of bugs with various code (notably selection, and also a few drawing bugs)
CID: 478
Checker: REVERSE_INULL (help)
File: base/src/source/blender/blenkernel/intern/softbody.c
Function: apply_spring_memory
Description: Pointer "sb" dereferenced before NULL check
and
CID: 480
Checker: REVERSE_INULL (help)
File: base/src/source/blender/blenkernel/intern/softbody.c
Function: springs_from_particles
Description: Pointer "ob" dereferenced before NULL check
again moved assignment after check to make sure pointer is valid.
Kent
CID: 506
Checker: REVERSE_INULL (help)
File: base/src/source/blender/src/editparticle.c
Function: PE_mirror_x
Description: Pointer "(edit)->keys" dereferenced before NULL check
and
CID: 507
Checker: REVERSE_INULL (help)
File: base/src/source/blender/src/editparticle.c
Function: PE_mirror_x
Description: Pointer "(psys)->particles" dereferenced before NULL check
No need to copy the memory if the pointer isn't valid.
Kent
Checker: REVERSE_INULL (help)
File: base/src/source/blender/imbuf/intern/anim.c
Function: IMB_anim_absolute
Description: Pointer "anim" dereferenced before NULL check
again moving init code after check to valid pointer.
Kent
Checker: REVERSE_INULL (help)
File: base/src/source/blender/src/hddaudio.c
Function: sound_hdaudio_extract_small_block
Description: Pointer "hdaudio" dereferenced before NULL check
Moved some init code that uses a pointer to after the check
to see if pointer is valid.
Kent
Bugfix: Icons were drawing on wrong subpixel positions, distorting
badly. Now it's crispy and tasty!
Noticed there's a magnifier icon already, using it for the search
option.
- script template use new property syntax
- Python could set the axis/hat to a negative index and crash blender (nobody complained)
- Servo control UI had overlapping text
* First step for buttons context browsing, read-only still.
* Drawn in a panel now, though this should become a separate region.
* Path of the context is constructed as an array of RNA pointers and
then used for drawing and context lookups from python.
* Added a MaterialSlot collection in Object rather than giving
the list of materials immediately. This should more correctly
reflect how this data is organized, even though there is no
equivalent C struct.
* Added name properties to MaterialSlot/TextureSlot/ParticleSystem.
Further work on new "text search" button.
- Now allows to browse items (mouse, arrow key)
- Assigns active value
- Uses different backdrop to distinguish from popup menus
- Cleaned API for it, so it can be used nicely generic
Also added a search menu, which shows all currently working
operators: CTRL+ALT+F. (mind the looks, it needs some tweaks!)
To make a menu activating a button I've added a new event...
could use some tweaks.
Important note: the callback to pass on "old string" for text
button (bone rename) couldn't work yet, added first code for new
callback, but has to be worked on further. When bone rename gets
added it can be tested.
Checker: FORWARD_NULL (help)
File: base/src/source/blender/src/toolbox.c
Function: tb_do_render
Description: Variable "ca" tracked as NULL was dereferenced.
Moved check for null to include else statement.
Kent
CID: 477
Checker: REVERSE_INULL (help)
File: base/src/source/blender/blenkernel/intern/cloth.c
Function: cloth_apply_vgroup
Description: Pointer "dm" dereferenced before NULL check
Just like the others it assigned the value twice, removed
the one that was before checking for NULL.
Kent
CID: 595
Checker: OVERRUN_STATIC (help)
File: base/src/source/blender/python/api2_2x/sceneSequence.c
Function: Sequence_setProxyDir
Description: Overrun of static array "&((((self)->seq)->strip)->proxy)->dir" of size 160 bytes by passing it to a function which indexes it with argument "248" at byte position 247
Wasn't using the size of dir it was using the sizeof the struct dir is in.
Fixed.
Kent
* Following user feedback, I've increased the separation between normal NLA-tracks and the 'action lines' to try and differentiate them more. This hopefully this will be sufficient, otherwise, I'm going to have to abandon the use of nice, generic channel-identification code for lists of channels...
* Improved drawing of 'active' strips.
- Now, the active strip (when NOT being 'tweaked') will be simply drawn as a yellow strip + a white border.
- The active strip (when BEING 'tweaked') will now be greenish + a white border. The colour here may be tweakable, but we'll see...
* Strip extrapolation modes (hold, etc.) are now visualised as rects with alpha and the same colour as the strip they belong to.
* Selecting strips now makes them 'active' (and deactivates the others). Only one strip can be active at a time. Still need to figure out precisely how this will work with multiple AnimData blocks + NLA-'tweaking'.
* Fixed view-matrix bug introduced in last commit for text drawing. For now, we'll just reset the view matrix after doing that, since it's not too acceptable to move these calls to the end yet, as they should get overlapped by some other editor features (such as the Current Frame indicator)
* Make modifier and constraint templates use left/right alignment for
buttons in the header.
* Added mdef bind operator as an example of how to use local context
for a modifier, and add some code I forgot to commit last time to
make this system actually work.
* Fix crash adding rigid body constraint.
* Give new nodetrees NT in ID name to make them recognizned by RNA,
even if the nodetrees aren't actual ID datablock.
* Fix an issue where the pointer types wasn't always refine
to the most specific type, now RNA_pointer_create also
does this for convenience.
* Make lamp fallof type editable.
CID: 475
Checker: REVERSE_INULL (help)
File: base/src/source/blender/blenkernel/intern/cloth.c
Function: bvhselftree_build_from_cloth
Description: Pointer "clmd" dereferenced before NULL check
CID: 476
Checker: REVERSE_INULL (help)
File: base/src/source/blender/blenkernel/intern/cloth.c
Function: bvhtree_build_from_cloth
Description: Pointer "clmd" dereferenced before NULL check
You'll notice in the code the var is actually set again
a few lines down before being used so better to set it
after you've made sure the pointer is valid.
Kent
Part one of new text button type: SEARCH_MENU
This opens a popup showing all matches for a typed string, nice
for object names, materials, operators, and so on.
Warning: Currently menu doesn't function yet! Only draws choices.
As test I've added an operator search button in top bar. It only
shows operators that can be used in this context now. Also that
is part of the WIP, tomorrow more fun :)
- Fix: text draw in fonts was slightly too low; it didn't calculate offset
correctly. Now it is aligned to have number characters in center.
- Fix: text clip was too wide, giving errors on extreme zoom in.
- Added boundbox-clipped default text drawing for view2d:
void UI_view2d_text_cache_rectf(View2D *v2d, rctf *rect, char *str)
(Note; also for previous commit, this cache immediately projects, so if
you change view2d while drawing, text is still on correct positions)
This fixes:
[#18507] Wrong audio mixdown
Also: you can change output sample rate while blender is running
and the audio device get's reopened automatically.
Subframe-precision seeking was also broken for some releases...
(shame on me)
Added support for cached text drawing in View2D. Cache is needed to
prevent the viewmatrix being set/restored on each text drawing.
Adding a string:
void UI_view2d_text_cache_add(View2D *v2d, float x, float y, char *str)
Drawing:
void UI_view2d_text_cache_draw(ARegion *ar)
Nothing else needed; just make sure cache-draw is always called at end
of a view2d drawing function, to clear cache memory.
On todo for next: a version with a rectf boundary to clip text within.
Fix for Spin & Screw Mesh edit operators.
- now center and axis are RNA properties for operator
- axis is drawn as Normal button in properties buttons. Fun toy!
Cleanup commit:
- Yafray removed. Also did cmake/scons files, but didn't compile with it,
so test would be appreciated :)
- Removed old crap from Windows release dir, should be checked on
further by windows release builder later.
Added new widget type in drawing and themes: "Box Backdrop", which is
in use by modifiers. Allows alpha blend, shade, etc.
It was using the general button theme for standard buttons still, to
indicate this change I made it a bit darker. Matt/Bill are invited to
tweak this default color :)
This removes the need of using "-g noaudio", if only HD Sound strips
are used. (In opposite to the RAM Sound strips, they don't need an
initialized Game Sound Engine for obvious reasons...)
This fixes dependency of scrub duration on mixbuffer size.
(start audio with a mixbuffer size of 2048, let it play = initialize,
change mixbuffer to smaller value, you will here 1 second
of audio instead of a scrub)
should hopefully fix
[#18850] 2.49 scrubbing creates an echo
My bug fix to support AO with "Amb" texture channel changed code too that calls
AO as a pre-shade process, when texture isn't calculated yet. This caused very
first pixel in a tile to show wrong AO.
Especially myself deserves a kick in butt for not testing the regression files
for release binaries again! Error shows clearly... in the cornelius_passes
.blend file.
* Added click-select/left-right select and deselect all/invert all selection operators. For now, these basic operators will suffice (more advanced selection operators will be coded at a later stage).
* Fixed a few bugs in DopeSheet found while coding the relevant tools for NLA.
* Added custom border-select operator for NLA channels (since the standard one assumes negative direction channel order)
* Added new API-method for NLA strips to check if the strip occurs within a given range, since this test needed to be performed in a few places...
* Tweaked the NLA Editor View2D ranges a bit to give saner default sizing. This still isn't right yet though.
* Trying to save no longer crashes in some cases when the NLA Editor was open with some data. The sanity check added in filesel.c might be able to be backported to 2.5? (Elubie, please check)
* NLA-track names now get drawn with the correct colours for identifying themselves as being selected or not selected.
* Now the 'push down' functionality for actions will try to add the new strip to the last NLA track, provided it has space in the range required.
* When new strips are added, they will only be allowed to extrapolate before/after if they are the first (time-wise) strip for the set of NLA data per AnimData block. This stops layered strips overriding strips that occurred in earlier tracks at earlier times.
* Wrapped the constraint layout to python and deleted the corresponding C code.
ToDo: 4 constraints are still C code (IK, Script, Action and Rigid Body Joint)
* Some Constraint RNA fixes.
* Wrapped the Shrinkwrap Constraint in RNA.
* Fixed some bugs which meant that NLA-strips weren't getting drawn
* Removed some debugging code
* Fixed bug with Action-line disappearing after 'pushing down' actions
* Fixed bug where Objects with no animation data showed up in NLA
* Tried fixing a bug where NLA-strips were evaluated erratically. I have a feeling that there are some rounding errors I'll need to pay more attention to somewhere :/
'UI Work'
* Added more drawing code for drawing NLA data
* Made the operators for the 'channel-list' of NLA work. A special version of borderselect for the NLA channel-list (due to the different vertical order) still needs to be coded though.
'Push Down' tool
The active action of each AnimData block, represented by the reddy/orange channel, can be added to the NLA stack as a new action by using the 'snow-flake' icon/button (probably need a special icon for this later). This will add a new NLA track and an NLA strip referencing this action. The AnimData block's 'active action' slot will then be left empty.
(Unfortunately, there still seems to be a bug here, which I'll check on later)
Simplified and started from a clean slate, without much of
the hidden existing space data that was hanging around
in the old one.
One issue I found is that saving the startup file from
Blender 2.5 also saves the window size and location.
This means the version I just saved would open up
strangely on other screen sizes/setups. I added code to
reset this to default when loading it up from the version
compiled into the Blender binary, but perhaps Ton/
Brecht might want to check the diff.
Implemented some basic strip-drawing code with some hardcoded colours. These colours will be made into theme colours at some point, but the aim is to use different colours as indicators of the 'state' of the strip (i.e. active/being tweaked, uses the same action as the strip being tweaked, selected, normal).
This is not yet usable though...
* Added PROP_ID_REFCOUNT flag to control if refcounting should
be done on ID pointer properties. All ID pointers are refcounted,
by default, with the exception of Object, Scene and Text.
* Also made TextureFace image pointer editable, with the special
refcounting behavior.
Internal texts file on disk is not used it seems python warnings dont support this (even though exceptions do).
The most common cause of this is passing a float as an argument to a method that took an int.
get around this by setting __file__ in the namespace to the script name before executing the script, the file lines are not found but at least the output is not weird and confusing.
Added read only 'mode' attribute to the python controller so there is a way to tell if its executing a module or a script. Updated docs to better explain execution methods.
* Added some properties of uiLayout that can be set. I've added
some API code for more than the two I've implementeds, so
ignore those for now.
* layout.active = False will gray out buttons inside a layout.
* layout.enabled = False will gray out and completely disable
the buttons inside a layout.
* Also some function renames.
* Automatically do us++ and us-- reference counting in ID pointer
set functions.
* Added an enum property callback to dynamically vary the list of
available items.
* Added some functions to do removes on pointers and collections
runtime defined for RNA and using ID properties.
* Constraints now have owner/target space wrapped, and most
pointers made editable. They can be ported to use python layouts.
* Also other pointers made editable that I think are see now with
the automatic reference counting.
Added a system for adding a "local" context in a UI layout.
This way you can define for example within a modifier panel
all operators to get the modifier in the context.
In the layout code:
uiLayoutSetContextPointer(layout, "modifier", &ptr)
layout.set_context_pointer("modifier", md)
In the operator:
ptr = CTX_data_pointer_get(C, "modifier")
md = context.modifier
if(SDL_PollEvent(&sdl_event)) // if -> while fixed it
removed 'm_buttonnum' was misleading, wasn't used as you expect.
Added gravity to variable to world to be used by collada.
Brecht, would you be able to have a look at this if you have time - I can't
figure out how to trigger the python file to register the header instead of
what's in outliner_header.c.
* 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.
importing "pygame" failed when running the BGE for the second time.
Rather then clearing modules, backup and restore them (as its doing with sys.path)
This way the BGE will never remember any modules imported during game play (which can cause bugs/crashes), but it also wont break pythons state by possibly removing modules that are being used internally.
Third transparent shadow bug... this time it's a Material Node, which
has mirror + transp-shadow on, and when it traces its own material it
enters an eternal loop...
Raytracing + shading + materialnode combo really needs work!
This adds a per preview option to set render sizes (which proxy size is used).
That makes it possible to have
* several small preview screens which update really fast using the proxy files
* one large output screen that operates in full resolution
Since most of the time not all input strips are considered when calculating
an output screen, this is a big win.
Also: one can disable a preview screen completely using this option.
Other use cases: vector + chromaviews don't always need full resolution
pictures and work equally well on proxy files!
This option finally makes my working setup _completely_ realtime :)
- Removed/Commented some unused vars
- CValue::GetPropertyText() could return a temp reference to a variable on the stack, option wasnt used anywhere so removed.
- KX_ConstraintWrapper::GetConstraintId allows args but ignored them
- KX_ConstraintWrapper::PySetParam didnt return NULL on an error (messing up pythons exceptions).
- BLI_natstrcmp didnt return 0 when the while loop exited
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).
* object_drop.py - option to orient to face normal (useful for scattering objects over terrain), accounts for normal flipping and can adjust the orientation %.
bug reported by blenderage on blenderartist (found other bugs too).
- "All Hat Events" didnt work.
- Multiple hats didnt work
- use a menu with direction names rather then have the user guess. disallow zero as a direction.
- Allow up to 4 hats (was 2).
- Python api was clamping the axis to 2, maximum is currently JOYAXIS_MAX - 16
- New python attributes hatValues and hatSingle, match axis functions.
- Use SDL Axis events to fill in the axis and hat array rather then filling in every axis with SDL_JoystickGetAxis for each axis event.
- Setting the constraint script from python didnt update the target count
- Setting objects didnt work at all, since it checked the input sequence for being an BPy_Object type (rather then an item in the sequence)
- IPOs and actions start it's frame counting in frame 1, not zero.
- Talked with Ben and we agreed to rename the "bookmark" feature before an official release.
- some English typos.
- removed all period in the end of tooltips for consistency's sake.
* note:
I resisted one more time to the temptation of alphabetical ordering the Sensors and Actuators.
That will be the first thing I would like to do after we are done with 2.49 :)
It really annoys me as a user.
This adds custom proxy file storage to the sequencer.
Reasoning: sometimes low resolution versions are already available as a
seperate file built by the capture application.
So there is no real reason to make blender build it's own seperate proxy.
This also somewhat fixes (aehm works around :) )
[#13632] Creating Proxy Takes Over Process, Should be Background
Since now you can just fire up ffmpeg to build your proxies in the background.
(You could have done before and build a directory of jpeg files, but then you
would have to rename all the files since otherwise things are off by one...)
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!
+ fixed Python method, PyArg_ParseTuple already checks for errors, no returning of NULL, thanks Campbell too)
+ added linear/angular spring for each of the 6DOFs of a generic 6dof constraint. This makes the generic 6dof constraint very versatile.
http://blenderartists.org/forum/showpost.php?p=1382653&postcount=102
(todo: expose this setting in World setting GUI)
Expose contact processing threshold in Advanced GUI, next to rigid body margin, called CPT.
Default to 1, makes rigid body stacking a bit more stable, smaller values makes sliding easier (at the cost of easier jittering).
Disabled for 'dynamic' objects that don't rotate, because characters etc. always need smooth sliding.
Should make generic 6DOF constraint more useable, and rigid body stacking more stable (warmstarting was accidently switched off)
If time allows, a few more minor last-minute 2.49 fixes might follow.
Check out http://bulletphysics.com/constraintsTutorial.blend
Fix for the fix: SDL_PauseAudio() doesn't really wait for callback to finish
which can lead to random segfaults if we set audio_scene to 0 afterwards.
So we don't do that.
This fixes:
[#18373] WAV with IPO CURVE: Clicking in playback
by adding linear interpolation between frames. (Old IPOs were only calculated
once per frame which will lead to clicking on steep curves)
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).
in fact I redid part of the last "fix", making it working properly now.
Before we were changing Lamp->la . This is the Blender Lamp, we shouldn't touch it.
So this part of the code is correct now.
Things that could be tackled:
- color attribute is returning negative values when NEGATIVE is toggled
- objects with no material (default gray one) still don't support lamp spots (not spot lamp but the spot of the lamps)
In this commit:
* Added code for freeing NLA data now stored in AnimData
* Started writing some utilities for adding NLA data, especially the 'push-down' concept for Actions
* Cleanups of existing code - removal of obsolete NLA code from various places
Next commits/parts:
* File IO code for new-style NLA data
* Version patching for old data to new data
Four new buttons in World settings to control frame rate:
fps: Nominal frame rate in frame per second.
Also sets the physics timestep = 1/fps
phys: Maximum number of physics timestep per game frame in case
the actual fps is less than nominal. This allows the
physics to keep up with real time even if the graphics slows
down the game.
sub: Fixed number of simulation substeps per physic timestep.
Improves the precision of the physics simulation. Useful for
fast moving objects for example.
log: Maximum number of logic steps per game frame in case the
actual fps is less than nominal. This allows the logic
system to follow the physics simulation.
Upper bound = phys
(setting the value higher than phys has no effect).
On games with heavy logic system, it is useful to set this
value to 1, to keep logic time under control.
All these values were already accessible from Python except phys:
GameLogic.getMaxPhysicsFrame():
Gets the maximum number of physics frame per render frame.
GameLogic.setMaxPhysicsFrame(phys):
Sets the maximum number of physics timestep that are executed per render frame.
Higher value allows physics to keep up with realtime even if graphics slows down the game.
Physics timestep is fixed and equal to 1/tickrate (see setLogicTicRate)
maxphysics/ticrate is the maximum delay of the renderer that physics can compensate.
phys: integer
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.
Compound shape control
======================
1) GUI control
It is now possible to control which child shape is added to
a parent compound shape in the Physics buttons. The "Compound"
shape button becomes "Add to parent" on child objects and
determines whether the child shape is to be added to the top
parent compound shape when the game is stated.
Notes: * "Compound" is only available to top parent objects
(objects without parent).
* Nesting of compound shape is not possible: a child
object with "Add to parent" button set will be added
to the top parent compound shape, regardless of its
position in the parent-child hierarchy and even if its
immediate parent doesn't have the "Add to parent" button set.
2) runtime control
It is now possible to control the compound shape at runtime:
The SetParent actuator has a new "Compound" button that indicates
whether the object shape should be added to the compound shape
of the parent object, provided the parent has a compound shape
of course. If not, the object retain it's individual state
while parented.
Similarly, the KX_GameObject.setParent() python function has
a new compound parameter.
Notes: * When an object is dynamically added to a compound
shape, it looses temporarily all its physics capability
to the benefit of the parent: it cannot register collisions
and the characteristics of its shape are lost (ghost, sensor,
dynamic, etc.).
* Nested compound shape is not supported: if the object
being parented is already a compound shape, it is not
added to the compound parent (as if the Compound option
was not set in the actuator or the setParent function).
* To ensure compatibility with old blend files, the Blender
subversion is changed to 2.48.5 and the old blend files
are automatically converted to match the old behavior:
all children of a Compound object will have the "Add to
parent" button set automatically.
Child ghost control
===================
It is now possible to control if an object should becomes ghost
or solid when parented. This is only applicable if the object
is not added to the parent compound shape (see above).
A new "Ghost" button is available on the SetParent actuator to
that effect. Similarly the KX_GameObject.setParent() python function
has a new compound parameter.
Notes: * This option is not applicable to sensor objects: they stay
ghost all the time.
* Make sure the child object does not enter in collision with
the parent shape when the Ghost option if off and the parent is
dynamic: the collision creates a reaction force but the parent
cannot escape the child, so the force builds up and produces
eratic movements.
* The collision capability of an ordinary object (dynamic or static)
is limited when it is parented: it becomes automatically static
and can only detect dynamic and sensor objects.
* A sensor object retain its full collision capability when parented:
it can detect static and dynamic object.
Python control
==============
KX_GameObject.setParent(parent,compound,ghost):
Sets this object's parent.
Control the shape status with the optional compound and ghost parameters:
compound=1: the object shape should be added to the parent compound shape (default)
compound=0: the object should keep its individual shape.
In that case you can control if it should be ghost or not:
ghost=1 if the object should be made ghost while parented (default)
ghost=0 if the object should be solid while parented
Note: if the object type is sensor, it stays ghost regardless of ghost parameter
parent: KX_GameObject reference or string (object name w/o OB prefix)
This fixes:
[#18007] Audio playback of a scene strip containing audio is broken.
(needed a different recursion protection than video render code, since
video and audio render can be called simultaneously because of SDL audio thread
callbacks)
Also: we don't display a wait cursor, if the scene strip has DOSEQ enabled.
(no need to wait, it is the sequencer which is realtime by definition :)
* 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.