Thomas Dinges [Fri, 3 Jul 2009 14:11:00 +0000 (14:11 +0000)]
2.5 Physic Buttons:
Don't show panels when object is not a mesh.
Ton Roosendaal [Fri, 3 Jul 2009 13:48:42 +0000 (13:48 +0000)]
2.5
Windows #ifdef code missed semicolon.
Ton Roosendaal [Fri, 3 Jul 2009 13:21:09 +0000 (13:21 +0000)]
2.5
More scroller work:
- Added subtle arrow widgets to denote a scroller can zoom the view.
- Made zoom symmetric (old convention to only zoom "one side" just
worked badly)
Campbell Barton [Fri, 3 Jul 2009 11:46:46 +0000 (11:46 +0000)]
fix for own missing var in recent commit.
Joshua Leung [Fri, 3 Jul 2009 11:24:52 +0000 (11:24 +0000)]
2.5 - Additional warning fix
Joshua Leung [Fri, 3 Jul 2009 11:22:32 +0000 (11:22 +0000)]
2.5 - Quick compiling fix for Ton's commit
Patch (http://www.pasteall.org/6436/diff) by skejoe. Thanks.
Ton Roosendaal [Fri, 3 Jul 2009 10:54:39 +0000 (10:54 +0000)]
2.5
Upgrading text editor to draw new scrollbar too.
Matt Ebb [Fri, 3 Jul 2009 09:23:12 +0000 (09:23 +0000)]
* Fix for compiling with cmake on OS X. Hopefully this goes ok for other platforms too.
Campbell Barton [Fri, 3 Jul 2009 04:38:55 +0000 (04:38 +0000)]
set the PYTHONPATH to BLI_gethome_folder("python") if it exists.
This lets us distribute blender with our own python module directory (next to ui and io), and avoids the need for a shell script to start blender.
Campbell Barton [Thu, 2 Jul 2009 22:22:35 +0000 (22:22 +0000)]
cmake support for building without fluidsim
Brecht Van Lommel [Thu, 2 Jul 2009 19:41:31 +0000 (19:41 +0000)]
2.5: Physics Buttons
All kinds of changes to get it ready for UI layouts. This means RNA
and operators should be working correct, but most buttons are still
not actually there yet.
* Added near empty soft body, fluid, field and collision panels,
tweaks to cloth panels.
* Fluid bake works, but without escape or showing any progress.
* Fluid/Softbody/Cloth/Collision can now be both added as modifiers
or in the physics panels.
* Missing: fields & soft body for particles.
* Missing: proper updating softbodies, guess this code still needs
updates after pointcache refactor?
Ton Roosendaal [Thu, 2 Jul 2009 18:12:46 +0000 (18:12 +0000)]
2.5
Cleanup of scroller drawing in 2D windows.
Before:
http://download.blender.org/institute/rt11.jpg
After:
http://download.blender.org/institute/rt12.jpg
Will add 'zoom' widget circles later, as mockupped here:
http://www.reynish.com/files/blender25/fcurve_scrollbar.png
Also note the scale values are inside scroller; drawing it
on top conflicts with current frame item and markers.
Currently scroller disappear entirely when view is total.
For Joshua:
To make sliders behave nicely, the boundbox (v2d->tot) has to
be refreshed on each change. I've added it in graph drawing
now, but it could be notifier based I guess... not sure what
the correct anim api call would be. Can discuss tomorrow!
On todo:
Layout config hints so people can make scroller positions swap.
Campbell Barton [Thu, 2 Jul 2009 12:11:20 +0000 (12:11 +0000)]
out own Py_GetPath() function to replace pythons, so we can bundle python modules with blender, #if 0'd for now but having it is useful for testing.
This works by copying /usr/lib/python3.1 to a dir called "python", next to blenders "ui" and "io" dirs.
Ton Roosendaal [Thu, 2 Jul 2009 11:24:27 +0000 (11:24 +0000)]
2.5
Python definition of view3d context-depending toolbar. Feel free to edit
it into anything useful. :)
Ton Roosendaal [Thu, 2 Jul 2009 11:23:19 +0000 (11:23 +0000)]
2.5
More toolbar functionality for workflow review.
- Split the region in two parts, bottom has the Tool Properties, the
top part shows 2 panels, one for python defined tools, other for a
"tool shelf" which (later) will get saved in files.
- Added a full context driven framework for this toolbar, showing
the tools depending on 3D window 'mode'. Both python defined tools
as the shelf respect this. So - for example - you will see different
tools in editmode mesh, as in vertex paint mode, etc.
- First template for the python tools will be committed after this commit;
it has placeholder tools to just show/test functioning.
NOTE: if you had saved a layout that shows tools region, open/close it
once to get the new region created for properties.
TODO:
- Moving paint properties to tool settings
- Test a layout with horizontal toolbar (without properties)
- Bring back floating panels, and put tool-properties here. (as option)
Brecht Van Lommel [Wed, 1 Jul 2009 22:25:49 +0000 (22:25 +0000)]
2.5: Lists for vertex groups, shape keys, uvs, vertex colors.
RNA
* Added the relevant active_*_index properties, with proper
get/set/range, updates and notifiers.
* Context.tool_settings.
* ToolSettings.vertex_group_weight.
Operators
* MESH_OT_uv_texture_add/remove
* MESH_OT_vertex_color_add/remove
* MESH_OT_sticky_add/remove
* OBJECT_OT_vertex_group_add/remove/assign/remove_from/
select/deselect/copy/copy_to_linked
* OBJECT_OT_shape_key_add/remove
UI
* Some updates and cleanups in list template code.
Known issue: when going in & out of editmode, uv textures and vertex
colors dissappear. I thought me->edit_mesh would be NULL when not in
edit mode but it is not?
Brecht Van Lommel [Wed, 1 Jul 2009 22:16:16 +0000 (22:16 +0000)]
2.5: Fix a case of using freed memory in event handling.
Campbell Barton [Wed, 1 Jul 2009 20:55:32 +0000 (20:55 +0000)]
needed for building with py2
Elia Sarti [Wed, 1 Jul 2009 19:56:50 +0000 (19:56 +0000)]
Added support for collection parameters also for RNA_function_call_direct family of functions. The syntax for passing collection parameters is similar to passing pointers where you pass first the RNA type and then the ListBase representing the collection. The format specifier is "C" instead of "O", e.g.
RNA_function_call_direct_lookup(C, reports, ptr, "do_something", "sC", "some string value", &RNA_SomeItemType, listbase);
Note that from python you could in theory pass collections of items each of a different type while using this API you can't. I don't think this should be a problem as RNA supports collections this way anyway (i.e. where items are all of the same type or inherit from the same base type).
Also a small fix for pointer parameters.
Campbell Barton [Wed, 1 Jul 2009 13:31:36 +0000 (13:31 +0000)]
slice support working in py3 for Vector and Matrix types.
Added slice to PyRNA collections and arrays (py3 only).
eg.
some_verts = mesh.verts[0:10]
some_rna_array[4:-1] = [0,1,2,3]
Collections dont support assignment, when assigning slices, resizing the array isnt support like with python lists.
Brecht Van Lommel [Wed, 1 Jul 2009 12:19:00 +0000 (12:19 +0000)]
RNA
* Mesh.add_geometry, Mesh.update and make indices editable. This
is without checking if they are valid still, no time now to
implement this.
* Also fix warnings in rna_ui.c, and a bug in CDDM_calc_edges.
Example code:
co = [0.0, 0.0, 0.0] + [1.0, 0.0, 0.0] + [0.0, 1.0, 0.0] + [1.0, 1.0, 0.0]
faces = [0, 1, 2, 0] + [1, 3, 2, 0]
mesh.add_geometry(4, 0, 2)
mesh.verts.foreach_set("co", co)
mesh.faces.foreach_set("verts", faces)
mesh.update()
Nicholas Bishop [Tue, 30 Jun 2009 23:06:50 +0000 (23:06 +0000)]
2.5/Sculpt:
== Re-added smooth stroke ==
UI: toggle is just in the sculpt menu for now. Also changes the sculpt paint cursor slightly, draws a line between previous and current locations.
It's a different implementation than in 2.4, works like this:
The stroke interpolates between the last mouse location and the current location, weighted towards the previous location. If the stroke gets within a certain radius of the current mouse location, the stroke stops. This radius allows for sharp turns in the stroke.
Todo: there are two hard-coded parameters that should become user settable, that's the weighting between previous and current locations, and most important, the no-update radius.
Note also that this option was added as a per-brush flag, worth discussing whether that's the correct place, or whether it should be a sculpt setting like symmetry?
== Improved stroke spacing ==
The previous implementation of stroke spacing simply guaranteed that stroke dots would not occur any closer than the space setting. It now forces stroke dots to always be the specified distance apart.
Todo: Performance gets pretty awful with a small spacing setting, this needs optimization.
Campbell Barton [Tue, 30 Jun 2009 21:59:21 +0000 (21:59 +0000)]
disabling foreach_get/set for python2.x, since it uses new buffer api.
Andrea Weikert [Tue, 30 Jun 2009 20:34:00 +0000 (20:34 +0000)]
2.5 filebrowser
* show only name of the last directory for the bookmark
* small fix of projectfile: header BLI_fileops.h was moved
Note: full path should appear in tool tip later, also for renaming bookmarks later on.
Andrea Weikert [Tue, 30 Jun 2009 20:31:58 +0000 (20:31 +0000)]
2.5 MSVC projectfiles
* small maintenance: editors/info_header.c removed, editors/info_ops.c added
Tom Musgrove [Tue, 30 Jun 2009 20:14:53 +0000 (20:14 +0000)]
Reverting changes made for laptop/two button mice - will make the changes available as a patch.
Shaul Kedem [Tue, 30 Jun 2009 19:29:40 +0000 (19:29 +0000)]
second part of python2.6 upgrade in cmake, now it will copy the dlls too
Brecht Van Lommel [Tue, 30 Jun 2009 19:20:45 +0000 (19:20 +0000)]
2.5
Image Window
* Unpack operator now works.
* Some small layout code tweaks.
Info Window Header
* Moved to python UI code.
* template_running_jobs, template_operator_search added.
* Ported external data operators: pack/unpack all, make
paths relative/absolute, find/report missing files.
Also
* Report RPT_INFO too, not only warnings and errors.
* Run UI handle functions after RNA and Operators.
* Rename particle system add/remove operators, to not
include "slot", that's only there for materials because
that's what they are called now in RNA.
Brecht Van Lommel [Tue, 30 Jun 2009 19:10:14 +0000 (19:10 +0000)]
RNA
* Add Image.dirty boolean.
* Added Window struct, with editable Window.screen.
* Make Screen.scene editable.
Andrea Weikert [Tue, 30 Jun 2009 18:29:30 +0000 (18:29 +0000)]
2.5 filebrowser
* Hide dot operator (HKEY) for theeth
Andrea Weikert [Tue, 30 Jun 2009 18:20:45 +0000 (18:20 +0000)]
2.5 MSVC projectfiles
* moving projectfiles to python 2.6 to avoid recurring issues with python migration
Shaul Kedem [Tue, 30 Jun 2009 18:20:12 +0000 (18:20 +0000)]
windows cmake uses python26 now, make sure your lib/windows is up to date (requires an additional svn update, in lib/windows
Campbell Barton [Tue, 30 Jun 2009 12:52:16 +0000 (12:52 +0000)]
python access to RNA arrays.
coords = array.array('f', [0.0]) * len(me.verts) * 3
m.verts.foreach_get('co', coords)
the reverse works with set also.
currently works for python buffers or sequences (slower)
Quick speed test with 1,179,654 verts.
*foreach_get*
list 0.377
array 0.032
py 10.29
*foreach_set*
list 0.184
array 0.028
py 9.79
where python was done like this...
----
i= 0
for v in m.verts:
co = v.co
l[i] = co[0]; l[i+1] = co[0]; l[i+2] = co[0]
i+=3
----
some of the error checking here needs to be cleaned up to account for different invalid bad inputs.
Andrea Weikert [Tue, 30 Jun 2009 06:27:48 +0000 (06:27 +0000)]
2.5 file browser
* adding GPL copyright header.
Campbell Barton [Tue, 30 Jun 2009 00:42:17 +0000 (00:42 +0000)]
Python API
Mathutils support for subclassing Vector, Quat, Euler and Matrix types.
Removed C docstrings, prefer to make sure our epydocs are well maintained rather then duplicate, vague doc strings.
Will convert scripts to detect missing docs from the BGE.
Andrea Weikert [Mon, 29 Jun 2009 23:21:11 +0000 (23:21 +0000)]
2.5 file browser
* remove '.' and '..' from file browser list. sigh!
* removed delete buttons from automatically added bookmarks (Desktop and Documents)
Note: please check on non-Windows platforms
Andrea Weikert [Mon, 29 Jun 2009 22:16:48 +0000 (22:16 +0000)]
2.5 file browser
* bookmark operators: add and delete bookmark
* first start at menus in file browser: Directory and Bookmarks
* Adding a bookmark via menu or via CTRL+B
* Remove a bookmark with the X button next to it.
Tom Musgrove [Mon, 29 Jun 2009 21:07:33 +0000 (21:07 +0000)]
This commit adds Alt-LMB as an alternative to MMB, and CTRL-ALT-LMB as an alternative to CTRL-MMB so that laptop users can use 2.5
Andrea Weikert [Mon, 29 Jun 2009 20:23:40 +0000 (20:23 +0000)]
2.5 filebrowser
* start of filebrowser RNA
* system files, bookmarks, etc. now nicely inside panels to allow collapsing etc.
* filebrowser header now defined in space_filebrowser.py
TODO:
* button type for bookmarks etc. not final yet, at least should get centered still. Suggestions welcome here.
Guillermo S. Romero [Mon, 29 Jun 2009 19:46:28 +0000 (19:46 +0000)]
Fix compiler warning, make for body explicit.
Brecht Van Lommel [Mon, 29 Jun 2009 19:37:09 +0000 (19:37 +0000)]
2.5: fix for compile error after recent search menu commit.
Brecht Van Lommel [Mon, 29 Jun 2009 19:15:51 +0000 (19:15 +0000)]
RNA
Implementation of RNA side of foreach_get/foreach_set,
Campbell will do python code.
Three functions for efficiently setting some property for all
items in a collection. RNA_property_collection_raw_array gives
access to the properties as an array with length, stride, and
type specified, if this is possible, i.e. not when it uses a
ListBase, or if a manual get/set function is implemented.
Two other functions take a C array pointer and get/set it
using the a collection + property name, using efficient array
access if possible, and otherwise using slower RNA iterator.
RNA_property_collection_raw_get
RNA_property_collection_raw_set
The number of type conversion required here got a bit out of
hand, it could be more efficient still if checking for more
cases, but function is already long enough.
Example: http://www.pasteall.org/6362/c
Campbell Barton [Mon, 29 Jun 2009 12:06:46 +0000 (12:06 +0000)]
BGE PyAPI support for subclassing any BGE game type from python, scripters define extra functions on gameObjects.
Adding a UI to set the type on startup can be added easily.
# ----
class myPlayer(GameTypes.KX_GameObject):
def die(self):
# ... do stuff ...
self.endObject()
# make an instance
player = myPlayer(gameOb) # gameOb is made invalid now.
player.die()
# ----
One limitation (which could also be an advantage), is making the subclass instance will return that subclass everywhere, you cant have 2 different subclasses of the same BGE data at once.
Ton Roosendaal [Mon, 29 Jun 2009 11:29:52 +0000 (11:29 +0000)]
2.5
Search Menu: added feature that on opening, it shows the
current ID block, and selects it. Same can be used for other
searches, just pass on pointer to active item for the search
callback.
Also fixed arrow triangle draw for search.
Campbell Barton [Mon, 29 Jun 2009 02:25:54 +0000 (02:25 +0000)]
BGE Py API using python3 c/api calls. include bpy_compat.h to support py2.x
Ton Roosendaal [Sun, 28 Jun 2009 18:09:19 +0000 (18:09 +0000)]
2.5
Make include to make GE compile.
Py 2.3 doesnt compile expressions/Value.cpp btw...
Value.cpp:616: error: 'class PyObjectPlus' has no member named 'ob_type'
Probably need to wait for py 3.1 :)
Ton Roosendaal [Sun, 28 Jun 2009 16:31:20 +0000 (16:31 +0000)]
2.5
Starting GE should initialize opengl for the 3d region.
Elia Sarti [Sun, 28 Jun 2009 13:41:50 +0000 (13:41 +0000)]
2.5 / RNA
Return right size for PROP_COLLECTION parameters
Campbell Barton [Sun, 28 Jun 2009 13:27:06 +0000 (13:27 +0000)]
PyNumberMethods needed ifdefs for python3.x and some other corrections.
Ton Roosendaal [Sun, 28 Jun 2009 12:30:50 +0000 (12:30 +0000)]
2.5
Menu usage: enabled arrow-key based browsing, especially for open and
close sublevels. Only thing missing is to prevent sublevel to open
on creating menu (like SHIFT+A now), this is design conflict in code.
(It sends fake mouse move events causing it)
Implementation note; the 'auto open sublevel' feature gets triggered
with new state var, that checks if mouse was used or not.
Also: on render in editmode, editmode result gets stored, as usual for 2.4x.
Elia Sarti [Sun, 28 Jun 2009 11:37:45 +0000 (11:37 +0000)]
Zeroing listbase result for context data collection get when no data is found.
Caused crash for uninitialized pointers when getting collection data for editors not supporting that member, e.g. "deselect all" operator in non-3dview editors.
Campbell Barton [Sun, 28 Jun 2009 11:22:26 +0000 (11:22 +0000)]
BGE Python API
Remove the last of the odd C++/python wrapper code from http://www.python.org/doc/PyCPP.html (~1998)
* Use python subclasses rather then having fake subclassing through get/set attributes calling parent types.
* PyObject getset arrays are created while initializing the types, converted from our own attribute arrays. This way python deals with subclasses and we dont have to define getattro or setattro functions for each type.
* GameObjects and Scenes no longer have attribute access to properties. only dictionary style access - ob['prop']
* remove each class's get/set/dir functions.
* remove isA() methods, can use PyObject_TypeCheck() in C and issubclass() in python.
* remove Parents[] array for each C++ class, was only used for isA() and wasnt correct in quite a few cases.
* remove PyTypeObject that was being passed as the last argument to each class (the parent classes too).
TODO -
* Light and VertexProxy need to be converted to using attributes.
* memory for getset arrays is never freed, not that bad since its will only allocates once.
Ton Roosendaal [Sun, 28 Jun 2009 09:35:37 +0000 (09:35 +0000)]
2.5
Bugfixes:
- Preview Icon for render result crashed, there was still need for a scene
pointer to be passed on.
- Added quick fix for preventing shaded drawmode to call render while
rendering is in progress. It crashes badly.
Rendering while UI is alive is still in probation, most UI stuff will
probably get blocked, with exception from inspecting buttons and using
the image window.
Andrea Weikert [Sun, 28 Jun 2009 07:26:16 +0000 (07:26 +0000)]
2.5 MSVC 9 projectfiles
* added missing include to KX_blenderhook project
Campbell Barton [Sun, 28 Jun 2009 02:47:49 +0000 (02:47 +0000)]
removed un-needed hack, something weired was going on when debugging that made the pointers to these functions change after initialization.
Campbell Barton [Sun, 28 Jun 2009 02:37:07 +0000 (02:37 +0000)]
BGE Fix for no redrawing.
Was caused by un-initialized engine ticrate, do_versions was working on 2.4x but isnt in 2.5 so just add a zero check when getting from the world.
Campbell Barton [Sat, 27 Jun 2009 23:54:20 +0000 (23:54 +0000)]
BGE Redraw problem:
at the moment only files from blender 2.4x will display in 2.5x, compared area and window structs in both cases and dont see any differences.
This doesnt fix the problem but corrects a few things related to window drawing with the BGE,
also adds a hack because I noticed the window and area pointers in the KX_BlenderCanvas were offset after initialized, maybe need to use <static cast> ?
Campbell Barton [Sat, 27 Jun 2009 22:48:39 +0000 (22:48 +0000)]
CMake patch from Alexander Neundorf
-under UNIX, it uses FIND_PACKAGE() to find the jpg, png and zlib libraries
-it removes the explictely listed search paths, which are already searched by
default, so it is not necessary to list them again explicitely
-it removes the include directories /usr/include
and /usr/local/include. /usr/include is used by default, all other
directories should be searched via find_package/find_file and then added to
the include directories.
-replaces the include() commands for the FindXXX.cmake
modules with the appropriate find_package(Foo) calls.
This doesn't change the behaviour, but gives more features.
E.g. you could now say
find_package(JPEG REQUIRED)
and cmake will abort with an error if the package is not found.
Also it makes it clearer what is going on.
Additionally the patch removes the line
INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake)
in the Windows if-branch.
Why was this there ? This file should be included anyway under Windows when
using the MS compiler.
Nicholas Bishop [Sat, 27 Jun 2009 21:14:04 +0000 (21:14 +0000)]
2.5/Sculpt:
Improved sculpting in perspective mode; starting a stroke on the background would sometimes result in the brush having a huge effect on the mesh. Fixed by waiting to start the stroke until the mouse moves over the model.
The fix is not quite perfect, because detection of the edge of the model is based on the depth buffer, so other things that change the depth buffer, like the grid and axis lines in the 3d view, can throw off the calculation.
Nicholas Bishop [Sat, 27 Jun 2009 17:10:19 +0000 (17:10 +0000)]
2.5/Sculpt:
Removed a bunch of old code that was #ifdef'd out. Mostly relates to partial visibility and partial redraw. Both of these are important features, but need better design updated for 2.5.
Also removed the old (huge/ugly!) sculpt() function that is now handled by the stroke operator code.
Ton Roosendaal [Sat, 27 Jun 2009 16:35:42 +0000 (16:35 +0000)]
2.5
Two bugfixes:
- When making 2d windows small (zero sized) the view2d data could get
corrupted with NaN values. Clipped values correctly to 1.
- Search menu (ctrl+alt+f) had wrong color for selected text in text
button
Janne Karhu [Sat, 27 Jun 2009 15:41:47 +0000 (15:41 +0000)]
Particle ID block controls:
* Adding/removing particle systems to an object.
* Changing of particle settings.
* Currently showing an object's particle systems in a list (like materials).
Janne Karhu [Sat, 27 Jun 2009 15:28:58 +0000 (15:28 +0000)]
Pointcache refresh part 2
* Based on what happens during simulation the cache is marked (also in cache panel, this could possibly be extended to 3d view as well) as:
- exact (not marked)
- outdated (simulation is not done completely with current settings)
- non-exact (frames were skipped during simulation)
* The parameter "cache step" effects the number of frames between saved cache frames.
- This can save a lot of memory (or disk space) if absolutely frame accurate simulation is not required.
- Speeds up the "quick caching" very much.
- Frames between cached frames are interpolated from the cached frames.
- Current default value of 10 frames works nicely with up/down-arrows (skip 10 frames forwards/backwards on timeline), but can be changed if wanted.
* The caching can work in normal or "quick" mode:
[Normal cache]
- Basic: Calculate what even happens (settings change, big frame steps etc.) and cache results, if possible try to use "cache step" when saving cache frames.
- Becomes non-exact: After larger than 1 frame steps.
- Becomes outdated: After any change effecting the simulation other than frame steps.
- Pros/cons: Freedom of doing anything and playing with particles, but exact results have to calculated from the beginning.
[Quick cache]
- Basic: Calculate simulation up to current frame automatically on changes with cache step sized jumps in simulation. With multiple "quick cached" simulations the smallest cache step is used.
- Becomes non-exact: Always from frame 1 (unless cache step = 1).
- Becomes outdated: Never.
- Pros/cons: Not very accurate, but super fast!
- Todo: Transform of any animated (non-autokeyed) object is locked! Probably needs some tinkering with anim sys overrides.
* The simulation can be run forwards or backwards even if it's cache is outdated or non-exact, the following rules apply in these situations:
- step forwards (to unknown) -> simulate from last exact frame, store result
- step backwards (to known) -> result is interpolated from existing frames, store result, clear cache forwards if current frame is after last exact frame
* "Calculate to current frame" runs the simulation from start to current frame with a frame steps of 1.
- Baking does the same, but runs the simulation all the way to the end of simulation.
- Rendering does this automatically if the simulation is outdated of non-exact, so all rendered simulations will always be updated and exact.
* Every cache panel also holds buttons to "Bake all dynamics", "Free all dynamics" and "Update all dynamics to current frame".
* Cloth simulation supports the new cache too.
Ton Roosendaal [Sat, 27 Jun 2009 15:21:37 +0000 (15:21 +0000)]
2.5
Test commit; toolbar has 'add operator' menu in mesh editmode.
Nothing stored, freed here...
Also: removed reading .B.blend, since a much better default has
been compiled in now, prevents confusing testers who run 2.5
for the first time. :) Of course .B25.blend still works.
Brecht Van Lommel [Sat, 27 Jun 2009 14:35:24 +0000 (14:35 +0000)]
UI:
* Fix issue with icon not being left-aligned in text field.
* Put modifier tab after data tab in buttons header.
Brecht Van Lommel [Sat, 27 Jun 2009 14:07:17 +0000 (14:07 +0000)]
UI: move bone constraints panel to bone tab again.
Brecht Van Lommel [Sat, 27 Jun 2009 14:02:21 +0000 (14:02 +0000)]
RNA: move softbody flags from Object to SoftBodySettings.
Thomas Dinges [Sat, 27 Jun 2009 13:20:19 +0000 (13:20 +0000)]
2.5 RNA:
* Added more softbody properties (collision, solver) and some flags in object RNA.
Ton Roosendaal [Sat, 27 Jun 2009 13:10:18 +0000 (13:10 +0000)]
2.5
Mesh editmode fix: Add new primitive often was on wrong location.
Viva Vazquez testing! :)
Ton Roosendaal [Sat, 27 Jun 2009 12:41:28 +0000 (12:41 +0000)]
2.5
Bugreport; on dragging area edges, the mouse-release event was
swallowed by the panel animation handler. Thanks Pablo Vazquez
for report. :)
Thomas Dinges [Sat, 27 Jun 2009 11:57:50 +0000 (11:57 +0000)]
2.5 RNA:
* Started Wrapping softbody RNA.
Brecht Van Lommel [Sat, 27 Jun 2009 01:15:31 +0000 (01:15 +0000)]
UI
* Search popup + autocomplete for bones, vertex groups, etc. This
is done with layout.item_pointerR, specifying an RNA collection to
take the items from. Used by constraints and modifiers.
* Some tests with the List template, ignore those for now..
Brecht Van Lommel [Sat, 27 Jun 2009 01:10:39 +0000 (01:10 +0000)]
RNA
* Added support for passing collections to/from RNA functions,
this is done using a ListBase of CollectionPointerLink, which
is a standard ListBase link + PointerRNA.
* Added editable active uv/vcol layer to Mesh.
* Armature.bones now includes all bones, not only the ones without
parents.
* Modifier UV layer fields now are allowed to be empty, previously
this would set the name during modifier evaluation if there was
none.
Ton Roosendaal [Fri, 26 Jun 2009 15:48:09 +0000 (15:48 +0000)]
2.5
Part one (of probably many :) of Operator review/validation.
Nothing final nor defined, it's reseach :)
- Added tool buttons in "Toolbar" (Tkey). Just four examples
for objectmode, and six for mesh editmode.
(Review in progress is operator internal state vs context, what
do redo exactly, undo vs redo syncing, when op->invoke or not,
etc. This has to be pinned down exactly and frozen asap)
- On undo, clear redo-operator-stack for now (won't work)
- Added call to better detect active/current view3d region.
ED_view3d_context_rv3d(C)
- Fixed some operators that missed correct redo (add-prim etc).
Later more fun!
Ton Roosendaal [Fri, 26 Jun 2009 12:55:46 +0000 (12:55 +0000)]
2.5
Makes toolbar region in 3d editor work correctly overlapping, also
when area is subdivided in 4-split, and/or with properties region.
Campbell Barton [Thu, 25 Jun 2009 20:47:41 +0000 (20:47 +0000)]
Made Mathutils use radians rather then degrees. defining USE_MATHUTILS_DEG for testing existing scripts.
Added conversion for BGE Quaternion WXYZ (Blender/C) -> XYZW (Moto C++).
BGE Python API now uses WXYZ following mathutils (break script warning).
Ton Roosendaal [Thu, 25 Jun 2009 15:41:27 +0000 (15:41 +0000)]
2.5
Rendering preview icons is back!
Note for Andrea: the render code has been decoupled from
drawing, it needs Scene context to be able to run...
At the moment only the search menu calls the new render
code (which is the ID browse menu default anyway)
Campbell Barton [Thu, 25 Jun 2009 10:11:37 +0000 (10:11 +0000)]
PyAPI RNA/BGE
* all mathutils types now have optional callbacks
* PyRNA returns mathutils quat and euler types automatically when they have the rotation subtype.
* PyRNA, reuse the BPy_StructRNA PyObject rather name making a new one for each function returned.
* use more arithb.c functions for Mathutils quaternion type (less inline cruft).
* BGE Mathutils integration mostly finished- KX_PyMath now converts to Mathutils types rather then lists.
* make all mathutils types share the same header so they can share a number of functions - dealloc, getWrapped, getOwner.
Brecht Van Lommel [Wed, 24 Jun 2009 21:27:10 +0000 (21:27 +0000)]
2.5: File Selector: display operator properties in the side region,
check Save Image or Export PLY operator for example.
Also these code changes:
* Added some RNA collection iterator macros to simplify code.
* Fix bpy.props.BoolProperty not working correct.
* Merge uiDefAutoButsRNA/uiDefAutoButsRNA_single into one.
Brecht Van Lommel [Wed, 24 Jun 2009 18:39:00 +0000 (18:39 +0000)]
2.5: bug fixes for some erratice materials buttons drawing.
Ton Roosendaal [Wed, 24 Jun 2009 17:57:10 +0000 (17:57 +0000)]
2.5
Bugfix: added refresh for modifiers for enable/disable
Ton Roosendaal [Wed, 24 Jun 2009 17:22:22 +0000 (17:22 +0000)]
2.5
- Added ND_SHADING notifier on linking materials, so it gives
refreshes in UI
- Removed reduntant debug prints
Crucial fixes in other code while checking warnings;
- Particle buttons were assigned to short, whilst data was int
- Filesel border select used float rect API, on an int rect.
Ton Roosendaal [Wed, 24 Jun 2009 16:44:54 +0000 (16:44 +0000)]
2.5
Added support for icons in search menu.
It already displays icons for saved materials etc. from old files.
Have to add previewrenders for this still.
Brecht Van Lommel [Wed, 24 Jun 2009 14:16:56 +0000 (14:16 +0000)]
UI
* Added SCROLL button type, use like a NUMSLI basically, with
a1 used to define the scroller size.
* Add scroll and toggle colors to the Theme (toggle was set to
draw like radio in a recent commit, but it's the intention
these look different).
* Added rudimentary list template, used for object material
slots, this is WIP though.
* In popup menu, split text with line breaks over multiple
lines, makes python errors display slightly nicer.
Brecht Van Lommel [Wed, 24 Jun 2009 14:07:48 +0000 (14:07 +0000)]
2.5: Object material slot operators add/remove/assign/select/deselect.
Brecht Van Lommel [Wed, 24 Jun 2009 14:03:55 +0000 (14:03 +0000)]
RNA
* RNA_struct_name_get_alloc function to get the name from a
pointer, instead of having to deal with name property.
* CTX_data_pointer_get_type to get data from context with
a check for the RNA type.
Ton Roosendaal [Wed, 24 Jun 2009 13:44:19 +0000 (13:44 +0000)]
2.5
Medium sized Color Picker; consisting of number sliders, row buttons to
select rgb/hsv/hex, HS circle and V slider. It opens persistant, like
old picker.
This one opens default, other two can be accessed with ALT or SHIFT click.
On todo;
- eyedropper tool back
- method for click-drag to make mini picker appear
Note for UI coders (brecht :), added a UI_HIDDEN flag in buttons, to
support switching buttons in menus. Hidden buttons are not activated nor
drawn.
Joshua Leung [Wed, 24 Jun 2009 10:48:37 +0000 (10:48 +0000)]
2.5 - Quick compiling fix for particles-animation commit earlier. For some reason, compilation was broke on some compilers.
Joshua Leung [Wed, 24 Jun 2009 02:11:36 +0000 (02:11 +0000)]
2.5 - Particle Settings now Animateable
Added AnimData to ParticleSettings so that this will work. This seems to be ok in the brief tests I did, but be warned that this may not be optimal for the Particles System...
Diego Borghetti [Tue, 23 Jun 2009 18:26:01 +0000 (18:26 +0000)]
New Style option: Overlap
If this option is enable, the blenfont check for overlap characters, like
one of my previous commit but now it's optional and disable by default.
(This fix the "Fi" or other case when the characters are too close)
Enable/disable from:
Outliner -> User Preferences -> Styles -> Panel Font -> Overlap
(also for other styles, Group Label, Widget, Widget Label)
Hamed Zaghaghi [Tue, 23 Jun 2009 17:30:18 +0000 (17:30 +0000)]
fix ui issues of space_logic
Campbell Barton [Tue, 23 Jun 2009 17:10:46 +0000 (17:10 +0000)]
modified patch from Arystanbek, allow assigning of mathutils matrix to an rna matrix
Ton Roosendaal [Tue, 23 Jun 2009 17:06:46 +0000 (17:06 +0000)]
2.5
Removing editors/include export from Make, it's not needed luckily :)
Ton Roosendaal [Tue, 23 Jun 2009 16:57:46 +0000 (16:57 +0000)]
2.5
Game engine Makefile update.
Note to coders: including BLO_ for only intptr typedef is ehh... not
so nice. But it should not have been added there in first place.
(BLO_ = .blend file read/write). Nice for a future cleanup. :)
Also goes for ED_ includes btw, = bad level call for GE! If you need
it to get things work now, fine, but it will make player impossible.
Diego Borghetti [Tue, 23 Jun 2009 16:27:35 +0000 (16:27 +0000)]
Move shadow option (for text) from editor/interface to blenfont.
Two new function:
BLF_shadow: set the level (for blur) and the shadow color.
BLF_shadow_offset: set the x and y offset for shadow.
(this is the current position plus offset)
By default shadow is not enable in the font, so before draw the
text you need call BLF_enable(BLF_SHADOW), also remember disable
the option in the end.
Campbell Barton [Tue, 23 Jun 2009 13:34:45 +0000 (13:34 +0000)]
PyRNA API support for matrix types as Mathutils matrix (with callbacks) rather then a generic rna sequence of floats.
Any 3x3 or 4x4 rna matrix will automatically be returned as a Mathutils matrix.
This makes useful stuff like multiplying a vector location by an object matrix possible.
ob = bpy.data.scenes[0].objects[0]
print (ob.data.verts[0].co * ob.matrix)
Also added mathutils matrix types to the BGE GameObject.localOrientation, worldOrientation
* MT_Matrix3x3 added getValue3x3 and setValue3x3, assumed a 4x3 float array.
* KX_GameObject.cpp convenience functions NodeSetGlobalOrientation, NodeGetLocalOrientation, NodeGetLocalScaling, NodeGetLocalPosition.
* 2.5 python api now initializes modules BGL, Mathutils and Geometry
* modules py3 PyModuleDef's use PyModuleDef_HEAD_INIT, rather then {}, was making msvc fail to build.
* added macros for Vector_ReadCallback, Vector_WriteCallback etc. to check if the callback pointer is set before calling the function.
Campbell Barton [Tue, 23 Jun 2009 12:36:15 +0000 (12:36 +0000)]
small changes...
- allow RNA_property_enum_items to take the totitems int pointer as NULL (spares a loop on all the enum items). this change also makes enums types with no enum array crash in some places, could support these though Id rather disallow them, generating docs is a quick way to test for this.
- open recent file operator used and enum to open the recent file without an enum array, changed to an int type.
- added space_logic.py poll functions
Joshua Leung [Tue, 23 Jun 2009 11:28:48 +0000 (11:28 +0000)]
2.5 - Icons for Modifiers in Modifier Template
As per William's mockup - http://www.reynish.com/files/blender25/modifiers.png
Thomas Dinges [Tue, 23 Jun 2009 11:16:27 +0000 (11:16 +0000)]
2.5 Icons:
* Added lamp icons.
Thomas Dinges [Tue, 23 Jun 2009 11:00:35 +0000 (11:00 +0000)]
2.5 Icons:
* Modifier Icons are now shown in the add modifier menu.