Commit Graph

21518 Commits

Author SHA1 Message Date
Campbell Barton
351f5d1837 - loading missing files didnt give any warning
- shape key transfer poll function
2009-12-27 23:29:34 +00:00
Campbell Barton
532b5e7bba WIP console text selection, modal selection operator and selection drawing.
word wrap and clipboard are not working yet.
2009-12-27 20:22:06 +00:00
Martin Poirier
280a1d09f6 Partial fix for [#20166] Snap to grid issues
Move gridview (the actual drawn grid size, including adaptation to zoom) to RegionView3D from View3D.

This solves the transform increment bug but not the Snap Menu bug (context is not set to the correct rv3d when executing operator from menu).
2009-12-27 18:09:17 +00:00
Martin Poirier
d1f1583c79 Wrong description in WM_OT_call_menu 2009-12-27 17:57:24 +00:00
Campbell Barton
0767cdd4a0 Transfer Shape Key
Useful if you have 2 different characters with the same base mesh (matching indicies), and want to copy a facial expression for eg, from one to another.
Durian request to re-use shapes between characters. 

* Copies the active shape to other selected objects
* Different methods to apply the shape
* * OFFSET, simple translation offset
* * RELATIVE (EDGE/FACE), Use Barycentric transformation to copy the shape. This means the target mesh can be a different orientation and scale and the shape should still apply since the surrounding geometry is used as a basis for the offset.

bug: barycentric transform's depth was inverted.

Note:
* This isnt added into a menu yet,
* This cant be redone since adding a shape key messes up the redo stack. needs fixing for other scripts too.
2009-12-27 11:14:06 +00:00
Joshua Leung
eb766f1d3f DopeSheet + Graph Editor hotkey tweak:
Made the TAB key toggle the editability of selected channels in the keyframes area in addition to the channels list.
2009-12-27 01:36:32 +00:00
Campbell Barton
fde4686d77 barycentric transform utility geometry function.
From 2 triangles and 1 point, the relative position between the point and the first triangle is applied to the second triangle to find the target point.
the barycentric weights are calculated in 2D space with a signed area so values outside the triangle bounds are supported.

wrapped by python:
 pt_to = Geometry.BarycentricTransform(pt_from, t1a, t1b, t1c, t2a, t1b, t1c)

NOTE: 
- moved some barycentric weight functions out of projection painting into the math lib.
- ended up making some of the math functions use const args.
TODO:
- support exceptional cases. zero area tries and similar.
2009-12-27 01:32:58 +00:00
Joshua Leung
9c82e1efc3 Bugfix 20469: Graph Editor Keyframes jumping around with NLA strips
NLA corrections for Graph Editor transforms was wrong way around, causing jumping issues when trying to transform the keyframes.
2009-12-27 01:28:13 +00:00
Campbell Barton
d5592fe254 fixes for errors/warnings found with cppcheck 2009-12-26 20:23:13 +00:00
Campbell Barton
5689ab3975 classmethods were excluded from docs, hide self & cls arguments for functions and class methods,
made some rna ui funcs not display as optional.
2009-12-26 17:49:08 +00:00
Campbell Barton
24ab5416da * sphinx docgen *
py_function_args wasnt working right (was using function namespace for function args), use pythons inspect module instead.
move the function to get a type description into rna_info
2009-12-26 16:47:25 +00:00
Janne Karhu
20ab9a4d9b Particles bug fix: Particle birth location between frames weren't calculated correctly for moving emitters as the functionality of where_is_object_time has changed a bit in the new anim system. 2009-12-26 15:59:07 +00:00
Campbell Barton
944a4f2a3f pep8 edits, removed MakeCursor.py and rna_array.py, not important to make pep8 2009-12-26 09:36:50 +00:00
Campbell Barton
ffe13aeb23 the user interface could access invalid RNA on deleting objects since checking the button ran after freeing the data. 2009-12-26 01:04:46 +00:00
Janne Karhu
7a19832a78 Fix for [#20294] Switching to particle mode after changing number of hair particles causes blender to crash.
* Particle edit mode wasn't freed when the particle amount was changed.
2009-12-26 00:17:54 +00:00
Campbell Barton
266271d65a - closing the user prefs accessed the temp screen after removing it.
- colorband drawing could use un-initialized vars (probably wouldnt crash)
2009-12-26 00:17:45 +00:00
Campbell Barton
fb4f78513e invalid memory access fix 2009-12-25 23:59:12 +00:00
Janne Karhu
fc066a6a5d Fix for [#20458] Segmentation fault when trying to enable Hair dynamics
* The hair mesh vertex index was stored as a short, but vertex counts can easily go higher than what fits in a short so changed this to an int.
* Also removed particle life looping, which didn't work correctly anyways. Similar functionality will become available when I get to recoding reactor particles into a better system.
2009-12-25 23:51:29 +00:00
Campbell Barton
99e3423a50 fix for accessing invalid memory when loading a new file. 2009-12-25 23:50:35 +00:00
Janne Karhu
b0b3e27471 Particles bug fix: using virtual parents for child particles crashed in some cases. 2009-12-25 22:58:11 +00:00
Campbell Barton
5afd084513 replace dynamic_menu.py with Menu classmethods much less complicated.
access append/prepend eg.

bpy.types.INFO_MT_file_import.append(lambda self, context: self.layout.operator("import_some.format"))
2009-12-25 22:16:19 +00:00
Campbell Barton
695677914a bugfix [#20237] Import error
(export X90 rotation wasnt right)
2009-12-25 20:52:05 +00:00
Campbell Barton
06f1505a4a bugfix [#20253] Import/Export fails 2009-12-25 20:47:23 +00:00
Campbell Barton
be67970303 fix for [#20244] importing .obj without "Object" option checked crashes blender 2009-12-25 20:40:00 +00:00
Campbell Barton
6c6786f1f0 bad rna limit referred to in [#20483] Inputs are capped
enable distance for some settings
2009-12-25 18:06:05 +00:00
Campbell Barton
693d9fd771 sphinx rna api documentation generator to replace epydocs
- view docs menu item opens sphinx URL
- can be searched (even when local)
- uses rna_info module for introspection
- also documents python defined functions and decorator properties (defined in bpy_types.py)
- experemental python file:line references for python operators.
2009-12-25 15:50:53 +00:00
Campbell Barton
4c5a314fef update rna_info and rna_rna for better introspection 2009-12-25 14:42:00 +00:00
Campbell Barton
4f3c477a85 fix for segfault getting RNA Enum default values, minor updates to introspection class 2009-12-25 09:01:23 +00:00
Campbell Barton
5f4e24d599 operator draw function working again. needed to add layout to the operator to give access to "self.layout" - like panels, headers and manu's have 2009-12-24 21:17:14 +00:00
Guillermo S. Romero
4b8bc301c6 SVN maintenance. 2009-12-24 21:15:27 +00:00
Campbell Barton
bbe13e7823 * register operators like other classes
* operators now return sets (converted into flags)
* can't remove bpy_operator_wrap.c since macro's still use the custom register funcs
2009-12-24 19:50:43 +00:00
Campbell Barton
4dd3e6c360 support for registering operators using the same internal rna api as panels, menus, headers & render engines since there was a fair bit of duplicate functionality.
will remove the old system and update scripts next.
2009-12-24 16:10:26 +00:00
Joerg Mueller
1d224ad692 Added rectifying sound effect (will be used for sound -> f-curve later). 2009-12-24 14:58:11 +00:00
Joerg Mueller
a2b0020e11 Reverted the addition of the f-curve sound modifier (was added in revision 24759) due to unusability and performance issues. The ability to use a sound as animation source will be added as an import operator later that renders a sound to an f-curve which brings the advantage that you can edit the generated curve later and the disadvantage it is not automatically updated when the sound changes. 2009-12-24 14:01:22 +00:00
Campbell Barton
bb452f29d6 minor pyapi changes 2009-12-24 11:40:14 +00:00
Matt Ebb
73c62183f8 Removed a few operators that were just used to generate popup menus and replaced with python defined menus. 2009-12-24 10:39:30 +00:00
Campbell Barton
accfa71b2c pedantic naming: wmKeyMapItem wasnt called 'kmi' in some cases. 2009-12-24 09:36:15 +00:00
Matt Ebb
980e97923b Key map related things:
* Moved 'change shortcut' (previously directly RMB on menu items) to a context-menu item, and added Remove Shortcut and Add Shortcut. This is all available now in a RMB context menu for operator buttons and menu entries.
* Renamed a bunch of key maps to be consistent with UI names, and human-readable. Since these key map names are now being directly used in the UI for people to find things, they should be understandable and in plain language.

This renaming may break some older saved key map setups - though previously saved .b25.blends should convert over ok. Exported .py files may need some find/replacing - in this commit check the changes in resources.c to see what's changed.
2009-12-24 09:26:06 +00:00
Damien Plisson
e1f3824547 OSX / Scons : set MACOSX_DEPLOYMENT_TARGET env var to allow builds for older systems 2009-12-23 15:56:00 +00:00
Campbell Barton
4aa15ee9f2 crash fix for sculpt when loading some files 2009-12-23 15:51:39 +00:00
Campbell Barton
6c1bbcd8a2 fix for a crash when running blender in debug mode (-d arg), was registering every operator in debug mode.
added some more sculpt key shortcuts
* R toggles rake
* Shift+A toggles airbrush

note: last commit added Ctrl+0 to set zero subsurf and multires
2009-12-23 15:06:47 +00:00
Campbell Barton
bb094b8655 key shortcits for sculpt back
- T was 'Flatten Brush', now Shift+T
- added an option to OBJECT_OT_subdivision_set to set the level relatively (so page up/down works), however RNA lets it set one level higher then the maximum, this seems displays OK in the 3D view so not sure whats going on here (as if there is always an extra hidden multires level).
2009-12-23 12:13:48 +00:00
Damien Plisson
489ff11f2b Fix compilation of carbon quicktime & complete use of report mechanism instead of standard printf 2009-12-23 11:49:07 +00:00
Joshua Leung
da5025d46d Bugfix #20463: In graph editor bone channels cannot be selected with 'A' or 'B' border select
This bug was caused by my recent commit to get bone select -> selection syncing working. The selection flushing was occurring too readily, blocking any selection tools from having any visible effect. Now this syncing is only triggered when appropriate notifiers+flags have been set.
2009-12-23 11:22:30 +00:00
Benoit Bolsee
21e2d9b85a BGE: fix more transpose bug when MathUtils is not used. 2009-12-23 09:55:34 +00:00
Benoit Bolsee
81a7bf2db9 BGE: fix more matrix transpose bugs in assignement to game object matrices.
Assignment to KX_GameObject localOrientation and
worldOrientation matrices was assuming row-major matrix
although reading these matrices was returning a column-major
MathUtils object.

The faulty function (PyMatTo) is fixed and all matrices
in python are now assumed column-major.

This function is also used in the following methods:

BL_Shader.setUniformMatrix4()
BL_Shader.setUniformMatrix3()

(No change in scripts if you didn't specify the optional
transpose parameter: the default value is changed so
that column-major matrices are assumed as before.)

KX_Camera.projection_matrix

(assignement to this attribute now requires a column-major
matrix and you must fix your script if you were setting
a value to this attribute.)
2009-12-22 23:38:09 +00:00
Kent Mein
c7a471c8c6 This fixes the following coverity issues: 163 162 161
Basically the function wasn't freeing memory it used before
returning.

Kent
2009-12-22 22:03:57 +00:00
Martin Poirier
8cce609a04 Missing angle_v3v3 definition (it was declared)
Wrong definition for angle_v2v2 (it read 2d vectors as 3d vectors)
2009-12-22 19:56:12 +00:00
Benoit Bolsee
1941ef0940 BGE: update for new soft body helpers API. 2009-12-22 19:53:44 +00:00
Benoit Bolsee
7e498afe33 Bullet: synchronize soft body helpers with current SVN. 2009-12-22 19:52:14 +00:00