Group Name = Render Output name

Hi guys! Need some button/script that can fill render output box with the same name of my group selection (object/group.jpg). Is that possible? Thanx!!!

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
miauu's picture

.

Where is the image? - group.jpg

Gabriel Corazza's picture

Generic name

Group.jpg is a generic name like "groupname".jpg,
my ideia:

1- Select any group in the scene. (grab groupname)
2- Press Magic button! Puff! :D
3- Render output now is "C:/groupname.jpg"

Srry my english is very rusty!

Ty Miauu
btw im still using Measure Pro every day XD

miauu's picture

.

The script like this can be wrrtiten for 5 minutes or less. The problem is how the scrip to know this part: "C:/"
As you know Render Output must be a "path to folder" + "name of the file". The name of the file will be the name of the selected group. But how the script to know the path to the folder where the file to be saved?
If all images have to be saved to C:\ then use this:\

(
	function FindTopMostGroupHead obj = if isgroupMember obj do
	(
		while obj != undefined and (not isGroupHead obj or isGroupMember obj) do
			(obj = obj.parent)
		obj
	)
 
	selObjsArr = selection as array
 
	grpHead = FindTopMostGroupHead selObjsArr[1]
 
	rendSaveFile = true
	rendOutputFilename = "C:\\" + grpHead.name + ".jpg"
)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.