Materials List for Workspace

free scripts, plugins, models, textures
Post Reply
User avatar
clintonman
Captain
Posts: 5432
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Materials List for Workspace

Post by clintonman »

MaterialsListPanel.jpg

Inspired by the modelspace Material List tool

Displays a list of D3D materials with controls for naming and editing the material and selecting the objects that use the material
Naming the materials is useful for exporting out of trueSpace
The list is most useful for scene instanced materials and scenes that don't have a large number of renderable objects. It can be used to manually delete orphaned scene instanced materials or load them into the material editor to be assigned to an object.
Color coding is white=not instanced, green=scene instanced, yellow=instanced orphaned and black is no material.


http://clintons3d.com/plugins/truespace ... slist.html
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5216
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Materials List for Workspace

Post by trueBlue »

Any idea how to stop these errors?
Steps:
Add 3 Cubes
Open Material List
Use [ S ] to Select
Delete it
Use [ S ] to Select will throw an error
ERR Source object: Error: Unspecified script error Line: 59, Char: 1 Script text:
Same with [ E ] ] D] and [ Name ]
User avatar
clintonman
Captain
Posts: 5432
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Materials List for Workspace

Post by clintonman »

trueBlue wrote: 19 Dec 2023, 20:27 Any idea how to stop these errors?
Steps:
Add 3 Cubes
Open Material List
Use [ S ] to Select
Delete it
Use [ S ] to Select will throw an error
ERR Source object: Error: Unspecified script error Line: 59, Char: 1 Script text:
Same with [ E ] ] D] and [ Name ]
Thanks,

Dec 19 updated with node exists checks, new installer uploaded.
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5216
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Materials List for Workspace

Post by trueBlue »

I think you forgot a return
ERR Source object: Error: Unspecified script error Line: 63, Char: 1 Script text:

Code: Select all

	if(!Node.Exists(allMaterials[index + MaterialsListStartIndex])) {
		System.Alert("The Materials List is out of sync. Press the Update button");
	}

Why not run the update and no Alert?

Code: Select all

	if(!Node.Exists(allMaterials[index + MaterialsListStartIndex])) {
		//System.Alert("The Materials List is out of sync. Press the Update button");
Activity.Run('Scripts/CustomCommands/Materials List/update')
return
	}
User avatar
clintonman
Captain
Posts: 5432
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Materials List for Workspace

Post by clintonman »

trueBlue wrote: 20 Dec 2023, 02:52 I think you forgot a return
ERR Source object: Error: Unspecified script error Line: 63, Char: 1 Script text:

Code: Select all

	if(!Node.Exists(allMaterials[index + MaterialsListStartIndex])) {
		System.Alert("The Materials List is out of sync. Press the Update button");
	}

Why not run the update and no Alert?

Code: Select all

	if(!Node.Exists(allMaterials[index + MaterialsListStartIndex])) {
		//System.Alert("The Materials List is out of sync. Press the Update button");
Activity.Run('Scripts/CustomCommands/Materials List/update')
return
	}
Oops, added returns and uploaded new installer.
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5216
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Materials List for Workspace

Post by trueBlue »

I think the E, D, and Name buttons should select the object first
First slot

Code: Select all

matsFS.SelectMaterialItems(0);
Post Reply