[Bf-python] MarbleSharp, ValueError: invalid texture stype
alex mole
nal at blueyonder.co.uk
Sun Mar 21 16:30:37 CET 2004
Hello
This is indeed a bug, and I've attached a fix for it.
In the mean-time, I've come up with an ugly workaround:
----------------------------------------------
t2 = Texture.New('T2')
t2.setType('Wood')
t2.stype = Texture.STypes.MBL_SHARP
t2.setType('Marble')
print t2
----------------------------------------------
This circumvents the sanity checking for MarbleSharp and should allow
you to carry on with your script :)
Alex
nicolas bonnand wrote:
> Hi,
>
> I can't get setSType working with Marble type.
>
> Although they are listed in 2.32 API
> (
> http://www.blender.org/modules/documentation/232PythonDoc/Texture.Texture-class.html#setSType
> )
> MarbleSoft , MarbleSharp and MarbleSharper don't
> seem to be valid stypes for Marble type.
>
> The following simple script works well with Cloud,
> but it doesn't work with Marble
>
> #--------- beginning ----------
>
> import Blender
> from Blender import Draw, BGL, Texture
>
>
> t1=Texture.New('T1')
> t1.setType('Clouds')
> t1.setSType('CloudColor') # OK
>
> t2=Texture.New('T2')
> t2.setType('Marble')
> t2.setSType('MarbleSharp') # ValueError
>
> #--------- end ----------
>
>
> Traceback (most recent call last):
> File "test.py", line 11, in ?
> t1.setSType('MarbleSharp')
> ValueError: invalid texture stype
>
>
>
>
> I'm using:
>
> blender-2.32.tar.bz2
>
> linux mandrake 9.2 kernel 2.4.22-21mdk
>
> Python 2.3 (#2, Aug 31 2003, 17:27:29)
> [GCC 3.3.1 (Mandrake Linux 9.2 3.3.1-1mdk)] on linux2
>
>
> Any help appreciated.
>
> Nicolas
>
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> http://www.blender.org/mailman/listinfo/bf-python
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: marble-fix.diff
Type: text/x-patch
Size: 623 bytes
Desc: not available
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20040321/bcbe722d/attachment.bin>
More information about the Bf-python
mailing list