Jump to content

SolarPH

Limited Member
  • Posts

    162
  • Joined

  • Last visited

  • Days Won

    1

SolarPH last won the day on August 8 2016

SolarPH had the most liked content!

About SolarPH

  • Birthday 06/28/1999

Profile Information

HW | SW Information

  • OS
    Windows10
  • GPU
    NVidia GEFORCE(1) | Intel Core i3 8th Gen(2)

Recent Profile Visitors

2,025 profile views

SolarPH's Achievements

Newbie

Newbie (1/14)

9

Reputation

  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
  8. Hello! I am wondering if how can I make an object with hypernurbs weight to automatically assign the same amount of hypernurbs to the extruded part. It seems that it works on some rigs that I downloaded, but I can't make it work somehow. For easy examples, i used a cube rather than sphere, which is my original plan to have hypernurbs on. Here is the rendered image and the sample file as reference. scene.c4d the first cube is just an extra, with 100% hypernurbs weight on the whole cube before extrusion. the second and third one having 80% hypernurbs what I want to them is for them to have 80% hypernurbs weight automatically is there any similar method that hypernurbs can work around it without re-assigning hypernurbs?
  9. I thought you were already familiar with the file type .xgr XD .xgr files are X-Pool folders. You can import them by transferring it to MAXON\C4D_###\library\xnode , or import it using the X-Pool menu. I have instructions of importing it here: http://aminoapps.com/p/2wnac6 I found out the problem in node logic "ANY" because it previously scans character match than keyword match, but I can't still solve on how can I remove empty character keyword after using the separator "Enter" or "\n". I still can't find a way to change it to ALL tho, because it still makes the same mistaken result. I think doing... if Input2 == Input3: as a replacement for ALL will not solve the problem, because it needs the two inputs be the same in order.
  10. Ok, so my nodes are now repaired. I can send it to you for testing. Xpresso OV Pack v1.1 by SolarPH.xgr I'll just send the code in your c4dcafe inbox. Xpresso OV Pack v1.1 by SolarPH.xgr
  11. For the question on why I am using python, it's because I can fully control and change the node's properties. I can also use multiple port types in one node, which can't be done with a few xpresso nodes. It also makes my node having clean interface. I think I found the problem... In my first version of it, that was accidentally got deleted, have a list separator. I think that line being missing gives my script malfunction in my second version. I'll be changing it a bit, and see if it will work
  12. I think it's just your graphics card or your PC RAM or the Processor can't take all the memory running. I also experience the same because I only have 1 GB RAM and a single core processor, so I am having the same problem with Minecraft Models, and free shaped models that have many objects in the scene. I am using R14 tho.
  13. in the final IF statement, the purpose of and Input2 != "": is to give a result of false if no string is inside Input2, which comes from outer port of the custom node. It still gives a false result even if Input3 (User Data of the Node) having an empty string. I can send the node pack to you. I'll just change the protection codes for you, then I will send the protection codes to you via PM in this site (the message user feature). I think basic python keywords will still work the same with R19.
  14. Hello! I need a help with a script. I was making an XPresso node pack, which outputs are used for Visibility in Editor and Visibility in Renderer. I need this to work as ALL and not ANY But if I change it to ALL, it outputs 2(True) when there were characters in both fields, even none matches. Also, if you have some ideas on what logic should I add that affects object visibility, just let me know ^-^
×
×
  • Create New...

Copyright Core 4D © 2023 Powered by Invision Community