Notifications
Clear all

[Closed] How to create a path select button?

Hi all.

1)This code run occered an error:

 nam1 = getfilenamefile maxfilename
	 nam2 = substring nam1 1 (nam1.count-6)
	 nam3 = nam2 + "_00" 
	 nam3.material = MeditMaterials[7]

I want to put material on obj… i just get the obj name:

Code:
[left] nam1 = getfilenamefile maxfilenamenam2 = substring nam1 1 (nam1.count-6)a = nam2 + “_00”— a is the obj name,but it’s a variable.[/left]

I don’t know how to put material on obj by “a” …

9 Replies

Concerning 2

Try this for loading material libraries:

loadMaterialLibrary "C:\\standard.mat"

Don´t have time right now for checking out the rest, maybe some of the other guys can help you.

Chris

1 Reply
(@perfectboy)
Joined: 11 months ago

Posts: 0

Hi all , nobody answer me? I try to run,but didn’t get.

 
[b]loadMaterialLibrary "C:\\Standard_Material_SE.mat"
false[/b]

 PEN

Same place in the help as getOpenFileName

getSavePath [caption:<window_caption_string>] [initialDir:<pathname>]

1 Reply
(@perfectboy)
Joined: 11 months ago

Posts: 0

Thanks Pen…

I solved it use “getSavePath”…

But can you give me many advice about the second problem?

 PEN

Well I’m not sure what it is supposed to be doing.

1 Reply
(@perfectboy)
Joined: 11 months ago

Posts: 0

Maybe i said it not clearly…

I want to put material on obj… i just get the obj name:

 
nam1 = getfilenamefile maxfilename
nam2 = substring nam1 1 (nam1.count-6)
a = nam2 + "_00"
--- a is the obj name,but it's a variable.

I don’t know how to put material on obj by “a” …

 PEN
$.material=a

Is that what you are looking for?

i think you are looking for this:

obj = getNodeByName a
obj.material = MeditMaterials[7]
1 Reply
(@perfectboy)
Joined: 11 months ago

Posts: 0

Yes…thank you msmith81