Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: Current Layer  (Read 2279 times)

0 Members and 1 Guest are viewing this topic.

eborr

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 196
    • View Profile
Current Layer
« on: June 24, 2009, 02:43:59 PM »

another newbie type question, how  can I progammatically get the current  active layer name,

I have tried expressions like

var x = Layer.Name;

and this just causes a compiler error -any thoughts
Logged

Azrael

  • Regular poster
  • ***
  • Karma: 9
  • Offline Offline
  • Gender: Male
  • Posts: 155
    • View Profile
    • Mad Orange
Re: Current Layer
« Reply #1 on: June 24, 2009, 09:05:53 PM »

Probably because the var "Layer" of "Layer.Name" was no initialized.

Try:
Code: WME Script
  1. var Layer = Scene.GetLayer("LayerName");
  2.  
  3. var x = Layer.Name;
  4.  

I hope it's what you need :)
Logged
 

Page created in 0.031 seconds with 19 queries.