any way to know displaybrushes layer id?

Discuss any general programming issues here
Post Reply
Bugala
Posts: 1179
Joined: Sun Feb 14, 2010 7:11 pm

any way to know displaybrushes layer id?

Post by Bugala »

When i use "DisplayBrush" command with layers on, that brush will occupy the (i suppose) last layer spot, but is there any way for me to know the layerposition, except by following it myself so said, manually (ie. i keep using nextfreelayer variable to keep track of my layers)?
User avatar
airsoftsoftwair
Posts: 5446
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: any way to know displaybrushes layer id?

Post by airsoftsoftwair »

You can just query #ATTRLAYERS after the call to DisplayBrush() to get layer position of the newly inserted brush layer. However, keep in mind that you can also use the "InsertPos" tag to make DisplayBrush() insert the layer into a different slot. See here:
http://www.hollywood-mal.com/docs/html/ ... Tags_.html
Bugala
Posts: 1179
Joined: Sun Feb 14, 2010 7:11 pm

Re: any way to know displaybrushes layer id?

Post by Bugala »

Ah, this will do very nicely to fix my age old problem of keeping tracfk of layers. I can finally forget keeping track of them and avoid all the bugs caused by that.
Post Reply