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)
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
- 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).
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)
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.
- rename TextLine.line -> body, ConsoleLine.line -> body
- minor speedups when setting the body text, also re-allocate console lines if they are < half the length.
- added option to highlight current line in the text editor.
also made all other exporters do this.
Made some internal changes.
- moved path functions from bpy.utils to bpy.path (similar to os.path)
- added functions...
bpy.path.ensure_ext(path, ".ext", case_sensitive=False) # simple function to ensure the extension is set.
bpy.path.resolve_ncase(path) # useful for importing scenes made on windows where the path case doesnt match the files.
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.
- remove brush array for each Paint struct, just use a single brush pointer.
- removed rna function based template filtering.
- filter brushes using a flag on the brush and the pointer poll function.
- set the brushes using a new operator WM_OT_context_set_id().
TODO
- remake startup.blend, currently brush groupings are lost.
- rewrite WM_OT_context_set_id() to use rna introspection.
- fix for reload (f8) crashing, missing incref when creating the script namespace.
- store the module names rather then the modules for reloading incase the modules get out of date.
- the __main__ modules namespace was initialized cleanly but left dirty, now restore when finished executing a script incase a module uses this later.
- made the interactive console use the __main__ modules namespace.