Age | Commit message (Collapse) | Author |
|
if bpy.data.objects: ...
Would get loop over the entire collection, instead see if this collection has a single item.
|
|
accept the imbuf flag so they can get the float buffer from opengl directly.
|
|
- 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).
|
|
Discussed with Campbell.
|
|
resolves to an RNA property.
|
|
allow collections to be coerced into rna structs when they define a type.
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.
|
|
(reported by Luca)
eg:
bpy.context.StringProperty(attr='myprop'); del bpy.context.myprop
- made rna StringProperty/PointerProperty & similar into class methods.
- file selector hide option was inverted
|
|
- they now share the same code so it wont happen again.
- added id_data to properties so we can do...
matrix = C.object.matrix_world
obj = matrix.owner.id_data # get the original object back.
|
|
this now works...
bpy.context.scene.path_resolve("objects.active.location")
Also added an option to coerce the property into a native pytype.
|
|
eg: mesh.materials[0]
... when this was an empty slot.
- game world mist panel wasnt updated for rna renaming.
|
|
mix-in's to define properties.
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.
|
|
- added modified 'Warp' enum to reserve this ID for durian files until the modifier is merged.
|
|
|
|
Still not linking with Makefiles, will try and fix later.
Kent
|
|
https://svn.blender.org/svnroot/bf-blender/trunk/blender
|
|
collections.
|
|
commenting 'blend_factor' for now, its not used.
COLOR and EULER internal pyrna subtypes were causing color type variables to try update euler rotation order.
|
|
errors now works when executing class functions in a module.
- replaced PySys_GetObject("modules") with PyImport_GetModuleDict()
- use defaults for keymap import/export rather then setting the same value every time from the UI scripts.
|
|
WM_operatortype_find
- hopefully fix reported problem with MSVC.
|
|
https://svn.blender.org/svnroot/bf-blender/trunk/blender
|
|
- raise an exception when python calls is_property_set(name) or is_property_hidden(name) and the property does not exist.
- added BLI_findstring_ptr(), which finds a named item in a listbase where that name is a pointer to a string.
- replaced inline for loops with calls to BLI_findstring_ptr() and IDP_GetPropertyFromGroup().
|
|
|
|
'bpy.data.objects[foo].modifiers' from the objects modifiers, uses the same function thats used to make the animation path.
|
|
https://svn.blender.org/svnroot/bf-blender/trunk/blender
|
|
- optional argument for the drawing mode crashed when not set
- added a check for the call fuinction being callable
- added a check for the argument being a typle.
|
|
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.
|
|
|
|
Added some docs mainly in bpy.types.UILayout.html, descriptions by Florian Meyer (testscreenings), thanks.
|
|
https://svn.blender.org/svnroot/bf-blender/trunk/blender
|
|
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.
|
|
https://svn.blender.org/svnroot/bf-blender/trunk/blender
|
|
The BGE was getting the namespace dict directly from __main__ which conflicts
with my recent fix to get the pickle module working which to overwrote the __main__ module on script execution.
Simple fix is to have the BGE and Blender use the same method of getting namespaces.
Renamed CreateGlobalDictionary() to bpy_namespace_dict_new() and moved into bpy_internal_import.c
pickle still wont work in the BGE since we make a copy of __main__ namespace but for speed would rather not have to replace the __main__ module many times per second.
|
|
- 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.
|
|
- removed the immediate option from C/api and now store in python only, when python loads modules it sets it to False.
- unloading a module would clear the entire TypeMap for all modules, only remove the module types that is being unloaded.
- added some checks for bad class registering, report errors rather then crashing.
|
|
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
|
|
https://svn.blender.org/svnroot/bf-blender/trunk/blender
|
|
|
|
- made int buttons round floats better 10.6 --> 11
|
|
recent commit cleared the __main__ namespace once a script finished which meant classes defined there would loose their namespace.
now inset a new __main__ module into sys.modules for every script that runs, any classes that are registered will hold a reference to that modules namespace.
|
|
blender (thanks for spotting Luca).
|
|
https://svn.blender.org/svnroot/bf-blender/trunk/blender
|
|
suggestion [#23093] Curve -> CurveMapping in brush...
|
|
- 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.
|
|
- __import__("__main__").__dict__ will now always match the current scripts namespace. (which is what pickle expects).
- __builtins__ as a module rather then a dict from PyEval_GetBuiltins() acts slightly differently, use the module to follow python.
|
|
- exceptions in the __init__ functions were not being checked for and segfaulting
- avoid creating a new BPy_StructRNA instance per function call, use the existing one if the type matches.
|
|
|
|
* Brush icon property back to not using image browser until a better solution is decided on.
|
|
but for images only.
* Changed UI code to display image browser for PROP_IMAGEPATH
* Set the icon_filepath RNA property for brushes to use PROP_IMAGEPATH
* Changed preview icon drawing to ignore unset icons
* Fixed const warnings in brush RNA
|
|
wasnt crashing anymore but made exception message clearer.
|
|
for some reason mbstowcs() was converting '/home/matrem/Téléchargements/' to '/home/matrem/T', where blenders utf8towchar() worked correctly, tried changing my locale but didnt help so using blenders utf8towchar() function.
|