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 set the UVTransform of BitmapTex with Python or C++?

How to set the UVTransform of BitmapTex with Python or C++?

jeremyliu1989
Enthusiast Enthusiast
850 Views
4 Replies
Message 1 of 5

How to set the UVTransform of BitmapTex with Python or C++?

jeremyliu1989
Enthusiast
Enthusiast

Hey, all:

I want to reset the utiling and vtiling of the BitmapTex with Python.

For example, just as shown in the below image, reset the utiling and vtiling from 1.0 to 5.0.

794D752A-ADD9-4ffd-B8A4-05EBE06F12F3.png

Appereciate for any suggestion, Thanks.

0 Likes
Accepted solutions (1)
851 Views
4 Replies
Replies (4)
Message 2 of 5

denisT.MaxDoctor
Advisor
Advisor
Accepted solution
import pymxs
from pymxs import runtime as rt
tx = rt.BitmapTexture()
tx.coords.V_Tiling = 5.0
Message 3 of 5

jeremyliu1989
Enthusiast
Enthusiast

Thanks, denisT!

 

It works well.

However, my code is based on MaxPlus, and I'll modify the existing BitmapTex's UV_Tiling.

 

So, could I know how to do that with MaxPlus or get the reference of BitmapTex with Pymxs (i'm not familiar with Pymxs...)?

0 Likes
Message 4 of 5

denisT.MaxDoctor
Advisor
Advisor

 

import MaxPlus
import pymxs
mp_tx = MaxPlus.Factory.CreateDefaultBitmapTex()
pm_tx = pymxs.runtime.GetAnimByHandle(mp_tx.AnimHandle)

and so on as i showed above

 

 

Let me give you some advice:

If you want to start and finish some development in the 3DS MAX, and don’t want to suddenly be disappointed a couple of steps before its completion, do not choose the MaxPlus for it.

 

 

 

0 Likes
Message 5 of 5

jeremyliu1989
Enthusiast
Enthusiast

Many thanks,  denisT.

All of that works perfectly.

 

Yep, the MaxPlus has lots of limitation and feel disappointed more and more. It just can be used as a prototype module.

All works will be migrated with C++ later.

 

Appreciate for your kind advice~~

 

0 Likes