Yafaray4tS v0.9.0

LightWorks, VRay, Dribble, YafaRay and more..
User avatar
clintonman
Captain
Posts: 5430
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 14 Jun 2018, 17:28 Ouch, this must be disheartening!
Only thing I can think of is do something similar that I did with the Offline Render icons for Vray.
In CustomCommands you find RenderAnimation.xml
...
Edit that file in Notepad outside of tS and Save it. Reset tS.
Do something like, if Yafaray render node exist, Call your Render Animation code or the Render to File panel that we are contemplating. Some how stop the OfflineRender.RenderAnimation('')
Actually we change the offline render buttons to do the same as the other buttons 1. open panel with render settings 2. press the render button to start
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5430
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Yafaray4tS v0.9.0

Post by clintonman »

Try using double backslash
Space.SaveScene( Folder + '"\"' + Scene_Name + Increment + '.RsScn');
Space.SaveScene( Folder + '"\\"' + Scene_Name + Increment + '.RsScn');
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

clintonman wrote: 14 Jun 2018, 17:56
trueBlue wrote: 14 Jun 2018, 17:28 Ouch, this must be disheartening!
Only thing I can think of is do something similar that I did with the Offline Render icons for Vray.
In CustomCommands you find RenderAnimation.xml
...
Edit that file in Notepad outside of tS and Save it. Reset tS.
Do something like, if Yafaray render node exist, Call your Render Animation code or the Render to File panel that we are contemplating. Some how stop the OfflineRender.RenderAnimation('')
Actually we change the offline render buttons to do the same as the other buttons 1. open panel with render settings 2. press the render button to start
Are you talking about the Render Animation toolbar command?

Code: Select all

OfflineRender.OpenView('',0,0);Activity.Run('/Scripts/Commands/RenderAnimation');
How is that going to coexist with Vray?

I added this to the top portion in the /CustomCommands/RenderAnimation.xml script

Code: Select all

if (Node.Exists(Space.CurrentScene() + "/YafaRay4tS"))
{
UserInterface.OpenToolPanelViewEx2("" , "" ,Space.CurrentScene()+"/YafaRay4tS", 8, 1, 0);
return;
}
That stops Vray from running.
Problem with that is if the YafaRay4tS.RsObj is in the scene it stops Vray from opening it's Dialog.
So there needs to be more code to the above.
Problem is if Vray is installed/loaded it always creates a invisible Vray node in the scene.
And there is the possibility, even if Vray is not loaded, that a user opens a Vray scene which will have the Vray node.
Unless you can come up with a better solution, I am thinking that when a user wants to use YafaRay4tS, they will have to Unload Vray from the Package Manager, reboot tS, and generate a New scene.
Note to that even if Vray is unloaded and uninstalled, the Vray photo renderer node is still in the Offline Renderers.
User avatar
trueBlue
Captain
Posts: 5215
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Yafaray4tS v0.9.0

Post by trueBlue »

clintonman wrote: 14 Jun 2018, 17:59 Try using double backslash
Space.SaveScene( Folder + '"\"' + Scene_Name + Increment + '.RsScn');
Space.SaveScene( Folder + '"\\"' + Scene_Name + Increment + '.RsScn');
This creates a tS error too.
Is there something in your plugin that can add a backslash?
User avatar
clintonman
Captain
Posts: 5430
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Yafaray4tS v0.9.0

Post by clintonman »

trueBlue wrote: 14 Jun 2018, 18:03 ...

I added this to the top portion in the /CustomCommands/RenderAnimation.xml script

Code: Select all

if (Node.Exists(Space.CurrentScene() + "/YafaRay4tS"))
{
UserInterface.OpenToolPanelViewEx2("" , "" ,Space.CurrentScene()+"/YafaRay4tS", 8, 1, 0);
return;
}
That stops Vray from running.
...
If it stops vray what is the purpose of adding it in?
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

Here is a Yafaray Folder that includes a Render to File panel and R2F_PanelFrame.
There is no code in the script except Attributes and Defaults.
It actually works, as is, for rendering an animation.
I removed the Image part shown previously, this is just animation.
The code to call the panel is:

Code: Select all

if (Node.Exists(Space.CurrentScene() + "/YafaRay4tS/R2F_PanelFrame"))
{
Node.Copy(Space.CurrentScene() + "/YafaRay4tS/R2F_PanelFrame", "/Project/Windows Manager Space");
WindowsManager.Activate();
WindowsManager.UpdateWindowsStructure();
}
Was thinking about creating a toolbar button that calls this panel.
That is of course if you want to use it or not.
Removed due to update
User avatar
trueBlue
Captain
Posts: 5215
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Yafaray4tS v0.9.0

Post by trueBlue »

clintonman wrote: 14 Jun 2018, 22:25
trueBlue wrote: 14 Jun 2018, 18:03 ...

I added this to the top portion in the /CustomCommands/RenderAnimation.xml script

Code: Select all

if (Node.Exists(Space.CurrentScene() + "/YafaRay4tS"))
{
UserInterface.OpenToolPanelViewEx2("" , "" ,Space.CurrentScene()+"/YafaRay4tS", 8, 1, 0);
return;
}
That stops Vray from running.
...
If it stops vray what is the purpose of adding it in?
It only stops Vray's Render Animation if the YafaRaytS.RsObj is in the scene.

If you want to try calling the panel from the /CustomCommands/RenderAnimation.xml

Code: Select all

function Execute(params)
{
if (Node.Exists(Space.CurrentScene() + "/YafaRay4tS"))
{
Node.Copy(Space.CurrentScene() + "/YafaRay4tS/R2F_PanelFrame", "/Project/Windows Manager Space");
WindowsManager.Activate();
WindowsManager.UpdateWindowsStructure();
return;
}
if (Node.Exists(Space.CurrentScene() + "/Vray"))
{
Width = Node.Value(Space.CurrentScene() + "/Vray", "Image Width")
Height = Node.Value(Space.CurrentScene() + "/Vray", "Image Height")
}
if (Node.Exists("/Project/Windows Manager Space/Frame Window, 1/VrayView Node"))
{
WindowsManager.MoveWindow("/Project/Windows Manager Space/Frame Window, 1", -1, -1, Width, Height, -1, -1, -1)
}
if (Node.Exists("/Project/Windows Manager Space/Frame Window, 2/VrayView Node"))
{
WindowsManager.MoveWindow("/Project/Windows Manager Space/Frame Window, 2", -1, -1, Width, Height, -1, -1, -1)
}
if (Node.Exists("/Project/Windows Manager Space/Frame Window, 3/VrayView Node"))
{
WindowsManager.MoveWindow("/Project/Windows Manager Space/Frame Window, 3", -1, -1, Width, Height, -1, -1, -1)
}
if (Node.Exists("/Project/Windows Manager Space/Frame Window, 4/VrayView Node"))
{
WindowsManager.MoveWindow("/Project/Windows Manager Space/Frame Window, 4", -1, -1, Width, Height, -1, -1, -1)
}
OfflineRender.RenderAnimation('')
}
Theres is another issue using the above, if the Yafaray4ts.RsObj and the Vray.RsObj is in the scene and Yafaray is selected as the Renderer, the Vray view is opened. That's because the button command has OfflineRender.OpenView('',0,0);Activity.Run('/Scripts/Commands/RenderAnimation');
The OfflineRender.OpenView('',0,0) command can be removed from the toolbar because it is in the RenderAnimation.xml
User avatar
clintonman
Captain
Posts: 5430
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Yafaray4tS v0.9.0

Post by clintonman »

So you're trying to call the yafaray panel from the button? There is no need for that.
The offline render buttons uses plugin calls to control everything, which is why you had to alter the buttons to make vray do what you wanted.
The yafaray offline render plugin calls scripts and doesn't do anything else, so you want to alter the scripts not the buttons.

the command scripts are found inside /Scripts/CustomCommands/YafarayScripts and are a direct translation of offline render system:
When you press a render button it calls the OpenView script then it calls one of the render scripts depending on which button you pressed. Right click on any of the buttons calls the EnumPropertiesPanel script.
Clinton Reese

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

Re: Yafaray4tS v0.9.0

Post by trueBlue »

No problem just thought it would be an additonal way to call Yafaray animation.

I agree calling them how you are suggesting, in fact thought that is how you would want to in the first place.
User avatar
clintonman
Captain
Posts: 5430
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Yafaray4tS v0.9.0

Post by clintonman »

After seeing your panel I suggest it works this way:

Render Animation - opens the animation Render to File panel
Render Scene - opens a similar panel without the animation controls.
Render Object - renders to a fixed file with no dialog, like lightworks render to screen on model side
Render Area - defaults to the fixed file with an option on the YafaRay4tS panel for no dialog, render scene dialog or animation dialog
Clinton Reese

http://clintons3d.com
Post Reply