Age | Commit message (Collapse) | Author |
|
ui/ --> startup/bl_ui
op/ --> startup/bl_operators
scripts/startup/ is now the only auto-loading script dir which gives some speedup for blender loading too.
~/.blender/2.56/scripts/startup works for auto-loading scripts too.
|
|
This removes auto-registration, committed by Martin r30961.
Realize this is a contentious topic but Brecht and myself both would rather opt-in registration.
TODO:
- addons need updating.
- class list will be modified to use weakrefs (should have been done for existing system too).
- will move bpy.types.(un)register functions into bpy.utils.(un)register_class, currently including these functions in a type list is internally ugly, scripts which loop over types also need to check for these.
|
|
|
|
- operators need to enable the option OPTYPE_PRESET or 'PRESET' in python.
- hidden properties are not written.
- currently this only works in the file selector (enabled for FBX/OBJ export)
- currently the menu label doesnt change when presets are selected, this is a TODO, not so simple since the UI is defined in C and the label in python.
- presets save in "scripts/presets/operators/*id*/*.py"
|
|
- SSS Presets were not working on pinned materials.
- added ability for save-presets to define variables to stop them becoming too verbose.
- remove object.active_node_material
|
|
New create option when getting a user resource for creating paths.
bpy.utils.user_resource(type, path, create=False)
|
|
preset.py"
- Setting operator properties was broken because of bpy_types.py meta-classing (surprising this wasn't noticed before!)
- Presets now use a dialog with an OK button.
- Presets use a check function on the filename so invalid chars are replaced editing.
- Submit docs operator was broken.
|
|
The undo problem was caused by python operators returning 'RUNNING_MODAL' rather then the return value from wm.invoke_props_popup(self, event) - 'FINISHED'.
This was done because returning FINISHED would free the operator causing the buttons redo handler to try and run a freed operator and crash.
So the real fix is to disallow any operators to use wm.invoke_props_popup(self, event) if they dont have the REGISTER option enabled, fixing the crash and redo problem.
|
|
|
|
properties
|
|
color properties
|
|
- use preset subclass with funcs for updating the keyconfig
- keyconfig filenames are used for the UI names as with presets (so separation anymore)
- keyconfig's are stored in the preset dir (scripts/cfg dir removed)
- only the active keyconfig script is loaded
- some bugfixes for saving keymaps
- user interactions no longer saves keyconfigs too, I think this needs to be re-worked.
developer note...
multiple keyconfigs at once are not really needed now that they are stored & accessed directly in python.
for now I left it alone but we could consider to remove this capability in the future.
|
|
note: this is an option to the add preset operator which is a bit odd but easiest since these classes have all the info needed for removal as well.
|
|
|
|
|
|
* context.main & bpy.types.Main --> context.blend_data & bpy.types.BlendData
* context.manager --> context.window_manager
|
|
scene.active_keying_set --> scene.keying_sets.active
...same for active_uv_texture. active_vertex_color, active_keyconfig,
- move mesh.add_uv_layer() and mesh.add_vertex_color() into their collections
also have them return the newly created layer and dont set the layer active.
uvtex = mesh.uv_layers.new(name)
vcol = mesh.vertex_colors.new(name)
|
|
Added an operator "Update Animation Data",
access from the search menu to update drivers and fcurves.
|
|
|
|
|
|
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
|
|
- made smallcaps use a temp flag so caps can still have the smallcaps flag.
- utility function for getting the char from a font. find_vfont_char(), was inline in ~5 places.
- removed CU_STYLE mix of flags only used in one place, not needed. removed 'style' from rna too.
- fix for some warnings.
|
|
- attribute save_keyconfig defaulted to True when unset, not sure why, but .
- use repr() rather then str() so strings are quoted without manually checking. also converts less common chars properly \m \" etc.
|
|
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)
|
|
|
|
Added a few more input properties to store in interaction presets
|
|
- pep8 corrections
|
|
removed NULL object data check since this isnt allowed from the api side.
|
|
|
|
This adds a new presets menu in the splash screen and the Input section of
User Preferences to choose a preset interaction style, consisting of key configurations
and also other user preferences such as select mouse button, view rotation style, etc.
Currently, just 'Blender' and 'Maya' presets are included, hopefully we can have more
presets contributed (and maintained!) by the community.
It's best to keep these presets minimal to avoid too many key conflicts. In the Maya one
I changed the view manipulation key/mouse combos and also the transform
manipulator keys, not much more than that.
To save an interaction preset, open the user preferences Input section, and press the
[ + ] button next to the presets menu. It will save out a .py file containing any edited key
maps and navigation preferences to the presets/interaction folder in your scripts folder.
---
Part of this commit changes the way that key maps are exported/displayed in
preferences - now partial key configs are allowed. Previously it would export/import the
entire key configuration, regardless of whether individual key maps were edited or not
(which would make them more susceptible to conflicts in unexpected areas).
(note, in blender terminology, a key map is a category of key items, such as
'Object Mode' or 'View 2d'.)
Now, the export and the UI display work in a similar way to how key maps are
processed internally - Locally edited key maps (after pressing the 'Edit' button) are
processed first, falling back to other key maps in the current key config, and then falling
back to the default key config. So it's possible for a key config to only include a few
key maps, and the rest just gets pulled from the default key config. The preferences
UI display works like this too behind the scenes in deciding what to show users,
however using it is just like it was before, the complexity is hidden.
|
|
bpy.types.SceneRenderData -> bpy.types.RenderSettings
better do these changes before there are too many scripts out.
|
|
|
|
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.
|
|
register() function rather then making import automatically run the register functions (generally considered bad practice by python people)
|
|
|
|
|
|
setting. New presets will remember field settings but I didnt change
existing presets since I think this could be dangerous.
|
|
Patch by Daniel Salazar - ZanQdo
- Do not change save the distance factor since this is not relevant as a preset, it should stay at what ever the user
set it to work with that particular scene
- fixed a tooltip
|
|
* Mountain: low turbidity, well-defined sun, blue-ish (high sun energy)
* Desert: high turbidity (dust), big, diluted sun, red-ish
* Classic: average turbidity (water vapor), small, diluted sun.
also fixed a bug with saving string presets
|
|
to give access to "self.layout" - like panels, headers and manu's have
|
|
* operators now return sets (converted into flags)
* can't remove bpy_operator_wrap.c since macro's still use the custom register funcs
|
|
made some changes but mostly these scripts will give pep8 warnings.
|
|
converted into a PyObject
only used by wm.invoke_props_popup() currently
|
|
|
|
|
|
- for adding an operator, start with a blank name and dont write the default one. (still writes each name you type in, will need to fix this properly)
- move the AddPresetBase class into presets.py since all the presets are defined there.
|
|
|
|
* Added Cloth Presets. Patch by nudelZ. Thanks!
|
|
|
|
make this a more general system.
this commit shows how to add a preset using the base preset class and menu with minimal effort.
|