Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
@zipit work fine thanks a lot
@zipit In this test, the modification works well, but the cycle button is not updated. I added c4d.EventAdd(), but in this case it runs in a loop Test2.c4d
@zipit Thanks. I test and keep you informed
Test.c4d
I have a UserData "MyData" of type Button Cycle and i would like to modify its contents, in python node
Thanks @PluginStudent
In a python node, is it possible to know how many inputs and outputs there are? and their name?
@Cairyn Thanks, all work fine for this module
@PluginStudent Your link is about the creation of a material (and that I already know how to do), not a render parameter.
But I have tound the solution.
shader = firstVP[c4d.VP_VRAYBRIDGE_ENVIRONMENT_BACKGROUNDTEX] if shader == None: shader = c4d.BaseList2D(c4d.Xbitmap) firstVP.InsertShader(shader) firstVP.GetDataInstance()[c4d.VP_VRAYBRIDGE_ENVIRONMENT_BACKGROUNDTEX] = shader shader[c4d.BITMAPSHADER_FILENAME] = "approaching_storm_4k.hdr"
Other question, how to remove it? I don't have found "DeleteShader" or "RemoveShader"
What's wrong in my code?
import c4d def main(): # check doc if doc is None: return # get the active RenderData activeRD = doc.GetActiveRenderData() if activeRD is None: return # get the first BaseVideoPost (Active Render) firstVP = activeRD.GetFirstVideoPost() if firstVP is None: return shader = firstVP[c4d.VP_VRAYBRIDGE_ENVIRONMENT_BACKGROUNDTEX] if shader == None: shader = c4d.BaseShader(c4d.Xbitmap) firstVP.GetDataInstance()[c4d.VP_VRAYBRIDGE_ENVIRONMENT_BACKGROUNDTEX] = shader shader[c4d.BITMAPSHADER_FILENAME] = "approaching_storm_4k.hdr" c4d.EventAdd() if __name__=='__main__': main()
Thanks to both of you I'll test all this tomorrow and let you know the result.
Hi all
How to change a rendering parameter for an external engine. For example for VRay: I know the pluginID. I would like to be able to change the environment parameter from a python xpresso node.
Work fine Thanks a lot Manuel
Here's the test I took. By putting my script in a python tag on my object, it works. But in an xpresso python node, nothing happens. Test.c4d
If you delete the tag, keeping only the xpresso node, it doesn't work.
Is it possible to deactivate user data or a tab from xpresso?
Hi I'll need that job too. To be able to refresh xpresso without having to provoke it with a mouse click.
@C4DS Although a solution has not been given (as I wish to do), explanations have been provided. I have therefore considered it resolved. For IRL reasons, I could not do so. I will be able to get back to it, and if I find THE solution, I will post it
Hi Sebastian,
Thank you for your response. I found the identifiers of the different VRay materials in the file c4d_symbol.h. Everything works.