Jump to content

kweso

Premium Member
  • Posts

    265
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by kweso

  1. Doesn't seem to work for the H-Value of a HSV-Color...
  2. Ah, will try that 😄 In the meantime i did this: import c4d import colorsys from random import random def main(): doc = c4d.documents.GetActiveDocument() doc.StartUndo() doc = c4d.documents.GetActiveDocument() materials = doc.GetActiveMaterials() for mat in materials: hhh = random() sss = random()/2+0.5 vvv = random()/2+0.5 colr = colorsys.hsv_to_rgb(hhh, sss, vvv) mat[c4d.MATERIAL_COLOR_COLOR] = c4d.Vector(colr[0], colr[1], colr[2]) doc.EndUndo() c4d.EventAdd() if __name__=='__main__': main()
  3. Hi, with "parameter tokens" I mean this: This is very nice in theory. But unless I am terribly mistaken, "rnd(value)" sets the same random value to every selected objects property. Which is completely besides the point. I am perfectly capable of thinking of a single random number myself. Is there another way to give 40 different (and existing and selection-assigned) materials randomly different values in Color/Color/H? Thank you very much, KWS
  4. You found the right place. I saved so much time because people here helped me.
  5. Oh... this is actually very prominent in "my activity streams". Sorry for this embarrasing post... 😬 Yes... 🤪
  6. Just found a very little button to this path: https://www.core4d.com/ipb/discover/unread/ just bookmarked it. Maybe this should be more prominent... laters
  7. Hey all, I know, there is the "latest activity" section below each post. But I think if there was a longer version of the same thing somewhere on top level of this sites navigation, I would easily become more involved with this community. Just a suggestion... Laters, kws
  8. exept uv-editing. would not want to miss the new tools... but as @Cairynsaid: blender seems to be quite the high quality tool these days...
  9. kweso

    arnold toon

  10. Servus Fritz! Thank you very much! There's a lot in your solution that will help me also in future projects! And thanks for the link to the maxon forum...
  11. Hey all! I hope this is the correct section to post this question. I built myself a little script that allows me to boole multiple objects in one go: import c4d from c4d import gui def main(): doc = c4d.documents.GetActiveDocument() doc.StartUndo() #Don't know if this works like this at all selected = doc.GetActiveObjects(1) while len(selected) > 1: newBool = c4d.BaseObject(c4d.Oboole) doc.AddUndo(c4d.UNDOTYPE_NEW, newBool) doc.InsertObject(newBool) newBool[c4d.BOOLEOBJECT_SINGLE_OBJECT] = True newBool[c4d.BOOLEOBJECT_TYPE] = 0 tmpA = selected.pop(0) tmpA.InsertUnder(newBool) doc.AddUndo(c4d.UNDOTYPE_CHANGE, tmpA) # ??? tmpB = selected.pop(0) tmpB.InsertUnder(newBool) doc.AddUndo(c4d.UNDOTYPE_CHANGE, tmpB) # ??? doc.SetActiveObject(newBool) c4d.CallCommand(12236) doc.AddUndo(c4d.UNDOTYPE_CHANGE, newBool) # ??? newerBool = doc.GetObjects()[0] selected.insert(0, newerBool.GetDown()) c4d.EventAdd(c4d.EVENT_FORCEREDRAW) doc.EndUndo(); if __name__=='__main__': main() Doing this, I thought it would be time to learn about "AddUndo". But it does not work like I thought it would. Would someone be able to point me in the right direction? WARNING: The script like it is now CHRASHES my c4d... If you'd like to use the script delete all "UNDO"-lines. Then it should work. Tyvm! kws EDIT: Yes, I know Booleans are the Crocs of modeling. But for my current task they really speed up my workflow...
  12. Thank you for the solution. Somehow this option must have been active by default on my previous projects. Never used it. Anyway, your are right. There's major clipping goning on when my basket is deforming. I'll animate the position and orientation of my parented object as a quick workaround.
  13. The "badges" should resemble metal plates. Therefor they schould not bend with the "basket" surface. But I still want them stick to it. And orient accodingly... So I think they way to go is clamp constraint (which I dont like due to its unpredictability) or the xpresso solution. At least the position worked for me in previous projects. And I can't see, why it does not now... Thanks anyway. I'll use the surface deformer as a last resort...
  14. Hey all, I have something that should resemble a soft fabric basked (attached to a baby stroller): I use a lowpoly-mesh with a pose morph to deform the thing like it would be folded: Then I have to "badges" that should be attached to the side: But not only does the orientation not work. Also the badges do not follow the deformation. That always worked for me in other projects. Would someone have an idea on how to let the badges follow the deformed mesh in position AND rotation? I know, I could try a clamp constraint. But those always seemed unstable to me in the past. Here`s the c4d (If someone had a spare minute or two): https://drive.google.com/file/d/1Q1ggE4ixOV7qwD6uXMKgGagxJ3Gl77T_/view?usp=sharing Thank you so much in advance! KWS
  15. Now I switched from python to xpresso: But it only works with the last clone. The others seam to add up weight so they have weights of way over 1 even when they're suposed to have 0. Maybe one of you guys can see why. TYVM! kws CloneVel2Weight_Python_Test.c4d
  16. Hey, is there an equivalent of after effects "valueAtTime" in xpresso and/or python in C4D? tyvm!!
  17. Er, quite embarassing. Of course. Didn't see the wood for the trees.... Thank you very much! While I have to say: Rotating B scales X. Strange...
  18. Hey, I got two (later maybe more) objects with different global positions, scales and rotations. Now I'd like to have an additional object that sits between those objects with position, scale and rotation all right in the middle of the others. import c4d def main(): bbb = doc.SearchObject("B") aaa = doc.SearchObject("A") xxx = doc.SearchObject("X") bMG = bbb.GetMg() aMG = aaa.GetMg() xxx.SetMg(bMG*aMG) The "*" is obviously wrong. How would i calculate the average of the Mg's? tyvm, kws
  19. hey, i thought it would be possible to bake a texture directly to an other shader via python without having to save a file / files to the harddisc... realtimeIllumBake.c4d I guess I hit a wall there. But if anyone would have some input, I would highly appreciate it! tyvm, kws
×
×
  • Create New...