Ahh, thanks. That clarifies things.<br><br><div class="gmail_quote">On Thu, Nov 27, 2008 at 12:41 AM, Brecht Van Lommel <span dir="ltr">&lt;<a href="mailto:brecht@blender.org">brecht@blender.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hi Joshua,<br>
<div><div></div><div class="Wj3C7c"><br>
On Thu, 2008-11-27 at 00:27 +1300, Joshua Leung wrote:<br>
&gt; While going through the RNA stuff tonight, I noticed that there&#39;s<br>
&gt; something which doesn&#39;t seem to be accounted for (or perhaps I<br>
&gt; overlooked it). I was trying to add start/end frame entries for Scene<br>
&gt; struct, but noticed that there wasn&#39;t any way to specify that the<br>
&gt; ranges of each should depend on the other. Perhaps this is more of<br>
&gt; UI-level stuff, but it seems that being able to specify this for some<br>
&gt; things (like in this scenario) is quite important, as it would mean<br>
&gt; less need for clamping of values on the part of data-users (i.e.<br>
&gt; operators). Or have I misunderstood some things about overall design<br>
&gt; of RNA?<br>
<br>
</div></div>If the property needs to do extra validation like this, you should write<br>
your own rna_Scene_start/end_set functions. You can do that without too<br>
much effort in this way:<br>
<br>
* Let RNA autogenerate the functions without validation.<br>
* Copy the functions from the autogenerated rna.c (for scons somewhere<br>
in ../build, make in obj/..) into rna_scene.c in the #ifdef RNA_RUNTIME<br>
section.<br>
* Call RNA_def_property_int_funcs() with the function right names.<br>
<br>
Brecht.<br>
<br>
_______________________________________________<br>
Bf-taskforce25 mailing list<br>
<a href="mailto:Bf-taskforce25@blender.org">Bf-taskforce25@blender.org</a><br>
<a href="http://lists.blender.org/mailman/listinfo/bf-taskforce25" target="_blank">http://lists.blender.org/mailman/listinfo/bf-taskforce25</a><br>
</blockquote></div><br>