-
Posts
1,281 -
Joined
-
Last visited
-
Days Won
68
Content Type
Profiles
Blogs
Forums
Gallery
Pipeline Tools
3D Wiki
Plugin List
Store
Downloads
Everything posted by dast
-
It has been decided to put the plugin on an early retirement scheme ... The alternative solution using a script and short-cut key(s) is a much more user-friendly approach, which I actually prefer over a plugin. And it's platform independent, as well as release independent (unless the R20 SDK does break it). But all effort to make the original plugin is not gone to waste. Firstly, I learned a few things while implementation this "sneaky background" action. Secondly, it resulted in a much easier to maintain scripted solution. I will probably provide some update to the script, as I figured out a few extras. But I am currently too busy, so that will have to wait for a while.
-
While I still believe the current plugin to be obsolete, I agreed to let user @natevplas beta test it. If only to test the provided mechanism does work without introducing any lag or delayed user response. This mechanism could then, potentially, be used in future for other purposes Why I believe the plugin to be obsolete? Well, it is only a matter of creating appropriate short cut keys in order to provide the current behaviour (keep unused points), or the custom behaviour (auto remove points). Currently, the backspace and delete keys are assigned to the current behaviour. But people can simply assign a different short cut key to the current behaviour and assign the backspace and delete key to the above script. This way, it's up to the user to define the default and custom behaviour ... without the need of a plugin (which will probably not work in future releases anyway).
-
Copy following code into the Script Manager window and save it as i.e "Delete+Cleanup" Then with "Customize Commands", filter on the entered file name, and assign it "Shift+Delete" as shortcut keys ... and Bob's your uncle. Makes this whole AROP plugin I made completely obsolete ;-) Just why I didn't think of that before starting this whole plugin. import c4d def main(): # perform the delete (ID=12109) c4d.CallCommand(12109) # perform the clean up # get the currently active polygon objects objects = list() activeObjects = doc.GetActiveObjects(c4d.GETACTIVEOBJECTFLAGS_CHILDREN) for obj in activeObjects: if obj.IsInstanceOf(c4d.Opolygon): objects.append(obj) # remove unused points settings = c4d.BaseContainer() settings[c4d.MDATA_OPTIMIZE_UNUSEDPOINTS] = True res = c4d.utils.SendModelingCommand(command = c4d.MCOMMAND_OPTIMIZE, list = objects, mode = c4d.MODELINGCOMMANDMODE_ALL, bc = settings, doc = doc) c4d.EventAdd() if __name__=='__main__': main() Edit: Had some typos in the code, fixed now.
-
Well, the very first name I used when setting up the research for this project was "Auto Orphan Killer". It's just a name, I thought at that point. And while it might sound funny in a way, I don't think many would have appreciated it. Another plugin of mine (PolyGnome) was originally meant to contain "enjoliver" in its name (french for embellish-er). Guess I better not call this new plugin "enjoliver twist" then. Nice idea, I didn't think about that. However, deleting is handled by Cinema itself, then the plugin does some post-processing. As such it does not detect the "delete" nor "shift-delete". Currently when you use "shift+delete" nothing happens, as Cinema does not know what that shortcut actually means. Had a quick look in "customize commands" and apparently the delete key (when meant to delete the current selected polygons, edges, points) is assigned ID 12109. For the "shift+delete" to work the way you mentioned you could assign it to some script, which does a delete + clean up. Which is probably easier to create than this whole plugin I made ... Again, didn't think of that. My pleasure.
-
I am working on a new plugin, and would like to query for user interest. Background info: I am not an expert at modeling, but from time to time I create some objects for short stories I am making, or other projects I am working on. For the past 2 years or so, I have spent most of my time writing some plugins. As such I didn't quite follow the progress of modeling tools (or lack thereof) in the recent Cinema 4D releases. Recently I was creating a mesh, representing a faceted low-poly gnome to be used as illustration for one of my plugins, when I noticed that removing polygons still left orphaned points behind. Same behaviour as always, from the early days I worked with Cinema, till the last time I modeled something before focusing on plugin writing, and then even today. So, over the span of 10 Cinema 4D releases (R9 - R19), nothing seems to have changed regarding this behaviour. Now, I can understand some of the reasoning behind the current behaviour. Still, I wonder how many requests I have submitted to MAXON over the years, to provide an option to allow the user to decide if orphan points should, or should not be removed automatically when deleting polygons. I don't know what R20 will bring, but I didn't want to wait any longer for MAXON to provide said option, and decided to write my own plugin to perform the task of removing these orphan points ... while providing an option to do so or keep the current behaviour (avoiding the need of removing the plugin when user wants to switch between these different behaviours). The plugin: It's a free R17-R19 plugin, currently Windows only, but will be made available for MacOS when time permits. It might also become available for R16, but nothing promised at this time. The plugin is document based, and simply runs in the background. No user interaction is required, as removal of orphan points is done automatically, whatever mode the user is working in. Simply enable the plugin (scene configuration) ... and model away. Naming request: Since the project is still ongoing, I haven't decided for a final name yet. The project is currently named AROP, short for Auto Remove Orphan Points. But could as well end up being named URP (Unused Point Remover), or anything closely related. If anyone comes up with a fancy name, just let me know. Beta testing request: As with all my plugins, it is closely based on the workflow I am familiar with. While good enough for me, this might not be the case of more expert users, or even beginners for that matter. As such, I'd like to ask for a few people's time to spend testing this plugin, before being officially released. Contact me for details. Most important feedback I am looking forward to: - is the plugin slowing down the performance of Cinema 4D - any lag related to the use of the plugin on small or large objects - are there any orphan points still left untouched by the plugin - what's the total user experience using this plugin Thanks for reading Daniel
-
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.
-
Haven't used Xpresso lately, but there is a Memory node, if I recall correctly, which allows for a history level.
-
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)
-
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()
-
The default custom checker doesn't use a tiling option, it simply allows to indicate how many cells the checkerboard consists of. Not sure I can introduce tiling in an easy way, but I understand the reason for wanting this. Nothing promised, but I'll see what can be done in a future update.
-
Thanks for the feedback, Gezza. And apologies for a late reply. It is true you cannot align by selected items. The align tool allows for its own interactive selection instead. The reason for this is to avoid having to perform quite some validation on the user-selected items when performing an align. When only dealing with the align tool's interactive selection, that selection is sure to be valid, and also visually indicates what will be aligned. Additionally, due to the tool's possible options (parallel loops, parallel rings) there needs to be an interactive selection anyway. More so, the interactive selection allows to specify which edge or polygon is to be the reference for the whole alignment to be performed. As such, introducing alignment on selected items will require quite some work, while providing only a limit functionality to what is currently available via the interactive align selection. I could indeed allow the items to remain selected after the align tool has been used (via an option in the Attribute Manager, or via an option/modifier key). This would indeed allow for a quick repositioning after the alignment, without the need of re-selecting things. Then I wonder why this small repositioning is required afterwards. You could also reposition the reference item being used for the alignment, before the alignment is performed. I agree this will probably not work for all scenarios and will consider your selection request for a next update.
-
Version 2.5 has been released, and sent out to the current customers. Demonstration video showing the new additions:
-
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.
-
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".
-
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()
-
use the SetName() function on your tagm, as in: tag().SetName(newName)
-
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
-
Thanks for replying bezo. The plugin has been released about something more than a year ago, what was then version 2.0 Since then updates have been released with additional features. Price of the plugin has also increased over the past year since more and more features have been added, but customers have received these updates for free. I am currently finalizing version 2.5, with some more updates coming in the future.
-
I can provide a solution where the image is kept non-square while the UV canvas remains square. For this I would then provide two options: "fit" and "fill" The "fit"option will fit the image with the largest dimension into the UV canvas (in the above example: the width), this will introduce blank spaces above and below. With the "fill" option the smallest dimension is used to fit into the UV canvas (in the above example: the height), resulting in the image being clipped in the width. I might introduce additional options to allow offsetting the image into the UV canvas after fitting. By default the image would be centered into the UV canvas.
-
I will see what I can come up with, but cannot promise any solution available in the 2.5 time frame Just to make sure we're on the same track. What exactly do you expect to achieve with the fitting? Do you want the UV's to fit to the non-square inage, or the non-square image to be fitted to the square UV canvas? What do you mean by "it changes the image" when using the Texture Size command? How is the image adjusted, and in waht way would you want it to adjust instead?
-
Thanks for the feedback so far. @bezo One thing to understand is that most of the UV editing functionality is not available to plugins. I always wondered why so few UV related plugins existed for Cinema 4D. Once I started writing my own I soon understood the reason. As a result, all required features have to be designed and written from scratch. No way to simply re-use built-in features. At least not with the current R19 SDK. Who knows what R20 will bring us. @avideditor I usually want to introduce more than just a few changes per update. As such, the release of 2.5 update will need to wait after the necessary additions are all implemented. Then a beta cycle follows, which might last a while depending the issues encountered. The fewer extra features are added the sooner the update is released ... It all comes down to balance between the number of features to add and the time the customer wants to wait between updates. @Cerbera The distortion display mode was something I wanted to try. I still am wondering about the right distortion indication to use. The standard seems to be to visualize red polygons where the UV's are stretched, and blue where they are compressed. Logically I would expect the opposite (red for compression -> hotter, blue for expanded/stretched -> colder). I suppose it depends how you want to indicate the distortion: from point of view of UV -> Texture -> Mesh, or from point of view of Mesh -> Texture -> UV. Seems the standard is Mesh -> Texture -> UV: when a large mesh surface gets a small texture area, the mesh gets compressed into a small UV space (= red). Logically I would expect you're interested in the UV space being stretched out onto the mesh (=blue) Maybe I'll need to provide alternative distortion viewing options: logical distortion versus "think different" distortion, where the blue and red colors get swapped. With the introduction of the Texture Display Mode, I now can finally provide the "snap to pixel" feature I wanted to implement for a while. Haven't recorded a video showing that feature, but it's already implemented. Another item ticked off from the to do list. Next is figuring out if I can also provide the quantization in pixel units without cluttering the user interface too much. Using cursor keys to precisely move items (points/edges/polygons/islands) has also been implemented in this update.
-
Working on the next update ...
-
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
-
Happy New Year, and congrats with the 50000 members.
-
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.