Age | Commit message (Collapse) | Author |
|
Adds new speaker object type.
Notes:
* Needs some nice icons
* Quickily review by Joshua Leung (5 mins)
* Properties UI updated (with help of Thomans Dinges)
* Speakers have their own theme color
* No real audio functionality yet.
* Minor bug regarding lamps/lattices fixed in interface_templates.c
I personality tested:
* Creation, Deletion, Duplication
* Saving, Loading
* Library linking (incl. make local)
* Tracking
* Dope Sheet, Outliner
* Animation
* Drawing (incl. Theme)
|
|
|
|
would return if the file was saved or not.
- rename to 'is_saved' (and negated).
- add 'is_dirty' which is true when the files edits are not saved to disk.
|
|
the built-in func keys()
|
|
|
|
|
|
- bpy.app.debug can now be set, removed bpy.data.debug (since this is not blendfile data)
- added bpy.app.tempdir, this is needed because the userpref temp dir isn't always set, $TEMP may be used instead and scripts need temp dir access.
|
|
* context.main & bpy.types.Main --> context.blend_data & bpy.types.BlendData
* context.manager --> context.window_manager
|
|
|
|
least its very unlikely).
|
|
|
|
* filename == "foo.ext"
* filepath == "/path/to/and/including/foo.ext"
this was alredy followed in some places not not everywhere.
|
|
- added BLO_idcode_to_name_plural() for names like meshes, scenes, libraries etc from and ID type.
|
|
Condition for this to work (.blend file must be saved) was poorly communicated
in the UI (printfs are no good for this - ideally should use reports). Tweaked this a bit.
|
|
|
|
|
|
|
|
|
|
|
|
setting the type for a collection does not work if its set before the type is defined.
|
|
change how data is added. eg.
bpy.data.add_mesh(name) --> bpy.data.meshes.new(name)
bpy.data.remove_lamp(lamp) --> bpy.data.lamps.remove(lamp)
image and texture stil use add_* funcs
|
|
was: object.pose.pose_channels["Bone"]
now: object.pose.bones["Bone"]
|
|
call an operator
- workaround for __getattr__ existing for types that dont support it
|
|
collections), this means functions can be easily added.
eg.
scene.objects.link()
object.constraints.new()
mesh.verts.transform(...)
mesh.faces.active
PropertyRNA stores an StructRNA pointer where these can be defined.
|
|
- last commit, missed include for rna_object_api.c & bad args to find_basis_mball
- use enum for GHOST tablet type None/Stylus/Eraser, had duplicate definition for these in C. Only tested X11, may need to cast to an int for other OS's.
|
|
Multidim. arrays can now be modified at any level, for example:
struc.arrayprop = x
struc.arrayprop[i] = x
struc.arrayprop[i][j] = x
struc.arrayprop[i][j][k] = x
etc...
Approriate rvalue type/length checking is done.
To ensure all works correctly, I wrote automated tests in release/test/rna_array.py.
These tests cover: array/item access, assignment on different levels, tests that proper exceptions are thrown on invalid item access/assignment.
The tests use properties of the RNA Test struct defined in rna_test.c. This struct is only compiled when building with BF_UNIT_TEST=1 scons arg.
Currently unit tests are run manually by loading the script in the Text Editor.
Here's the output I have: http://www.pasteall.org/7644
Things to improve here:
- better exception messages when multidim. array assignment fails. Those we have currently are not very useful for multidim.
- add tests for slice assignment
|
|
* Wrapped Grease Pencil datatypes in RNA.
* Hooked up Grease Pencil access in RNA (i.e. via Main, ID, and Scene)
TODO:
Updates to properties are currently lacking property-update calls, since there's no good notifier for this.
|
|
* Fix header menu spacing bug, and make it consistent for all headers.
* For consistency, always put menus first in the header, then any enums
to switch the type of data displayed.
* Node editor header ported to python layout. Still quite a few
operators missing to make the menus complete.
* RNA wrapped node editor, and added use_nodes property to material
and scene.
|
|
possible from python, but it's still work in progress.
Pointers and collections are restricted to types derived from
IDPropertyGroup (same as for operators), because RNA knows how to
allocate/deallocate those.
Collections have .add() and .remove(number) functions that can be
used. The remove function should be fixed to take an other argument
than a number.
With the IDPropertyGroup restriction, pointers are more like nested
structs. They don't have add(), remove() yet, not sure where to put
them. Currently the pointer / nested struct is automatically allocated
in the get() function, this needs to be fixed, rule is that RNA get()
will not change any data for thread safety.
Also, it is only possible to add properties to structs after they have
been registered, which needs to be improved as well.
Example code:
http://www.pasteall.org/7201/python
|
|
* Added support for passing collections to/from RNA functions,
this is done using a ListBase of CollectionPointerLink, which
is a standard ListBase link + PointerRNA.
* Added editable active uv/vcol layer to Mesh.
* Armature.bones now includes all bones, not only the ones without
parents.
* Modifier UV layer fields now are allowed to be empty, previously
this would set the name during modifier evaluation if there was
none.
|
|
Merging changes made by Arystanbek in the soc-2009-kazanbas branch,
plus some things modified and added by me.
* The API files now all in the makesrna module, convention is to
call them e.g. rna_mesh_api.c for rna_mesh.c. Note for visual
studio build maintainers, the rna_*_api.c files are compiled as
part of "makesrna", but do not have rna_*_gen.c generated as part
of the library. SCons/cmake/make were updated.
* Added function flags FUNC_USE_CONTEXT and FUNC_USE_REPORTS, to
allow RNA functions to get context and error reporting parameters
optionally. Renamed FUNC_TYPESTATIC to FUNC_NO_SELF.
* RNA collections now have a pointer to add/remove FunctionRNA's, this
isn't actually used anywhere yet, purpose is to make an alias
main.meshes.add() for main.add_mesh() in python.
* Fixes to make autogenerating property set/get for multidimensional
arrays work, though a 4x4 matrix will be exposed as a length 16
one dimensional RNA array.
* Functions and properties added:
* Main.add_mesh()
* Main.remove_mesh()
* Object.matrix
* Object.create_render_mesh()
* WindowManager.add_fileselect()
|
|
* Added an icon entry to RNA structs, instead of the UI_GetIconRNA
function, to keep code together a bit more and make the lookup
faster.
|
|
* Allow pointers to be editable, did SpaceTextEditor.text as a test.
* Changed PROP_NOT_EDITABLE to PROP_EDITABLE, and added
RNA_def_property_clear_flag.
* Removed rna_dependency.c test code.
|
|
* Added Particle wrapping patch by Roelf de Kock. It's not
complete yet and I haven't reviewed it, but committing anyway,
will get to it later.
* Added "Percentage" subtype for floats. Doesn't really do
much besides making auto rna buttons into sliders rather than
numeric inputs, but can later display in % rather than 0.0-1.0.
|
|
* RNA_blender.h is now generated along with the other files. It is not
used anywhere yet, and still located quite hidden next to the other
rna_*_gen.c files. Read only access for now.
* Inherited properties are not copied from the base anymore but
iterated over. Patch by Vekoon, thanks!
* Array get/set callbacks now do the whole array instead of getting an
index. This is needed for some layers for example so python can set
the array as a whole, otherwise the check that one layer has to be
enabled at all times gets in the way. Also nicer for the C API.
* Also some changes to returning pointers to make the API cleaner, got
rid of the type() callback and instead let get() return PointerRNA
with the type included.
The C API looks like this currently:
http://users.pandora.be/blendix/RNA_blender.h
|
|
It's about time that the RNA wrapping for various parts of the animation system were cleaned up for my recent changes. I've moved some code around (and/or deleted a file or two) in the process.
|
|
* Finished DNA_lamp_types.h, DNA_world_types.h and DNA_sound_types.h.
* Renamed "parent" struct property to "nested", and also remaining "from"
usage to "base".
* Added a NEVER_NULL subtype for pointers and use it for all properties
that apply.
* Make sure all structs have a description, and fix any other DOC_BROKEN
descriptions, also many other naming consistency improvements.
|
|
action channels and action groups. I broke both pose channels and pose off into their own rna. Links also updated in Object rna for both Action and Pose stuff.
|
|
|
|
* DNA_text_types.h done, patch by Roelf de Kock.
* Minor naming fixes in RNA-RNA.
|
|
accessible via python)
Many descriptions are not written, grep for DOC_BROKEN if you have some spare time to write struct descriptions.
|
|
Wrapped most of Armature settings, but bones are not yet complete.
|
|
many small changes, but the two bigger ones are:
* Sensors and controllers now use inheritance, rather than pointing
to the data in a separate struct. Had to add some new RNA define
functionality to support this better.
* DNA_meta_types.h was marked as done but still missing many things,
now completed.
|
|
|
|
* DNA_image_types.h done, except for some properties not being editable.
|
|
* Added more DNA_color_types.h, starting from patch by Sebastian Skejø.
What's missing is write access to some things like point location,
hard to retrieve the CurveMapping for proper update still..
* Added all datablocks as ID pointer in Main already, now only have to
change the type from ID to the specific type. Also added filename
to Main, which is basically the only non-internal property.
* Fixed setting shadow buffers size in lamps, also ensured it to be a
multiple of 16.
|
|
* Fix sensor data pointer code, also made sensor type non editable,
would need to do more work than just setting the type.
* Fix a fairly obscure bug related to inheritance and sorting.
* Complete DNA_ID.h wrapping, just a few extra properties and the
Library struct, most of this is internal.
|
|
* nicer RNA names for NodeTree and Node
|
|
|
|
* Wrap most user editable data in DNA_mesh_types.h and DNA_meshdata_types.h.
Still needs to be improved in some areas though, especially how to deal
with data layers (expose per element or as array, or both?), and data in
face corners (bmesh type data structures are more logical here).
Tweaks to RNA defining to make some cases easier:
* Added range callback function for int/float.
* Added 'skip' callback for listbase and array iterators to skip items in
the collection.
* Extra error print when calling wrong define_property_*_sdna functions.
* Also made button code respect non_editable flag, is quick change though,
need to add support for properly graying out etc.
|