Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.
|
|
Quellcode |
1 2 3 4 5 |
<action name="my_test" scope="local">
for(set(i,0), i LT args.length, inc(i),
trace(' arg[', i, ']=', args[get(i)] );
);
</action>
|
|
|
Quellcode |
1 2 3 4 5 6 |
my_test( first, second, third, fourth); INFO: arg[0]=first INFO: arg[1]=second INFO: arg[2]=third INFO: arg[3]=fourth |
|
|
Quellcode |
1 |
if( debugmode, trace(calc('%0' + '(' + '%1, %2, %3, %4' + ')')););
|
|
|
Quellcode |
1 2 3 4 5 6 7 8 9 10 11 12 |
<!-- debugaction(); debug logs the callers call - like action(arg1, arg2, ... ) -->
<action name="debugaction" scope="local">
txtadd(local.out, get(parentscope.actionname), '(');
if(parentscope.args.length GT 0,
for(set(local.i,0), i LT parentscope.args.length, inc(i),
txtadd(out, get(out), get(parentscope.args[get(i)]), ', ');
);
subtxt(out, get(out), 0, calc(out.length - 2));
);
txtadd(out, get(out), ')');
debug(out);
</action>
|
|
|
Quellcode |
1 2 3 |
<action name="test" scope="local"> debugaction(); </action> |
No, existing features will be normally not removed.I hope, that Klaus in the next releases will not remove the %0, %1, %2, ... option in the localscope.
Right, as soon an action code contains %NN placefolders, it's parsing-step will be not cached.Apparently the %N substitution and non-caching in the action is done independently from the debugmode=false just because appearance of the %N signs.
Klaus, am I right?
Well done!here's a small snippet for local scope actions :)

Hi,
For example if <image prealign="0|90|0"> and I wish "go forward" then the view transformed to the left as I "go right"
That's fixed of course, the prealign setting will only rotate the pano image itself and don't have an affect to the view position.
|
|
Quellcode |
1 2 3 |
<image stereo="true" stereolabels="l|r" prealign="0|0|0"> <sphere url="panos/pano_%t.jpg" /> </image> |
|
|
Quellcode |
1 |
ERROR: loading of 'panos/pano_%t.jpg |
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Scott Witte« (25. März 2019, 19:10)