Jump to content

MighT

Regular Member
  • Content Count

    45
  • Joined

  • Last visited

  • Days Won

    2

MighT last won the day on December 22 2019

MighT had the most liked content!

Community Reputation

20 Noble Beginner

About MighT

  • Rank
    Cafe Ronin

Profile Information

  • First Name
    Andreas
  • Last Name
    Block
  • Location
    Hannover, Germany
  • Website URL
    http://www.andreasblock.de

Cinema 4D Information

  • C4D Version
    R21

Hardware Information

  • CPU/GPU
    Intel Core i7-3930K, nvidia GTTX1070

Recent Profile Visitors

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

  1. 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
  2. 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
  3. 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
  4. Not directly, but there's a workaround. Create a User Data parameter on an arbitrary object. This parameter should have the same type as the data you want to display. Then simply use this User Data instead of the Result node ad have it displayed in the HUD. Another option is to convert the value to String and have a String User Data. Then you can get a lot fancier in formatting your data. Or you misuse a MoText or Text spline instead of the HUD to display data. Cheers
  5. MighT

    Xpresso Increment Node

    The pie is a lie. Sorry, couldn't resist.
  6. MighT

    Xpresso Increment Node

    My recommendation would be to make use of a User Data parameter as storage for the distance travelled and simply sum the distance per frame into this. For example it could look like so: The additional Time/Equal/Condition node group is needed to reset the distance on frame 0, otherwise it's pretty straight forward. The "Distance Travelled" port is the User Data parameter of type Real added to my travelling cube, but you could add this parameter to basically any other object or tag you like and see fit. And the scene: test_xpresso_distance_per_frame_3.c4d Cheers
  7. MighT

    Xpresso Increment Node

    It's hard to tell the issue from just this screenshot, without knowing more details, especially about "Travelinger"... Here's how I'd do it: And here's the scene file: test_xpresso_distance_per_frame_2.c4d Cheers
  8. Hi, such questions are probably better asked over at the Plugin Café, where MAXON provides free support for developers. Anyway, looking at the InstanceObject's __init__() function's documentation, it doesn't support a parameter to set the reference object, as you try to do it. Instead you could either set the "Reference Object" parameter like any other parameter or simply call the provided SetReferenceObject() function. Like so (the undo stuff is completely optional): import c4d def main(): if op is None: return inst = c4d.InstanceObject() inst.SetReferenceObject(op) doc.StartUndo() doc.InsertObject(inst) doc.AddUndo(c4d.UNDO_NEW, inst) doc.EndUndo() c4d.EventAdd() if __name__=='__main__': main() Furthermore, as you can see in my example, in Script Manager there are some global variables predefined (actually that's true for all places, where one can use Python in C4D, yet, the available ones and their content differ a bit): 'op' is the currently active object 'doc' is the currently active document ... So there's no need to use GetActiveObject() in this context. For more information I really recommend the docs and above mentioned Plugin Café as it already contains answers to loads of questions. One additional note: As you are using InstanceObject class, which got introduced in R20, you'd probably want to update your profile with the actual version of C4D you are using. This will help people tremendously in helping you. Cheers Edit: Fixed description of 'doc'
  9. You could make the Hemisphere editable (e.g. by pressing c) and afterwards it's just one click using Close Polygon Hole (in R21 in Mesh menu -> Add -> Close Polygon Hole, or press m followed by d). This results in an ngon closing the hole, which may or may not be desirable. I'm sure there are other more sophisticated ways resulting in more controllable topology, but I'll leave this to @Hrvoje (or one of the other pros in this forum). Cheers
  10. You may want to take a look at the Parent Constraint tag (or rather Constrain tag with Parent option set): Cheers
  11. You can't, there's only one Material Manager. But you may have noticed that in parallel to the Material Editor you also see your material settings in the Attribute Manager (yes, it looks slightly different, as the channels are organized in tabs). Attribute Managers you can have multiple and they can be locked in mode and/or entity they are showing. It can also be opened from Material Editor: In the Attribute Manager there's one more icon between the lock and the marked icon. The lock and this additional one are for locking mode and entity. See the online help for details. Cheers
  12. You could try the Push Apart effector. I guess. But difficult to judge without knowing the scene. But I'd definitely try that before any larger weapons. Cheers Sorry, I overlooked you are on R16. Push Apart effector is only available since R18.
  13. While I don't experience this issue, something like this could well be related to HiDPI and/or screen scaling (which has also been worked on for R21). So I guess anyone jumping onto this topic would like to get more information: OS? Screen resolution? Any OS screen scaling activated? Cheers
  14. Yes, I have been working for MAXON for four and a half years. Not sure about the specialist, though, probably rather something. And I sure have a good time Something like this can not work (not completely true, in Python there are means to pull it off, but that's a completely different ballpark). In short, you can not (as said above, in theory you could in Python, but not as simple as you did) create code from a string. The string itself (not the text represented by it) is an object and therefore, even if not immediately visible rather behaves like a variable. Leaving the quotation aside, you have written something like this: op[a + b] This is a simple function call on op. This is identical: op.__getitem__(a + b) So you have written: a = "c4d." b = bc[c4d.DESC_IDENT] op.__getitem__(a + b) b results from reading the description ID from the BaseContainer, basically an integer, lets say 42. Via type conversion a + b results in a string: "c4d.42" So, already it does not look as what you intended, probably something like c4d.PARAMID. But even if it resulted in a correct string, it's still a string, not code. For example c4d.DESC_NAME is a "constant" (lets keep it simple), in this case representing a reference to a integer value, namely 1. You tried to build the name of such a constant using a string. But instead of trying to interpret your string as the name of something else (I'd actually call it a symbol), it will simply pass the value (rather a reference to the value), which will then be interpreted as an integer (as that's what __getitem__() expects) by __getitem__(). Without going any deeper, please believe me the value of the string "c4d.PARAMID" is in no way 42 (the value assumed in the beginning). And without additional means there's no way for Python to know, that it should actually interpret the content of the string as code (or the reference to an ID) as you intended. Did I sufficiently confuse you? I could try to elaborate a bit more, e.g. via Skype, just contact me via PM. With sufficient interest also in a group. Cheers
  15. This is something, that would probably better be discussed in PluginCafé. Anyway, I'm not sure, I understand your first question. What kind of concatenation? And why? What's your final intent? Inside the loop you already have the DescID you need for parameter access: op[paramid] Your second question boils down to understanding DescIDs and DescLevels. I can't explain the entire concept here. There's some more explanation in the Python docs and I think, it's well explained in the C++ docs: Description manual and DescID manual. In short, with basic (or generic) datatypes (like e.g. integer, float, string,...) it's nice and easy. The parameter has an ID and a datatype, both stored in one single DescLevel. But what, if a datatype is more complex. Like a Vector, it consists of multiple float values. Is the type Vector or is it float? Here multiple DescLevels come into play. On the first level a Vector looks like a vector and then there's the second level describing the next lower level of the data type (every component of the vector is a float (or anything else, like a Vector of strings). For User Data it's basically the same. You have a complex data type (User Data), which needs more detailed explanation on the next level (actual UD ID, data type,...). The Description BaseContainer in the end just contains further details (name, value ranges, widget to use,...) needed to render the parameter in a Description Custom GUI (like e.g. used for the Attribute Manager). Long story short, maybe a few lines of code can shed some more light: import c4d def main(): if op is None: return description = op.GetDescription(c4d.DESCFLAGS_DESC_NONE) for bc, paramid, groupid in description: print paramid # see structure of DescIDs, user data has two levels (except for the root iuser data groups) if paramid[0].id == c4d.ID_USERDATA: # exclude groups (including the root one) from inspection if len(paramid) > 1 and paramid[1].dtype != c4d.DTYPE_GROUP: # the second DescLevel has the user data ID and type print 'User data ID/type:', paramid[1].id, paramid[1].dtype print 'Parameter: %s = %d' % (bc[c4d.DESC_NAME], op[paramid]) if __name__=='__main__': main() I hope this helps. Cheers
×
×
  • Create New...