Old 04-11-2019, 09:48 AM   #1
WyattRice
Human being with feelings
 
WyattRice's Avatar
 
Join Date: Sep 2009
Location: Virginia
Posts: 2,068
Default SNM_SetIntConfigVar Question

Hi all.
I'm trying to set the render output settings via script to DDP.

Here's a script that mespotine shared with me.

Code:
reaper.SNM_SetIntConfigVar("rendercfg", 1684303904)
I can't seem to get it to work.


If I render a something else first like a wav file from file, main menu, and render button, then run this script after that, then it works, but only if I render something else first.

Here's a quick gif

Could anyone help a noob out?

Many Thanks,
Wyatt
__________________
DDP To Cue Writer. | DDP Marker Editor.
WyattRice is offline   Reply With Quote
Old 04-11-2019, 03:51 PM   #2
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,109
Default

try:

Code:
success = reaper.GetSetProjectInfo_String(0, "RENDER_FORMAT", "IHBkZA==", true)
(should work since v5.974+dev0409)
nofish is offline   Reply With Quote
Old 04-11-2019, 06:48 PM   #3
WyattRice
Human being with feelings
 
WyattRice's Avatar
 
Join Date: Sep 2009
Location: Virginia
Posts: 2,068
Default

hi nofish.
thanks so much.

The script is working.

I'm trying to make this work in c++ for my DDP marker editor GUI.
I've added a button to my list window.

Any hint of what I'm doing wrong here?

Here's my button click code

Quote:
if (LOWORD(wParam) == IDC_RENDER_BUTTON)
GetSetProjectInfo_String(0, "RENDER_FORMAT", "IHBkZA==", true);
Many Thanks,
Wyatt
__________________
DDP To Cue Writer. | DDP Marker Editor.
WyattRice is offline   Reply With Quote
Old 04-11-2019, 07:24 PM   #4
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,109
Default

What does it do (or not do)?

Have you created a new functions header, so it contains this newly added function? (action list -> [developer] Write C++ API functions header)

edit:
I just tried here.
This works for me to set to DDP:

Code:
char buf[] = "IHBkZA==";
GetSetProjectInfo_String(0, "RENDER_FORMAT", buf, true);
(Your code above crashes here, need to pass char*, not const char*)

Last edited by nofish; 04-11-2019 at 08:49 PM.
nofish is offline   Reply With Quote
Old 04-13-2019, 08:00 AM   #5
WyattRice
Human being with feelings
 
WyattRice's Avatar
 
Join Date: Sep 2009
Location: Virginia
Posts: 2,068
Default

Thanks!
Got it working.

Now all I have to do is to figure out the directory to save the render using browse for folder, etc. Then figure out how to render DDP to that dir.

Many thanks for your time.

Wyatt
__________________
DDP To Cue Writer. | DDP Marker Editor.
WyattRice is offline   Reply With Quote
Old 04-13-2019, 11:23 AM   #6
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,109
Default

Glad it helped, you're welcome.

Btw. you may know anyway, to invoke the actual render (with current render settings) you can simply use

Code:
Main_OnCommand(41824, 0); // Render project, using the most recent render settings

// alternatively:
Main_OnCommand(42230, 0); // Render project, using the most recent render settings, auto-close render dialog, since Reaper v5.974
nofish is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:32 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.