diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-11-24 18:51:55 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-11-24 18:51:55 +0300 |
commit | 2a8484bc24f0ac31bcc48c96d2ea12c03c257dab (patch) | |
tree | d4f39e9f940cb9f9ef49191794998463a1185a53 /source/blender/editors/space_time/time_ops.c | |
parent | 0c625e20ad070560ce4ea8fb78096a3119a8357e (diff) |
RNA
* Disable editable pointers for now, difficult to support well.
* Swap parameters in RNA_access.h functions to make it more
consistent.
* Rename rna members for operators to wmOperatorType.srna, and
wmOperator.ptr, to make the distincton a bit clearer.
• Removed the RNA_int_default and similar functions, they're too
confusing. RNA_property_is_set can still be used to achieve
the same goal.
* Add functions to create RNA pointers.
Some example code for RNA data access and operator properties:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/RNAExampleCode
Diffstat (limited to 'source/blender/editors/space_time/time_ops.c')
-rw-r--r-- | source/blender/editors/space_time/time_ops.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/space_time/time_ops.c b/source/blender/editors/space_time/time_ops.c index e95f0238ab5..41a65fc20ee 100644 --- a/source/blender/editors/space_time/time_ops.c +++ b/source/blender/editors/space_time/time_ops.c @@ -63,7 +63,7 @@ static void change_frame_apply(bContext *C, wmOperator *op) { int cfra; - cfra= RNA_int_get(op->rna, "frame"); + cfra= RNA_int_get(op->ptr, "frame"); if(cfra < MINFRAME) cfra= MINFRAME; @@ -119,7 +119,7 @@ static int frame_from_event(bContext *C, wmEvent *event) static int change_frame_invoke(bContext *C, wmOperator *op, wmEvent *event) { - RNA_int_default(op->rna, "frame", frame_from_event(C, event)); + RNA_int_set(op->ptr, "frame", frame_from_event(C, event)); change_frame_init(C, op); change_frame_apply(C, op); @@ -140,7 +140,7 @@ static int change_frame_modal(bContext *C, wmOperator *op, wmEvent *event) /* execute the events */ switch(event->type) { case MOUSEMOVE: - RNA_int_set(op->rna, "frame", frame_from_event(C, event)); + RNA_int_set(op->ptr, "frame", frame_from_event(C, event)); change_frame_apply(C, op); break; @@ -171,7 +171,7 @@ void ED_TIME_OT_change_frame(wmOperatorType *ot) ot->modal= change_frame_modal; /* rna */ - prop= RNA_def_property(ot->rna, "frame", PROP_INT, PROP_NONE); + prop= RNA_def_property(ot->srna, "frame", PROP_INT, PROP_NONE); } /* ************************** registration **********************************/ |