Jump to content

dast

Premium Member
  • Posts

    1,283
  • Joined

  • Last visited

  • Days Won

    68

Everything posted by dast

  1. When I started creating this plugin there were a few features I had in mind, but simply could not find a way to provide these. And while this plugin is no rocket science (far from it), things require quite some tricky solutions now and then. Luckily, I seem to be getting smarter day by day ... yeah, I wish! Still, features I didn't quite know how to implement then, seem to be feasible now. A result of this is that I now have introduced an "auto setup" for assets, which -in theory- should work for most of the assets people are creating. In occasions where the auto setup fails to detect the necessary base and orientation, extra tools are provided to make the manual set up more user friendly. Here's a demonstration video of the latest alpha version I am working on, before going to beta: Another "feature" of this version is a change in library format. Each library used to be a single Cinema 4D scene file, making sharing and distributing single assets a nightmare. I have reworked the whole plugin to work with separate asset files instead. A conversion utility is part of this newer version to convert from the old format to the new one. There is however a major drawback on this new way of storing assets. Cinema 4D takes about 70 to 100 milliseconds to load a scene file. No big deal, you would think. But what if a library consists of 50 assets? That would then take approx. 5 seconds to load and display. Trust me, 5 seconds is a very long time to wait after you selected a library. As such, I also had to introduce a caching mechanism to reduce the loading time of libraries again and again. You'll only have to wait the first time a library is selected. Next times, it should like in a blink of an eye. Next to these changes, the usual bug fixes and optimizations ... no big deal ;) Public release of this new version will be announced when beta-testing has been completed. Thanks for reading.
  2. Haven't used Xpresso lately, but there is a Memory node, if I recall correctly, which allows for a history level.
  3. The error you get in the console should help you understand what is going wrong. You are trying to call "InsertUnder" on the wrong object. When you used "GetActiveObject" the function returned you a c4d.BaseObject. By switching to "GetActiveObjects" the function then returns you a c4d.BaseList2D of c4d.BaseObject. The function "InsertUnder" is not available on the c4d.BaseList. As such, you need to iterate over each c4d.BaseObject in the returned list objs = doc.GetActiveObjects(flags=c4d.GETACTIVEOBJECTS_0) for obj in objs: obj.InsertUnder(pred) where "pred" is your null, or preferably the last child inside the null (so to provide appropriate ordered children inside the null)
  4. I didn't read the whole code, but using GetActiveObject does only work when a single object is selected. When multiple are selected it returns None. You should be using the GetActiveObjects(flag) Try following script with one and then two objects selected, and notice the difference. import c4d def main(): obj = doc.GetActiveObject() print obj objs = doc.GetActiveObjects(flags=c4d.GETACTIVEOBJECTFLAGS_0) print objs if __name__=='__main__': main()
  5. Just for completeness, and future reference, I will include the answer I provided on your same thread over at the plugincafe. Having explained that the best option was to rename the tag after it was created, of course, you need to be able to obtain the created tag. Which obviously cannot be done directly from the callcommand. So I came up with following code. Maybe not the best approach (I am not a Python developer). import c4d def main(): doc = c4d.documents.GetActiveDocument() obj = doc.GetActiveObject() tags = obj.GetTags() c4d.CallCommand(12235, 12235) newtags = obj.GetTags() newname = "NewName" for tag in newtags: if tag not in tags: # this is your newly created UVW tag # rename it tag.SetName(newname) c4d.EventAdd() if __name__=='__main__': main() Basically, you get the list of tags applied to your object, then perform your callcommand to generate the UVW tag. Then you get the list of the tags after. The difference between the tags after and before your callcommand will give you the UVW tag being created. Then it's simply a matter of setting its name. Notice that I left out validation code, checking if an object was selected ... and such things as error checking.
  6. As explained the code I provided gets the first UVW tag. Have a look into the Cinema 4D Python SDK documentation how to obtain the second UVW tag. In your case (when you want the second uvw tag), use the index value 1 (since zero-based). As such you will need to write: uvwtag = obj.GetTag(c4d.Tuvw, 1) But in some situations the tag you need won't be the second one. As a result you'll probably have to find a way how to make sure that the obtained uvw tag is the one you need. Coming back to you original question, where you mention that you are able to create an UVW tag, but are unable to rename it. If you create a tag, you should store the created tag in a variable, which you can then use to rename it. Much simpler than trying to get to the appropriate tag afterwards. So, when you create it, get a "pointer" to it, and rename it via its "pointer".
  7. If it changes the texture tag's name, that means you have that tag selected, as your function tag() return the currently selected tag. Try the next piece of code instead. It gets the currently selected object from your scene and gets the first UVW tag of that object, then renames it to "NewName". import c4d def main(): doc = c4d.documents.GetActiveDocument() obj = doc.GetActiveObject() if obj == None: return uvwtag = obj.GetTag(c4d.Tuvw) if uvwtag == None: return uvwtag.SetName("NewName"); c4d.EventAdd(); if __name__=='__main__': main()
  8. use the SetName() function on your tagm, as in: tag().SetName(newName)
  9. The product page doesn't contain the version number, since I have no access to update/manage the store pages. For every change in product description I would need to contact the owner of the C4DCafe website to make these changes. As such, I had decided not to include any reference to plugin version number, as this would require more maintenance for store owner. When purchasing the plugin via the C4DCafe Store you actually only purchase the license. As mentioned in the product description you then contact me via PM or e-mail (preferably e-mail) with the necessary information to complete the order, upon which you will be sent the latest version of the plugin. Which currently is 1.2
  10. Here's a scene file I created more than 10 years ago (time flies) which I used to insert greenscreen keyed video footage into 3D environments. With the use of the userdata I could then move the keyed live action character into my 3D scene. I extensively used this setup for a short story I created. Camera_Resize_RefPlane.c4d
  11. Happy New Year, and congrats with the 50000 members.
  12. For a start your XGroup is set to disabled, hence the reason you don't get any motion. Uncheck the disable flag (right mouse click on the XGroup in the Xpresso editor). From then on your XPresso will at least be evaluated, which wasn't the case now. Secondly, your second input of the math:multiply is now set to 0. I still don't quite get why you would want to multiply. Instead, I would expect a Modulo function using the time it takes for your disc to perform a full revolution.
  13. Then I suppose there's something else going wrong. Please upload the scene file so we can investigate what the issue is.
  14. What is the result you get now? Do you have motion in the body or not? The unit of movement depends on your project settings. When your scene settings (scale) is set to 1 centimeter the values 15 and 50 will be seen as cm. Notice in your xpresso that you use 0 and 1 as range mapper input. This means that any input value between 0 and 1 will be interpolated from 15 to 50. I assume the problem is with your range mapper input. The time node outputs a value depending your project settings. When this is set to 30 FPS, then each frame is 1 / 30. Which means that after 30 frames you reach the max limit of the range mapper input (1).
  15. The official release of version 1.2 had been delayed but has now been finalized. New in version 1.2: - resizable thumbnails - filtering of assets - use edge selections or polygon selection to insert assets - insert asset multiple times at once - improved material handling on assets - merge point/edge/polygon selection tags by name - insert asset into scene at world's origin without host object or edge/polygon selection - removal of coinciding polygons - new "on surface" positioning option - added support for tags of type point/edge selection, XPresso, vertex map
  16. This is just a pointer in the right direction, not a complete solution. You can assign a Python tag to your instance and implement the checking there as follows: import c4d def main(): # 'op' is an internal defined variable # which represents the current "object", # in our case the Python tag if (op): # get the object hosting the Python tag hostObj = op.GetObject() # check if hostObj has a parent # and if it is a null parent = hostObj.GetUp() if parent and parent.IsInstanceOf(c4d.Onull): # do whatever is needed print "parent is null"
  17. dast

    Cube on a dynamic rope

    Here is quick example: dynamicRope with cube.c4d I am using two nulls which I assign via your Xpresso node the position of the end point and the penultimate point, or as in your example the first and the second points. The end point I assign an Aim constraint tag (a look-at tag would work as well), an make it aim at the other null The end null is thus always pointing towards the previous one. I then made the cube child of that end point, and that's it. Note that you can "implement" the Aim constraint in the Xpresso node if you want to. "Simply" use some trigonometry functions, etc. ... but I'll leave that up to the reader.
  18. dast

    Cube on a dynamic rope

    A point does not have a rotation nor orientation. One solution is to introduce an additional point into the equation. Assume a spline, where you want the cube to follow the last point. The first point on a spline is at 0% while the last point on the spline is at 100%. Say you introduce an extra point at 99%. The vector from this point to the last point will give an orientation ... but only for 1 axis (let's say the Z-axis). You then still need to find a way to indicate what is its Y and X axis.
  19. Note that the Vegas Pro provided is version 14, and the "Edit" version. Vegas Pro 15 Edit is available at $149 on their website. The humblebundle thing might still be a legitimate version. Just wanted to mention it's not the latest and top trier version.
  20. As Cerbera I would also have though to simply copy the UVW tag from your original mesh to your rigged mesh. If point count and polygon count AND the polygon indeces are the same between the 2 meshes, the copying of the UVW tag should work. I downloaded your two meshes and had a look, and can tell that the polygon indeces are completely different between the two meshes. As such, I have no idea how you would want to map the UVs of one mesh to the other. How did you end up having these differences between the two meshes. Did you do some polygon reduction or other changes for the two meshes to "drift" apart in polygon and point indeces? I see Cerbera replied will writing my reply.
  21. I have tried the plugin with R16.050 Studio and all seems to work fine, an as expected. What I did was: - create a cube select a face and apple "Set Selection". Did this for 3 separate faces resulting in 3 selection tags - created 3 materials, assigned them all to the cube, and dragged each selection tag into a separate material link. Performed the "SelectionToObject" and got a null object named Cube, with 3 child objects, each representing one of the selected faces with the appropriate material applied.
  22. dast

    python does not work

    I tried with a freshly installed R15.064 Created a default python script via the script manager, which does shows the message on execution. It's not a known bug, and I don't think there is a switch to be activated. Open the Script Log and Console. Does anything show up in these two when you create the script and exectute it? Maybe try to remove all plugins and restart Cinema 4D to make sure it isn't related to any of the installed plugins. That's all I can think of, right now.
  23. While I don't have a specific date when this or that feature will be available, but I am currently implementing most of your requests. https://www.c4dcafe.com/ipb/forums/topic/95805-seamilar-the-sequel Version 2.4 is mostly completed by now (still want to add a minor feature here and there). And when Igor finds the time, it will be added to the C4DCafe store again. I am not sure about the UV vertex position, but I assumed in R19 you could assign it a specific coordinate. Haven't used that feature yet, though. But if this isn't available yet in R19, then sooner or later I'll add it to Seamilar.
  24. Due to technical PayPal-account issues I have asked Igor to temporarily remove all my plugins from the store, until the account issues are resolved. While plugins cannot be purchased until things are settled, I am still working on next updates. Both for PolyGnome as for Seamilar. Current customers will thus get new versions when beta testing of added features is completed.
  25. dast

    ShowMe

    I have been looking for a while to create a plugin that would allow me to display any kind of things. My first try at such plugin was PointShower, which was created on request of a forum member, who wanted to visualize object's points when the object was not selected. That was a tag plugin, and hence could be added to objects separately. I wanted to extend this functionality and therefore created this new ShowMe plugin, which was intended to display more than only points. But more importantly, I didn't want to have to always add a tag to an object in order to display the wanted information, and thus created this plugin as being part of the scene. However, I also realized that in some situation it would be handy to only display information for some objects only (be these active/selected or not). As such, I created a dual purpose plugin. Accessible to the whole scene, or for specific objects only (via the ShowMe tag). The tag gets precedence over the scene: settings defined on the global scene level are thus overwritten by the tag settings. As this is still a work in progress I only implemented the features I currently needed. More options will be added over the lifetime of the plugin, and as such will probably remain a work in progress. early wip demonstration video: Windows version only (for now), R17 and higher. ShowMe 03.zip
×
×
  • Create New...