Changing render by command prompt, not storing the parameters

Hello,

I’ve realized that when I change the render parameters using command prompt they are no stored, for instance if you run the following line:

!_-DocumentProperties _Render _DPI=12 _enter _enter

DPI is still 72 instead 12, the same thing happens changing the resolution or any other thing, here a short gif showing it:
14-02-2024_22-47-17

Is this a bug?

Thanks in advance
Will

Hi Will - dpi settings are non-existent in V8 so far - (leaving it in the command line version of DocumentProperties is a goof) there has been some discussion here about this - can you tell me how you would use this number, if it worked?

-Pascal

Hi @pascal

Thanks for your attention to the topic, DPI setings is just an example, the point is that all render settings are not stored after setting them by command line.

Changing the resolution for example from “Viewport” to “Custom” and setting the “Width” and “Height” is also not saved, you can see it in the gif in the first post or just running the following command:

!_-DocumentProperties _Render _Resolution _Type=_Custom _Width=53 _Height=54 _enter _enter _enter

As far as I see the samples are not stored either, when setting these values by code:

 RhinoDoc.ActiveDoc.RenderSettings.UserDictionary["UseDocumentSamples"] = true;
 RhinoDoc.ActiveDoc.RenderSettings.UserDictionary["Samples"] = 25;

and calling the !_Render command doesn’t have the samples set.

Thanks and regards.
Will

1 Like

Hi Will - I see this, thanks.
RH-80455 Rendering - DocumentProperties ignored
-Pascal

Thank you @pascal

Regarding the render iterations “samples”, do you know if there is any other way to set it?

Thanks
Will

Seeing this one only now, but hopefully better late than never:

You shouldn’t set directly to the document render settings, but instead first get the render settings into a variable and make the changes there. Finally set the render settings back to the document:

import scriptcontext as sc
import Rhino

rs = sc.doc.RenderSettings

rs.UserDictionary["UseDocumentSamples"] = True
rs.UserDictionary["Samples"] = 13

sc.doc.RenderSettings = rs