Jump to content

Cairyn

Regular Member
  • Content Count

    249
  • Joined

  • Last visited

Cairyn last won the day on July 5

Cairyn had the most liked content!

Community Reputation

137 Great

About Cairyn

  • Rank
    C4D Cafe Junior
  • Days Won 7

Profile Information

  • First Name
    Ronald
  • Last Name
    Klemp
  • Location
    Germany
  • Website URL
    https://www.patreon.com/cairyn

Cinema 4D Information

  • C4D Version
    R21

Hardware Information

  • CPU/GPU
    .

Recent Profile Visitors

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

  1. (As this is discussed on PluginCafé, I'll just mention that I believe it's a bug in the Python matrix inversion. I just posted a screenshot there; it's easily reproductible.)
  2. Great. So, you know more about Python than you gave yourself credit for
  3. To retrieve the actual descriptions for the user data, you can use GetUserDataContainer() on the object. However, with not much knowledge of Python and probably not much knowledge of the C4D API, this is quite a challenging task for you. You need to know about BaseContainer, DescID, DynamicDescription and other foundational concepts. I don't have a simple one-liner that would change the status of a user data field.
  4. Sure is... use a Python tag, search for the "other" object, assign parameter values from the other object to the tag's object... simple, but you will need at least a little Python knowledge. (Also, you need to look out for priorities; the source object needs to be evaluated before the tag.) Here's some simple code that connects the y position of the tag's object (a sphere, but it doesn't really matter) to another object called "Cube". Move Cube and Sphere will follow in y direction with an offset of 200 units. import c4d def main(): myCube = doc.SearchObject("Cube") mySphere = op.GetObject() if myCube == None or mySphere == None: return mySphere[c4d.ID_BASEOBJECT_REL_POSITION,c4d.VECTOR_Y] = myCube[c4d.ID_BASEOBJECT_REL_POSITION,c4d.VECTOR_Y] + 200.0 For the parameters, just use drag and drop of a label into the Python console. ---------- Learn more about Python for C4D scripting: https://www.patreon.com/cairyn
  5. Oh, that commandline. But since it does not have a GUI, I wouldn't expect anything to work that depends on GUI features. If there is no view window, there is no drawing area. I'm actually surprised that GetActiveBaseDraw wouldn't plainly return None under these circumstances, but maybe the object is needed for something internally. I'd suspect the whole OpenGL environment is not initialized as it normally is with a GUI, and that none of the "interactive" methods will work. But that's something you'd need to ask the developers directly on PluginCafé.
  6. >>> bd = doc.GetActiveBaseDraw() >>> print bd <c4d.BaseDraw object called 'Perspective' with ID 110305 at 0x0000025EA376C6B0> >>> print bd.GetSafeFrame() {'cr': 1566, 'ct': 0, 'cb': 845, 'cl': 61} >>> print bd.GetFrame() {'cr': 1626, 'ct': 0, 'cb': 845, 'cl': 0} >>> seems to work for me, but this is R21. I don't actually get your issue, what are you trying to do and why do you need a BaseDraw in the command line...? What script did you run? didn't what in Gui console? Your text seems incomplete...
  7. Looks as if your object breaks apart on the edge, which means the polygons are not connected. Use the optimize command until the edge points are welded properly. (You probably generated the leaf from an extrude; there should be an option that automatically connects the caps with the edge. In R21, this happens automatically.)
  8. The field is a string so using an empty string or a "somethingortheother" string is quite correct for this specific purpose. The reason why this is a string and not a link is, you can put in symbolic and inherited textures that are "found by name", e.g. "R1" which exists only in the virtual object hierarchy. I actually wish there were a different way to switch off selected texture tags in C4D - after all, you may have a valid selection, which you would need to restore after having a temporary invalid selection in that field for a while... this can be cumbersome.
  9. You can't. While polys and points exist as object data, edges are just the connection between two adjacent points on a polygon. Without polygon information, there is no edge. You can create a linear spline from the edge, of course. But that's not the same as an edge collection.
  10. It is hard to say whether upcoming releases will be backwards compatible. So far, C4D file formats were fairly nice (except plugins that didn't obey the rules) and were compatible for many years. C4D just got rid of a lot old file format baggage, so we may be able to look forward to a long period of compatibility again. There's no guarantee that this will stay that way, though. There is always the possibility that for technical reasons (new important fields or data formats) a newer file will not load in the old versions any more, or load but with a huge loss of information. There is also the possibility that the format will be changed intentionally to force people to upgrade to subscription, although this would generate so much negative backlash that I doubt it will be done. Question is, if you can already tell that you may need to go back to an existing Perpetual, why would you subscribe at all? You could not (or only temporarily) use any of the fancy new things, as they will be lost when you go back. The only advantage would be speed optimizations and bugfixes.
  11. McGavran JUST said "no hand-in of perpetual" in the above post. So, this is absolutely the case at all. The subscription is an additional, new license.
  12. Use the X-Manager on the left side. You can drag and drop the tree elements there, even into a different XGroup.
  13. I do have the feeling that MAXON intentionally left a gap there to allow for future non-size-specific options (like, "Use glaremblorg algorithm to auto-size"). It is unlikely that there are specific sizes missing; less than 64² pixels would be a bit stingy Since these are enums internally, a continuous number range is not necessary from a programmer's standpoint, although it's often desired. The quickest way to get a list of options is to open the script log, then just select one option after the other. The script log will show the option numbers, so no awkward repeated drag and drop is needed. -- In this case, the script log doesn't show any symbolic constants for the results, just the numbers, and doesn't show the option text in the comments, which would be nice. But Create Script doesn't do that either.
  14. import c4d from c4d import gui def main(): if not op: print "No single selected object" return childlist = op.GetChildren() if not childlist: print "No children to select" return for index, node in enumerate(childlist): doc.SetActiveObject(node, c4d.SELECTION_NEW if index == 0 else c4d.SELECTION_ADD) doc.GetActiveObject() c4d.CallCommand(16768) c4d.EventAdd() if __name__=='__main__': main() ---------- Learn more about Python for C4D scripting: https://www.patreon.com/cairyn (totally an advertising post, yeah)
  15. True, that, about the same. It's a very simple script after all. Materials can have user data, though, which would make it possible to script someting like: - if the script is run, and the material doesn't have any user data, it will add a checkbox "override" set to False, and set the texture size to whatever you hardode. - if the material already has that checkbox, it will look at the value and determine whether to set the desired value (override) or keep the manually set value (not override) That way, each material in a scene would remember whether to obey the next script run, or keep a manually changed value. (I'm sure there could be even better ways to automate, but I'm too lazy to think about them now .)
×
×
  • Create New...

IMPORTANT INFO:

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: