<br><br><div class="gmail_quote">On Fri, Nov 25, 2011 at 3:12 PM, Campbell Barton <span dir="ltr"><<a href="mailto:ideasman42@gmail.com">ideasman42@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Fri, Nov 25, 2011 at 2:56 PM, Campbell Barton <<a href="mailto:ideasman42@gmail.com">ideasman42@gmail.com</a>> wrote:<br>
> On Fri, Nov 25, 2011 at 2:42 PM, Andrew Hale <<a href="mailto:trumanblending@gmail.com">trumanblending@gmail.com</a>> wrote:<br>
>> Hello,<br>
>><br>
>> It seems that the current noise module has become rather outdated with<br>
>> respect to the current API. As such I propose to update it to bring it into<br>
>> line with rest of the API. The changes I propose are listed below;<br>
>><br>
>> Move the module so it becomes a submodule of mathutils, i.e.<br>
>> mathutils.noise. This will make the module more visible and more useful as<br>
>> we can return mathutils types like Vectors.<br>
>> Change input arguments from (x, y, z) tuples to Vector objects.<br>
>> Change function outputs from (x, y, z) tuples to Vector objects.<br>
>> Fix noise.random_unit_vector(), current the y and z components are<br>
>> correlated (bad).<br>
>> Add noise.random_vector() to produce a random vector (non-unit length)<br>
>> Add other functions (Feel free to reply with ideas)<br>
>><br>
>> I have discussed this with ideasman_42 on IRC and he seemed in agreement. If<br>
>> you have any thoughts please reply.<br>
>><br>
>> Thanks,<br>
>><br>
>> Andrew<br>
><br>
> +1,<br>
><br>
> - we could keep the 'noise' module available to be imported directly<br>
> for a release but deprecate it (even print some warning on importing).<br>
><br>
> - probably nice to keep 'noise' being available from the driver<br>
> namespace even when its moved to mathutils.noise<br>
><br>
<br>
</div>Thinking about this further, noise is available from driver namespace,<br>
which makes doing things like...<br>
<br>
noise.somefunc(Vector((a,b,c)))<br>
... cumbersome.<br>
<br>
So noise funcs could use the C utility function mathutils_array_parse(...)<br>
<br>
This way noise.somefunc(a, b, c) can be supported too.<br>
<font color="#888888"><br>
--<br>
- Campbell<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Bf-python mailing list<br>
<a href="mailto:Bf-python@blender.org">Bf-python@blender.org</a><br>
<a href="http://lists.blender.org/mailman/listinfo/bf-python" target="_blank">http://lists.blender.org/mailman/listinfo/bf-python</a><br>
</div></div></blockquote></div><br>Ok, will now use mathutils_array_parse(...) so that tuples can be parsed (as is currently the case), however, Vector objects will always be returned from functions that produce vectors.<br>
<br>Andrew<br>