If i'm not mistaken, "_1" is generated by Redshift if the "Regular Image" filename and the "Multi-Pass Image" filename are the same
Same filename :
Changing "-" to "_" at the end of the file :
If i'm not mistaken, "_1" is generated by Redshift if the "Regular Image" filename and the "Multi-Pass Image" filename are the same
Same filename :
Changing "-" to "_" at the end of the file :
Hello @ferdinand ! Thanks for answer it is very clear, i will use virtual resolution from now on
@ferdinand
What's incorrect is the aspect ratio of the Background object or anything material that is in a Frontal projection
In the following screenshot you can see that on the border of the Safe Frames (turned them red for easier readability), the Background object stops at the border of the image
Here is the result after using the script with SetParameter() :
I hope the issue is clear now, the expected behavior would be that if the resolution changes, the background object should follow
@ferdinand
Here is the User action that fixes the viewport aspect ratio :
Hello,
I have a script that is used to update the resolution of the active document. Recently we implemented a way to get overscan size data (VFX work) and i'm having trouble with refreshing the viewport.
The issue resides in the fact that if you don't interact with the resolution slider or input something manually, the viewport show effectively the change with the Safe Frames but if there is an existing Background object/ Material with Frontal projection it will not update. Only an user interaction can help.
Here are some code snippets that i used to showcase the issue and what i tried in terms of flags/update/dirty states :
import c4d
import random
def main():
doc = c4d.documents.GetActiveDocument()
rd = doc.GetActiveRenderData()
bd = doc.GetActiveBaseDraw()
print(f"Render Data X_Res before : {rd[c4d.RDATA_XRES]}")
print(f"Render Data Y_Res before : {rd[c4d.RDATA_YRES]}")
print("-------------------------------------------------")
xres = random.randint(0, 1920)
yres = random.randint(0, 1080)
rd[c4d.RDATA_XRES] = xres
print(f"Render Data X_Res after : {rd[c4d.RDATA_XRES]}")
rd[c4d.RDATA_YRES] = yres
print(f"Render Data Y_Res after : {rd[c4d.RDATA_YRES]}")
print("-------------------------------------------------")
rd.Message(c4d.MSG_UPDATE)
rd.SetDirty(c4d.DIRTYFLAGS_ALL)
rd.SetDirty(c4d.DIRTYFLAGS_DATA)
c4d.GeSyncMessage(c4d.EVMSG_UPDATEBASEDRAW)
c4d.EventAdd()
if __name__=='__main__':
main()
import c4d
import random
def main():
doc = c4d.documents.GetActiveDocument()
rd = doc.GetActiveRenderData()
bd = doc.GetActiveBaseDraw()
print(f"Render Data X_Res before: {rd[c4d.RDATA_XRES]}")
print(f"Render Data Y_Res before: {rd[c4d.RDATA_YRES]}")
print("-------------------------------------------------")
xres = random.randint(1000, 1920)
print(f"Random X_Res: {xres}")
yres = random.randint(500, 1080)
print(f"Random Y_Res: {yres}")
# Set the new X and Y resolution using SetParameter
rd.SetParameter(c4d.RDATA_XRES, xres, c4d.DESCFLAGS_SET_USERINTERACTION | c4d.DESCFLAGS_SET_FORCESET | c4d.DESCFLAGS_SET_INDRAG)
rd.SetParameter(c4d.RDATA_YRES, yres, c4d.DESCFLAGS_SET_USERINTERACTION | c4d.DESCFLAGS_SET_FORCESET | c4d.DESCFLAGS_SET_INDRAG)
print(f"Render Data X_Res after: {rd[c4d.RDATA_XRES]}")
print(f"Render Data Y_Res after: {rd[c4d.RDATA_YRES]}")
print("-------------------------------------------------")
print("-------------------------------------------------")
rd.Message(c4d.MSG_UPDATE)
rd.SetDirty(c4d.DIRTYFLAGS_ALL)
rd.SetDirty(c4d.DIRTYFLAGS_DATA)
c4d.GeSyncMessage(c4d.EVMSG_UPDATEBASEDRAW)
c4d.DrawViews(c4d.DRAWFLAGS_FORCEFULLREDRAW)
c4d.EventAdd()
if __name__=='__main__':
main()
Video showcasing the issue :