Community
Maya Programming
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya SDK topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to add many MRenderItem's in a MRenderItemList?

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
EarthHobbit
454 Views, 5 Replies

How to add many MRenderItem's in a MRenderItemList?

Hi,
I have an MPxGeometryOverride and need to create many MRenderItems. I append them render item by renter item in the MRenderItemList during a loop.
However beyond 3 or 4000 it becomes quite slow and reaching the 10'000 takes ages.
Is there a way to bulk add all render items in one go, or is there another way to do ?
Putting all my geometry in a single renderitem is not really a solution.
Thanks !
5 REPLIES 5
Message 2 of 6
cheng_xi_li
in reply to: EarthHobbit

Hi,

 

I am afraid there is no way to bulk add renderitems. If they are same renderItem with different transforms, it would be better to use MPxSubsceneOverride which supports instancing.

 

Yours,

Li

Message 3 of 6
EarthHobbit
in reply to: cheng_xi_li

Ok, thanks, will look into MPxSubsceneOverride !

Message 4 of 6
EarthHobbit
in reply to: cheng_xi_li

Hi Li,

I played with MPxSubsceneOverride and performance is indeed much better.

However 1 issue I have: How can I force update (instead of changing time) ?

 

Thanks !

Message 5 of 6
cheng_xi_li
in reply to: EarthHobbit

Hi,

 

You'll need to trigger an update (e.g. MPlug::getValue).

 

Yours,

Li

Message 6 of 6
EarthHobbit
in reply to: EarthHobbit

Oh thanks, it works 🙂 !!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report