diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-11-28 19:51:13 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-11-28 20:23:31 +0300 |
commit | 1860441ee7cd4ec75c99cc372fccec839c525f46 (patch) | |
tree | fe8ef38166fce2ff001b2b92dcc77458526e4ebc /render_povray | |
parent | fef2540b25775c3e1e4012bec35ddb8695daa209 (diff) |
Use collection and instance terminology in Python API
This follows naming convention agreed on in T56648.
Diffstat (limited to 'render_povray')
-rw-r--r-- | render_povray/render.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/render_povray/render.py b/render_povray/render.py index 227a588c..1e27beab 100644 --- a/render_povray/render.py +++ b/render_povray/render.py @@ -2266,10 +2266,10 @@ def write_pov(filename, scene=None, info_callback=None): if ob.data: name_orig = "OB" + ob.name dataname_orig = "DATA" + ob.data.name - elif ob.is_duplicator: - if ob.dupli_type == 'GROUP': + elif ob.is_instancer: + if ob.instance_type == 'COLLECTION': name_orig = "OB" + ob.name - dataname_orig = "DATA" + ob.dupli_group.name + dataname_orig = "DATA" + ob.instance_collection.name else: #hoping only dupligroups have several source datablocks ob.dupli_list_create(scene) @@ -2671,7 +2671,7 @@ def write_pov(filename, scene=None, info_callback=None): ############################################else try to export mesh - elif ob.is_duplicator == False: #except duplis which should be instances groups for now but all duplis later + elif ob.is_instancer == False: #except duplis which should be instances groups for now but all duplis later if ob.type == 'EMPTY': tabWrite("\n//dummy sphere to represent Empty location\n") tabWrite("#declare %s =sphere {<0, 0, 0>,0 pigment{rgbt 1} no_image no_reflection no_radiosity photons{pass_through collect off} hollow}\n" % povdataname) @@ -3216,7 +3216,7 @@ def write_pov(filename, scene=None, info_callback=None): duplidata_ref = [] for ob in sel: #matrix = global_matrix * ob.matrix_world - if ob.is_duplicator: + if ob.is_instancer: tabWrite("\n//--DupliObjects in %s--\n\n"% ob.name) ob.dupli_list_create(scene) dup = "" @@ -3228,8 +3228,8 @@ def write_pov(filename, scene=None, info_callback=None): for eachduplicate in ob.dupli_list: duplidataname = "OB"+string_strip_hyphen(bpy.path.clean_name(bpy.data.objects[eachduplicate.object.name].data.name)) dup += ("\tobject {\n\t\tDATA%s\n\t\t%s\t}\n" %(string_strip_hyphen(bpy.path.clean_name(bpy.data.objects[eachduplicate.object.name].data.name)), MatrixAsPovString(ob.matrix_world.inverted() * eachduplicate.matrix))) - #add object to a list so that it is not rendered for some dupli_types - if ob.dupli_type not in {'GROUP'} and duplidataname not in duplidata_ref: + #add object to a list so that it is not rendered for some instance_types + if ob.instance_type not in {'COLLECTION'} and duplidataname not in duplidata_ref: duplidata_ref.append(duplidataname) #older key [string_strip_hyphen(bpy.path.clean_name("OB"+ob.name))] dup += "}\n" ob.dupli_list_clear() |