By kami
#369537
Is there a way to read the settings from the scene manager with rhino-script and/or change them?
Sorry, I did not find any overview of the commands.

What I am trying to do is to modify the render buttons so that they use a different path.
I want the normal render to point to a specific folder on my local drive and the the network render to export to a network location.
This would only mean a changement in the drive letter (D: for local renderings and S: for network renderings)
By JDHill
#369548
I'm not sure (I am away from my machine) if this is exactly possible, but you may be able to use the Maxwell_OutputSettings (I think that is it) command to set the paths using separate toolbar buttons. Just check the various options on that command.
By kami
#369551
I looked at that too, but the ScenePath and ImagePath there point to a different location than the settings in the Scene Manager -> Output -> Folder. That's why I thought it might not have any influence...
But when you change it via the Maxwell_OutputSettings it overwrites the Scene Manager Setting. So I'll try to make it work that way!
By kami
#369559
We got it working. I'll post the script later.
One additional question though: Is there any possibility to send a network job so that the "Send Dependencies" comes disabled? Is there a flag or something for that?
By kami
#369581
Ok, thank you for that info.

Concerning the script, I have one problem.
With strPath = Maxwell.Output.scenePath() I can get the current path, but only if it is set via the Maxwell_Outputsettings.
If it is changed in the UI of the scene manager, I cannot get the value which is standing there. Do you know if this is possible?
Why isn't the Maxwell_Outputsetting changing if I change the value there?

The whole script is looks like that at the moment:
Code: Select all
Call ChangeRenderPath()
Sub ChangeRenderPath()
	
	Dim Maxwell, strPath, strImagepath, strDefaultNetworkPath, strFileName, strImagename, strDrive
	
	strDrive = "S"
	strFileName = rhino.Documentname

	' create the ScriptObject
	Set Maxwell = CreateObject("Maxwell.Script.ScriptObject")
	' successfully created?
	If Maxwell Is Nothing Then
		Rhino.Print("Unable to create Maxwell.Script.ScriptObject.")
		Exit Sub
	End If
	' successfully connected?
	If Not Maxwell.IsConnected Then
		Rhino.Print("Unable to connect to the current Maxwell scene.")
		Exit Sub
	End If
	
	If Not isnull(strfilename) Then
		strFilename = replace(strfilename, "3dm", "")
	Else
		
		strfilename = CStr(Year(now) & Month(now) & Day(now))
			
	End If
	
	strDefaultNetworkPath = "S:\TESTRENDER\" & strfilename & "\"
	
	'Get default Maxwell render path
	strPath = Maxwell.Output.scenePath()
	
	
	If right(strPath, 11) = "default.mxs" Then
		
		Maxwell.Output.scenePath() = strDefaultNetworkPath
		
		
	ElseIf Left(strPath, 3) = "D:\" Then
		
		Maxwell.Output.scenepath() = Replace(strPath, "D:\", strDrive & ":\")
	
	ElseIf Left(strPath, 3) = "C:\" Then
		
		Maxwell.Output.scenepath() = Replace(strPath, "C:\", strDrive & ":\")
		
	Else Rhino.Print("Not a valid path.")
		
	End If
	
	'Rhino.Print("Path changed to: " & Maxwell.Output.scenePath())
	
End Sub
By JDHill
#369649
kami wrote:Concerning the script, I have one problem.
With strPath = Maxwell.Output.scenePath() I can get the current path, but only if it is set via the Maxwell_Outputsettings.
If it is changed in the UI of the scene manager, I cannot get the value which is standing there. Do you know if this is possible?
Why isn't the Maxwell_Outputsetting changing if I change the value there?
I have looked into this, now. The problem is that ScenePath is returning a default-generated path, unless both scene name and folder have been set (Maxwell_OutputSettings sets both, if you give it a path with a filename, which is why it is working after you use that command). The reason is that I did not update the logic of the code in the script object when the dynamic output name-generation functions (append camera name, auto file-naming) were added -- I'll have to fix this so that you can read these when one or the other is not set.
By kami
#374381
Hi Jeremy
Looking forward to working with v3 soon, but I think I'll have to finish the old year with the older version to make sure every project finishes smoothly :)
In the meantime I was working on a script to automate certain procedures and didn't find any possibility to change some options in the plugins output page, as for example select/deselect the 'export instances' tick. would that be possible with the 3.0 version?
Or could you implement this in a future release?
Thanks,
Christoph
By kami
#375254
We are currently working on a script that'll go through the whole 3d model library, unifiy it, clean it up and create new preview renderings of all objects (that was also the reason for the last request).
We stumbled across another commend we could not via the command line which would be: remove unused materials. Could you add a command line command for the as well?

We also talked about another issue concerning textures that have moved... I think this should work at the moment that when opening the file, he's browsing for any missing textures.
I remembered you once saying that this only works when opening a file via File -> Open and not if you would just double click on it in the explorer. I never understood why the way you open a file makes such a huge difference and think that a lot of users don't even know that. So wouldn't it make sense to have a command that'll look for missing textures when you want it too? And maybe not having it done automatically (which can result in a very long opening time for some files)?
By JDHill
#375265
Indeed, remove unused materials is done internally and not through a command; I'll put it on my list to change that. Regarding using File > Open, the reason why this makes a difference is that on Windows, the "open file" dialog sets the current directory for the process, to that of the chosen file. In my experience, using the most-recent list does not do that, in which case, any asset that is referenced relatively will not be able to be found.

I had some very strong highlights in some material[…]

Daydreamer

Thanks everyone! I didn't want to use volumetrics […]

opening V5 files in v6

just installed latest version for Rhino V6 when I[…]

I hope someone can help me! This is almost certain[…]