Author Topic: Help! Choose Material ID of C Masking ID using Max script  (Read 537 times)

2023-06-12, 04:38:31

SRY

  • Active Users
  • **
  • Posts: 12
    • View Profile
re = maxOps.GetCurRenderElementMgr()
re.addRenderElement (Elementlist elementname:Namelist CMasking_ID:#Material_ID)

but It doesn't work, I don't know how to write this part: CMasking_ID:#Material_ID

2023-06-12, 10:52:37
Reply #1

clemens_at

  • Active Users
  • **
  • Posts: 140
    • View Profile
try this:
Code: [Select]
re = maxOps.GetCurRenderElementMgr()
re.addRenderElement (myRe=(CMasking_ID elementname:"CMasking_ID"))
myRe.what = 3

2023-06-13, 01:07:11
Reply #2

SRY

  • Active Users
  • **
  • Posts: 12
    • View Profile
thank you very much. How should I deal with a similar situation when I can't find it by interface or property.

2023-06-13, 10:12:42
Reply #3

clemens_at

  • Active Users
  • **
  • Posts: 140
    • View Profile
From https://forum.corona-renderer.com/index.php?topic=39495.msg210330#msg210330:

I usually run the "showClass" command with an additional "*.*" to get all the properties of that class.

for your example:
Code: [Select]
showClass "CMasking_ID*.*"

2023-06-13, 11:32:12
Reply #4

RecentSpacesSam

  • Active Users
  • **
  • Posts: 76
    • View Profile
From https://forum.corona-renderer.com/index.php?topic=39495.msg210330#msg210330:

I usually run the "showClass" command with an additional "*.*" to get all the properties of that class.

for your example:
Code: [Select]
showClass "CMasking_ID*.*"

Oooooh that's a nice little hack.

I normally spam each of show interface/interfaces/class/method/properties until I get something useful

2023-06-18, 07:51:27
Reply #5

SRY

  • Active Users
  • **
  • Posts: 12
    • View Profile

2023-06-19, 20:29:39
Reply #6

Avi

  • Corona Team
  • Active Users
  • ****
  • Posts: 508
    • View Profile
Hi @SRY

This code seems to work fine for me

Code: [Select]
showClass "CMasking_ID*.*"
Make sure you are copy pasting it right.

Arpit Pandey | chaos-corona.com
3D Support Specialist - Corona | contact us