Jump to content


Regular Member
  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Noble Beginner

About WusikiJeroni

  • Rank
    Cafe Ronin

Profile Information

  • First Name
  • Last Name
  • C4D Version
    19.053 Studio
  1. Solved. LaunchUpdate() helped me
  2. I get the same issue. The script gives only previous data (randint limit). I know why, but I don't know how to get an active data. def message(id, data): if id == c4d.MSG_DESCRIPTION_COMMAND: randomButtons = [5] #Random buttons Ids buttonID = data['id'] SubList = [] #container storing id's values to have to changing SubList = randomId_new(SubList,[3,4])#filling the container if buttonID[0].id == c4d.ID_USERDATA:#check for user data for RandomButtonId in range (0,len(randomButtons)):#loop for each button if buttonID[1].id == randomButtons[RandomButtonId]:#check button ID for SublistId in range (0,len(SubList[RandomButtonId])): RandomLimit = 0 #limit for randint for id, bc in op.GetUserDataContainer(): if (id == c4d.DescID(c4d.DescLevel(c4d.ID_USERDATA, c4d.DTYPE_SUBCONTAINER,0), c4d.DescLevel(SubList[RandomButtonId][SublistId]))): #check id cycleBC = bc.GetContainer(c4d.DESC_CYCLE) for element in cycleBC: #define len of cycleList RandomLimit += 1 op[c4d.ID_USERDATA,SubList[RandomButtonId][SublistId]] = randint(0,RandomLimit - 1) #generate random value print(str(SubList[RandomButtonId][SublistId]) + ': ' + str(RandomLimit)) #checking to console
  3. Maybe, agree. Okay, I make a character generator (face gen, Daz3d, etc). I made a draft and I got over 300 userdata components. It's just WOW. I'll be freaked out to coding each component and I try to automate it in code. So, let's we stop for now. I still try to use suggested message function and if I will get a failure I add comments to my code and will share it here, okay?
  4. Messy? Why? The code carefully sorted to classes and functions. At least I wanna do that. What do I want to achieve? - So, for this step, I wanna make needed automated classes and functions for fast creating userdata components in further time. upd: I've got an answer on another forum. They suggested to me to use message () func. I try it.
  5. Seems I've understood why I get the issue. I put random class before object class and it works 'cause in this code, I get an active object before getting random value. But it is doesn't correct in point of view of the code. Ways to generate active object after generating random?
  6. Hello everyone. There are a few classes. One for choosing an object in the CycleList. Two for choosing a random object via change c4d.userdata value One works fine. But when I choose a random object I need to click on the viewport to update showing object. How to update viewport without clicking? I also have tried on the random class: c4d.EventAdd() c4d.CallCommand(12147, 12147) c4d.DrawViews( c4d.DA_ONLY_ACTIVE_VIEW|c4d.DA_NO_THREAD|c4d.DA_NO_REDUCTION|c4d.DA_STATICBREAK ) It doesn't work. Object class: if (config['hideState'] == True): #hide selected object for indexObjectHide in range (0, limit): if (indexObjectHide == self.userdataGroup[c4d.ID_USERDATA,userDataId]): self.parentObject.GetChildren()[indexObjectHide].SetEditorMode(2) self.parentObject.GetChildren()[indexObjectHide].SetRenderMode(2) else: self.parentObject.GetChildren()[indexObjectHide].SetEditorMode(1) self.parentObject.GetChildren()[indexObjectHide].SetRenderMode(1) Random class: if (self.userdataGroup[c4d.ID_USERDATA,userDataId] == True): #If random button clicked SubLists = [] for ListIndex in range (0,len(config['Random id'])): SubLists.append([config['Random id'][ListIndex]]) indexList = [] for indexEl in range (0,len(SubLists)): for id, bc in self.userdataGroup.GetUserDataContainer(): cycleBC = bc.GetContainer(c4d.DESC_CYCLE) if (id == c4d.DescID(c4d.DescLevel(c4d.ID_USERDATA, c4d.DTYPE_SUBCONTAINER,0), c4d.DescLevel(SubLists[indexEl][0]))): for element in cycleBC: if (len(indexList) == indexEl): indexList.append([element[0]]) else: indexList[indexEl].append(element[0]) self.userdataGroup[c4d.ID_USERDATA,SubLists[indexEl][0]] = randint(0,len(indexList[indexEl]) - 1) #Change userdata values self.userdataGroup[c4d.ID_USERDATA,userDataId] = False You can see full in the attached c4d file. Pls help me For better understanding what I want, watch the video: Experieces.c4d
  7. Thanks, It's a pity, but I've made a ticket #InWaitingOfAnswer
  8. Hey everyone. I get 0.5-2 fps in sculpting when polygon count matches 10 or 15 million. But in Zbrush, Mudbox and even in Blender there is a better performance. Are there probably any limitations 'cause my hardware doesn't even overload? My specs: Amd 2600x RTX 2070 32GB RAM
  9. Seems, I've found another way how can I make what I want. Do you know how to change user data by definite id via Python tag? Thanks in advance
  10. Hello again/ Thanks for the reply. Sorry for dumb question, c.o.f.f.e.e is closer to me, but how to transfer variable value from func. Can u help me? I just wanna make button trigger. Main() can't get value from additional func although there is a global variable Just open the file and u'll understand. Python.c4d
  11. Hello everyone. I have python tag and xpresso. How can I get the variable from Python tag in xpresso? I get an error in console “SyntaxError: can’t assign to function call”
  12. If I convert mesher/instances to just editable objects I can't bake with cubic projection. It bakes only with an original projection (20 objects with same UV for example). If I connect that to a single object I can't use variation shader. Added: Seems I found a solution and it works but I still wanna bake objects without this way. One question - how!!!
  • Create New...