Jump to content

SolarPH

Regular Member
  • Content Count

    162
  • Joined

  • Last visited

  • Days Won

    1

SolarPH last won the day on August 8 2016

SolarPH had the most liked content!

Community Reputation

9 Noble Beginner

About SolarPH

  • Rank
    Cafe Ronin

Profile Information

  • First Name
    Marc John
  • Last Name
    Benamera
  • Location
    Philippines
  • Website URL
    sellfy.com/SolarPH.MC

Cinema 4D Information

  • C4D Version
    14 Studio

Hardware Information

  • CPU/GPU
    NVidia GEFORCE(1) | Intel Core i3 8th Gen(2)

Recent Profile Visitors

1,488 profile views
  1. Hi C4Dcafe! I had a bit of a problem right now. I actually planned on developing a tool to minimize the time working on meshes which requires resizing each polygon UV scale to 0,0 per polygon. Resizing the whole UV map using the Scale modifier while all polygons is selected just makes it resize and gather to the most center of the selection, and I don't want that. I want each center of individual polygons to stay where the individual centers is. What i need that I find difficult to find is: 1. A way to count polygon count of the polygon object 2. A way to select each polygon in a sing;e-pass loop (preferrably a for loop that selects a single index per loop) 2.1 A way to scale UVW map in X and Y scale and transform it. I was guessing it was a UVW command, but I can't find it in the documentation yet Help is much appreciated.
  2. Might be lifting a fog, you can follow my question on MAXON's Plugin cafe here: https://plugincafe.MAXON.net/topic/12481/python-nodes-shouldn-t-really-they-can-change-the-scene It seems like it really depends on the format on how you modify your scene. The sure thing is if it was ran via Execute method, it will affect the stability.
  3. So far, modification of heirarchy was successful, also the swapping of objects using a python node. It's just the thing that MergeDocuments doesn't have a way to be undone using an AddUndo command I also tried placing the AddUndo between a StartUndo and EndUndo scope Also, if you mean by limiting the run is the Ground Outputs, that's because the node itself won't make changes with the scene file, so I need to make a ground connection that goes into an unused/useless Link-type input. Or if you mean by that one was the boolean switch, I also do it mostly on some switches like auto-updating filename field for textures on rigs and stuff. I can really scrap up the Undo feature by having the Import Wizard do it's thing then deletes itself once it imports all the objects and arranges it according to the correct heirarchy. I want to do this with an Undo feature so that when a user actually want to undo that import, it can be done. But since setting an Undo marking/event was kind of impossible on the Import Wizard, I'll do --Load Parts > Arrange > Delete Wizard-- flow. That is because on my rig, there were: - 1 Bone Version with 2 settings with Remote Control Feature - 6 Mesh Types (3 per bone version) - 2 Cape Objects, which is optional on the rig's binding - Separate Facial Rig (You might also have guessed it already, it's a Minecraft Character Rig, but most parts running on Python scripts) - Remote Facial Controls (just like the bones) The actual goal was to create a wizard that can bind this without taking each part one-by-one and assemble it. I plan it to still be revertible using an Undo event, but it seems like it was less likely to be undone because of how AddUndo can't undo anything used with MergeDocument(). I already have done an Object Hierarchy Manager which orders the objects to be child of a chosen parent, and it can use the AddUndo() without any problem at all, so I think there was no stability issues at all.
  4. Hey C4DCafe! I just started to work on an Import-Type Rig Assembly Wizard, which extracts relevant rig parts from my rig's preset folder to the object manager (since my rig was built as individual pieces and being linked by Python nodes) I have some problems in terms of getting the AddUndo work with MergeDocument. Here's my code: import c4d #Welcome to the world of Python def main(): global Output1 if Input1 != None and Input2 == 1: doc.AddUndo(c4d.UNDOTYPE_CHANGE,doc,True) c4d.documents.MergeDocument(doc,Input1,c4d.SCENEFILTER_MERGESCENE|c4d.SCENEFILTER_OBJECTS|c4d.SCENEFILTER_MATERIALS) c4d.EventAdd() Output1 = None #Ground Output Output1 = None #Ground Output As you can see, there was "Ground Output" comments. My code was situated in a Python node on the following screenshot: The issue are the following: - When using c4d.UNDOTYPE_CHANGE, the object that have been added using the Run switch (It was a boolean attached to a Float(Real) port), the added object just swaps place with the Null, giving the Null the way to get back as the first object (when the null was at the top of the root heirarchy, and the added object stays as the first item in the object manager when the Null was on 2nd/3rd/etc. because of other objectc above it. - When using c4d.UNDOTYPE_NEW, c4d suddenly freezes and just turns my cursor into loading mode. I then need to force close it via Task Manager, and when I open c4d, the bug report window pops up, even if it wasn't a bugreport crash and also did not generate any bugreport file. Other than the two Undo Types, I haven't tested anything that was actually can change data like adding an object from my preset folder, and when Undo was done, the object being added will be deleted. I was aware of the doc.StartUndo() and doc.EndUndo() usage, but I also tried that, but same results. I hope you guys can help me with this particular problem.
  5. Hello c4dCafe! I have a problem on my scene file wherein I need to constraint an object to not move unless I move the parent of that object. I have 2 objects, ABS, which gets referenced, and REL, which references ABS's global coordinates into relative coordinates. ABS has a master parent named PAR, I need PAR to be the root of Global Coords of ABS. I have found a code that can translate Angle and Distance to X and Y on a plane. The thing is I have implemented it on 3D space. I was kind of successful, but there was something wrong. If I rotate it only on one axis, it acts perfectly as what I want it to be. Though when there's 2 or more axis being rotated, it messes up. For example, I had the plane being a child of 2 more planes. The plane ABS was positioned 200,0,200 from PAR, which is at the origin. I already have the REF plane to not move when PAR moves into the other direction. What I want is if I have to rotate the object in any combination of rotated axis, it should stay intact at 200,0,200 In this case, rotating only one axis makes this possible, but it gets bugged when I have rotated more than 2 axis, or one of them isn't a multiple of 360 degrees. Here's the scene file for you guys to look at. The formula inside the Python node is the one that works closest to my goal than others. No other formula or even Global Matrix computation have made a result that close. Edit: I have changed the file because I noticed that I had not changed back the correct code to how it was before making modifications. Here's the file with the correct code: Formula for reoriented 3D space computation 2.c4d Some findings might help all of us. You may notice R1,R2, and R3 being subtracted to atan2 angle computations, it was to make a constraint on the object itself, like when I rotate the parent, it negates the rotation of angle produced on it and passes it on the formula for computing the object's global position. However, it does work only for 1-axis rotation only, and gets bugged when you have 2 active rotations in your object.
  6. Actually, nevermind. I just got it solved by my own. But since it's here already, I'll share how to get days only to print in the string. You can also use some parts of it for logic script building. import c4d import datetime #Welcome to the world of Python def main(): global Output1 starttrial = datetime.date.today() # Date on your computer endtrial = datetime.date(2019,9,1) # Date on when it expires TimeComparison = endtrial - starttrial # Date comparison Output1 = "You only have " + (str(TimeComparison.days)) + " days before this rig expires..." #Print as String
  7. Good Day! So, I do search some raw python codes, but there are so many, but I can't find one that is specifically made for Cinema4D R14. Do anyone know how to get the current device date and time and compare it with a time that I have set? I do want to use it in making a Demo Version of a rig I was making, but since majority of it's parts do work under Python Scripts inside Xpresso tags, I think I can use that certain part of code to disable the main module that connects the parts to make the rig work at all. Also, is there any way to print how many days remaining before the set datetime to arrive? For example, I want to print "You have " + days + " days remaining before this rig set expires". I can print it in console, but I don't know how it will be included in a string output
×
×
  • Create New...