Hi all i have the following code
<code>
try(DestroyDialog SB_Tools_Region_Render)catch()
Rollout SB_Tools_Region_Render "Render Region"
(
dropdownlist render_dd "Please select a render type" items:#("View", "Selected", "Region", "Crop", "Blowup")
on render_dd selected i do
setRenderType render_dd.items[i]
)
CreateDialog SB_Tools_Region_Render
<code\>
When I run this code, choode one of the options in the dropdown list. I get the following error.......
--Runtime Error: The function needed argument of type: #view | #normal | #selected | #selection | #region | #crop | #regioncrop | #boxselected | #blowup | #regionselected | #cropselected, got: "Selected"
What have i done incorrectly?
Comments (10)
Comment policy
A much simpler question
I need just to create a simple script to run with every scene, making the render area option set to #view
I got it with the following line.
render rendertype #view
BUT it just renders via cmd line, but in the render tab options its still on region.
How do i change it ? without needing to render every scene?
.
from mxs reference
Sets the render type.
The valid name values are:
#view | #selected | #region | #crop | #blowUp | #boxselected | #regionselected | #cropselected | #normal | #selection | #regionCrop .
#view and #normal are equivalent
#selected and #selection are equivalent
#crop and #regionCrop are equivalent.
if render scene dialog is open it needs to be updated after changes being made
setRenderType in render window when using batch rendering
Hi,
I'm having a problem setting the area to render to blowup when using batch rendering.
Is there way to set this in max(script)?
Regards,
Bert
.
Are you using a custom script to batch render?
Have you tried this:
setRenderType #blowUp
setRenderType in render window when using batch rendering
Hi,
I'm having a problem setting the area to render to blowup when using batch rendering.
Is there way to set this in max(script)?
Regards,
Bert
The problem is that you try to assign a string to the setRenredType.
The render_dd.items[i] return string. Also you have to add # before the name of the render type
This works:
Hi Kostadin
I also try this, it works but don't update "Rendered Frame Window"
if already open.You need to reopen to refresh.
try(DestroyDialog SB_Tools_Region_Render)catch()
Rollout SB_Tools_Region_Render "Render Region"
(
dropdownlist render_dd "Please select a render type" items:#("View", "Selected", "Region", "Crop", "Blowup")
on render_dd selected i do (setRenderType (render_dd.items[i] as name))
)
CreateDialog SB_Tools_Region_Render
Thanks
to both of you...
I knew it would be something ridiculously simple as usual.
solution
I find a simple solution for update the VFB
try(DestroyDialog SB_Tools_Region_Render)catch()
Rollout SB_Tools_Region_Render "Render Region"
(
dropdownlist render_dd "Please select a render type" items:#("View", "Selected", "Region", "Crop", "Blowup")
on render_dd selected i do
(
setRenderType (render_dd.items[i] as name)
if VFB_methods.VFB_IsInitialized() do VFB_methods.Reset()
)
)
CreateDialog SB_Tools_Region_Render
Thanks again barigazy
I've moved on a little from this and am trying to use a checkbutton instead that when checked turns the are to render to region.
But when i drag this to a tool bar, when I click the check button it opens a dialog. Obviously because i am telling it to have a dialog, but ideally i just want the button when checked to render a region but when unchecked to render view. Any ideas how this is achieved?
The script itself works, i just don't want it to have a floating dialog.