Cycles: Use new internal hair shape properties.

The do_version actually copy the existing custom properties to the internal
ones, because theses properties are straight port from cycles.
This commit is contained in:
2018-05-29 11:22:07 +02:00
parent e0e3038b1e
commit 2faef3473c
4 changed files with 16 additions and 84 deletions

View File

@@ -433,3 +433,14 @@ def do_versions(self):
(bpy.data.version >= (2, 80, 0) and bpy.data.version <= (2, 80, 4)):
# Switch to squared roughness convention
square_roughness_nodes_insert()
if bpy.data.version <= (2, 80, 15):
# Copy cycles hair settings to internal settings
for part in bpy.data.particles:
cpart = part.get("cycles", None)
if cpart:
part.shape = cpart.get("shape", 0.0)
part.root_radius = cpart.get("root_width", 1.0)
part.tip_radius = cpart.get("tip_width", 0.0)
part.radius_scale = cpart.get("radius_scale", 0.01)
part.use_close_tip = cpart.get("use_closetip", True)