Sie sind nicht angemeldet.

Tuur

Erleuchteter

  • »Tuur« ist der Autor dieses Themas

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

1

Dienstag, 5. März 2013, 03:41

thumbs selection

Hi,

i have a lot of scenes but i like the addthumbs action only to build a selection of them.

I thought let's give those scenes an id="tuur"

no succes yet..
i tried some things but can't get it..

also i like the scroll layer only get the reach of the thumbs selection..

anybody?



*cry*

Tuur *thumbsup*

2

Dienstag, 5. März 2013, 09:15

Hi!
you need to add some custom attribute to scene tag (like your id=tuur)
and then add condition to addthumbs action
if(scene[get(i)].id == turr,
...
add thumb
);

Regards
Andrey
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

Tuur

Erleuchteter

  • »Tuur« ist der Autor dieses Themas

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

3

Dienstag, 5. März 2013, 10:24

Hi Andrey,

Yes i tried that , sort of..
Maybe in the wrong place..
I try some more..

..
ok..that works

but now

i want to use this in the default vtour output code...
what to do with the previous /next buttons and the scrollayer..
I want them just to work for the scene selection, so for the scene's with id="tuur"

*cry*
Tuur *thumbsup*

Dieser Beitrag wurde bereits 5 mal editiert, zuletzt von »Tuur« (5. März 2013, 12:18)


4

Dienstag, 5. März 2013, 12:43

check additional attribute in scene tag
in all actions
VRAP - desktop VR content player based on krpano.
Common tasks in one place in one click! Discussion thread
DOWNLOAD for MAC
DOWNLOAD for WIN

Tuur

Erleuchteter

  • »Tuur« ist der Autor dieses Themas

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

5

Dienstag, 5. März 2013, 13:48

i tried,

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<action name="skin_nextscene">

		add(newsceneindex, scene[get(xml.scene)].index, %1);
if(scene[get(i)].id == tuur,		
		if(newsceneindex GE 0,
			if(newsceneindex LT scene.count,
			
				txtadd(layer[skin_thumbborder].parent, 'skin_thumb_', get(scene[get(xml.scene)].index));
				layer[skin_thumbs].scrolltocenter(get(scene[get(newsceneindex)].thumbx), get(scene[get(newsceneindex)].thumby));
				loadscene(get(newsceneindex), null, MERGE, BLEND(0.5));

			  );
			  
		  );
);
	</action>


and some variations.
Also on the updates roll..

no succes yet..

*unsure*

Tuur *thumbsup*

6

Dienstag, 5. März 2013, 16:56

Hi,

making the nextscene action working only for specific/marked panos is more complicated - you would need to 'search' for the next available pano...

Here some quick written and untested code - it might work but don't necessarily need to...

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
	<action name="skin_nextscene">
		add(newsceneindex, scene[get(xml.scene)].index, %1);
		if(newsceneindex GE 0,
			if(newsceneindex LT scene.count,
				if(scene[get(newsceneindex)].id != 'turr', 
					set(trynextstep, %1);
					if(%1 LT 0, sub(trynextstep,1), add(trynextstep,1));
					skin_nextscene(get(trynextstep));
				  ,
					txtadd(layer[skin_thumbborder].parent, 'skin_thumb_', get(newsceneindex));
					layer[skin_thumbs].scrolltocenter(get(scene[get(newsceneindex)].thumbx), get(scene[get(newsceneindex)].thumby));
					loadscene(get(newsceneindex), null, MERGE, BLEND(0.5));
				  );
			  );
		  );
	</action>


But a remaining problem might be the not correctly updated next/previous button states...

Best regards,
Klaus

Tuur

Erleuchteter

  • »Tuur« ist der Autor dieses Themas

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

7

Dienstag, 5. März 2013, 16:59

Thanks Klaus,

i have that working..
but what to do with the scroll layer that still see's all scene's..

Tuur *thumbsup*

8

Dienstag, 5. März 2013, 17:06

Hi,

the code from Andrey is already right, but additionally you would also need an additional counter (j) for the thumbnail position...

e.g. here the (again untested) for loop from the skin_addthumbs action:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
		for(set(i,0);set(j,0); , i LT scene.count, inc(i),
			if(scene[get(i)].id == 'turr', 
				txtadd(thumbname,'skin_thumb_',get(j));
				addlayer(get(thumbname));
				copy(layer[get(thumbname)].url, scene[get(i)].thumburl);
				set(layer[get(thumbname)].keep, true);
				set(layer[get(thumbname)].parent, 'skin_thumbs');
				set(layer[get(thumbname)].align, lefttop);
				copy(layer[get(thumbname)].crop, thumbcrop);
				copy(layer[get(thumbname)].width, thumbwidth);
				copy(layer[get(thumbname)].height, thumbheight);
				mul(thumbx, j, thumbxoffset);
				add(thumbx, thumbpadding);
				copy(layer[get(thumbname)].x, thumbx);
				copy(layer[get(thumbname)].y, thumbpadding);
				add(scene[get(i)].thumbx, thumbx, thumbxcenter);
				copy(scene[get(i)].thumby, thumbpadding);
				set(layer[get(thumbname)].linkedscene, get(scene[get(i)].name) );
				set(layer[get(thumbname)].onclick, copy(layer[skin_thumbborder].parent, name); loadscene(get(linkedscene), null, MERGE, BLEND(0.5)); );
				if(skin_settings.tooltips_thumbs,
					set(layer[get(thumbname)].onhover, showtext(get(scene[get(linkedscene)].title),SKIN_TOOLTIPS); );
				  );
				inc(j);
			  );
		  );


Best regards,
Klaus

Tuur

Erleuchteter

  • »Tuur« ist der Autor dieses Themas

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

9

Dienstag, 5. März 2013, 17:12

mmm. no succes.

the problem is that teh scroll bar/layer still shows all 30 thumbs, 10 are visible..

so i want the scroll area just to be as large as the 10 thumbs need.. not as large as all thumbs need..

the code above with the extra 'j' counter make no difference in that.


Tuur *thumbsup*

Tuur

Erleuchteter

  • »Tuur« ist der Autor dieses Themas

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

10

Dienstag, 5. März 2013, 17:40

actualy this line does what i want


mul(thumbbarwidth, thumbxoffset, scene.count);

when i change to:

mul(thumbbarwidth, thumbxoffset, 10);

it is all right..

now to make it just get the id="tuur" number of scene's

Tuur *thumbsup*

Tuur

Erleuchteter

  • »Tuur« ist der Autor dieses Themas

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

11

Dienstag, 5. März 2013, 17:48

solved thumbs selection

yeahh.. got it!

i put


for(set(i,0);set(j,0); , i LT scene.count, inc(i),
if(scene[get(i)].id == 'tuur',
inc(j);
);
);

before the thumb xoffset stuff to count the j's
then i changed the line: mul(thumbbarwidth, thumbxoffset, get(j));

so full code of the skin_addthumbs action is:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
	<action name="skin_addthumbs">
		copy(thumbwidth, skin_settings.thumbswidth);
		copy(thumbheight, skin_settings.thumbsheight);
		copy(thumbpadding, skin_settings.thumbspadding);
		copy(thumbcrop, skin_settings.thumbscrop);

		if(ismobile,
			mul(thumbwidth,2);
			mul(thumbheight,2);
			mul(thumbpadding,2);
		  );
		  
for(set(i,0);set(j,0); , i LT scene.count, inc(i),	
if(scene[get(i)].id == 'tuur', 
inc(j);
			  );
		  );	 

		add(thumbxoffset, thumbwidth, thumbpadding);
		mul(thumbxcenter, thumbxoffset, 0.5);
		mul(thumbbarwidth, thumbxoffset, get(j));
		add(thumbbarwidth, thumbpadding);
		add(thumbbarheight, thumbpadding, thumbheight);
		add(thumbbarheight, thumbpadding);
		copy(layer[skin_thumbs].height, thumbbarheight);
		copy(layer[skin_thumbs].width, thumbbarwidth);

for(set(i,0);set(j,0); , i LT scene.count, inc(i),
			if(scene[get(i)].id == 'tuur', 
				txtadd(thumbname,'skin_thumb_',get(j));
				addlayer(get(thumbname));
				copy(layer[get(thumbname)].url, scene[get(i)].thumburl);
				set(layer[get(thumbname)].keep, true);
				set(layer[get(thumbname)].parent, 'skin_thumbs');
				set(layer[get(thumbname)].align, lefttop);
				copy(layer[get(thumbname)].crop, thumbcrop);
				copy(layer[get(thumbname)].width, thumbwidth);
				copy(layer[get(thumbname)].height, thumbheight);
				mul(thumbx, j, thumbxoffset);
				add(thumbx, thumbpadding);
				copy(layer[get(thumbname)].x, thumbx);
				copy(layer[get(thumbname)].y, thumbpadding);
				add(scene[get(i)].thumbx, thumbx, thumbxcenter);
				copy(scene[get(i)].thumby, thumbpadding);
				set(layer[get(thumbname)].linkedscene, get(scene[get(i)].name) );
				set(layer[get(thumbname)].onclick, copy(layer[skin_thumbborder].parent, name); loadscene(get(linkedscene), null, MERGE, BLEND(0.5)); );
				
				  
				inc(j);
			  );
		  );

</action>



in all scene's that i want in the bar i added id="tuur" and at the last one i also add tag="blah" and that makes it possible in the skin_update_scene_infos action to hide the next scene button..

Tuur *thumbsup*

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Tuur« (5. März 2013, 17:58)


12

Samstag, 21. Dezember 2013, 20:20

Hello Tuur,

I tried to implement your code but only one small step left.

If I am on the last thumb and click to "next scene button", i get this message - try out my link :http://www.virtualczech.cz/limitscenes/tour.html

I editet only action name="skin_addthumbs . Do I need edit also another scene, f.e.action name="skin_updatescroll or action name="skin_updatethumbscroll?

Thanks in advance