Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

How to write this in c#?

How to write this in c#?

maxyweb
Contributor Contributor
271 Views
1 Reply
Message 1 of 2

How to write this in c#?

maxyweb
Contributor
Contributor

I figured out how to work with objects a little, but I couldn't find how to work with materials. And in general, does anyone know where to find detailed documentation?

if obj.material.base_color_map != undefined then
	(
		local bmt = Bitmaptexture();
		local bmt_file = texpathD

		local bmp = openBitmap bmt_file gamma:2.2;
		bmt.bitmap = bmp;
		obj.material.base_color_map = bmt;

		obj.material.base_color_map.Reload();
		obj.material.base_color_map.name = "D";
		
		showTextureMap obj.material obj.material.base_color_map on
	)

 

0 Likes
272 Views
1 Reply
Reply (1)
Message 2 of 2

istan
Advisor
Advisor

When MXS is so simple for you, why don't you simply execute your MXS code via C#?

There should exist a C# function for calling it. Sry, I know it only for C++.

 

0 Likes