Jump to content

thunderdoc

New Member
  • Content count

    13
  • Joined

  • Last visited

Community Reputation

0 Poor

Contact Methods

  • Website URL
    behance.net/flaviodiniz

Profile Information

  • First Name
    Flavio
  • Last Name
    Diniz
  • C4D Ver
    18.057 Studio
  • Location
    Brazil
  • Interests
    Hard Surface Modeling / Parametric Modeling
  1. Little help about recursive hierarchy

    wow @kalugin ! now I and everyone else who search the web for recursive hierarchy iteration will definitely understand how it works! THANKS!
  2. Little help about recursive hierarchy

    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
  3. Little help about recursive hierarchy

    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!
  4. 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 :/
  5. UV (Texel) Normalizer

    This is fantastic, thank!
  6. 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!
  7. The link is no longer active, can you please send another one? :-)
  8. 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
  9. 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 :-)
  10. 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 ?
  11. Parametric paneling research

    Nah, I don't need to model parametricaly everytime, I use more conventional modeling (subdivision modeling) but I like to learn different techniques, because who knows when I will need them! Maybe i'll start learning Python to create my own plugins, since Xpresso is a lot limited, I think... But no hurry, i'm already happy with the things C4D can do at the moment :) (but C4D still need completly new UV unwrap system xD) thanks for your response!
  12. Lately i'm starting to like parametric modeling and yesterday I was watching some techniques in this topic. I saw a video where a guy creates some kind of parametric paneling (in Blender) and I was thinking if I could achieve the same results in C4D. Unfortunately i'm not having good results yet, the closest I achieved is this: I think the optimal workflow would be: 1- Have a bevel deformer that allows open bevels, like 3DSMAX has open chamfer option: 2- Use extrude (cloth surface, py-extrude modifier or something like that). 3- Apply subdivision surface. Or in perfect world, a plugin that creates paneling using edges selection tag... but I cannot code. I think codding a plugin that does that is not that hard, I believe there's someway to detect the new polygons created from the bevel and make them disappear... anyway... I also tried the following sequence: But the explosion deformer doesn't allow working in a polygon selection which comes from a bevel deformer :-( So, anyone has any hint that could lead to successfully apply this technique in C4D?
  13. Knife tool not working properly

    I had these problems, but it is now fixed in R18.057 :)

×