Author Topic: Maxscript - LightSelect options  (Read 1460 times)

2023-03-02, 21:30:30

LionelC

  • Users
  • *
  • Posts: 4
    • View Profile
Hi,

How can the option "Include lights not assigned to other LightSelect elements" be ticked using maxscript?

2023-03-03, 11:20:07
Reply #1

clemens_at

  • Active Users
  • **
  • Posts: 146
    • View Profile
the property is called ".nodeSource"

example:
Code: [Select]
LightSelectRE = getclassinstances CShading_LightSelect
LightSelectRE.nodeSource = 1

2023-03-03, 16:34:38
Reply #2

LionelC

  • Users
  • *
  • Posts: 4
    • View Profile
Thank you Clemens.
Appreciate it.

How do you find that kind of information?
I wasn't able to find that information on the doc or using 3ds max script listener.

2023-03-04, 18:49:19
Reply #3

clemens_at

  • Active Users
  • **
  • Posts: 146
    • View Profile
I usually run the "showClass" command with an additional "*.*" to get all the properties of that class.

for example:
Code: [Select]
showClass "CShading_LightSelect*.*"


2023-03-06, 04:22:10
Reply #4

LionelC

  • Users
  • *
  • Posts: 4
    • View Profile
Thank you, that's very helpful.

2023-03-28, 07:30:21
Reply #5

Evgeny1982

  • Users
  • *
  • Posts: 4
    • View Profile
How can I change these settings?
« Last Edit: 2023-03-28, 09:25:12 by Evgeny1982 »

2023-03-28, 10:13:11
Reply #6

clemens_at

  • Active Users
  • **
  • Posts: 146
    • View Profile
did you try the "showClass" command like I wrote in my previous post?


2023-03-28, 19:31:40
Reply #7

Evgeny1982

  • Users
  • *
  • Posts: 4
    • View Profile
Yes, I tried and found these parameters with code: showclass "Cmasking_mask*.*". Thanks for your previous reply.
In any way at what object they should be changed. Is this the Camera? Renderer?, .. Please help, I can't find what I'm looking for.
<????>.mode = 2 ?
Can you get example.

2023-03-28, 22:35:06
Reply #8

clemens_at

  • Active Users
  • **
  • Posts: 146
    • View Profile
well, you have to get the specific render element you want to change.
there are different ways to do that but for example:
Code: [Select]
rem = maxOps.GetCurRenderElementMgr()

myRe = rem.GetRenderElement 0 -- get your renderelement here. The 0 represents the position of the renderelement in the list and starts with 0 for the first one.

myRe.mode = 0
myRe.nodesMonoOn = true
myRe.nodesMono = #($Box001,$Box002) -- inside the array are the objects you want add to the included list.

hope that helps


2023-03-29, 17:11:43
Reply #9

Evgeny1982

  • Users
  • *
  • Posts: 4
    • View Profile
This works great. Thanks a lot!