Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] I need help! => Topic started by: SRY on 2023-06-12, 04:38:31

Title: Help! Choose Material ID of C Masking ID using Max script
Post by: SRY on 2023-06-12, 04:38:31
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
Title: Re: Help! Choose Material ID of C Masking ID using Max script
Post by: clemens_at on 2023-06-12, 10:52:37
try this:
Code: [Select]
re = maxOps.GetCurRenderElementMgr()
re.addRenderElement (myRe=(CMasking_ID elementname:"CMasking_ID"))
myRe.what = 3
Title: Re: Help! Choose Material ID of C Masking ID using Max script
Post by: SRY on 2023-06-13, 01:07:11
thank you very much. How should I deal with a similar situation when I can't find it by interface or property.
Title: Re: Help! Choose Material ID of C Masking ID using Max script
Post by: clemens_at on 2023-06-13, 10:12:42
From https://forum.corona-renderer.com/index.php?topic=39495.msg210330#msg210330 (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*.*"
Title: Re: Help! Choose Material ID of C Masking ID using Max script
Post by: RecentSpacesSam on 2023-06-13, 11:32:12
From https://forum.corona-renderer.com/index.php?topic=39495.msg210330#msg210330 (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
Title: Re: Help! Choose Material ID of C Masking ID using Max script
Post by: SRY on 2023-06-18, 07:51:27
Invalid ,Inconceivable!
Title: Re: Help! Choose Material ID of C Masking ID using Max script
Post by: Avi on 2023-06-19, 20:29:39
Hi @SRY

This code seems to work fine for me

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