Home Technical Talk

[Maya 2009] To hide Light's icon in the Viewport?

polycounter lvl 14
Offline / Send Message
sama.van polycounter lvl 14
I am creating some custom lights for lightmap process in Maya.

Some of my template are using multiple lights but I would light to hide the lights's icon in my viewport replacing by a custom of mine.

Problem is if I switch the Visibility attribute value to "0", light will stop any activity in my scene...

Then is there a way to hide one light icon in the viewport keeping the light active in my scene?...

Replies

  • shogunato
    Options
    Offline / Send Message
    shogunato polycounter lvl 12
    Hi
    you should try to put the scale of the light to 0.001 or something very small
  • rooster
    Options
    Offline / Send Message
    rooster mod
    hi sama, here's what I would do:

    1. create a dummy object you want to use as your light icon
    2. create your light, and assign a point constraint to it from the object (select object, then light)- you might also want an orient constraint for rotation
    3. go to the viewport menu 'show' and uncheck lights

    now you should be able to turn the visibility of that dummy object off, but the light will still take effect and be invisible. Is that the sort of thing you meant?
  • sama.van
    Options
    Offline / Send Message
    sama.van polycounter lvl 14
    shogunato wrote:
    Hi you should try to put the scale of the light to 0.001 or something very small

    Bad choice, this affect Volume Light area =_=.....
    rooster wrote:
    1. create a dummy object you want to use as your light icon
    2. create your light, and assign a point constraint to it from the object (select object, then light)- you might also want an orient constraint for rotation

    Everything is already mel scripted and more complex :D
    rooster wrote:
    3. go to the viewport menu 'show' and uncheck lights
    no I want to see other lights I didn't create with my tool.
    rooster wrote:
    now you should be able to turn the visibility of that dummy object off, but the light will still take effect and be invisible. Is that the sort of thing you meant?

    Not really...

    I already tried to parent lights to a group or Locator and then turn visibility to 0 but it affects the lights.
    Same with a layer and hiding the layer will affect lights too...

    About the Dummy in Maya :
    locator


    A particular position in world space, marked by a small gnomon whose lines extend in each direction along the X, Y and Z axes.

    In other software packages, known as dummy object.




    More tips? :D:D
  • Lamont
    Options
    Offline / Send Message
    Lamont polycounter lvl 15
    So you have lights you want to toggle on and off that affect the baking? You can do light groups. Assign an attribute to toggle if they are in that light group or not.

    You can manually do it, or make a purdy mel that does it for you.
  • Lamont
    Options
    Offline / Send Message
    Lamont polycounter lvl 15
    Ok, I re-read what you asked for. Let me see if I can find it.
  • Lamont
    Options
    Offline / Send Message
    Lamont polycounter lvl 15
    I think this is what you are looking for:
    setAttr "areaLightShape1.locatorScale" 0;
    And after you do it, the light still functions.
  • sama.van
    Options
    Offline / Send Message
    sama.van polycounter lvl 14
    Oh yeah Lamont it seems to work.
    But the locatorScale attribute doesn't accept 0 value on Maya 2009 It will give the following error :
    // Error: line 1: Cannot set the attribute 'volumeLightLampGroupLight_AA_CShape.locatorScale' below its minimum value of 1e-010. // 
    

    But anyway, yeah, 0.00001 works perfectly.

    Really thank you Lamont I didn't know this attribut! :)

    locatorScale (lls) double 1.0 outputinputconnectablestorable
    Scale factor for the light locator.

    lol I'm very very happy, this is perfect!!mouahahahahh!!!
  • sama.van
    Options
    Offline / Send Message
    sama.van polycounter lvl 14
    Damn it will only hide the envelope :D
    The small icon will stay :(

    This is better than before but ... >_> ...
  • Lamont
    Options
    Offline / Send Message
    Lamont polycounter lvl 15
    I'm on 2008. That is strange. I can take a look when I get out of bed.
  • claydough
    Options
    Offline / Send Message
    claydough polycounter lvl 10
    I would Bite the Bullet and do the "extra work" u mentioned by doing it Roosters way.
  • Lamont
    Options
    Offline / Send Message
    Lamont polycounter lvl 15
    claydough wrote: »
    I would Bite the Bullet and do the "extra work" u mentioned by doing it Roosters way.
    Roosters method is all lights, the method Sama.Van is looking for is more selective and would only apply to lights using his script.

    Oh and I still can't find out why it doesn't accept 0 Sama.Van. I can use 0 in 2008, and seaching online, didn't see anything mentioning it.
  • sama.van
  • claydough
    Options
    Offline / Send Message
    claydough polycounter lvl 10
    Lamont wrote: »
    Roosters method is all lights, the method Sama.Van is looking for is more selective and would only apply to lights using his script.

    Oh and I still can't find out why it doesn't accept 0 Sama.Van. I can use 0 in 2008, and seaching online, didn't see anything mentioning it.

    Ahhh.. sorry.

    Then put the light in an LOD group. then add yer Object proxy to the LOD group.
    ( light on top as default depending on whatever distance strategy u have )

    tested 100% grade A "werking"
    ( unless it's not )

    Edit > Level Of Detail > group


    Re: locator attr:
    Lamont, it's probably a divide by zero failsafe fer 2009 and up?
  • claydough
    Options
    Offline / Send Message
    claydough polycounter lvl 10
    Errrr...
    Better yet,

    for areaLight1...
    setAttr "areaLight1.lodVisibility" 0;
    

    Don't use the shape lodVisibility. ( Transform will override )
    Parent the light into yer object.


    Grade A 101%
  • claydough
    Options
    Offline / Send Message
    claydough polycounter lvl 10
    drunk internet
  • Lamont
    Options
    Offline / Send Message
    Lamont polycounter lvl 15
    Looks good!! Thanks :D. Should have tried the LOD thing. Now I know another way to do it :D!!
Sign In or Register to comment.