Commit Graph

147 Commits

Author SHA1 Message Date
Matt Ebb
ab7a174f92 Added some missing menu items + fixes 2009-11-02 08:05:16 +00:00
William Reynish
a51fe76ff2 Fixed a few icons in user preferences Input tab 2009-11-01 19:45:50 +00:00
Campbell Barton
2cf22b53bc add_mesh_torus now passes the pep8 test 2009-11-01 18:07:35 +00:00
William Reynish
29aea786cb Added proper icon for full screen mode. Would be nice to have this button eventually be right-aligned. 2009-11-01 18:05:01 +00:00
Martin Poirier
9ea292290b Correct GPL license header for all python scripts 2009-11-01 15:21:20 +00:00
Joshua Leung
2068eaf1b7 Rigging Goodies: Spline IK Constraint
At last, this commit introduces the Spline IK Constraint to Blender. Spline IK is a constraint that makes n bones follow the shape of a specified curve. 

Simply add a chain of bones, add a curve, add a Spline IK Constraint to the tip bone and set the number of bones in the chain to make it work. Or, try the following test file:
http://download.blender.org/ftp/incoming/250_splineik_spine01.blend

Screenshots of this in action (as proof):
http://download.blender.org/ftp/incoming/b250_splineik_001_before.png
http://download.blender.org/ftp/incoming/b250_splineik_001_after.png

I've implemented this in a similar way to how standard IK solvers are done. However, this code is currently not an IK plugin, since I imagine that it would be useful to be able to combine the 2 types of IK. This can be easily changed though :)

Finally, a few notes on what to expect still:
* Constraint blending currently doesn't affect this. Getting that to work correctly will take a bit more work still.
* Options for not affecting the root joint (to make it easier to attach the chain to a stump or whatever), and non-uniform scaling options have yet to be added. I've marked the places where they can be added though
* Control over the twisting of the chain still needs investigation. 

Have fun!
2009-11-01 11:29:40 +00:00
Thomas Dinges
cb45db0336 * Some guideline work for the particle py file.
* Minor layout tweaks in Node RNA to match most other RNA enums.
2009-11-01 10:45:42 +00:00
Campbell Barton
d964808846 made scripts pass the pep8 test (though not fully pep8 yet)
added comment in header to know if a script has been converted or not.
2009-10-31 23:35:56 +00:00
Campbell Barton
41c0236aaa GPL2 header from firebird (without disclaimer), notice theres no copyright attributed and only the GPLv2 (without the v2 or later clause).
Contributors list isnt used much in our C code so probably its easier if people just use svn blame for this.

Can change if this isnt acceptable but I guessed people didnt care so much since most scripts had no header.
2009-10-31 20:16:59 +00:00
Campbell Barton
944a8d33fe renamed buttons ui files to properties to match UI name change, needed to update some imports too 2009-10-31 19:57:59 +00:00
Campbell Barton
f9b19d54b5 tabs to spaces, remove trailing white space. (apart of pep8)
didnt do "release/scripts/io" since some exporters cant be auto converted
2009-10-31 19:31:45 +00:00
Campbell Barton
af72bb50ae improved class validation, variables defined by the rna interface as non-optional could fail silently when absent in the class. Set these to PROP_REGISTER_OPTIONAL and raise an error when others are not found.
last commit broke povray too.
2009-10-31 18:48:58 +00:00
Campbell Barton
e4881eef52 define operator properties in the class, similar to django fields
# Before
[
	bpy.props.StringProperty(attr="path", name="File Path", description="File path used for exporting the PLY file", maxlen= 1024, default= ""),
	bpy.props.BoolProperty(attr="use_modifiers", name="Apply Modifiers", description="Apply Modifiers to the exported mesh", default= True),
	bpy.props.BoolProperty(attr="use_normals", name="Export Normals", description="Export Normals for smooth and hard shaded faces", default= True),
	bpy.props.BoolProperty(attr="use_uvs", name="Export UVs", description="Exort the active UV layer", default= True),
	bpy.props.BoolProperty(attr="use_colors", name="Export Vertex Colors", description="Exort the active vertex color layer", default= True)
]

# After
path = StringProperty(attr="", name="File Path", description="File path used for exporting the PLY file", maxlen= 1024, default= "")
use_modifiers = BoolProperty(attr="", name="Apply Modifiers", description="Apply Modifiers to the exported mesh", default= True)
use_normals = BoolProperty(attr="", name="Export Normals", description="Export Normals for smooth and hard shaded faces", default= True)
use_uvs = BoolProperty(attr="", name="Export UVs", description="Exort the active UV layer", default= True)
use_colors = BoolProperty(attr="", name="Export Vertex Colors", description="Exort the active vertex color layer", default= True)
2009-10-31 16:40:14 +00:00
Campbell Barton
ea265fc697 change blender python interface for classes not to ise __idname__ rather bl_idname since __somename__ is for pythons internal use.
replacements...
"__idname__" -> "bl_idname"
"__props__" -> "bl_props"
"__label__" -> "bl_label"
"__register__" -> "bl_register"
"__undo__" -> "bl_undo"
"__space_type__" -> "bl_space_type"
"__default_closed__" -> "bl_default_closed"
"__region_type__" -> "bl_region_type"
"__context__" -> "bl_context"
"__show_header__" -> "bl_show_header"
"__URL__" -> "_url"
2009-10-31 13:31:23 +00:00
Thomas Dinges
85eb9d6a2f Commit of Patch [#19768] Add View3d Menu Items: View -> Playback Animation and View->Cameras->Active Camera
by Jeff Doyle (nfz). Thanks!
2009-10-31 10:17:19 +00:00
Thomas Dinges
a8e56a274e Commit of Patch [#19711] Add Menu Item: View3d -> View -> Show All Layers
by Jeff Doyle (nfz). Thanks! 

This adds:
* "Show All Layers" to the View3d -> View menu
* "Center Cursor and View All" and "Align
Active Camera to View" to the align view submenu.
2009-10-30 21:56:09 +00:00
Campbell Barton
9c1fc8497b small change to strip-swap, Made keys Alt+L/RArrowKey, added in menu, dont treat color strips like other effects 2009-10-30 21:40:07 +00:00
Arystanbek Dyussenov
31258507d0 Merge of the COLLADA GSoC branch into trunk.
COLLADA code is disabled by default (it has dependencies requiring manual install).

SCons and CMake builds are supported on Windows and Linux, no Mac building yet. More on building COLLADA code: http://wiki.blender.org/index.php/User:Kazanbas/Building_Collada_Branch.

The detailed command log of the merge (can be useful for educational purposes):

branch=https://svn.blender.org/svnroot/bf-blender/branches/soc-2009-chingachgook
# collada code
svn copy $branch/source/blender/collada source/blender/collada
# operator
svn merge -c 20401,20955,21077,24077,24079 $branch/source/blender/windowmanager/intern/wm_operators.c source/blender/windowmanager/intern/wm_operators.c
# menu
svn merge -c 24079 $branch/release/scripts/ui/space_info.py release/scripts/ui/space_info.py
# scons
svn merge -c 20398 $branch/source/blender/SConscript source/blender/SConscript
svn merge -c 20398,20691,20955,22726 $branch/tools/btools.py tools/btools.py
svn merge -c 20691,20955,22726 $branch/tools/Blender.py tools/Blender.py
svn merge -c 20398,20692,20955 $branch/config/linux2-config.py config/linux2-config.py
svn merge -c 22726 $branch/config/win64-vc-config.py config/win64-vc-config.py
svn merge -c 22726 $branch/config/win32-vc-config.py config/win32-vc-config.py
svn merge -c 24077 $branch/source/blender/windowmanager/SConscript source/blender/windowmanager/SConscript
# cmake
svn merge -c 23319,23905,24077,24158 $branch/CMakeLists.txt CMakeLists.txt
svn merge -c 23319 $branch/source/blender/CMakeLists.txt source/blender/CMakeLists.txt
svn merge -c 23319 $branch/source/creator/CMakeLists.txt source/creator/CMakeLists.txt
svn merge -c 23319 $branch/CMake/macros.cmake CMake/macros.cmake
svn merge -c 24077 $branch/source/blender/windowmanager/CMakeLists.txt source/blender/windowmanager/CMakeLists.txt
2009-10-30 15:35:50 +00:00
Joshua Leung
ae3cf92491 New Track To Constraint: "Damped"
This is effectively a C-port of Nathan Vegdahl's "No Twist" TrackTo PyConstraint, and has been added as a separate type of constraint to be consistent with the existing constraints (Locked Track, and Track To). 

In general, this works considerably better than the existing "Track To" constraint, since it works by determining the smallest rotation necessary to get the current orientation of the owner to an orientation which would be tracking the target. It is also a much more straightforward approach than the weird old method the old Track To uses.

I've made a few tweaks to the code to deal with the (hopefully rare) cases where the target and the constrained are coincident. These don't appear to cause too much trouble in general.

TODO:
- Probably the naming of the constraints will change, to better convey their purposes. Naming suggestions welcome.
2009-10-30 06:33:40 +00:00
Joseph Eagar
fe68d2672d added an 'auto-normalize' option for weight paint mode, that automatically ensures vertex groups that affect bones all add up to 1.0. please test and give feedback. 2009-10-30 02:09:52 +00:00
Thomas Dinges
c0a785a23e * Some Whitespace and small code-guideline cleanup. 2009-10-29 23:46:12 +00:00
Thomas Dinges
c26ee3ab57 * Tiny Force Field Layout improvements and tooltip fix by nudelZ. Thanks! 2009-10-29 22:08:09 +00:00
Thomas Dinges
c30553f7f3 * Added greying out for Bound Box Menu. 2009-10-29 21:31:00 +00:00
Campbell Barton
4b3fd4a8e0 replacement for my own autocomplete module by stani
--- from his patch
All the functionality is in the console
folder:
- intellisense.py: the central module which loads others on demand
- complete_namespace: more or less a replacement for the old autocomplete.py
- complete_import: module completion (I find this very handy, not just luxury)

These complete_* modules work very simple and should also work outside blender. You give some  input and it returns a list with possible completions.

autocomplete.py is now deprecated.
2009-10-29 20:55:45 +00:00
Campbell Barton
8c707b2a5f moved the following into the screen context rather then the view3d context so python scripts can access these when running in the console.
"visible_bones", "editable_bones", "selected_bones", "selected_editable_bones", "visible_pchans", "selected_pchans", "active_bone", "active_pchan",

added "C" to the consoles namespace, temp hack but useful
2009-10-29 19:59:38 +00:00
Thomas Dinges
f5d62d885b Fixed [#19735] No normal map button in texture->image pane
Put it into the "Image Sampling" Panel, not sure if its the right location.
2009-10-29 14:27:56 +00:00
Campbell Barton
6f1e9a843e Script templates, including game logic scripts from 2.4x and new operator template.
Files copied into scripts/templates will automatically appear in the menu.

the operator template is a bit rough but a start.
2009-10-29 11:26:44 +00:00
Thomas Dinges
2aa2f53265 * Added missing "Passes" Button for AAO, reported by nudelZ.
* Some Layout tweaks for Cloth Panel, put Quality option to top. Patch by nudelZ.
2009-10-28 23:47:56 +00:00
Martin Poirier
40cc202dac Comment out "forked" parameter for extrude_mode macro operator (it doesn't work yet and give warning in console) 2009-10-28 20:54:20 +00:00
Brecht Van Lommel
b6459105b4 OpenGL Render restored.
I tried to make it integrate more with regular render but couldn't
do it well, it still needs a 3D view to take the settings from, and
can't run in a separate thread due to OpenGL.

However, it is now rendering to an offscreen buffer which then gets
displayed in the image window. This requires FBO's to be available, so
a fallback creating a new window is still needed. Currently available
from the Render menu in the top header.
2009-10-28 18:03:04 +00:00
Matt Ebb
9aac7dd218 * Added 'report a bug' help menu item, taking you to the 2.5 bug tracker. 2009-10-27 23:28:56 +00:00
Campbell Barton
d160891c36 Shape Propagate to all back in vertex menu 2009-10-27 15:40:56 +00:00
William Reynish
54facb5cfe Added missing X mirror option to armature edit mode. 2009-10-27 12:46:20 +00:00
Joshua Leung
90957ed0dd A bunch of fixes for macro-type operators - Armatures + Objects
* Extrude and Duplicate for Armatures now use proper macros instead of manually calling transform themselves. This means that repeating these operators now works properly.
** NOTE: there's a bug with macros now which prevents the 'forked' extrude operator working correctly. Bug report filed for this.

* Included the proper operators for extrude and duplicate in the toolbar + menus. The operators used there did not activate transform, which meant that users often could not tell that the operation had occurred at all.
2009-10-27 11:10:30 +00:00
Campbell Barton
1c1659eb28 - Right click menu can open links directly to API reference docs (rna and operators)
- Generated and uploaded api docs - http://www.blender.org/documentation/250PythonDoc
- Added Edit docs menu item & operators as discussed with Mindrones, Brecht, Stani & Letterip @ bconf, needs some web backend. python operator can aparently use xml/rpc to upload docstrings.
- Added operator invoke function - context.manager.invoke_props_popup(self.__operator__, event)
  this calls a popup for invoke by default (which intern calls execute())

- Own recent commit to game framing applied to non-camera views too.
- v3d->persp is deprecated but still used in some places.

- Transforming strips could overlap 1 frame if moving them below frame 0
- Transforming overlapping strips could go into an eternal loop (though overlapping strips should not exist)
2009-10-27 02:54:25 +00:00
William Reynish
c4067b62d1 Durian text editor requests:
-Added Run Script button in header
-Added hotkey for Line Select (Ctrl-Shift-A)
2009-10-26 16:48:23 +00:00
William Reynish
39d62a12d9 *Started to add theme editing in Preferences. Isn't visible in the UI yet.
*Moved some preferences around
*Changed the file browser '..' icon (Thanks Elubie!)
2009-10-26 11:03:12 +00:00
Joshua Leung
c90e05bb42 Toolbar Fixes:
* Restored the Grease Pencil tools to the toolbar
Probably, if the reason they were commented out before was so that the repeat stuff is visible, we can swap the order of those two. Otherwise, it's good to have somewhere for the operators now (so that the hotkeys can be found)

* Hotkey displays in the tooltips now show the keymodifier too
For example, "D LeftMouse" or "Ctrl D LeftMouse" for the Grease Pencil operators, instead of just "LeftMouse" or "Ctrl LeftMouse".
2009-10-25 03:47:14 +00:00
Brecht Van Lommel
e2b74dc736 Shape Keys
Active shape key can now be changed while in edit mode. This is based
on exit/enter editmode again in the background, which is not ideal,
as that loses the undo history. But that already happened anyway when
you did exit/change-active/enter manually.
2009-10-22 17:12:28 +00:00
Brecht Van Lommel
3ffb695b10 Shape Keys
Blended shape keys can now be displayed & edited in edit mode. This
is much like showing an armature modifier in edit mode, and shape keys
now are a applied as a virtual modifier (for mesh & lattice only, curve
doesn't fit in the stack well due to tilt).

The main thing missing still is being able to switch between the active
shape key in edit mode, that's more complicated.. but the weights of
other shapes can be edited while in edit mode.

One thing to be careful about is that this does automatic crazyspace
correction, which means that if you edit a shape key with a low value,
the actual vertices will be moved to correct for that and actually move
a (potentially much) longer distance.

Also includes some UI tweaks, mainly placing some buttons horizontally
since the vertical list was getting too long.
2009-10-22 16:35:51 +00:00
Thomas Dinges
fe823ce3ce Fix for Texture Tab. Influence Panel got shown even when no active slot was selected, raised errors. 2009-10-22 15:33:53 +00:00
Brecht Van Lommel
76879599f5 Shape Key UI
* Curves/Surfaces now have the shape key panel as well, this
  is new compared to 2.4x.
* The previous commit also fixed curve tilt blending for relative
  keys, this was writing to the wrong memory location.
* Minor button tweaks
2009-10-22 09:48:44 +00:00
Thomas Dinges
c9092a6738 Patch [#19708] Add Menu Item: View3d -> View -> View Global/Local
by Jeff Doyle (nfz).
2009-10-22 06:09:43 +00:00
Campbell Barton
77ccb5aec1 shape key operators and buttons for reordering 2009-10-21 14:33:52 +00:00
Campbell Barton
f4d6bbd656 - improvements from Mathias Panzenböck (panzi) patch [#19695], which avoid conversion to/from strings with context property assignment. though didnt apply entire patch.
- [#19698] Add Menu Item: View3d -> Object -> Move to layer
  from Howard Brooks (hbroo)
- had cursor grab commented by mistake for X11
2009-10-21 07:56:08 +00:00
Joshua Leung
ddb1f64fff Outliner: Tweaks for Driver Operators
* Driver adding/removing operators in the Outliner now work properly for arrays
* Renamed these operators so that their names are more indicative of how they work (i.e. based on the data in the Outliner that is selected)
* Added a menu labelled 'Edit' in the Datablocks view which gives access to (and includes the hotkeys for) these tools.
2009-10-21 05:59:51 +00:00
Campbell Barton
49a937c521 fix for mirror select and added to the menu 2009-10-20 17:10:01 +00:00
Campbell Barton
9a00cc55c1 - editmesh select mirror (in editmode select menu)
- weight blending (Vertex specials menu), currently blends from surrounding unselected verts (nice for blending edge loops), but will eventually support face mask mode.
2009-10-20 16:31:03 +00:00
Campbell Barton
4197253b26 split weight normalize into 2 operators, normalize and normalize_all.
Added an option for normalize_all that keeps the active group at its existing weight while normaling all other groups around it.
Thsi makes it easy to paint up to 100% where all other groups will use progressivly less until the active group is 100% and all others are 0.

Added weight operators to the toolbar
2009-10-20 13:59:26 +00:00
Brecht Van Lommel
cb8f7fd385 Auto Save
Auto save is now working again in 2.5. It will also remember now what
the location of the original file was when recovering it, so that
library links still work and saving the restored file does not save to
the temp directory. There is also a new Recover Auto Save operator
which will open the filebrowser in the temp directory and show the
auto saved .blends.

Implemenation Notes:

* Timer storage was moved from window to windowmanager, so we can have
  windowmanager level timers too now, doesn't make sense to have
  autosave timer attached to a particular window.
* FileGlobal now has a filename field storing where the file was saved.
  Note that this is only used when loading a file through the recover
  operators, regular file read doesn't use it, so copying the quit.blend
  manually over the original file will still work as expected.
* Jobs timer no longer uses operator now, this seems more like an
  internal thing, changing keymaps should not make it possible to break
  the jobs manager.
* Autosave is postponed by 10 seconds when a modal operator is running,
  e.g. transform or file browsing.
* Moved setting G.sce in setup_app_data before depsgraph updates, these
  can use the filename for pointcaches.
2009-10-20 13:58:53 +00:00