View Full Version : Simple questions difficult to me

05 May 2008, 09:16 AM
Hi,not to waste the resource here,I tend to post my questions in one thread.As a new user,any suggestion will be helpful to me.Thanks to warmheated guys!:)

Q1:How to refresh scene materials count after assign a material to an object?
The case is:
m=standard name:"test1" color:red
--we get:
--$Teapot:Teapot01 @ [0.000000,0.000000,0.000000]
Then go on:
n=standard name:"test2" color:green
So it is clear: I reassigned a material to teapot but the scenematerials.count increased.When I did it in material editor ,it was correct.But not in script.Can you anybody tell me why?And how to solve it? Thank you!

05 May 2008, 10:09 AM
Not that simple a question :) Thankfully, Bobo answered it previously; See:

05 May 2008, 01:41 AM
Hey,ZeBoxx2,thank you first! I had looked for it everywhere here,without any result.So BoBo had explained it, great!
Actually,I also have found a way to solve it ,that is run Views-- Activate All Maps
which is in code:
actionMan.executeAction 0 "40807" -- Views: Activate All Maps
As BoBo said,"if your scene is large, it would mean wasting time." But this manipulation is not only wasting time,but also leading to crash. So I dare not to use it in my script.Expecting a much better method to solve it.

06 June 2008, 01:30 PM
Q2:How to render anthoer scene in my scene and get the renderout bitmap?
theFile = (GetDir #Scene + "\\temp.max (file://\temp.max)")
saveNode #(BOX()) theFile


RenderOutMap = ......

Is there a method to realize this?Any help will be welcome, thank you first!

CGTalk Moderation
06 June 2008, 01:30 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.