Commit Graph

2271 Commits

Author SHA1 Message Date
Campbell Barton
e4f10565ea recent change shows up incorrect context use: context.bone is not valid in the view3d context. 2009-11-11 10:07:52 +00:00
Campbell Barton
5816912dc1 - In the context, EditBones and Bases were set as 'RNA_UnknownType', replaced with propper types.
- renamed RNA_Base to RNA_ObjectBase
- only include id_data for the python api's autocomplete if it has an ID type set.
2009-11-11 09:16:53 +00:00
Campbell Barton
7efc2c2375 modify the python context access so invalid names will raise an exception rather then returning None.
this way the UI scripts are less likely to fail silently and wont let typos work ok.

also allow subclassing of the context, added a copy function,
 bpy.context.copy(), returns the context as a python dict to be modified and used in python.

This also showed up an invalid brush member in the screen context.
2009-11-10 15:09:53 +00:00
Campbell Barton
8ab49a4c5e fix for running datatoc on files in a subdir (was adding slashes into the C variable name) 2009-11-09 20:03:59 +00:00
Campbell Barton
0750a8dc5c simple fix, still worked on my PC somehow 2009-11-09 09:16:16 +00:00
Campbell Barton
97e7e26bab - added particle select_inverse
- added select root/tip to the select menu
- selection drawing updates for select more/less were not working
2009-11-09 08:51:34 +00:00
Andrea Weikert
9e90cf6d78 Sequencer: (small Durian wish)
* new operator: set rendersize (SEQUENCE_OT_rendersize) sets the render output size in the current scene to the size of the active sequence strip
* works for movies and images right now
* TODO: currently only works if image or movie strip has been loaded (as in showing the preview for example) - reason is that otherwise the size is not initialized in the strip
2009-11-08 15:03:10 +00:00
Campbell Barton
af011f33a6 use the cwd for the shell prompt, use subprocess.getstatusoutput rather then popen() 2009-11-08 12:35:37 +00:00
Thomas Dinges
18a5cd095a * Removed "Lock" Prefix from items inside Transform Lock Panel for consistency.
* Code cleanup to match guidelines, we don't use subrow1 or so anymore, remember? :)
2009-11-08 11:07:00 +00:00
Campbell Barton
fac2ca1c7c bpy/rna api class feature
- python defined classes will be used when available (otherwise automaically generated metaclasses are made as before)
- use properties rather then functions for python defined rna class's
- call the classes getattr AFTER doing an RNA lookup, avoids setting and clearing exceptions for most attribute lookups, tested UI scripts are ~25% faster.
- extending rna py classes this way is a nicer alternative to modifying the generated metaclasses in place.

Example class

--- snip
class Object(bpy.types.ID):

    def _get_children(self):
        return [child for child in bpy.data.objects if child.parent == self]

    children = property(_get_children)
--- snip

The C initialization function looks in bpy_types.py for classes matching RNA structure names, using them when available.
This means all objects in python will be instances of these classes.
Python properties/funcs defined in ID py class will also be available for subclasses for eg. (Group Mesh etc)
2009-11-08 01:13:19 +00:00
Campbell Barton
30c4c4599d pedantic enum string consistancy 2009-11-07 22:12:03 +00:00
Campbell Barton
4e61f8a836 pep8 whitespace commit
bpy/rna api (no functionality change, just move getting the srna py base into a function)
2009-11-07 22:07:46 +00:00
Martin Poirier
5bb88685ca fluid cache need a +1 offset, their frame 0 is blender frame 1 (fun stuff) 2009-11-07 17:47:54 +00:00
Campbell Barton
f25bc95688 missed committing this file (from Stani's patch) 2009-11-07 14:17:49 +00:00
Campbell Barton
ddeb9f8e24 - added console language type
- separated python console from the interactive console
- added shell console type (simple example)
- console types are autodetected and can be selected in the menu
2009-11-06 23:53:40 +00:00
Campbell Barton
e2f01e4c7c api changes suggested by Stani 2009-11-06 22:42:15 +00:00
Thomas Dinges
5c3a365ac4 * Added "Align View to Selected" to the View > Align View menu.
Patch by Jeff Doyle (nfz). Thanks!
2009-11-06 21:10:45 +00:00
Campbell Barton
aa7374e471 - removing the last particle system now exits particle edit mode.
- py UI script used an undeclared variable
2009-11-06 12:27:28 +00:00
Campbell Barton
cc2476fde5 patch from Stani, support for function arguments in autocomplete 2009-11-06 08:53:07 +00:00
Kent Mein
bb0f4310aa Simple one liner....
Added options to add Flip normals to toolbar.  (iCer on irc is responsible)

Kent
2009-11-05 20:35:36 +00:00
Campbell Barton
44db0b0e27 view docs was broken for operators - was getting the nested class string. 2009-11-05 19:31:38 +00:00
Campbell Barton
aec92ddc51 operator to select pos/neg verts on any axis relative to the active vertex
- useful to select the center verts of a model without having to attempt to border select
- useful for selecting one half or a model
2009-11-05 18:29:48 +00:00
William Reynish
93b2ed3822 Moved the object and bone name fields out of the Transform panel in 3Dview properties. They're in a new panel now called 'Item'. Needs an update in the B.blend to put it on the top. 2009-11-05 17:22:11 +00:00
William Reynish
2907c6fdf0 Moved the buttons around slightly in shape keys, to make it clearer what is action buttons, and what is toggles. 2009-11-05 14:31:17 +00:00
Campbell Barton
be4ceb5fdf Select interior faces, access from the mesh select menu
new mesh functions, remove duplicates in uvproject and mesh_skin
- face.edge_keys()
- edge.key()
- mesh.edge_face_count()
- mesh.edge_face_count_dict()
2009-11-05 12:37:49 +00:00
Campbell Barton
247f72fcc0 - added bpy.context to the python module
- made the console banner printing function into a python operator (includes sys.version)
- added 'C' into the consoles default namespace for convenience
2009-11-05 11:17:09 +00:00
Joshua Leung
06d5d53a24 Bugfixes + Spline IK Tweaks:
* #19819: 'Select' operator for Hooks was crashing when Hooks didn't have any vertices assigned yet

* Default twist resolution mode for curves is now 'Minimise'. This seems to work better for Curve Deforms and other purposes. Can be changed if other ways are better after some more testing.

* Spline IK now has more options for controlling how the x and z axis scaling is determined. There is now a choice between using the radius of the curve, the x+z scaling from the bones, or no scaling (default). This does break old files a bit, but this is to have a more stable base for later.
2009-11-05 10:09:45 +00:00
Campbell Barton
48bc52ea1b fix for editing docs 2009-11-05 10:02:14 +00:00
Matt Ebb
0b2bc7785d * Fix for [#19700] undo doesn't display visual feedback on lattices
Depgraph update was commented out in undo system because of globals, restored this with new context/id-based depgraph

* Fix in UV editor UV menu
* Slightly nicer default names for adding forcefields with Add menu
2009-11-05 09:57:43 +00:00
Matt Ebb
9eb0f20224 Added mass and spring vertex groups to softbody rna/ui 2009-11-05 02:50:26 +00:00
Campbell Barton
e6ea68a31c - missing return values
- more detailed exceptions (always give file:line incase the python exception doesnt)
- fix some errors in the edit docs

editing docs still fails, need to figure out why.
2009-11-04 22:36:46 +00:00
Campbell Barton
08bbda5005 - Stopping jobs on undo wasnt fixing undo/redo while with render previews as it was supposed to: needed WM_jobs_stop_all rather then WM_jobs_stop because it ends the thread rather then just setting 'stop'.
- gpl header + warning fix
2009-11-04 20:50:09 +00:00
Martin Poirier
e73a2bd55a make render, world and material buttons show when netrender is selected 2009-11-04 20:42:05 +00:00
Campbell Barton
3fa8959bb5 - move WM operators out of bpy_ops.py into their own file
- fix operator template
2009-11-04 20:21:08 +00:00
Brecht Van Lommel
6e1f215c20 Bugfix: sculpt layer brush "persistent" option was not showing up in UI. 2009-11-04 20:12:27 +00:00
Campbell Barton
51943096a9 bugfix [#19804] .MDD is not working?? // Also filetype issue?
- made all exporters default to the blend filename with the extension replaced
- MDD's poll function now checks for an active mesh
- multiline docstrings are written as multiline docs when generating epydocs
2009-11-04 18:35:32 +00:00
Campbell Barton
8af525f860 bpy.ops.import.obj("somepath") is invalid syntax because import is a keyword.
rename import to import_scene, import_anim, future import_sequence_edl, import_model etc..
2009-11-04 17:16:58 +00:00
Campbell Barton
edeae7477b fix for some python errors 2009-11-04 16:26:08 +00:00
Campbell Barton
4033aba579 new operator directory, move some scripts from io 2009-11-04 14:40:35 +00:00
Campbell Barton
69aaa43c24 quick update of bvh importer for blender 2.5, mostly this is to test the python api.
- bvh joint rotations are not working quite right yet
2009-11-04 14:33:37 +00:00
Campbell Barton
37fde5b335 bvh import from 2.4x (unchanged) 2009-11-04 14:31:14 +00:00
Campbell Barton
510aa6ba53 particle vertex group UI
Changed RNA vgroup access to use strings (string functions adjust the ints used internally)
2009-11-04 12:09:02 +00:00
Campbell Barton
46c8bfe151 Make Links (Ctrl+L) back
- split into 2 operators: object.make_links_data() & object.make_links_scene since they are quite different.
- added reusable functions RNA_group_itemf & RNA_scene_itemf which can be used for any operator that takes ID data (easy to add more types Mesh, Text etc)
- DummyRNA_NULL_items for dynamic items so each operator need not define its own empty enum.
2009-11-04 10:25:57 +00:00
Joshua Leung
de7da7c779 Bugfixes for Adding Objects:
* Auto enter EditMode for adding Armatures was broken
* Adding a camera no longer tries to enter editmode, even though that's invalid...
2009-11-04 09:45:37 +00:00
Joshua Leung
3c6b721fc9 Bugfix #19777: Owner Space not Target Space for Action Constraint was getting exposed via the UI.
The former is useless and probably dangerous to enable here, while only the latter is useful for anything.
2009-11-04 05:45:57 +00:00
Campbell Barton
2db1851c26 uv smart project now in unwrap menu with 2 most important options 2009-11-03 18:56:42 +00:00
Campbell Barton
65f92c893e - remove UV mapping operator, call a header menu directly (so python can add items there)
- forgot to move bpy_sys.py last commit
2009-11-03 18:20:03 +00:00
Campbell Barton
6680dcd24a renamed bpy.sys to bpy.utils, since it used to be a attempt to replace pythons sys which is bundled now 2009-11-03 18:08:25 +00:00
Campbell Barton
e4f90d9379 quick port of smart project to 2.5x, no operator options yet 2009-11-03 17:51:22 +00:00
Campbell Barton
89c2b9a77e script copied from 2.4x with no changes 2009-11-03 17:47:44 +00:00
Campbell Barton
b8b89d5ae4 active property for collections for things like scene.objects.active
will add more properties later
2009-11-03 16:07:29 +00:00
Campbell Barton
cbc5a78576 whitespace commit, (was some tabs mixed with spaces too) 2009-11-03 07:23:02 +00:00
Campbell Barton
acc09693c4 update from Keith Boshoff, use selected faces while in face-mask mode as well as some other cleanup 2009-11-02 20:18:05 +00:00
Campbell Barton
6bfcd5a811 how embarrassing! 2009-11-02 17:25:15 +00:00
William Reynish
67fd40f54c Enabled theme editing in user preferences. There's still no way to Load/Save/Add/Delete though.
Code could be optimized greatly, but found it hard to get it to work nicely with auto-generated code.
2009-11-02 17:18:17 +00:00
Campbell Barton
1d9f90ed42 - all add object operators now take view_align as an argument, and enter_editmode where its used. Makes running the operator from python pradictable without having to know the user prefs.
- missing return in function
- python error in view3d (assumed active object exists)
2009-11-02 16:07:49 +00:00
William Reynish
9e9ab1a227 *Added subdivide to armature toolbar, and gave it a hotkey (W)
*Fixed some remaining icon issue in the shape key properties
2009-11-02 13:20:14 +00:00
Matt Ebb
4b8c64246e * Added a new 'bone constraint' property editor icon and panel titles to distinguish bone constraints from object constraints
It was a bit too confusing and people were easily getting them mixed up.
2009-11-02 11:36:45 +00:00
Campbell Barton
da1765765b many operators uses Bases, for the python to set operators context python too needs to be able to access bases.
- added scene.bases (like scene.objects)
- renamed group create operator.

Example
 scene = bpy.data.scenes[0]
 C = {}
 C["scene"] = scene
 C["selected_editable_bases"] = [scene.bases[2], scene.bases[3]]
 
 bpy.ops.group.create(C)


Also made operator fake modules not return __call__ (reported by Stani, fixes autocomp. bug)
2009-11-02 11:14:22 +00:00
Joshua Leung
334a80a4f8 Spline IK Experimental Features:
1) "Even Divisions" - This option ignores the length of bones when considering how they should fit along the curve. This is useful for getting a smoother curve fit without having to worry about getting the bone lengths spot on. By default, this is disabled.

2) "Keep Max Length" - This option prevents the bone chain from extending past its natural length when the spline is stretched beyond that length. When the spline length is substatially shorter though, this bones get scaled to zero; making this option possibly useful for doing "growing tips". 
This is essentially a 'no scale' option, although the behaviour when the curve is shorter is really a compromise since the curve cannot be accurately satisfied + left intact without some scaling being applied due to the way this works.

3) "Radius to Thickness" - The average radius of the spline between at the head+tail of each bone determines the x+z scaling of the bone.
2009-11-02 10:04:37 +00:00
Matt Ebb
27580daf27 Added back texture filter/minimum settings to image texture properties 2009-11-02 09:31:55 +00:00
Campbell Barton
a9f6eaf847 vertex paint script ported by - Keith "Wahooney" Boshoff
Todo
- Add back nicer normal calculation function
- Make pep8 compliant
- Add vertex color layer when none exist
2009-11-02 09:26:55 +00:00
Campbell Barton
dd130350d5 make python operator instances subclasses of the wmOperator when called.
was subclassing the operator's type before.

Removes the need for passing self.__operator__, can pass self directly.
2009-11-02 08:32:00 +00:00
Matt Ebb
ab7a174f92 Added some missing menu items + fixes 2009-11-02 08:05:16 +00:00
Campbell Barton
a99157b20d rna structs would not raise an error when assigning invalid properties
netrender needed updating for this.
 hint, bpy.data is not a module
2009-11-01 21:53:45 +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
Campbell Barton
9efc427f80 pep8 compliance for bpy_ops.py
add bpy.props to the modules so you can do...
 from bpy.props import *
2009-10-31 01:23:49 +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
Campbell Barton
ae9eae222c Patch from Stani for autocomplete
adds ability to complete in these situations
 bpy -> bpy.
 bpy.data.objects -> bpy.data.objects["Mesh"]

my autocomplete could only do bpy -> bpy.
2009-10-30 09:34:57 +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
Campbell Barton
c508e6198a Python can now run operators with their own context (data context).
The aim of this is to avoid having to set the selection each time before running an operator from python.

At the moment this is set as a python dictionary with string keys and rna values... eg.

C = {}
C["active_object"] = bpy.data.objects['SomeOb']
bpy.ops.object.game_property_new(C)

# ofcourse this works too..
bpy.ops.object.game_property_new({"active_object":ob})

# or...
C = {"main":bpy.data, "scene":bpy.data.scenes[0], "active_object":bpy.data.objects['SomeOb'], "selected_editable_objects":list(bpy.data.objects)}
bpy.ops.object.location_apply(C)
2009-10-29 09:25:11 +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
Campbell Barton
2138afc087 editing operator descriptions now works. 2009-10-28 11:55:58 +00:00
Campbell Barton
e024b46eb6 - 'id_data' attribute for py rna api, so you can get the Mesh from a face, Armature from a bone, etc.
- fixed crash when adjusting added objects settngs from the toolbar.
2009-10-28 11:31:24 +00:00
Campbell Barton
8510723cf4 patch from mindrones, uploads user edited docs to http://www.mindrones.com/blender/svn/
(rmb, edit docs)
2009-10-28 10:04:09 +00:00
Campbell Barton
64455004e0 ob.getChilren() often requested for 2.4x api, notice this is only 1 line of python. 2009-10-28 09:39:16 +00:00
Campbell Barton
29cae6de75 viewing docs for nested classes would fail, expects bpy.types.Scene.SceneGameData-class.html rather then bpy.types.SceneGameData-class.html 2009-10-28 09:03:08 +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
Campbell Barton
4e7768066e patch from Stani to prevent hasattr(bpy.ops, '__call__') being True 2009-10-27 15:25:27 +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
Campbell Barton
b06640c583 changed WM_OT_context_* operators to pass through if one of the members in the path is None, rather then raising an error.
This means if you refer to a member of an object it will fail silently if there is no active object, but if you use an invalid attribute of the object it raises an error.
The method to check this is not nice but works well enough.

also removed pageup/down keys for changing the active shape since listviews can do this now.
2009-10-22 16:21:06 +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
3a6da12ab1 added new context operator WM_OT_context_cycle_int, use for switching between active shape keys 2009-10-21 10:11:03 +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
William Reynish
b8eec2b8fe Added a button in the header to toggle full screen mode. It'd be nice to have this right-aligned, but this doesn't seem possible in the layout engine currently. 2009-10-20 13:56:53 +00:00
Brecht Van Lommel
2c45509805 Renamed "Save Key Configuration" to "Export Key Configuration", so it
is clear this is different from "Save As Default".
2009-10-20 08:47:28 +00:00
Martin Poirier
b8141658a8 etch-a-ton RNA and UI, back in 2.5 2009-10-20 00:45:51 +00:00
Martin Poirier
631fbf88e8 Consolidate tube and cylinder primitives.
Removing old add tube operator and replacing it with add cylinder. The resulting operator is called add tube, since that's the name in the menu. Other people can debate about the name and change it later if they feel like it.
2009-10-19 19:16:15 +00:00
Guillermo S. Romero
680e724e37 Continue development of bfile system.
Still not usable, but some parts could be made more portable already.
Help welcome for MacOSX and MSWindows calls and paths.
2009-10-19 18:44:09 +00:00
Brecht Van Lommel
48f3e3340a Fix #19618: invalid vertex group data could be created when
assign vertices without an existing vertex group, causing e.g.
armature modifiers to crash.
2009-10-19 17:11:42 +00:00
Campbell Barton
dd96bf6168 - added xmirror to the weightpaint options
- made texture_slot return the texture slot for the node texture
2009-10-19 14:03:02 +00:00
William Reynish
c3f18a2d73 Moved some tool settings (mirror, auto-IK) to the tools pane. 2009-10-19 13:24:18 +00:00
Campbell Barton
a216ce6cf8 - fixed python error when there is no active object
- made sequence strip selection more like object mode - only de-select the active with Shift+RMB
2009-10-19 11:39:57 +00:00
Brecht Van Lommel
05d33dc6af Fix #19633: material & texture didn't use autocomplete for
selecting uv layers yet.
2009-10-19 11:00:43 +00:00
Campbell Barton
2c985dee97 - listener for sequencer space panels added for frame changes, now redraws during transform
- invalid pointer was used for getting the sequencer length crashing blender or setting the length to negative values.
- printf_strip(seq) for debugging sequence strip locations
- Spelling: Cheet Sheet -> Cheat Sheet
2009-10-19 10:07:19 +00:00
Campbell Barton
5d97c9f595 select all seq strips removed other flags, add menu was running exec rather then invoke. 2009-10-18 21:32:03 +00:00
Janne Karhu
816856f953 Small particles feature: Multiple group visualization counts per group object are now possible (+/- buttons next to the count list). This allows for example an array of duplicated objects "ob1, ob2, ob1, ob3" without duplicating the actual object (ob1 in the example) in the group. 2009-10-18 21:12:04 +00:00
Nicholas Bishop
5506d12bba 2.5/Sculpt:
Fixed "Persistent" option for layer brush, someone changed the RNA name but missed the UI script
2009-10-18 18:48:48 +00:00
William Reynish
13a70d22f9 Added torus icon to the add menu, and made naming consistent with the other add menus. 2009-10-17 21:08:22 +00:00
Thomas Dinges
38ce0c64cd Forgot to commit these files in 23837. 2009-10-16 19:25:51 +00:00
Campbell Barton
99ec29193a bisplay shapekeys as sliders in the dope sheet editor 2009-10-16 18:03:38 +00:00
Campbell Barton
299adde803 shape key mirror tool, access from shapekey list buttons 2009-10-16 13:04:59 +00:00
Thomas Dinges
299d7531ed Fix for last commit, used wrong operators. 2009-10-16 10:40:03 +00:00
Brecht Van Lommel
2e74a6ba30 Added a button to clear the weights of all shape keys, useful
when editing shapes and doing blending tests.
2009-10-16 10:29:41 +00:00
Thomas Dinges
04f17fed4d 2.5 Outliner:
Finally, the Outliner Header is drawn via Python too. 
* Also added some Operators to the View Menu.
2009-10-16 10:25:39 +00:00
Brecht Van Lommel
59f330cce0 Add back Blend From Shape in mesh edit mode. 2009-10-16 10:05:58 +00:00
Brecht Van Lommel
61a88bb597 Bugfix: z-offset for materials was not added back yet. 2009-10-16 10:03:39 +00:00
Campbell Barton
3d80fa9728 new operator - OBJECT_OT_make_single_user
Added keybindings and menu items
- Make Single User, Ukey
- Make Local, Lkey
- Make Duplis real, Ctrl+Shift+A
2009-10-16 10:00:45 +00:00
Campbell Barton
17c7b46334 object apply menu and keybinding (Ctrl+A) 2009-10-15 20:15:21 +00:00