Well the thing is that I'd like to specify the max integer value when
I use the AddParameter3 method. I don't see any way of doing this
other than hard-coding it in the script.
# Define siInt2 & siInt4 constants
iMININT2 = -32767
iMAXINT2 = 32767
iMININT4 = -2147483647
iMAXINT4 = 2147483647
# Property plugin
iPROPERTYMINVERSION = 1
iPROPERTYMAXVERSION = iMAXINT2
iPROPERTYDEFAULTVERSION = 1
iPROPERTYCURRENTVERSION = 1
# MySQL
iIDDEFAULT = 1
iIDMIN = 1
iIDMAX = iMAXINT4
# Models
iMODELMINVERSION = 1
iMODELMAXVERSION = iMAXINT2
iMINLABEL = 100
(...)
# Property-specific parameters, for developers only
oProp.addparameter3( 'ID', c.siInt4, iIDDEFAULT, iIDDEFAULT, iIDMAX,
False, True ) # MySQL unique ID in TB_GRANULES_MODELS table
oProp.addparameter3( 'PropertyVersion', c.siInt2, iPROPERTYMINVERSION,
iPROPERTYMINVERSION, iPROPERTYMAXVERSION, False, True )
oProp.addparameter3( 'PropertyType', c.siString, sPropertyType )
(...)
Suggestion to SDK team: unless I have missed it, why not having
constants for min anx max integers as well as floats (like siInt2Min,
siInt2Max, siInt4Min and so on, or siVariantMax( siInt2 ),
siVariantMax( siFloat ) and so on)?
Thanks
Bernard
On 6/30/06, Matt Lind <speye_21(at)hotmail.com> wrote:
Don't have XSI in front of me, but if memory serves the
SIAddCustomParameter() command has a table (or link to it) somewhere with
min/max values of variables. Would also look at the Parameter Object.
Matt
----------------------------
Matt Lind
Animator / Technical Director
Softimage certified instructor:
Softimage|3D
Softimage|XSI
Matt(at)Mantom.net
[script] Max integer constants?
Date : Fri, 30 Jun 2006 16:03:21 -0400
To : XSI(at)Softimage.COM
From : "Bernard Lebel" <3dbernard(at)gmail.com>
Subject : [script] Max integer constants?
Hello,
Does anyone know if the XSI SDK defines constants for maximum integer
values (siInt2 and siInt4)?
Something like Python's sys.maxint? I could not find anything in the docs.
Thanks
Bernard
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi