Hi,
I wanted to check if this is not already possible, and also ask if you have any ideas for a possible alternative, other than making this UI in the viewport.
regards,
James H.
Latest posts made by JH23
-
RE: Transparency of GeDialog?
-
RE: Get the "Position" of a Polygon
Hi,
I wanted to ask, is there a way for this to be compatible with deformers or similar, I realized that the tag is not capable of drawing the location of the centers of each polygons altered by deformers, it is curious and I wonder if there is a way to solve it.
Cheers
James H. -
RE: access the layers in the shader layer
Hi @i_mazlov ,
This solves my problem, for now I don't think I have another question, and I could consider my problem solved, thanks.
cheers,
James H. -
RE: access the layers in the shader layer
Hola @i_mazlov ,
Yes, it is true, DESCFLAGS_SET_USERINTERACTION does not work with layers, any other contribution to the problem is appreciated, from this I have no other doubt related to this topic, I leave the file here as an example.
example.c4d
cheers,
James H. -
RE: access the layers in the shader layer
Currently my problem would only be the issue of the lack of updating, because now I know that I can change the boolean of the layer with LAYER_S_PARAM_ALL_ACTIVE , but the lack of updating persists, I really don't know what could be causing it is causing.
code example, using the booleans of the layer:import c4d def main(): doc = c4d.documents.GetActiveDocument() obj = op.GetObject() F = obj[c4d.ID_USERDATA,1] FM = doc.GetFirstMaterial() shd = FM.GetFirstShader() layer = shd.GetFirstLayer() i = 0 while True: if layer: if i == F: #layer.SetParameter(c4d.LAYER_S_PARAM_SHADER_BLEND,True) layer.SetParameter(c4d.LAYER_S_PARAM_ALL_ACTIVE,True) else: #layer.SetParameter(c4d.LAYER_S_PARAM_SHADER_BLEND,False) layer.SetParameter(c4d.LAYER_S_PARAM_ALL_ACTIVE,False) layer = layer.GetNext() elif layer == None: break i = i+1 c4d.EventAdd()
-
RE: access the layers in the shader layer
Hi @i_mazlov ,
I have another question and I want to take advantage of this situation to consult, I really also want to be able to change the float that measures the mixing force, (I also wanted to know how to access the rounding) and I could, but now my problem is that it really takes too long, because not to say that it does not react until I manually move this float.
Here is an example:
-
RE: access the layers in the shader layer
Hi @i_mazlov ,
Excuse me for the lack of research, if I usually check if there were similar cases but I don't think I was able to understand it well, thank you very much for showing me these examples, they were really helpful.
the code you wanted:import c4d def ChangeTexturePathOfLayer(layer = c4d.LayerShaderLayer, Vector = c4d.Vector()): bmpShader = layer.GetParameter(c4d.LAYER_S_PARAM_SHADER_LINK) bmpShader[c4d.COLORSHADER_COLOR] = Vector def main(): mat = doc.GetFirstMaterial() if not mat: return shd = mat.GetFirstShader() if shd.CheckType(c4d.Xlayer): ChangeTexturePathOfLayer(shd.GetFirstLayer(), c4d.Vector(0.458823, 0.278431, 0.164705)) c4d.EventAdd() if __name__ == '__main__': main()
I still don't know what c4d.LAYER_S_PARAM_SHADER_LINK does specifically
Well, within the documentation it is only mentioned that int is allowed as a parameter.
Cheers,
James H. -
access the layers in the shader layer
Hi,
Today I was trying to link or access the color within a sahder layer only with python, I know I can get it and change its parameter in the same sahder layer, but my question is more about how I can enter one of these and change its data , as in this case the color, or also the direction of a bitmap. -
RE: update error?
Hello @jferdinand,
Apologies for the delay, I examined your example some time ago and I suspect that it does not solve my problem, activating "frame-dependent" causes the update to stop, and it is present in animation again, my intention is to completely remove that delay, both in editor and in animation.