Jump to content

FloatinPoint

Limited Member
  • Posts

    31
  • Joined

  • Last visited

Everything posted by FloatinPoint

  1. Ohhhhkay... I think this makes sense to me. My brain is still a little exploded about it, and I'll have to try and break things down a bit more- before I'm certain I know what's going on here. Thank you very much for taking the time to explain things so clearly. I'm very new to scripting stuff so appreciate the hand holding :)
  2. Ah man, I still can't seem to work this out, any help would be appreciated. I simplified the project file a bit (attached) Spline Rig 02c.c4d
  3. Hey there. I've run into some trouble with a little script I'm hacking together, hoping someone could spare a moment to take a look? I'm just trying to connect the components of a spline to some arbitrary nulls within my document. So far everything seems to be working, except the tangents- which are not positioned where their corresponding nulls are. Document attached and code below. import c4d #Welcome to the world of Python def main(): MySpline = op.GetObject() #This is the spline. P1 = op[c4d.ID_USERDATA,1] #First point T1L = op[c4d.ID_USERDATA,3] #First point's left tangent T1R = op[c4d.ID_USERDATA,4] #First point's right tangent P2 = op[c4d.ID_USERDATA,6] #Second point T2L = op[c4d.ID_USERDATA,7] #Second point's left tangent T2R = op[c4d.ID_USERDATA,8] #Second point's right tangent MySpline.SetPoint(0, P1.GetMg().off) #Set position of first spline point MySpline.SetPoint(1, P2.GetMg().off) #Set position of second spline point MySpline.SetTangent(0, T1L.GetMg().off, T1R.GetMg().off) #Adjust tangents for point 1 - Not Working! MySpline.SetTangent(1, T2L.GetMg().off, T2R.GetMg().off) #Adjust tangents for point 2 - Not Working! MySpline.Message(c4d.MSG_UPDATE) Spline Rig 02b.c4d
  4. Wow, thanks for all this dude! I can't give it a go until I have access to cinema again tomorrow, but really looking forward to geeking out with this stuff :) Also thanks for taking the time to explain what I had wrong in my hacked together script, will be helpful in the future as I get my head around all this stuff
  5. Thanks Kalugin, I really appreciate your time working on this. I've tested the script and it works pretty nicely. I do have an issue and a question. Issue: When inserting a Generator (as parent of an object) it should be placed in the same global position and rotation as its child. Is this possible to implement? Question: I'll be making a bunch of these scripts, one for every Deformer and one for every Generator. Would it be better to split out the Generator code and Deformer code, so Generator scripts don't care about Deformers and vice versa? I've attempted to do so here (creating a Generator only script, but sadly this doesn't run– because I just don't know things. import c4d clonerObject = c4d.BaseObject(1018544) def addGenerator(generator, objs): selectedObjects = doc.GetActiveObjects(0) if len(selectedObjects) == 0: doc.InsertObject(generator) doc.AddUndo(c4d.UNDOTYPE_NEW, generator) else: for obj in selectedObjects: new_generator = generator.GetClone() new_generator.InsertBefore(obj) doc.AddUndo(c4d.UNDOTYPE_NEW, new_generator) doc.AddUndo(c4d.UNDOTYPE_CHANGE, obj) obj.InsertUnder(new_generator) def main(): addGenerator(clonerObject, selectedObjects) if __name__=='__main__': main()
  6. Well damn, hit a frustrating roadblock. Trying to make shortcut keys for Generators and Deformers, but annoyingly these shortcuts don't play nice with modifiers (So can't insert as parent/child via option/shift modifiers). Going to need to use scripts here too (unless theres a trick Ive missed?). Can anyone help scripting out something like this: "If an object/s are selected, create Deformer/s as child of object/s, otherwise just create Deformer" and one for Generators that goes "If object/s are selected create Generator/s as parent of object/s, otherwise just create Generator"
  7. This little guy is also interesting https://www.elgato.com/en/gaming/stream-deck
  8. http://www.tipro.net/ecatalogue/128-programmable-keys/
  9. “Point of Sales” keyboard. It’s a checkout keyboard designed for shops. Fully customiseable with onboard memory. Pretty cool really :)
  10. Awesome thanks so much, that’s going to get thing rolling! I’m terms of control surface, yeah I have these 2 programmable POS keyboards, each with 128 keys with relegendable key caps. Have had them for years and just now thinking of ways I can use them :) The more I think about this, the more exciting it becomes! Thanks for your help!
  11. Wondering if anyone (who's a little more expresso/script savvy than I) could weigh in on the possibility of getting something like this set up… I'd like to control specific attributes with keyboard shortcuts. For example hitting Shift+1~1 would increase a specific user data slider by 10 units. If I could get this set up, I could create a kind of simple hardware control surface for animation. No idea if I'm "pie in the sky" thinking on this one?
  12. hmm okay that makes sense and thank you for taking the time to explain things so succinctly. I've worked out that the mess I was in had to do with rotation order and have solved it via a parent null taking over one of the rotation axis. Now I have another problem in that I'd much prefer to have a single controller for animating this part of the rig. Do you know any tricks to drive a parent child set of rotations via a single objects global rotation? see attached example scene. Further assistance.c4d
  13. Hey guys, Im a little confused with how normalised vectors should work. In this example I have a cube with some XPresso normalising its vector. When I rotate the cube (even just a tiny amount) along one of its axis, immediately the normal snaps to 1 or -1 depending on the direction rotated. Only when the other axis are non-zero do I get a useful result ie. nice smooth decimal gradient from -1 to 1. Why is this? Is there a way around it? Here's a very short screen capture of the issue: https://www.dropbox.com/s/mqii356j4ogev8n/Normalised vector issue.mov?dl=0 Thanks :)
×
×
  • Create New...