Jump to content


Regular Member
  • Content Count

  • Joined

  • Last visited

MighT last won the day on December 22 2019

MighT had the most liked content!

Community Reputation

24 Noble Beginner

About MighT

  • Rank
    C4D Cafe Junior
  • Days Won 2

Profile Information

  • First Name
  • Last Name
  • Location
    Hannover, Germany
  • Website URL

Cinema 4D Information

  • C4D Version

Hardware Information

    Intel Core i7-3930K, nvidia GTTX1070

Recent Profile Visitors

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

  1. Actually I think, the "Output" settings will not matter much here. Way more relevant are probably the settings under "Save". Stupid questions: Could it be, the target drive is full? Is the output path set in Render Settings under "Save" still correct? Does the output file already exist? Is it possible the rights/permissions C4D is running with have changed? I.e. running one day as admin, the other as user. Could you try to move the output file out of the way, before rendering?
  2. There's an issue with the undo handling. The AddUndo(UNDOTYPE_NEW) needs to be called after the insertion of the object. Here the docs (see the Note: "In case of creation... after insertion..."). Also AddUndo(UNDOTYPE_CHANGE), while it needs to be called before the actual change, it may only be called on entities which are part of the document. Think about it. The undo functions are functions of BaseDocument. The undo system wants to keep track of changes inside a document. For a change (matrix, parameter change,...) of an entity (entity, because it's the same for objects, tags, materials...), which is already part of the document, you call AddUndo() before the change, because C4D needs to back up the state before the change (simplified, it will copy the entity's BaseContainer onto the undo stack). For a new entity, though, it will need to keep some reference to the new entity, in order to be able to remove it on undo (simplified, internally it will store a BaseLink (sorry, link to C++ docs, BaseLink class does exist only in C++) to the new entity on the undo stack). This can only work´reliably, if the entity is already part of the document, as BaseLinks are always evaluated in a document context, so AddUndo() has to be called after the insertion. You may be of the opinion, I'm nit picking, because you script seems to be working. Yet, I'm not. Wrong usage of the Undo functions can severely damage C4D stability. For your script the steps are: 1) Create Null 2) Insert Null 3) AddUndo(NEW, Null) 4) Actually no AddUndo(CHANGE, Null) needed at all, as you just modify a freshly inserted object. Where would be the point in backing up it's initial state in the same undo step as its creation? If the user presses undo, the object will be removed, there's no use of C4D restoring the initial state prior to removal... Cheers
  3. Hi, I should be able to help. PM me, if you like. Cheers
  4. It sounds a bit, as if you use the output of the random node to feed it into some other object's (a MoGraph random field, maybe?) seed value. I doubt that's a good idea, even if I can not explain, why this should lead to the described behavior. Anyway, I tried the random node (scene below) and for me it's nice and stable. Even after scene reload, I do get the identical values per frame. Maybe I misunderstood something in your question? Cheers test_random_node.c4d
  5. On question 2: It wouldn't be too hard to write a script (or even a parametric object plugin) providing such a spline. As long as it may be linear spline (which might be sufficient with enough points) actually quite easy (same for other smooth types like Cubic, Akima or B-Spline). For a perfectly circular Bezier spline there may be some math involved to get the tangents right. Here's a small script, maybe doing something similar to what you want. For more, you'd need to detail more closely, what you need. import random, math import c4d RADIUS = 100.0 NUMBER_OF_POINTS = 20 # SPLINE_TYPE may be: # c4d.SPLINETYPE_LINEAR # c4d.SPLINETYPE_CUBIC # may lead to strange effects, if points get too close (for example due to too high SIGMA) # c4d.SPLINETYPE_AKIMA # c4d.SPLINETYPE_BSPLINE SPLINE_TYPE = c4d.SPLINETYPE_LINEAR GAUSS_DISTRIBUTION = True # GAUSS_SIGMA is a value greater 0.0, the closer to zero, # the less the points will be randomized around their position in an even distribution. # Too large values (somewhere > 0.2) may lead to strange point disttributions, # due to points being randomized "several times around the circle"... GAUSS_SIGMA = 0.1 def main(): print '' random.seed() if GAUSS_DISTRIBUTION: funcRnd = lambda center, maxOffset : random.gauss(center, GAUSS_SIGMA) else: funcRnd = lambda center, maxOffset : center + maxOffset * (random.random() - 0.5) PI2 = 2 * math.pi arcSegement = PI2 / NUMBER_OF_POINTS arcs = [] for idxPoint in xrange(NUMBER_OF_POINTS): arcPointEven = idxPoint * arcSegement arcRnd = funcRnd(arcPointEven, arcSegement) if arcRnd < 0.0 or arcRnd >= PI2: arcRnd = arcRnd % PI2 arcs.append(arcRnd) arcs.sort() spline = c4d.SplineObject(NUMBER_OF_POINTS, SPLINE_TYPE) spline[c4d.SPLINEOBJECT_CLOSED] = True if spline is None: print 'error' return for idxPoint, arc in enumerate(arcs): x = math.cos(arc) * RADIUS y = math.sin(arc) * RADIUS spline.SetPoint(idxPoint, c4d.Vector(x, y, 0.0)) spline.Message(c4d.MSG_UPDATE) doc.StartUndo() doc.InsertObject(spline) doc.AddUndo(c4d.UNDO_NEW, spline) doc.EndUndo() c4d.EventAdd() if __name__=='__main__': main() Note to forum moderators: The Python code highlighting color scheme looks a bit toxic to me... Cheers
  6. Sounds interesting. PM me, if Chris didn't jump onto it, yet.
  7. Right, sorry. Then I probably can't help it. Added a note to my original post.
  8. Tested with R21, I have no R16. For the Sample node to work a Field (replacing Falloffs in earlier versions) is needed. If you add for example a "Solid" Field to your Sound Effector it will start working. Cheers
  9. Unfortunately these flag's documentation is a bit "brief" and some are only used internally and/or are only valid at certain points in time. Next problem is, how is IsDirty() supposed to find out, who you are and when you called it last time (yes, in theory it would be technically possible, but I doubt also feasible)? I'm not a hundred percent certain (the PluginCafé certainly can give you a better founded answer), but I think, you won't get away without iterating the children yourself and storing/comparing the result from GetDirty(). You should also find lots of discussios already on this topic over in PluginCafé, you probably wouldn't even need to wait for an answer on your own question. Cheers
  10. Please, believe me, what you are doing is wrong and will risk stability of C4D. Just because you can get something to work somehow, it does not get correct. I won't argue here, it is this simple. You can believe me or continue with this route, but then you are on your own, at least from my side. You can ask the moderators of this forum, why I feel entitled to be so definite in this case. Or you can ask in MAXON's Plugin Café to get more or less the same answer (I'd bet quite a few beers on this).
  11. I'm sorry to be so direct. But this is plain wrong. You are really risking the stability of C4D. You can not use AddUndo() outside of Start/EndUndo(). And you shouldn't use AddUndo() inside of an Xpresso Python node. In fact you shouldn't make any scene changes from inside the Xpresso Python node. Period. And yes, I saw, that you try to limit the execution of the node with some "run" flag. But this doesn't change anything of what I said before. Without knowing more details I'd say, you should implement a Script (Menu Extensions -> Script Manager or in previous versions Menu Script -> Script Manager) or a CommandData plugin. Cheers
  12. Cairyn is absolutely right, it's neither possible nor would many users appreciate such a break with C4D's conventions. Even if the dialog is not docked, the user can expect all dialogs "behave" if she or he saves her/his layout. This has also been discussed in Plugin Café a few times. It's certainly better to design a dialog with this in mind. Cheers
  13. MighT

    Atom + c4dpy

    I have never used Atom, so I have unfortunately nothing to add. But did you try asking in Plugin Café, where MAXON provides free developer support? Cheers
  14. The message simply means, there is still an old render job running and it asks, if this should be stopped in favor of the new one, you just tried to start. I doubt this message has anything to do with the black image being rendered. In your object manager it looks as if you are using Corona Render (Corona lights). Could it be, you didn't switch the render settings to actually use Corona? In this case C4D's standard or physical renderer wouldn't find any light and the result would be pitch black. Or are those Corona Lights maybe just renamed (and icon recolored) standard lights? And Corona is not able to use them? Just thinking, because I have no and never used Corona render. Those screenshots don't help to help you at all. Rather provide a scene or at least some relevant information, if none of the above hit the nail. Cheers
  • Create New...


We are in the progress of finalising upgrade to Cafe 3.0. If you are experiencing issues, please change the default theme to Cafe 2.5 and thing’s should work again. We will notify everyone when we resolve all the issues.

It would be also great if you could report any issue you might have on your side so we can fix them. :cowboypistol: