VS:UpdateSubMtrlInMtrl: Difference between revisions

From Vectorworks Developer
Jump to navigation Jump to search
No edit summary
 
m (1 revision)
 
(No difference)

Latest revision as of 15:48, 16 September 2020

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Updates a Simple material which is a part of a Compound material. Sets new values for its fraction and whether it should be the primary material. Fraction can have value between 0.0 and 1.0. "Primary" material is a simple material which carries the graphical attributes to be used by the compound material.

FUNCTION UpdateSubMtrlInMtrl(
hMaterial :HANDLE;
subMtrlName :STRING;
fraction :REAL;
makePrimary :BOOLEAN) : Boolean;
def vs.UpdateSubMtrlInMtrl(hMaterial, subMtrlName, fraction, makePrimary):
    return Boolean

Parameters

hMaterial HANDLE Handle of a Compound material
subMtrlName STRING Name of a Simple material to be updated
fraction REAL Fraction of the Simple material
makePrimary BOOLEAN True if this Simple material should become the primary material of the Compound material

Return Value

Returns true if successful; false otherwise. Returns false if the simple material was not found.

Version

Availability: from Vectorworks 2021