Added two user preferences for filebrowser:
1. Hide Recent Locations
Requested by Kernon Dillon. Reason: People doing video tutorials might not want to expose the name of other projects they are working on.
2. Open Filebrowser in thumbnail view for images and movies
Requested by Sebastian König at the Blender Conference. Reason: In the past (and most likely still) some corrupt images or movies could crash the filebrowser when generating thumbnails. (crashes in ffmpeg, libtiff, libjpg). While many of those were solved, artists in a production environment might want to use this setting to prevent any crashes.
NOTE: the second setting should probably be set next time we create a new default startup.blend. Until then users need to switch this on manually in the User Preferences.
WM_operator_poll() could fail in cases WM_operator_name_call() would succeed because calling the operator would setup the context before calling poll.
this would result in python raising an invalid error or menu items being greyed out.
now python can also check with an operator context:
bpy.ops.object.editmode_toggle.poll('INVOKE_SCREEN')
- 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.
* FSA and motion blur can't work nicely together the way they're currently implemented, so I disabled this in the ui and code.
* FSA is used if both are selected.
* Also changed the name "Full Sample Motion Blur" to "Sampled Motion Blur" to avoid confusion with full sample anti-aliasing.
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.
Patch by Dan Eicher. In 3dview properties you can enable this. Rotating view then uses cursor as pivot point. Note that with this option enabled just relocating the 3d cursor also changes the 3dview.
Sebastian König: "Now the 3d cursor is actually useful" (sitting next to me while applying patch at bconf hostel)
* Related to bug report [#24329] scene length not updated in VSE
* This data is nice to have in the sequencer without having to go the actual scene that's added as a strip.
* No way currently to know the order of effect inputs, so I added a swap operator for the inputs.
* Also added the effect inputs to the strip property panel (weren't even in rna before). These are not yet editable, but can be very helpful in determining what the inputs are if the strip is too short to see the name in the timeline.
New Feature:
VCS job type
Render a file (with dependencies) from a version control system (currently only supports subversion, but system is already generic).
On client, working path, server path and current revision can be guessed from data on disk or entered manually.
On slave, a working copy is created (if needed) where specified by the job and updated to the proper revision.
On master web page, job types now appear in the job lists. The job page shows the list of dependencies for "normal" jobs or versioning information for VCS jobs.
Limitations: Need to have command line tools "svn" and "svnversion". Working copy path must be the same on client and slaves (the client gets the job path relative to the working copy). When guessing, working copy path is set to the folder where the current file is (this can be changed manually after). On the slave, it will update the working copy AS SPECIFIED to the revision, so if that path is too deep, some dependencies will not be updated properly. Doesn't support mixed revisions (and will not give any warnings for that), it will always use the first revision specified by "svnversion"
Bugfix:
Thumbnail generation doesn't chew down memory anymore and always gives correct result (thumbnail on master especially could mess up between jobs with the name result filename)
* This fix is really only a bandage, as the underlying issue is that sequencer preview render doesn't yet use the job system.
* The sequencer preview can start a full render of the scene, and this can collide with other preview/actual renders in many cases.
* Drawing the sequencer preview is now disabled when an other render is in progress, but the sequence preview rendering could have already been started before the other render, so this doesn't really fix anything.
* For now only OpenGL rendering can be used for the sequencer preview reliably until it's reimplemented using the job system.
* Using the job system in the future can handle the clashes between different renders properly and will give users a nice progress bar to indicate something is happening while the preview is recalculated.
This should help silence complaints from some about "dloc",etc. not being easily keyable.
It's also a nice way to have instances of animated objects located in different places, by animating either the standard transforms or the deltas, and then modifying by not animating the other version to keep the instances from going to a single point. This was a common newbie problem in 2.4x.
Users can set their machine name to something containing non-ascii characters. In Python this currently causes problem due to
socket.gethostname() throwing UnicodeEncodingError. Work around this by not using platform.system() (which uses internally socket.gethostname()).
See http://www.pasteall.org/16215 for backtrace
was missing button for single layer rendering.
also renamed Object.show_shape_key to Object.show_only_shape_key since this pin's the shape key so others are disabled.
now addon path is created using the same path functions and selecting where to save the startup.blend
also made some minor changes to path handling funcs.
- fixed WM_OT_context_cycle_int was causing problems with int overflow, now it cycles properly.
- rename QUOTE macro to STRINGIFY_ARG, and added STRINGIFY, which is used more often since it gives the value as a string.
* Shapekey editor now shows ID-box for showing and editing the action assigned here. This should help alleviate the misconceptions arising to #23823, where user tries to load shapekey action into Action Editor (context there is ob-action only).
There are still a few minor update bugs that I still need to fix here (i.e. post keyframing) though. Those shouldn't take too long I think.
* Changing the action used in the Action Editor properly decrements the user counts now. This solves the bug where you could get actions with a high usercount, but not that many actual users.
* Sequence speed effect was functional in theory, but very difficult to actually use.
* Now the effect works as follows:
- "Speed Factor" (formerly "speed fade") controls the current speed of the sequence (can be animated).
- "Use as speed" (formerly "f-curve velocity") is now the default behavior so that the "speed effect" by default changes the "speed" of the sequence.
- "Multiply Speed" (formerly "global speed") is a scale factor that's applied to the calculated frame (can't be animated).
- Without animation "Speed Factor" and "Multiply Speed" work exactly the same (in this case "multiply speed" could perhaps be disabled in ui, but currently there's no easy way to check this).
- If "Use as speed" is not checked the effect simply remaps the current frame to the given "Frame Number" (can be animated).
- "Scale to length" (formerly "f-curve compress y")scales "Frame numbers" from 0.0-1.0 to the length of the target strip to allow easy animation.
* Tooltips added for all values and options.
* Code for frame blending was nowhere to be seen, so I commented the option out from ui.
* This should fix at least bugs #20979 and #21309.
* The cache was reset almost constantly because smoke didn't save the first frame into cache. Although not necessary for smoke, it's vital to pointcache.
* Added info message to smoke cache panel for non saved files.
* Now smoke also only updates with a framestep of 1, so that scrubbing the timeline doesn't mess up the simulation.
* Among other things fixes report #23731.
modified the patch to store the string internally rather then an array of allocated string pointers, less hassle with memory allocation.
changed to use fnmatch, so *.foo is needed (not .foo as with the patch)
This means we can do operator drawing without passing self.properties as an argument.
while this check if quite specific, if this gives problems later on we should probably change operators not to try to mix an operator and its properties, it looks nice to a scripter but internally is not easy to manage.
- converted 3 options in keying sets to use bl_options like panels & operators
- removed function arguments for new keying sets, better adjust these after to avoid duplicating properties in function arguments (they were not used).
This runs after changing a property and allows correcting incompatible options.
Returning True will redraw the UI.
Currently this is used for setting the write extension when saving files, so changing the image format also corrects the extension.
The same is accessible from python where its used when saving SVG/EPS/PNG files.
This fixes: [#23828] obj export problems, [#23760] Exporting OBJ and filetype ending
also fixed document submission operator.
Now the filename in the file selector is the one used for writing this means we remove the "Save Over" popup which could be overlooked too easily.
Instead display the filename field with red tint, and a note in the tooltip.
Crash was caused by missed offscreen OpenGL buffer. Added checking around this stuff.
Also fixed crash of simple "Image from view operator".
Note: This commit fixes only crashing, you'll be still unable to use this tools.
- 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.
ideally this would only happen in cases where there are more then 1 image so we could avoid ugly names in common cases.
svn merge -r31916:31915 release/scripts/op/io_scene_obj/export_obj.py
Now reloading the user defaults also unloads/loads addons, resetting the state to the one set in the user preferences.
moved addon functions into bpy.utils
- bpy.utils.addon_enable(name, default_set=True)
- bpy.utils.addon_disable(name, default_set=True)
- bpy.utils.addon_reset_all(name, default_set=True)
the user preference operators now just wrap these.
netrender client's functions to get slaves and jobs info didn't work anymore (was reading response content twice).
At the same time, I switched to json for the dump and load, instead of using eval and repr (for obvious security reasons). I should have done this much earlier.
The reason this didnt work is all sibclasses of pythons type() or PyType_Type in C, have to have their size set to sizeof(PyHeapTypeObject) rather then sizeof(PyTypeObject) as you might expect.
This is strange since its not a heap-class (defined in pythons runtime), but a static C type, so Im not sure about this, and cant find any documentation but it seems to work ok.
- operator properties are now converted into python property() class members which bypass the operator 'properties' member.
self.properties.mysetting
... can now be written as ...
self.mysetting
- fix for error reloading rigify
eg:
bpy.types.Scene.myprop = BoolProperty()
note, this uses an ugly python metaclass, this should be replaced with a C implimentation which is included but commented out, causing crashes in pythons GC which gives no hint as to where the bug comes from.
- better error reporting when an addon fails to load
- upload an addon which loads partly but then fails (eg, module loads but class register fails)
- bugfix addon loading, failier to load would leave _bpy_types._register_immediate = False
- added which change on disk are reloaded when enabling.
- bpy.path.module_names() now returns (module_name, module_path) pairs.
while not a bug, being able to cycle over vertex/edge/face modes is useful. added an operator to cycle an array, could be used for cycling the active layer or mesh edit mode.
- move: material.add_texture(tex, coords, mapto) --> material.texture_slots.add()
- added material.texture_slots.create(index), material.texture_slots.clear(index)
- texture slot functions also work for lamp and world now.
Other minor changes
- allow rna functions to set FUNC_NO_SELF and FUNC_USE_SELF_ID at once.
- [#23317] Changed some operators' RNA to accept lengths, a modification I made to this patch made it not work as intended, removed this edit so unit buttons appier in the UI for certain operators.
- Sphinx doc gen, 2 columns rather then 3, didnt quite fit in some cases.
- use 3 column lists for inherited props, funcs and for references to save on vertical space.
- use the blender version string for the upload path and PDF name.
- set_frame() --> frame_set()
- set_context_pointer() --> context_pointer_set()
material adding works for curves and metaballs, new function to remove materials.
materials.link() didnt well fit how this is used elsewhere
- order matters
- it can be linked more than once.
- remove(material), isnt that useful since you need to manage indicies.
... use list style functions instead. materials.append(mat) / materials.pop(index)
* The actual problem was that the total amount of particles was rendered at all, since only the displayed percentage was calculated correctly.
* New behavior is that before baking (baking is always done for full % of particles) the display % is used for rendering too for dynamic particles.
* Also added a warning below the display % slider to inform about the situation.
http://www.vrchannel.de/blender/cylinder_rename.png
Mesh Tube > Mesh Cylinder
NURBS Tube > NURBS Cylinder
Metaball Cylinder > Metaball Capsule
I know that naming is something not everyone agrees on, but these terms look geometrically correct.
Reported by Reiner Prokein
A .obj file can have multiple mtllib statements with the same name. Ensure that only one occurance is saved, so we don't get multiple entries from same material.
Also fix tabs -> spaces
- ID properties now suopport non utf-8 strings for their values but not their keys.
- moved utility functions into py_capi_utils.c from bpy_utils and bpy_rna.
- import/export paths have to be printed with repr() or %r, so non utf-8 chars are escaped.
- made operator dir's into python packages
- lazy loading of module which do the actual import and export (faster blender load times)
- general maintanance and small fixes.
- bugfix for exporting x3d materials
- leak fix for exporting 3ds
- From now on addons bl_addon_info['name'] doesn't need to specifcy also the category, it is put automatically in the addon box title
In some script category and the category in the title were not matching, this had to be fixed manually.
- The warning icon is at the right of the addon box title, so that it cant disalign the addon name anymore when we have a warning.
- After discussing with Campbell, I've added the field bl_addon_info['api'] where we should specify the Blender API version number the addon is
compatible with.
This is certainly useful for clarity, and also I need it in place while preparing the downloadable addons.
- Also, bl_addon_info['version'] is now assumed to be a tuple of integers as it is bl_addon_info['blender'].
Any important text should be placed in the bl_addon_info['warning'] field, not in the script version anymore.
I'm going to reflect this change in bf-extensions so that scripts won't suddenly break.
- function renames, move WM functions into collections wm.add_keymap() --> wm.keymaps.new()
note: new is used for named items in a collection, which return the result.
- Action.get_frame_range() is now a readonly property 'frame_range', floats rather then ints.
- OBJ import/export now work with non utf8 paths. (all exporters and importers need changes like this)
- strip non utf8 chars from new ID blocks (also applies to renaming)
- set the file rename button to allow non-utf8 chars.
- UV texture coords were never written.
- TexFace with no material resulted in an invalid XML file (unclosed tag)
- freewrl wouldn't parse "FALSE", needs to be "false"
- the ID data name was being written as the filename, so in many cases images wouldn't load.
obj.add_vertex_group() --> obj.vertex_groups.new()
obj.add_vertex_to_group() --> obj.vertex_groups.assign()
note: obj.vertex_groups.assign() will be very slow, need to have this take a list rather then 1 vertex at a time.
- mesh.add_geometry(v, e, f) --> mesh.vertices.add(tot), mesh.edges.add(tot), mesh.faces.add(tot)
- mesh.add_material(mat) --> mesh.materials.link(mat)
changed material.link so it always adds a material even if it exists in the list, this behavior is good for users but not scripts since it can mess up indicies (some formats may have the same material set twice).
Contributed by Imran Syed (freakabcd)
Adds a field where the user can put in name/nickname that exporters
then can use to write authoring information, where possible.
* 'Active' on TimeLine header needs to show choices ALL KeyingSets available (Builtins + Scene-Absolutes), not just the ones in Scene ("Absolute Paths")
* The active KeyingSet setting is needed/used-by for both of these.
eg:
row.prop_search_self(scene, "active", "keying_sets", text="")
...becomes
row.prop_search(scene.keying_sets, "active", scene, "keying_sets", text="")
This is more flexible since it works for other UI functions too.
eg:
bpy.context.StringProperty(attr='myprop'); del bpy.context.myprop
- made rna StringProperty/PointerProperty & similar into class methods.
- file selector hide option was inverted
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)
layout.prop_object() --> prop_search().
The internal name is uiItemPointerR, in python this can translate into into an Object, however this is misleading.
It can be confused with a blender Object and uiItemPointerR can also be used for strings.
changed some rna names to be more consistant
- use_texture -> use_image, since it sets if 'image' is used.
- use_map_color_diff -> use_map_color_diffuse since diffuse is used elsewhere in the same type.
Changed some names when applying.
- render was use_render, changed to show_viewport so call it show_render
- texface shadow was use_shadow_face, changed to use_shadow_cast since this only affects casting.
- transp was alpha_mode, changed to blend_type since its similar to other overlay blending where this property name is used.
An example of how this is useful - an importer mixin could define the filepath properties and a generic invoke function which can run the subclasses exec for each selected file.
- Panels and Menus now skip the property check when registering.
- renamed _idproperties_ to _idprops_ in function names, function names were getting very long.
- any numnber of attributes are supported for renaming, eg: modifiers["Foo.Bar"].prop.bar
- the path is resolved in blender so each attribute is type checked against the naming list.
- inherited properties are supported by recursively checking parent classes names aganst the name list.
- fcurves and drivers are currently supported.