Brecht Van Lommel [Fri, 10 Jul 2009 19:56:13 +0000 (19:56 +0000)]
RNA
* Enums can now be dynamically created in the _itemf callback,
using RNA_enum_item(s)_add, RNA_enum_item_end. All places asking
for enum items now need to potentially free the items.
* This callback now also gets context, this was added specifically
for operators. This doesn't fit design well at all, needed to do
some ugly hacks, but can't find a good solution at the moment.
* All enums must have a default list of items too, even with an
_itemf callback, for docs and fallback in case there is no context.
* Used by MESH_OT_merge, MESH_OT_select_similar, TFM_OT_select_orientation.
* Also changes some operator properties that were enums to booleas
(unselected, deselect), to make them consistent with other ops.
Andrea Weikert [Fri, 10 Jul 2009 19:52:00 +0000 (19:52 +0000)]
2.5 file browser
* bugfix: set the directory to the default root when directory button is empty
Andrea Weikert [Fri, 10 Jul 2009 19:19:54 +0000 (19:19 +0000)]
2.5 filebrowser
* bugfix: don't allow parent dir to go beyond root
* bugfix: only attempt to change directory if it exists
New (WIP) feature: autocomplete for directory
* works on TAB
* so far only one level (in current directory)
Thomas Dinges [Fri, 10 Jul 2009 19:11:22 +0000 (19:11 +0000)]
2.5 Buttons:
Small fixes:
* Removed Particle System Context header
* Lamp Type is a menu now, better for small displays.
Brecht Van Lommel [Fri, 10 Jul 2009 18:10:40 +0000 (18:10 +0000)]
2.5:
* Fix missing update when browsing to different text.
* Fix wrong spacing in font size 15 drawing in the text editor.
* Fix numbers not updating in color picker buttons.
Campbell Barton [Fri, 10 Jul 2009 18:09:53 +0000 (18:09 +0000)]
Use python subtypes so bpy.types.Mesh is a subtype of bpy.types.ID
This means checks like this work.
isinstance(bpy.data.meshes[0], bpy.types.ID)
bpy.types.Mesh.__base__ == bpy.types.ID
Andrea Weikert [Fri, 10 Jul 2009 17:26:19 +0000 (17:26 +0000)]
2.5 file browser
* buttons for increment/decrement number in filename
Patch provided by Johannes Meng, many thanks!
Andrea Weikert [Fri, 10 Jul 2009 17:05:04 +0000 (17:05 +0000)]
2.5 file browser
* directory button enabled again, c code for now, can later become nicer operator
* filename button enabled (pattern match for selection)
* RNA completed (title, file and directory)
* some unused code removal.
Ton Roosendaal [Fri, 10 Jul 2009 16:56:20 +0000 (16:56 +0000)]
2.5
UI script for setting render output
Ton Roosendaal [Fri, 10 Jul 2009 16:55:49 +0000 (16:55 +0000)]
2.5
Render usability:
- Option back to render to imagewindow, or fullscreen.
The latter is default. Setting is stored in Scene.
- Added button in output panel, the option "to new window" will follow!
- F11 again toggles render view
(moved MS Windows "full screen" to shift+F11 for now)
Brecht Van Lommel [Fri, 10 Jul 2009 13:56:29 +0000 (13:56 +0000)]
2.5:
* 3D view Object menu works again, many operators missing still
because they are not yet implemented.
* Constraint types now have separator, and fix too much spacing
in the constraints header.
Brecht Van Lommel [Fri, 10 Jul 2009 11:59:45 +0000 (11:59 +0000)]
2.5: fix to allow python panels to override C panels with
the same name.
Brecht Van Lommel [Fri, 10 Jul 2009 11:36:02 +0000 (11:36 +0000)]
2.5:
* RNA: enum items with "" indentifier are now interpreted as separators.
* Add Object menu: added consistent names, separators.
Brecht Van Lommel [Fri, 10 Jul 2009 11:33:01 +0000 (11:33 +0000)]
2.5: Fix for crash on reload file. Cursor grab should not
assume there to be a window, but also reload file exec was
not returing an OPERATOR_* value.
Campbell Barton [Fri, 10 Jul 2009 04:25:49 +0000 (04:25 +0000)]
PyRNA api wasnt using python subclasses most of the time.
Now this will return True
isinstance(bpy.data.meshes[0], bpy.types.Mesh)
Use the StructRNA identifier for the new classes name properties because classes were being named by the data names rather then the type names.
Set the __module__ for the new type which makes printing the class not use the script name where the type is first initialized.
eg: bpy.types.Mesh instead of buttons_object.Mesh
This still isnt quite right since opertators and panels all get their own type, when they should all use an operator type.
Brecht Van Lommel [Thu, 9 Jul 2009 19:49:04 +0000 (19:49 +0000)]
2.5: Various
* Weight paint: brush strength was changed to both define weight
and strength, this can't work, made them separate buttons.
* Allow adding particle system as modifier (fix crash).
* 3D view modal ops (zoom ..) could not be ended when invoked
from a button.
* Fix some warnings.
* Fix spelling in particle RNA property.
Brecht Van Lommel [Thu, 9 Jul 2009 19:45:27 +0000 (19:45 +0000)]
2.5: Buttons Window
* Fix poll() callback changes in recent commit, note that these have
to work with pinned context too.
* Hide header for context panels in py layout.
* Don't jump back when collapsing a panel, allow the view to be
over some empty space until you scroll back.
* Fix follow context icon, order had to be reversed in icon file.
* ID template now has icon as part of browse button instead of
outside the buttons.
Brecht Van Lommel [Thu, 9 Jul 2009 18:10:35 +0000 (18:10 +0000)]
2.5: fix for last commit, left in debug print.
Thomas Dinges [Thu, 9 Jul 2009 16:09:44 +0000 (16:09 +0000)]
2.5 Buttons:
* Fixed some Bugs from Commit 21458.
* Show Preview Render only when there is an active id block.
* Some Code Cleanup (especially in polls). Please try to keep it clean ;-)
Brecht Van Lommel [Thu, 9 Jul 2009 16:05:01 +0000 (16:05 +0000)]
2.5: X11
* Pass on mouse location on window leave/enter too, fixing some
issues with button highlights and tooltips.
* When a modal operator runs, grab the mouse cursor so that for
example transform still works when you move your mouse outside
of the window, previously it would just stop then. This is
automatic now for all modal ops, perhaps not always needed?
* Fix for a trailing button highlight issue.
Ton Roosendaal [Thu, 9 Jul 2009 15:40:04 +0000 (15:40 +0000)]
2.5
Monthly cleaning round to make it compile warning free.
Mostly it was const stuff (strings, Context), but also
a couple useful fixes, like wrong use of temp pointers.
Only Mathutils callback struct I left alone... design issue.
Ton Roosendaal [Thu, 9 Jul 2009 14:35:40 +0000 (14:35 +0000)]
2.5
Bad bad DNA errors! People should really check on warning prints for
compiling dna dir...
- SpaceFile: ListBase* prev; <- dna doesnt recognize this
- wmEvent: const variables were not supported yet.
The first I fixed, 2nd I added support for in makesdna.
Note that files saved between tuesday july 7 and now can be corrupted!
Campbell Barton [Thu, 9 Jul 2009 09:42:34 +0000 (09:42 +0000)]
patch from William, panel names need to be unique
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.