PDA

View Full Version : Comparing materials


Hobbs
02-07-2008, 11:55 PM
i have a question, and i'm sorry if its already been answered, but

is there an easy way to compare materials? I have a material that we created a while ago, and i'm trying to basically create the same material in code, for easier editing in the future.

so all the animation key frames, materials locations, properties etc i have created through code.

Since there are alot of parameters, i'd like to be able to see if what i have so far is everything i need.

note: i need to compare the paramaters of the material, not the base material itself.

I believe doing a direct compare is just comparing the memory slots, so it will always come up false, correct?

So if anyone has or could help me come up with a solution it would be greatly appreciated.

Thanks

If not clear, let me know.

PEN
02-08-2008, 12:20 AM
try...

props=getPropNames theMaterial
for p in props do
(
print (getProperty theMaterial p)
)

That was off the top of my head but should be close.

Hobbs
02-08-2008, 03:26 PM
exactly what i was looking for. Thanks :thumbsup:

Hobbs
02-08-2008, 04:28 PM
Ok another issue has come up, and its probably an error on my part. can't go to much into it, but basically the material type is one that we have created in house.

Now the previously hand made material comes up with the property

:standard

but the one that i made in code comes up with the property

(null) : standard

without posting my code, has anyone come up with something like this before?

Thanks

CGTalk Moderation
02-08-2008, 04:28 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.