bpy.data.curves.new(name= "test" , type = 'SURFACE') does not create a surface #29369

Closed
opened 2011-11-23 06:35:29 +01:00 by patrik colling · 5 comments

%%%import bpy

create a nurb-surface with function class bpy.types.BlendDataCurves.new()

surf = bpy.data.curves.new(name= "test" , type = 'SURFACE')

code for splines and control-points

obj = bpy.data.objects.new("test_obj", surf)
bpy.context.scene.objects.link(obj)

  • the code will produce a curve, it shoud be a surface.
  • the outliner-editor shows me a curve-symbol ,it shoud be a surface-symbol.
  • the 3D-View-editor , in editmode, shows a menu for curve , it shoud be a menu for surface.
  • documentation => class bpy.types.BlendDataCurves(bpy_struct), type (enum in [‘CURVE’, ‘SURFACE’, ‘FONT’])

create a surface with primitive function to compare the results.

bpy.ops.surface.primitive_nurbs_surface_curve_add()

  • tested with blender versions
  • version 2.60 (sub 0), revision 41226. Release
  • build date: 2011-10-24, 10:54:39
  • platform: Windows:64bit
  • and
  • version 2.59 (sub 0), revision 39307. Release
  • build date: 2011-08-13, 11:44:03
  • platform: Windows:64bit%%%
%%%import bpy # create a nurb-surface with function class bpy.types.BlendDataCurves.new() surf = bpy.data.curves.new(name= "test" , type = 'SURFACE') # code for splines and control-points obj = bpy.data.objects.new("test_obj", surf) bpy.context.scene.objects.link(obj) - the code will produce a curve, it shoud be a surface. - the outliner-editor shows me a curve-symbol ,it shoud be a surface-symbol. - the 3D-View-editor , in editmode, shows a menu for curve , it shoud be a menu for surface. - documentation => class bpy.types.BlendDataCurves(bpy_struct), type (enum in [‘CURVE’, ‘SURFACE’, ‘FONT’]) # create a surface with primitive function to compare the results. bpy.ops.surface.primitive_nurbs_surface_curve_add() - tested with blender versions - version 2.60 (sub 0), revision 41226. Release - build date: 2011-10-24, 10:54:39 - platform: Windows:64bit - and - version 2.59 (sub 0), revision 39307. Release - build date: 2011-08-13, 11:44:03 - platform: Windows:64bit%%%
Author

Changed status to: 'Open'

Changed status to: 'Open'

%%%It's failure of code which tries to guess object type from Curve datablock. It's needed in cases when you're changing object datablock.
Probably it can be improved so it wouldn't change object's type when it's not obvious which type to use and when both of Curve and Surface types can be used.
Will look into this issue.%%%

%%%It's failure of code which tries to guess object type from Curve datablock. It's needed in cases when you're changing object datablock. Probably it can be improved so it wouldn't change object's type when it's not obvious which type to use and when both of Curve and Surface types can be used. Will look into this issue.%%%
Author

%%%thanks, Sergey for the quick response.%%%

%%%thanks, Sergey for the quick response.%%%

%%%Fixed in svn rev42126. Thanks for the report, closing it now.%%%

%%%Fixed in svn rev42126. Thanks for the report, closing it now.%%%

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#29369
No description provided.