Next Layer & Previous Layer?


#1

Anyone know if there is a way to create a keyboard command to go to the next or previous mesh list layer?

Thanks,
Jamie


#2

select.layer [1] “set” [0] [0] [-1]

Thats the command to change layers back to 1…I guess + and - options can work as well. :slight_smile:

Cheers.


#3

Hi Phil, the script would need to query the current layer before incrementing, wouldn’t it? That goes beyond my knowledge of modo.


#4
 
#perl
my @Layers = lxq("query layerservice layer.index ? selected"); #Ask modo about all of the layers that are currently selected
 
my $NextLayer = $Layers[$#Layers]+1; #Find out the last selected layer and add 1 to it
 
lx("select.layer $NextLayer"); #Tell modo to select the layer
 

You can use the same script by changing the +1 to a -1 to select the previous layer

But make sure that you put in a check line to make sure that the layer to be selected isn’t less than 1 otherwise it will give you errors when you select the previous layer to 1

if ($NextLayer < 1){$NextLayer = 1;} #after the “my $NextLayer” line


#5

Incredible, works like a charm! Thank you so much, Dion, I really appreciate it. :slight_smile:
This really is customer service on a whole different level!

cheers,
Jamie Creskey


#6

:slight_smile: I just wanna say that it’s frickin’ awesome that people from luxology are giving out scripts etc. In a forum, that’s just simply awesome :-).

Where’s the 1 click head model script dion? :stuck_out_tongue:


#7

No problem actually:). But this require you have your premade model. I came out this when I did a search previously for the ‘SKULL primitive’. Say I have a premade model save in the Object_Preset folder, I then edit a macro

#LXMacro#
scene.open “C:\Program Files\Luxology\modo\Object_Preset\SKULL.lwo”
viewport.fit

this is useful for your daily use objects, safe few step to browse the folder.:slight_smile:

Cheers,

Tan


#8

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.