Isotropix Forums

Attribute Default Value

Clarisse Scripting related topics

Attribute Default Value

Unread postby briansilva » Thu Mar 05, 2020 1:30 pm

Hello! I think I know the answer, but just want to make sure this is the standard approach.

If I wanted to get the default value of an attribute on an object, the class is where I should get it, correct? i.e.:

python code

material_item.get_class().get_attribute("metallic").get_string()
briansilva
 
Posts: 52
Joined: Mon Mar 25, 2019 12:43 pm

Re: Attribute Default Value

Unread postby adomon » Thu Mar 05, 2020 5:54 pm

Hello

The right way to do this :

Code: Select all
material_item.get_attribute("metallic").get_proto().get_string()
User avatar
adomon
 
Posts: 62
Joined: Fri Jul 01, 2016 10:22 pm

Re: Attribute Default Value

Unread postby briansilva » Fri Mar 06, 2020 7:52 pm

Ah get_proto is exactly it. Thank you!
briansilva
 
Posts: 52
Joined: Mon Mar 25, 2019 12:43 pm


Return to Scripting