Age | Commit message (Collapse) | Author |
|
* DNA_object_types.h done.
* Scriptlink skeleton added.
* Fix cmake compile.
|
|
* Finished last Lattice properties, is done now.
* Some tweaks to Mesh structs naming.
|
|
* Added skeleton code for particle/object_force/userdef.
* More Object properties wrapped.
* Added User Preferences display in outliner.
|
|
|
|
* was missing a MEM_freeN in previous commit
|
|
to pointer types in other places.
|
|
Had a couple problems with this one; the uv layer and the projectors. The projectors in particular is confusing; I figured this would be one of the cases handled by RNA automagically, but maybe I need to define custom functions for it? Anyway, marked the code with XXX.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Note: I didn't set up the property for uvlayer_tmp (used when the wave is modulated using UV texture coordinates.) Wasn't sure how to do this properly.
|
|
|
|
|
|
|
|
|
|
|
|
* Object has some more properties wrapped, mostly game related.
* Scene frame changes now send a notifier.
* Added functions to create/free operator properties for calling
operators. This also simplifies some duplicated code that did
this. Ideally though this kind of thing should use the properties
pointer provided by buttons and keymap items. Example code:
PointerRNA ptr;
WM_operator_properties_create(&ptr, "SOME_OT_name");
RNA_int_set(&ptr, "value", 42);
WM_operator_name_call(C, "SOME_OT_name", WM_OP_EXEC_DEFAULT, &ptr);
WM_operator_properties_free(&ptr);
|
|
|
|
|
|
* Added support for sending notifiers and updates when setting
RNA properties. Per property, there is a notifier NC_/ND_ flag,
and a function that is called. Currently only used for
Object.loc/rot/size.
* RNA_property_update that does this is not automatically called
in every _set function, it has do be done separate, and is being
done by buttons with RNA data.
* Perhaps for python there could be a trick to accumulate these
flags rather than update each time, though for now the python
RNA code could just do them everytime. Did not add these calls
in the python code yet because it needs context, not sure where
to get that from?
|
|
|
|
|
|
* DNA_text_types.h done, patch by Roelf de Kock.
* Minor naming fixes in RNA-RNA.
|
|
* Store RNA collections different in ID properties, using a generic
ID property array, using the patch provided by Joe.
* Fix bug accessing registered operator properties in the wm from the
outliner.
* In the outliner, only use the RNA icon for RNA data, and use dot
again for unknown icon.
* Also, show pointer properties data in the second column, and auto
expand two levels when opening them.
* Added small RNA_struct_defined_properties function to get only the
defined properties without builtin and undefined id properties
(for py operators).
|
|
Made sdna and srna work more like how the scons build system is doing it, with separate bf_rna and bf_dna libs being built.
|
|
resolve.
|
|
|
|
Ongoing work in rna_ipo.c: wrapping BPoint and BezTriple, since they are used in IpoCurve.
These are declared in DNA_curve_types.h, so rna_curve.c is a better place for them. I prefer to test things better and have someone who knows well this data check the wrapping first, though.
|
|
* DNA_object_fluidsim.h: done, patch by Nathaniel Garbutt, thanks!
Some changes to make it more complete and adding inheritance to
better hide irrelevant and reused properties.
* Also added all derived types for modifiers, but only fluid is
filled in currently.
* Some files converted from DOS to UNIX line endings.
|
|
* PyOperators were always calling the python functions with default args.
* Made operator prints only happen when G.f & G_DEBUG is enabled.
|
|
This means you can define an operator in python that is called from C or Python - like any other operator.
Python functions for invoke and exec can be registered with an operator name.
keywords are read from the python exec() function, then used to create operator properties. The default python values are used to set the property type and defaults.
def exec(size=2.0, text="blah"): ...
is equivalent to...
prop = RNA_def_property(ot->srna, "size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_default(prop, 2.0f);
prop = RNA_def_property(ot->srna, "size", PROP_STRING, PROP_NONE);
RNA_def_property_string_default(prop, "blah");
TODO -
* make use of events
* return OPERATOR_CANCELLED/OPERATOR_FINISHED.. etc
* add support for array args
* more testing
|
|
* Added support for using pointers + collections as operator properties,
but with the restriction that they must point to other type derived from
ID property groups. The "add" function for these properties will allocate
a new ID property group and point to that.
* Added support for arrays with type IDP_GROUP in ID properties.
* Fix bug getting/setting float array values.
Example code for collections, note the "OperatorMousePath" type is defined
in rna_wm.c and has a float[2] property named "loc".
Defining the operator property:
prop= RNA_def_property(ot->srna, "path", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_runtime(prop, &RNA_OperatorMousePath);
Adding values:
PointerRNA itemptr;
float loc[2] = {1, 1},
RNA_collection_add(op->ptr, "path", &itemptr);
RNA_float_set_array(&itemptr, "loc", loc);
Iterating:
RNA_BEGIN(op->ptr, itemptr, "path") {
float loc[2];
RNA_float_get_array(&itemptr, "loc", loc);
printf("Location: %f %f\n", loc[0], loc[1]);
}
RNA_END;
|
|
* rna epy doc-gen was failing when trying to sort None
|
|
for pointers and collections.
* WM_operator_pystring to print the python func+args for an operator
* call WM_operator_print(op) in wm_operator_invoke(), simple echo mode should be moved later.
|
|
* two more small warning fixes.
|
|
* assorted fixes for resolving compile warnings
* in rna_armature setting for envelope weight was bug, since it was setting dist instead.
|
|
* some work on node types.
|
|
* Flare settings
* some code reorganisation for readability.
|
|
* Ray Transparency settings
|
|
PyOperators that need to run in the user interface context atm)
* added ED_SCRIPT_OT_run_pyfile that takes a filename argument.
* RNA_property_string_set didn't add a value to ID props if the prop wasnt there (like ints, floats and bools do)
* bpy_operator.c - raise an error when unknown keyword args are passed to any operator .
Examples of bpy operator api...
bpyoperator.ED_VIEW3D_OT_viewhome(center=1)
bpyoperator.ED_SCR_OT_frame_offset(delta=10)
bpyoperator.ED_VIEW3D_OT_make_parent(type='OBJECT')
At the moment there is no way to stop the operators .invoke() function from running so ED_VIEW3D_OT_make_parent still opens the menu even though it doesn't need to.
|
|
Further simplifying making operators with menus;
now you can add an 'invoke' callback:
WM_menu_invoke
which will automatically generate a menu with choices and assign
it to the property 'type'.
What also helps typing is the new RNA_enum_is_equal() function.
Here's a paste of the now committed 'clear parent'. Note the
undo push will become a flag too.
http://pasteall.org/3660
(Brecht; fixed small bug in RNA_enum_is_equal!)
To evaluate: solving dependencies for multipe scenes... probably
will make a more generic flush call.
|
|
* RNA_enum_is_equal function to quickly compare with enum identifier name.
|
|
New priorities for most libs, at least core. This is still for Blender proper, BGE and such still to come.
|
|
Object: converted the old horrible editobject.c, now as file:
editors/object/object_edit.c
Still lots of WIP, I've operatorified "Make Parent". Check here
the new API at work: http://pasteall.org/3650/c
IMPORTANT NOTE FOR BRECHT:
game property defines were clashing with RNA, i've renamed game
defines for now.
|
|
I did a very drastic cleanup for the different libgroups, there's now only a few left. It compiled with scons/msvc, will be testing in a bit on linux, too.
If you get any problems, please reply to this commit message on the taskforce ML.
|
|
|
|
|