Commit Graph

49 Commits

Author SHA1 Message Date
Campbell Barton
7da5d9faec rna renaming, still only adjusting properties that wont be animated (at least its very unlikely). 2010-08-18 07:14:10 +00:00
Campbell Barton
3bd039eff9 apply rna rename most of the show_*, names. 2010-08-17 17:03:52 +00:00
Campbell Barton
7c0216c7a0 minor adjustments to python scripts to make them easier to run outside of blender. 2010-08-10 18:21:33 +00:00
Campbell Barton
a6f13f9d7b poll() as a python '@staticmethod' was too limiting and didnt allow useful base class poll functions in many cases.
now rna functions that dont have a 'self' are automatically assumed '@classmethods'.

de-duplicated poll functions and made some minor tweaks too.
2010-08-09 01:37:09 +00:00
Campbell Barton
acca04bf33 remove narrow ui feature
- re-arranged UI in a way that gave far too much vert scrolling.
- was added all over for simple things like making text="", layout engine should handle this.
- Ton and Brecht are ok with removing this now. Ton would like to work on the layout engine to make it better support these cases.
2010-08-06 15:17:44 +00:00
Campbell Barton
163f6055d2 bugfix [#23182] Using self.report() inside poll() gives crash
poll() function is now a static method in python, this is more correct, matching C where the operator is not created to run poll.


    def poll(self, context): ...

is now...

    @staticmethod
    def poll(context): ...

Pythons way of doing static methods is a bit odd but cant be helped :|

This does make subclassing poll functions with COMPAT_ENGINES break, so had to modify quite a few scripts for this.
2010-08-05 16:05:30 +00:00
Martin Poirier
5b345524ea RNA Types metaclass registration
See mailing list posts for details [1][2][3]

Addons still need to be fixed; Campbell said he'd do it today.

See any of the py files (outside netrender) in this commit for how to do it (it's rather simple).

[1] http://lists.blender.org/pipermail/bf-committers/2010-February/026328.html
[2] http://lists.blender.org/pipermail/bf-committers/2010-August/028311.html
[3] http://lists.blender.org/pipermail/bf-committers/2010-August/028321.html
2010-08-02 02:55:12 +00:00
Daniel Salazar
7b09e47dc4 Added name to object color in object properties. Kinda misleading
without it
2010-06-29 05:02:51 +00:00
Campbell Barton
5cc2e136ec nicer alignment for preset UI 2010-06-27 21:35:31 +00:00
William Reynish
4eba521903 Set button emboss to false a few more places where it makes sense, such as disclosure triangles and panel closing X icons. 2010-06-26 21:40:11 +00:00
Campbell Barton
5ce214a06f object color property in the object UI panel 2010-06-26 17:46:14 +00:00
Campbell Barton
c2f36a4d6a naming changes
path -> filepath (for rna and operators, as agreed on with elubie)
 path -> data_path (for windowmanager context functions, this was alredy used in many places)
2010-06-14 03:52:10 +00:00
Campbell Barton
1bd58bdbf4 = misc small stuff =
- own mistake in scene help text.
- rename properties to have users as the prefix for better ordering.
- use fixed height for stamp, gives better aligned text.
2010-05-25 17:04:32 +00:00
Thomas Dinges
e1bf9d30bc Properties Window:
*The narrowui value was hard coded in all ui scripts, made an user preferences option. Basically this value determines on which area width, it should switch between dual/single column layout. 

ToDo: The Changes only take effect when reloading scripts/restarting Blender (after saving as default). Will maybe add the "Reload Scripts" operator next to the button in the future. 

* Small fix for Fluid Add Button, when in single column mode. Didn't expand like the other "Add" Buttons.
2010-05-16 10:21:00 +00:00
Campbell Barton
c8a0592288 option to use the linked path or the local path for pointcache.
needed for sintels hair to be baked locally.
2010-05-06 17:12:44 +00:00
Campbell Barton
12cf8ac1d6 - split objet group add/link into 2 operators
- link now brings up a search box so when there are 100's of groups its less annoying.
- utility functions for id-enums so only local objects can be displayed in a search list (used for group_link)
- renamed operator properties from typle to scene, group, action etc.
2010-05-05 15:41:38 +00:00
Campbell Barton
bc149e0fbe pep8 cleanup 2010-04-04 14:52:15 +00:00
Brecht Van Lommel
71446eea57 * Multiply for panorama cameras
* Some cases of struct name being set where it shouldnt have been.
* Spelling: wich --> which
* Copy and initialize uv modifier scale, remove unneeded enum.
* Ability to pin any object into the context.
* Update uv window while transforming (useful when used with UVProject modifier)
* Patch by Wahooney, so new template's are internal text and dont get saved over
  by mistake.
* Fix for https://bugzilla.redhat.com/show_bug.cgi?id=572186
  Bug 572186 - [abrt] crash in blender-2.49b-5.fc12: Process
  /usr/bin/blender.bin was killed by signal 6 (SIGABRT). Original fix submitted
  by Jochen Schmitt.
* [#21816] bpy.data.add_image has stopped working on Windows. moved to
  bpy.data.images.load(), missed this call.

(commits 27726,27825,27828,27831,27832,27833,27834,27836,27837,27838,27839,27858 by Campbell from render25 branch)
2010-03-30 12:15:16 +00:00
Joshua Leung
386e97f73a Purging compiler warnings 2010-03-26 03:10:58 +00:00
Joshua Leung
3c872daa59 4 Devs in Agreement - End of the Road for Old Track
This commit removes the Old Track method (used to be found under Object -> Animation -> Track), with all existing instances of this being converted to Track To Constraints. In fact, while performing this removal, I found that this was supposed to have happened in version 2.27 already, but for some reason the options were left in, and this function managed to survive for a further decade.

I've left the tracking axes around still, since it seems some curve tools still use that. However, that usage should probably get faded out in future too?


Misc notes:
* Fixed compiling error with constaints from harkyman's Maintain Volume patch. 
* Subversion of 2.52 now bumped up to .2
2010-03-26 02:57:49 +00:00
Campbell Barton
7c0d2ffb64 pep8 cleanup 2010-03-06 01:40:29 +00:00
Joshua Leung
4b80d4e60d AnimViz (Motion Paths + Ghosting) panels are registered so that they will show up in a sensible location in the properties window. Also made these panels collapsed by default. 2010-02-25 12:01:43 +00:00
Campbell Barton
97bdfe6f1b pep8 cleanup + correction for external player operator return value. 2010-02-22 23:32:58 +00:00
Campbell Barton
23efeff6a9 [#21177] Text editor
Running scripts directly didnt call the register function, even though this is not essential its good to be able to run a script directly and see changes in the UI.
2010-02-16 09:55:07 +00:00
Campbell Barton
39c04315e2 change python scripts so modules which register with blender have a register() function rather then making import automatically run the register functions (generally considered bad practice by python people) 2010-02-14 11:21:21 +00:00
Campbell Barton
081c1205a3 correct fsf address 2010-02-12 13:34:04 +00:00
Campbell Barton
95069f2909 pep8 changes 2010-01-31 14:46:28 +00:00
Campbell Barton
b8ca67ca33 custom properties panels for most ID types. use subclassing to keep panel UI definitions minimal 2010-01-08 08:54:41 +00:00
Campbell Barton
8af456313a dupli faces inherit scale wasnt using the right flag internally.
renamed...
 dupli_frames_no_speed --> use_dupli_frames_speed
 dupli_verts_rotation --> use_dupli_verts_rotation
 dupli_faces_inherit_scale --> use_dupli_faces_scale
2010-01-04 17:27:23 +00:00
Campbell Barton
589b2b4ca8 object.group_users, object.scene_users
utility functions to find the groups and scenes this object is used in.

button to set the group location from the cursor (UI is horrible but not any nice place to add?)

smarp project would fail if there were linked meshes in the scene, made ID.tag ignore the library, so you can tag linked data since its only for tools to use.

normalize the vertex normal before setting and use inline vector functions.
2010-01-04 15:37:22 +00:00
Matt Ebb
7a33b5ce72 Tweak to group operator naming 2010-01-03 08:38:42 +00:00
Campbell Barton
b5740b0e77 remove ICON prefix from the enum, for python this is redundant eg.
layout.prop("setting", icon='ICON_BLAH_BLAH')

Also reverted previous commit, the cursor subtype just needed to be added to the switch statement.
2009-12-10 10:23:53 +00:00
Matt Ebb
6e467285cf [#20051] x for removing a mesh from a group doesnt scale with ui 2009-11-26 06:32:43 +00:00
Campbell Barton
e0fc6d0c33 more ui api changes.
- remove functions such as operator_int(), operator_enum(), operator_string
  this mixed with keyword arguments in a way that made them hard to read.
  Instead, have operator() always return properties rather then needing an argument.

- rename prop_pointer() --> prop_object(), pointer is more a C thing.

- missed item_enumR(), rename to prop_enum()
2009-11-23 11:43:38 +00:00
Campbell Barton
caab05ec8c rna UI api rename...
note: this aims to follow pep8 however I chose to use 'prop/props' rather then 'property/properties' because it would make function names too long.

itemR() --> prop()
items_enumR() --> props_enum()
item_menu_enumR() --> prop_menu_enum()
item_pointerR() --> prop_pointer()
itemO() --> operator()
item_enumO() --> operator_enum()
items_enumO() --> operator_enums()
item_menu_enumO() --> operator_menu_enum()
item_booleanO() --> operator_boolean()
item_intO() --> operator_int()
item_floatO() --> operator_float()
item_stringO() --> operator_string()
itemL() --> label()
itemM() --> menu()
itemS() --> separator()

batch script used http://www.pasteall.org/9345
2009-11-23 00:27:30 +00:00
Campbell Barton
bdb8004165 use is rather then == when comparing with singletons (None/False/True), its faster and suggested by pep8 2009-11-22 17:41:35 +00:00
Thomas Dinges
2577bfddfd Renamed "col2" to "wide_ui" which is more meaningful. 2009-11-19 13:26:51 +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
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
Campbell Barton
d33291fcc4 used py error checking tools to fix some bugs & make pep8 corrections 2009-11-14 13:35:44 +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
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
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
cbc5a78576 whitespace commit, (was some tabs mixed with spaces too) 2009-11-03 07:23:02 +00:00
Martin Poirier
9ea292290b Correct GPL license header for all python scripts 2009-11-01 15:21:20 +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