A new version of Cineversity has been launched. This legacy site and its tutorials will remain accessible for a limited transition period

Visit the New Cineversity
   
 
Set Selected Point to 0 script
Posted: 02 November 2015 01:09 PM   [ Ignore ]  
Total Posts:  2
Joined  2013-08-23

Hello,

I am trying to speed up my modeling workflow by creating a script in either COFFEE or Python that lets me click one key or icon and set the selected Point(s) to an X a world position of 0. The Set Point Value operator requires to many click and mouse movements and that time adds up. I have a small amount of programming knowledge but no experience scripting for Cinema. Any help or guidance is appreciated.

Thanks in advance!
Kyle

Profile
 
 
Posted: 02 November 2015 04:25 PM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Kyle,

Something like Donavan introduces here:

http://www.cineversity.com/vidplaytut/zero_extrude_script_part_1

Depending on your C4D release/version, you might check the workflow.

Rick has done something here that might work as well for you:

http://www.cineversity.com/vidplaylist/python_scripting1/zero_out_script

You might find this link useful:

https://developers.maxon.net/docs/Cinema4DPythonSDK/html/index.html

All the best

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 02 November 2015 07:33 PM   [ Ignore ]   [ # 2 ]  
Total Posts:  2
Joined  2013-08-23

Thanks Dr Sassi. That was exactly what I was trying to do. I used the method in that video to create this script called ZeroX. Works exactly how I need it to. Have an awesome day!

Edit: I added an action to the end that switches me back to whatever tool I was using at the time.

//Select Tool
CallCommand(200000065);

// X to Set
tool()#MDATA_SETVALUE_SETX=1;

// X Value to ZERO
tool()#TEMP_MDATA_SETVALUE_VAL_X=0;


//New Transform
CallButton(tool(), MDATA_NEWTRANSFORM);

//Toggle tool back to active tool
CallCommand(13321);

Profile
 
 
Posted: 02 November 2015 07:37 PM   [ Ignore ]   [ # 3 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Great, and thanks for the feedback, Kyle.

The thanks goes certainly to our coding instructor!

ENJOY.

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile