[Bf-taskforce25] RNA and 'Linked Values'

Joshua Leung aligorith at gmail.com
Wed Nov 26 12:43:18 CET 2008


Ahh, thanks. That clarifies things.

On Thu, Nov 27, 2008 at 12:41 AM, Brecht Van Lommel <brecht at blender.org>wrote:

>
> Hi Joshua,
>
> On Thu, 2008-11-27 at 00:27 +1300, Joshua Leung wrote:
> > While going through the RNA stuff tonight, I noticed that there's
> > something which doesn't seem to be accounted for (or perhaps I
> > overlooked it). I was trying to add start/end frame entries for Scene
> > struct, but noticed that there wasn't any way to specify that the
> > ranges of each should depend on the other. Perhaps this is more of
> > UI-level stuff, but it seems that being able to specify this for some
> > things (like in this scenario) is quite important, as it would mean
> > less need for clamping of values on the part of data-users (i.e.
> > operators). Or have I misunderstood some things about overall design
> > of RNA?
>
> If the property needs to do extra validation like this, you should write
> your own rna_Scene_start/end_set functions. You can do that without too
> much effort in this way:
>
> * Let RNA autogenerate the functions without validation.
> * Copy the functions from the autogenerated rna.c (for scons somewhere
> in ../build, make in obj/..) into rna_scene.c in the #ifdef RNA_RUNTIME
> section.
> * Call RNA_def_property_int_funcs() with the function right names.
>
> Brecht.
>
> _______________________________________________
> Bf-taskforce25 mailing list
> Bf-taskforce25 at blender.org
> http://lists.blender.org/mailman/listinfo/bf-taskforce25
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-taskforce25/attachments/20081127/88b5d249/attachment.htm 


More information about the Bf-taskforce25 mailing list