Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenloader/intern/versioning_cycles.c
| Show First 20 Lines • Show All 390 Lines • ▼ Show 20 Lines | for (ParticleSettings *part = bmain->particles.first; part; part = part->id.next) { | ||||
| part->rad_tip = cycles_property_float(cpart, "tip_width", 0.0); | part->rad_tip = cycles_property_float(cpart, "tip_width", 0.0); | ||||
| part->rad_scale = cycles_property_float(cpart, "radius_scale", 0.01); | part->rad_scale = cycles_property_float(cpart, "radius_scale", 0.01); | ||||
| if (cycles_property_boolean(cpart, "use_closetip", true)) { | if (cycles_property_boolean(cpart, "use_closetip", true)) { | ||||
| part->shape_flag |= PART_SHAPE_CLOSE_TIP; | part->shape_flag |= PART_SHAPE_CLOSE_TIP; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| if (!MAIN_VERSION_ATLEAST(bmain, 280, 67)) { | |||||
| /* Unify Cycles and EEVEE Film Transparency. */ | |||||
| for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) { | |||||
| if (STREQ(scene->r.engine, RE_engine_id_CYCLES)) { | |||||
| IDProperty *cscene = cycles_properties_from_ID(&scene->id); | |||||
| if (cscene) { | |||||
| bool cycles_film_transparency = cycles_property_boolean(cscene, "film_transparent", false); | |||||
| scene->r.alphamode = cycles_film_transparency ? R_ALPHAPREMUL: R_ADDSKY; | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| } | } | ||||
| void do_versions_after_linking_cycles(Main *bmain) | void do_versions_after_linking_cycles(Main *bmain) | ||||
| { | { | ||||
| if (!MAIN_VERSION_ATLEAST(bmain, 280, 66)) { | if (!MAIN_VERSION_ATLEAST(bmain, 280, 66)) { | ||||
| /* Shader node tree changes. After lib linking so we have all the typeinfo | /* Shader node tree changes. After lib linking so we have all the typeinfo | ||||
| * pointers and updated sockets and we can use the high level node API to | * pointers and updated sockets and we can use the high level node API to | ||||
| * manipulate nodes. */ | * manipulate nodes. */ | ||||
| ▲ Show 20 Lines • Show All 58 Lines • Show Last 20 Lines | |||||