Commit Graph

2271 Commits

Author SHA1 Message Date
William Reynish
040c2affa6 Revert toolbar shading commit. 2009-11-19 09:57:04 +00:00
Matt Ebb
2c08e182c7 * Added control and animation of sound volume of sequence sound strips (found in properties pane)
To insert keys, use I key while hovering over the button for now, rmb clicking on the property to insert a key doesn't work (general bug for all regions except property editor - will investigate).

Doesn't convert over from old fac0 ipos on opening old files though for the time being.

* Made sequence strip names unique while I was at it, to allow strip properties to be animated properly.
2009-11-19 03:21:37 +00:00
Joshua Leung
bb3afc81fc Sequencer UI: Sequencer now uses the standard timeline cursor instead of a hacky custom one that used a hardcoded colour 2009-11-19 02:58:48 +00:00
Thomas Dinges
5ed3081e5c 2.5 Single Column Layout:
* Added code to enable single column layout for general physic panels. 
Note: Force Field Falloff panel has some issues with single layout.
2009-11-18 21:57:13 +00:00
Campbell Barton
ae5a814f26 ID properties that are displayed via RNA can now define their own UI settings,
only implimented min/max precision & step.

at the moment there is no way to edit these other then via python

example of setting UI limits...

>>> C.object['foo'] = 0.5
>>> C.object['_RNA_UI'] = {'foo': {'step': 0.5, 'soft_max': 10.0, 'soft_min': 0.0, 'precision': 2, 'description': 'Some setting'}}

Also fixed typo's: precission -> precision
2009-11-18 20:01:35 +00:00
Martin Poirier
a73be8097d Netrender cleanup and bug fix
Blacklist and linked files work again

Store temp data in module
2009-11-18 18:00:46 +00:00
William Reynish
b5797272d0 New B.Blend.
Fixes an issue with the clipping that was set back to 0.01 Made it 0.1 once again as this fixes Z buffer issues.
Put the Item panel at the top in the n-key region
Removed Properties and Quad View Screens
Cleaned up UV Editing Screen, removing Properties
2009-11-18 17:54:04 +00:00
Martin Poirier
5a6261afb3 Code cleanup in netrender 2009-11-18 17:07:42 +00:00
Campbell Barton
273a7ab9c5 remove GPL headers from templates, am happy for them to be public domain 2009-11-18 14:25:36 +00:00
Daniel Genrich
6a357cabbf Durian request: Cloth
* structural can be set to 0

* pre-roll now available through GUI and works like following:
a) Pre rolled frames are NOT cached
b) reset cache + cloth on pre roll setting change
2009-11-18 13:33:52 +00:00
Campbell Barton
49c47fbf30 python pose_channels -> bones 2009-11-18 11:50:31 +00:00
William Reynish
95229aa6f5 Accidentally overrode a small change in the keymap preferences. Fixed. 2009-11-18 11:11:21 +00:00
William Reynish
b1a5ba6804 Changed the appearance of the toolbar buttons.
When stacked on top of each other, it looks cleaner and simpler without the gradient.
This makes it easier to scan through long lists of tools.

http://www.reynish.com/files/blender25/toolbar_buttons.png
2009-11-18 10:57:30 +00:00
Campbell Barton
318e9aa5d1 - rna attribute setting problem, class instances could not set their own attributes because they are blocked by our own internal setattr.
this could be supported again easily however it leads typo's & api changes not showing any errors.

  This broke povray export.
  Solution for now is to allow setting private properties starting with '_'

  eg, 
    ob = bpy.context.object
    
    ob._foo = [1,2,3] # this is a python list, it will stay only as long as this PyObject is active
    ob.foo = 1 # raises an error!, only for rna properties
    ob["foo"] = 1 # converts to an ID property and is saved

    using the underscore like this should really be used for classes internally.

- povray failed on armatures

- menu key wasn't using WM_keymap_add_menu
2009-11-18 08:40:18 +00:00
Campbell Barton
7807a37b89 default name of keymap to 'keymap.py' + pedantic pep8 edits 2009-11-18 01:30:28 +00:00
Joshua Leung
b6e015f70c Small UI Tweaks - Toolbar + Graph Editor:
* "RNA Path" and "Array Index" for the active F-Curve in the Graph Editor are now shown in the properties region. These are greyed out unless the F-Curve cannot be evaluated, in which case they can be edited to make the F-Curve work again

* Made the Push and Relax operators in Pose Mode fit on a single row in the toolbar, since they're opposites of each other.
2009-11-17 22:46:42 +00:00
Campbell Barton
2ae15e39ad make animation system and rna internals use getattr style syntax for user defined properties
bone["foo"] rather then bone.foo
matches python and avoids naming collisions
2009-11-17 20:46:59 +00:00
William Reynish
068545f3bd -Single column UI for image editor.
-Added buttons for Mark and Clear Seam in toolbar, replacing the less useful Rotate UVs and Mirror UVs commands.
2009-11-17 18:53:53 +00:00
Thomas Dinges
ff5ea39733 * Create Group Operator had a wrong name, so it didn't showed up in the menu. 2009-11-17 17:09:54 +00:00
Campbell Barton
966b01665b use number keys to set the current brush in paint modes 2009-11-17 16:04:17 +00:00
William Reynish
fd64e0d662 Single column UI for constraints 2009-11-17 15:59:54 +00:00
Campbell Barton
64104524cc fix for error editing a string property with quotes 2009-11-17 13:18:26 +00:00
William Reynish
5bc46cab8c Toolbar reorganization
Included more tools, such as Edge Slide and Shrink/Fatten in toolbar to make them easier to find.
Did some reorganization of tools in the mesh editing toolbar to categorize tools better.
Made some tools like Grease Pencil tools more compact in the UI
2009-11-17 12:59:55 +00:00
Campbell Barton
f7682e2e0f - in pose mode, pose bone properties are edited rather then armature bone
- new id property array method convert_to_pyobject()
- editing an array in the UI broke
- fixed for own error when updating ID prop api
2009-11-17 12:54:29 +00:00
Campbell Barton
51f2dcd08c - access console languages as modules rather then having the py operator call an operator
- workaround for __getattr__ existing for types that dont support it
2009-11-17 12:21:41 +00:00
Campbell Barton
cf26cdd508 nicer UI, allow editing of values without pressing edit for basic types 2009-11-17 10:30:54 +00:00
Campbell Barton
7636d17af6 property editor for bone and object ID props, add/remove/edit
good example of how editing NON rna data results in very weired scripts :/
2009-11-16 22:53:28 +00:00
Martin Poirier
98d4a56d55 Fixing keymap export:
- Didn't support new userdef keymaps (new "active" rna function to get the active version of a keymap)
- Didn't support modal keymaps (new "modal" param to add_keymap function, new "add_modal_item" function on keymaps (both functions now make sure the keymap is of the right type))
2009-11-16 20:50:02 +00:00
William Reynish
ca5a912c3e Added single column support to modifiers
Tiny cleanups and improvements in some modifier layouts
2009-11-16 16:07:22 +00:00
Campbell Barton
20043a0fc0 add hook in vertex and control point menu's, Ctrl+H
TODO's
- add for lattice
- break up add_hook
- add other hook operators
2009-11-16 13:59:27 +00:00
Campbell Barton
d2ca3e5582 fix for python UI glitch, need to make view3d active_pchan & active_bone's (since they dont check layers atm) 2009-11-16 10:10:29 +00:00
Martin Poirier
11cfdfa264 === Better support for user defined modal keymaps ===
Fixing/Missing RNA properties:
- "virtual" property for "ANY" modifier for keymapitem
- modal property for keymap
- Look up modal_items in usermaps too

Lazy init usermaps needs to init modal_items too.

New function to initialize a user keymap (fill in modal_item and poll pointers).

Operator modal keymaps now look up if there's a user defined keymap that overwrites it.

Full Event UI buttons now show "Any" when modifier is set to that (instead of listing all of them).

Note: Having the modifiers as boolean still doesn't express the full breath of values possible for them. There is commented code in this commit to represent them as enum, which would solve this, but make the keymap editor more cryptic.
2009-11-15 19:25:34 +00:00
William Reynish
888565e248 *More single column stuff.
*Fixed and changed minor layout issues in curve and game properties
*Merged Curve and Text properties py file as they share a lot of options.
2009-11-14 23:24:15 +00:00
Campbell Barton
d04f94d0c6 skip rna property & function lookups for members starting with "_" (since makesrna disallows this)
added a way profile python startup in bpy/__init__.py, if'd out by default.
2009-11-14 23:11:46 +00:00
Campbell Barton
c9d2186561 - sequencer speed effect back using fcurves, still needs manual reloading to refresh.
- added a function id_data_find_fcurve() to get the fcurve without RNA vars. Aligorith: this could be made to use a path rather then a property name.
2009-11-14 14:58:19 +00:00
Campbell Barton
d33291fcc4 used py error checking tools to fix some bugs & make pep8 corrections 2009-11-14 13:35:44 +00:00
Campbell Barton
c2624e1a4f fix for skinning uneven loops, fixed to use even edge removal currently 2009-11-13 19:18:17 +00:00
Campbell Barton
5a322bd67c F8 reload works again, script errors are printed but dont stop loading every other script 2009-11-13 11:10:29 +00:00
Campbell Barton
4c7dc3e5c5 changes python initialization
- bpy is now a python package, this makes it easier to add utility modules and adjust python startup which was previously using verbose Py/C api. Access should not be any slower since both C and Python modules use dictionary access.
- loop over scripts and load via python (currently F8 reload isnt working, will add back shortly)
- the C module is kept but renamed to _bpy and not meant for direct access from anything but the bpy package.
- bpy_types.py is an exception since it runs before the bpy package is initialized.
2009-11-13 09:28:05 +00:00
Campbell Barton
d0dff582a8 dont use the actual scene when registering the class 2009-11-13 08:44:57 +00:00
William Reynish
4123c1fd7b Made a few more property areas work with a single column.
Also fixed a few minor layout issues.
2009-11-12 21:44:35 +00:00
William Reynish
fbb2c38485 Implemented single column UI for textures, curve, mesh and empty.
Reverted 24524 materials change because it it made greying out not work correctly.
2009-11-12 15:41:44 +00:00
Campbell Barton
aeca8f6a35 undefined py variable 2009-11-12 15:13:47 +00:00
Thomas Dinges
cb7aff89e8 * Minor code cleanup. 2009-11-12 14:37:13 +00:00
William Reynish
bee2335aa0 Implemented suggestion be Matt to slightly tweak the code for single column UI 2009-11-12 13:05:12 +00:00
William Reynish
9596b369bd Added single column UI layouts
This changes the layout when the properties window gets too narrow to render the contents properly. 

Currently implemented for render, scene, world, object and materials, but the rest can be done easily.
Here's a video for demonstration:

http://www.reynish.com/files/blender25/properties_resize.mov

It automatically detects the window width and then skips the indicators that tells the layout to go to the next column. It requires very minimal changes to the UI scripts so we don't have to maintain two versions of the layouts.
2009-11-12 12:35:37 +00:00
Joshua Leung
1df6575074 Spline IK: UI/Scaling Tweaks
* Renamed "Keep Max Length" to "Y Scaling" which has the opposite meaning

* Improved the way that Y-Scaling off behaves. Most of the time, bones that do not fit on the curve are now "blended off" their default rotations instead of being scaled to zero.

* Added option to offset an entire chain by moving the root bone of the chain. This is named "Chain Offset"
2009-11-12 12:20:57 +00:00
Brecht Van Lommel
047ee04418 Fix for import/export menus, hide collada if it is not compiled in. 2009-11-11 19:12:52 +00:00
William Reynish
f243928055 Added some missing theme entries and removed some unused ones. 2009-11-11 16:27:00 +00:00
Thomas Dinges
f76a6020c0 Nodes:
* Added properties operator to the View menu.
* Added Notifier for Node Select Operator, so the new "Active Node" Panel gets refreshed.
2009-11-11 16:02:18 +00:00
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