Campbell Barton [Thu, 9 Jul 2009 09:07:25 +0000 (09:07 +0000)]
Patch from William
"moving the ID browser into its own panel. Eventually these panels should loose their headers to distinguish them from other, normal panels. Also a few other fixes for bones and armature panels."
Campbell Barton [Thu, 9 Jul 2009 08:39:58 +0000 (08:39 +0000)]
operator rename
VIEW3D_OT_viewhome -> VIEW3D_OT_view_all
VIEW3D_OT_viewcenter -> VIEW3D_OT_view_center
VIEW3D_OT_clipping -> VIEW3D_OT_clip_border
Campbell Barton [Thu, 9 Jul 2009 08:06:26 +0000 (08:06 +0000)]
Dictionary style get() to property rna.
eg..
mesh = bpy.data.meshes.get("SomeMesh", fallback)
Set length limits for python string formatting.
Campbell Barton [Thu, 9 Jul 2009 07:35:35 +0000 (07:35 +0000)]
removed check for pyc when scanning the directory of python files.
Brecht, double checked and pyc or pyo files arent used because of the (file_extension[3] == '\0') test.
Martin Poirier [Thu, 9 Jul 2009 02:45:48 +0000 (02:45 +0000)]
Hooking transform operators with manipulator.
It's just a straight application of the normal operator for now, none of the normal manipulator goodies yet (no draw code and you have to click to confirm).
Martin Poirier [Thu, 9 Jul 2009 01:52:54 +0000 (01:52 +0000)]
Reduce multiplication factor for trackball input in transform (slows down trackball rotation)
Martin Poirier [Thu, 9 Jul 2009 01:48:08 +0000 (01:48 +0000)]
Cosmetic changes in etch-a-ton drawing code, mostly.
Remigiusz Fiedler [Wed, 8 Jul 2009 22:49:35 +0000 (22:49 +0000)]
mingw-config.py prepared for work with python 2.5 and 2.6 controlled by only one parameter: BF_PYTHON_VERSION.
It needs the files: libpython25.a and libpython26.a to be copied to \\lib\windows\python\lib\
Brecht Van Lommel [Wed, 8 Jul 2009 21:41:35 +0000 (21:41 +0000)]
2.5:
* Rename OT_duplicate_add, to OT_duplicate. Also fixes warning
print since I forgot to do this in the toolbar for MESH.
Brecht Van Lommel [Wed, 8 Jul 2009 21:31:28 +0000 (21:31 +0000)]
2.5: Mesh and Various Fixes
* 3D view Mesh menu works again, but incomplete.
* Add Properties and Toolbar to 3D View menu.
* Added "specials" menus back, vertex/edge/face and general.
* Various fixes in existing mesh operators, some were not working.
* Add MESH_OT_merge.
* Merge all subdivide ops into MESH_OT_subdivide, subdivide code
changes to make smooth + multi give good results.
* Rename all select inverse ops to *_OT_select_inverse.
* Fix "search for unknown operator" prints at startup, and some
warnings in py code.
* Don't run .pyc files on startup.
* Remove unused image window header C code.
Thomas Dinges [Wed, 8 Jul 2009 19:14:32 +0000 (19:14 +0000)]
2.5 Sequencer:
* Replaced some notifiers with proper ones.
* Added "Draw Safe Margin" and "Separate Colors" Features to the menu.
Ton Roosendaal [Wed, 8 Jul 2009 17:49:14 +0000 (17:49 +0000)]
2.5
Makefile still had libradioisty.a
Peter Schlaile [Wed, 8 Jul 2009 17:41:45 +0000 (17:41 +0000)]
== Sequencer ==
* Added a lot of update notifiers to RNA
* Fixed strip deallocation (didn't free effect data for some reason...)
Andrea Weikert [Wed, 8 Jul 2009 17:40:42 +0000 (17:40 +0000)]
2.5 MSVC9 projectfiles
* small maintenance: keyval.c removed, some headers in editors/include renamed.
Brecht Van Lommel [Wed, 8 Jul 2009 16:17:47 +0000 (16:17 +0000)]
2.5: code consistency
* Rename BIF_transform/retopo.h to ED_transform/retopo.h
for consistency.
* Move MESH_OT_duplicate_add to editmesh_add.c.
* Remove some code from BIF_gl.h which is not needed there
anymore.
Brecht Van Lommel [Wed, 8 Jul 2009 15:34:41 +0000 (15:34 +0000)]
2.5: Various Fixes
* Context panel now draws without header, with arrows, no scene name.
* Softbody vertex group search popup.
* Improve names for autogenerated shortcut keys in menus.
* Make most Select menus in the 3D view header work.
* Fix armature border select selection syncing.
* Add POSE_OT_select_constraint_target,
MESH_OT_select_by_number_vertices, MESH_OT_select_vertex_path.
* Merge mesh select similar into one operator.
* Don't give MESH_OT_select_random Space hotkey.
* Add DAG_object_flush_update to many mesh edit tools, not calling this
will crash with modifiers.
* RNA_def_enum_funcs for dynamic enums in operators, but not very useful
without context yet.
* Fix refresh issue with image window header + editmode.
* Fix drawing of shadow mesh for image painting.
* Remove deprecated uiDefMenuButO and uiDefMenuSep functions.
* Remove keyval.c, code is in wm_keymap.c already.
* Rename WM_operator_redo to WM_operator_props_popup.
Ton Roosendaal [Wed, 8 Jul 2009 15:01:28 +0000 (15:01 +0000)]
2.5
Brought back the basics for transform manipulators. Martin will
hook it all up to new transform system.
Some notes:
- Still uses G.moving
- BIF_do_manipulator() is called as a View3D Operator
I've tested selecting handles, added a print to confirm
- BIF_GetTransInfo() returns a dummy struct now, just to get
it running.
- Marked some other issues with XXX
Campbell Barton [Wed, 8 Jul 2009 14:32:03 +0000 (14:32 +0000)]
fix for loading YoFrankie levels in blender 2.5. Multires pointer was corrupt on linked meshes.
Note that the files didnt use multires so something odd is going on, but for now this stops the crash.
Ton Roosendaal [Wed, 8 Jul 2009 14:26:43 +0000 (14:26 +0000)]
2.5
Copied some Python compat stuff to get py 2.3 running... just
googled for it on python.org mailing list.
Peter Schlaile [Wed, 8 Jul 2009 11:18:47 +0000 (11:18 +0000)]
This fixes some NULL checks.
* base was referenced before NULL check
* ob wasn't checked for NULL
Still broken: Add Mesh doesn't seem to work in Object Mode.
But now it doesn't crash anymore...
Campbell Barton [Wed, 8 Jul 2009 09:23:49 +0000 (09:23 +0000)]
* workaround for PySys_SetArgv() in python3 needing wchar_t
* PyRNA - id_struct.keyframe_insert("path", index, frame)
Ton Roosendaal [Tue, 7 Jul 2009 17:30:39 +0000 (17:30 +0000)]
2.5
- Scrollers now only disappear for regions with a fixed total view, like
lists, buttons, channels. More or less infinite views keep scrollers to
indicate that you can still pan or zoom further.
- Nodes: put back SHIFT+D "Add duplicate"
(Also fixed duplicate objects menu name... it should be a bit more
descriptive)
Dalai Felinto [Tue, 7 Jul 2009 07:25:44 +0000 (07:25 +0000)]
2.5 filebrowser: previous/next + bugfix + elubie's changes and cleanup
* Previous/Next Folder browser
* bugfix: "open most recently opened directory".
* Previous and Next functionalities:
- use BACKSPACE to navigate to previous folders
- use SHIFT+BACKSPACE to navigate forward
- once you change the folder by other ways the forward folder list is cleared
* bug fix: the sfile->params->dir set through ED_fileselect_set_params wasn't correct. According to the code taking the settings from the existing (previous) filebrowser is a temp solution. In that case this is a fix for a temp solution :)
(changes in: wm_event_system.c, filesel.c and ED_fileselect.h)
** Andrea(elubie): we can get away of the folderlist_clear_next test if we manually pass a boolean to file_change_dir (e.g. file_change_dir(sfile, true)). I tried not to mess up with your changes here. It's slightly slower (and maybe hacky) but its's more conservative IMHO.
(my first commit to 2.5 ... that was a good reason to put my paper on hold :p)
Andrea Weikert [Mon, 6 Jul 2009 17:29:32 +0000 (17:29 +0000)]
2.5
* fix for RNA generation dependency in MSVC projectfiles
* added missing include
Andrea Weikert [Sun, 5 Jul 2009 22:26:43 +0000 (22:26 +0000)]
2.5 filebrowser
* bringing back file numbering operator (PADPLUSKEY, PADMINUS)
* Note: discovered conflicting key with View2D zooming that causes it to not work in panel area.
Andrea Weikert [Sun, 5 Jul 2009 19:11:29 +0000 (19:11 +0000)]
2.5 MSVC9 projectfiles
* RNA project cleanup. Better file naming and first attempt at deleting files before rebuilding.
* editors/object/object_vgroup.c added
Janne Karhu [Sun, 5 Jul 2009 12:36:20 +0000 (12:36 +0000)]
Added a particle instance modifier option to use particle size.
Janne Karhu [Sat, 4 Jul 2009 12:09:21 +0000 (12:09 +0000)]
Rendering animations with particle trails cached.
Thomas Dinges [Sat, 4 Jul 2009 08:50:41 +0000 (08:50 +0000)]
2.5 Physic Buttons:
* Some minor layout cleanup to the field panel.
Janne Karhu [Sat, 4 Jul 2009 03:50:12 +0000 (03:50 +0000)]
A bunch of fun stuff now possible because of new pointcache code:
* Baked normal particles can now use the "Path" visualization.
* Path "max length" & "abs length" are now history:
- New option to set path start & end times + random variation to length.
- Much more flexible (and calculated better) than previous options.
- This works with parents, children, hair & normal particles unlike old length option.
- Only known issue for now is that children from faces don't get calculated correctly when using path start time.
* New option "trails" for "halo", "line" and "billboard" visualizations:
- Draws user controllable number of particle instances along particles path backwards from current position.
- Works with children too for cool/weird visualizations that weren't possible before.
* Normal particle children's velocities are now approximated better when needed so that "line" visualization trails will look nice.
* New particle instance modifier options:
- "path"-option works better and has controllable (max)position along path (with random variation possible).
- "keep shape"-option for hair, keyed, or baked particles allows to place the instances to a single point (with random variation possible) along particle path.
- "axis" option to make rotation handling better (still not perfect, but will have to do for now).
Some fixes & cleanup done along the way:
* Random path length didn't work for non-child particles.
* Cached & unborn particles weren't reset to emit locations.
* Particle numbers weren't drawn in the correct place.
* Setting proper render & draw visualizations was lost somewhere when initializing new particle settings.
* Changing child mode wasn't working correctly.
* Some cleanup & modularization of particle child effector code and particle drawing & rendering code.
* Object & group visualizations didn't work.
* Child simplification didn't work.
Thomas Dinges [Fri, 3 Jul 2009 20:03:24 +0000 (20:03 +0000)]
2.5 Physic Buttons:
* Added Softbody buttons. Patch by Wahooney. Thanks.
I did some minor code cleanup.
* Collision settings now grey out, when disabled.
Brecht Van Lommel [Fri, 3 Jul 2009 19:56:19 +0000 (19:56 +0000)]
2.5:
* Fix crash in python with enum properties, and don't throw
error if no matching identifier is found. This shouldn't
happen, but it should break a python script either, which
is not at fault.
* Fix a wrong variable initialization in fluidsim.
Thomas Dinges [Fri, 3 Jul 2009 19:12:59 +0000 (19:12 +0000)]
2.5 Physic Buttons:
* Added Fluid Buttons.
Nicholas Bishop [Fri, 3 Jul 2009 15:59:59 +0000 (15:59 +0000)]
2.5/Multires:
Missed this somehow when merging the multires branch? Have to make sure that multires displacements are up-to-date before doing a modifier apply.
Nicholas Bishop [Fri, 3 Jul 2009 15:31:23 +0000 (15:31 +0000)]
2.5/Sculpt:
Bugfix, mesh face normals not getting updated because a list was freed in the wrong place.
Brecht Van Lommel [Fri, 3 Jul 2009 15:23:33 +0000 (15:23 +0000)]
2.5
* Lattices: properties editable, editmode operators, menus working
again. As a bonus you can now edit u/v/w in editmode.
* Shape Keys: some code cleanup, and added more buttons. The
value/min/max buttons don't work correct yet though.
* Fix issue with uv textures, vertex colors not being visible outside
editmode, and a few other issue. Mesh.edit_mesh is now NULL when
not in editmode.
Thomas Dinges [Fri, 3 Jul 2009 14:32:27 +0000 (14:32 +0000)]
2.5 Physic Buttons:
* Added some collision buttons. Patch by Wahooney. Thanks!
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.