Python
3,915 topics in this forum
-
- 1 follower
- 5 replies
- 3.5k views
Hi all, I just wanted to let you know that I have released a new version of my free python script for C4D: NeuronBuild. This script allows a C4D user (there is also a separate version for ZBrush) to import neuron morphology data from NeuroMorpho.org. It creates realistic, accurate models that you can use in your illustrations and animations, either directly or as the basis for further modelling. There are more than 100,000 entries in the NeuroMorpho repository, across numerous species and cell types. You can learn more, and download the script at: https://github.com/NWoolridge/NeuronBuild A video on the new features is available at: https://vimeo.com/391015…
Last reply by Igor, -
-
- 1 reply
- 35 views
Hello for eberybody! I have an easy question but cant find an answer for it. I made a script which change icon color. I use "op" command, but it works just for one object. I tried to use GetActiveObject but it doesn't help me. My aim to change color for all selected ojects (parents and children). My script: import c4d # Main function def main(): op [c4d.ID_BASEOBJECT_USECOLOR] = 2 op [c4d.ID_BASELIST_ICON_COLORIZE_MODE] = 2 op [c4d.ID_BASEOBJECT_COLOR] = c4d.Vector(0.2, 0.907, 1) c4d.EventAdd() # Execute main() if __name__=='__main__': main() Which command in python sholud i use?
Last reply by Cairyn, -
- 0 replies
- 95 views
Is there a script to reset an objects freeze trasnforms but offset the animatied keyframes to keep the animation the same? I need to do it becouse the GLTF exporter does not support freeze transforms it seems.
Last reply by MrScreenName, -
- 2 followers
- 2 replies
- 90 views
Hello! I am trying to figure out how to write a script to make the density value of a pattern jump between 15-77% randomly every .25 seconds I can't seem to figure out how to write this script Could anyone please recommend the proper way to format this script? Thank you so much!!
Last reply by jed, -
- 0 replies
- 55 views
With a python script, I'm trying to queue for render the current project with different (vray) cameras, different texture path for a given (vray) material, and different rendered image filename, and a certain setting. I could not find a way to control what I queue. I have in a project vray cameras: camNameList = ["vray Cam2 global", "vray Cam1 close tree", "vray Cam3 closer tree", "vray Cam4 angle L", "vray Cam5 angle R", "vray Cam6", "floor"] but I can't access to them:batch = documents.GetBatchRender() batch.Open() batch.AddFile(file, 1) # works but I have not control over 1) which camera # 2) which render setting 3) which f…
Last reply by soleil, -
- 1 follower
- 1 reply
- 108 views
Hi, I'm looking for a way to automatically generate complimentary colours based on a single user selected colour. I'm using Redshift & ideally I'd like to be able to create one colour (e.g. within one colour constant node) which in turn somehow automatically populates several other colour constant nodes with complimentary colour values for use with a multishader node / other materials. If anyone has any ideas on how to achieve this - or where to even start with this kind of thing - that would be great. Thanks for your time 🙂
Last reply by DasFrodo, -
- 8 replies
- 231 views
Hello, Can someone explain to me how to center the selected object in the viewport without using CallCommand? Thank you in advance !
Last reply by SharpEars, -
- 1 follower
- 11 replies
- 987 views
Hi all, I've been playing around with python inside c4d for the last couple days, just for the sake of learning something new (and open future creative possibilities, why not). I've been able to manipulate splines and polygons, create objects from scratch and send modelling commands... now, I want to do this 'simple thing' and I'm a bit stuck: I want to be able to 'flatten' a polygon selection based on the normals, like when you drag the scale axis to 0% on z handle when modelling. So far I've been able to move the selected polygons (or its points) based on the normal direction, but can't seem to get this one. Any hints will be greatly appreci…
Last reply by bjlotus, -
- 1 follower
- 1 reply
- 93 views
Hi, Does anyone knows how to rotate selected objects axis ( not objects ) for example by 270 degree by script ?
Last reply by Cairyn, -
- 1 follower
- 2 replies
- 90 views
Hi, I have been using this great script by Jake Allen at Sarofsky. In short, all its doing is the following: - Select any points of an object - Script creates a separate spring for each point at the exact point position. This is extremely handy for soft bodies and other dynamic rigging scenarios. Atm the script only works in R20. I guess this is due to Python change in R23. Is it possible for someone to check out and tweak it so it can work in R23? Many thanks! Spring Break.py
Last reply by thanulee, -
- 1 follower
- 1 reply
- 80 views
Not a script integrated into C4D but a useful script by AndyB at codepen non the less. When you need to generate an UV pattern with a sepcifick number of tiles you could generate it here, set the parameters and RMB to save the image: https://codepen.io/andycbriggs/pen/yGmKLM
Last reply by Igor, -
- 1 follower
- 17 replies
- 384 views
hello there! I'm working on a solar system simulation using Nasa's JPL data, and i'm struggling to find out how to put all planets, moons and sun in place and motion..any help would be great
Last reply by srek,