Hi @chuanzhen,
I wanted to say that it is confusing that it fails to create an automatic color when defining the use of icons with custom colors, I suspect a reason why this happens but I am not at all sure, I am still happy that this solution works for you, even so I would like to know if this is something planned or some kind of bug.
Cheers,
James H.

Posts made by JH23
-
RE: Change Icon Color parameter
-
RE: Change Icon Color parameter
Hello chuanzhen,
I tried this, you're right, it's strange, but curiously if a value is assigned to the color it manages to be created with the defined color without the need for interaction, this is a possible solution, even so I would like to know what could be happening.
Cinema_4D_72OIMo0GEM.mp4
Cheers,
James H. -
RE: update error?
I want to finish with this in case someone reads it. Years ago, I asked about the outdated methods when using these techniques. I tried to adjust the depth of the IK spline controls with the actual length of the spline itself. Today, I understand my mistake, as I was trying something that didn’t make logical sense. At the time, I thought it was the best option for what I was looking for.
In short, this was never a problem, and the low response time is normal because the length depends on the depth of the controls. I thought there would be a solution, but choosing this path was not useful.
In conclusion, what eventually satisfied my requirements was directly referencing the angles of the controls, meaning identifying how oriented each control is to another. I took this angle and used it as a factor to multiply by the depth. This model is much more logical and doesn’t have any flaws. At the time, I couldn’t think of a direct solution, but I didn’t want to leave this post like that. Thanks anyway, Ferdinand, for trying to help me.
Cheers
JH -
RE: Transparency of GeDialog?
Hi,
I reviewed your proposal, it works, but I still feel that ending up using external libraries ends up being a somewhat more uncomfortable problem than not having transparent dialogs, it would be nice if in a future version these details were possible, I have more questions but I prefer to open another thread or investigate better, I appreciate your response.Cheers,
James H. -
RE: Transparency of GeDialog?
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. -
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:
here the code (python tag)
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,1) else: layer.SetParameter(c4d.LAYER_S_PARAM_SHADER_BLEND,0) layer = layer.GetNext() elif layer == None: break i = i+1 c4d.EventAdd()
cheers,
James H. -
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. -
RE: update error?
I apologize, the translator does not help much, as I said, I created a spline chain, where the depth of its handles depends on the length of the spline, my problem was that when I did it with only xpresso, it showed errors when rotating, because it took time update.
thinking that the error was either hierarchy, the spline node, or how to order the xpresso I did the same thing but with a python tag, despite this the same problem was present.
import c4d #Welcome to the world of Python def main(): spline = op[c4d.ID_USERDATA,2] # spline object length = c4d.utils.SplineLengthData(spline) length.Init(spline) Long = length.GetLength() op[c4d.ID_USERDATA,1][10004] = Long /3.783 #[10004] = control depth 1 iKsplinetag op[c4d.ID_USERDATA,1][10014] = Long /3.783 #[10014] = control depth 2 iKsplinetag length.Free() c4d.EventAdd()
And speaking of the number "3,783" I used it only for my purpose as it corrected the strength of the depth of the controls
SplineL.c4d -
update error?
I was trying to include the login data inside the spline handlers but I had updating errors, I thought it was due to hierarchy but I ended up using python tags and still I had the same error, I don't know what's happening.
-
RE: Is it possible to change the mode of the Viewport without callcommands?
Hello @ferdinand
Thank you very much, I had no idea about that, I did know thatMpoints
orMpolygons
existed, but it always related to me withViewportSelect
, this answers my question, I will investigate more about this.