On 25/01/2018 at 21:26, xxxxxxxx wrote:
Hi Guys!
I know its been a while guys!
Hope yall are good and having a good year so far.
Will I am trying to get the spline angle data but its not getting it.
I would love to know what I am doing wrong.
########################################
# IMPORTS
########################################
import c4d, os, sys, subprocess, webbrowser, collections, math, random, urllib, glob, time
from c4d import plugins, gui, bitmaps, documents, storage, utils
#--------------------------------------#
def main() :
doc = c4d.documents.GetActiveDocument()
obj = doc.GetActiveObject()
SplineName = obj.GetName()
GetSplineType = obj[c4d.SPLINEOBJECT_TYPE]
if GetSplineType == 0: print SplineName + " - Type - Linear"
if GetSplineType == 1: print SplineName + " - Type - Cubic"
if GetSplineType == 2: print SplineName + " - Type - Akima"
if GetSplineType == 3: print SplineName + " - Type - B-Spline"
if GetSplineType == 4: print SplineName + " - Type - Bezier"
GetSplineClose = obj[c4d.SPLINEOBJECT_CLOSED]
if GetSplineClose==False: print SplineName + " - CloseSpline : UnCheck"
if GetSplineClose==True: print SplineName + " - CloseSpline : Check"
GetInterpolation = obj[c4d.SPLINEOBJECT_INTERPOLATION]
if GetInterpolation == 0: print SplineName + " - Points - None"
if GetInterpolation == 1: print SplineName + " - Points - Natural"
if GetInterpolation == 2: print SplineName + " - Points - Uniform"
if GetInterpolation == 3: print SplineName + " - Points - Adaptive"
if GetInterpolation == 4: print SplineName + " - Points - Subdivided"
# // Its not getting the value !!!! //
GetAngle = obj[c4d.SPLINEOBJECT_ANGLE]
if GetAngle == 0.087:
print "Its 5"
c4d.EventAdd()
if __name__=='__main__':
main()
Result when execute:
Any tips or help will be very appreciate!
Cheers,
Ashton