MantisBT - opensim
View Issue Details
0007356opensim[REGION] Script Functionspublic2014-10-21 16:102015-04-13 11:06
Magnuz 
justincc 
normalminoralways
closedfixed 
Intel Core i7Ubuntu12.04
master (dev code) 
master (dev code) 
0.8.0.1
Grid (1 Region per Sim)
BulletSim
Mono / Linux32
2.10
0007356: llGetPrimitiveParams returns transparency instead of alpha for PRIM_TEXT
llGetPrimitiveParams([PRIM_TEXT]) returns ["text", <r,g,b>, 1-alpha] instead of the expected ["text", <r,g,b>, alpha]. The same goes for llGetLinkPrimitiveParams(LINK_THIS, [PRIM_TEXT]). The result is the same whether the text has been set with llSetText, llSetPrimitiveParms, llSetLinkPrimitiveParms or llSetLinkPrimitiveParmsFast.
The script

default
{
    state_entry()
    {
        llSetText("ABC", <0.8,0.6,0.4>, 0.8);
        llOwnerSay(llList2CSV(["ST+GPP"]+llGetPrimitiveParams([PRIM_TEXT])));
        llOwnerSay(llList2CSV(["ST+GLPP"]+llGetLinkPrimitiveParams(LINK_THIS, [PRIM_TEXT])));
        llSetPrimitiveParams([PRIM_TEXT, "ABC", <0.8,0.6,0.4>, 0.8]);
        llOwnerSay(llList2CSV(["SPP+GPP"]+llGetPrimitiveParams([PRIM_TEXT])));
        llOwnerSay(llList2CSV(["SPP+GLPP"]+llGetLinkPrimitiveParams(LINK_THIS, [PRIM_TEXT])));
        llSetLinkPrimitiveParams(LINK_THIS, [PRIM_TEXT, "ABC", <0.8,0.6,0.4>, 0.8]);
        llOwnerSay(llList2CSV(["SLPP+GPP"]+llGetPrimitiveParams([PRIM_TEXT])));
        llOwnerSay(llList2CSV(["SLPP+GLPP"]+llGetLinkPrimitiveParams(LINK_THIS, [PRIM_TEXT])));
        llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_TEXT, "ABC", <0.8,0.6,0.4>, 0.8]);
        llOwnerSay(llList2CSV(["SLPPF+GPP"]+llGetPrimitiveParams([PRIM_TEXT])));
        llOwnerSay(llList2CSV(["SLPPF+GLPP"]+llGetLinkPrimitiveParams(LINK_THIS, [PRIM_TEXT])));
        //llSetTimerEvent(1.0);
    }
}

returns

[15:44] Text Test: ST+GPP, ABC, <0.800000,0.600000,0.400000>, 0.200000
[15:44] Text Test: ST+GLPP, ABC, <0.800000,0.600000,0.400000>, 0.200000
[15:44] Text Test: SPP+GPP, ABC, <0.800000,0.600000,0.400000>, 0.200000
[15:44] Text Test: SPP+GLPP, ABC, <0.800000,0.600000,0.400000>, 0.200000
[15:44] Text Test: SLPP+GPP, ABC, <0.800000,0.600000,0.400000>, 0.200000
[15:44] Text Test: SLPP+GLPP, ABC, <0.800000,0.600000,0.400000>, 0.200000
[15:44] Text Test: SLPPF+GPP, ABC, <0.800000,0.600000,0.400000>, 0.200000
[15:44] Text Test: SLPPF+GLPP, ABC, <0.800000,0.600000,0.400000>, 0.200000
No tags attached.
patch 0001-Correct-PRIM_TEXT-return-value-from-trans-to-alpha.patch (1,203) 2015-02-10 14:07
http://opensimulator.org/mantis/file_download.php?file_id=4063&type=bug
Issue History
2014-10-21 16:10MagnuzNew Issue
2015-02-10 14:07MagnuzFile Added: 0001-Correct-PRIM_TEXT-return-value-from-trans-to-alpha.patch
2015-02-10 14:10MagnuzNote Added: 0027477
2015-02-10 14:11MagnuzNote Added: 0027478
2015-02-10 14:11MagnuzStatusnew => patch included
2015-02-10 14:11MagnuzNote Deleted: 0027477
2015-02-27 16:53justinccNote Added: 0027637
2015-02-27 16:53justinccStatuspatch included => resolved
2015-02-27 16:53justinccResolutionopen => fixed
2015-02-27 16:53justinccAssigned To => justincc
2015-04-13 11:06MagnuzNote Added: 0028000
2015-04-13 11:06MagnuzStatusresolved => closed
2015-04-13 11:06MagnuzFixed in Version => master (dev code)

Notes
(0027478)
Magnuz   
2015-02-10 14:11   
Added patch to correct alpha return value for PRIM_TEXT in llGetPrimitiveParams and llGetLinkPrimitiveParams to alpha instead of 1-alpha.
(0027637)
justincc   
2015-02-27 16:53   
Committed as git master 158c3f8. Thanks Magnuz!
(0028000)
Magnuz   
2015-04-13 11:06   
Verified and closing.