Jump to content

thunderdoc

Regular Member
  • Content Count

    16
  • Joined

  • Last visited

Community Reputation

3 Noble Beginner

About thunderdoc

  • Rank
    Cafe Ronin

Profile Information

  • First Name
    Flavio
  • Last Name
    Diniz
  • Location
    Brazil
  • Website URL
    behance.net/flaviodiniz

Cinema 4D Information

  • C4D Version
    18.057 Studio

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Yes, indeed! I've been working in this tool for 3 months in my spare time ! Thank you very much @Igor ! Thank you, @bezo ! Yes! Although I don't know much about organic/character modeling/UVing, but it works very well: Thank you @C4DS! I've saw your plugins, I'm really happy I'm not the only one trying to develop tools in the area of UVW in C4D, haha! I did this plugin using Python and the API sadly doesn't expose much functions as I think it does in C++... I 'd like to do much more to improve my plugin, I'll probably do in the future as I learn more Python. The program really need to update its tools... let's pray to have something new in R22!
  2. My plugin FD UVToolkit has been released, it’s a plugin to make UV unwrapping easier in C4D ! As you may know, the native C4D UV tools are quite poor, and as I have to UV unwrap a lot of objects daily. So I made this plugin to make the workflow fast and intuitive! It Requires only three steps to UV Unwrap an object: Reset the UVW Tag. Highlight the edges you want the UV seams to be. Click to unwrap. And it’s done! Here’s a quick demo! There’s 8 new tools included in the package, get to know more about all of them and get the plugin, please visit: https://gumroad.com/l/jFoAv Flavio Diniz
  3. wow @kalugin ! now I and everyone else who search the web for recursive hierarchy iteration will definitely understand how it works! THANKS!
  4. Worked perfectly now @kalugin ! Now I'm going to read it a thousand times to understand what's happening in each line, I don't just want the code, I wan't to learn it xD
  5. Hi @kalugin, thanks for your help! Interesting the new def you're wrote, with that you can control very specifically when the iteration should stop. But it's still returning the rest of the objects, I tried reading very carefully to try to understand what is giving wrong results, but I couldn't :-/ Thanks again!
  6. Hi, I'm struggling a bit with recursive hierarchy iteration, I don't fully understand how it work but at least I can make it work in the entire object manager. But now I'd like to iterate thought all the child objects of the selected object only, like this: Here's my code: objchildren = [] #list of selected objs def recur_iter(obj): while obj: objchildren.append(obj) recur_iter(obj.GetDown()) obj = obj.GetNext() def main(): recur_iter(doc.GetActiveObject()) Currently, this is selecting every object under the object I've selected, it's not stopping in the Sphere.3. I also tried changing obj = obj.GetNext() to GetPred, GetDown, and even removing this line (which causes C4D to crash, lol) So, anyone cal help me to understand the theory behind a simple recursive hierarchy iteration code ? I watched and read all the tutorials in the web, but I can't understand yet :/
  7. ah, yes, I learned this recently! for obj in mylist... this assign a variable to each object in the list, obj can be any name :-) thanks!
  8. The link is no longer active, can you please send another one? :-)
  9. I didn't know I could use obj instead of the variable which get the active objects, worked very well! I just had to change the flags for GETACTIVEOBJECTFLAGS_CHILDREN, so the children of the selected objects are also grabbed ! I need to get used to some terms used in python/c4d, like, c4d. doc. obj. op. , etc... Thank you very much and sorry for bothering with that silly question xD
  10. Thank for your reply, C4DS, but it didn't work, Yesterday I tried the same thing you told me... using GetActiveObjects and using custom flags, but it gave the same error... The command InsertUnder seems to be not recognized anymore when I switch from GetActiveObject to GetActiveObjects.. Is correct to use objselected (active objects) before .InsertUnder or i'm making a sintaxe error ? Thanks again :-)
  11. Hi, I'm starting to learn Python inside C4D and got some exciting progress, but I'm struggling with a small detail. It's a simple script to create a null object and then move the selected objects under the null. The null object has its visibility in viewport and render turned off. it does work well when selecting one object and running the script, but when I select more than one object and try to run, the script return an error. Here's a GIF showing what happens: I suspect I have to create a list of the selected objects and for each of the selected objects I should to assign a InsertUnder command, but I'm not getting how it could be done or if it's the solution. Here's the code, I suspect the error is in the line 27 / 28. import c4d def checknull(): nullexist = doc.SearchObject('FD Backup') if nullexist == None: insertfdbackupnull() def insertfdbackupnull(): fdbackup = c4d.BaseObject(c4d.Onull) #Assign the FDBackup null object to a name: fdbackup. doc.InsertObject(fdbackup) #inset the FDBackup null object in the current document. fdbackupcolor = c4d.Vector(0.875, 0.2461, 0.3203) #The color of the FDBackup null object fdbackup[c4d.ID_BASELIST_NAME]='FD Backup' #Rename the FDBackup null Object. fdbackup[c4d.ID_BASEOBJECT_VISIBILITY_EDITOR]=1 #Set the viewport visibility of the FDBackup null object to off. fdbackup[c4d.ID_BASEOBJECT_VISIBILITY_RENDER]=1 #Set the render visibility of the FDBackup null object to off. fdbackup[c4d.ID_BASEOBJECT_USECOLOR]=2 #Enable FDBackup null color. fdbackup[c4d.NULLOBJECT_ICONCOL]=True #Enable FDBackup null icon color. fdbackup[c4d.ID_BASEOBJECT_COLOR]= fdbackupcolor def tonull(): nullexist = doc.SearchObject('FD Backup') #check if the FDBackup null object exists. if nullexist != None: #if the FDBackup null object is foundo, then... fdnull = doc.SearchObject('FD Backup') #get the FDBackup null object. objselected = doc.GetActiveObject() #get the active selected object objselected.InsertUnder(fdnull) #insert under the FBDackup null object. if __name__=='__main__': checknull() tonull() c4d.EventAdd() Error returned when selected more than one object: I have tried to change the lines 27 and 28 to the following, but no success... fdnull = doc.SearchObject('FD Backup') #get the FDBackup null object. objselected = doc.GetActiveObject() #get the active selected object for obj in objselected: #for each object selected objselected.InsertUnder(fdnull) #insert under the FBDackup null object. error returned: Does anyone have any hint of what is happening and how to solve it ?
×
×
  • Create New...