Notifications
Clear all

[Closed] assign spec without material

Is it possible to assign a unique specular value to a mesh without first temporarily using a material slot from the editor?

1 Reply

The simplest way I see would be to use the userproperties.

You want to assign a specular of x to each geometry node of your scene :

for obj in geometry do
   (
   	setuserprop obj "customSpecular" x
   )

then if you want to read the user properties of your objects :

for obj in geometry do
    (
    	myCustomSpecular = getuserprop obj "customSpecular" 
    )

Then later, when you assign materials to your nodes, you just get the value of this user property to set the “real” specular value of the material.

EDIT: I forgot to say that the user property “customSpecular” is merely a number, not an actual specular value. You could name it “thisIsANiceCustomSpecular”, it would be the same result.