LightWave Scenes using Sliders doesn't work

Hi,

I’ve stumbled into a problem with Deadline 4.1. If I submit a scene from LightWave which has Sliders in it, Deadline stops processing the scene and throw an error.

I’ve done some digging into this, sliders in LightWave is a GUI element used when animating and has no effect on the actual rendering whatsoever, but still lwsn.exe tries to load the sliders as they are present in the scene file. Running lwsn.exe from the command line with all the arguments reveals that it outputs this line when it comes to the sliders during the initialization.

Can't load plug-in "Sliders".Error:  No plug-in of type CustomObjHandler found with name Sliders.

And then it continues processing the scene and renders it fine. So it’s just kind of a notification, kind of strange behavior, but well, that’s how Screamernet works. :slight_smile:

Anyway, checking Deadline’s Lightwave.py plugin, we have this line of code

self.AddStdoutHandler( "Error:(.*)", self.HandleError )

Which triggers an error and then a FailRender as soon as a line with the word Error: occurs. And as the Sliders in LightWave triggers a notification with that word, that’s what causes scenes with Sliders not to work in Deadline I guess.

Deleting all sliders from the scene before submitting it to Deadline, makes it work and render fine, but it’s kind of a workflow killer having to do that, and easy to forget.

So then to the solution, is there a way to make an exception so it doesn’t trigger an error for the “Sliders”.Error: ? I’m no expert on Regular Expressions, but I guess that regex in the Lightwave.py could be altered to not care about the Sliders error message? Or is there another way to make it ignore a certain error message in the Stdout?

Cheers,
Johan

Hi,
Try using the attached update plugin py file for Lightwave whcih should ignore this specific dialog if it appears BEFORE it gets to the standard “error:” message handling code.
Backup your existing py file before overwriting it with this one!
Check out lines 296-297.
Lightwave.zip (3.61 KB)
Mike

Hi Mike,

Thanks for the updated file. Unfortunately it didn’t solve the problem. I saw that you had added the AddPopupIgnorer() for the Sliders, but the error message doesn’t come in a popup window but is outputted directly to the standard command line console.

I was thinking that this code

self.AddStdoutHandler( "Error:(.*)", self.HandleError )

could be changed to

self.AddStdoutHandler( "(?!.*Sliders)Error:(.*)", self.HandleError )

ie. use a negative lookahead assertion in the regular expression to ignore errors containing Sliders, but that particular expression didn’t seem to have any effect, any idea what regex engine that’s being used? If some special syntax needs to be used to make a lookahead in the regex?

Cheers,
Johan

Ah…I see…misread your first post.
msdn.microsoft.com/en-us/library … regex.aspx
You could alter the Regex (.Net) or handle it in the def HandleError, as you want all other potential errors still to be flagged and returned as failed.
Mike

Hey Mike,

Thanks for the additional help and pointers in the right direction.

I decided to skip messing around with a complicated regex and edited the def HandleError as you suggested, easier to keep track on, especially if more ignores need to be added.

Anyway, it works perfect now. I’m very happy. And I also added another exception for the LW_BufferView error message, which is a similar situation as the Sliders. A function only used within LightWave to view buffers and doesn’t affect the actual rendering, but still screamernet parses it in the scenefile and outputs an error message in the command line which is really not an error but a notice.

So this is the final code I came up with to replace the original def HandleError, if any other LightWave users have those functions active in their scenes.

[code] def HandleError( self ):
## Safe to ignore errors, which Screamernet outputs that doesn’t affect the rendering.
ignoreError = False
errorMessage = self.GetRegexMatch( 0 )
previousMessage = self.GetPreviousStdoutLine()
# Ignores error message about sliders not found. (also checking previous message as Screamernet reports this twice.)
if ( errorMessage.find( “Sliders” ) != -1 or previousMessage.find( “Sliders” ) != -1 ):
ignoreError = True
# Ignores error message about LightWave’s Buffer View not found, as this is an Image Filter only used with LightWave’s internal viewer.
if ( errorMessage.find( “LW_BufferView”) != -1 ):
ignoreError = True

	if( ignoreError ):
		LogInfo("Ignored Error: \"" + errorMessage + "\", as this error doesn't affect the rendering.")
	else:
		FailRender( self.GetRegexMatch( 0 ) )[/code]

Cheers,
Johan

Hey Johan,

Thanks for providing the modifications you made! We’ll ship this with the 4.1 maintenance release of Deadline.

Cheers,

  • Ryan

Ryan,

That’s great, and convenient when upgrading to new versions of Deadline. Very much appreciated!
And keep up the great work, I’ve been evaluating Deadline for some time now and am very pleased with the experience and control it provides. I’m getting ready to throw out the old render manager we’ve been using with LightWave to replace it with Deadline.

Cheers,
Johan