Jump to content

kalugin

Regular Member
  • Content Count

    309
  • Joined

  • Last visited

  • Days Won

    8

kalugin last won the day on May 10

kalugin had the most liked content!

Community Reputation

80 Noble Beginner

2 Followers

About kalugin

  • Rank
    Cafe Ronin

Profile Information

  • First Name
    Alexander
  • Last Name
    Kalugin
  • C4D Version
    20.059 Studio
  • Location
    Ruse, Bulgaria

Recent Profile Visitors

3,387 profile views
  1. what are you trying to achieve ? Can you explain a bit more ?
  2. here's my take on it. You have two user data entries on the Python Generator. You need to input a null in the first one and the second entry defines the distance from the null, which the points will be deleted at. It's a bit slow, but I just made this up in a hurry so... point remover.c4d
  3. Ok, sorry man. Not messy, but too complicated :) It's hard to read what exactly is happening for someone that is not on track with the purpose of the code.
  4. The code is a bit messy. What's do you want to achieve actually ?
  5. Hey Kalugin -- you made this 'select similar geometry' script that had 'replace with render instance' as an option, first off -- I love it, and thank you SO much for creating this! It is really great for consolidating & simplifying scenes converted from other 3D engines, and stock models of rooms and architectural environments. (hundred of identical chairs, tables, lamps etc all scattered across a space) 

    The 'replace with instance' feature seems to no longer work with R20, would you be willing to update it for R20?

  6. import c4d from c4d import gui #Welcome to the world of Python def main(): doc.Flush() if __name__=='__main__': main() @Hrvoje but this empties the document. The script that he included basically deletes the UNDO memory buffer. import c4d from c4d import gui #Welcome to the world of Python def main(): doc.FlushUndoBuffer() if __name__=='__main__': main() @Duca here is the python version of your old script.
  7. well, that was a lot of comments. I'm glad that I have enough beer Fixed some issues while commenting. Random option was not working in picture viewer. Also fixed some other little bugs. Have fun. If any of the coders have any advice regarding the code - I'd be glad to learn some tips and tricks. Spacer.zip
  8. yeah, once I'm sure it works :) And I like to clean and comment the code that I share in the forum. That way it's more useful for everyone. I know when I started coding for c4d, how I was starving for someone to share anything to learn from
  9. unzip in your plugins folder :) Spacer.zip
  10. @Vizn Yeah, that's the idea :) I just need to fix some things and I'll share it.
  11. I've just started playing with the idea. I'll share the result when it's ready. But it is really basic cloner anyways. If it has some potential, maybe I'll invest more time to make it a full featured plugin.
  12. @Hrvoje this is not what @Vizn and @Cerbera are talking about. Or maybe I didn't understand :) I thought the idea was to get a result similar to this:
  13. if it's just a linear cloner it sounds like a fun little task :) I'll do it. Grid and radial will take more time.
  14. import c4d from c4d import gui def main(): selectedMaterials = doc.GetActiveMaterials() # create a list, containing the selected materials for material in selectedMaterials: # for each material in the list if material[c4d.MATERIAL_COLOR_SHADER] is not None: # check if the material has a shader in the diffuse slot. This could be written "if material[c4d.MATERIAL_COLOR_SHADER] != None:" or just "if material[c4d.MATERIAL_COLOR_SHADER]:" material[c4d.MATERIAL_USE_BUMP] = True # activate the bump channel texture = material[c4d.MATERIAL_COLOR_SHADER].GetClone() # get a copy of the diffuse shader filterShader = c4d.BaseShader(c4d.Xfilter) # create a filter shader in memory filterShader[c4d.SLA_FILTER_SATURATION] = -1 # desaturate the image filterShader[c4d.SLA_FILTER_TEXTURE] = texture # assing the texture to the filter shader filterShader.InsertShader(texture) # insert the texture to the structure of the shader material[c4d.MATERIAL_BUMP_SHADER] = filterShader # assing the filter shader in the bump slot material.InsertShader(filterShader) # insert the filter shader to the material structure c4d.EventAdd() # refresh C4D if __name__=='__main__': main() this works only for native materials and does not have an implemented UNDO :) have fun @Cerbera is right. This is a really basic solution. But widely spread, sadly :)
  15. http://blog.grooff.eu/ has some interesting experiments also just searching "cinema4d python" in youtube returns some good results. And you can always ask here for help at some task :) Have fun.
×
×
  • Create New...